@nocobase/plugin-data-visualization 2.0.0-alpha.32 → 2.0.0-alpha.33
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Sankey:function(){return Hk},Mix:function(){return HY},Bar:function(){return G2},Stock:function(){return HS},Rose:function(){return Hd},Sunburst:function(){return HK},Histogram:function(){return Hv},Funnel:function(){return G9},DualAxes:function(){return G6},G2:function(){return ey},Liquid:function(){return HC},Column:function(){return G3},CirclePacking:function(){return Hz},Radar:function(){return Ha},Box:function(){return Hw},Scatter:function(){return Hi},Waterfall:function(){return Hg},Treemap:function(){return HR},BidirectionalBar:function(){return HH},Area:function(){return G0},WordCloud:function(){return HL},Line:function(){return Ht},RadialBar:function(){return HF},Gauge:function(){return HA},Venn:function(){return HU},Tiny:function(){return Hp},Heatmap:function(){return Hx},Bullet:function(){return HP},measureTextWidth:function(){return HQ},Base:function(){return GQ},Violin:function(){return H$},Pie:function(){return Hn}});var l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,B,z,W,$,G,H,V,U,q,Y,X,K,Z,Q,J,tt,te,tn,tr,ti,to,ta,tl,ts,tu,tc,tf,tp,th,td,ty,tg,tm,tv,tb,tx,tO,tw,tE,tk,tM,tS,t_,tP,tj,tA,tT,tC,tN,tL,tI,tR,tD,tF,tB,tz,tW,t$,tG,tH,tV,tU,tq,tY,tX,tK,tZ,tQ,tJ,t0,t1,t2,t5,t3,t4,t6,t8,t9,t7,et,ee,en,er,ei,eo,ea,el,es,eu,ec={};n.r(ec),n.d(ec,{geoAlbers:function(){return iZ},geoAlbersUsa:function(){return i9},geoAzimuthalEqualArea:function(){return iR},geoAzimuthalEqualAreaRaw:function(){return iI},geoAzimuthalEquidistant:function(){return i2},geoAzimuthalEquidistantRaw:function(){return i1},geoConicConformal:function(){return iH},geoConicConformalRaw:function(){return iG},geoConicEqualArea:function(){return iK},geoConicEqualAreaRaw:function(){return iX},geoConicEquidistant:function(){return iC},geoConicEquidistantRaw:function(){return iT},geoEqualEarth:function(){return i0},geoEqualEarthRaw:function(){return iJ},geoEquirectangular:function(){return iA},geoEquirectangularRaw:function(){return ij},geoGnomonic:function(){return iY},geoGnomonicRaw:function(){return iq},geoIdentity:function(){return i4},geoMercator:function(){return iF},geoMercatorRaw:function(){return iD},geoNaturalEarth1:function(){return i3},geoNaturalEarth1Raw:function(){return i5},geoOrthographic:function(){return iU},geoOrthographicRaw:function(){return iV},geoProjection:function(){return iS},geoProjectionMutator:function(){return i_},geoStereographic:function(){return i8},geoStereographicRaw:function(){return i6},geoTransverseMercator:function(){return iW},geoTransverseMercatorRaw:function(){return iz}});var ef={};n.r(ef),n.d(ef,{frequency:function(){return lI},id:function(){return lR},name:function(){return lD},weight:function(){return lL}});var ep={};n.r(ep),n.d(ep,{add:function(){return uQ},adjoint:function(){return um},clone:function(){return uc},copy:function(){return uf},create:function(){return uu},determinant:function(){return uv},equals:function(){return u5},exactEquals:function(){return u2},frob:function(){return uZ},fromQuat:function(){return uB},fromQuat2:function(){return uN},fromRotation:function(){return uP},fromRotationTranslation:function(){return uC},fromRotationTranslationScale:function(){return uD},fromRotationTranslationScaleOrigin:function(){return uF},fromScaling:function(){return u_},fromTranslation:function(){return uS},fromValues:function(){return up},fromXRotation:function(){return uj},fromYRotation:function(){return uA},fromZRotation:function(){return uT},frustum:function(){return uz},getRotation:function(){return uR},getScaling:function(){return uI},getTranslation:function(){return uL},identity:function(){return ud},invert:function(){return ug},lookAt:function(){return uY},mul:function(){return u3},multiply:function(){return ub},multiplyScalar:function(){return u0},multiplyScalarAndAdd:function(){return u1},ortho:function(){return uU},orthoNO:function(){return uV},orthoZO:function(){return uq},perspective:function(){return u$},perspectiveFromFieldOfView:function(){return uH},perspectiveNO:function(){return uW},perspectiveZO:function(){return uG},rotate:function(){return uw},rotateX:function(){return uE},rotateY:function(){return uk},rotateZ:function(){return uM},scale:function(){return uO},set:function(){return uh},str:function(){return uK},sub:function(){return u4},subtract:function(){return uJ},targetTo:function(){return uX},translate:function(){return ux},transpose:function(){return uy}});var eh={};n.r(eh),n.d(eh,{area:function(){return Cw},bottom:function(){return Cj},bottomLeft:function(){return Cj},bottomRight:function(){return Cj},inside:function(){return Cj},left:function(){return Cj},outside:function(){return CN},right:function(){return Cj},spider:function(){return CI},surround:function(){return CD},top:function(){return Cj},topLeft:function(){return Cj},topRight:function(){return Cj}});var ed={};n.r(ed),n.d(ed,{interpolateBlues:function(){return Lm},interpolateBrBG:function(){return NB},interpolateBuGn:function(){return N5},interpolateBuPu:function(){return N4},interpolateCividis:function(){return LP},interpolateCool:function(){return LF},interpolateCubehelixDefault:function(){return LR},interpolateGnBu:function(){return N8},interpolateGreens:function(){return Lb},interpolateGreys:function(){return LO},interpolateInferno:function(){return LX},interpolateMagma:function(){return LY},interpolateOrRd:function(){return N7},interpolateOranges:function(){return L_},interpolatePRGn:function(){return NW},interpolatePiYG:function(){return NG},interpolatePlasma:function(){return LK},interpolatePuBu:function(){return Lr},interpolatePuBuGn:function(){return Le},interpolatePuOr:function(){return NV},interpolatePuRd:function(){return Lo},interpolatePurples:function(){return LE},interpolateRainbow:function(){return Lz},interpolateRdBu:function(){return Nq},interpolateRdGy:function(){return NX},interpolateRdPu:function(){return Ll},interpolateRdYlBu:function(){return NZ},interpolateRdYlGn:function(){return NJ},interpolateReds:function(){return LM},interpolateSinebow:function(){return LH},interpolateSpectral:function(){return N1},interpolateTurbo:function(){return LV},interpolateViridis:function(){return Lq},interpolateWarm:function(){return LD},interpolateYlGn:function(){return Lf},interpolateYlGnBu:function(){return Lu},interpolateYlOrBr:function(){return Lh},interpolateYlOrRd:function(){return Ly},schemeAccent:function(){return CQ},schemeBlues:function(){return Lg},schemeBrBG:function(){return NF},schemeBuGn:function(){return N2},schemeBuPu:function(){return N3},schemeCategory10:function(){return CZ},schemeDark2:function(){return CJ},schemeGnBu:function(){return N6},schemeGreens:function(){return Lv},schemeGreys:function(){return Lx},schemeObservable10:function(){return C0},schemeOrRd:function(){return N9},schemeOranges:function(){return LS},schemePRGn:function(){return Nz},schemePaired:function(){return C1},schemePastel1:function(){return C2},schemePastel2:function(){return C5},schemePiYG:function(){return N$},schemePuBu:function(){return Ln},schemePuBuGn:function(){return Lt},schemePuOr:function(){return NH},schemePuRd:function(){return Li},schemePurples:function(){return Lw},schemeRdBu:function(){return NU},schemeRdGy:function(){return NY},schemeRdPu:function(){return La},schemeRdYlBu:function(){return NK},schemeRdYlGn:function(){return NQ},schemeReds:function(){return Lk},schemeSet1:function(){return C3},schemeSet2:function(){return C4},schemeSet3:function(){return C6},schemeSpectral:function(){return N0},schemeTableau10:function(){return C8},schemeYlGn:function(){return Lc},schemeYlGnBu:function(){return Ls},schemeYlOrBr:function(){return Lp},schemeYlOrRd:function(){return Ld}});var ey={};n.r(ey),n.d(ey,{AREA_CLASS_NAME:function(){return Sp},Academy:function(){return OY},Bin:function(){return jp},BinX:function(){return jh},COMPONENT_CLASS_NAME:function(){return Sc},Chart:function(){return Rg},ChartEvent:function(){return S2},Classic:function(){return OG},ClassicDark:function(){return OU},Dark:function(){return OV},DiffY:function(){return jw},DodgeX:function(){return jy},ELEMENT_CLASS_NAME:function(){return Sl},Filter:function(){return jX},FlexX:function(){return jV},Group:function(){return jR},GroupColor:function(){return jB},GroupX:function(){return jD},GroupY:function(){return jF},Jitter:function(){return jm},JitterX:function(){return jv},JitterY:function(){return jb},LABEL_CLASS_NAME:function(){return Sf},LABEL_LAYER_CLASS_NAME:function(){return Sa},Light:function(){return O$},LinearAxis:function(){return Ez},MAIN_LAYER_CLASS_NAME:function(){return So},MASK_CLASS_NAME:function(){return Sh},MaybeDefaultX:function(){return b6},MaybeDefaultY:function(){return b7},MaybeFunctionAttribute:function(){return xc},MaybeGradient:function(){return mP},MaybeIdentityX:function(){return bh},MaybeIdentityY:function(){return bp},MaybeKey:function(){return oJ},MaybeSeries:function(){return mj},MaybeSize:function(){return vO},MaybeStackY:function(){return Rd},MaybeTitle:function(){return oK},MaybeTooltip:function(){return oZ},MaybeTuple:function(){return v2},MaybeTupleX:function(){return bV},MaybeTupleY:function(){return bY},MaybeVisualPosition:function(){return v3},MaybeZeroPadding:function(){return v8},MaybeZeroX:function(){return sx},MaybeZeroY:function(){return vx},MaybeZeroY1:function(){return sb},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return jM},PLOT_CLASS_NAME:function(){return Su},Pack:function(){return jU},Runtime:function(){return Rp},Sample:function(){return jY},Select:function(){return jA},SelectX:function(){return jC},SelectY:function(){return jL},Selection:function(){return gu},SortColor:function(){return jH},SortX:function(){return j$},SortY:function(){return jG},StackEnter:function(){return jE},StackY:function(){return PX},SymmetryY:function(){return jO},VIEW_CLASS_NAME:function(){return Ss},corelib:function(){return AO},extend:function(){return Th},geolib:function(){return oo},graphlib:function(){return sr},plotlib:function(){return Tf},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return gs},stdlib:function(){return Tp}});var eg={}.toString,em=function(t,e){return eg.call(t)==="[object "+e+"]"},ev=function(t){return Array.isArray?Array.isArray(t):em(t,"Array")},eb=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},ex=function(t,e){if(t){if(ev(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(eb(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},eO=function(t){return em(t,"Function")},ew=Array.prototype;ew.splice,ew.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var eE=function(t){return em(t,"Number")},ek=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return ex(t,function(n,r){eO(t)&&"prototype"===r||e.push(n)}),e},eM=function(t){if("object"!=typeof t||null===t||!em(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},eS=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&eM(a)?(eM(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):ev(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},e_=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},eP=function(t,e){if(!e_(t))return -1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var ej=function(t){return t};function eA(t){return null==t?0:e_(t)?t.length:Object.keys(t).length}var eT=function(t,e){return(eT=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function eC(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}eT(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var eN=function(){return(eN=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function eL(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function eI(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})}function eR(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function eD(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function eF(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function eB(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}function ez(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function eW(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function e$(){this.map={}}!function(t,e){if(!eO(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return nR||(nR=document.createElement("canvas").getContext("2d")),nR.font=[o,a,i,n+"px",r].join(" "),nR.measureText(em(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eB([t],ek(e)).join("")}),e$.prototype.has=function(t){return void 0!==this.map[t]},e$.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},e$.prototype.set=function(t,e){this.map[t]=e},e$.prototype.clear=function(){this.map={}},e$.prototype.delete=function(t){delete this.map[t]},e$.prototype.size=function(){return Object.keys(this.map).length};class eG{constructor(t){this.options=eS({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=eS({},this.options,t),this.rescale(t)}rescale(t){}}function eH(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function eV(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function eU(t,e,n,r,i){let o=n||0,a=r||t.length,l=i||(t=>t);for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}var eq=n(254),eY=n.n(eq);function eX(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function eK(t){let e=eY().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=eX(a,o,e+1/3);return[255*l,255*eX(a,o,e),255*eX(a,o,e-1/3),i]}(r):null}let eZ=(t,e)=>n=>t*(1-n)+e*n,eQ=(t,e)=>{let n=eK(t),r=eK(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},eJ=(t,e)=>"number"==typeof t&&"number"==typeof e?eZ(t,e):"string"==typeof t&&"string"==typeof e?eQ(t,e):()=>t,e0=(t,e)=>{let n=eZ(t,e);return t=>Math.round(n(t))};function e1(t){return null!=t&&!Number.isNaN(t)}let e2=Math.sqrt(50),e5=Math.sqrt(10),e3=Math.sqrt(2);function e4(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=e2?10:o>=e5?5:o>=e3?2:1)*10**i:-(10**-i)/(o>=e2?10:o>=e5?5:o>=e3?2:1)}function e6(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),o=r/i;return o>=e2?i*=10:o>=e5?i*=5:o>=e3&&(i*=2),e<t?-i:i}let e8=(t,e,n=5)=>{let r,i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=e4(l,s,n))>0?r=e4(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=e4(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},e9=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=eH(o,a),i=n(l,s)):(r=eH(a,o),i=n(s,l)),eV(i,r)},e7=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=eH(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=eU(t,e,1,r)-1,a=i[n];return eV(o[n],a)(e)}},nt=(t,e,n,r)=>(Math.min(t.length,e.length)>2?e7:e9)(t,e,r?e0:n);class ne extends eG{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:eZ,tickCount:5}}map(t){return e1(t)?this.output(t):this.options.unknown}invert(t){return e1(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return e8}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):ej}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=nt(n.map(t),r,o,i);this.output=eV(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=nt(i,r.map(t),eZ);this.input=eV(e,n,o)}}let nn=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=e4(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class nr extends ne{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:eJ,tickMethod:nn,tickCount:5}}chooseTransforms(){return[ej,ej]}clone(){return new nr(this.options)}}var ni=function(t){return null==t},no=function(t){return ni(t)?"":t.toString()},na=function(t){var e=no(t);return e.charAt(0).toUpperCase()+e.substring(1)},nl=t=>t;function ns(t,e){t&&nc.hasOwnProperty(t.type)&&nc[t.type](t,e)}var nu={Feature:function(t,e){ns(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ns(n[r].geometry,e)}},nc={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){nf(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)nf(n[r],e,0)},Polygon:function(t,e){np(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)np(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ns(n[r],e)}};function nf(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function np(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)nf(t[n],e,1);e.polygonEnd()}function nh(t,e){t&&nu.hasOwnProperty(t.type)?nu[t.type](t,e):ns(t,e)}class nd{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(r=t[--e]),!(i=r-(o-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=o+(r=2*i),r==n-o&&(o=n))}return o}}var ny=Math.PI,ng=ny/2,nm=ny/4,nv=2*ny,nb=180/ny,nx=ny/180,nO=Math.abs,nw=Math.atan,nE=Math.atan2,nk=Math.cos,nM=Math.ceil,nS=Math.exp,n_=Math.log,nP=Math.pow,nj=Math.sin,nA=Math.sign||function(t){return t>0?1:t<0?-1:0},nT=Math.sqrt,nC=Math.tan;function nN(t){return t>1?0:t<-1?ny:Math.acos(t)}function nL(t){return t>1?ng:t<-1?-ng:Math.asin(t)}function nI(){}var nR,nD,nF,nB,nz,nW=new nd,n$=new nd,nG={point:nI,lineStart:nI,lineEnd:nI,polygonStart:function(){nG.lineStart=nH,nG.lineEnd=nq},polygonEnd:function(){nG.lineStart=nG.lineEnd=nG.point=nI,nW.add(nO(n$)),n$=new nd},result:function(){var t=nW/2;return nW=new nd,t}};function nH(){nG.point=nV}function nV(t,e){nG.point=nU,nD=nB=t,nF=nz=e}function nU(t,e){n$.add(nz*t-nB*e),nB=t,nz=e}function nq(){nU(nD,nF)}var nY,nX,nK,nZ,nQ=1/0,nJ=1/0,n0=-1/0,n1=n0,n2={point:function(t,e){t<nQ&&(nQ=t),t>n0&&(n0=t),e<nJ&&(nJ=e),e>n1&&(n1=e)},lineStart:nI,lineEnd:nI,polygonStart:nI,polygonEnd:nI,result:function(){var t=[[nQ,nJ],[n0,n1]];return n0=n1=-(nJ=nQ=1/0),t}},n5=0,n3=0,n4=0,n6=0,n8=0,n9=0,n7=0,rt=0,re=0,rn={point:rr,lineStart:ri,lineEnd:rl,polygonStart:function(){rn.lineStart=rs,rn.lineEnd=ru},polygonEnd:function(){rn.point=rr,rn.lineStart=ri,rn.lineEnd=rl},result:function(){var t=re?[n7/re,rt/re]:n9?[n6/n9,n8/n9]:n4?[n5/n4,n3/n4]:[NaN,NaN];return n5=n3=n4=n6=n8=n9=n7=rt=re=0,t}};function rr(t,e){n5+=t,n3+=e,++n4}function ri(){rn.point=ro}function ro(t,e){rn.point=ra,rr(nK=t,nZ=e)}function ra(t,e){var n=t-nK,r=e-nZ,i=nT(n*n+r*r);n6+=i*(nK+t)/2,n8+=i*(nZ+e)/2,n9+=i,rr(nK=t,nZ=e)}function rl(){rn.point=rr}function rs(){rn.point=rc}function ru(){rf(nY,nX)}function rc(t,e){rn.point=rf,rr(nY=nK=t,nX=nZ=e)}function rf(t,e){var n=t-nK,r=e-nZ,i=nT(n*n+r*r);n6+=i*(nK+t)/2,n8+=i*(nZ+e)/2,n9+=i,n7+=(i=nZ*t-nK*e)*(nK+t),rt+=i*(nZ+e),re+=3*i,rr(nK=t,nZ=e)}function rp(t){this._context=t}rp.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,nv)}},result:nI};var rh,rd,ry,rg,rm,rv=new nd,rb={point:nI,lineStart:function(){rb.point=rx},lineEnd:function(){rh&&rO(rd,ry),rb.point=nI},polygonStart:function(){rh=!0},polygonEnd:function(){rh=null},result:function(){var t=+rv;return rv=new nd,t}};function rx(t,e){rb.point=rO,rd=rg=t,ry=rm=e}function rO(t,e){rg-=t,rm-=e,rv.add(nT(rg*rg+rm*rm)),rg=t,rm=e}class rw{constructor(t){this._append=null==t?rE:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return rE;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==o||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,o=t,i=this._append,a=this._,this._=e}this._+=a}}result(){let t=this._;return this._="",t.length?t:null}}function rE(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function rk(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),nh(t,i(o))),o.result()}return a.area=function(t){return nh(t,i(nG)),nG.result()},a.measure=function(t){return nh(t,i(rb)),rb.result()},a.bounds=function(t){return nh(t,i(n2)),n2.result()},a.centroid=function(t){return nh(t,i(rn)),rn.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,nl):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new rw(n)):new rp(e=t),"function"!=typeof r&&o.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(o.pointRadius(+t),+t),a):r},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(o=new rw(n)),a},a.projection(t).digits(n).context(e)}function rM(t,e,n){t*=1,e*=1,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(i);++r<i;)o[r]=t+r*n;return o}function rS(t,e,n){var r=rM(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function r_(t,e,n){var r=rM(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var rP={}.toString,rj=function(t,e){return rP.call(t)==="[object "+e+"]"},rA=function(t){return Array.isArray?Array.isArray(t):rj(t,"Array")},rT=function(t){return"object"==typeof t&&null!==t},rC=function(t){if(!rT(t)||!rj(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},rN=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&rC(a)?(rC(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):rA(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},rL=function(t){var e=no(t);return e.charAt(0).toLowerCase()+e.substring(1)};function rI(t){return t}function rR(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),rI)}function rD(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function rF(t=""){throw Error(t)}function rB(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))r.has(e)||("transform"===e&&t.attr(e,""),t.attr(e,i))}function rz(t){return null!=t&&!Number.isNaN(t)}function rW(t,e){return r$(t,e)||{}}function r$(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[rL(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function rG(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function rH(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function rV(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function rU(t){return null===t||!1===t}function rq(t,e,n={},r=!1){return rU(t)||Array.isArray(t)&&r?t:rN(n,rW(t,e))}function rY(t,e={}){return rU(t)||Array.isArray(t)||!rX(t)?t:rN(e,t)}function rX(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function rK(t,e){return"object"==typeof t?rW(t,e):t}function rZ(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:nI,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function rQ(t,e){return 1e-6>nO(t[0]-e[0])&&1e-6>nO(t[1]-e[1])}function rJ(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function r0(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(rQ(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd();return}a[0]+=2e-6}l.push(n=new rJ(r,t,null,!0)),s.push(n.o=new rJ(r,null,n,!1)),l.push(n=new rJ(a,t,null,!1)),s.push(n.o=new rJ(a,null,n,!0))}}),l.length){for(s.sort(e),r1(l),r1(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(o=(u=p.p.z).length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function r1(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function r2(t){return[nE(t[1],t[0]),nL(t[2])]}function r5(t){var e=t[0],n=t[1],r=nk(n);return[r*nk(e),r*nj(e),nj(n)]}function r3(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function r4(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function r6(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function r8(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function r9(t){var e=nT(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function r7(t){return nO(t[0])<=ny?t[0]:nA(t[0])*((nO(t[0])+ny)%nv-ny)}function it(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function ie(t,e,n,r){return function(i){var o,a,l,s=e(i),u=rZ(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=b,p.lineEnd=x,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=it(a);var t=function(t,e){var n=r7(e),r=e[1],i=nj(r),o=[nj(n),-nk(n),0],a=0,l=0,s=new nd;1===i?r=ng+1e-6:-1===i&&(r=-ng-1e-6);for(var u=0,c=t.length;u<c;++u)if(p=(f=t[u]).length)for(var f,p,h=f[p-1],d=r7(h),y=h[1]/2+nm,g=nj(y),v=nk(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=r7(x),w=x[1]/2+nm,E=nj(w),k=nk(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>ny,j=g*E;if(s.add(nE(j*S*nj(_),v*k+j*nk(_))),a+=P?M+S*nv:M,P^d>=n^O>=n){var A=r4(r5(h),r5(x));r9(A);var T=r4(o,A);r9(T);var C=(P^M>=0?-1:1)*nL(T[2]);(r>C||r===C&&(A[0]||A[1]))&&(l+=P^M>=0?1:-1)}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(f||(i.polygonStart(),f=!0),r0(a,ii,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function y(){p.point=d,s.lineStart()}function g(){p.point=h,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function b(){c.lineStart(),l=[]}function x(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),p=u.result(),h=p.length;if(l.pop(),o.push(l),l=null,h){if(1&s){if((e=(n=p[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}h>1&&2&s&&p.push(p.pop().concat(p.shift())),a.push(p.filter(ir))}}return p}}function ir(t){return t.length>1}function ii(t,e){return((t=t.x)[0]<0?t[1]-ng-1e-6:ng-t[1])-((e=e.x)[0]<0?e[1]-ng-1e-6:ng-e[1])}var io=ie(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l,s,u,c,f,p,h,d=o>0?ny:-ny,y=nO(o-n);1e-6>nO(y-ny)?(t.point(n,r=(r+a)/2>0?ng:-ng),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=ny&&(1e-6>nO(n-i)&&(n-=1e-6*i),1e-6>nO(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=nO(h=nj(l-u))>1e-6?nw((nj(s)*(p=nk(c))*nj(u)-nj(c)*(f=nk(s))*nj(l))/(f*p*h)):(s+c)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),e=0),t.point(n=o,r=a),i=d},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*ng,r.point(-ny,i),r.point(0,i),r.point(ny,i),r.point(ny,0),r.point(ny,-i),r.point(0,-i),r.point(-ny,-i),r.point(-ny,0),r.point(-ny,i);else if(nO(t[0]-e[0])>1e-6){var o=t[0]<e[0]?ny:-ny;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-ny,-ng]);function ia(t,e){e=r5(e),e[0]-=t,r9(e);var n=nN(-e[1]);return((0>-e[2]?-n:n)+nv-1e-6)%nv}function il(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||0>s(i,o)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return 1e-6>nO(r[0]-t)?i>0?0:3:1e-6>nO(r[0]-n)?i>0?2:1:1e-6>nO(r[1]-e)?+(i>0):i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,p,h,d,y,g,v,b,x=a,O=rZ(),w={point:E,lineStart:function(){w.point=k,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(k(f,p),h&&g&&O.rejoin(),s.push(O.result())),w.point=E,g&&x.lineEnd()},polygonStart:function(){x=O,s=[],u=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],p=f[0],h=f[1];s<c;++s)o=p,a=h,p=(f=l[s])[0],h=f[1],a<=r?h>r&&(p-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(p-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=b&&e,i=(s=it(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&r0(s,l,e,o,a),a.polygonEnd()),x=a,s=u=c=null}};function E(t,e){i(t,e)&&x.point(t,e)}function k(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(x.lineStart(),x.point(o,a));else if(l&&g)x.point(o,a);else{var s=[d=Math.max(-1e9,Math.min(1e9,d)),y=Math.max(-1e9,Math.min(1e9,y))],O=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=e[0],c=e[1],f=0,p=1,h=u-l,d=c-s;if(a=n-l,!h&&a>0)return;if(a/=h,h<0){if(a<f)return;a<p&&(p=a)}else if(h>0){if(a>p)return;a>f&&(f=a)}if(a=i-l,h||!(a<0)){if(a/=h,h<0){if(a>p)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<p&&(p=a)}if(a=r-s,d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<p&&(p=a)}else if(d>0){if(a>p)return;a>f&&(f=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<p&&(p=a)}return f>0&&(t[0]=l+f*h,t[1]=s+f*d),p<1&&(e[0]=l+p*h,e[1]=s+p*d),!0}}}}(s,O,t,e,n,r)?l&&(x.lineStart(),x.point(o,a),b=!1):(g||(x.lineStart(),x.point(s[0],s[1])),x.point(O[0],O[1]),l||x.lineEnd(),b=!1)}d=o,y=a,g=l}return w}}function is(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function iu(t,e){return nO(t)>ny&&(t-=Math.round(t/nv)*nv),[t,e]}function ic(t,e,n){return(t%=nv)?e||n?is(ih(t),id(e,n)):ih(t):e||n?id(e,n):iu}function ip(t){return function(e,n){return nO(e+=t)>ny&&(e-=Math.round(e/nv)*nv),[e,n]}}function ih(t){var e=ip(t);return e.invert=ip(-t),e}function id(t,e){var n=nk(t),r=nj(t),i=nk(e),o=nj(e);function a(t,e){var a=nk(e),l=nk(t)*a,s=nj(t)*a,u=nj(e),c=u*n+l*r;return[nE(s*i-c*o,l*n-u*r),nL(c*i+s*o)]}return a.invert=function(t,e){var a=nk(e),l=nk(t)*a,s=nj(t)*a,u=nj(e),c=u*i-s*o;return[nE(s*i+u*o,l*n+c*r),nL(c*n-l*r)]},a}function iy(t){return function(e){var n=new ig;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ig(){}function im(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nh(n,t.stream(n2)),e(n2.result()),null!=r&&t.clipExtent(r),t}function iv(t,e,n){return im(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function ib(t,e,n){return iv(t,[[0,0],e],n)}function ix(t,e,n){return im(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function iO(t,e,n){return im(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}iu.invert=iu,ig.prototype={constructor:ig,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var iw=nk(30*nx);function iE(t,e){var n;return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,p,h,d,y,g){var v=u-r,b=c-i,x=v*v+b*b;if(x>4*e&&y--){var O=a+p,w=l+h,E=s+d,k=nT(O*O+w*w+E*E),M=nL(E/=k),S=1e-6>nO(nO(E)-1)||1e-6>nO(o-f)?(o+f)/2:nE(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||nO((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<iw)&&(n(r,i,o,a,l,s,P,j,S,O/=k,w/=k,E,y,g),g.point(P,j),n(P,j,S,O,w,E,u,c,f,p,h,d,y,g))}}return function(e){var r,i,o,a,l,s,u,c,f,p,h,d,y={point:g,lineStart:v,lineEnd:x,polygonStart:function(){e.polygonStart(),y.lineStart=O},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=b,e.lineStart()}function b(r,i){var o=r5([r,i]),a=t(r,i);n(c,f,u,p,h,d,c=a[0],f=a[1],u=r,p=o[0],h=o[1],d=o[2],16,e),e.point(c,f)}function x(){y.point=g,e.lineEnd()}function O(){v(),y.point=w,y.lineEnd=E}function w(t,e){b(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=b}function E(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=x,x()}return y}}(t,e):(n=t,iy({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var ik=iy({point:function(t,e){this.stream.point(t*nx,e*nx)}});function iM(t,e,n,r,i,o){if(!o){function a(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return a.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},a}var l=nk(o),s=nj(o),u=l*t,c=s*t,f=l/t,p=s/t,h=(s*n-l*e)/t,d=(s*e+l*n)/t;function y(t,o){return[u*(t*=r)-c*(o*=i)+e,n-c*t-u*o]}return y.invert=function(t,e){return[r*(f*t-p*e+h),i*(d-p*t-f*e)]},y}function iS(t){return i_(function(){return t})()}function i_(t){var e,n,r,i,o,a,l,s,u,c,f=150,p=480,h=250,d=0,y=0,g=0,v=0,b=0,x=0,O=1,w=1,E=null,k=io,M=null,S=nl,_=.5;function P(t){return s(t[0]*nx,t[1]*nx)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*nb,t[1]*nb]}function A(){var t=iM(f,0,0,O,w,x).apply(null,e(d,y)),r=iM(f,p-t[0],h-t[1],O,w,x);return n=ic(g,v,b),l=is(e,r),s=is(n,l),a=iE(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=ik((e=n,iy({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(k(a(S(c=t)))))},P.preclip=function(t){return arguments.length?(k=t,E=void 0,T()):k},P.postclip=function(t){return arguments.length?(S=t,M=r=i=o=null,T()):S},P.clipAngle=function(t){return arguments.length?(k=+t?function(t){var e=nk(t),n=2*nx,r=e>0,i=nO(e)>1e-6;function o(t,n){return nk(t)*nk(n)>e}function a(t,n,r){var i=r5(t),o=r5(n),a=[1,0,0],l=r4(i,o),s=r3(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=r4(a,l),p=r8(a,e*s/c);r6(p,r8(l,-e*u/c));var h=r3(p,f),d=r3(f,f),y=h*h-d*(r3(p,p)-1);if(!(y<0)){var g=nT(y),v=r8(f,(-h-g)/d);if(r6(v,p),v=r2(v),!r)return v;var b,x=t[0],O=n[0],w=t[1],E=n[1];O<x&&(b=x,x=O,O=b);var k=O-x,M=1e-6>nO(k-ny);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>nO(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>ny^(x<=v[0]&&v[0]<=O)){var S=r8(f,(-h+g)/d);return r6(S,p),[v,r2(S)]}}}function l(e,n){var i=r?t:ny-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return ie(o,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,p){var h,d,y=[f,p],g=o(f,p),v=r?g?0:l(f,p):g?l(f+(f<0?ny:-ny),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||rQ(e,d)||rQ(y,d))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d):i&&e&&r^g&&!(v&n)&&(h=a(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(h[0][0],h[0][1]),t.point(h[1][0],h[1][1]),t.lineEnd()):(t.point(h[1][0],h[1][1]),t.lineEnd(),t.lineStart(),t.point(h[0][0],h[0][1],3))),!g||e&&rQ(e,y)||t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=nk(e),l=nj(e),s=r*n;null==i?(i=e+r*nv,o=e-s/2):(i=ia(a,i),o=ia(a,o),(r>0?i<o:i>o)&&(i+=r*nv));for(var u,c=i;r>0?c>o:c<o;c-=s)u=r2([a,-l*nk(c),-l*nj(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-ny,t-ny])}(E=t*nx):(E=null,io),T()):E*nb},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,nl):il(M=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),T()):null==M?null:[[M,r],[i,o]]},P.scale=function(t){return arguments.length?(f=+t,A()):f},P.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],A()):[p,h]},P.center=function(t){return arguments.length?(d=t[0]%360*nx,y=t[1]%360*nx,A()):[d*nb,y*nb]},P.rotate=function(t){return arguments.length?(g=t[0]%360*nx,v=t[1]%360*nx,b=t.length>2?t[2]%360*nx:0,A()):[g*nb,v*nb,b*nb]},P.angle=function(t){return arguments.length?(x=t%360*nx,A()):x*nb},P.reflectX=function(t){return arguments.length?(O=t?-1:1,A()):O<0},P.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},P.precision=function(t){return arguments.length?(a=iE(l,_=t*t),T()):nT(_)},P.fitExtent=function(t,e){return iv(P,t,e)},P.fitSize=function(t,e){return ib(P,t,e)},P.fitWidth=function(t,e){return ix(P,t,e)},P.fitHeight=function(t,e){return iO(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}function iP(t){var e=0,n=ny/3,r=i_(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*nx,n=t[1]*nx):[e*nb,n*nb]},i}function ij(t,e){return[t,e]}function iA(){return iS(ij).scale(152.63)}function iT(t,e){var n=nk(t),r=t===e?nj(t):(n-nk(e))/(e-t),i=n/r+t;if(1e-6>nO(r))return ij;function o(t,e){var n=i-e,o=r*t;return[n*nj(o),i-n*nk(o)]}return o.invert=function(t,e){var n=i-e,o=nE(t,nO(n))*nA(n);return n*r<0&&(o-=ny*nA(t)*nA(n)),[o/r,i-nA(r)*nT(t*t+n*n)]},o}function iC(){return iP(iT).scale(131.154).center([0,13.9389])}function iN(t){return function(e,n){var r=nk(e),i=nk(n),o=t(r*i);return o===1/0?[2,0]:[o*i*nj(e),o*nj(n)]}}function iL(t){return function(e,n){var r=nT(e*e+n*n),i=t(r),o=nj(i);return[nE(e*o,r*nk(i)),nL(r&&n*o/r)]}}ij.invert=ij;var iI=iN(function(t){return nT(2/(1+t))});function iR(){return iS(iI).scale(124.75).clipAngle(179.999)}function iD(t,e){return[t,n_(nC((ng+e)/2))]}function iF(){return iB(iD).scale(961/nv)}function iB(t){var e,n,r,i=iS(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=ny*a(),l=i((function(t){function e(e){return e=t(e[0]*nx,e[1]*nx),e[0]*=nb,e[1]*=nb,e}return t=ic(t[0]*nx,t[1]*nx,t.length>2?t[2]*nx:0),e.invert=function(e){return e=t.invert(e[0]*nx,e[1]*nx),e[0]*=nb,e[1]*=nb,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===iD?[[Math.max(l[0]-o,u),e],[Math.min(l[0]+o,n),r]]:[[u,Math.max(l[1]-o,e)],[n,Math.min(l[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function iz(t,e){return[n_(nC((ng+e)/2)),-t]}function iW(){var t=iB(iz),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function i$(t){return nC((ng+t)/2)}function iG(t,e){var n=nk(t),r=t===e?nj(t):n_(n/nk(e))/n_(i$(e)/i$(t)),i=n*nP(i$(t),r)/r;if(!r)return iD;function o(t,e){i>0?e<-ng+1e-6&&(e=-ng+1e-6):e>ng-1e-6&&(e=ng-1e-6);var n=i/nP(i$(e),r);return[n*nj(r*t),i-n*nk(r*t)]}return o.invert=function(t,e){var n=i-e,o=nA(r)*nT(t*t+n*n),a=nE(t,nO(n))*nA(n);return n*r<0&&(a-=ny*nA(t)*nA(n)),[a/r,2*nw(nP(i/o,1/r))-ng]},o}function iH(){return iP(iG).scale(109.5).parallels([30,30])}function iV(t,e){return[nk(e)*nj(t),nj(e)]}function iU(){return iS(iV).scale(249.5).clipAngle(90.000001)}function iq(t,e){var n=nk(e),r=nk(t)*n;return[n*nj(t)/r,nj(e)/r]}function iY(){return iS(iq).scale(144.049).clipAngle(60)}function iX(t,e){var n=nj(t),r=(n+nj(e))/2;if(1e-6>nO(r)){var i=nk(t);function o(t,e){return[t*i,nj(e)/i]}return o.invert=function(t,e){return[t/i,nL(e*i)]},o}var a=1+n*(2*r-n),l=nT(a)/r;function s(t,e){var n=nT(a-2*r*nj(e))/r;return[n*nj(t*=r),l-n*nk(t)]}return s.invert=function(t,e){var n=l-e,i=nE(t,nO(n))*nA(n);return n*r<0&&(i-=ny*nA(t)*nA(n)),[i/r,nL((a-(t*t+n*n)*r*r)/(2*r))]},s}function iK(){return iP(iX).scale(155.424).center([0,33.6442])}function iZ(){return iK().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}iI.invert=iL(function(t){return 2*nL(t/2)}),iD.invert=function(t,e){return[t,2*nw(nS(e))-ng]},iz.invert=function(t,e){return[-e,2*nw(nS(t))-ng]},iV.invert=iL(nL),iq.invert=iL(nw);var iQ=nT(3)/2;function iJ(t,e){var n=nL(iQ*nj(e)),r=n*n,i=r*r*r;return[t*nk(n)/(iQ*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function i0(){return iS(iJ).scale(177.158)}iJ.invert=function(t,e){for(var n,r,i=e,o=i*i,a=o*o*o,l=0;l<12&&(r=i*(1.340264+-.081106*o+a*(893e-6+.003796*o))-e,i-=n=r/(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o)),a=(o=i*i)*o*o,!(1e-12>nO(n)));++l);return[iQ*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/nk(i),nL(nj(i)/iQ)]};var i1=iN(function(t){return(t=nN(t))&&t/nj(t)});function i2(){return iS(i1).scale(79.4188).clipAngle(179.999)}function i5(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function i3(){return iS(i5).scale(175.295)}function i4(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,p=0,h=null,d=1,y=1,g=iy({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=nl;function b(){return d=l*c,y=l*f,o=a=null,x}function x(n){var r=n[0]*d,i=n[1]*y;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return x.invert=function(n){var r=n[0]-s,i=n[1]-u;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/y]},x.stream=function(t){return o&&a===t?o:o=g(v(a=t))},x.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,nl):il(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==h?null:[[h,n],[r,i]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],b()):[s,u]},x.angle=function(n){return arguments.length?(e=nj(p=n%360*nx),t=nk(p),b()):p*nb},x.reflectX=function(t){return arguments.length?(c=t?-1:1,b()):c<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return iv(x,t,e)},x.fitSize=function(t,e){return ib(x,t,e)},x.fitWidth=function(t,e){return ix(x,t,e)},x.fitHeight=function(t,e){return iO(x,t,e)},x}function i6(t,e){var n=nk(e),r=1+nk(t)*n;return[n*nj(t)/r,nj(e)/r]}function i8(){return iS(i6).scale(250).clipAngle(142)}function i9(){var t,e,n,r,i,o,a=iZ(),l=iK().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=iK().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[a.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),s.precision(t),f()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(u),r=l.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+1e-6,c+.12*e+1e-6],[o-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+1e-6,c+.166*e+1e-6],[o-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return iv(c,t,e)},c.fitSize=function(t,e){return ib(c,t,e)},c.fitWidth=function(t,e){return ix(c,t,e)},c.fitHeight=function(t,e){return iO(c,t,e)},c.scale(1070)}i1.invert=iL(function(t){return t}),i5.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.045255+a*(-.311325+.259866*o-.005916*11*a)))}while(nO(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},i6.invert=iL(function(t){return 2*nw(t)});var i7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ot(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,o,a,l,s,u,c,f,p=10,h=10,d=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:b()}}function b(){return rM(nM(r/d)*d,n,d).map(c).concat(rM(nM(l/y)*y,a,y).map(f)).concat(rM(nM(e/p)*p,t,p).filter(function(t){return nO(t%d)>1e-6}).map(s)).concat(rM(nM(o/h)*h,i,h).filter(function(t){return nO(t%y)>1e-6}).map(u))}return v.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(d=+t[0],y=+t[1],v):[d,y]},v.stepMinor=function(t){return arguments.length?(p=+t[0],h=+t[1],v):[p,h]},v.precision=function(p){return arguments.length?(g=+p,s=rS(o,i,90),u=r_(e,t,g),c=rS(l,a,90),f=r_(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function oe(t){return"geoPath"===t.type}let on=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=i7(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=ec[`geo${na(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(ot);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{let s=a();var u,c=s,f=l,p={x:t,y:n,width:r,height:i},h=o;let{outline:d=(()=>{let t=f.filter(oe);return t.find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null})(t).features)}})()}=h,{size:y="fitExtent"}=h;for(let[t,e]of("fitExtent"===y?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(c,d,p):"fitWidth"===y&&function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=rk(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-a),c=Math.min(Math.ceil(l-o),u),f=t.scale()*(c-1)/c,[p,h]=t.translate();t.scale(f).translate([p,h+(i-u)/2]).precision(.2)}(c,d,p),Object.entries(o)))null==(u=s[t])||u.call(s,e);e=rk(s);let g=new nr({domain:[t,t+r]}),v=new nr({domain:[n,n+i]}),b=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[g.map(n),v.map(r)]},x=t=>{if(!t)return null;let[e,n]=t,r=[g.invert(e),v.invert(n)];return s.invert(r)};return{transform:t=>b(t),untransform:t=>x(t)}}]]}},children:l.flatMap(t=>oe(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:rY(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};on.props={};var or=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let oi=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:l,state:s}=t;return[Object.assign(Object.assign({type:"geoView"},or(t,["type","data","scale","encode","style","animate","key","state"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:s}]})]};function oo(){return{"composition.geoView":on,"composition.geoPath":oi}}function oa(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,l,s,u,c,f,p,h=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,b=t._y1;if(!h)return t._root=d,t;for(;h.length;)if((u=e>=(o=(y+v)/2))?y=o:v=o,(c=n>=(a=(g+b)/2))?g=a:b=a,i=h,!(h=h[f=c<<1|u]))return i[f]=d,t;if(l=+t._x.call(null,h.data),s=+t._y.call(null,h.data),e===l&&n===s)return d.next=h,i?i[f]=d:t._root=d,t;do i=i?i[f]=[,,,,]:t._root=[,,,,],(u=e>=(o=(y+v)/2))?y=o:v=o,(c=n>=(a=(g+b)/2))?g=a:b=a;while((f=c<<1|u)==(p=(s>=a)<<1|l>=o));return i[p]=h,i[f]=d,t}function ol(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function os(t){return t[0]}function ou(t){return t[1]}function oc(t,e,n){var r=new of(null==e?os:e,null==n?ou:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function of(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function op(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}oi.props={};var oh=oc.prototype=of.prototype;function od(t){return function(){return t}}function oy(t){return(t()-.5)*1e-6}oh.copy=function(){var t,e,n=new of(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=op(r),n;for(t=[{source:r,target:n._root=[,,,,]}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=[,,,,]}):r.target[i]=op(e));return n},oh.add=function(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return oa(this.cover(e,n),e,n,t)},oh.addAll=function(t){var e,n,r,i,o=t.length,a=Array(o),l=Array(o),s=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<o;++n)!(isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e)))&&(a[n]=r,l[n]=i,r<s&&(s=r),r>c&&(c=r),i<u&&(u=i),i>f&&(f=i));if(s>c||u>f)return this;for(this.cover(s,u).cover(c,f),n=0;n<o;++n)oa(this,a[n],l[n],t[n]);return this},oh.cover=function(t,e){if(isNaN(t*=1)||isNaN(e*=1))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,l,s=i-n||1,u=this._root;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,(a=[,,,,])[l]=u,u=a,s*=2,l){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},oh.data=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},oh.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},oh.find=function(t,e,n){var r,i,o,a,l,s,u,c=this._x0,f=this._y0,p=this._x1,h=this._y1,d=[],y=this._root;for(y&&d.push(new ol(y,c,f,p,h)),null==n?n=1/0:(c=t-n,f=e-n,p=t+n,h=e+n,n*=n);s=d.pop();)if((y=s.node)&&!((i=s.x0)>p)&&!((o=s.y0)>h)&&!((a=s.x1)<c)&&!((l=s.y1)<f))if(y.length){var g=(i+a)/2,v=(o+l)/2;d.push(new ol(y[3],g,v,a,l),new ol(y[2],i,v,g,l),new ol(y[1],g,o,a,v),new ol(y[0],i,o,g,v)),(u=(e>=v)<<1|t>=g)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=s)}else{var b=t-+this._x.call(null,y.data),x=e-+this._y.call(null,y.data),O=b*b+x*x;if(O<n){var w=Math.sqrt(n=O);c=t-w,f=e-w,p=t+w,h=e+w,r=y.data}}return r},oh.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,l,s,u,c,f,p,h=this._root,d=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!h)return this;if(h.length)for(;;){if((u=o>=(l=(d+g)/2))?d=l:g=l,(c=a>=(s=(y+v)/2))?y=s:v=s,e=h,!(h=h[f=c<<1|u]))return this;if(!h.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,p=f)}for(;h.data!==t;)if(r=h,!(h=h.next))return this;return((i=h.next)&&delete h.next,r)?i?r.next=i:delete r.next:e?(i?e[f]=i:delete e[f],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[p]=h:this._root=h)):this._root=i,this},oh.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},oh.root=function(){return this._root},oh.size=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},oh.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new ol(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&s.length){var u=(r+o)/2,c=(i+a)/2;(n=s[3])&&l.push(new ol(n,u,c,o,a)),(n=s[2])&&l.push(new ol(n,r,c,u,a)),(n=s[1])&&l.push(new ol(n,u,i,o,c)),(n=s[0])&&l.push(new ol(n,r,i,u,c))}return this},oh.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ol(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(a+s)/2,f=(l+u)/2;(o=i[0])&&n.push(new ol(o,a,l,c,f)),(o=i[1])&&n.push(new ol(o,c,l,s,f)),(o=i[2])&&n.push(new ol(o,a,f,c,u)),(o=i[3])&&n.push(new ol(o,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},oh.x=function(t){return arguments.length?(this._x=t,this):this._x},oh.y=function(t){return arguments.length?(this._y=t,this):this._y};var og={value:()=>{}};function om(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new ov(r)}function ov(t){this._=t}function ob(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=og,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ov.prototype=om.prototype={constructor:ov,on:function(t,e){var n,r=this._,i=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(t=i[o]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=ob(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ob(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ov(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var ox,oO,ow=0,oE=0,ok=0,oM=0,oS=0,o_=0,oP="object"==typeof performance&&performance.now?performance:Date,oj="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function oA(){return oS||(oj(oT),oS=oP.now()+o_)}function oT(){oS=0}function oC(){this._call=this._time=this._next=null}function oN(t,e,n){var r=new oC;return r.restart(t,e,n),r}function oL(){oS=(oM=oP.now())+o_,ow=oE=0;try{oA(),++ow;for(var t,e=ox;e;)(t=oS-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ow}finally{ow=0,function(){for(var t,e,n=ox,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ox=e);oO=t,oR(r)}(),oS=0}}function oI(){var t=oP.now(),e=t-oM;e>1e3&&(o_-=e,oM=t)}function oR(t){!ow&&(oE&&(oE=clearTimeout(oE)),t-oS>24?(t<1/0&&(oE=setTimeout(oL,t-oP.now()-o_)),ok&&(ok=clearInterval(ok))):(ok||(oM=oP.now(),ok=setInterval(oI,1e3)),ow=1,oj(oL)))}function oD(t){return t.x}function oF(t){return t.y}oC.prototype=oN.prototype={constructor:oC,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?oA():+n)+(null==e?0:+e),this._next||oO===this||(oO?oO._next=this:ox=this,oO=this),this._call=t,this._time=n,oR()},stop:function(){this._call&&(this._call=null,this._time=1/0,oR())}};var oB=Math.PI*(3-Math.sqrt(5));function oz(t){return t.index}function oW(t,e){var n=t.get(e);if(!n)throw Error("node not found: "+e);return n}function o$(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function oG(t,e){if(null!==t)return{type:"column",value:t,field:e}}function oH(t,e){return Object.assign(Object.assign({},oG(t,e)),{inferred:!0})}function oV(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function oU(t,e){let n=[];for(let r of t)n[r]=e;return n}function oq(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function oY(t,...e){for(let n of e)if("string"!=typeof n)return[n,null];else{let[e,r]=oq(t,n);if(null!==e)return[e,r]}return[null,null]}function oX(t){return!(t instanceof Date)&&"object"==typeof t}let oK=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(rU(i))return[t,n];let{title:o}=i;if(void 0!==o)return[t,n];let a=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>oq(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===a.length)return[t,n];let l=[];for(let e of t)l[e]={value:a.map(t=>t[e]instanceof Date?function(t){let e=t.getFullYear(),n=o$(t.getMonth()+1),r=o$(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${o$(o)}:${o$(a)}:${o$(l)}`:i}(t[e]):t[e]).join(", ")};return[t,rN({},n,{tooltip:{title:l}})]}};oK.props={};let oZ=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(rU(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,rN({},n,{tooltip:{items:(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{let{field:e,value:n,inferred:i=!1,aggregate:o}=r[t];return i?null:o&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t))}})]}};oZ.props={};var oQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let oJ=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=oQ(n,["key"]);if(void 0!==r)return[t,e];let o=Object.values(i).map(({value:t})=>t),a=t.map(t=>o.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,rN({},e,{encode:{key:oG(a)}})]};function o0(t={}){let{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function o1(t={}){return[...o0(t),{name:"title",scale:"identity"}]}function o2(){return[{type:oK,channel:"color"},{type:oZ,channel:["x","y"]}]}function o5(){return[{type:oK,channel:"x"},{type:oZ,channel:["y"]}]}function o3(t={}){return o0(t)}function o4(){return[{type:oJ}]}oJ.props={};function o6(t,e){return t.getBandWidth(t.invert(e))}function o8(t,e,n={}){let{x:r,y:i,series:o}=e,{x:a,y:l,series:s}=t,{style:{bandOffset:u=.5*!s,bandOffsetX:c=u,bandOffsetY:f=u}={}}=n,p=!!(null==a?void 0:a.getBandWidth),h=!!(null==l?void 0:l.getBandWidth),d=!!(null==s?void 0:s.getBandWidth);return p||h?(t,e)=>{let n=p?o6(a,r[e]):0,u=h?o6(l,i[e]):0,y=d&&o?(o6(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function o9(t){return parseFloat(t)/100}function o7(t,e,n,r){let{x:i,y:o}=n,{innerWidth:a,innerHeight:l}=r.getOptions(),s=Array.from(t,t=>{let e=i[t],n=o[t];return[["string"==typeof e?o9(e)*a:+e,"string"==typeof n?o9(n)*l:+n]]});return[t,s]}function at(t){return"function"==typeof t?t:e=>e[t]}function ae(t,e){return Array.from(t,at(e))}function an(t,e){let{source:n=t=>t.source,target:r=t=>t.target,value:i=t=>t.value}=e,{links:o,nodes:a}=t,l=ae(o,n),s=ae(o,r),u=ae(o,i);return{links:o.map((t,e)=>({target:s[e],source:l[e],value:u[e]})),nodes:a||Array.from(new Set([...l,...s]),t=>({key:t}))}}var ar=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ai={joint:!0},ao={type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},aa={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},al={text:""},as=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,{nodeKey:c=t=>t.id,linkKey:f=t=>t.id}=n,p=Object.assign({nodeKey:c,linkKey:f},ar(n,["nodeKey","linkKey"])),h=rW(p,"node"),d=rW(p,"link"),{links:y,nodes:g}=an(e,p),{nodesData:v,linksData:b}=function(t,e,n){let{nodes:r,links:i}=t,{joint:o,nodeStrength:a,linkStrength:l}=e,{nodeKey:s=t=>t.id,linkKey:u=t=>t.id}=n,c=function(){var t,e,n,r,i,o=od(-30),a=1,l=1/0,s=.81;function u(n){var i,o=t.length,a=oc(t,oD,oF).visitAfter(f);for(r=n,i=0;i<o;++i)e=t[i],a.visit(p)}function c(){if(t){var e,n,r=t.length;for(e=0,i=Array(r);e<r;++e)i[(n=t[e]).index]=+o(n,e,t)}}function f(t){var e,n,r,o,a,l=0,s=0;if(t.length){for(r=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(l+=e.value,s+=n,r+=n*e.x,o+=n*e.y);t.x=r/s,t.y=o/s}else{(e=t).x=e.data.x,e.y=e.data.y;do l+=i[e.data.index];while(e=e.next)}t.value=l}function p(t,o,u,c){if(!t.value)return!0;var f=t.x-e.x,p=t.y-e.y,h=c-o,d=f*f+p*p;if(h*h/s<d)return d<l&&(0===f&&(d+=(f=oy(n))*f),0===p&&(d+=(p=oy(n))*p),d<a&&(d=Math.sqrt(a*d)),e.vx+=f*t.value*r/d,e.vy+=p*t.value*r/d),!0;if(!t.length&&!(d>=l)){(t.data!==e||t.next)&&(0===f&&(d+=(f=oy(n))*f),0===p&&(d+=(p=oy(n))*p),d<a&&(d=Math.sqrt(a*d)));do t.data!==e&&(h=i[t.data.index]*r/d,e.vx+=f*h,e.vy+=p*h);while(t=t.next)}}return u.initialize=function(e,r){t=e,n=r,c()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:od(+t),c(),u):o},u.distanceMin=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.distanceMax=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u}(),f=(function(t){var e,n,r,i,o,a,l=oz,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=od(30),c=1;function f(r){for(var i=0,l=t.length;i<c;++i)for(var s,u,f,p,h,d,y,g=0;g<l;++g)u=(s=t[g]).source,d=((d=Math.sqrt((p=(f=s.target).x+f.vx-u.x-u.vx||oy(a))*p+(h=f.y+f.vy-u.y-u.vy||oy(a))*h))-n[g])/d*r*e[g],p*=d,h*=d,f.vx-=p*(y=o[g]),f.vy-=h*y,u.vx+=p*(y=1-y),u.vy+=h*y}function p(){if(r){var a,s,u=r.length,c=t.length,f=new Map(r.map((t,e)=>[l(t,e,r),t]));for(a=0,i=Array(u);a<c;++a)(s=t[a]).index=a,"object"!=typeof s.source&&(s.source=oW(f,s.source)),"object"!=typeof s.target&&(s.target=oW(f,s.target)),i[s.source.index]=(i[s.source.index]||0)+1,i[s.target.index]=(i[s.target.index]||0)+1;for(a=0,o=Array(c);a<c;++a)s=t[a],o[a]=i[s.source.index]/(i[s.source.index]+i[s.target.index]);e=Array(c),h(),n=Array(c),d()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),f.initialize=function(t,e){r=t,a=e,p()},f.links=function(e){return arguments.length?(t=e,p(),f):t},f.id=function(t){return arguments.length?(l=t,f):l},f.iterations=function(t){return arguments.length?(c=+t,f):c},f.strength=function(t){return arguments.length?(s="function"==typeof t?t:od(+t),h(),f):s},f.distance=function(t){return arguments.length?(u="function"==typeof t?t:od(+t),d(),f):u},f})(i).id(at(u));"function"==typeof a&&c.strength(a),"function"==typeof l&&f.strength(l);let p=(function(t){let e;var n,r=1,i=.001,o=1-Math.pow(.001,1/300),a=0,l=.6,s=new Map,u=oN(p),c=om("tick","end"),f=(e=1,()=>(e=(1664525*e+0x3c6ef35f)%0x100000000)/0x100000000);function p(){h(),c.call("tick",n),r<i&&(u.stop(),c.call("end",n))}function h(e){var i,u,c=t.length;void 0===e&&(e=1);for(var f=0;f<e;++f)for(r+=(a-r)*o,s.forEach(function(t){t(r)}),i=0;i<c;++i)null==(u=t[i]).fx?u.x+=u.vx*=l:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=l:(u.y=u.fy,u.vy=0);return n}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),o=n*oB;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function y(e){return e.initialize&&e.initialize(t,f),e}return null==t&&(t=[]),d(),n={tick:h,restart:function(){return u.restart(p),n},stop:function(){return u.stop(),n},nodes:function(e){return arguments.length?(t=e,d(),s.forEach(y),n):t},alpha:function(t){return arguments.length?(r=+t,n):r},alphaMin:function(t){return arguments.length?(i=+t,n):i},alphaDecay:function(t){return arguments.length?(o=+t,n):+o},alphaTarget:function(t){return arguments.length?(a=+t,n):a},velocityDecay:function(t){return arguments.length?(l=1-t,n):1-l},randomSource:function(t){return arguments.length?(f=t,s.forEach(y),n):f},force:function(t,e){return arguments.length>1?(null==e?s.delete(t):s.set(t,y(e)),n):s.get(t)},find:function(e,n,r){var i,o,a,l,s,u=0,c=t.length;for(null==r?r=1/0:r*=r,u=0;u<c;++u)(a=(i=e-(l=t[u]).x)*i+(o=n-l.y)*o)<r&&(s=l,r=a);return s},on:function(t,e){return arguments.length>1?(c.on(t,e),n):c.on(t)}}})(r).force("link",f).force("charge",c);o?p.force("center",function(t,e){var n,r=1;function i(){var i,o,a=n.length,l=0,s=0;for(i=0;i<a;++i)l+=(o=n[i]).x,s+=o.y;for(l=(l/a-t)*r,s=(s/a-e)*r,i=0;i<a;++i)o=n[i],o.x-=l,o.y-=s}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}()):p.force("x",function(t){var e,n,r,i=od(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)i=e[o],i.vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(o=0,n=Array(a),r=Array(a);o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=od(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:od(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:od(+e),a(),o):t},o}()).force("y",function(t){var e,n,r,i=od(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)i=e[o],i.vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(o=0,n=Array(a),r=Array(a);o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=od(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:od(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:od(+e),a(),o):t},o}()),p.stop();let h=Math.ceil(Math.log(p.alphaMin())/Math.log(1-p.alphaDecay()));for(let t=0;t<h;t++)p.tick();return{nodesData:r,linksData:i}}({links:y,nodes:g},rN({},ai,o),p),x=rq(u,"link",{items:[t=>({name:"source",value:at(f)(t.source)}),t=>({name:"target",value:at(f)(t.target)})]}),O=rq(u,"node",{items:[t=>({name:"key",value:at(c)(t)})]},!0);return[rN({},ao,{data:b,encode:d,labels:l,style:rW(i,"link"),tooltip:x,animate:rK(s,"link")}),rN({},aa,{data:v,encode:Object.assign({},h),scale:r,style:rW(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},al),rW(i,"label")),...a],animate:rK(s,"link")})]};function au(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ac(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ap)):void 0===e&&(e=af);for(var n,r,i,o,a,l=new ay(t),s=[l];n=s.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new ay(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(ad)}function af(t){return t.children}function ap(t){return Array.isArray(t)?t[1]:null}function ah(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function ad(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ay(t){this.data=t,this.depth=this.height=0,this.parent=null}function ag(t,e){return t.parent===e.parent?1:2}function am(t){var e=t.children;return e?e[0]:t.t}function av(t){var e=t.children;return e?e[e.length-1]:t.t}function ab(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function ax(){var t=ag,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new ab(t,0),l=[a];e=l.pop();)if(r=e._.children)for(e.children=Array(o=r.length),i=o-1;i>=0;--i)l.push(n=e.children[i]=new ab(r[i],i)),n.parent=e;return(a.parent=new ab(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,f=i;i.eachBefore(function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>f.depth&&(f=t)});var p=u===c?1:t(u,c)/2,h=p-u.x,d=e/(c.x+p+h),y=n/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+h)*d,t.y=t.depth*y})}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)e=i[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o,a,l=e,s=e,u=n,c=l.parent.children[0],f=l.m,p=s.m,h=u.m,d=c.m;u=av(u),l=am(l),u&&l;)c=am(c),(s=av(s)).a=e,(a=u.z+h-l.z-f+t(u._,l._))>0&&(!function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}((i=u,o=r,i.a.parent===e.parent?i.a:o),e,a),f+=a,p+=a),h+=u.m,f+=l.m,d+=c.m,p+=s.m;u&&!av(s)&&(s.t=u,s.m+=h-p),l&&!am(c)&&(c.t=l,c.m+=f-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function aO(t,e){return t.parent===e.parent?1:2}function aw(t,e){return t+e.x}function aE(t,e){return Math.max(t,e.y)}function ak(){var t=aO,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(e){var n=e.children;n?(e.x=n.reduce(aw,0)/n.length,e.y=1+n.reduce(aE,0)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)});var l=function(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=l.x-t(l,s)/2,c=s.x+t(s,l)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}as.props={},ay.prototype=ac.prototype={constructor:ay,count:function(){return this.eachAfter(au)},each:function(t,e){let n=-1;for(let r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)t.call(e,o,++s,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(let r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)r.push(e=e.parent);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return ac(this).eachBefore(ah)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);while(o.length)}},ab.prototype=Object.create(ay.prototype);let aM=t=>e=>n=>{let{field:r="value",nodeSize:i,separation:o,sortBy:a,as:l=["x","y"]}=e,[s,u]=l,c=ac(n,t=>t.children).sum(t=>t[r]).sort(a),f=t();f.size([1,1]),i&&f.nodeSize(i),o&&f.separation(o),f(c);let p=[];c.each(t=>{t[s]=t.x,t[u]=t.y,t.name=t.data.name,p.push(t)});let h=c.links();return h.forEach(t=>{t[s]=[t.source[s],t.target[s]],t[u]=[t.source[u],t.target[u]]}),{nodes:p,edges:h}},aS=t=>aM(ak)(t);aS.props={};let a_=t=>aM(ax)(t);a_.props={};let aP={sortBy:(t,e)=>e.value-t.value},aj={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},aA={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},aT={text:"",fontSize:10},aC=t=>{let{data:e,encode:n={},scale:r={},style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,c=null==n?void 0:n.value,{nodes:f,edges:p}=a_(Object.assign(Object.assign(Object.assign({},aP),o),{field:c}))(e),h=rq(u,"node",{title:"name",items:["value"]},!0),d=rq(u,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[rN({},aA,{data:p,encode:rW(n,"link"),scale:rW(r,"link"),labels:l,style:Object.assign({stroke:"#999"},rW(i,"link")),tooltip:d,animate:rK(s,"link")}),rN({},aj,{data:f,scale:rW(r,"node"),encode:rW(n,"node"),labels:[Object.assign(Object.assign({},aT),rW(i,"label")),...a],style:Object.assign({},rW(i,"node")),tooltip:h,animate:rK(s,"node")})]};function aN(t){return null==t?null:aL(t)}function aL(t){if("function"!=typeof t)throw Error();return t}aC.props={};var aI={depth:-1},aR={},aD={};function aF(t){return t.id}function aB(t){return t.parentId}function az(){var t,e=aF,n=aB;function r(r){var i,o,a,l,s,u,c,f,p=Array.from(r),h=e,d=n,y=new Map;if(null!=t){let e=p.map((e,n)=>{var i;let o;return i=t(e,n,r),o=(i=`${i}`).length,a$(i,o-1)&&!a$(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=e.map(aW),i=new Set(e).add("");for(let t of n)i.has(t)||(i.add(t),e.push(t),n.push(aW(t)),p.push(aD));h=(t,n)=>e[n],d=(t,e)=>n[e]}for(a=0,i=p.length;a<i;++a)o=p[a],u=p[a]=new ay(o),null!=(c=h(o,a,r))&&(c+="")&&(f=u.id=c,y.set(f,y.has(f)?aR:u)),null!=(c=d(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=p[a]).parent){if(!(s=y.get(c)))throw Error("missing: "+c);if(s===aR)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=t){for(;l.data===aD&&1===l.children.length;)l=l.children[0],--i;for(let t=p.length-1;t>=0&&(u=p[t]).data===aD;--t)u.data=null}if(l.parent=aI,l.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(ad),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(t){return arguments.length?(e=aN(t),r):e},r.parentId=function(t){return arguments.length?(n=aN(t),r):n},r.path=function(e){return arguments.length?(t=aN(e),r):t},r}function aW(t){let e=t.length;if(e<2)return"";for(;--e>1&&!a$(t,e););return t.slice(0,e)}function a$(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if((1&n)==0)return!0}return!1}function aG(){return 0}function aH(t){return function(){return t}}function aV(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function aU(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function aq(t,e){for(var n=0;n<e.length;++n)if(!aU(t,e[n]))return!1;return!0}function aY(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,l=e.r,s=o-n,u=a-r,c=l-i,f=Math.sqrt(s*s+u*u);return{x:(n+o+s/f*c)/2,y:(r+a+u/f*c)/2,r:(f+i+l)/2}}function aX(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,l=e.y,s=e.r,u=n.x,c=n.y,f=n.r,p=r-a,h=r-u,d=i-l,y=i-c,g=s-o,v=f-o,b=r*r+i*i-o*o,x=b-a*a-l*l+s*s,O=b-u*u-c*c+f*f,w=h*d-p*y,E=(d*O-y*x)/(2*w)-r,k=(y*g-d*v)/w,M=(h*x-p*O)/(2*w)-i,S=(p*v-h*g)/w,_=k*k+S*S-1,P=2*(o+E*k+M*S),j=E*E+M*M-o*o,A=-(Math.abs(_)>1e-6?(P+Math.sqrt(P*P-4*_*j))/(2*_):j/P);return{x:r+E+k*A,y:i+M+S*A,r:A}}function aK(t,e,n){var r,i,o,a,l=t.x-e.x,s=t.y-e.y,u=l*l+s*s;u?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(u+a-i)/(2*u),o=Math.sqrt(Math.max(0,a/u-r*r)),n.x=t.x-r*l-o*s,n.y=t.y-r*s+o*l):(r=(u+i-a)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*l-o*s,n.y=e.y+r*s+o*l)):(n.x=e.x+n.r,n.y=e.y)}function aZ(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function aQ(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function aJ(t){this._=t,this.next=null,this.previous=null}function a0(t){return Math.sqrt(t.value)}function a1(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function a2(t,e,n){return function(r){if(i=r.children){var i,o,a,l=i.length,s=t(r)*e||0;if(s)for(o=0;o<l;++o)i[o].r+=s;if(a=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h;if(!(o=(t="object"==typeof(h=t)&&"length"in h?h:Array.from(h)).length))return 0;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;aK(r,n,i=t[2]),n=new aJ(n),r=new aJ(r),i=new aJ(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(s=3;s<o;++s){aK(n._,r._,i=t[s]),i=new aJ(i),u=r.next,c=n.previous,f=r._.r,p=n._.r;do if(f<=p){if(aZ(u._,i._)){r=u,n.next=r,r.previous=n,--s;continue t}f+=u._.r,u=u.next}else{if(aZ(c._,i._)){(n=c).next=r,r.previous=n,--s;continue t}p+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=aQ(n);(i=i.next)!==r;)(l=aQ(i))<a&&(n=i,a=l);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(s=0,i=function(t,e){for(var n,r,i=0,o=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,a=[];i<o;)n=t[i],r&&aU(r,n)?++i:(r=function(t){switch(t.length){case 1:var e;return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return aY(t[0],t[1]);case 3:return aX(t[0],t[1],t[2])}}(a=function(t,e){var n,r;if(aq(e,t))return[e];for(n=0;n<t.length;++n)if(aV(e,t[n])&&aq(aY(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(aV(aY(t[n],t[r]),e)&&aV(aY(t[n],e),t[r])&&aV(aY(t[r],e),t[n])&&aq(aX(t[n],t[r],e),t))return[t[n],t[r],e];throw Error()}(a,n)),i=0);return r}(n,e);s<o;++s)n=t[s],n.x-=i.x,n.y-=i.y;return i.r}(i,n),s)for(o=0;o<l;++o)i[o].r-=s;r.r=a+s}}}function a5(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var a3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let a4=(t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}),a6=(t,e,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}),a8={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},a9={title:t=>t.data.name,items:[{field:"value"}]},a7=(t,e,n)=>{let{value:r}=n,i=rA(t)?az().path(e.path)(t):ac(t);return r?i.sum(t=>at(r)(t)).sort(e.sort):i.count(),(function(){var t=null,e=1,n=1,r=aG;function i(i){let o,a=(o=1,()=>(o=(1664525*o+0x3c6ef35f)%0x100000000)/0x100000000);return i.x=e/2,i.y=n/2,t?i.eachBefore(a1(t)).eachAfter(a2(r,.5,a)).eachBefore(a5(1)):i.eachBefore(a1(a0)).eachAfter(a2(aG,1,a)).eachAfter(a2(r,i.r/Math.min(e,n),a)).eachBefore(a5(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=aN(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:aH(+t),i):r},i})().size(e.size).padding(e.padding)(i),i.descendants()},lt=(t,e)=>{let{width:n,height:r}=e,{data:i,encode:o={},scale:a={},style:l={},layout:s={},labels:u=[],tooltip:c={}}=t,f=a3(t,["data","encode","scale","style","layout","labels","tooltip"]),p=a6(n,r,o),h=a7(i,rN({},a4(n,r),s),rN({},p.encode,o)),d=rW(l,"label");return rN({},p,Object.assign(Object.assign({data:h,encode:o,scale:a,style:l,labels:[Object.assign(Object.assign({},a8),d),...u]},f),{tooltip:rY(c,a9),axis:!1}))};function le(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function ln(t){return t.target.depth}function lr(t,e){return t.sourceLinks.length?t.depth:e-1}function li(t,e){let n=0;if(void 0===e)for(let e of t)(e*=1)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function lo(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function la(t){return function(){return t}}function ll(t,e){return lu(t.source,e.source)||t.index-e.index}function ls(t,e){return lu(t.target,e.target)||t.index-e.index}function lu(t,e){return t.y0-e.y0}function lc(t){return t.value}function lf(t){return t.index}function lp(t){return t.nodes}function lh(t){return t.links}function ld(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function ly({nodes:t}){for(let e of t){let t=e.y0,n=t;for(let n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(let t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}lt.props={};let lg={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},lm={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?le(t.sourceLinks,ln)-1:0},justify:lr},lv=t=>e=>{let{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:o,nodePadding:a,nodeDepth:l,nodes:s,links:u,linkSort:c,iterations:f}=Object.assign({},lg,t),p=(function(){let t,e,n,r=0,i=0,o=1,a=1,l=24,s=8,u,c=lf,f=lr,p=lp,h=lh,d=6;function y(y){let v={nodes:p(y),links:h(y)};return function({nodes:t,links:e}){t.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});let r=new Map(t.map(t=>[c(t),t]));if(e.forEach((t,e)=>{t.index=e;let{source:n,target:i}=t;"object"!=typeof n&&(n=t.source=ld(r,n)),"object"!=typeof i&&(i=t.target=ld(r,i)),n.sourceLinks.push(t),i.targetLinks.push(t)}),null!=n)for(let{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}(v),function({nodes:t}){for(let e of t)e.value=void 0===e.fixedValue?Math.max(li(e.sourceLinks,lc),li(e.targetLinks,lc)):e.fixedValue}(v),function({nodes:e}){let n=e.length,r=new Set(e),i=new Set,o=0;for(;r.size;){if(r.forEach(t=>{for(let{target:e}of(t.depth=o,t.sourceLinks))i.add(e)}),++o>n)throw Error("circular link");r=i,i=new Set}if(t){let n,r=Math.max(lo(e,t=>t.depth)+1,0);for(let i=0;i<e.length;i++)(n=e[i]).depth=t.call(null,n,r)}}(v),function({nodes:t}){let e=t.length,n=new Set(t),r=new Set,i=0;for(;n.size;){if(n.forEach(t=>{for(let{source:e}of(t.height=i,t.targetLinks))r.add(e)}),++i>e)throw Error("circular link");n=r,r=new Set}}(v),function(t){let c=function({nodes:t}){let n=Math.max(lo(t,t=>t.depth)+1,0),i=(o-r-l)/(n-1),a=Array(n).fill(0).map(()=>[]);for(let e of t){let t=Math.max(0,Math.min(n-1,Math.floor(f.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+l,a[t]?a[t].push(e):a[t]=[e]}if(e)for(let t of a)t.sort(e);return a}(t);u=Math.min(s,(a-i)/(lo(c,t=>t.length)-1));let p=le(c,t=>(a-i-(t.length-1)*u)/li(t,lc));for(let t of c){let e=i;for(let n of t)for(let t of(n.y0=e,n.y1=e+n.value*p,e=n.y1+u,n.sourceLinks))t.width=t.value*p;e=(a-e+u)/(t.length+1);for(let n=0;n<t.length;++n){let r=t[n];r.y0+=e*(n+1),r.y1+=e*(n+1)}var h=t;if(void 0===n)for(let{sourceLinks:t,targetLinks:e}of h)t.sort(ls),e.sort(ll)}for(let t=0;t<d;++t){let n=Math.pow(.99,t),r=Math.max(1-n,(t+1)/d);(function(t,n,r){for(let i=t.length,o=i-2;o>=0;--o){let i=t[o];for(let t of i){let e=0,r=0;for(let{target:n,value:i}of t.sourceLinks){let o=i*(n.layer-t.layer);e+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*u/2;for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+u}for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n-=i}return n}(t,n)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,x(t)}void 0===e&&i.sort(lu),i.length&&g(i,r)}})(c,n,r),function(t,n,r){for(let i=1,o=t.length;i<o;++i){let o=t[i];for(let t of o){let e=0,r=0;for(let{source:n,value:i}of t.targetLinks){let o=i*(t.layer-n.layer);e+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*u/2;for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+u}for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n-=i}return n}(n,t)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,x(t)}void 0===e&&o.sort(lu),o.length&&g(o,r)}}(c,n,r)}}(v),ly(v),v}function g(t,e){let n=t.length>>1,r=t[n];b(t,r.y0-u,n-1,e),v(t,r.y1+u,n+1,e),b(t,a,t.length-1,e),v(t,i,0,e)}function v(t,e,n,r){for(;n<t.length;++n){let i=t[n],o=(e-i.y0)*r;o>1e-6&&(i.y0+=o,i.y1+=o),e=i.y1+u}}function b(t,e,n,r){for(;n>=0;--n){let i=t[n],o=(i.y1-e)*r;o>1e-6&&(i.y0-=o,i.y1-=o),e=i.y0-u}}function x({sourceLinks:t,targetLinks:e}){if(void 0===n){for(let{source:{sourceLinks:t}}of e)t.sort(ls);for(let{target:{targetLinks:e}}of t)e.sort(ll)}}return y.update=function(t){return ly(t),t},y.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:la(t),y):c},y.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:la(t),y):f},y.nodeDepth=function(e){return arguments.length?(t=e,y):t},y.nodeSort=function(t){return arguments.length?(e=t,y):e},y.nodeWidth=function(t){return arguments.length?(l=+t,y):l},y.nodePadding=function(t){return arguments.length?(s=u=+t,y):s},y.nodes=function(t){return arguments.length?(p="function"==typeof t?t:la(t),y):p},y.links=function(t){return arguments.length?(h="function"==typeof t?t:la(t),y):h},y.linkSort=function(t){return arguments.length?(n=t,y):n},y.size=function(t){return arguments.length?(r=i=0,o=+t[0],a=+t[1],y):[o-r,a-i]},y.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],i=+t[0][1],a=+t[1][1],y):[[r,i],[o,a]]},y.iterations=function(t){return arguments.length?(d=+t,y):d},y})().nodeSort(r).linkSort(c).links(u).nodes(s).nodeWidth(o).nodePadding(a).nodeDepth(l).nodeAlign(function(t){let e=typeof t;return"string"===e?lm[t]||lr:"function"===e?t:lr}(i)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&p.nodeId(n);let{nodes:h,links:d}=p(e);return{nodes:h.map(t=>{let{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:d.map(t=>{let{source:e,target:n}=t,r=e.x1,i=n.x0,o=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,i,i],y:[t.y0+o,t.y0-o,t.y1+o,t.y1-o]})})}};lv.props={};var lb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let lx={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},lO={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},lw={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},lE={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},lk=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,{links:c,nodes:f}=an(e,n),p=rW(n,"node"),h=rW(n,"link"),{key:d=t=>t.key,color:y=d}=p,{links:g,nodes:v}=lv(Object.assign(Object.assign(Object.assign({},lx),{nodeId:at(d)}),o))({links:c,nodes:f}),b=rW(i,"label"),{text:x=d,spacing:O=5}=b,w=lb(b,["text","spacing"]),E=at(d),k=rq(u,"node",{title:E,items:[{field:"value"}]},!0),M=rq(u,"link",{title:"",items:[t=>({name:"source",value:E(t.source)}),t=>({name:"target",value:E(t.target)})]});return[rN({},lO,{data:v,encode:Object.assign(Object.assign({},p),{color:y}),scale:r,style:rW(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},lE),{text:x,dx:t=>t.x[0]<.5?O:-O}),w),...a],tooltip:k,animate:rK(s,"node"),axis:!1}),rN({},lw,{data:g,encode:h,labels:l,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},rW(i,"link")),tooltip:M,animate:rK(s,"link")})]};lk.props={};class lM extends Map{constructor(t,e=l_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(lS(this,t))}has(t){return super.has(lS(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function lS({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function l_(t){return null!==t&&"object"==typeof t?t.valueOf():t}function lP(t){return t}function lj(t,...e){return lN(t,lP,lP,e)}function lA(t,...e){return lN(t,Array.from,lP,e)}function lT(t,e,...n){return lN(t,lP,e,n)}function lC(t,e,...n){return lN(t,Array.from,e,n)}function lN(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new lM,l=r[o++],s=-1;for(let t of i){let e=l(t,++s,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(let[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}function lL(t,e){return e.value-t.value}function lI(t,e){return e.frequency-t.frequency}function lR(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function lD(t,e){return`${t.name}`.localeCompare(`${e.name}`)}let lF={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},lB=t=>e=>(function(t){let{y:e,thickness:n,weight:r,marginRatio:i,id:o,source:a,target:l,sourceWeight:s,targetWeight:u,sortBy:c}=Object.assign(Object.assign({},lF),t);return function(t){let f=t.nodes.map(t=>Object.assign({},t)),p=t.edges.map(t=>Object.assign({},t));return function(t,e){e.forEach(t=>{t.source=a(t),t.target=l(t),t.sourceWeight=s(t),t.targetWeight=u(t)});let n=lj(e,t=>t.source),r=lj(e,t=>t.target);t.forEach(t=>{t.id=o(t);let e=n.has(t.id)?n.get(t.id):[],i=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+i.length,t.value=li(e,t=>t.sourceWeight)+li(i,t=>t.targetWeight)})}(f,p),function(t,e){let n="function"==typeof c?c:ef[c];n&&t.sort(n)}(f,0),function(t,o){let a=t.length;if(!a)throw rF("Invalid nodes: it's empty!");if(!r){let n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e})}let l=i/(2*a),s=t.reduce((t,e)=>t+=e.value,0);t.reduce((t,r)=>{r.weight=r.value/s,r.width=r.weight*(1-i),r.height=n;let o=l+t,a=o+r.width,u=e-n/2,c=u+n;return r.x=[o,a,a,o],r.y=[u,u,c,c],t+r.width+2*l},0)}(f,0),function(t,n){let i=new Map(t.map(t=>[t.id,t]));if(!r)return n.forEach(t=>{let e=a(t),n=l(t),r=i.get(e),o=i.get(n);r&&o&&(t.x=[r.x,o.x],t.y=[r.y,o.y])});n.forEach(t=>{t.x=[0,0,0,0],t.y=[e,e,e,e]});let o=lj(n,t=>t.source),s=lj(n,t=>t.target);t.forEach(t=>{let{edges:e,width:n,x:r,y:i,value:a,id:l}=t,u=o.get(l)||[],c=s.get(l)||[],f=0;u.map(t=>{let e=t.sourceWeight/a*n;t.x[0]=r[0]+f,t.x[1]=r[0]+f+e,f+=e}),c.forEach(t=>{let e=t.targetWeight/a*n;t.x[3]=r[0]+f,t.x[2]=r[0]+f+e,f+=e})})}(f,p),{nodes:f,edges:p}}})(t)(e);lB.props={};var lz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let lW={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},l$={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},lG={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},lH={position:"outside",fontSize:10},lV=(t,e)=>{let{data:n,encode:r={},scale:i,style:o={},layout:a={},nodeLabels:l=[],linkLabels:s=[],animate:u={},tooltip:c={}}=t,{nodes:f,links:p}=an(n,r),h=rW(r,"node"),d=rW(r,"link"),{key:y=t=>t.key,color:g=y}=h,{linkEncodeColor:v=t=>t.source}=d,{nodeWidthRatio:b=lW.thickness,nodePaddingRatio:x=lW.marginRatio}=a,O=lz(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:E}=lB(Object.assign(Object.assign(Object.assign(Object.assign({},lW),{id:at(y),thickness:b,marginRatio:x}),O),{weight:!0}))({nodes:f,edges:p}),k=rW(o,"label"),{text:M=y}=k,S=lz(k,["text"]),_=rq(c,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),P=rq(c,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:j,width:A}=e,T=Math.min(j,A);return[rN({},lG,{data:E,encode:Object.assign(Object.assign({},d),{color:v}),labels:s,style:Object.assign({fill:v?void 0:"#aaa"},rW(o,"link")),tooltip:P,animate:rK(u,"link")}),rN({},l$,{data:w,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:rW(o,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-(2*Math.PI),endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},lH),{text:M}),S),...l],tooltip:_,animate:rK(u,"node"),axis:!1})]};lV.props={};var lU=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function lq(t){if(lU(t))return t[t.length-1]}var lY=function(t){return rj(t,"String")},lX=function(t,e,n){for(var r=0,i=lY(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};function lK(t,e,n,r,i){var o,a,l=t.children,s=l.length,u=Array(s+1);for(u[0]=a=o=0;o<s;++o)u[o+1]=a+=l[o].value;!function t(e,n,r,i,o,a,s){if(e>=n-1){var c=l[e];c.x0=i,c.y0=o,c.x1=a,c.y1=s;return}for(var f=u[e],p=r/2+f,h=e+1,d=n-1;h<d;){var y=h+d>>>1;u[y]<p?h=y+1:d=y}p-u[h-1]<u[h]-p&&e+1<h&&--h;var g=u[h]-f,v=r-g;if(a-i>s-o){var b=r?(i*v+a*g)/r:a;t(e,h,g,i,o,b,s),t(h,n,v,b,o,a,s)}else{var x=r?(o*v+s*g)/r:s;t(e,h,g,i,o,a,x),t(h,n,v,i,x,a,s)}}(0,s,t.value,e,n,r,i)}function lZ(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(r-e)/t.value;++l<s;)(o=a[l]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function lQ(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(i-n)/t.value;++l<s;)(o=a[l]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}function lJ(t,e,n,r,i){(1&t.depth?lQ:lZ)(t,e,n,r,i)}var l0=(1+Math.sqrt(5))/2;function l1(t,e,n,r,i,o){for(var a,l,s,u,c,f,p,h,d,y,g,v=[],b=e.children,x=0,O=0,w=b.length,E=e.value;x<w;){s=i-n,u=o-r;do c=b[O++].value;while(!c&&O<w);for(f=p=c,d=Math.max(p/(g=c*c*(y=Math.max(u/s,s/u)/(E*t))),g/f);O<w;++O){if(c+=l=b[O].value,l<f&&(f=l),l>p&&(p=l),(h=Math.max(p/(g=c*c*y),g/f))>d){c-=l;break}d=h}v.push(a={value:c,dice:s<u,children:b.slice(x,O)}),a.dice?lZ(a,n,r,i,E?r+=u*c/E:o):lQ(a,n,r,E?n+=s*c/E:i,o),E-=c,x=O}return v}var l2=function t(e){function n(t,n,r,i,o){l1(e,t,n,r,i,o)}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(l0),l5=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,l,s,u,c,f=-1,p=a.length,h=t.value;++f<p;){for(s=(l=a[f]).children,u=l.value=0,c=s.length;u<c;++u)l.value+=s[u].value;l.dice?lZ(l,n,r,i,h?r+=(o-r)*l.value/h:o):lQ(l,n,r,h?n+=(i-n)*l.value/h:i,o),h-=l.value}else t._squarify=a=l1(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(l0);function l3(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function l4(t,e,n){var r;let{value:i}=n,o=function(t,e){let n={treemapBinary:lK,treemapDice:lZ,treemapSlice:lQ,treemapSliceDice:lJ,treemapSquarify:l2,treemapResquarify:l5},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw TypeError("Invalid tile method!");return r}(e.tile,e.ratio),a=(r=e.path,Array.isArray(t)?"function"==typeof r?az().path(r)(t):az()(t):ac(t));rA(t)?function t(e){let n=lX(e,["data","name"]);n.replaceAll&&(e.path=n.replaceAll(".","/").split("/")),e.children&&e.children.forEach(e=>{t(e)})}(a):function t(e,n=[e.data.name]){e.id=e.id||e.data.name,e.path=n,e.children&&e.children.forEach(r=>{r.id=`${e.id}/${r.data.name}`,r.path=[...n,r.data.name],t(r,r.path)})}(a),i?a.sum(t=>e.ignoreParentValue&&t.children?0:at(i)(t)).sort(e.sort):a.count(),(function(){var t=l2,e=!1,n=1,r=1,i=[0],o=aG,a=aG,l=aG,s=aG,u=aG;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(l3),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,p=e.y1-n;f<r&&(r=f=(r+f)/2),p<c&&(c=p=(c+p)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=p,e.children&&(n=i[e.depth+1]=o(e)/2,r+=u(e)-n,c+=a(e)-n,f-=l(e)-n,p-=s(e)-n,f<r&&(r=f=(r+f)/2),p<c&&(c=p=(c+p)/2),t(e,r,c,f,p))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=aL(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:aH(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:aH(+t),c):a},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:aH(+t),c):l},c.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:aH(+t),c):s},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:aH(+t),c):u},c})().tile(o).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(a);let l=a.descendants().map(t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]}));return[l.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer),l]}var l6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let l8=(t,e)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0}),l9=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),l7={fontSize:10,text:t=>lq(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},st={title:t=>{var e,n;return null==(n=null==(e=t.path)?void 0:e.join)?void 0:n.call(e,".")},items:[{field:"value"}]},se={title:t=>lq(t.path),items:[{field:"value"}]},sn=(t,e)=>{let{width:n,height:r,options:i}=e,{data:o,encode:a={},scale:l,style:s={},layout:u={},labels:c=[],tooltip:f={}}=t,p=l6(t,["data","encode","scale","style","layout","labels","tooltip"]),h=lX(i,["interaction","treemapDrillDown"]),d=rN({},l8(n,r),u,{layer:h?t=>1===t.depth:u.layer}),[y,g]=l4(o,d,a),v=rW(s,"label");return rN({},l9(n,r),Object.assign(Object.assign({data:y,scale:l,style:s,labels:[Object.assign(Object.assign({},l7),v),...c]},p),{encode:a,tooltip:rY(f,st),axis:!1}),h?{interaction:Object.assign(Object.assign({},p.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:g,layout:d}):void 0}),encode:Object.assign({color:t=>lq(t.path)},a),tooltip:rY(f,se)}:{})};function sr(){return{"data.arc":lB,"data.cluster":aS,"mark.forceGraph":as,"mark.tree":aC,"mark.pack":lt,"mark.sankey":lk,"mark.chord":lV,"mark.treemap":sn}}sn.props={};let si=()=>[["cartesian"]];si.props={};let so=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},sa=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=so(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};sa.props={};let sl=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];sl.props={transform:!0};let ss=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),su=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=ss(t);return[...sl(),...sa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};su.props={};let sc=()=>[["parallel",0,1,0,1]];sc.props={};let sf=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];sf.props={transform:!0};let sp=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),sh=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=sp(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...sa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};sh.props={};let sd=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...sc(),...sa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};sd.props={};let sy=({value:t})=>e=>e.map(()=>t);sy.props={};let sg=({value:t})=>e=>e.map(e=>e[t]);sg.props={};let sm=({value:t})=>e=>e.map(t);sm.props={};let sv=({value:t})=>()=>t;sv.props={};let sb=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{y1:oH(oU(t,0))}})]};sb.props={};let sx=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{x:oH(oU(t,0))},scale:{x:{guide:null}}})]};function sO(t){return function(){return t}}sx.props={};let sw=Math.abs,sE=Math.atan2,sk=Math.cos,sM=Math.max,sS=Math.min,s_=Math.sin,sP=Math.sqrt,sj=Math.PI,sA=sj/2,sT=2*sj;function sC(t){return t>=1?sA:t<=-1?-sA:Math.asin(t)}let sN=Math.PI,sL=2*sN,sI=sL-1e-6;function sR(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class sD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?sR:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return sR;let n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t*=1,e*=1,n*=1,r*=1,(i*=1)<0)throw Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,f=u*u+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>1e-6)if(Math.abs(c*l-s*u)>1e-6&&i){let p=n-o,h=r-a,d=l*l+s*s,y=Math.sqrt(d),g=Math.sqrt(f),v=i*Math.tan((sN-Math.acos((d+f-(p*p+h*h))/(2*y*g)))/2),b=v/g,x=v/y;Math.abs(b-1)>1e-6&&this._append`L${t+b*u},${e+b*c}`,this._append`A${i},${i},0,0,${+(c*p>u*h)},${this._x1=t+x*l},${this._y1=e+x*s}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t*=1,e*=1,n*=1,o=!!o,n<0)throw Error(`negative radius: ${n}`);let a=n*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${s},${u}`,n&&(f<0&&(f=f%sL+sL),f>sI?this._append`A${n},${n},0,1,${c},${t-a},${e-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:f>1e-6&&this._append`A${n},${n},0,${+(f>=sN)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n*=1}v${+r}h${-n}Z`}toString(){return this._}}function sF(){return new sD}function sB(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{let t=Math.floor(n);if(!(t>=0))throw RangeError(`invalid digits: ${n}`);e=t}return t},()=>new sD(e)}function sz(t){return t.innerRadius}function sW(t){return t.outerRadius}function s$(t){return t.startAngle}function sG(t){return t.endAngle}function sH(t){return t&&t.padAngle}function sV(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/sP(l*l+s*s),c=u*s,f=-u*l,p=t+c,h=e+f,d=n+c,y=r+f,g=(p+d)/2,v=(h+y)/2,b=d-p,x=y-h,O=b*b+x*x,w=i-o,E=p*y-d*h,k=(x<0?-1:1)*sP(sM(0,w*w*O-E*E)),M=(E*x-b*k)/O,S=(-E*b-x*k)/O,_=(E*x+b*k)/O,P=(-E*b+x*k)/O,j=M-g,A=S-v,T=_-g,C=P-v;return j*j+A*A>T*T+C*C&&(M=_,S=P),{cx:M,cy:S,x01:-c,y01:-f,x11:M*(i/w-1),y11:S*(i/w-1)}}function sU(){var t=sz,e=sW,n=sO(0),r=null,i=s$,o=sG,a=sH,l=null,s=sB(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-sA,d=o.apply(this,arguments)-sA,y=sw(d-h),g=d>h;if(l||(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12)if(y>sT-1e-12)l.moveTo(p*sk(h),p*s_(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*sk(d),f*s_(d)),l.arc(0,0,f,d,h,g));else{var v,b,x=h,O=d,w=h,E=d,k=y,M=y,S=a.apply(this,arguments)/2,_=S>1e-12&&(r?+r.apply(this,arguments):sP(f*f+p*p)),P=sS(sw(p-f)/2,+n.apply(this,arguments)),j=P,A=P;if(_>1e-12){var T=sC(_/f*s_(S)),C=sC(_/p*s_(S));(k-=2*T)>1e-12?(T*=g?1:-1,w+=T,E-=T):(k=0,w=E=(h+d)/2),(M-=2*C)>1e-12?(C*=g?1:-1,x+=C,O-=C):(M=0,x=O=(h+d)/2)}var N=p*sk(x),L=p*s_(x),I=f*sk(E),R=f*s_(E);if(P>1e-12){var D,F=p*sk(O),B=p*s_(O),z=f*sk(w),W=f*s_(w);if(y<sj)if(D=function(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,f=l-o,p=f*s-c*u;if(!(p*p<1e-12))return p=(c*(e-o)-f*(t-i))/p,[t+p*s,e+p*u]}(N,L,z,W,F,B,I,R)){var $,G=N-D[0],H=L-D[1],V=F-D[0],U=B-D[1],q=1/s_((($=(G*V+H*U)/(sP(G*G+H*H)*sP(V*V+U*U)))>1?0:$<-1?sj:Math.acos($))/2),Y=sP(D[0]*D[0]+D[1]*D[1]);j=sS(P,(f-Y)/(q-1)),A=sS(P,(p-Y)/(q+1))}else j=A=0}M>1e-12?A>1e-12?(v=sV(z,W,N,L,p,A,g),b=sV(F,B,I,R,p,A,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),A<P?l.arc(v.cx,v.cy,A,sE(v.y01,v.x01),sE(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,A,sE(v.y01,v.x01),sE(v.y11,v.x11),!g),l.arc(0,0,p,sE(v.cy+v.y11,v.cx+v.x11),sE(b.cy+b.y11,b.cx+b.x11),!g),l.arc(b.cx,b.cy,A,sE(b.y11,b.x11),sE(b.y01,b.x01),!g))):(l.moveTo(N,L),l.arc(0,0,p,x,O,!g)):l.moveTo(N,L),f>1e-12&&k>1e-12?j>1e-12?(v=sV(I,R,F,B,f,-j,g),b=sV(N,L,z,W,f,-j,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),j<P?l.arc(v.cx,v.cy,j,sE(v.y01,v.x01),sE(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,j,sE(v.y01,v.x01),sE(v.y11,v.x11),!g),l.arc(0,0,f,sE(v.cy+v.y11,v.cx+v.x11),sE(b.cy+b.y11,b.cx+b.x11),g),l.arc(b.cx,b.cy,j,sE(b.y11,b.x11),sE(b.y01,b.x01),!g))):l.arc(0,0,f,E,w,g):l.lineTo(I,R)}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-sj/2;return[sk(r)*n,s_(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:sO(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sO(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:sO(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:sO(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:sO(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function sq(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function sY(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function sX(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function sK(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function sZ(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function sQ(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function sJ(t){return sK(t)||sY(t)}function s0(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function s1(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}sF.prototype=sD.prototype;var s2=n(420),s5="undefined"!=typeof Float32Array?Float32Array:Array;function s3(){var t=new s5(3);return s5!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function s4(t){var e=new s5(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function s6(t){return Math.hypot(t[0],t[1],t[2])}function s8(t,e,n){var r=new s5(3);return r[0]=t,r[1]=e,r[2]=n,r}function s9(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s7(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function ue(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function un(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function ur(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function ui(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function uo(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function ua(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ul(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],l=e[2];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var us=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function uu(){var t=new s5(16);return s5!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function uc(t){var e=new s5(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function uf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function up(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new s5(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=p,g[13]=h,g[14]=d,g[15]=y,g}function uh(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=p,t[12]=h,t[13]=d,t[14]=y,t[15]=g,t}function ud(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uy(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],l=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=l}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function ug(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15],b=n*l-r*a,x=n*s-i*a,O=n*u-o*a,w=r*s-i*l,E=r*u-o*l,k=i*u-o*s,M=c*y-f*d,S=c*g-p*d,_=c*v-h*d,P=f*g-p*y,j=f*v-h*y,A=p*v-h*g,T=b*A-x*j+O*P+w*_-E*S+k*M;return T?(T=1/T,t[0]=(l*A-s*j+u*P)*T,t[1]=(i*j-r*A-o*P)*T,t[2]=(y*k-g*E+v*w)*T,t[3]=(p*E-f*k-h*w)*T,t[4]=(s*_-a*A-u*S)*T,t[5]=(n*A-i*_+o*S)*T,t[6]=(g*O-d*k-v*x)*T,t[7]=(c*k-p*O+h*x)*T,t[8]=(a*j-l*_+u*M)*T,t[9]=(r*_-n*j-o*M)*T,t[10]=(d*E-y*O+v*b)*T,t[11]=(f*O-c*E-h*b)*T,t[12]=(l*S-a*P-s*M)*T,t[13]=(n*P-r*S+i*M)*T,t[14]=(y*x-d*w-g*b)*T,t[15]=(c*w-f*x+p*b)*T,t):null}function um(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];return t[0]=l*(p*v-h*g)-f*(s*v-u*g)+y*(s*h-u*p),t[1]=-(r*(p*v-h*g)-f*(i*v-o*g)+y*(i*h-o*p)),t[2]=r*(s*v-u*g)-l*(i*v-o*g)+y*(i*u-o*s),t[3]=-(r*(s*h-u*p)-l*(i*h-o*p)+f*(i*u-o*s)),t[4]=-(a*(p*v-h*g)-c*(s*v-u*g)+d*(s*h-u*p)),t[5]=n*(p*v-h*g)-c*(i*v-o*g)+d*(i*h-o*p),t[6]=-(n*(s*v-u*g)-a*(i*v-o*g)+d*(i*u-o*s)),t[7]=n*(s*h-u*p)-a*(i*h-o*p)+c*(i*u-o*s),t[8]=a*(f*v-h*y)-c*(l*v-u*y)+d*(l*h-u*f),t[9]=-(n*(f*v-h*y)-c*(r*v-o*y)+d*(r*h-o*f)),t[10]=n*(l*v-u*y)-a*(r*v-o*y)+d*(r*u-o*l),t[11]=-(n*(l*h-u*f)-a*(r*h-o*f)+c*(r*u-o*l)),t[12]=-(a*(f*g-p*y)-c*(l*g-s*y)+d*(l*p-s*f)),t[13]=n*(f*g-p*y)-c*(r*g-i*y)+d*(r*p-i*f),t[14]=-(n*(l*g-s*y)-a*(r*g-i*y)+d*(r*s-i*l)),t[15]=n*(l*p-s*f)-a*(r*p-i*f)+c*(r*s-i*l),t}function uv(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],p=t[11],h=t[12],d=t[13],y=t[14],g=t[15];return(e*a-n*o)*(f*g-p*y)-(e*l-r*o)*(c*g-p*d)+(e*s-i*o)*(c*y-f*d)+(n*l-r*a)*(u*g-p*h)-(n*s-i*a)*(u*y-f*h)+(r*s-i*l)*(u*d-c*h)}function ub(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],b=e[15],x=n[0],O=n[1],w=n[2],E=n[3];return t[0]=x*r+O*l+w*f+E*y,t[1]=x*i+O*s+w*p+E*g,t[2]=x*o+O*u+w*h+E*v,t[3]=x*a+O*c+w*d+E*b,x=n[4],O=n[5],w=n[6],E=n[7],t[4]=x*r+O*l+w*f+E*y,t[5]=x*i+O*s+w*p+E*g,t[6]=x*o+O*u+w*h+E*v,t[7]=x*a+O*c+w*d+E*b,x=n[8],O=n[9],w=n[10],E=n[11],t[8]=x*r+O*l+w*f+E*y,t[9]=x*i+O*s+w*p+E*g,t[10]=x*o+O*u+w*h+E*v,t[11]=x*a+O*c+w*d+E*b,x=n[12],O=n[13],w=n[14],E=n[15],t[12]=x*r+O*l+w*f+E*y,t[13]=x*i+O*s+w*p+E*g,t[14]=x*o+O*u+w*h+E*v,t[15]=x*a+O*c+w*d+E*b,t}function ux(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=p,t[10]=h,t[11]=d,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+p*v+e[13],t[14]=o*y+u*g+h*v+e[14],t[15]=a*y+c*g+d*v+e[15]),t}function uO(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function uw(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j=r[0],A=r[1],T=r[2],C=Math.hypot(j,A,T);return C<1e-6?null:(j*=C=1/C,A*=C,T*=C,i=Math.sin(n),a=1-(o=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],p=e[5],h=e[6],d=e[7],y=e[8],g=e[9],v=e[10],b=e[11],x=j*j*a+o,O=A*j*a+T*i,w=T*j*a-A*i,E=j*A*a-T*i,k=A*A*a+o,M=T*A*a+j*i,S=j*T*a+A*i,_=A*T*a-j*i,P=T*T*a+o,t[0]=l*x+f*O+y*w,t[1]=s*x+p*O+g*w,t[2]=u*x+h*O+v*w,t[3]=c*x+d*O+b*w,t[4]=l*E+f*k+y*M,t[5]=s*E+p*k+g*M,t[6]=u*E+h*k+v*M,t[7]=c*E+d*k+b*M,t[8]=l*S+f*_+y*P,t[9]=s*S+p*_+g*P,t[10]=u*S+h*_+v*P,t[11]=c*S+d*_+b*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function uE(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=l*i+f*r,t[7]=s*i+p*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=f*i-l*r,t[11]=p*i-s*r,t}function uk(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=l*i-f*r,t[3]=s*i-p*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=l*r+f*i,t[11]=s*r+p*i,t}function uM(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=l*i+f*r,t[3]=s*i+p*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=f*i-l*r,t[7]=p*i-s*r,t}function uS(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function u_(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uP(t,e,n){var r,i,o,a=n[0],l=n[1],s=n[2],u=Math.hypot(a,l,s);return u<1e-6?null:(a*=u=1/u,l*=u,s*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=l*a*o+s*r,t[2]=s*a*o-l*r,t[3]=0,t[4]=a*l*o-s*r,t[5]=l*l*o+i,t[6]=s*l*o+a*r,t[7]=0,t[8]=a*s*o+l*r,t[9]=l*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function uj(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uA(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uT(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uC(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=r+r,s=i+i,u=o+o,c=r*l,f=r*s,p=r*u,h=i*s,d=i*u,y=o*u,g=a*l,v=a*s,b=a*u;return t[0]=1-(h+y),t[1]=f+b,t[2]=p-v,t[3]=0,t[4]=f-b,t[5]=1-(c+y),t[6]=d+g,t[7]=0,t[8]=p+v,t[9]=d-g,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function uN(t,e){var n=new s5(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=(l*a+c*r+s*o-u*i)*2/f,n[1]=(s*a+c*i+u*r-l*o)*2/f,n[2]=(u*a+c*o+l*i-s*r)*2/f):(n[0]=(l*a+c*r+s*o-u*i)*2,n[1]=(s*a+c*i+u*r-l*o)*2,n[2]=(u*a+c*o+l*i-s*r)*2),uC(t,e,n),t}function uL(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function uI(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,l),t[2]=Math.hypot(s,u,c),t}function uR(t,e){var n=new s5(3);uI(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,l=e[1]*i,s=e[2]*o,u=e[4]*r,c=e[5]*i,f=e[6]*o,p=e[8]*r,h=e[9]*i,d=e[10]*o,y=a+c+d,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-h)/g,t[1]=(p-s)/g,t[2]=(l-u)/g):a>c&&a>d?(g=2*Math.sqrt(1+a-c-d),t[3]=(f-h)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(p+s)/g):c>d?(g=2*Math.sqrt(1+c-a-d),t[3]=(p-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=2*Math.sqrt(1+d-a-c),t[3]=(l-u)/g,t[0]=(p+s)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function uD(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=e[3],s=i+i,u=o+o,c=a+a,f=i*s,p=i*u,h=i*c,d=o*u,y=o*c,g=a*c,v=l*s,b=l*u,x=l*c,O=r[0],w=r[1],E=r[2];return t[0]=(1-(d+g))*O,t[1]=(p+x)*O,t[2]=(h-b)*O,t[3]=0,t[4]=(p-x)*w,t[5]=(1-(f+g))*w,t[6]=(y+v)*w,t[7]=0,t[8]=(h+b)*E,t[9]=(y-v)*E,t[10]=(1-(f+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function uF(t,e,n,r,i){var o=e[0],a=e[1],l=e[2],s=e[3],u=o+o,c=a+a,f=l+l,p=o*u,h=o*c,d=o*f,y=a*c,g=a*f,v=l*f,b=s*u,x=s*c,O=s*f,w=r[0],E=r[1],k=r[2],M=i[0],S=i[1],_=i[2],P=(1-(y+v))*w,j=(h+O)*w,A=(d-x)*w,T=(h-O)*E,C=(1-(p+v))*E,N=(g+b)*E,L=(d+x)*k,I=(g-b)*k,R=(1-(p+y))*k;return t[0]=P,t[1]=j,t[2]=A,t[3]=0,t[4]=T,t[5]=C,t[6]=N,t[7]=0,t[8]=L,t[9]=I,t[10]=R,t[11]=0,t[12]=n[0]+M-(P*M+T*S+L*_),t[13]=n[1]+S-(j*M+C*S+I*_),t[14]=n[2]+_-(A*M+N*S+R*_),t[15]=1,t}function uB(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,l=r+r,s=i+i,u=n*a,c=r*a,f=r*l,p=i*a,h=i*l,d=i*s,y=o*a,g=o*l,v=o*s;return t[0]=1-f-d,t[1]=c+v,t[2]=p-g,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=h+y,t[7]=0,t[8]=p+g,t[9]=h-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uz(t,e,n,r,i,o,a){var l=1/(n-e),s=1/(i-r),u=1/(o-a);return t[0]=2*o*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}function uW(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}s3();var u$=uW;function uG(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function uH(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+l),u=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((a-l)*s*.5),t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function uV(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(a+o)*u,t[15]=1,t}var uU=uV;function uq(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=o*u,t[15]=1,t}function uY(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d=e[0],y=e[1],g=e[2],v=r[0],b=r[1],x=r[2],O=n[0],w=n[1],E=n[2];return 1e-6>Math.abs(d-O)&&1e-6>Math.abs(y-w)&&1e-6>Math.abs(g-E)?ud(t):(h=1/Math.hypot(c=d-O,f=y-w,p=g-E),c*=h,f*=h,p*=h,(h=Math.hypot(i=b*p-x*f,o=x*c-v*p,a=v*f-b*c))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),(h=Math.hypot(l=f*a-p*o,s=p*i-c*a,u=c*o-f*i))?(l*=h=1/h,s*=h,u*=h):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=o,t[5]=s,t[6]=f,t[7]=0,t[8]=a,t[9]=u,t[10]=p,t[11]=0,t[12]=-(i*d+o*y+a*g),t[13]=-(l*d+s*y+u*g),t[14]=-(c*d+f*y+p*g),t[15]=1,t)}function uX(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=o-n[1],p=a-n[2],h=c*c+f*f+p*p;h>0&&(c*=h=1/Math.sqrt(h),f*=h,p*=h);var d=s*p-u*f,y=u*c-l*p,g=l*f-s*c;return(h=d*d+y*y+g*g)>0&&(d*=h=1/Math.sqrt(h),y*=h,g*=h),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-p*y,t[5]=p*d-c*g,t[6]=c*y-f*d,t[7]=0,t[8]=c,t[9]=f,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function uK(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function uZ(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function uQ(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function uJ(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function u0(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function u1(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function u2(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function u5(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],p=t[10],h=t[11],d=t[12],y=t[13],g=t[14],v=t[15],b=e[0],x=e[1],O=e[2],w=e[3],E=e[4],k=e[5],M=e[6],S=e[7],_=e[8],P=e[9],j=e[10],A=e[11],T=e[12],C=e[13],N=e[14],L=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-O)<=1e-6*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(l-k)<=1e-6*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-_)<=1e-6*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(f-P)<=1e-6*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(p-j)<=1e-6*Math.max(1,Math.abs(p),Math.abs(j))&&Math.abs(h-A)<=1e-6*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(d-T)<=1e-6*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(y-C)<=1e-6*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-N)<=1e-6*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(v-L)<=1e-6*Math.max(1,Math.abs(v),Math.abs(L))}var u3=ub,u4=uJ;function u6(){var t=new s5(9);return s5!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function u8(){var t=new s5(4);return s5!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function u9(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function u7(){var t=new s5(4);return s5!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function ct(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function ce(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+a*l+i*u-o*s,t[1]=i*c+a*s+o*l-r*u,t[2]=o*c+a*u+r*s-i*l,t[3]=a*c-r*l-i*s-o*u,t}function cn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,l=a?1/a:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=o*l,t}function cr(t,e,n,r){var i=.5*Math.PI/180,o=Math.sin(e*=i),a=Math.cos(e),l=Math.sin(n*=i),s=Math.cos(n),u=Math.sin(r*=i),c=Math.cos(r);return t[0]=o*s*c-a*l*u,t[1]=a*l*c+o*s*u,t[2]=a*s*u-o*l*c,t[3]=a*s*c+o*l*u,t}u8();var ci=function(t,e,n,r){var i=new s5(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},co=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ca=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};s3(),s8(1,0,0),s8(0,1,0),u7(),u7(),u6(),l=new s5(2),s5!=Float32Array&&(l[0]=0,l[1]=0);var cl={}.toString,cs=function(t,e){return cl.call(t)==="[object "+e+"]"},cu=function(t){return cs(t,"Number")};function cc(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var cf=function(t){return null==t},cp=function(t){return cs(t,"String")},ch=function(t,e,n){return t<e?e:t>n?n:t},cd={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function cy(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return cd[e]===t.length-1&&"achlmqstvz".includes(e)})}function cg(t){return cy(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function cm(t){return cg(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var cv={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function cb(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=cd[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,cd[n]))),cd[n]););}function cx(t){return t>=48&&t<=57}function cO(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var cw=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function cE(t){if(cm(t))return[].concat(t);for(var e=function(t){if(cg(t))return[].concat(t);var e=function(t){if(cy(t))return[].concat(t);var e=new cw(t);for(cO(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=cd[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,cO(t),t.data=[],!o)return cb(t);for(;;){for(var a,l=o;l>0;l-=1){if((32|i)==97&&(3===l||4===l)?!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}(t):!function(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,l=!1,s=!1,u=!1;if(o>=n){t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';return}if((43===(e=r.charCodeAt(o))||45===e)&&(o+=1,e=r.charCodeAt(o)),!cx(e)&&46!==e){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';return}if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&cx(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&cx(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;cx(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent';return}if(o+=1,(43===(e=r.charCodeAt(o))||45===e)&&(o+=1),o<n&&cx(r.charCodeAt(o)))for(;o<n&&cx(r.charCodeAt(o));)o+=1;else{t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent';return}}t.index=o,t.param=+t.pathValue.slice(i,o)}(t),t.err.length)return;t.data.push(t.param),cO(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,cO(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}cb(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[s,a[0]+r];break;case"H":e=[s,a[0]+n];break;default:e=[s].concat(a.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(a);var u=e.length;switch(s){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,o=r)}return e})}(t),n=eN({},cv),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,l=t.slice(1).map(Number),s=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,p=2*i-e.qy;e.qx=f,e.qy=p,s=["Q",f,p].concat(l)}else if("Q"===n){var h=l[0],d=l[1];e.qx=h,e.qy=d}return s}(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function ck(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function cM(t,e,n,r,i){var o=cc([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var l=ck([t,e],[n,r],i/o);a={x:l[0],y:l[1]}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function cS(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos((n*i+r*o)/a)}function c_(t,e,n,r,i,o,a,l,s,u){var c,f=u.bbox,p=void 0===f||f,h=u.length,d=void 0===h||h,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k=0,M={x:0,y:0},S=[{x:b,y:x}];v&&s<=0&&(M={x:b,y:x});for(var _=0;_<=g;_+=1){if(b=(c=function(t,e,n,r,i,o,a,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*o+Math.pow(s,3)*l}}(t,e,n,r,i,o,a,l,_/g)).x,x=c.y,p&&S.push({x:b,y:x}),d&&(O+=cc(E,[b,x])),E=[b,x],v&&O>=s&&s>w[2]){var P=(O-s)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return v&&s>=O&&(M={x:a,y:l}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}function cP(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=cE(t),h="number"==typeof e,d=[],y=0,g=0,v=0,b=0,x=[],O=[],w=0,E={x:0,y:0},k=E,M=E,S=E,_=0,P=0,j=p.length;P<j;P+=1)d=(u="M"===(c=(f=p[P])[0]))?d:[y,g].concat(f.slice(1)),u?(k=E={x:v=f[1],y:b=f[2]},w=0,h&&e<.001&&(S=E)):"L"===c?(w=(r=cM(d[0],d[1],d[2],d[3],(e||0)-_)).length,E=r.min,k=r.max,M=r.point):"A"===c?(w=(i=function(t,e,n,r,i,o,a,l,s,u,c){var f,p=c.bbox,h=void 0===p||p,d=c.length,y=void 0===d||d,g=c.sampleSize,v=void 0===g?30:g,b="number"==typeof u,x=t,O=e,w=0,E=[x,O,0],k=[x,O],M=0,S={x:0,y:0},_=[{x:x,y:O}];b&&u<=0&&(S={x:x,y:O});for(var P=0;P<=v;P+=1){if(x=(f=function(t,e,n,r,i,o,a,l,s,u){var c=Math.abs,f=Math.sin,p=Math.cos,h=Math.sqrt,d=Math.PI,y=c(n),g=c(r),v=d/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===y||0===g)return cM(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:p(v)*b+f(v)*x,y:-f(v)*b+p(v)*x},w=Math.pow(O.x,2)/Math.pow(y,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(y*=h(w),g*=h(w));var E=(Math.pow(y,2)*Math.pow(g,2)-Math.pow(y,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2))/(Math.pow(y,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*h(E=E<0?0:E),M={x:k*(y*O.y/g),y:k*(-(g*O.x)/y)},S={x:p(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+p(v)*M.y+(e+s)/2},_={x:(O.x-M.x)/y,y:(O.y-M.y)/g},P=cS({x:1,y:0},_),j=cS(_,{x:(-O.x-M.x)/y,y:(-O.y-M.y)/g});!a&&j>0?j-=2*d:a&&j<0&&(j+=2*d);var A=P+(j%=2*d)*u,T=y*p(A),C=g*f(A);return{x:p(v)*T-f(v)*C+S.x,y:f(v)*T+p(v)*C+S.y}}(t,e,n,r,i,o,a,l,s,P/v)).x,O=f.y,h&&_.push({x:x,y:O}),y&&(w+=cc(k,[x,O])),k=[x,O],b&&w>=u&&u>E[2]){var j=(w-u)/(w-E[2]);S={x:k[0]*(1-j)+E[0]*j,y:k[1]*(1-j)+E[1]*j}}E=[x,O,w]}return b&&u>=w&&(S={x:l,y:s}),{length:w,point:S,min:{x:Math.min.apply(null,_.map(function(t){return t.x})),y:Math.min.apply(null,_.map(function(t){return t.y}))},max:{x:Math.max.apply(null,_.map(function(t){return t.x})),y:Math.max.apply(null,_.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-_,n||{})).length,E=i.min,k=i.max,M=i.point):"C"===c?(w=(o=c_(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-_,n||{})).length,E=o.min,k=o.max,M=o.point):"Q"===c?(w=(a=function(t,e,n,r,i,o,a,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,p=void 0===f||f,h=l.sampleSize,d=void 0===h?10:h,y="number"==typeof a,g=t,v=e,b=0,x=[g,v,0],O=[g,v],w=0,E={x:0,y:0},k=[{x:g,y:v}];y&&a<=0&&(E={x:g,y:v});for(var M=0;M<=d;M+=1){if(g=(s=function(t,e,n,r,i,o,a){var l=1-a;return{x:Math.pow(l,2)*t+2*l*a*n+Math.pow(a,2)*i,y:Math.pow(l,2)*e+2*l*a*r+Math.pow(a,2)*o}}(t,e,n,r,i,o,M/d)).x,v=s.y,c&&k.push({x:g,y:v}),p&&(b+=cc(O,[g,v])),O=[g,v],y&&b>=a&&a>x[2]){var S=(b-a)/(b-x[2]);E={x:O[0]*(1-S)+x[0]*S,y:O[1]*(1-S)+x[1]*S}}x=[g,v,b]}return y&&a>=b&&(E={x:i,y:o}),{length:b,point:E,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-_,n||{})).length,E=a.min,k=a.max,M=a.point):"Z"===c&&(w=(l=cM((d=[y,g,v,b])[0],d[1],d[2],d[3],(e||0)-_)).length,E=l.min,k=l.max,M=l.point),h&&_<e&&_+w>=e&&(S=M),O.push(k),x.push(E),_+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return h&&e>=_&&(S={x:y,y:g}),{length:_,point:S,min:{x:Math.min.apply(null,x.map(function(t){return t.x})),y:Math.min.apply(null,x.map(function(t){return t.y}))},max:{x:Math.max.apply(null,O.map(function(t){return t.x})),y:Math.max.apply(null,O.map(function(t){return t.y}))}}}var cj=function(t){return Array.isArray?Array.isArray(t):cs(t,"Array")},cA=function(t){if(cj(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},cT=function(t){if(cj(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},cC=function(t,e){return(t%e+e)%e};function cN(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var cL=function(t,e,n,r){return ez(ez([],ck([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function cI(t,e){if(void 0===e&&(e=!1),cm(t)&&t.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i=[].concat(t);return e?[i,[]]:i}for(var o=cE(t),a=eN({},cv),l=[],s="",u=o.length,c=[],f=0;f<u;f+=1){o[f]&&(s=o[f][0]),l[f]=s;var p=function(t,e){var n,r,i,o,a,l,s,u,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,b=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,b=r,x=i,O=s,w=u,E=120*Math.PI/180,k=Math.PI/180*(+o||0),M=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=cN(g,v,-k)).x,v=f.y,O=(f=cN(O,w,-k)).x,w=f.y;var S=(g-O)/2,_=(v-w)/2,P=S*S/(b*b)+_*_/(x*x);P>1&&(b*=P=Math.sqrt(P),x*=P);var j=b*b,A=x*x,T=(a===l?-1:1)*Math.sqrt(Math.abs((j*A-j*_*_-A*S*S)/(j*_*_+A*S*S)));d=T*b*_/x+(g+O)/2,y=-(T*x)*S/b+(v+w)/2,p=Math.asin(((v-y)/x*1e9>>0)/1e9),h=Math.asin(((w-y)/x*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=O<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var C=h-p;if(Math.abs(C)>E){var N=h,L=O,I=w;M=t(O=d+b*Math.cos(h=p+E*(l&&h>p?1:-1)),w=y+x*Math.sin(h),b,x,o,0,l,L,I,[h,N,d,y])}C=h-p;var R=Math.cos(p),D=Math.cos(h),F=Math.tan(C/4),B=4/3*b*F,z=4/3*x*F,W=[g,v],$=[g+B*Math.sin(p),v-z*R],G=[O+B*Math.sin(h),w-z*D],H=[O,w];if($[0]=2*W[0]-$[0],$[1]=2*W[1]-$[1],c)return $.concat(G,H,M);M=$.concat(G,H,M);for(var V=[],U=0,q=M.length;U<q;U+=1)V[U]=U%2?cN(M[U-1],M[U],k).y:cN(M[U],M[U+1],k).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*l+2/3*o,a,l]));case"L":return["C"].concat(cL(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(cL(y,g,v,b))}return t}(o[f],a);o[f]=p;var h=f;if(o[h].length>7){o[h].shift();for(var d=o[h],y=h;d.length;)l[h]="A",o.splice(y+=1,0,["C"].concat(d.splice(0,6)));o.splice(h,1)}u=o.length,"Z"===s&&c.push(f),r=(n=o[f]).length,a.x1=+n[r-2],a.y1=+n[r-1],a.x2=+n[r-4]||a.x1,a.y2=+n[r-3]||a.y1}return e?[o,c]:o}function cR(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=e&&n[e-1].slice(-2).concat(t.slice(1)),g=e?c_(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],{bbox:!1}).length:0;return d=e?g?(void 0===r&&(r=.5),i=y.slice(0,2),o=y.slice(2,4),a=y.slice(4,6),l=y.slice(6,8),s=ck(i,o,r),u=ck(o,a,r),c=ck(a,l,r),f=ck(s,u,r),p=ck(u,c,r),h=ck(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function cD(t){var e,n,r;return e=0,n=0,r=0,cI(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l=t.slice(1),s=l[0],u=l[1],c=l[2],f=l[3],p=l[4],h=l[5];return o=e,r=3*((h-(a=n))*(s+c)-(p-o)*(u+f)+u*(o-c)-s*(a-f)+h*(c+o/3)-p*(f+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var cF=function(t){return cs(t,"Boolean")},cB=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},cz=function(t){return void 0===t};function cW(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function c$(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cG(){}var cH="\\s*([+-]?\\d+)\\s*",cV="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cU="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cq=/^#([0-9a-f]{3,8})$/,cY=RegExp("^rgb\\("+[cH,cH,cH]+"\\)$"),cX=RegExp("^rgb\\("+[cU,cU,cU]+"\\)$"),cK=RegExp("^rgba\\("+[cH,cH,cH,cV]+"\\)$"),cZ=RegExp("^rgba\\("+[cU,cU,cU,cV]+"\\)$"),cQ=RegExp("^hsl\\("+[cV,cU,cU]+"\\)$"),cJ=RegExp("^hsla\\("+[cV,cU,cU,cV]+"\\)$"),c0={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function c1(){return this.rgb().formatHex()}function c2(){return this.rgb().formatRgb()}function c5(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=cq.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?c3(e):3===n?new c6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?c4(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?c4(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=cY.exec(t))?new c6(e[1],e[2],e[3],1):(e=cX.exec(t))?new c6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=cK.exec(t))?c4(e[1],e[2],e[3],e[4]):(e=cZ.exec(t))?c4(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=cQ.exec(t))?ft(e[1],e[2]/100,e[3]/100,1):(e=cJ.exec(t))?ft(e[1],e[2]/100,e[3]/100,e[4]):c0.hasOwnProperty(t)?c3(c0[t]):"transparent"===t?new c6(NaN,NaN,NaN,0):null}function c3(t){return new c6(t>>16&255,t>>8&255,255&t,1)}function c4(t,e,n,r){return r<=0&&(t=e=n=NaN),new c6(t,e,n,r)}function c6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function c8(){return"#"+c7(this.r)+c7(this.g)+c7(this.b)}function c9(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function c7(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ft(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fn(t,e,n,r)}function fe(t){if(t instanceof fn)return new fn(t.h,t.s,t.l,t.opacity);if(t instanceof cG||(t=c5(t)),!t)return new fn;if(t instanceof fn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new fn(a,l,s,t.opacity)}function fn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function fi(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function fo(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function fa(t,e){var n=Math.min.apply(Math,ez([],eF(t),!1)),r=Math.min.apply(Math,ez([],eF(e),!1));return{x:n,y:r,width:Math.max.apply(Math,ez([],eF(t),!1))-n,height:Math.max.apply(Math,ez([],eF(e),!1))-r}}function fl(t,e,n,r,i,o){var a=-1,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,f=c/10,p=0;p<=u;p++){var h=p*c,d=[i.apply(void 0,ez([],eF(t.concat([h])),!1)),i.apply(void 0,ez([],eF(e.concat([h])),!1))],y=fo(s[0],s[1],d[0],d[1]);y<l&&(a=h,l=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var p=0;p<32&&!(f<1e-4);p++){var v=a-f,b=a+f,d=[i.apply(void 0,ez([],eF(t.concat([v])),!1)),i.apply(void 0,ez([],eF(e.concat([v])),!1))],y=fo(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,ez([],eF(t.concat([b])),!1)),i.apply(void 0,ez([],eF(e.concat([b])),!1))],O=fo(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,ez([],eF(t.concat([a])),!1)),y:i.apply(void 0,ez([],eF(e.concat([a])),!1))}}cW(cG,c5,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:c1,formatHex:c1,formatHsl:function(){return fe(this).formatHsl()},formatRgb:c2,toString:c2}),cW(c6,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof cG||(i=c5(i)),i)?new c6((i=i.rgb()).r,i.g,i.b,i.opacity):new c6:new c6(t,e,n,null==r?1:r)},c$(cG,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new c6(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new c6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:c8,formatHex:c8,formatRgb:c9,toString:c9})),cW(fn,function(t,e,n,r){return 1==arguments.length?fe(t):new fn(t,e,n,null==r?1:r)},c$(cG,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new fn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new c6(fr(t>=240?t-240:t+120,i,r),fr(t,i,r),fr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function fs(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function fu(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function fc(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(fi(l,0))!fi(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;fi(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(a=Math.sqrt(f)))/(2*l),o=(-s-a)/(2*l),i>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function ff(t,e,n,r,i,o,a,l,s,u,c){var f=fl([t,n,i,a],[e,r,o,l],s,u,fu,c);return fo(f.x,f.y,s,u)}function fp(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function fh(t,e,n){var r=t+n-2*e;if(fi(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}"undefined"!=typeof globalThis||("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self);var fd={exports:{}};fd.exports=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:+(t>e)}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var l=t.children[a];o(i,t.leaf?r(l):l)}return i}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(n,r,i,o,a){for(var l=[r,i];l.length;)if(!((i=l.pop())-(r=l.pop())<=o)){var s=r+Math.ceil((i-r)/o/2)*o;(function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var l=o-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),p=Math.max(i,Math.floor(r-s*c/l+f)),h=Math.min(o,Math.floor(r+(l-s)*c/l+f));e(n,r,p,h,a)}var d=n[r],y=i,g=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<g;){for(t(n,y,g),y++,g--;0>a(n[y],d);)y++;for(;a(n[g],d)>0;)g--}0===a(n[i],d)?t(n,i,g):t(n,++g,o),g<=r&&(i=g+1),r<=g&&(o=g-1)}})(n,s,r||0,i||n.length-1,a||e),l.push(r,s,s,i)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],l=e.leaf?r(a):a;f(t,l)&&(e.leaf?n.push(a):c(t,l)?this._all(a,n):i.push(a))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||c(t,o))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,o=this.data,a=this.toBBox(t),l=[],s=[];o||l.length;){if(o||(o=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),o.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,o.children,e);if(-1!==u){o.children.splice(u,1),l.push(o),this._condense(l);break}}!i&&!o.leaf&&c(o,a)?(l.push(o),s.push(n),n=0,r=o,o=o.children[0]):r?(n++,o=r.children[n],i=!1):o=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var o,a=n-e+1,l=this._maxEntries;if(a<=l)return r(o=p(t.slice(e,n+1)),this.toBBox),o;i||(i=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,i-1))),(o=p([])).leaf=!1,o.height=i;var s=Math.ceil(a/l),u=s*Math.ceil(Math.sqrt(l));h(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);h(t,c,f,s,this.compareMinY);for(var d=c;d<=f;d+=s){var y=Math.min(d+s-1,f);o.children.push(this._build(t,d,y,i-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,l=0;l<e.children.length;l++){var u,c,f=e.children[l],p=s(f),h=(u=t,(Math.max((c=f).maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-p);h<o?(o=h,i=p<i?p:i,a=f):h===o&&p<i&&(i=p,a=f)}e=a||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],a=this._chooseSubtree(r,this.data,e,i);for(a.children.push(t),o(a,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var a=this._chooseSplitIndex(n,o,i),l=p(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,o=1/0,a=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),p=s(u)+s(c);f<o?(o=f,r=l,a=p<a?p:a):f===o&&p<a&&(a=p,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var a=this.toBBox,l=i(t,0,e,a),s=i(t,n-e,n,a),c=u(l)+u(s),f=e;f<n-e;f++){var p=t.children[f];o(l,t.leaf?a(p):p),c+=u(l)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];o(s,t.leaf?a(d):d),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)o(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}();var fy=fd.exports;(s=tG||(tG={})).GROUP="g",s.CIRCLE="circle",s.ELLIPSE="ellipse",s.IMAGE="image",s.RECT="rect",s.LINE="line",s.POLYLINE="polyline",s.POLYGON="polygon",s.TEXT="text",s.PATH="path",s.HTML="html",s.MESH="mesh",(u=tH||(tH={}))[u.ZERO=0]="ZERO",u[u.NEGATIVE_ONE=1]="NEGATIVE_ONE";var fg=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},t.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})},t}(),fm=function(){function t(t){this.clipSpaceNearZ=tH.NEGATIVE_ONE,this.plugins=[],this.config=eN({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return t.prototype.registerPlugin=function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}();function fv(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function fb(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function fx(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function fO(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function fw(t){return void 0===t?0:t>360||t<-360?t%360:t}function fE(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?s4(t):cu(t)?s8(t,e,n):s8(t[0],t[1]||e,t[2]||n)}function fk(t){return Math.PI/180*t}function fM(t){return 180/Math.PI*t}function fS(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,b;return 16===e.length?(i=.5*Math.PI,a=(o=eF(uI(s3(),e),3))[0],l=o[1],s=o[2],(u=Math.asin(-e[2]/a))<i?u>-i?(n=Math.atan2(e[6]/l,e[10]/s),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/l,e[5]/l)):(r=0,n=Math.atan2(e[4]/l,e[5]/l)),t[0]=n,t[1]=u,t[2]=r,t):(c=e[0],f=e[1],p=e[2],h=e[3],v=c*c+(d=f*f)+(y=p*p)+(g=h*h),(b=c*h-f*p)>.499995*v?(t[0]=Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):b<-.499995*v?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):(t[0]=Math.asin(2*(c*p-h*f)),t[1]=Math.atan2(2*(c*h+f*p),1-2*(y+g)),t[2]=Math.atan2(2*(c*f+p*h),1-2*(d+y))),t)}function f_(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var l=fM(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var fP=uu(),fj=uu(),fA=u8(),fT=[s3(),s3(),s3()],fC=s3();function fN(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var fL=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){fv(this.center,t),fv(this.halfExtents,e),fb(this.min,this.center,this.halfExtents),fx(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){fx(this.center,e,t),fO(this.center,this.center,.5),fb(this.halfExtents,e,t),fO(this.halfExtents,this.halfExtents,.5),fv(this.min,t),fv(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this))return void this.setMinMax(e.getMin(),e.getMax());var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,l=a[0],s=a[1],u=a[2],c=r-l,f=r+l,p=i-s,h=i+s,d=o-u,y=o+u,g=e.center,v=g[0],b=g[1],x=g[2],O=e.halfExtents,w=O[0],E=O[1],k=O[2],M=v-w,S=v+w,_=b-E,P=b+E,j=x-k,A=x+k;M<c&&(c=M),S>f&&(f=S),_<p&&(p=_),P>h&&(h=P),j<d&&(d=j),A>y&&(y=A),n[0]=(c+f)*.5,n[1]=(p+h)*.5,n[2]=(d+y)*.5,a[0]=(f-c)*.5,a[1]=(h-p)*.5,a[2]=(y-d)*.5,this.min[0]=c,this.min[1]=p,this.min[2]=d,this.max[0]=f,this.max[1]=h,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],p=e[2],h=e[6],d=e[10],y=Math.abs(a),g=Math.abs(l),v=Math.abs(s),b=Math.abs(u),x=Math.abs(c),O=Math.abs(f),w=Math.abs(p),E=Math.abs(h),k=Math.abs(d);n[0]=e[12]+a*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+p*i[0]+h*i[1]+d*i[2],r[0]=y*o[0]+g*o[1]+v*o[2],r[1]=b*o[0]+x*o[1]+O*o[2],r[2]=w*o[0]+E*o[1]+k*o[2],fb(this.min,n,r),fx(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o,a,l,s=new t,u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),c=(o=[0,0,0],a=this.getMax(),l=e.getMax(),o[0]=Math.min(a[0],l[0]),o[1]=Math.min(a[1],l[1]),o[2]=Math.min(a[2],l[2]),o);return s.setMinMax(u,c),s},t.prototype.getNegativeFarPoint=function(t){if(273===t.pnVertexFlag)return fv([0,0,0],this.min);if(272===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];if(257===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];if(17===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(16===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(1===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];else return[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(t){if(273===t.pnVertexFlag)return fv([0,0,0],this.max);if(272===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];if(257===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];if(17===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(16===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(1===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];else return[this.min[0],this.min[1],this.min[2]]},t}(),fI=function(){function t(t,e){this.distance=t||0,this.normal=e||s8(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return ui(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/s6(this.normal);un(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&uo(n,t,e,i),o},t}();(c=tV||(tV={}))[c.OUTSIDE=0xffffffff]="OUTSIDE",c[c.INSIDE=0]="INSIDE",c[c.INDETERMINATE=0x7fffffff]="INDETERMINATE";var fR=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new fI)}return t.prototype.extractFromVPMatrix=function(t){var e=eF(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];s7(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,s7(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,s7(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,s7(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,s7(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,s7(this.planes[5].normal,o+i,u+s,h+p),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}(),fD=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),fF=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),fB="Method not implemented.",fz="Use document.documentElement instead.";(f=tU||(tU={}))[f.ORBITING=0]="ORBITING",f[f.EXPLORING=1]="EXPLORING",f[f.TRACKING=2]="TRACKING",(p=tq||(tq={}))[p.DEFAULT=0]="DEFAULT",p[p.ROTATIONAL=1]="ROTATIONAL",p[p.TRANSLATIONAL=2]="TRANSLATIONAL",p[p.CINEMATIC=3]="CINEMATIC",(h=tY||(tY={}))[h.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",h[h.PERSPECTIVE=1]="PERSPECTIVE";var fW={UPDATED:"updated"},f$=function(){function t(){this.clipSpaceNearZ=tH.NEGATIVE_ONE,this.eventEmitter=new s2,this.matrix=uu(),this.right=s8(1,0,0),this.up=s8(0,1,0),this.forward=s8(0,0,1),this.position=s8(0,0,1),this.focalPoint=s8(0,0,0),this.distanceVector=s8(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=uu(),this.projectionMatrixInverse=uu(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=tU.EXPLORING,this.trackingMode=tq.DEFAULT,this.projectionMode=tY.PERSPECTIVE,this.frustum=new fR,this.orthoMatrix=uu()}return t.prototype.isOrtho=function(){return this.projectionMode===tY.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(t){this.enableUpdate=t},t.prototype.setType=function(t,e){return this.type=t,this.type===tU.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===tU.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},t.prototype.setTrackingMode=function(t){if(this.type!==tU.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.prototype.getViewTransform=function(){return ug(uu(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=uS(uu(),[t,e,0]);this.jitteredProjectionMatrix=ub(uu(),n,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},t.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.prototype.setNear=function(t){return this.projectionMode===tY.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.prototype.setFar=function(t){return this.projectionMode===tY.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===tY.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===tY.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===tY.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===tY.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=s8(a.x-r,a.y-i,0),s=ui(l,this.right)/s6(this.right),u=ui(l,this.up)/s6(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=tY.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h=this.near*Math.tan(fk(.5*this.fov))/this.zoom,d=2*h,y=this.aspect*d,g=-.5*y;if(null==(p=this.view)?void 0:p.enabled){var v=this.view.fullWidth,b=this.view.fullHeight;g+=this.view.offsetX*y/v,h-=this.view.offsetY*d/b,y*=this.view.width/v,d*=this.view.height/b}return i=this.projectionMatrix,o=g,a=g+y,l=h,s=h-d,u=this.far,this.clipSpaceNearZ===tH.ZERO?(c=-u/(u-t),f=-u*t/(u-t)):(c=-(u+t)/(u-t),f=-2*u*t/(u-t)),i[0]=2*t/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*t/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=c,i[11]=-1,i[12]=0,i[13]=0,i[14]=f,i[15]=0,uO(this.projectionMatrix,this.projectionMatrix,s8(1,-1,1)),ug(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=tY.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,p=u+l,h=c+s,d=c-s;if(null==(a=this.view)?void 0:a.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,p=f+y*this.view.width,h-=g*this.view.offsetY,d=h-g*this.view.height}return this.clipSpaceNearZ===tH.NEGATIVE_ONE?uU(this.projectionMatrix,f,p,d,h,i,o):uq(this.projectionMatrix,f,p,d,h,i,o),uO(this.projectionMatrix,this.projectionMatrix,s8(1,-1,1)),ug(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=fE(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=s8(0,1,0);if(this.focalPoint=fE(t,e,n),this.trackingMode===tq.CINEMATIC){var i=ue(s3(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=fM(Math.asin(e/s6(i))),a=90+fM(Math.atan2(n,t)),l=uu();uk(l,l,fk(a)),uE(l,l,fk(o)),r=ua(s3(),[0,1,0],l)}return ug(this.matrix,uY(uu(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=s3();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},t.prototype.setMinDistance=function(t){return this.minDistance=t,this},t.prototype.setAzimuth=function(t){return this.azimuth=fw(t),this.computeMatrix(),this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=fw(t),this.computeMatrix(),this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=fw(t),this.computeMatrix(),this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var t=ct(u7(),[0,0,1],fk(this.roll));ud(this.matrix);var e=ct(u7(),[1,0,0],fk((this.rotateWorld&&this.type!==tU.TRACKING||this.type===tU.TRACKING?1:-1)*this.elevation)),n=ct(u7(),[0,1,0],fk((this.rotateWorld&&this.type!==tU.TRACKING||this.type===tU.TRACKING?1:-1)*this.azimuth)),r=ce(u7(),n,e);r=ce(u7(),r,t);var i=uB(uu(),r);this.type===tU.ORBITING||this.type===tU.EXPLORING?(ux(this.matrix,this.matrix,this.focalPoint),ub(this.matrix,this.matrix,i),ux(this.matrix,this.matrix,[0,0,this.distance])):this.type===tU.TRACKING&&(ux(this.matrix,this.matrix,this.position),ub(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=fE(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){s9(this.right,fE(u9(u8(),[1,0,0,0],this.matrix))),s9(this.up,fE(u9(u8(),[0,1,0,0],this.matrix))),s9(this.forward,fE(u9(u8(),[0,0,1,0],this.matrix))),ur(this.right,this.right),ur(this.up,this.up),ur(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=s6(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===tU.TRACKING||this.rotateWorld?(this.elevation=fM(Math.asin(e/r)),this.azimuth=fM(Math.atan2(-t,-n))):(this.elevation=-fM(Math.asin(e/r)),this.azimuth=-fM(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){s9(this.position,fE(u9(u8(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a;n=this.distanceVector,r=[0,0,-this.distance],t=u6(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],i=r[0],o=r[1],a=r[2],n[0]=i*m[0]+o*m[3]+a*m[6],n[1]=i*m[1]+o*m[4]+a*m[7],n[2]=i*m[2]+o*m[5]+a*m[8],ut(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=ue(s3(),this.focalPoint,this.position),this.distance=s6(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===tY.ORTHOGRAPHIC){var t=this.position,e=ct(u7(),[0,0,1],-this.roll*Math.PI/180);uF(this.orthoMatrix,e,s8((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),s8(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=ub(uu(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(fW.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(fB)},t.prototype.pan=function(t,e){throw Error(fB)},t.prototype.dolly=function(t){throw Error(fB)},t.prototype.createLandmark=function(t,e){throw Error(fB)},t.prototype.gotoLandmark=function(t,e){throw Error(fB)},t.prototype.cancelLandmarkAnimation=function(){throw Error(fB)},t}();function fG(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return n.cache=a.set(o,l)||a,l};return n.cache=new(fG.Cache||Map),n}fG.Cache=Map,(d=tX||(tX={}))[d.kUnknown=0]="kUnknown",d[d.kNumber=1]="kNumber",d[d.kPercentage=2]="kPercentage",d[d.kEms=3]="kEms",d[d.kPixels=4]="kPixels",d[d.kRems=5]="kRems",d[d.kDegrees=6]="kDegrees",d[d.kRadians=7]="kRadians",d[d.kGradians=8]="kGradians",d[d.kTurns=9]="kTurns",d[d.kMilliseconds=10]="kMilliseconds",d[d.kSeconds=11]="kSeconds",d[d.kInteger=12]="kInteger",(y=tK||(tK={}))[y.kUNumber=0]="kUNumber",y[y.kUPercent=1]="kUPercent",y[y.kULength=2]="kULength",y[y.kUAngle=3]="kUAngle",y[y.kUTime=4]="kUTime",y[y.kUOther=5]="kUOther",(g=tZ||(tZ={}))[g.kAll=0]="kAll",g[g.kNonNegative=1]="kNonNegative",g[g.kInteger=2]="kInteger",g[g.kNonNegativeInteger=3]="kNonNegativeInteger",g[g.kPositiveInteger=4]="kPositiveInteger",(v=tQ||(tQ={}))[v.kYes=0]="kYes",v[v.kNo=1]="kNo",(b=tJ||(tJ={}))[b.kYes=0]="kYes",b[b.kNo=1]="kNo";var fH=[{name:"em",unit_type:tX.kEms},{name:"px",unit_type:tX.kPixels},{name:"deg",unit_type:tX.kDegrees},{name:"rad",unit_type:tX.kRadians},{name:"grad",unit_type:tX.kGradians},{name:"ms",unit_type:tX.kMilliseconds},{name:"s",unit_type:tX.kSeconds},{name:"rem",unit_type:tX.kRems},{name:"turn",unit_type:tX.kTurns}];(x=t0||(t0={}))[x.kUnknownType=0]="kUnknownType",x[x.kUnparsedType=1]="kUnparsedType",x[x.kKeywordType=2]="kKeywordType",x[x.kUnitType=3]="kUnitType",x[x.kSumType=4]="kSumType",x[x.kProductType=5]="kProductType",x[x.kNegateType=6]="kNegateType",x[x.kInvertType=7]="kInvertType",x[x.kMinType=8]="kMinType",x[x.kMaxType=9]="kMaxType",x[x.kClampType=10]="kClampType",x[x.kTransformType=11]="kTransformType",x[x.kPositionType=12]="kPositionType",x[x.kURLImageType=13]="kURLImageType",x[x.kColorType=14]="kColorType",x[x.kUnsupportedColorType=15]="kUnsupportedColorType";var fV=function(t){return t?"number"===t?tX.kNumber:"percent"===t||"%"===t?tX.kPercentage:fH.find(function(e){return e.name===t}).unit_type:tX.kUnknown},fU=function(t){switch(t){case tX.kNumber:case tX.kInteger:return tK.kUNumber;case tX.kPercentage:return tK.kUPercent;case tX.kPixels:return tK.kULength;case tX.kMilliseconds:case tX.kSeconds:return tK.kUTime;case tX.kDegrees:case tX.kRadians:case tX.kGradians:case tX.kTurns:return tK.kUAngle;default:return tK.kUOther}},fq=function(t){switch(t){case tK.kUNumber:return tX.kNumber;case tK.kULength:return tX.kPixels;case tK.kUPercent:return tX.kPercentage;case tK.kUTime:return tX.kSeconds;case tK.kUAngle:return tX.kDegrees;default:return tX.kUnknown}},fY=function(t){var e=1;switch(t){case tX.kPixels:case tX.kDegrees:case tX.kSeconds:break;case tX.kMilliseconds:e=.001;break;case tX.kRadians:e=180/Math.PI;break;case tX.kGradians:e=.9;break;case tX.kTurns:e=360}return e},fX=function(t){switch(t){case tX.kNumber:case tX.kInteger:break;case tX.kPercentage:return"%";case tX.kEms:return"em";case tX.kRems:return"rem";case tX.kPixels:return"px";case tX.kDegrees:return"deg";case tX.kRadians:return"rad";case tX.kGradians:return"grad";case tX.kMilliseconds:return"ms";case tX.kSeconds:return"s";case tX.kTurns:return"turn"}return""},fK=function(){function t(){}return t.isAngle=function(t){return t===tX.kDegrees||t===tX.kRadians||t===tX.kGradians||t===tX.kTurns},t.isLength=function(t){return t>=tX.kEms&&t<tX.kDegrees},t.isRelativeUnit=function(t){return t===tX.kPercentage||t===tX.kEms||t===tX.kRems},t.isTime=function(t){return t===tX.kSeconds||t===tX.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(tQ.kNo,tJ.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=t0.kUnitType&&this.getType()<=t0.kClampType},t}(),fZ=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return eC(e,t),e.prototype.getType=function(){return t0.kColorType},e.prototype.to=function(t){return this},e}(fK);(O=t1||(t1={}))[O.Constant=0]="Constant",O[O.LinearGradient=1]="LinearGradient",O[O.RadialGradient=2]="RadialGradient";var fQ=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return eC(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){return n},e.prototype.getType=function(){return t0.kColorType},e}(fK),fJ=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return eC(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return t0.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(fK),f0=fG(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),f1=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function f2(t){return"function"==typeof t}var f5={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},f3=fG(function(t){var e=f0(t),n=f5[e];return(null==n?void 0:n.alias)||e}),f4=function(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw Error();n="NaN"}else n=t>0?"infinity":"-infinity";return n+e},f6=function(t){return fq(fU(t))},f8=function(t){function e(e,n){void 0===n&&(n=tX.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?fV(n):n,i.value=e,i}return eC(e,t),e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(t){return this.value===t.value&&this.unit===t.unit},e.prototype.getType=function(){return t0.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=f6(this.unit);if(n!==f6(t)||n===tX.kUnknown)return null;var r=fY(this.unit)/fY(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case tX.kUnknown:break;case tX.kInteger:r=Number(this.value).toFixed(0);break;case tX.kNumber:case tX.kPercentage:case tX.kEms:case tX.kRems:case tX.kPixels:case tX.kDegrees:case tX.kRadians:case tX.kGradians:case tX.kMilliseconds:case tX.kSeconds:case tX.kTurns:var i=this.value,o=fX(this.unit);if(i<-999999||i>999999){var a=fX(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?f4(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(fK),f9=new f8(0,"px");new f8(1,"px");var f7=new f8(0,"deg"),pt=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return eC(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(fZ),pe=new fJ("unset"),pn={"":pe,unset:pe,initial:new fJ("initial"),inherit:new fJ("inherit")},pr=function(t){return pn[t]||(pn[t]=new fJ(t)),pn[t]},pi=new pt(0,0,0,0,!0),po=new pt(0,0,0,0),pa=fG(function(t,e,n,r){return new pt(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),pl=function(t,e){return void 0===e&&(e=tX.kNumber),new f8(t,e)},ps=new f8(50,"%");(w=t2||(t2={}))[w.Standard=0]="Standard",(E=t5||(t5={}))[E.ADDED=0]="ADDED",E[E.REMOVED=1]="REMOVED",E[E.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var pu={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fF(0,0,0,0)};(k=t3||(t3={})).COORDINATE="<coordinate>",k.COLOR="<color>",k.PAINT="<paint>",k.NUMBER="<number>",k.ANGLE="<angle>",k.OPACITY_VALUE="<opacity-value>",k.SHADOW_BLUR="<shadow-blur>",k.LENGTH="<length>",k.PERCENTAGE="<percentage>",k.LENGTH_PERCENTAGE="<length> | <percentage>",k.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",k.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",k.LIST_OF_POINTS="<list-of-points>",k.PATH="<path>",k.FILTER="<filter>",k.Z_INDEX="<z-index>",k.OFFSET_DISTANCE="<offset-distance>",k.DEFINED_PATH="<defined-path>",k.MARKER="<marker>",k.TRANSFORM="<transform>",k.TRANSFORM_ORIGIN="<transform-origin>",k.TEXT="<text>",k.TEXT_TRANSFORM="<text-transform>";var pc=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!b(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=b(e);if(i){b(t.startCall)||n("Missing (");var o=r(i);return b(t.endCall)||n("Missing )"),o}}function a(){return v("directional",t.sideOrCorner,1)||v("angular",t.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,b(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t,e,n=((t=v("shape",/^(circle)/i,0))&&(t.style=g()||u()),t||((e=v("shape",/^(ellipse)/i,0))&&(e.style=y()||u()),e));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=f();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return t||n("Missing positioning value"),t}}function f(){var t={x:y(),y:y()};if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);b(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=v("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})||o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})||v("literal",t.literalColor,0);return e||n("Expected color definition"),e.length=y(),e}function d(){return b(t.number)[1]}function y(){return v("%",t.percentageValue,1)||v("position-keyword",t.positionKeywords,1)||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=b(e);if(r)return{type:t,value:r[n]}}function b(t){var n=/^[\n\r\t\s]+/.exec(e);n&&x(n[0].length);var r=t.exec(e);return r&&x(r[0].length),r}function x(t){e=e.substring(t)}return function(t){var i;return e=t,i=p(r),e.length>0&&n("Invalid input not EOF"),i}}(),pf=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,pp=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ph=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,pd=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,py={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},pg=fG(function(t){var e;return pl("angular"===t.type?Number(t.value):py[t.value]||0,"deg")}),pm=fG(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var o=t.value,a=o.x,l=o.y;(null==a?void 0:a.type)==="position-keyword"&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==a?void 0:a.type)==="px"||(null==a?void 0:a.type)==="%"||(null==a?void 0:a.type)==="em")&&(r=null==a?void 0:a.type,e=Number(a.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:pl(e,r),cy:pl(n,i)}}),pv=fG(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return pc(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r,i=t.length;t[i-1].length=null!=(e=t[i-1].length)?e:{type:"%",value:"100"},i>1&&(t[0].length=null!=(n=t[0].length)?n:{type:"%",value:"0"});for(var o=0,a=Number(t[0].length.value),l=1;l<i;l++){var s=null==(r=t[l].length)?void 0:r.value;if(!cf(s)&&!cf(a)){for(var u=1;u<l-o;u++)t[o+u].length={type:"%",value:"".concat(a+(Number(s)-a)*u/(l-o))};o=l,a=Number(s)}}}(r);var i=r.map(function(t){var e,n,r;return{offset:pl(Number(t.length.value),"%"),color:(n=(e=t).type,r=e.value,"hex"===n?"#".concat(r):"literal"===n?r:"rgb"===n?"rgb(".concat(r.join(","),")"):"rgba(".concat(r.join(","),")"))}});if("linear-gradient"===e)return new fQ(t1.LinearGradient,{angle:n?pg(n):f7,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=pm(n[0].at),a=o.cx,l=o.cy,s=void 0;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;s="extent-keyword"===c?pr(f):pl(f,c)}return new fQ(t1.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=pf.exec(t);if(r){var i=(null==(e=r[2].match(pd))?void 0:e.map(function(t){return t.split(":")}))||[];return[new fQ(t1.LinearGradient,{angle:pl(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=eF(t,2),n=e[0],r=e[1];return{offset:pl(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=pp.exec(t);if(n){var r=(null==(e=n[4].match(pd))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:pl(50,"%"),cy:pl(50,"%"),steps:r.map(function(t){var e=eF(t,2),n=e[0],r=e[1];return{offset:pl(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!cp(o))return[new fQ(t1.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=ph.exec(a);if(l){var s=l[1],u=l[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;default:s="no-repeat"}return{image:u,repetition:s}}return null}}});function pb(t){return t&&!!t.image}function px(t){return t&&!cf(t.r)&&!cf(t.g)&&!cf(t.b)}var pO=fG(function(t){if(pb(t))return eN({repetition:"repeat"},t);if(cf(t)&&(t=""),"transparent"===t)return po;"currentColor"===t&&(t="black");var e=pv(t);if(e)return e;var n=c5(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),pa.apply(void 0,ez([],eF(r),!1))});function pw(t,e){if(px(t)&&px(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(ch(e[n],0,255));return e[3]=ch(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function pE(t,e){if(cf(e))return pl(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return pl(Number(e),"px");else if("deg".search(t)>=0)return pl(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U"+t});var r="U("+t.source+")";return n.map(function(t){return pl(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var pk=function(t){return pE(/px/g,t)},pM=fG(pk);fG(function(t){return pE(RegExp("%","g"),t)});var pS=function(t){return cu(t)||isFinite(Number(t))?pl(Number(t)||0,"px"):pE(RegExp("px|%|em|rem","g"),t)},p_=fG(pS),pP=function(t){return pE(RegExp("deg|rad|grad|turn","g"),t)},pj=fG(pP);function pA(t){var e=0;return t.unit===tX.kDegrees?e=t.value:t.unit===tX.kRadians?e=fM(Number(t.value)):t.unit===tX.kTurns&&(e=360*Number(t.value)),e}function pT(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):cp(t)?n=t.split(" ").map(function(t){return Number(t)}):cu(t)&&(n=[t]),2===e)if(1===n.length)return[n[0],n[0]];else return[n[0],n[1]];return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function pC(t){return cp(t)?t.split(" ").map(function(t){return p_(t)}):t.map(function(t){return p_(t.toString())})}function pN(t,e,n){if(0===t.value)return 0;if(t.unit===tX.kPixels)return Number(t.value);if(t.unit===tX.kPercentage&&n){var r=n.nodeName===tG.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var pL=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function pI(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;)if(i=e.index+e[0].length,pL.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return pE(/deg|rad|grad|turn|px|%/g,t)||pO(t)})}),n.lastIndex===t.length)return r;return[]}function pR(t){return t.toString()}var pD=function(t){return"number"==typeof t?pl(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?pl(Number(t)):pl(0)},pF=fG(pD);function pB(t,e){return[t,e,pR]}function pz(t,e){return function(n,r){return[n,r,function(n){return pR(ch(n,t,e))}]}}function pW(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function p$(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=cP(t.parsedStyle.path.absolutePath,void 0,eN(eN({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function pG(t,e){return t[0]===e[0]&&t[1]===e[1]}function pH(t,e){var n,r=t.prePoint,i=t.currentPoint,o=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),l=Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2),s=Math.acos((a+l-(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))/(2*Math.sqrt(a)*Math.sqrt(l)));if(!s||0===Math.sin(s)||(void 0===n&&(n=1e-5),Math.abs(s-0)<n))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(o[1]-i[1],o[0]-i[0])),c=Math.abs(Math.atan2(o[0]-i[0],o[1]-i[1]));return{xExtra:e/2*(1/Math.sin(s/2))*Math.cos(s/2-(u=u>Math.PI/2?Math.PI-u:u))-e/2||0,yExtra:e/2*(1/Math.sin(s/2))*Math.cos((c=c>Math.PI/2?Math.PI-c:c)-s/2)-e/2||0}}function pV(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}fG(function(t){return cp(t)?t.split(" ").map(pF):t.map(pF)});var pU=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},pq=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=fk(r=cC(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var u=(t.x-a.x)/2,c=(t.y-a.y)/2,f={x:Math.cos(s)*u+Math.sin(s)*c,y:-Math.sin(s)*u+Math.cos(s)*c},p=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);p>1&&(e=Math.sqrt(p)*e,n=Math.sqrt(p)*n);var h=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)),d=(i!==o?1:-1)*Math.sqrt(h=h<0?0:h),y={x:d*(e*f.y/n),y:d*(-(n*f.x)/e)},g={x:Math.cos(s)*y.x-Math.sin(s)*y.y+(t.x+a.x)/2,y:Math.sin(s)*y.x+Math.cos(s)*y.y+(t.y+a.y)/2},v={x:(f.x-y.x)/e,y:(f.y-y.y)/n},b=pU({x:1,y:0},v),x=pU(v,{x:(-f.x-y.x)/e,y:(-f.y-y.y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),E=n*Math.sin(O);return{x:Math.cos(s)*w-Math.sin(s)*E+g.x,y:Math.sin(s)*w+Math.cos(s)*E+g.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:g,resultantRx:e,resultantRy:n}};function pY(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,l=void 0===a?0:a,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=pq({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=pq({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=p.x-f.x,d=p.y-f.y,y=Math.sqrt(h*h+d*d);return{x:-h/y,y:-d/y}}function pX(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function pK(t,e){return pX(t)*pX(e)?(t[0]*e[0]+t[1]*e[1])/(pX(t)*pX(e)):1}function pZ(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(pK(t,e))}function pQ(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-a,n-o,u,n,u],["C",n+o,u,s,r-a,s,r],["C",s,r+a,n+o,c,n,c],["C",n-o,c,l,r+a,l,r],["Z"]]}function pJ(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case tG.LINE:var h=t.parsedStyle,d=h.x1,y=h.y1,g=h.x2,v=h.y2;p=[["M",void 0===d?0:d,void 0===y?0:y],["L",void 0===g?0:g,void 0===v?0:v]];break;case tG.CIRCLE:var b=t.parsedStyle,x=b.r,O=void 0===x?0:x,w=b.cx,E=void 0===w?0:w,k=b.cy,M=void 0===k?0:k;p=pQ(O,O,E,M);break;case tG.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;p=pQ(void 0===_?0:_,void 0===P?0:P,E,M);break;case tG.POLYLINE:case tG.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===tG.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case tG.RECT:var T=t.parsedStyle,C=T.width,N=void 0===C?0:C,L=T.height,I=void 0===L?0:L,R=T.x,D=T.y,F=T.radius;p=function(t,e,n,r,i){if(i){var o=eF(i,4),a=o[0],l=o[1],s=o[2],u=o[3],c=t>0?1:-1,f=e>0?1:-1,p=+(c+f!==0);return[["M",c*a+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,p,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,p,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,p,n,e+r-f*u]:null,["L",n,f*a+r],a?["A",a,a,0,0,p,c*a+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(N,I,void 0===R?0:R,void 0===D?0:D,F&&F.some(function(t){return 0!==t})&&F.map(function(t){return ch(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case tG.PATH:p=ez([],eF(t.parsedStyle.path.absolutePath),!1)}if(p.length)return o=p,a=e,u=void 0===(s=(l=t.parsedStyle).defX)?0:s,f=void 0===(c=l.defY)?0:c,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=s8(e[1]-u,e[2]-f,0);a&&ua(r,r,a),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var i=s8(e[1]-u,e[2]-f,0),o=s8(e[3]-u,e[4]-f,0),l=s8(e[5]-u,e[6]-f,0);a&&(ua(i,i,a),ua(o,o,a),ua(l,l,a)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1])}else if("A"===e[0]){var s=s8(e[6]-u,e[7]-f,0);a&&ua(s,s,a),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var i=s8(e[1]-u,e[2]-f,0),o=s8(e[3]-u,e[4]-f,0);a&&(ua(i,i,a),ua(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var p0=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=cE(t)}catch(n){e=cE(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(a=[n[n.length-2],n[n.length-1]]),a&&pG(o,a)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":c.arcParams=function(t,e){var n=e[1],r=e[2],i=cC(fk(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,p=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,h=f*f/(n*n)+p*p/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var d=n*n*(p*p)+r*r*(f*f),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*p/r:0,v=n?-(y*r)*f/n:0,b=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,x=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,O=[(f-g)/n,(p-v)/r],w=[(-1*f-g)/n,(-1*p-v)/r],E=pZ([1,0],O),k=pZ(O,w);return -1>=pK(O,w)&&(k=Math.PI),pK(O,w)>=1&&(k=0),0===a&&k>0&&(k-=2*Math.PI),1===a&&k<0&&(k+=2*Math.PI),{cx:b,cy:x,rx:pG(t,[u,c])?0:n,ry:pG(t,[u,c])?0:r,startAngle:E,endAngle:E+k,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s)}if("Z"===u)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&pG(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint),c.nextPoint=r?[r[r.length-2],r[r.length-1]]:null;var p=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]];else if("Q"===u){var h=[s[1],s[2]];c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]}else if("T"===u){var d=e[l-1],h=pV(d.currentPoint,p);"Q"===d.command?(c.command="Q",c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]):(c.command="TL",c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]])}else if("C"===u){var y=[s[1],s[2]],g=[s[3],s[4]];c.startTangent=[p[0]-y[0],p[1]-y[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[y[0]-g[0],y[1]-g[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[g[0]-y[0],g[1]-y[1]])}else if("S"===u){var d=e[l-1],y=pV(d.currentPoint,p),g=[s[1],s[2]];"C"===d.command?(c.command="C",c.startTangent=[p[0]-y[0],p[1]-y[1]]):(c.command="SQ",c.startTangent=[p[0]-g[0],p[1]-g[1]]),c.endTangent=[n[0]-g[0],n[1]-g[1]]}else if("A"===u){var v=pY(c,0),b=v.x,x=v.y,O=pY(c,1,!1),w=O.x,E=O.y;c.startTangent=[b,x],c.endTangent=[w,E]}e.push(c)}return e}(e),l=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=fh(t,n,i)[0],l=fh(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(fp(t,n,i,a)),void 0!==l&&u.push(fp(e,r,o,l)),fa(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=fc(t,n,i,a),f=fc(e,r,o,l),p=0;p<c.length;p++)s.push(fu(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(fu(e,r,o,l,f[p]));return fa(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d=n*Math.cos(i)*Math.cos(h=c[f])-r*Math.sin(i)*Math.sin(h)+t;d<s&&(s=d),d>u&&(u=d)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,v=-1/0,b=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var x=y+f;o<a?o<x&&x<a&&b.push(x):a<x&&x<o&&b.push(x)}for(var f=0;f<b.length;f++){var O,w=n*Math.sin(i)*Math.cos(O=b[f])+r*Math.cos(i)*Math.sin(O)+e;w<g&&(g=w),w>v&&(v=w)}return{x:s,y:g,width:u-s,height:v-g}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=cA(n),h=cA(r),d=cT(n),y=cT(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=pH(a,0).xExtra:l[0]===d&&(d+=pH(a,e).xExtra),l[1]===h?h-=pH(a,e).yExtra:l[1]===y&&(y+=pH(a,e).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},p1=fG(p0);function p2(t){return cp(t)?p1(t):p0(t)}function p5(t,e,n){var r,i,o,a,l,s,u,c,f,p,h=t.curve,d=e.curve;h&&0!==h.length||(h=cI(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=cI(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=cR(e),o=cR(n),a=i.length,l=o.length,s=i.filter(function(t){return t.l}).length,u=o.filter(function(t){return t.l}).length,c=i.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,f=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,p=r||Math.max(a,l),h=[c,f],d=[p-a,p-l],y=0,g=[i,o].map(function(t,e){return t.l===p?t.map(function(t){return t.s}):t.map(function(t,n){return y=n&&d[e]&&t.l>=h[e],d[e]-=+!!y,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(h,d));var g=cD(y[0])!==cD(y[1])?[["M"].concat((i=(r=y[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):y[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[g,(o=y[1],a=o.length-1,l=[],u=0,(f=(c=o.length)-1,p=o.map(function(t,e){return o.map(function(t,n){var r=e+n;return 0===n||o[r]&&"M"===o[r][0]?["M"].concat(o[r].slice(-2)):(r>=c&&(r-=f),o[r])})})).forEach(function(t,e){o.slice(1).forEach(function(t,n){u+=cc(o[(e+n)%a].slice(-2),g[n%a].slice(-2))}),l[e]=u,u=0}),p[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function p3(t,e){var n,r,i=cp(t)?t.split(" ").map(function(t){var e=eF(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t,o=[],a=0,l=function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=fo(r[0],r[1],i[0],i[1])}return e}(i);i.forEach(function(t,e){if(i[e+1]){var s,u;(n=[0,0])[0]=a/l,s=t[0],u=t[1],r=fo(s,u,i[e+1][0],i[e+1][1]),a+=r,n[1]=a/l,o.push(n)}});var s=Math.min.apply(Math,ez([],eF(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,ez([],eF(i.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:i,totalLength:l,segments:o}}function p4(t,e){return[t.points,e.points,function(t){return t}]}function p6(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function p8(t){return t}var p9={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],p8],matrix3d:["NNNNNNNNNNNNNNNN",p8],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",p6([null,null,new f8(1)]),p8],scalex:["N",p6([null,new f8(1),new f8(1)]),p6([null,new f8(1)])],scaley:["N",p6([new f8(1),null,new f8(1)]),p6([new f8(1),null])],scalez:["N",p6([new f8(1),new f8(1),null])],scale3d:["NNN",p8],skew:["Aa",null,p8],skewx:["A",null,p6([null,f7])],skewy:["A",null,p6([f7,null])],translate:["Tt",p6([null,null,f9]),p8],translatex:["T",p6([null,f9,f9]),p6([null,f9])],translatey:["T",p6([f9,null,f9]),p6([f9,null])],translatez:["L",p6([f9,f9,null])],translate3d:["TTL",p8]};function p7(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=p9[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?f7:pj(t)},N:pF,T:p_,L:pM})[p.toUpperCase()](f):({a:f7,n:u[0],t:f9})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function ht(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=p9[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?f7:pP(t)},N:pD,T:pS,L:pk})[p.toUpperCase()](f):({a:f7,n:u[0],t:f9})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function he(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=fk(pA(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return[Math.cos(i=fk(pA(t.d[0]))),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return[Math.cos(i=fk(pA(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value;var e,n,r,i=fk(pA(t.d[3])),o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var c=fk(pA(t.d[0]));return[1,Math.tan(fk(pA(t.d[1]))),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return[1,0,0,0,Math.tan(i=fk(pA(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=fk(pA(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=pN(t.d[0],0,null)||0,n=pN(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=pN(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=pN(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=pN(t.d[0],0,null)||0,1];case"translate3d":return e=pN(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=pN(t.d[1],0,null)||0,r=pN(t.d[2],0,null)||0,1];case"perspective":var f=pN(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function hn(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function hr(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return!function(t,e,n,r,i,o){if(!(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(fP,t)||(uf(fj,fP),fj[3]=0,fj[7]=0,fj[11]=0,fj[15]=1,1e-8>Math.abs(uv(fj))))){var a,l,s,u,c,f,p,h,d,y,g=fP[3],v=fP[7],b=fP[11],x=fP[12],O=fP[13],w=fP[14],E=fP[15];if(0!==g||0!==v||0!==b){if(fA[0]=g,fA[1]=v,fA[2]=b,fA[3]=E,!ug(fj,fj))return;uy(fj,fj),u9(i,fA,fj)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=fT,l=fP,a[0][0]=l[0],a[0][1]=l[1],a[0][2]=l[2],a[1][0]=l[4],a[1][1]=l[5],a[1][2]=l[6],a[2][0]=l[8],a[2][1]=l[9],a[2][2]=l[10],n[0]=s6(fT[0]),ur(fT[0],fT[0]),r[0]=ui(fT[0],fT[1]),fN(fT[1],fT[1],fT[0],1,-r[0]),n[1]=s6(fT[1]),ur(fT[1],fT[1]),r[0]/=n[1],r[1]=ui(fT[0],fT[2]),fN(fT[2],fT[2],fT[0],1,-r[1]),r[2]=ui(fT[1],fT[2]),fN(fT[2],fT[2],fT[1],1,-r[2]),n[2]=s6(fT[2]),ur(fT[2],fT[2]),r[1]/=n[2],r[2]/=n[2],s=fT[1],u=fT[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],fC[0]=f*y-p*d,fC[1]=p*h-c*y,fC[2]=c*d-f*h,0>ui(fT[0],fC))for(var k=0;k<3;k++)n[k]*=-1,fT[k][0]*=-1,fT[k][1]*=-1,fT[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+fT[0][0]-fT[1][1]-fT[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-fT[0][0]+fT[1][1]-fT[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-fT[0][0]-fT[1][1]+fT[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+fT[0][0]+fT[1][1]+fT[2][2],0)),fT[2][1]>fT[1][2]&&(o[0]=-o[0]),fT[0][2]>fT[2][0]&&(o[1]=-o[1]),fT[1][0]>fT[0][1]&&(o[2]=-o[2])}}(0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(he).reduce(hn),e,n,r,i,o),[[e,n,r,o,i]]}var hi=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=o[s];for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[3][s]+=e[u]*l[u][s];var c=i[0],f=i[1],p=i[2],h=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(f*f+p*p),d[0][1]=2*(c*f-p*h),d[0][2]=2*(c*p+f*h),d[1][0]=2*(c*f+p*h),d[1][1]=1-2*(c*c+p*p),d[1][2]=2*(f*p-c*h),d[2][0]=2*(c*p-f*h),d[2][1]=2*(f*p+c*h),d[2][2]=1-2*(c*c+f*f),l=t(l,d);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],l=t(l,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],l=t(l,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],l=t(l,y));for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[s][u]*=n[s];return 0==(a=l)[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}}();function ho(t){return t.toFixed(6).replace(".000000","")}function ha(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=hr(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=hr(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=ch(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*o)-r*a)+e[l]*a);return i}(n[0][3],r[0][3],t[5]);return hi(t[0],t[1],t[2],e,t[4]).map(ho).join(",")}])}function hl(t){return t.replace(/[xy]/,"")}function hs(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function hu(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(n){var r=t[n],i=r.t,o=r.d,a=+("scale"===i.substring(0,5));e.push({t:i,d:o.map(function(t){return"number"==typeof t?pl(a):pl(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=ha(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u=t[i].t,c=e[i].t,f=t[i].d,p=e[i].d,h=p9[u],d=p9[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=ha([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(u===c)y=u;else if(h[2]&&d[2]&&hl(u)===hl(c))y=hl(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&hs(u)===hs(c))y=hs(u),f=h[1](f),p=d[1](p);else{var s=ha(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var g=[],v=[],b=[],x=0;x<f.length;x++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=f6(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=fX(t.unit)):(f8.isLength(t.unit)||f8.isLength(e.unit))&&(a=pN(t,i,n),l=pN(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(f[x],p[x],n,!1,x);g[x]=s[0],v[x]=s[1],b.push(s[2])}o.push(g),a.push(v),l.push([y,b])}if(r){var O=o;o=a,a=O}return[o,a,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"}).join(" ")}]}var hc=fG(function(t){if(!cp(t))return[pl(t[0]||0,"px"),pl(t[1]||0,"px")];if("text-anchor"===t)return[pl(0,"px"),pl(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[p_(hp(e[0])),p_(hp(e[1]))]}),hf=function(t){if(!cp(t))return[pl(t[0]||0,"px"),pl(t[1]||0,"px")];if("text-anchor"===t)return[pl(0,"px"),pl(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[pS(hp(e[0])),pS(hp(e[1]))]};function hp(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var hh=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:t3.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:t3.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:t3.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:t3.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:t3.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:t3.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:t3.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:t3.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:t3.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:t3.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:t3.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:t3.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:t3.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:t3.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:t3.FILTER},{n:"clipPath",syntax:t3.DEFINED_PATH},{n:"textPath",syntax:t3.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:t3.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===tG.CIRCLE||t===tG.ELLIPSE?"center":t===tG.TEXT?"text-anchor":"left top"},l:!0,syntax:t3.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===tG.CIRCLE||t===tG.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:t3.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:t3.COORDINATE},{n:"cy",int:!0,d:"0",syntax:t3.COORDINATE},{n:"cz",int:!0,d:"0",syntax:t3.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:t3.COORDINATE},{n:"y",int:!0,d:"0",syntax:t3.COORDINATE},{n:"z",int:!0,d:"0",syntax:t3.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:t3.COORDINATE},{n:"y1",int:!0,l:!0,syntax:t3.COORDINATE},{n:"z1",int:!0,l:!0,syntax:t3.COORDINATE},{n:"x2",int:!0,l:!0,syntax:t3.COORDINATE},{n:"y2",int:!0,l:!0,syntax:t3.COORDINATE},{n:"z2",int:!0,l:!0,syntax:t3.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:t3.PATH,p:50},{n:"points",int:!0,l:!0,syntax:t3.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:t3.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:t3.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:t3.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:t3.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:t3.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:t3.NUMBER,d:function(t){return t===tG.PATH||t===tG.POLYGON||t===tG.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:t3.MARKER},{n:"markerEnd",syntax:t3.MARKER},{n:"markerMid",syntax:t3.MARKER},{n:"markerStartOffset",syntax:t3.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:t3.LENGTH,l:!0,int:!0,d:"0"}],hd=hh.filter(function(t){return!!t.l}).map(function(t){return t.n}),hy={},hg=new WeakMap,hm=function(t,e){var n=hg.get(t);return!n||0===n.length||n.includes(e)},hv=function(){function t(t){var e=this;this.runtime=t,hh.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){ez([t.n],eF(t.a||[]),!1).forEach(function(e){hy[e]=t})},t.prototype.unregisterMetadata=function(t){delete hy[t]},t.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},t.prototype.processProperties=function(t,e,n){var r=this;if(void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,e);var i=Object.keys(e),o=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,e);var l=!!n.forceUpdateGeometry;if(!l){for(var s=0;s<hd.length;s++)if(hd[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=pO(e.fill)),e.stroke&&(t.parsedStyle.stroke=pO(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=pO(e.shadowColor)),e.filter&&(t.parsedStyle.filter=pI(e.filter)),cf(e.radius)||(t.parsedStyle.radius=pT(e.radius,4)),cf(e.lineDash)||(t.parsedStyle.lineDash=pT(e.lineDash,2)),e.points&&(t.parsedStyle.points=p3(e.points,t)),""===e.path&&(t.parsedStyle.path=eN({},pu)),e.path&&(t.parsedStyle.path=p2(e.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),e.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},t,null),e.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,t,this.runtime),e.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",a,e.offsetPath,t,this.runtime),e.anchor&&(t.parsedStyle.anchor=pT(e.anchor,2)),e.transform&&(t.parsedStyle.transform=p7(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=hc(e.transformOrigin)),e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(t.nodeName!==tG.CIRCLE&&t.nodeName!==tG.ELLIPSE||cf(e.cx)&&cf(e.cy))&&(t.nodeName!==tG.RECT&&t.nodeName!==tG.IMAGE&&t.nodeName!==tG.GROUP&&t.nodeName!==tG.HTML&&t.nodeName!==tG.TEXT&&t.nodeName!==tG.MESH||cf(e.x)&&cf(e.y)&&cf(e.z))&&(t.nodeName!==tG.LINE||cf(e.x1)&&cf(e.y1)&&cf(e.z1)&&cf(e.x2)&&cf(e.y2)&&cf(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),cf(e.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,i),e.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,i),e.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,i),cf(e.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,i),e.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,i),l&&this.updateGeometry(t);return}var u=n.skipUpdateAttribute,c=n.skipParse,f=n.forceUpdateGeometry,p=n.usedAttributes,h=n.memoize,d=f,y=Object.keys(e);y.forEach(function(n){var r;u||(t.attributes[n]=e[n]),!d&&(null==(r=hy[n])?void 0:r.l)&&(d=!0)}),c||y.forEach(function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t,h)}),(null==p?void 0:p.length)&&(y=Array.from(new Set(y.concat(p)))),y.forEach(function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t,h))}),d&&this.updateGeometry(t),y.forEach(function(e){e in t.parsedStyle&&r.postProcessProperty(e,t,y)}),this.runtime.enableCSSParsing&&t.children.length&&y.forEach(function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(t,e,n,r){var i=hy[t],o=e;if((""===e||cf(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=pr(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=pr(e):s&&(!r&&s.parserUnmemoize?o=s.parserUnmemoize(e,n):s.parser&&(o=s.parser(e,n)))}return o},t.prototype.computeProperty=function(t,e,n,r){var i=hy[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof fJ){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)cf(u)||(e=this.parseProperty(t,f2(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return cf(f)?void this.addUnresolveProperty(n,t):f}}var p=l&&this.getPropertySyntax(l);if(p&&p.calculator){var h=n.parsedStyle[t];a=p.calculator(t,h,e,n,this.runtime)}else a=e instanceof fJ?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=hy[t];if(r&&r.syntax){var i=r.syntax&&this.getPropertySyntax(r.syntax);i&&i.postProcessor&&i.postProcessor(e,n)}},t.prototype.addUnresolveProperty=function(t,e){var n=hg.get(t);n||(hg.set(t,[]),n=hg.get(t)),-1===n.indexOf(e)&&n.push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&hm(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"!==r&&"initial"!==r&&"inherit"!==r)return r}},t.prototype.recalc=function(t){var e=hg.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),hg.delete(t)}},t.prototype.updateGeometry=function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new fL),r.renderBounds||(r.renderBounds=new fL);var i=t.parsedStyle,o=n.update(i,t),a=o.width,l=o.height,s=o.depth,u=o.offsetX,c=o.offsetY,f=o.offsetZ,p=[Math.abs(a)/2,Math.abs(l)/2,(void 0===s?0:s)/2],h=i.stroke,d=i.lineWidth,y=i.increasedLineWidthForHitTesting,g=i.shadowType,v=i.shadowColor,b=i.filter,x=i.transformOrigin,O=i.anchor;e===tG.TEXT?delete i.anchor:e===tG.MESH&&(i.anchor[2]=.5);var w=[(1-2*(O&&O[0]||0))*a/2+(void 0===u?0:u),(1-2*(O&&O[1]||0))*l/2+(void 0===c?0:c),(1-2*(O&&O[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(w,p);var E=e===tG.POLYLINE||e===tG.POLYGON||e===tG.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var k=((d||0)+(y||0))*E;p[0]+=k,p[1]+=k}if(r.renderBounds.update(w,p),v&&g&&"inner"!==g){var M=r.renderBounds,S=M.min,_=M.max,P=i.shadowBlur,j=i.shadowOffsetX,A=i.shadowOffsetY,T=P||0,C=j||0,N=A||0,L=S[0]-T+C,I=_[0]+T+C,R=S[1]-T+N,D=_[1]+T+N;S[0]=Math.min(S[0],L),_[0]=Math.max(_[0],I),S[1]=Math.min(S[1],R),_[1]=Math.max(_[1],D),r.renderBounds.setMinMax(S,_)}(void 0===b?[]:b).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,fx(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+o,p=c[0]+l+o,h=u[1]-l+a,d=c[1]+l+a;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],p),u[1]=Math.min(u[1],h),c[1]=Math.max(c[1],d),r.renderBounds.setMinMax(u,c)}}),O=i.anchor;var F=a<0,B=l<0,z=(F?-1:1)*(x?pN(x[0],0,t):0),W=(B?-1:1)*(x?pN(x[1],1,t):0);z-=(F?-1:1)*(O&&O[0]||0)*r.contentBounds.halfExtents[0]*2,W-=(B?-1:1)*(O&&O[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,W),this.runtime.sceneGraphService.dirtifyToRoot(t)}},t.prototype.updateSizeAttenuation=function(t,e){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/e,t.nodeName===tG.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=t.style.rawR/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===tG.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=hy[t];return!!e&&e.inh},t}(),hb=function(){function t(){this.parser=pj,this.parserUnmemoize=pP,this.parserWithCSSDisabled=null,this.mixer=pB}return t.prototype.calculator=function(t,e,n,r){return pA(n)},t}(),hx=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof fJ&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)}),n},t}(),hO=function(){function t(){this.parser=pO,this.parserWithCSSDisabled=pO,this.mixer=pw}return t.prototype.calculator=function(t,e,n,r){return n instanceof fJ?"none"===n.value?pi:po:n},t}(),hw=function(){function t(){this.parser=pI}return t.prototype.calculator=function(t,e,n){return n instanceof fJ?[]:n},t}();function hE(t){var e=t.parsedStyle.fontSize;return cf(e)?null:e}var hk=function(){function t(){this.parser=p_,this.parserUnmemoize=pS,this.parserWithCSSDisabled=null,this.mixer=pB}return t.prototype.calculator=function(t,e,n,r,i){if(cu(n))return n;if(!f8.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===tX.kPercentage)return 0;if(n.unit===tX.kEms){if(r.parentNode){var l=hE(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===tX.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=hE(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),hM=function(){function t(){this.mixer=pW}return t.prototype.parser=function(t){var e,n=pC(cu(t)?[t]:t);return 1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),hS=function(){function t(){this.mixer=pW}return t.prototype.parser=function(t){var e,n=pC(cu(t)?[t]:t);return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),h_=uu();function hP(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(t){var i=t.t,o=t.d;if("scale"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1];e.scaleLocal(a[0],a[1],1)}else if("scalex"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(a[0],1,1)}else if("scaley"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,a[0],1)}else if("scalez"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,1,a[0])}else if("scale3d"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1,1];e.scaleLocal(a[0],a[1],a[2])}else if("translate"===i){var l=o||[f9,f9];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[f9];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[f9];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[f9];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[f9,f9,f9];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[f7];e.rotateLocal(0,0,pA(s[0]))}else if("rotatex"===i){var s=o||[f7];e.rotateLocal(pA(s[0]),0,0)}else if("rotatey"===i){var s=o||[f7];e.rotateLocal(0,pA(s[0]),0)}else if("rotatez"===i){var s=o||[f7];e.rotateLocal(0,0,pA(s[0]))}else if("rotate3d"===i);else if("skew"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0,0];e.setLocalSkew(fk(u[0]),fk(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(fk(u[0]),e.getLocalSkew()[1])}else if("skewy"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],fk(u[0]))}else if("matrix"===i){var c=eF(o.map(function(t){return t.value}),6),f=c[0],p=c[1],h=c[2],d=c[3],y=c[4],g=c[5];e.setLocalTransform(uh(h_,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(uh.apply(ep,ez([h_],eF(o.map(function(t){return t.value})),!1)),h_[12]+=n,h_[13]+=r,e.setLocalTransform(h_))}),e.getLocalTransform()}var hj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case tG.CIRCLE:case tG.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;cf(a)||(n=a),cf(l)||(r=l),cf(s)||(i=s);break;case tG.LINE:var u=t.parsedStyle,c=u.x1,f=u.x2,p=Math.min(u.y1,u.y2);n=Math.min(c,f),r=p,i=0;break;case tG.RECT:case tG.IMAGE:case tG.GROUP:case tG.HTML:case tG.TEXT:case tG.MESH:cf(t.parsedStyle.x)||(n=t.parsedStyle.x),cf(t.parsedStyle.y)||(r=t.parsedStyle.y),cf(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==tG.PATH&&t.nodeName!==tG.POLYLINE&&t.nodeName!==tG.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!cf(n)||!cf(r)||!cf(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)hP(h,t);else{var d=eF(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(cf(n)?y:n,cf(r)?g:r,cf(i)?v:i)}}},e}(hk),hA=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof fJ&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),hT=function(){function t(){this.mixer=pB,this.parser=pF,this.parserUnmemoize=pD,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),hC=function(){function t(){this.parser=pF,this.parserUnmemoize=pD,this.parserWithCSSDisabled=null,this.mixer=pz(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(n){var i=n.nodeName;if(i===tG.LINE||i===tG.PATH||i===tG.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),hN=function(){function t(){this.parser=pF,this.parserUnmemoize=pD,this.parserWithCSSDisabled=null,this.mixer=pz(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),hL=function(){function t(){this.parser=p2,this.parserWithCSSDisabled=p2,this.mixer=p5}return t.prototype.calculator=function(t,e,n){return n instanceof fJ&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fF(0,0,0,0)}:n},t.prototype.postProcessor=function(t,e){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===tG.PATH&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},t}(),hI=function(){function t(){this.parser=p3,this.mixer=p4}return t.prototype.postProcessor=function(t,e){if((t.nodeName===tG.POLYGON||t.nodeName===tG.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),hR=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.mixer=pz(0,1/0),e}return eC(e,t),e}(hk),hD=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof fJ)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),hF=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),hB={},hz=0,hW="undefined"!=typeof window&&void 0!==window.document;function h$(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function hG(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function hH(t,e){if(hW)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var hV={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},hU="object"==typeof performance&&performance.now?performance:Date;function hq(t,e,n){var r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var hY=1,hX="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},hK=Date.now(),hZ={},hQ=Date.now(),hJ=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-hQ,r=hY++;return hZ[r]=t,Object.keys(hZ).length>1||setTimeout(function(){hQ=e;var t=hZ;hZ={},Object.keys(t).forEach(function(e){return t[e](hX.performance&&"function"==typeof hX.performance.now?hX.performance.now():Date.now()-hK)})},n>16?0:16-n),r},h0=function(t){return"string"!=typeof t?hJ:""===t?hX.requestAnimationFrame:hX[t+"RequestAnimationFrame"]},h1=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!h0(t)}),h2=h0(h1),h5="string"!=typeof h1?function(t){delete hZ[t]}:""===h1?hX.cancelAnimationFrame:hX[h1+"CancelAnimationFrame"]||hX[h1+"CancelRequestAnimationFrame"];hX.requestAnimationFrame=h2,hX.cancelAnimationFrame=h5;var h3=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,ez([],eF(t),!1))}))},t}(),h4=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return eI(this,void 0,void 0,function(){var e,n,r;return eR(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,ez([],eF(t),!1))];case 1:e=i.sent(),n=0,i.label=2;case 2:if(!(n<this.callbacks.length-1))return[3,5];return[4,(0,this.callbacks[n])(e)];case 3:e=i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2,null]}})})},t}(),h6=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(e){e.apply(void 0,t)})},t}(),h8=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,e=this.callbacks[0].apply(void 0,t),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),h9=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],h7=/([\"\'])[^\'\"]+\1/,dt=function(){function t(){this.parser=p7,this.parserUnmemoize=ht,this.parserWithCSSDisabled=ht,this.mixer=hu}return t.prototype.calculator=function(t,e,n,r){return n instanceof fJ?[]:n},t.prototype.postProcessor=function(t){hP(t.parsedStyle.transform,t)},t}(),de=function(){function t(){this.parser=pF,this.parserUnmemoize=pD}return t.prototype.calculator=function(t,e,n,r){return n.value},t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0,r.dirtyReason=t5.Z_INDEX_CHANGED)}},t}(),dn=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),dr=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),di=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.min(n,i);return{width:Math.max(e,r)-o,height:Math.max(n,i)-a}},t}(),da=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),dl=function(){function t(){}return t.prototype.update=function(t){if(t.points&&cj(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,ez([],eF(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,ez([],eF(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,ez([],eF(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,ez([],eF(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),ds=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!cp(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),du=function(){function t(t){this.globalRuntime=t}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,l=t.fontWeight,s=t.fontVariant,u=t.lineWidth;return n&&o&&a&&l&&s&&r&&i&&!cf(u)},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,l=t.textBaseline,s=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var c=((null==(r=null==(n=null==e?void 0:e.ownerDocument)?void 0:n.defaultView)?void 0:r.getConfig())||{}).offscreenCanvas,f=this.globalRuntime.textService.measureText(i,t,c);t.metrics=f;var p=f.width,h=f.height,d=f.lineHeight,y=f.fontProperties,g=[p/2,h/2,0],v=[0,1],b=0;"center"===o||"middle"===o?(b=a/2,v=[.5,1]):("right"===o||"end"===o)&&(b=a,v=[1,1]);var x=0;return"middle"===l?x=g[1]:"top"===l||"hanging"===l?x=2*g[1]:"alphabetic"===l?x=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(x=0),s&&(b+=s),u&&(x+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:b,offsetY:x}},t}(),dc=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new fD,this.page=new fD,this.canvas=new fD,this.viewport=new fD,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw Error(fB)},t}(),df=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.client=new fD,e.movement=new fD,e.offset=new fD,e.global=new fD,e.screen=new fD,e}return eC(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw Error(fB)},e}(dc),dp=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return eC(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(df),dh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(df),dd=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return eC(e,t),e}(dc),dy=function(){function t(){this.emitter=new s2}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=cF(n)&&n||cB(n)&&n.capture,i=cB(n)&&n.once,o=f2(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=eF(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=f2(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null==(t=e[0].target)?void 0:t.name)===l&&c.apply(void 0,ez([],eF(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=cF(n)&&n||cB(n)&&n.capture,i=f2(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=f2(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new dd(t,e))},t.prototype.dispatchEvent=function(t,e){var n,r,i;if(void 0===e&&(e=!1),!t.type)throw Error("DisplayObject cannot propagate events outside of the Federated Events API");if(i=this.document?this:this.defaultView?this.defaultView:null==(n=this.ownerDocument)?void 0:n.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null==(r=t.manager)||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),dg=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return eC(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===tG.TEXT&&(n+=this.style.text);try{for(var r=eD(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===tG.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===tG.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return(void 0===t&&(t={}),this.parentNode)?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw Error(fB)},e.prototype.lookupNamespaceURI=function(t){throw Error(fB)},e.prototype.lookupPrefix=function(t){throw Error(fB)},e.prototype.normalize=function(){throw Error(fB)},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){if(t===this)return 0;for(var n,r=t,i=this,o=[r],a=[i];null!=(n=r.parentNode)?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=o.length>a.length?o:a,s=l===o?a:o;if(l[l.length-s.length]===s[0])return l===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],p=l[u+c];if(p!==f){var h=f.parentNode.childNodes;if(h.indexOf(f)<h.indexOf(p))if(s===o)return e.DOCUMENT_POSITION_PRECEDING;else break;if(l===o)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t,e){void 0===e&&(e=!1),t(this)||(e?this.childNodes.slice():this.childNodes).forEach(function(e){e.forEach(t)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(dy),dm=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new s2,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=uu(),this.tmpVec3=s3(),this.onPointerDown=function(t){var e=n.createPointerEvent(t);if(n.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)n.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var r=2===e.button;n.dispatchEvent(e,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),n.freeEvent(e)},this.onPointerUp=function(t){var e,r=hU.now(),i=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(i,"pointerup"),"touch"===i.pointerType)n.dispatchEvent(i,"touchend");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.dispatchEvent(i,o?"rightup":"mouseup")}var a=n.trackingData(t.pointerId),l=n.findMountedTarget(a.pressTargetsByButton[t.button]),s=l;if(l&&!i.composedPath().includes(l)){for(var u=l;u&&!i.composedPath().includes(u);){if(i.currentTarget=u,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType)n.notifyTarget(i,"touchendoutside");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.notifyTarget(i,o?"rightupoutside":"mouseupoutside")}dg.isNode(u)&&(u=u.parentNode)}delete a.pressTargetsByButton[t.button],s=u}if(s){var c=n.clonePointerEvent(i,"click");c.target=s,c.path=[],a.clicksByButton[t.button]||(a.clicksByButton[t.button]={clickCount:0,target:c.target,timeStamp:r});var f=a.clicksByButton[t.button];f.target===c.target&&r-f.timeStamp<200?++f.clickCount:f.clickCount=1,f.target=c.target,f.timeStamp=r,c.detail=f.clickCount,(null==(e=i.detail)?void 0:e.preventClick)||(n.context.config.useNativeClickEvent||"mouse"!==c.pointerType&&"touch"!==c.pointerType||n.dispatchEvent(c,"click"),n.dispatchEvent(c,"pointertap")),n.freeEvent(c)}n.freeEvent(i)},this.onPointerMove=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),r="mouse"===e.pointerType||"pen"===e.pointerType,i=n.trackingData(t.pointerId),o=n.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",l=n.createPointerEvent(t,a,o||void 0);if(n.dispatchEvent(l,"pointerout"),r&&n.dispatchEvent(l,"mouseout"),!e.composedPath().includes(o)){var s=n.createPointerEvent(t,"pointerleave",o||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),dg.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(l)}if(o!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=n.clonePointerEvent(e,u);n.dispatchEvent(c,"pointerover"),r&&n.dispatchEvent(c,"mouseover");for(var f=o&&dg.isNode(o)&&o.parentNode;f&&f!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var p=n.clonePointerEvent(e,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==o&&p.target!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),dg.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(c)}n.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&n.dispatchEvent(e,"touchmove"),r&&(n.dispatchEvent(e,"mousemove"),n.cursor=n.getCursor(e.target)),i.overTargets=e.composedPath(),n.freeEvent(e)},this.onPointerOut=function(t){var e=n.trackingData(t.pointerId);if(e.overTargets){var r="mouse"===t.pointerType||"pen"===t.pointerType,i=n.findMountedTarget(e.overTargets),o=n.createPointerEvent(t,"pointerout",i||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var a=n.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),dg.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,n.freeEvent(o),n.freeEvent(a)}n.cursor=null},this.onPointerOver=function(t){var e=n.trackingData(t.pointerId),r=n.createPointerEvent(t),i="mouse"===r.pointerType||"pen"===r.pointerType;n.dispatchEvent(r,"pointerover"),i&&n.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(n.cursor=n.getCursor(r.target));var o=n.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),dg.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=r.composedPath(),n.freeEvent(r),n.freeEvent(o)},this.onPointerUpOutside=function(t){var e=n.trackingData(t.pointerId),r=n.findMountedTarget(e.pressTargetsByButton[t.button]),i=n.createPointerEvent(t);if(r){for(var o=r;o;)i.currentTarget=o,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),dg.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}n.freeEvent(i)},this.onWheel=function(t){var e=n.createWheelEvent(t);n.dispatchEvent(e),n.freeEvent(e)},this.onClick=function(t){if(n.context.config.useNativeClickEvent){var e=n.createPointerEvent(t);n.dispatchEvent(e),n.freeEvent(e)}},this.onPointerCancel=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(e),n.freeEvent(e)}}return t.prototype.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new fD(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},t.prototype.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new fD(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},t.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=ub(this.tmpMatrix,s,l),c=s7(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return ua(c,c,u),new fD(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=ub(this.tmpMatrix,n,r),o=s7(this.tmpVec3,t.x,t.y,0);ua(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new fD((o[0]+1)/2*l,(1-(o[1]+1)/2)*s)},t.prototype.setPickHandler=function(t){this.pickHandler=t},t.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},t.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},t.prototype.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,t.currentTarget=this.rootTarget.defaultView||null,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},t.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)dg.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},t.prototype.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(t){var e,n=this.context.contextService.getDomElement(),r=null==(e=t.nativeEvent)?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},t.prototype.getExistedHTML=function(t){var e,n;if(t.nativeEvent.composedPath)try{for(var r=eD(t.nativeEvent.composedPath()),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.nativeHTMLMap.get(o);if(a)return a}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},t.prototype.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(dp);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i);return i.target=null!=n?n:o||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},t.prototype.createWheelEvent=function(t){var e=this.allocateEvent(dh);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e);return e.target=n||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},t.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},t.prototype.cloneWheelEvent=function(t){var e=this.allocateEvent(dh);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},t.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(dp);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},t.prototype.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},t.prototype.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},t.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},t.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=hU.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},t.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},t.prototype.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},t.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},t.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},t.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||dg.isNode(r)&&r.parentNode===e)e=t[n];else break}return e},t.prototype.getCursor=function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=dg.isNode(e)&&e.parentNode}},t}(),dv=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||dT.offscreenCanvas)this.canvas=t||dT.offscreenCanvas,this.context=this.canvas.getContext("2d",eN({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",eN({willReadFrequently:!0},e)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",eN({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}();(M=t4||(t4={}))[M.CAMERA_CHANGED=0]="CAMERA_CHANGED",M[M.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",M[M.NONE=2]="NONE";var db=function(){function t(t,e){this.globalRuntime=t,this.context=e,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new h6,initAsync:new h3,dirtycheck:new h8,cull:new h8,beginFrame:new h6,beforeRender:new h6,render:new h6,afterRender:new h6,endFrame:new h6,destroy:new h6,pick:new h4,pickSync:new h8,pointerDown:new h6,pointerUp:new h6,pointerMove:new h6,pointerOut:new h6,pointerOver:new h6,pointerWheel:new h6,pointerCancel:new h6,click:new h6}}return t.prototype.init=function(t){var e=this,n=eN(eN({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(t4.CAMERA_CHANGED)},t.prototype.render=function(t,e){var n=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var r=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var i=1===r.renderReasons.size&&r.renderReasons.has(t4.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&i);o&&this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),o&&r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e()}},t.prototype.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,s=o?l.dirty||n.dirtyRectangleRenderingDisabled?t:null:t;if(s){var u=a?this.hooks.cull.call(s,this.context.camera):s;u&&(this.stats.rendered++,n.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var c=t.sortable;c.dirty&&(this.sort(t,c),c.dirty=!1,c.dirtyChildren=[],c.dirtyReason=void 0),(c.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},t.prototype.sort=function(t,e){e.sorted&&e.dirtyReason!==t5.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){if(-1===t.childNodes.indexOf(n)){var r=e.sorted.indexOf(n);r>=0&&e.sorted.splice(r,1)}else if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>h$(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(h$)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(t4.DISPLAY_OBJECT_CHANGED)},t}(),dx=/\[\s*(.*)=(.*)\s*\]/,dO=function(){function t(){}return t.prototype.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.find(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):null},t.prototype.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.findAll(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):[]},t.prototype.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(!t.startsWith("["))return e.nodeName===t;var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i},t.prototype.getIdOrClassname=function(t){return t.substring(1)},t.prototype.getAttribute=function(t){var e=t.match(dx),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},t.prototype.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return cf(n)?"":n.toString?n.toString():""},t}(),dw=function(t){function e(e,n,r,i,o,a,l,s){var u=t.call(this,null)||this;return u.relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=o,u.attrChange=a,u.prevParsedValue=l,u.newParsedValue=s,u.type=e,u}return eC(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(dc);function dE(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(S=t6||(t6={})).REPARENT="reparent",S.DESTROY="destroy",S.ATTR_MODIFIED="DOMAttrModified",S.INSERTED="DOMNodeInserted",S.REMOVED="removed",S.MOUNTED="DOMNodeInsertedIntoDocument",S.UNMOUNTED="DOMNodeRemovedFromDocument",S.BOUNDS_CHANGED="bounds-changed",S.CULLED="culled";var dk=new dw(t6.REPARENT,null,"","","",0,"",""),dM=function(){function t(t){var e,n,r,i,o,a,l,s,u,c,f,p,h=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new dd(t6.BOUNDS_CHANGED),this.rotate=(e=u7(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=s8(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=u7();cr(a,n[0],n[1],n[2]);var l=h.getRotation(t);co(e,h.getRotation(t.parentNode)),cn(e,e),ce(a,e,a),ce(o.localRotation,a,l),ca(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=u7(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=s8(e,r,i));var o=t.transformable;cr(n,e[0],e[1],e[2]),ce(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=u7(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=s8(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){cr(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);co(r,cn(u7(),a)),ce(o.localRotation,o.localRotation,r),h.dirtifyLocal(t,o)}else h.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=s8(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;ul(e,s3())||(i=e,o=e,l=(a=E.localRotation)[0],s=a[1],u=a[2],c=a[3],f=o[0],p=o[1],y=s*(d=o[2])-u*p,g=u*f-l*d,v=l*p-s*f,b=s*v-u*g,x=u*y-l*v,O=l*g-s*y,y*=w=2*c,g*=w,v*=w,b*=2,x*=2,O*=2,i[0]=f+y+b,i[1]=p+g+x,i[2]=d+v+O,ut(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=uu(),o=s3(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,ul(h.getPosition(t),o)||(s9(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(uf(i,t.parentNode.transformable.worldTransform),ug(i,i),ua(n.localPosition,o,i)):s9(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=s3(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,ul(n.localPosition,a)||(s9(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=s3(),s=s3(),u=s3(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=s7(s,e,n,r)),ul(e,l)||(ut(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=u7();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=ci(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(co(t,h.getRotation(e.parentNode)),cn(t,t),ce(a.localRotation,t,n),ca(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=uu(),f=s3(),p=ci(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(uF(t.localTransform,t.localRotation,t.localPosition,s8(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=ud(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),ub(t.localTransform,t.localTransform,e)}var n=uF(c,p,f,t.localScale,t.origin);ub(t.localTransform,t.localTransform,n)}else uF(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)})}return t.prototype.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},t.prototype.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},t.prototype.attach=function(t,e,n){var r,i,o=!1;t.parentNode&&(o=t.parentNode!==e,this.detach(t)),t.parentNode=e,cf(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var a=e.sortable;((null==(r=null==a?void 0:a.sorted)?void 0:r.length)||(null==(i=t.style)?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=t5.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(dk)},t.prototype.detach=function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;((null==(e=null==i?void 0:i.sorted)?void 0:e.length)||(null==(n=t.style)?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=t5.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=s8(e,n,r));var i=t.transformable;cr(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=s8(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=s8(e[0],e[1],e[2]||n.localScale[2]);ul(r,n.localScale)||(s9(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=ci(e,n,r,i));var o=t.transformable;co(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new s5(2))[0]=r,i[1]=n,e=i);var r,i,o,a,l=t.transformable;o=l.localSkew,a=e,o[0]=a[0],o[1]=a[1],this.dirtifyLocal(t,l)},t.prototype.dirtifyLocal=function(t,e){!e.localDirtyFlag&&(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},t.prototype.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){n.isConnected&&!e.has(n.entity)&&(t.boundsChangedEvent.detail=r,t.boundsChangedEvent.target=n,n.isMutationObserved?n.dispatchEvent(t.boundsChangedEvent):n.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),e.add(n.entity))};this.pendingEvents.forEach(function(t){var e=eF(t,2),r=e[0],i=e[1];i.affectChildren?r.forEach(function(t){n(t,i)}):n(r,i)}),this.clearPendingEvents(),e.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)dE(n),n=n.parentNode;e&&t.forEach(function(t){dE(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},t.prototype.updateDisplayObjectDependency=function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);a||(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),a[t]||(a[t]=[]),a[t].push(r)}},t.prototype.informDependentDisplayObjects=function(t){var e=this,n=this.displayObjectDependencyMap.get(t);n&&Object.keys(n).forEach(function(t){n[t].forEach(function(n){e.dirtifyToRoot(n,!0),n.dispatchEvent(new dw(t6.ATTR_MODIFIED,n,e,e,t,dw.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return uL(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return uR(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return uI(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalSkew=function(t){return t.transformable.localSkew},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=uL(s3(),e),r=uR(u7(),e),i=uI(s3(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},t.prototype.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(fL.isEmpty(r))return null;var i=n||new fL;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new fL},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach(function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new fL).update(r.center,r.halfExtents))}),e){var a=hG(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new fL),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=uu();t.parentNode.transformable&&(e=ug(uu(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!fL.isEmpty(n)){var r=new fL;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);fL.isEmpty(i)||(r=new fL).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null==(n=null==(e=t.ownerDocument)?void 0:e.defaultView)?void 0:n.getContextService().getBoundingClientRect();if(r){var a=eF(r.getMin(),2),l=a[0],s=a[1],u=eF(r.getMax(),2),c=u[0],f=u[1];return new fF(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new fF((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)});var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?ub(e.worldTransform,r.worldTransform,e.localTransform):uf(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),dS={MetricsString:"|\xc9q\xc5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},d_=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,dP=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),dj=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),dA=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(dj.exec(n)||dP.exec(t)))},this.trimByKinsokuShorui=function(t){var e=ez([],eF(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=dS.MetricsString+dS.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(dS.BaselineSymbol).width),s=dS.HeightMultiplier*l;l=l*dS.BaselineMultiplier|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,l);var u=i.getImageData(0,0,a||1,s||1).data,c=u.length,f=4*a,p=0,h=0,d=!1;for(p=0;p<l;++p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h+=f}for(n.ascent=l-p,h=c-f,d=!1,p=s;p>l;--p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h-=f}return n.descent=p-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,l=e.textBaseline,s=e.textAlign,u=e.letterSpacing,c=e.textPath;e.textPathSide,e.textPathStartOffset;var f=e.leading,p=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=cu(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!h7.test(u)&&0>h9.indexOf(u)&&(u='"'.concat(u,'"')),l[s]=u}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(l.join(","))}(e),d=this.measureFont(h,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);y.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=Array(g.length),b=0;if(c){c.getTotalLength();for(var x=0;x<g.length;x++)var O=y.measureText(g[x]).width+(g[x].length-1)*u}else{for(var x=0;x<g.length;x++){var w=y.measureText(g[x]).width+(g[x].length-1)*u;v[x]=w,b=Math.max(b,w)}var O=b+a,E=o||d.fontSize+a,k=Math.max(E,d.fontSize+a)+(g.length-1)*(E+p);E+=p;var M=0;return"middle"===l?M=-k/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?M=-k:("top"===l||"hanging"===l)&&(M=0),{font:h,width:O,height:k,lines:g,lineWidths:v,lineHeight:E,maxLineWidth:b,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===s||"middle"===s?n-=t/2:("right"===s||"end"===s)&&(n-=t),new fF(n-a/2,M+e*E,t+a,E)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=e.letterSpacing,a=e.maxLines,l=void 0===a?1/0:a,s=e.textOverflow,u=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),c=(void 0===i?0:i)+o,f="";"ellipsis"===s?f="...":s&&"clip"!==s&&(f=s);for(var p=[],h=0,d=0,y={},g=function(t){return r.getFromCache(t,o,y,u)},v=Array.from(f).reduce(function(t,e){return t+g(e)},0),b=Array.from(t),x=0;x<b.length;x++){var O=b[x],w=t[x-1],E=t[x+1],k=g(O);if(this.isNewline(O)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+k>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var M=p[h].length,S=0,_=M,P=0;P<M;P++){var j=g(p[h][P]);if(S+j+v>c){_=P;break}S+=j}p[h]=(p[h]||"").slice(0,_)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(O))continue;this.canBreakInLastChar(O)||(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(O,E)&&(p=this.trimByKinsokuShorui(p),d+=g(w||""))}d+=k,p[h]=(p[h]||"")+O}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&dS.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&dS.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=ez([],eF(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=this.isBreakingSpace(i);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,r+ +!o),e},t.prototype.canBreakInLastChar=function(t){return!(t&&d_.test(t))},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce(function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]},0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!d_.test(t[e]))return e;return -1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),dT={},dC=(P=new ds,j=new dl,(_={})[tG.CIRCLE]=new dn,_[tG.ELLIPSE]=new dr,_[tG.RECT]=P,_[tG.IMAGE]=P,_[tG.GROUP]=P,_[tG.LINE]=new di,_[tG.TEXT]=new du(dT),_[tG.POLYLINE]=j,_[tG.POLYGON]=j,_[tG.PATH]=new da,_[tG.HTML]=null,_[tG.MESH]=null,_),dN=(T=new hO,C=new hk,(A={})[t3.PERCENTAGE]=null,A[t3.NUMBER]=new hT,A[t3.ANGLE]=new hb,A[t3.DEFINED_PATH]=new hx,A[t3.PAINT]=T,A[t3.COLOR]=T,A[t3.FILTER]=new hw,A[t3.LENGTH]=C,A[t3.LENGTH_PERCENTAGE]=C,A[t3.LENGTH_PERCENTAGE_12]=new hM,A[t3.LENGTH_PERCENTAGE_14]=new hS,A[t3.COORDINATE]=new hj,A[t3.OFFSET_DISTANCE]=new hC,A[t3.OPACITY_VALUE]=new hN,A[t3.PATH]=new hL,A[t3.LIST_OF_POINTS]=new hI,A[t3.SHADOW_BLUR]=new hR,A[t3.TEXT]=new hD,A[t3.TEXT_TRANSFORM]=new hF,A[t3.TRANSFORM]=new dt,A[t3.TRANSFORM_ORIGIN]=new function(){this.parser=hc,this.parserUnmemoize=hf},A[t3.Z_INDEX]=new de,A[t3.MARKER]=new hA,A);dT.CameraContribution=f$,dT.AnimationTimeline=null,dT.EasingFunction=null,dT.offscreenCanvasCreator=new dv,dT.sceneGraphSelector=new dO,dT.sceneGraphService=new dM(dT),dT.textService=new dA(dT),dT.geometryUpdaterFactory=dC,dT.CSSPropertySyntaxFactory=dN,dT.styleValueRegistry=new hv(dT),dT.layoutRegistry=null,dT.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},dT.enableCSSParsing=!0,dT.enableDataset=!1,dT.enableStyleSyntax=!0,dT.enableSizeAttenuation=!1;var dL=0,dI=new dw(t6.INSERTED,null,"","","",0,"",""),dR=new dw(t6.REMOVED,null,"","","",0,"",""),dD=new dd(t6.DESTROY),dF=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.entity=dL++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:t2.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle=dT.enableCSSParsing?{anchor:pe,opacity:pe,fillOpacity:pe,strokeOpacity:pe,fill:pe,stroke:pe,transform:pe,transformOrigin:pe,visibility:pe,pointerEvents:pe,lineWidth:pe,lineCap:pe,lineJoin:pe,increasedLineWidthForHitTesting:pe,fontSize:pe,fontFamily:pe,fontStyle:pe,fontWeight:pe,fontVariant:pe,textAlign:pe,textBaseline:pe,textTransform:pe,zIndex:pe,filter:pe,shadowType:pe}:null,e.parsedStyle={},e.attributes={},e}return eC(e,t),Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(t){return""!==t})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw Error(fB)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return dT.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),dI.relatedNode=this,t.dispatchEvent(dI),t},e.prototype.insertBefore=function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.prototype.removeChild=function(t){var e;return dR.relatedNode=this,t.dispatchEvent(dR),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),dT.sceneGraphService.detach(t),t},e.prototype.removeChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}},e.prototype.destroyChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.prototype.matches=function(t){return dT.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return dT.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return dT.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return dT.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return dT.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return dT.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return dT.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(dT.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},e.prototype.find=function(t){var e=this,n=null;return this.forEach(function(r){return!!(r!==e&&t(r))&&(n=r,!0)}),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach(function(e,n){var i;return null==(i=t.parentNode)?void 0:i.appendChild(e,r+n+1)})}},e.prototype.before=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=eF(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,ez([],eF(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,ez([],eF(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){return t.appendChild(e)})},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e,n){return t.appendChild(e,n)})},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,ez([],eF(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(dD),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return dT.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return dT.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return dT.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return dT.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return dT.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){if("symbol"==typeof t)return dT.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=f3(t);return e=this.attributes[n],dT.enableCSSParsing&&cf(e)?null:e},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw Error(fB)},e.prototype.getAttributeNode=function(t){throw Error(fB)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(fB)},e.prototype.hasAttributeNS=function(t,e){throw Error(fB)},e.prototype.removeAttributeNS=function(t,e){throw Error(fB)},e.prototype.removeAttributeNode=function(t){throw Error(fB)},e.prototype.setAttributeNS=function(t,e,n){throw Error(fB)},e.prototype.setAttributeNode=function(t){throw Error(fB)},e.prototype.setAttributeNodeNS=function(t){throw Error(fB)},e.prototype.toggleAttribute=function(t,e){throw Error(fB)},e}(dg);function dB(t){return!!(null==t?void 0:t.nodeName)}var dz=new dw(t6.ATTR_MODIFIED,null,null,null,null,dw.MODIFICATION,null,null),dW={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},d$={anchor:[0,0],fill:pi,stroke:pi,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},dG=eN(eN({},d$),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),dH=ez(ez([],eF(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),dV="data-",dU=function(t){function e(e){var n,r=t.call(this)||this;r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=e,r.config.interactive=null!=(n=r.config.capture)?n:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||tG.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,dT.enableCSSParsing?d$:dG,r.config.initialParsedStyle),dT.enableCSSParsing&&Object.assign(r.attributes,dW),r.initAttributes(r.config.style);var i=dT.globalThis.Proxy?dT.globalThis.Proxy:function(){};return dT.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(dV).concat(f1(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(dV).concat(f1(e)),n),!0}})),dT.enableStyleSyntax&&(r.style=new i({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}return eC(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.prototype.cloneNode=function(t,e){var n=eN({},this.attributes);for(var r in n){var i=n[r];dB(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:n});return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}}),o},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};dT.enableCSSParsing&&(n.usedAttributes=dH);var r={};for(var i in t)r[f3(i)]=t[i];dT.styleValueRegistry.processProperties(this,r,n),e.dirty=!0},e.prototype.setAttribute=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!0);var o=f3(e);!cz(n)&&(r||n!==this.attributes[o])&&(this.internalSetAttribute(o,n,{memoize:i}),t.prototype.setAttribute.call(this,o,n))},e.prototype.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r,i=this.renderable,o=this.attributes[t],a=this.parsedStyle[t];dT.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(dz.relatedNode=this,dz.prevValue=o,dz.newValue=e,dz.attrName=t,dz.prevParsedValue=a,dz.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(dz):(dz.target=this,this.ownerDocument.defaultView.dispatchEvent(dz,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,l)},e.prototype.getBBox=function(){var t=this.getBounds(),e=eF(t.getMin(),2),n=e[0],r=e[1],i=eF(t.getMax(),2);return new fF(n,r,i[0]-n,i[1]-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.setOrigin(this,fE(t,e,n)),this},e.prototype.getOrigin=function(){return dT.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.setPosition(this,fE(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.setLocalPosition(this,fE(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.translate(this,fE(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.translateLocal(this,fE(t,e,n)),this},e.prototype.getPosition=function(){return dT.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return dT.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=fE(t,e,n)),dT.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=fE(t,e,n)),dT.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return dT.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return dT.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return fM(eF(fS(s3(),dT.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return fM(eF(fS(s3(),dT.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return dT.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return dT.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return cf(e)&&cf(n)?dT.sceneGraphService.rotateLocal(this,0,0,t):dT.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return cf(e)&&cf(n)?dT.sceneGraphService.rotate(this,0,0,t):dT.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return dT.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return dT.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return dT.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return dT.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return dT.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return dT.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return dT.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return dT.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return dT.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){dT.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r=null==(n=this.ownerDocument)?void 0:n.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,ez([],eF(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,ez([],eF(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=eF(e,2),i=r[0],o=r[1];return i?cB(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.getMatrix=function(t){var e,n,r,i,o,a,l,s,u=t||this.getWorldTransform(),c=eF(uL(s3(),u),2),f=c[0],p=c[1],h=eF(uI(s3(),u),2),d=h[0],y=h[1],g=uR(u7(),u),v=eF(fS(s3(),g),3),b=v[0],x=v[2];return n=Math.cos(e=b||x),r=Math.sin(e),i=d*n,o=y*r,a=-d*r,l=y*n,(s=new s5(9))[0]=i,s[1]=o,s[2]=0,s[3]=a,s[4]=l,s[5]=0,s[6]=f,s[7]=p,s[8]=1,s},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=eF(f_(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=eF(f_(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e.prototype.show=function(){dT.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){dT.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e}(dF),dq=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;dT.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},dY=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.CIRCLE,style:dT.enableCSSParsing?eN({cx:"",cy:"",r:""},n):eN({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:dT.enableCSSParsing?null:[ps,ps]}},r))||this}return eC(e,t),e}(dU),dX=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,eN({style:dT.enableCSSParsing?eN({x:"",y:""},r):eN({},r)},i))||this).isCustomElement=!0,n}return eC(e,t),e}(dU),dK=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.ELLIPSE,style:dT.enableCSSParsing?eN({cx:"",cy:"",rx:"",ry:""},n):eN({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:dT.enableCSSParsing?null:[ps,ps]}},r))||this}return eC(e,t),e}(dU),dZ=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.GROUP,style:dT.enableCSSParsing?eN({x:"",y:"",width:"",height:""},n):eN({},n)},r))||this}return eC(e,t),e}(dU),dQ=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,eN({type:tG.HTML,style:dT.enableCSSParsing?eN({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):eN({},r)},i))||this).cullable.enable=!1,n}return eC(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var t=this.parsedStyle;return new fF(t.x,t.y,t.width,t.height)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(e=null==(t=this.ownerDocument)?void 0:t.defaultView)?void 0:e.getContextService().getBoundingClientRect(),i=new fL,o=n.left-((null==r?void 0:r.left)||0),a=n.top-((null==r?void 0:r.top)||0);return i.setMinMax([o,a,0],[o+n.width,a+n.height,0]),i},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=ug(uu(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!fL.isEmpty(e)){var n=new fL;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(dU),dJ=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.IMAGE,style:dT.enableCSSParsing?eN({x:"",y:"",img:"",width:"",height:""},n):eN({},n)},r))||this}return eC(e,t),e}(dU),d0=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);(n=t.call(this,eN({type:tG.LINE,style:eN({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i))||this).markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd;return a&&dB(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&dB(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eC(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&dB(r)&&(this.markerStartAngle=0,r.remove()),i&&dB(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&dB(r)&&(this.markerEndAngle=0,r.remove()),i&&dB(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.x1,h=l.x2,d=l.y1,y=l.y2,g=l.defX,v=l.defY,b=t?s:u;if(b&&dB(b)){var x=0;t?(r=p-g,i=d-v,e=h-p,n=y-d,o=c||0,a=this.markerStartAngle):(r=h-g,i=y-v,e=p-h,n=d-y,o=f||0,a=this.markerEndAngle),x=Math.atan2(n,e),b.setLocalEulerAngles(180*x/Math.PI+a),b.setLocalPosition(r+Math.cos(x)*o,i+Math.sin(x)*o)}},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,l=n.defX,s=n.defY,u=fs(r,i,o,a,t),c=u.x,f=u.y,p=ua(s3(),s8(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new fD(p[0],p[1])},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getTotalLength=function(){var t=this.parsedStyle;return fo(t.x1,t.y1,t.x2,t.y2)},e}(dU),d1=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);(n=t.call(this,eN({type:tG.PATH,style:dT.enableCSSParsing?eN({path:"",miterLimit:""},r):eN({},r),initialParsedStyle:dT.enableCSSParsing?null:{miterLimit:4,path:eN({},pu)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&dB(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&dB(s)&&n.placeMarkerMid(s),l&&dB(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eC(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&dB(r)&&(this.markerStartAngle=0,r.remove()),i&&dB(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&dB(r)&&(this.markerEndAngle=0,r.remove()),i&&dB(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.defX,h=l.defY,d=t?s:u;if(d&&dB(d)){var y=0;if(t){var g=eF(this.getStartTangent(),2),v=g[0],b=g[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=c||0,a=this.markerStartAngle}else{var x=eF(this.getEndTangent(),2),v=x[0],b=x[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=f||0,a=this.markerEndAngle}y=Math.atan2(n,e),d.setLocalEulerAngles(180*y/Math.PI+a),d.setLocalPosition(r+Math.cos(y)*o,i+Math.sin(y)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&dB(t))for(var o=1;o<n.length-1;o++){var a=eF(n[o].currentPoint,2),l=a[0],s=a[1],u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l-r,s-i)}},e.prototype.getTotalLength=function(){return p$(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=cP(n.path.absolutePath,t,eN(eN({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=ua(s3(),s8(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new fD(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*p$(this),e)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?n.push([i[0]-o[0],i[1]-o[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n},e}(dU),d2=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);(n=t.call(this,eN({type:tG.POLYGON,style:dT.enableCSSParsing?eN({points:"",miterLimit:"",isClosed:!0},r):eN({},r),initialParsedStyle:dT.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&dB(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&dB(s)&&n.placeMarkerMid(s),l&&dB(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eC(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&dB(r)&&(this.markerStartAngle=0,r.remove()),i&&dB(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&dB(r)&&(this.markerEndAngle=0,r.remove()),i&&dB(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.points,h=l.defX,d=l.defY,y=(p||{}).points,g=t?s:u;if(g&&dB(g)&&y){var v=0;if(r=y[0][0]-h,i=y[0][1]-d,t)e=y[1][0]-y[0][0],n=y[1][1]-y[0][1],o=c||0,a=this.markerStartAngle;else{var b=y.length;this.parsedStyle.isClosed?(e=y[b-1][0]-y[0][0],n=y[b-1][1]-y[0][1]):(r=y[b-1][0]-h,i=y[b-1][1]-d,e=y[b-2][0]-y[b-1][0],n=y[b-2][1]-y[b-1][1]),o=f||0,a=this.markerEndAngle}v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+a),g.setLocalPosition(r+Math.cos(v)*o,i+Math.sin(v)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points,r=e.defX,i=e.defY,o=(n||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&dB(t)&&o)for(var a=1;a<(this.parsedStyle.isClosed?o.length:o.length-1);a++){var l=o[a][0]-r,s=o[a][1]-i,u=1===a?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,s)}},e}(dU),d5=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.POLYLINE,style:dT.enableCSSParsing?eN({points:"",miterLimit:"",isClosed:!1},n):eN({},n),initialParsedStyle:dT.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return eC(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=n.points,a=o.points,l=o.segments,s=0,u=0;l.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=fs(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=ua(s3(),s8(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new fD(h[0],h[1])},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(d2),d3=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.RECT,style:dT.enableCSSParsing?eN({x:"",y:"",width:"",height:"",radius:""},n):eN({},n)},r))||this}return eC(e,t),e}(dU),d4=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.TEXT,style:dT.enableCSSParsing?eN({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},n):eN({fill:"black"},n),initialParsedStyle:dT.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},r))||this}return eC(e,t),e.prototype.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(dU),d6=function(){function t(){this.registry={},this.define(tG.CIRCLE,dY),this.define(tG.ELLIPSE,dK),this.define(tG.RECT,d3),this.define(tG.IMAGE,dJ),this.define(tG.LINE,d0),this.define(tG.GROUP,dZ),this.define(tG.PATH,d1),this.define(tG.POLYGON,d2),this.define(tG.POLYLINE,d5),this.define(tG.TEXT,d4),this.define(tG.HTML,dQ)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),d8=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new dT.AnimationTimeline(e)}catch(t){}var n={};return hh.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=f2(i)?i(tG.GROUP):i)}),e.documentElement=new dZ({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return eC(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?d4:dZ);var r=new n(e);return r.ownerDocument=this,r},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw Error(fB)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},e.prototype.elementsFromBBox=function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach(function(t){var e=t.displayObject,n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)}),o.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),o},e.prototype.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement},e.prototype.elementFromPoint=function(t,e){return eI(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return eR(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,null];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return[2,(f=p.sent().picked)&&f[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f},e.prototype.elementsFromPoint=function(t,e){return eI(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return eR(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,[]];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return(f=p.sent().picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),[2,f]}})})},e.prototype.appendChild=function(t,e){throw Error(fz)},e.prototype.insertBefore=function(t,e){throw Error(fz)},e.prototype.removeChild=function(t,e){throw Error(fz)},e.prototype.replaceChild=function(t,e,n){throw Error(fz)},e.prototype.append=function(){throw Error(fz)},e.prototype.prepend=function(){throw Error(fz)},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(dg),d9=function(){function t(t){this.strategies=t}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,o=this.strategies;r.hooks.cull.tap(t.tag,function(t){if(t){var e=t.cullable;return(0===o.length?e.visible=i.unculledEntities.indexOf(t.entity)>-1:e.visible=o.every(function(e){return e.isVisible(n,t)}),!t.isCulled()&&t.isVisible())?t:(t.dispatchEvent(new dd(t6.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),d7=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new dp(null),this.rootWheelEvent=new dh(null),this.onPointerMove=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&o[0].isNormalized&&(!t.cancelable&&"cancelable"in t||t.preventDefault());try{for(var a=eD(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.context.contextService.getDomElement(),a="outside";try{a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":""}catch(t){}var l=n.normalizeToPointerEvent(t,i);try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=n.bootstrapEvent(n.rootPointerEvent,c,i,t);f.type+=a,n.context.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(t){var e,r,o=n.normalizeToPointerEvent(t,i);try{for(var a=eD(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(t){var e,n,r=t.offsetX,i=t.offsetY,o=t.clientX,a=t.clientY;if(!this.context.config.supportsCSSTransform||cf(r)||cf(i)){var l=this.context.eventService.client2Viewport(new fD(o,a));e=l.x,n=l.y}else e=r,n=i;return{x:e,y:n}},t.prototype.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.getViewportXY(e),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=hV[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.getViewportXY(t),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,l=o.y;return e.canvas.x=a,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=hU.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];cz(i.button)&&(i.button=0),cz(i.buttons)&&(i.buttons=1),cz(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),cz(i.width)&&(i.width=i.radiusX||1),cz(i.height)&&(i.height=i.radiusY||1),cz(i.tiltX)&&(i.tiltX=0),cz(i.tiltY)&&(i.tiltY=0),cz(i.pointerType)&&(i.pointerType="touch"),cz(i.pointerId)&&(i.pointerId=i.identifier||0),cz(i.pressure)&&(i.pressure=i.force||.5),cz(i.twist)&&(i.twist=0),cz(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(cz(t.isPrimary)&&(t.isPrimary=!0),cz(t.width)&&(t.width=1),cz(t.height)&&(t.height=1),cz(t.tiltX)&&(t.tiltX=0),cz(t.tiltY)&&(t.tiltY=0),cz(t.pointerType)&&(t.pointerType="mouse"),cz(t.pointerId)&&(t.pointerId=1),cz(t.pressure)&&(t.pressure=.5),cz(t.twist)&&(t.twist=0),cz(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),yt=[tG.CIRCLE,tG.ELLIPSE,tG.IMAGE,tG.RECT,tG.LINE,tG.POLYLINE,tG.POLYGON,tG.TEXT,tG.PATH,tG.HTML],ye=function(){function t(){}return t.prototype.isVisible=function(t,e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(fL.isEmpty(o))return!1;var a=t.getFrustum(),l=null==(r=null==(n=e.parentNode)?void 0:n.cullable)?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||tV.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==tV.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===tV.OUTSIDE||n===tV.INSIDE)return n;for(var i=tV.INSIDE,o=yt.indexOf(t.nodeName)>-1,a=0,l=r.length;a<l;++a){var s=1<<a;if((n&s)!=0&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,f=u.distance;if(ui(c,e.getPositiveFarPoint(r[a]))+f<0)return tV.OUTSIDE;ui(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),yn=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,o=e.rBushRoot,a=i.root.ownerDocument.defaultView;this.rBush=o;var l=function(t){t.target.renderable.dirty=!0,r.dirtify()},s=function(t){var e=t.detail.affectChildren,i=t.target;e&&i.forEach(function(t){n.toSync.add(t)});for(var o=i;o;)o.renderable&&n.toSync.add(o),o=o.parentElement;r.dirtify()},u=function(t){var e=t.target;dT.enableSizeAttenuation&&dT.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),dT.enableCSSParsing&&dT.styleValueRegistry.recalc(e),dT.sceneGraphService.dirtifyToRoot(e),r.dirtify()},c=function(t){var e=t.target,i=e.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(e),dT.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(t6.MOUNTED,u),a.addEventListener(t6.UNMOUNTED,c),a.addEventListener(t6.ATTR_MODIFIED,l),a.addEventListener(t6.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(t6.MOUNTED,u),a.removeEventListener(t6.UNMOUNTED,c),a.removeEventListener(t6.ATTR_MODIFIED,l),a.removeEventListener(t6.BOUNDS_CHANGED,s),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=eF(i.getMin(),2),a=o[0],l=o[1],s=eF(i.getMax(),2),u=s[0],c=s[1];r.aabb||(r.aabb={}),r.aabb.displayObject=n,r.aabb.minX=a,r.aabb.minY=l,r.aabb.maxX=u,r.aabb.maxY=c}!r.aabb||isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb)}),this.rBush.load(e),e.length=0,this.toSync.clear()},t.tag="Prepare",t}();(N=t8||(t8={})).READY="ready",N.BEFORE_RENDER="beforerender",N.RERENDER="rerender",N.AFTER_RENDER="afterrender",N.BEFORE_DESTROY="beforedestroy",N.AFTER_DESTROY="afterdestroy",N.RESIZE="resize",N.DIRTY_RECTANGLE="dirtyrectangle",N.RENDERER_CHANGED="rendererchanged";var yr=new dd(t6.MOUNTED),yi=new dd(t6.UNMOUNTED),yo=new dd(t8.BEFORE_RENDER),ya=new dd(t8.RERENDER),yl=new dd(t8.AFTER_RENDER),ys=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=dU,i.inited=!1,i.context={},i.document=new d8,i.document.defaultView=i,i.customElements=new d6;var o=e.container,a=e.canvas,l=e.offscreenCanvas,s=e.width,u=e.height,c=e.devicePixelRatio,f=e.renderer,p=e.background,h=e.cursor,d=e.document,y=e.requestAnimationFrame,g=e.cancelAnimationFrame,v=e.createImage,b=e.supportsPointerEvents,x=e.supportsTouchEvents,O=e.supportsCSSTransform,w=e.supportsMutipleCanvasesInOneContainer,E=e.useNativeClickEvent,k=e.alwaysTriggerPointerEventOnCanvas,M=e.isTouchEvent,S=e.isMouseEvent;w||function(t,e){if(t){var n="string"==typeof t?t:t.id||hz++;hB[n]&&hB[n].destroy(),hB[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||hW&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=hH(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=hH(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(dT.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:h2.bind(dT.globalThis),i.cancelAnimationFrame=null!=g?g:h5.bind(dT.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in dT.globalThis,i.supportsPointerEvents=null!=b?b:!!dT.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof dT.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!dT.globalThis.MouseEvent||t instanceof dT.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof dT.globalThis.PointerEvent))},i.initRenderingContext({container:o,canvas:a,width:_,height:P,renderer:f,offscreenCanvas:l,devicePixelRatio:j,cursor:h||"default",background:p||"transparent",createImage:v,document:d,supportsCSSTransform:O,useNativeClickEvent:E,alwaysTriggerPointerEventOnCanvas:k}),i.initDefaultCamera(_,P,f.clipSpaceNearZ),i.initRenderer(f,!0),i}return eC(e,t),e.prototype.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(t,e,n){var r=this,i=new dT.CameraContribution;i.clipSpaceNearZ=n,i.setType(tU.EXPLORING,tq.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(fW.UPDATED,function(){r.context.renderingContext.renderReasons.add(t4.CAMERA_CHANGED),dT.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i},e.prototype.updateSizeAttenuation=function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){dT.styleValueRegistry.updateSizeAttenuation(e,t)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),e||this.dispatchEvent(new dd(t8.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),e||this.dispatchEvent(new dd(t8.AFTER_DESTROY))},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.context.config;n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.context.camera,i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===tY.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new dd(t8.RESIZE,{width:t,height:e}))},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var t=this;this.dispatchEvent(yo),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(ya)}),this.dispatchEvent(yl)},e.prototype.run=function(){var t=this,e=function(){t.render(),t.frameId=t.requestAnimationFrame(e)};e()},e.prototype.initRenderer=function(t,e){var n=this;if(void 0===e&&(e=!1),!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new fy,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new d7,new yn,new d9([new ye])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(eN(eN({},dT),this.context)),this.context.renderingService=new db(dT,this.context),this.context.eventService=new dm(dT,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,e,!0)):this.context.contextService.initAsync().then(function(){n.initRenderingService(t,e)})},e.prototype.initRenderingService=function(t,e,n){var r=this;void 0===e&&(e=!1),void 0===n&&(n=!1),this.context.renderingService.init(function(){r.inited=!0,e?(n?r.requestAnimationFrame(function(){r.dispatchEvent(new dd(t8.READY))}):r.dispatchEvent(new dd(t8.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new dd(t8.RENDERER_CHANGED)),e||r.getRoot().forEach(function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}),r.mountChildren(r.getRoot()),t.getConfig().enableAutoRendering&&r.run()})},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(dT)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),ez([],eF(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(dT)}),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(yi):(yi.target=t,this.dispatchEvent(yi,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.prototype.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(yr):(yr.target=t,this.dispatchEvent(yr,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(dy),yu={}.toString,yc=function(t,e){return yu.call(t)==="[object "+e+"]"},yf=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.landmarks=[],e}return eC(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=fw(e),this.relAzimuth=fw(t),this.relRoll=fw(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===tU.EXPLORING){var r=ct(u7(),[1,0,0],fk((this.rotateWorld?1:-1)*this.relElevation)),i=ct(u7(),[0,1,0],fk((this.rotateWorld?1:-1)*this.relAzimuth)),o=ct(u7(),[0,0,1],fk(this.relRoll)),a=ce(u7(),i,r);a=ce(u7(),a,o);var l=uB(uu(),a);ux(this.matrix,this.matrix,[0,0,-this.distance]),ub(this.matrix,this.matrix,l),ux(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=fE(t,e,0),r=s4(this.position);return ut(r,r,un(s3(),this.right,n[0])),ut(r,r,un(s3(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=s4(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getDistance():this.type===tU.TRACKING&&ut(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n,r,i,o,a=e.position,l=void 0===a?this.position:a,s=e.focalPoint,u=void 0===s?this.focalPoint:s,c=e.roll,f=e.zoom,p=new dT.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!=(n=l[1])?n:this.position[1],null!=(r=l[2])?r:this.position[2]),p.setFocalPoint(u[0],null!=(i=u[1])?i:this.focalPoint[1],null!=(o=u[2])?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:uc(p.getWorldTransform()),right:s4(p.right),up:s4(p.up),forward:s4(p.forward),position:s4(p.getPosition()),focalPoint:s4(p.getFocalPoint()),distanceVector:s4(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(h),h},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=yc(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=yc(e,"Number")?{duration:e}:e,a=o.easing,l=o.duration,s=void 0===l?100:l,u=o.easingFunction,c=o.onfinish,f=void 0===c?void 0:c,p=o.onframe,h=void 0===p?void 0:p;if(0===s){this.syncFromLandmark(r),f&&f();return}this.cancelLandmarkAnimation();var d=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,b=(void 0===u?void 0:u)||dT.EasingFunction(void 0===a?"linear":a),x=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},O=function(t){void 0===i&&(i=t);var e=t-i;if(e>s)return void x();var r=b(e/s),o=s3(),a=s3(),l=1,u=0;if(uo(o,n.focalPoint,y,r),uo(a,n.position,d,r),u=n.roll*(1-r)+v*r,l=n.zoom*(1-r)+g*r,n.setFocalPoint(o),n.setPosition(a),n.setRoll(u),n.setZoom(l),us(o,y)+us(a,d)<=.01&&void 0==g&&void 0==v)return void x();n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(O))};this.canvas.requestAnimationFrame(O)}},e.prototype.syncFromLandmark=function(t){this.matrix=uf(this.matrix,t.matrix),this.right=s9(this.right,t.right),this.up=s9(this.up,t.up),this.forward=s9(this.forward,t.forward),this.position=s9(this.position,t.position),this.focalPoint=s9(this.focalPoint,t.focalPoint),this.distanceVector=s9(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(f$);dT.CameraContribution=yf;var yp=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),yh=0,yd=new WeakMap,yy=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:t7&&(t===t7||t===t9)?t7:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,yb.push(e),yv||(yv=!0,void 0!==dT.globalThis?dT.globalThis.setTimeout(yx):yx())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(t6.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(t6.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(t6.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(t6.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(t6.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(t6.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=yd.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},t.prototype.handleEvent=function(t){switch(t.stopImmediatePropagation(),t.type){case t6.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=t9=new yp("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===dw.ADDITION?null:t.prevValue;ym(n,function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i))){var n;return t.attributeOldValue?(n=o,t7||((t7=yp.copy(t9)).oldValue=n),t7):e}});break;case t6.REMOVED:case t6.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===t6.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=t9=new yp("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,ym(n,function(t){if(t.childList)return e})}t9=t7=void 0},t}();function yg(t){this.callback=t,this.nodes=[],this.records=[],this.uid=yh++}function ym(t,e){for(var n=t;n;n=n.parentNode){var r=yd.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var l=e(a);l&&o.enqueue(l)}}}}yg.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw SyntaxError();var n,r=yd.get(t);r||yd.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new yy(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},yg.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=yd.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}},this),this.records=[]},yg.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var yv=!1,yb=[];function yx(){yv=!1;var t=yb;yb=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();t.nodes.forEach(function(e){var n=yd.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&yx()}var yO=function(t,e,n){return t<e?e:t>n?n:t},yw={}.toString,yE=function(t){return"[object Number]"===yw.call(t)},yk=function(t){return null==t},yM=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return eC(e,t),e}(dc),yS=0,y_=function(){function t(t,e){var n;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(yS++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(n=this.effect)?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;isNaN(t=Number(t))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),!isNaN(t=Number(t))&&(this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises())))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var t=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var e=new yM(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw Error(fB)},t.prototype.addEventListener=function(t,e,n){throw Error(fB)},t.prototype.removeEventListener=function(t,e,n){throw Error(fB)},t.prototype.dispatchEvent=function(t){throw Error(fB)},t.prototype.commitStyles=function(){throw Error(fB)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null==(t=this.effect)?void 0:t.update(-1)):this._inEffect=!!(null==(e=this.effect)?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new yM(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new yM(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),yP="function"==typeof Float32Array,yj=function(t,e){return 1-3*e+3*t},yA=function(t,e){return 3*e-6*t},yT=function(t){return 3*t},yC=function(t,e,n){return((yj(e,n)*t+yA(e,n))*t+yT(e))*t},yN=function(t,e,n){return 3*yj(e,n)*t*t+2*yA(e,n)*t+yT(e)},yL=function(t,e,n,r,i){var o,a,l=0;do(o=yC(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},yI=function(t,e,n,r){for(var i=0;i<4;++i){var o=yN(e,n,r);if(0===o)break;var a=yC(e,n,r)-t;e-=a/o}return e},yR=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=yP?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=yC(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;var a=r+(e-i[--o])/(i[o+1]-i[o])*.1,l=yN(a,t,n);return l>=.001?yI(e,a,t,n):0===l?a:yL(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:yC(a(t),e,r)}},yD=function(t){return Math.pow(t,2)},yF=function(t){return Math.pow(t,3)},yB=function(t){return Math.pow(t,4)},yz=function(t){return Math.pow(t,5)},yW=function(t){return Math.pow(t,6)},y$=function(t){return 1-Math.cos(t*Math.PI/2)},yG=function(t){return 1-Math.sqrt(1-t*t)},yH=function(t){return t*t*(3*t-2)},yV=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},yU=function(t,e){void 0===e&&(e=[]);var n=eF(e,2),r=n[0],i=n[1],o=yO(Number(void 0===r?1:r),1,10),a=yO(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},yq=function(t,e,n){void 0===e&&(e=[]);var r=eF(e,4),i=r[0],o=void 0===i?1:i,a=r[1],l=void 0===a?100:a,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;o=yO(o,.1,1e3),l=yO(l,.1,1e3),u=yO(u,.1,1e3),f=yO(f,.1,1e3);var p=Math.sqrt(l/o),h=u/(2*Math.sqrt(l*o)),d=h<1?p*Math.sqrt(1-h*h):0,y=h<1?(h*p+-f)/d:-f+p,g=n?n*t/1e3:t;return(g=h<1?Math.exp(-g*h*p)*(+Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},yY=function(t,e){void 0===e&&(e=[]);var n=eF(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(yO(t,0,1)*i)/i},yX=function(t,e){void 0===e&&(e=[]);var n=eF(e,4);return yR(n[0],n[1],n[2],n[3])(t)},yK=yR(.42,0,1,1),yZ=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},yQ=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},yJ=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},y0={steps:yY,"step-start":function(t){return yY(t,[1,"start"])},"step-end":function(t){return yY(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":yX,ease:function(t){return yX(t,[.25,.1,.25,1])},in:yK,out:yZ(yK),"in-out":yQ(yK),"out-in":yJ(yK),"in-quad":yD,"out-quad":yZ(yD),"in-out-quad":yQ(yD),"out-in-quad":yJ(yD),"in-cubic":yF,"out-cubic":yZ(yF),"in-out-cubic":yQ(yF),"out-in-cubic":yJ(yF),"in-quart":yB,"out-quart":yZ(yB),"in-out-quart":yQ(yB),"out-in-quart":yJ(yB),"in-quint":yz,"out-quint":yZ(yz),"in-out-quint":yQ(yz),"out-in-quint":yJ(yz),"in-expo":yW,"out-expo":yZ(yW),"in-out-expo":yQ(yW),"out-in-expo":yJ(yW),"in-sine":y$,"out-sine":yZ(y$),"in-out-sine":yQ(y$),"out-in-sine":yJ(y$),"in-circ":yG,"out-circ":yZ(yG),"in-out-circ":yQ(yG),"out-in-circ":yJ(yG),"in-back":yH,"out-back":yZ(yH),"in-out-back":yQ(yH),"out-in-back":yJ(yH),"in-bounce":yV,"out-bounce":yZ(yV),"in-out-bounce":yQ(yV),"out-in-bounce":yJ(yV),"in-elastic":yU,"out-elastic":yZ(yU),"in-out-elastic":yQ(yU),"out-in-elastic":yJ(yU),spring:yq,"spring-in":yq,"spring-out":yZ(yq),"spring-in-out":yQ(yq),"spring-out-in":yJ(yq)},y1=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},y2=function(t){return t};function y5(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var y3="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",y4=RegExp("cubic-bezier\\("+y3+","+y3+","+y3+","+y3+"\\)"),y6=/steps\(\s*(\d+)\s*\)/,y8=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function y9(t){var e=y4.exec(t);if(e)return yR.apply(void 0,ez([],eF(e.slice(1).map(Number)),!1));var n=y6.exec(t);if(n)return y5(Number(n[1]),0);var r=y8.exec(t);return r?y5(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):y0[y1(t)]||y0.linear}function y7(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var gt=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,o=n.length,a=Math.max(i,o),l=[],s=0;s<a;s++)l.push(t(e[s<i?s:i-1],n[s<o?s:o-1],r));return l}throw Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r);return!dT.enableCSSParsing&&yE(i)?i:n(i)}},ge=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=y2,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=y9(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function gn(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(yk(a))r=!1;else{if(a<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!=(t=n[r-1].offset)?t:1),r>1&&(n[0].computedOffset=Number(null!=(e=n[0].offset)?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!yk(l)&&!yk(o)){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(Number(l)-o)*s/(a-i);i=a,o=Number(l)}}}(),n}var gr="backwards|forwards|both|none".split("|"),gi="reverse|alternate|alternate-reverse".split("|"),go=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=("number"==typeof(r=null!=(a=n)?a:{duration:"auto"})&&(r=isNaN(r)?{duration:"auto"}:{duration:r}),l=a=r,s=new ge,"number"!=typeof l||isNaN(l)?void 0!==l&&Object.keys(l).forEach(function(t){void 0!==l[t]&&null!==l[t]&&"auto"!==l[t]&&(("number"==typeof s[t]||"duration"===t)&&("number"!=typeof l[t]||isNaN(l[t]))||"fill"===t&&-1===gr.indexOf(l[t])||("direction"!==t||-1!==gi.indexOf(l[t]))&&(s[t]=l[t]))}):s.duration=l,s),this.timing.effect=this,this.timing.activeDuration=Math.abs((0===(i=u=this.timing).duration||0===i.iterations?0:("auto"===i.duration?0:Number(i.duration))*(null!=(o=i.iterations)?o:1))/(u.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=gn(e,this.timing),this.interpolations=(c=this.normalizedKeyframes,f=this.timing,p=this.target,d=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,l=o+1,s=i[a].computedOffset,u=i[l].computedOffset,c=s,f=u;0===o&&(c=-1/0,0===u&&(l=a)),o===i.length-2&&(f=1/0,1===s&&(a=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:function(t,e,n,r){var i=hy[t];if(i&&i.syntax&&i.int){var o=dT.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(dT.enableCSSParsing){var s=dT.styleValueRegistry.parseProperty(t,e,r,!1),u=dT.styleValueRegistry.parseProperty(t,n,r,!1);a=dT.styleValueRegistry.computeProperty(t,s,r,!1),l=dT.styleValueRegistry.computeProperty(t,u,r,!1)}else{var c=o.parserWithCSSDisabled;a=c?c(e,r):e,l=c?c(n,r):n}var f=o.mixer(a,l,r);if(f){var p=gt.apply(void 0,ez([],eF(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return gt(!1,!0,function(t){return t?n:e})}(r,i[a].value,i[l].value,e)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(h=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(y7(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:y9(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(c,f),p),function(t,e){if(null!==e)d.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.setAttribute(n.property,n.interpolation(o),!1,!1)});else for(var n in h)y7(n)&&t.setAttribute(n,null)});var g=dT.globalThis.Proxy;this.computedTiming=g?new g(this.timing,{get:function(t,e){if("duration"===e)return"auto"===t.duration?0:t.duration;if("fill"===e)return"auto"===t.fill?"none":t.fill;if("localTime"===e)return y.animation&&y.animation.currentTime||null;if("currentIteration"===e)return y.animation&&"running"===y.animation.playState?t.currentIteration||0:null;if("progress"===e)return y.animation&&"running"===y.animation.playState?t.progress||0:null;return t[e]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,o,a,l,s,u,c=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),f=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,c,n.delay);if(null===f)return null;var p="auto"===n.duration?0:n.duration,h=(r=n.iterations,o=i=n.iterationStart,0===p?1!==c&&(o+=r):o+=f/p,o),d=(a=n.iterationStart,l=n.iterations,0==(s=h===1/0?a%1:h%1)&&2===c&&0!==l&&(0!==f||0===p)&&(s=1),s),y=(u=n.iterations,2===c&&u===1/0?1/0:1===d?Math.floor(h)-1:Math.floor(h)),g=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,y,d);return n.currentIteration=y,n.progress=g,n.easingFunction(g)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=gn(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})},t}();function ga(t,e){return Number(t.id)-Number(e.id)}var gl=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(ga),e.animations=e.tick(t,!0,e.animations)[0],n.forEach(function(e){e[1](t)}),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,e,n){var r=new y_(new go(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(ga),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,ez([],eF(a),!1)),(i=this.pendingEffects).push.apply(i,ez([],eF(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();function gs(t){return new gu([t],null,t,t.ownerDocument)}dT.EasingFunction=y9,dT.AnimationTimeline=gl;class gu{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){return new gu("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new gu(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new gu([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new gu(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new gu(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new gu([i],null,this._parent,this._document);let o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new gu([o],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],o=new Set(this._elements),a=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=lj(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let p=t[f],h=e(p,f),d=n(p,f);if(s.has(h)){let t=s.get(h);t.__data__=p,t.__facet__=!1,i.push(t),o.delete(t),s.delete(h)}else if(u.has(h)){let t=u.get(h);t.__data__=p,t.__facet__=!0,i.push(t),u.delete(h)}else if(c.has(h)){let t=c.get(h);for(let e of(a.push([p,t]),t))o.delete(e);c.delete(h)}else if(s.has(d)){let t=s.get(d);t.__toData__?t.__toData__.push(p):t.__toData__=[p],l.add(t),o.delete(t)}else r.push(p)}let f=[new gu([],r,this._parent,this._document),new gu(i,null,this._parent,this._document),new gu(o,null,this._parent,this._document),new gu([],a,this._parent,this._document),new gu(l,null,this._parent,this._document)];return new gu(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new gu(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=gu.registry[t];return e?new e:rF(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];e?Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{this._elements[t].remove()}):this._elements[t].remove()}return new gu([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function gc([t,e],[n,r]){return[t-n,e-r]}function gf([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function gp([t,e]){return Math.atan2(e,t)}function gh([t,e]){return gp([t,e])+Math.PI/2}function gd(t,e){let n=gp(t),r=gp(e);return n<r?r-n:2*Math.PI-(n-r)}function gy(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);let o=n-e,a=i-r;return[e,r,o,a]}function gg([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function gm(t,e,n){return Math.max(e,Math.min(t,n))}function gv(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}gu.registry={g:dZ,rect:d3,circle:dY,path:d1,text:d4,ellipse:dK,image:dJ,line:d0,polygon:d2,polyline:d5,html:dQ};var gb=function(t){return rj(t,"Number")};function gx(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function gO(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function gw(t){return t.map((t,e)=>e)}function gE(t){return t[t.length-1]}function gk(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function gM(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function gS(t,e,n,r,i){let o=gp(gc(r,e))+Math.PI,a=gp(gc(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function g_(t,e,n,r="y",i="between",o=!1){let a="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)if(e)return 180;else return 90;return 90*!!e})(r,o),s=gw(a),[u,c]=gx(s,t=>a[t]),f=new nr({domain:[u,c],range:[0,100]}),p=t=>gb(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,h={between:e=>`${t[e]} ${p(e)}%`,start:e=>0===e?`${t[e]} ${p(e)}%`:`${t[e-1]} ${p(e)}%, ${t[e]} ${p(e)}%`,end:e=>e===t.length-1?`${t[e]} ${p(e)}%`:`${t[e]} ${p(e)}%, ${t[e+1]} ${p(e)}%`},d=s.sort((t,e)=>p(t)-p(e)).map(h[i]||h.between).join(",");return`linear-gradient(${l}deg, ${d})`}function gP(t){let[e,n,r,i]=t;return[i,e,n,r]}function gj(t,e,n){let[r,i,,o]=sq(t)?gP(e):e,[a,l]=n,s=t.getCenter(),u=gh(gc(r,s)),c=gh(gc(i,s)),f=c===u&&a!==l?c+2*Math.PI:c;return{startAngle:u,endAngle:f-u>=0?f:2*Math.PI+f,innerRadius:gf(o,s),outerRadius:gf(r,s)}}function gA(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function gT(t,e){if(!sY(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function gC(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}var gN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gL(t,e,n,r,i={}){let{inset:o=0,radius:a=0,insetLeft:l=o,insetTop:s=o,insetRight:u=o,insetBottom:c=o,radiusBottomLeft:f=a,radiusBottomRight:p=a,radiusTopLeft:h=a,radiusTopRight:d=a,minWidth:y=-1/0,maxWidth:g=1/0,minHeight:v=-1/0}=i,b=gN(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!sY(r)&&!sK(r)){let n=!!sq(r),[i,,o]=n?gP(e):e,[a,x]=i,[O,w]=gc(o,i),E=Math.abs(O),k=Math.abs(w),M=(O>0?a:a+O)+l,S=(w>0?x:x+w)+s,_=E-(l+u),P=k-(s+c),j=n?gm(_,v,1/0):gm(_,y,g),A=n?gm(P,y,g):gm(P,v,1/0),T=n?M:M-(j-_)/2,C=n?S-(A-P)/2:S-(A-P);return gs(t.createElement("rect",{})).style("x",T).style("y",C).style("width",j).style("height",A).style("radius",[h,d,p,f]).call(gM,b).node()}let{y:x,y1:O}=n,w=r.getCenter(),E=gj(r,e,[x,O]),k=sU().cornerRadius(a).padAngle(o*Math.PI/180);return gs(t.createElement("path",{})).style("path",k(E)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",a).style("inset",o).call(gM,b).node()}let gI=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=gN(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=gN(u,["color","radius"]),h=p.lineWidth||1,{stroke:d,radius:y=f,radiusTopLeft:g=y,radiusTopRight:v=y,radiusBottomRight:b=y,radiusBottomLeft:x=y,innerRadius:O=0,innerRadiusTopLeft:w=O,innerRadiusTopRight:E=O,innerRadiusBottomRight:k=O,innerRadiusBottomLeft:M=O,lineWidth:S="stroke"===n||d?h:0,inset:_=0,insetLeft:P=_,insetRight:j=_,insetBottom:A=_,insetTop:T=_,minWidth:C,maxWidth:N,minHeight:L}=a,I=gN(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:R=c,opacity:D}=r,F=[i?g:w,i?v:E,o?b:k,o?x:M],B=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];sq(l)&&B.push(B.shift());let z=Object.assign(Object.assign({radius:y},Object.fromEntries(B.map((t,e)=>[t,F[e]]))),{inset:_,insetLeft:P,insetRight:j,insetBottom:A,insetTop:T,minWidth:C,maxWidth:N,minHeight:L});return gs(gL(s,e,r,l,z)).call(gM,p).style("fill","transparent").style(n,R).style(gA(t),D).style("lineWidth",S).style("stroke",void 0===d?R:d).call(gM,I).node()}};gI.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gR=(t,e)=>gI(Object.assign({colorAttribute:"fill"},t),e);gR.props=Object.assign(Object.assign({},gI.props),{defaultMarker:"square"});let gD=(t,e)=>gI(Object.assign({colorAttribute:"stroke"},t),e);function gF(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function gB(t){this._context=t}function gz(t){return new gB(t)}function gW(t){return t[0]}function g$(t){return t[1]}function gG(t,e){var n=sO(!0),r=null,i=gz,o=null,a=sB(l);function l(l){var s,u,c,f=(l=gF(l)).length,p=!1;for(null==r&&(o=i(c=a())),s=0;s<=f;++s)!(s<f&&n(u=l[s],s,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+t(u,s,l),+e(u,s,l));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?gW:sO(t),e="function"==typeof e?e:void 0===e?g$:sO(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:sO(!!t),l):n},l.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),l):i},l.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),l):r},l}function gH(){}function gV(t){this._context=t}function gU(t){return new gV(t)}gD.props=Object.assign(Object.assign({},gI.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,gB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},gV.prototype={areaStart:gH,areaEnd:gH,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var gq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gY(t,e,n){let[r,i,o,a]=t;return sq(n)?[r,[e?e[0][0]:i[0],i[1]],[e?e[3][0]:o[0],o[1]],a]:[r,[i[0],e?e[0][1]:i[1]],[o[0],e?e[3][1]:o[1]],a]}let gX=(t,e)=>{let{adjustPoints:n=gY}=t,r=gq(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=gq(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=sq(i)?gP(f):f,{color:g=u,opacity:v}=e,b=gG().curve(gU)([p,h,d,y]);return gs(o.createElement("path",{})).call(gM,c).style("path",b).style("fill",g).style("fillOpacity",v).call(gM,r).node()}};function gK(t,e,n){let[r,i,o,a]=t;return sq(n)?[r,[e?e[0][0]:(i[0]+o[0])/2,i[1]],[e?e[3][0]:(i[0]+o[0])/2,o[1]],a]:[r,[i[0],e?e[0][1]:(i[1]+o[1])/2],[o[0],e?e[3][1]:(i[1]+o[1])/2],a]}gX.props={defaultMarker:"square"};let gZ=(t,e)=>gX(Object.assign({adjustPoints:gK},t),e);function gQ(t,e){return t.getBandWidth(t.invert(e))}gZ.props={defaultMarker:"square"};let gJ={rect:gR,hollow:gD,funnel:gX,pyramid:gZ},g0=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,series:l,size:s}=n,u=e.x,c=e.series,[f]=r.getSize(),p=s?s.map(t=>+t/f):null,h=s?(t,e,n)=>{let r=t+e/2,i=p[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],d=Array.from(t,t=>{let e=gQ(u,i[t]),n=c?gQ(c,null==l?void 0:l[t]):1,s=(+(null==l?void 0:l[t])||0)*e,[f,p]=h(+i[t]+s,e*n,t),d=+o[t],y=+a[t];return[[f,d],[p,d],[p,y],[f,y]].map(t=>r.map(t))});return[t,d]};g0.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:gJ,channels:[...o1({shapes:Object.keys(gJ)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...o4(),{type:sb},{type:sx}],postInference:[...o5()],interaction:{shareTooltip:!0}};let g1={rect:gR,hollow:gD},g2=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+a[t]],n=[+o[t],+a[t]];return[e,n,[+o[t],+l[t]],[+i[t],+l[t]]].map(t=>r.map(t))});return[t,s]};g2.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:g1,channels:[...o1({shapes:Object.keys(g1)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4(),{type:sb}],postInference:[...o5()],interaction:{shareTooltip:!0}};var g5=g4(gz);function g3(t){this._curve=t}function g4(t){function e(e){return new g3(t(e))}return e._curve=t,e}function g6(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(g4(t)):e()._curve},t}function g8(t){let e="function"==typeof t?t:t.render;return class extends dX{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}g3.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}};var g9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let g7=g8(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;gs(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(gM,r),gs(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(gM,i)}),mt=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=g9(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f,{color:p,lineWidth:h}=c,d=g9(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:b,seriesY:x}=e,O=gT(s,e),w=sq(s),E=r&&v?g_(v,b,x,r,i,w):y,k=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),E&&{stroke:E}),g&&{lineWidth:g}),O&&{transform:O}),l);if(sY(s)){let t=s.getCenter();f=e=>g6(gG().curve(g5)).angle((n,r)=>gh(gc(e[r],t))).radius((n,r)=>gf(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=gG().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[M,S]=function(t,e){let n=[],r=[],i=!1,o=null;for(let a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(t,o),_=rW(k,"connect"),P=!!S.length;return P&&(!a||Object.keys(_).length)?P&&!a?gs(u.createElement("path",{})).style("d",f(t)).call(gM,k).node():gs(new g7).style("style1",Object.assign(Object.assign({},k),_)).style("style2",k).style("d1",S.map(f).join(",")).style("d2",f(t)).node():gs(u.createElement("path",{})).style("d",f(M)||[]).call(gM,k).node()}};mt.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let me=(t,e)=>{let{coordinate:n}=e;return(...r)=>mt(Object.assign({curve:sY(n)?gU:gz},t),e)(...r)};function mn(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function mr(t,e){this._context=t,this._k=(1-e)/6}function mi(t,e){this._context=t,this._k=(1-e)/6}function mo(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function ma(t,e){this._context=t,this._alpha=e}function ml(t,e){this._context=t,this._alpha=e}me.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"line"}),mr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:mn(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:mn(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new mr(t,e)}return n.tension=function(e){return t(+e)},n}(0),mi.prototype={areaStart:gH,areaEnd:gH,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mn(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new mi(t,e)}return n.tension=function(e){return t(+e)},n}(0),ma.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:mo(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return e?new ma(t,e):new mr(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),ml.prototype={areaStart:gH,areaEnd:gH,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mo(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ms=function t(e){function n(t){return e?new ml(t,e):new mi(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function mu(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs((o*i+a*r)/(r+i)))||0}function mc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function mf(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,a-l*n,o,a)}function mp(t){this._context=t}function mh(t){this._context=new md(t)}function md(t){this._context=t}function my(t){return new mp(t)}function mg(t){return new mh(t)}mp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mf(this,this._t0,mc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e*=1,(t*=1)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,mf(this,mc(this,n=mu(this,t,e)),n);break;default:mf(this,this._t0,n=mu(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(mh.prototype=Object.create(mp.prototype)).point=function(t,e){mp.prototype.point.call(this,e,t)},md.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};var mm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let mv=(t,e)=>{let n=mm(t,[]),{coordinate:r}=e;return(...t)=>mt(Object.assign({curve:sY(r)?ms:sq(r)?mg:my},n),e)(...t)};function mb(t,e){this._context=t,this._t=e}function mx(t){return new mb(t,.5)}function mO(t){return new mb(t,0)}function mw(t){return new mb(t,1)}mv.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"smooth"}),mb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};let mE=(t,e)=>mt(Object.assign({curve:mw},t),e);mE.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"hv"});let mk=(t,e)=>mt(Object.assign({curve:mO},t),e);mk.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"vh"});let mM=(t,e)=>mt(Object.assign({curve:mx},t),e);mM.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"hvh"});var mS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let m_=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=mS(i,["color"]),u=sF();for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1],i=o[t],a=o[t+1];[...n,...r].every(rz)&&function(t,e,n,r,i){let o=gp(gc(n,e)),a=o+Math.PI/2,l=[r/2*Math.cos(a),r/2*Math.sin(a)],s=[i/2*Math.cos(a),i/2*Math.sin(a)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],c=[r/2*Math.cos(o),r/2*Math.sin(o)],f=function([t,e],[n,r]){return[t+n,e+r]}(e,l),p=function([t,e],[n,r]){return[t+n,e+r]}(n,s),h=function([t,e],[n,r]){return[t+n,e+r]}(p,u),d=function([t,e],[n,r]){return[t+n,e+r]}(n,u),y=gc(d,s),g=gc(n,s),v=gc(e,l),b=gc(v,c),x=gc(e,c),O=gc(f,c);t.moveTo(...f),t.lineTo(...p),t.arcTo(...h,...d,i/2),t.arcTo(...y,...g,i/2),t.lineTo(...v),t.arcTo(...b,...x,r/2),t.arcTo(...O,...f,r/2),t.closePath()}(u,n,r,i,a)}return gs(n.createElement("path",{})).call(gM,s).style("fill",a||l).style("d",u.toString()).call(gM,t).node()}};m_.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"line"});let mP=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,rN({},e,{encode:{series:oV(oU(t,void 0))}})]};mP.props={};let mj=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=oq(n,"color");return[t,rN({},e,{encode:{series:oG(o,a)}})]};mj.props={};let mA={line:me,smooth:mv,hv:mE,vh:mk,hvh:mM,trail:m_},mT=(t,e,n,r)=>{var i,o;let{series:a,x:l,y:s}=n,{x:u,y:c}=e;if(void 0===l||void 0===s)throw Error("Missing encode for x or y channel.");let f=a?Array.from(lj(t,t=>a[t]).values()):[t],p=f.map(t=>t[0]).filter(t=>void 0!==t),h=((null==(i=null==u?void 0:u.getBandWidth)?void 0:i.call(u))||0)/2,d=((null==(o=null==c?void 0:c.getBandWidth)?void 0:o.call(c))||0)/2;return[p,Array.from(f,t=>t.map(t=>r.map([+l[t]+h,+s[t]+d]))),f]},mC=(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===i.length)throw Error("Missing encode for position channel.");let o=Array.from(t,t=>{let e=i.map(e=>+e[t]),n=r.map(e),o=[];for(let t=0;t<n.length;t+=2)o.push([n[t],n[t+1]]);return o});return[t,o]},mN=()=>(t,e,n,r)=>(sZ(r)?mC:mT)(t,e,n,r);mN.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:mA,channels:[...o1({shapes:Object.keys(mA)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...o4(),{type:mP},{type:mj}],postInference:[...o5(),{type:oK,channel:"color"},{type:oZ,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var mL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let mI=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];mI.style=["fill"];let mR=mI.bind(void 0);mR.style=["stroke","lineWidth"];let mD=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];mD.style=["fill"];let mF=mD.bind(void 0);mF.style=["fill"];let mB=mD.bind(void 0);mB.style=["stroke","lineWidth"];let mz=(t,e,n)=>{let r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};mz.style=["fill"];let mW=mz.bind(void 0);mW.style=["stroke","lineWidth"];let m$=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};m$.style=["fill"];let mG=m$.bind(void 0);mG.style=["stroke","lineWidth"];let mH=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};mH.style=["fill"];let mV=mH.bind(void 0);mV.style=["stroke","lineWidth"];let mU=(t,e,n)=>{let r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};mU.style=["fill"];let mq=mU.bind(void 0);mq.style=["stroke","lineWidth"];let mY=(t,e,n)=>{let r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};mY.style=["fill"];let mX=mY.bind(void 0);mX.style=["stroke","lineWidth"];let mK=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];mK.style=["stroke","lineWidth"];let mZ=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];mZ.style=["stroke","lineWidth"];let mQ=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];mQ.style=["stroke","lineWidth"];let mJ=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];mJ.style=["stroke","lineWidth"];let m0=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];m0.style=["stroke","lineWidth"];let m1=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];m1.style=["stroke","lineWidth"];let m2=m1.bind(void 0);m2.style=["stroke","lineWidth"];let m5=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];m5.style=["stroke","lineWidth"];let m3=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];m3.style=["stroke","lineWidth"];let m4=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];m4.style=["stroke","lineWidth"];let m6=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];m6.style=["stroke","lineWidth"];let m8=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];m8.style=["stroke","lineWidth"];let m9=new Map([["bowtie",mY],["cross",mZ],["dash",m2],["diamond",mz],["dot",m1],["hexagon",mU],["hollowBowtie",mX],["hollowDiamond",mW],["hollowHexagon",mq],["hollowPoint",mR],["hollowSquare",mB],["hollowTriangle",mG],["hollowTriangleDown",mV],["hv",m3],["hvh",m6],["hyphen",m0],["line",mK],["plus",mJ],["point",mI],["rect",mF],["smooth",m5],["square",mD],["tick",mQ],["triangleDown",mH],["triangle",m$],["vh",m4],["vhv",m8]]);var m7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vt=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=m7(t,["colorAttribute","symbol","mode"]),a=m9.get(r)||m9.get("point"),{coordinate:l,document:s}=e;return(e,r,u)=>{let{lineWidth:c,color:f}=u,p=o.stroke?c||1:c,{color:h=f,transform:d,opacity:y}=r,[g,v]=gC(e),b=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||sQ(r)){let[[t,n],[r,i]]=e;return Math.max(0,(Math.abs((r-t)/2)+Math.abs((i-n)/2))/2)}return i}(i,e,r,l)||o.r||u.r;return gs(s.createElement("path",{})).call(gM,u).style("fill","transparent").style("d",a(g,v,b)).style("lineWidth",p).style("transform",d).style("stroke",h).style(gA(t),y).style(n,h).call(gM,o).node()}};vt.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ve=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);ve.props=Object.assign({defaultMarker:"hollowPoint"},vt.props);let vn=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);vn.props=Object.assign({defaultMarker:"hollowDiamond"},vt.props);let vr=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);vr.props=Object.assign({defaultMarker:"hollowHexagon"},vt.props);let vi=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);vi.props=Object.assign({defaultMarker:"hollowSquare"},vt.props);let vo=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);vo.props=Object.assign({defaultMarker:"hollowTriangleDown"},vt.props);let va=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);va.props=Object.assign({defaultMarker:"hollowTriangle"},vt.props);let vl=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);vl.props=Object.assign({defaultMarker:"hollowBowtie"},vt.props);let vs=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);vs.props=Object.assign({defaultMarker:"point"},vt.props);let vu=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);vu.props=Object.assign({defaultMarker:"plus"},vt.props);let vc=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);vc.props=Object.assign({defaultMarker:"diamond"},vt.props);let vf=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);vf.props=Object.assign({defaultMarker:"square"},vt.props);let vp=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);vp.props=Object.assign({defaultMarker:"triangle"},vt.props);let vh=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);vh.props=Object.assign({defaultMarker:"hexagon"},vt.props);let vd=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);vd.props=Object.assign({defaultMarker:"cross"},vt.props);let vy=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);vy.props=Object.assign({defaultMarker:"bowtie"},vt.props);let vg=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);vg.props=Object.assign({defaultMarker:"hyphen"},vt.props);let vm=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);vm.props=Object.assign({defaultMarker:"line"},vt.props);let vv=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);vv.props=Object.assign({defaultMarker:"tick"},vt.props);let vb=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);vb.props=Object.assign({defaultMarker:"triangleDown"},vt.props);let vx=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{y:oH(oU(t,0))},scale:{y:{guide:null}}})]};vx.props={};let vO=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{size:oV(oU(t,3))}})]};vO.props={};let vw={hollow:ve,hollowDiamond:vn,hollowHexagon:vr,hollowSquare:vi,hollowTriangleDown:vo,hollowTriangle:va,hollowBowtie:vl,point:vs,plus:vu,diamond:vc,square:vf,triangle:vp,hexagon:vh,cross:vd,bowtie:vy,hyphen:vg,line:vm,tick:vv,triangleDown:vb},vE=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l,y1:s,size:u,dx:c,dy:f}=r,[p,h]=i.getSize(),d=o8(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+o[t]+ +l[t])/2:+o[t];return[r+e,(s?(+a[t]+ +s[t])/2:+a[t])+n]},g=u?Array.from(e,t=>{let[e,n]=y(t),r=+u[t],o=r/p,a=r/h;return[i.map(d([e-o,n-a],t)),i.map(d([e+o,n+a],t))]}):Array.from(e,t=>[i.map(d(y(t),t))]);return[e,g]};vE.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:vw,channels:[...o1({shapes:Object.keys(vw)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...o4(),{type:sx},{type:vx}],postInference:[{type:vO},...o2()]};var vk=function(t){return"function"==typeof t};function vM(t){v_(t,!0)}function vS(t){v_(t,!1)}function v_(t,e){var n=e?"visible":"hidden";!function t(e,n){n(e),e.children&&e.children.forEach(function(e){e&&t(e,n)})}(t,function(t){t.attr("visibility",n)})}var vP=function(t){return"object"==typeof t&&null!==t},vj={}.toString,vA=function(t,e){return vj.call(t)==="[object "+e+"]"},vT=function(t){if(!vP(t)||!vA(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},vC=function(t){return Array.isArray?Array.isArray(t):vA(t,"Array")},vN=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=eF(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?vT(l)?(vT(t[a])||(t[a]={}),n<r?vN(t[a],l,n+1,r):t[a]=e[a]):vC(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},vL=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)vN(t,e[r]);return t},vI=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,ez([],eF(e),!1))||this;return r.addEventListener(t6.INSERTED,function(){vS(r)}),r}return eC(e,t),e}(dZ);function vR(t){var e=t.appendChild(new vI({class:"offscreen"}));return vS(e),e}function vD(){v_(this,"hidden"!==this.attributes.visibility)}var vF=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,vL({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return eC(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=vR(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&vD.call(this)},e.prototype.update=function(t,e){var n;return this.attr(vL({},this.attributes,t||{})),null==(n=this.render)?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e}(dX);function vB(t,e,n,r,i){return(void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t)?n(e):(r&&i(e),null)}var vz=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({style:eN({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return eC(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=vR(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e}(d4),vW=function(){var t,e,n;function r(e,n,r,i,o,a,l){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===l&&(l=[]),t.add(this),this._elements=Array.from(e),this._data=n,this._parent=r,this._document=i,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=a,this._facetElements=l}return r.prototype.selectAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(n,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(this._elements,null,this._parent,this._document,void 0,void 0,n)},r.prototype.select=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new e([n],null,n,this._document)},r.prototype.append=function(t){var n=this,r="function"==typeof t?t:function(){return n.createElement(t)},i=[];if(null!==this._data){for(var o=0;o<this._data.length;o++){var a=this._data[o],l=eF(Array.isArray(a)?a:[a,null],2),s=l[0],u=l[1],c=r(s,o);c.__data__=s,null!==u&&(c.__fromElements__=u),this._parent.appendChild(c),i.push(c)}return new e(i,null,this._parent,this._document)}for(var o=0;o<this._elements.length;o++){var f=this._elements[o],s=f.__data__,c=r(s,o);f.appendChild(c),i.push(c)}return new e(i,null,i[0],this._document)},r.prototype.maybeAppend=function(e,r){var i=eW(this,t,"m",n).call(this,"#"===e[0]?e:"#".concat(e),r);return i.attr("id",e),i},r.prototype.maybeAppendByClassName=function(e,r){var i=e.toString(),o=eW(this,t,"m",n).call(this,"."===i[0]?i:".".concat(i),r);return o.attr("className",i),o},r.prototype.maybeAppendByName=function(e,r){var i=eW(this,t,"m",n).call(this,'[name="'.concat(e,'"]'),r);return i.attr("name",e),i},r.prototype.data=function(t,n,r){void 0===n&&(n=function(t){return t}),void 0===r&&(r=function(){return null});for(var i,o,a,l,s,u=[],c=[],f=new Set(this._elements),p=[],h=new Set,d=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),y=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),g=(i=this._elements,o=function(t){return r(t.__data__)},a=new Map,i.forEach(function(t){var e=o(t);a.has(e)||a.set(e,[]),a.get(e).push(t)}),a),v=0;v<t.length;v++){var b=t[v],x=n(b,v),O=r(b,v);if(d.has(x)){var w=d.get(x);w.__data__=b,w.__facet__=!1,c.push(w),f.delete(w),d.delete(x)}else if(y.has(x)){var w=y.get(x);w.__data__=b,w.__facet__=!0,c.push(w),y.delete(x)}else if(g.has(x)){var E=g.get(x);p.push([b,E]);try{for(var k=(l=void 0,eD(E)),M=k.next();!M.done;M=k.next()){var w=M.value;f.delete(w)}}catch(t){l={error:t}}finally{try{M&&!M.done&&(s=k.return)&&s.call(k)}finally{if(l)throw l.error}}g.delete(x)}else if(d.has(O)){var w=d.get(O);w.__toData__?w.__toData__.push(b):w.__toData__=[b],h.add(w),f.delete(w)}else u.push(b)}var S=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(f,null,this._parent,this._document),new e([],p,this._parent,this._document),new e(h,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,S)},r.prototype.merge=function(t){var n=ez(ez([],eF(this._elements),!1),eF(t._elements),!1),r=ez(ez([],eF(this._transitions),!1),eF(t._transitions),!1);return new e(n,null,this._parent,this._document,void 0,r)},r.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var n=e.registry[t];if(n)return new n;throw Error("Unknown node type: ".concat(t))},r.prototype.join=function(t,e,n,r,i){void 0===t&&(t=function(t){return t}),void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});var o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)},r.prototype.remove=function(){for(var t=this,n=0;n<this._elements.length;n++)!function(e){var n=t._elements[e],r=t._transitions[e];r?r.then(function(){return n.remove()}):n.remove()}(n);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},r.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,i){void 0!==e&&(this[t]=n.call(this,r,i))})},r.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,i){void 0!==e&&(this.style[t]=r.call(this,n,i))})},r.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var i=this;Object.entries(t).forEach(function(t){var o=eF(t,2),a=o[0],l=o[1],s="function"==typeof l&&e?l:function(){return l};void 0!==l&&i.attr(a,s.call(i,n,r))})})},r.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.transition=function(t){var e=this._transitions;return this.each(function(n,r){e[r]=t.call(this,n,r)})},r.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},r.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,ez([this._parent,this],eF(e),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},r.prototype.parent=function(){return this._parent},e=r,t=new WeakSet,n=function(t,n){var r=this._elements[0],i=r.querySelector(t);if(i)return new e([i],null,this._parent,this._document);var o="string"==typeof n?this.createElement(n):n();return r.appendChild(o),new e([o],null,this._parent,this._document)},r.registry={g:dZ,rect:d3,circle:dY,path:d1,text:vz,ellipse:dK,image:dJ,line:d0,polygon:d2,polyline:d5,html:dQ},r}();function v$(t){return new vW([t],null,t,t.ownerDocument)}var vG=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},vH=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},vV=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},vU=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},vq=function(t){return vA(t,"String")},vY=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.render=function(t,n){var r,i=t.symbol,o=t.size,a=void 0===o?16:o,l=eL(t,["symbol","size"]),s=["base64","url","image"].includes(r=function(t){var e="default";if(vU(t)&&t instanceof Image)e="image";else if(vk(t))e="symbol";else if(vq(t)){var n=RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(i))?"image":i&&"symbol"===r?"path":null;vB(!!s,v$(n),function(t){t.maybeAppendByClassName("marker",s).attr("className","marker ".concat(s,"-marker")).call(function(t){if("image"===s){var n=2*a;t.styles({img:i,width:n,height:n,x:-a,y:-a})}else{var n=a/2,r=vk(i)?i:e.getSymbol(i);t.styles(eN({path:null==r?void 0:r(0,0,n)},l))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(vF);vY.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),vY.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),vY.registerSymbol("line",vH),vY.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),vY.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),vY.registerSymbol("circle",vG),vY.registerSymbol("point",vG),vY.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),vY.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),vY.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),vY.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),vY.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),vY.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),vY.registerSymbol("line",vH),vY.registerSymbol("dot",vV),vY.registerSymbol("dash",vV),vY.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),vY.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),vY.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),vY.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),vY.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});var vX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vK=(t,e,n)=>{let r=gf(t,e),i=gf(e,n);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(gf(n,t),2))/(2*r*i)},vZ=g8(t=>{let e,n=t.attributes,{className:r,class:i,transform:o,rotate:a,labelTransform:l,labelTransformOrigin:s,x:u,y:c,x0:f=u,y0:p=c,text:h,background:d,connector:y,startMarker:g,endMarker:v,coordCenter:b,innerHTML:x}=n,O=vX(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([u,c,f,p].some(t=>!gb(t)))return void t.children.forEach(t=>t.remove());let w=rW(O,"background"),{padding:E}=w,k=vX(w,["padding"]),M=rW(O,"connector"),{points:S=[]}=M,_=vX(M,["points"]),P=[[+f,+p],[+u,+c]];e=x?gs(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",x).call(gM,Object.assign({transform:l,transformOrigin:s},O)).node():gs(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(gM,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},O)).node();let j=function(t,e,n,r){let[[i,o],[a,l]]=e,[s,u]=function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}(t);if(i===a&&o===l)return gG()([[0,0],[s,u]]);let c=[[i-a,o-l]].concat(n.length?n:[[0,0]]),f=[r[0]-a,r[1]-l],[p,h]=c;if(vK(f,p,h)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=p[0]+(p[1]-f[1])*(p[1]-0)/(p[0]-f[0]);return n[0]<f[0]?Math.min(n[0],r):Math.max(e[0],r)})();c.splice(1,1,[e,0])}return gG()(c)}(gs(t).maybeAppend("background","rect").style("zIndex",-1).call(gM,function(t,e=[]){let[n=0,r=0,i=n,o=r]=e,a=t.parentNode,l=a.getEulerAngles();a.setEulerAngles(0);let{min:s,halfExtents:u}=t.getLocalBounds(),[c,f]=s,[p,h]=u;return a.setEulerAngles(l),{x:c-o,y:f-n,width:2*p+o+r,height:2*h+n+i}}(e,E)).call(gM,d?k:{}).node(),P,S,b),A=g&&new vY({id:"startMarker",style:Object.assign({x:0,y:0},rW(O,"startMarker"))}),T=v&&new vY({id:"endMarker",style:Object.assign({x:0,y:0},rW(O,"endMarker"))});gs(t).maybeAppend("connector","path").style("zIndex",0).style("path",j).style("markerStart",A).style("markerEnd",T).call(gM,y?_:{})}),vQ=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:o,text:a="",fontSize:l,rotate:s=0,transform:u=""}=r,c={text:String(a),stroke:o,fill:o,fontSize:l},[[f,p]]=e;return gs(new vZ).style("x",f).style("y",p).call(gM,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(gM,c).call(gM,t).node()}};vQ.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var vJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let v0=g8(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=vJ(e,["class","x","y"]),a=rW(o,"marker"),{size:l=24}=a,s=()=>(function(t){let e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[l,s]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,l,s],["L",o,a],["Z"]]})(l/2),[u,c]=function(t){let{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}(gs(t).maybeAppend("marker",()=>new vY({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());gs(t).maybeAppend("text","text").style("x",u).style("y",c).call(gM,o)}),v1=(t,e)=>{let n=vJ(t,[]);return(t,e,r)=>{let{color:i}=r,o=vJ(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return gs(new v0).call(gM,o).style("x",u).style("y",c).call(gM,s).call(gM,n).node()}};v1.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let v2=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(oX))return[t,e];let r=Array.isArray(n[0])?n:[n],i=r.map(t=>t[0]),o=r.map(t=>t[1]);return[t,rN({},e,{encode:{x:oG(i),y:oG(o)}})]};v2.props={};var v5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let v3=()=>(t,e)=>{let{data:n,style:r={}}=e,i=v5(e,["data","style"]),{x:o,y:a}=r,l=v5(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],rN({},i,{data:[0],cartesian:!0,encode:{x:oG([o||0]),y:oG([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};v3.props={};let v4={text:vQ,badge:v1},v6=t=>{let{cartesian:e=!1}=t;return e?o7:(e,n,r,i)=>{let{x:o,y:a}=r,l=o8(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};v6.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:v4,channels:[...o1({shapes:Object.keys(v4)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...o4(),{type:v2},{type:v3}],postInference:[...o2()]};let v8=()=>(t,e)=>[t,rN({scale:{x:{padding:0},y:{padding:0}}},e)];v8.props={};let v9={cell:gR,hollow:gD},v7=()=>(t,e,n,r)=>{let{x:i,y:o}=n,a=e.x,l=e.y,s=Array.from(t,t=>{let e=a.getBandWidth(a.invert(+i[t])),n=l.getBandWidth(l.invert(+o[t])),s=+i[t],u=+o[t];return[[s,u],[s+e,u],[s+e,u+n],[s,u+n]].map(t=>r.map(t))});return[t,s]};function bt(t,e,n){var r=null,i=sO(!0),o=null,a=gz,l=null,s=sB(u);function u(u){var c,f,p,h,d,y=(u=gF(u)).length,g=!1,v=Array(y),b=Array(y);for(null==o&&(l=a(d=s())),c=0;c<=y;++c){if(!(c<y&&i(h=u[c],c,u))===g)if(g=!g)f=c,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=c-1;p>=f;--p)l.point(v[p],b[p]);l.lineEnd(),l.areaEnd()}g&&(v[c]=+t(h,c,u),b[c]=+e(h,c,u),l.point(r?+r(h,c,u):v[c],n?+n(h,c,u):b[c]))}if(d)return l=null,d+""||null}function c(){return gG().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?gW:sO(+t),e="function"==typeof e?e:void 0===e?sO(0):sO(+e),n="function"==typeof n?n:void 0===n?g$:sO(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sO(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:sO(+t),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:sO(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),u):o},u}v7.props={defaultShape:"cell",defaultLabelShape:"label",shape:v9,composite:!1,channels:[...o1({shapes:Object.keys(v9)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...o4(),{type:sx},{type:vx},{type:v8}],postInference:[...o2()]};var be=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bn=g8(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;gs(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(gM,i),gs(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(gM,r)}),br=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=be(t,["curve","gradient","defined","connect"]),{coordinate:l,document:s}=e;return(t,e,u)=>{let{color:c}=u,{color:f=c,seriesColor:p,seriesX:h,seriesY:d}=e,y=sq(l),g=gT(l,e),v=r&&p?g_(p,h,d,r,void 0,y):f,b=Object.assign(Object.assign(Object.assign(Object.assign({},u),{stroke:v,fill:v}),g&&{transform:g}),a),[x,O]=function(t,e){let n=[],r=[],i=[],o=!1,a=null,l=t.length/2;for(let s=0;s<l;s++){let u=t[s],c=t[s+l];if([...u,...c].some(t=>!e(t)))o=!0;else{if(n.push(u),r.push(c),o&&a){o=!1;let[t,e]=a;i.push([t,u,e,c])}a=[u,c]}}return[n.concat(r),i]}(t,i),w=rW(b,"connect"),E=!!O.length,k=t=>gs(s.createElement("path",{})).style("d",t||"").call(gM,b).node();if(sY(l)){let e=t=>{var e,r,o,a,s,u;let c=l.getCenter(),f=t.slice(0,t.length/2),p=t.slice(t.length/2);return(r=(e=bt().curve(g5)).curve,o=e.lineX0,a=e.lineX1,s=e.lineY0,u=e.lineY1,e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return g6(o())},delete e.lineX0,e.lineEndAngle=function(){return g6(a())},delete e.lineX1,e.lineInnerRadius=function(){return g6(s())},delete e.lineY0,e.lineOuterRadius=function(){return g6(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(g4(t)):r()._curve},e).angle((t,e)=>gh(gc(f[e],c))).outerRadius((t,e)=>gf(f[e],c)).innerRadius((t,e)=>gf(p[e],c)).defined((t,e)=>[...f[e],...p[e]].every(i)).curve(n)(p)};return E&&(!o||Object.keys(w).length)?E&&!o?k(e(t)):gs(new bn).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():k(e(x))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return y?bt().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e):bt().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e)};return E&&(!o||Object.keys(w).length)?E&&!o?k(e(t)):gs(new bn).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():k(e(x))}}};br.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bi=(t,e)=>{let{coordinate:n}=e;return(...r)=>br(Object.assign({curve:sY(n)?gU:gz},t),e)(...r)};bi.props=Object.assign(Object.assign({},br.props),{defaultMarker:"square"});var bo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ba=(t,e)=>{let n=bo(t,[]),{coordinate:r}=e;return(...t)=>br(Object.assign({curve:sY(r)?ms:sq(r)?mg:my},n),e)(...t)};ba.props=Object.assign(Object.assign({},br.props),{defaultMarker:"smooth"});let bl=(t,e)=>(...n)=>br(Object.assign({curve:mx},t),e)(...n);bl.props=Object.assign(Object.assign({},br.props),{defaultMarker:"hvh"});let bs=(t,e)=>(...n)=>br(Object.assign({curve:mO},t),e)(...n);bs.props=Object.assign(Object.assign({},br.props),{defaultMarker:"vh"});let bu=(t,e)=>(...n)=>br(Object.assign({curve:mw},t),e)(...n);bu.props=Object.assign(Object.assign({},br.props),{defaultMarker:"hv"});let bc={area:bi,smooth:ba,hvh:bl,vh:bs,hv:bu},bf=()=>(t,e,n,r)=>{var i,o;let{x:a,y:l,y1:s,series:u}=n,{x:c,y:f}=e,p=u?Array.from(lj(t,t=>u[t]).values()):[t],h=p.map(t=>t[0]).filter(t=>void 0!==t),d=((null==(i=null==c?void 0:c.getBandWidth)?void 0:i.call(c))||0)/2,y=((null==(o=null==f?void 0:f.getBandWidth)?void 0:o.call(f))||0)/2;return[h,Array.from(p,t=>{let e=t.length,n=Array(2*e);for(let i=0;i<t.length;i++){let o=t[i];n[i]=r.map([+a[o]+d,+l[o]+y]),n[e+i]=r.map([+a[o]+d,+s[o]+y])}return n}),p]};bf.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:bc,channels:[...o1({shapes:Object.keys(bc)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...o4(),{type:mj},{type:sb},{type:v8}],postInference:[...o5()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let bp=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=oq(n,"y");return[t,rN({},e,{encode:{y1:oG([...i])}})]};bp.props={};let bh=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=oq(n,"x");return[t,rN({},e,{encode:{x1:oG([...i])}})]};bh.props={};var bd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let by=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=bd(t,["arrow","arrowSize"]),{document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=bd(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=sF();if(h.moveTo(...f),h.lineTo(...p),n){let[t,e]=function(t,e,n){let{arrowSize:r}=n,i="string"==typeof r?+parseFloat(r)/100*gf(t,e):r,o=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),l=Math.PI/2-a-o,s=[e[0]-i*Math.sin(l),e[1]-i*Math.cos(l)],u=a-o;return[s,[e[0]-i*Math.cos(u),e[1]-i*Math.sin(u)]]}(f,p,{arrowSize:r});h.moveTo(...p),h.lineTo(...t),h.moveTo(...p),h.lineTo(...e)}return gs(o.createElement("path",{})).call(gM,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(gM,i).node()}};by.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bg=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>by(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};bg.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bv=(t,e)=>{let n=bm(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=bm(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=sF();if(p.moveTo(c[0],c[1]),sY(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=gg(c,f),e=gf(c,f)/2;gS(p,c,f,t,e)}return gs(i.createElement("path",{})).call(gM,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(gM,n).node()}};bv.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bx=(t,e)=>{let n=bb(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=bb(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=sF();return f.moveTo(u[0],u[1]),f.bezierCurveTo(u[0]/2+c[0]/2,u[1],u[0]/2+c[0]/2,c[1],c[0],c[1]),gs(r.createElement("path",{})).call(gM,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(gM,n).node()}};bx.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bw=(t,e)=>{let{cornerRatio:n=1/3}=t,r=bO(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=bO(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=sF();if(sY(n)){let o=n.getCenter(),a=gf(t,o),l=gf(e,o);return i.moveTo(t[0],t[1]),gS(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return sq(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1])):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r)),i.lineTo(e[0],e[1]),i}(f,p,i,n);return gs(o.createElement("path",{})).call(gM,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(gM,r).node()}};bw.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bE={link:bg,arc:bv,smooth:bx,vhv:bw},bk=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=o8(n,r,t),c=e.map(t=>[i.map(u([+o[t],+a[t]],t)),i.map(u([+l[t],+s[t]],t))]);return[e,c]};bk.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:bE,channels:[...o1({shapes:Object.keys(bE)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4(),{type:bp},{type:bh}],postInference:[...o2()]};var bM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bS=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=bM(o,["color"]),{color:s=a,src:u="",size:c=32,transform:f=""}=i,{width:p=c,height:h=c}=t,[[d,y]]=e,[g,v]=n.getSize();p="string"==typeof p?o9(p)*g:p,h="string"==typeof h?o9(h)*v:h;let b=d-Number(p)/2,x=y-Number(h)/2;return gs(r.createElement("image",{})).call(gM,l).style("x",b).style("y",x).style("img",u).style("stroke",s).style("transform",f).call(gM,t).style("width",p).style("height",h).node()}};bS.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let b_={image:bS},bP=t=>{let{cartesian:e}=t;return e?o7:(e,n,r,i)=>{let{x:o,y:a}=r,l=o8(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};bP.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:b_,channels:[...o1({shapes:Object.keys(b_)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...o4(),{type:v2},{type:v3}],postInference:[...o2()]};var bj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bA=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=bj(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){let n=sF();if(sY(e)){let r=e.getCenter(),i=[...t,t[0]],o=i.map(t=>gf(t,r));return i.forEach((e,i)=>{if(0===i)return void n.moveTo(e[0],e[1]);let a=o[i],l=t[i-1],s=o[i-1];void 0!==s&&1e-10>Math.abs(a-s)?gS(n,l,e,r,a):n.lineTo(e[0],e[1])}),n.closePath(),n}return t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return gs(r.createElement("path",{})).call(gM,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(gM,t).node()}};bA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bC=(t,e)=>{let n=bT(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=bT(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=sF();if(sY(e)){let t=e.getCenter(),l=gf(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),gS(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),gS(a,r,n,t,l),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return gs(i.createElement("path",{})).call(gM,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(gM,n).node()}};bC.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bN={polygon:bA,ribbon:bC},bL=()=>(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),o=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),a=t.map(t=>{let e=[];for(let n=0;n<i.length;n++){let a=i[n][t];if(void 0===a)break;let l=o[n][t];e.push(r.map([+a,+l]))}return e});return[t,a]};bL.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:bN,channels:[...o1({shapes:Object.keys(bN)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4()],postInference:[...o2()]};var bI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bR=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=bI(o,["color","fill","stroke"]),p=function(t,e){let n=sF();if(sY(e)){let r=e.getCenter(),[i,o]=r,a=gp(gc(t[0],r)),l=gp(gc(t[1],r)),s=gf(r,t[2]),u=gf(r,t[3]),c=gf(r,t[8]),f=gf(r,t[10]),p=gf(r,t[11]);n.moveTo(...t[0]),n.arc(i,o,s,a,l),n.arc(i,o,s,l,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,o,u,a,l),n.lineTo(...t[6]),n.arc(i,o,f,l,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,o,c,a,l),n.arc(i,o,c,l,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,o,p,a,l),n.arc(i,o,p,l,a,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return gs(r.createElement("path",{})).call(gM,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(gM,t).node()}};bR.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bF=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=bD(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=sF();if(!sY(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;let i=e.getCenter(),[o,a]=i,l=gf(i,t[3]),s=gf(i,t[8]),u=gf(i,t[10]),c=gp(gc(t[2],i)),f=Math.asin(n/s),p=c-f,h=c+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.arc(o,a,l,p,h),r.lineTo(Math.cos(h)*u+o,Math.sin(h)*u+a),r.arc(o,a,u,h,p,!0),r.lineTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);let d=(p+h)/2;return r.moveTo(Math.cos(d)*(s+n/2)+o,Math.sin(d)*(s+n/2)+a),r.arc(Math.cos(d)*s+o,Math.sin(d)*s+a,n/2,d,2*Math.PI+d),r.closePath(),r}(e,n,4);return gs(r.createElement("path",{})).call(gM,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(gM,t).node()}};bF.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bB={box:bR,violin:bF},bz=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,y2:l,y3:s,y4:u,series:c}=n,f=e.x,p=e.series,h=Array.from(t,t=>{let e=f.getBandWidth(f.invert(+i[t])),n=e*(p?p.getBandWidth(p.invert(+(null==c?void 0:c[t]))):1),h=(+(null==c?void 0:c[t])||0)*e,d=+i[t]+h+n/2,[y,g,v,b,x]=[+o[t],+a[t],+l[t],+s[t],+u[t]];return[[d-n/2,x],[d+n/2,x],[d,x],[d,b],[d-n/2,b],[d+n/2,b],[d+n/2,g],[d-n/2,g],[d-n/2,v],[d+n/2,v],[d,g],[d,y],[d-n/2,y],[d+n/2,y]].map(t=>r.map(t))});return[t,h]};bz.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:bB,channels:[...o1({shapes:Object.keys(bB)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...o4(),{type:sx}],postInference:[...o5()],interaction:{shareTooltip:!0}};let bW={vector:by},b$=()=>(t,e,n,r)=>{let{x:i,y:o,size:a,rotate:l}=n,[s,u]=r.getSize(),c=t.map(t=>{let e=+l[t]/180*Math.PI,n=+a[t],c=n/s*Math.cos(e),f=-(n/u)*Math.sin(e);return[r.map([+i[t]-c/2,+o[t]-f/2]),r.map([+i[t]+c/2,+o[t]+f/2])]});return[t,c]};b$.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:bW,channels:[...o1({shapes:Object.keys(bW)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...o4()],postInference:[...o2()]};var bG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bH=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=bG(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s;let{color:u,lineWidth:c}=l,f=bG(l,["color","lineWidth"]),{color:p=u,size:h=c}=e,d=n?(s=Object.assign({fill:i.stroke||p,stroke:i.stroke||p},rW(i,"arrow")),a.createElement("path",{style:Object.assign({path:`M ${r},${r} L -${r},0 L ${r},-${r} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},s)})):null,y=function(t,e){if(!sY(e))return gG().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return sU()({startAngle:0,endAngle:2*Math.PI,outerRadius:gf(t[0],n),innerRadius:gf(t[1],n)})}(t,o),g=function(t,e){if(!sY(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return gs(a.createElement("path",{})).call(gM,f).style("d",y).style("stroke",p).style("lineWidth",h).style("transform",g).style("markerEnd",d).call(gM,i).node()}};bH.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bV=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(oX)?[t,e]:[t,rN({},e,{encode:{x:oG(n)}})]};bV.props={};let bU={line:bH},bq=t=>(e,n,r,i)=>{let{x:o}=r,a=o8(n,r,rN({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[o[t],1],[o[t],0]].map(e=>i.map(a(e,t))));return[e,l]};bq.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:bU,channels:[...o3({shapes:Object.keys(bU)}),{name:"x",required:!0}],preInference:[...o4(),{type:bV}],postInference:[]};let bY=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(oX)?[t,e]:[t,rN({},e,{encode:{y:oG(n)}})]};bY.props={};let bX={line:bH},bK=t=>(e,n,r,i)=>{let{y:o}=r,a=o8(n,r,rN({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[0,o[t]],[1,o[t]]].map(e=>i.map(a(e,t))));return[e,l]};bK.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:bX,channels:[...o3({shapes:Object.keys(bX)}),{name:"y",required:!0}],preInference:[...o4(),{type:bY}],postInference:[]};var bZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function bQ(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let bJ=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=bZ(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{let{color:u,connectLength1:c}=n,f=bZ(n,["color","connectLength1"]),{color:p,transform:h}=e,d=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(sq(t)){let t=o+n,e=t+i;return[[t,a],[e,a],[e,s],[l+r,s]]}let u=a-n,c=u-i;return[[o,u],[o,c],[l,c],[l,s-r]]}(s,t,r,i,null!=o?o:c),y=rW(Object.assign(Object.assign({},l),n),"endMarker");return gs(new d1).call(gM,f).style("path",gG().x(t=>t[0]).y(t=>t[1])(d)).style("stroke",p||u).style("transform",h).style("markerEnd",a?new vY({className:"marker",style:Object.assign(Object.assign({},y),{symbol:bQ})}):null).call(gM,l).node()}};bJ.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let b0={connector:bJ},b1=(...t)=>bk(...t);function b2(t,e,n,r){if(e)return()=>[0,1];let{[t]:i,[`${t}1`]:o}=n;return t=>{var e;let n=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+n]}}function b5(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=b2("x",e,i,r.x),l=b2("y",n,i,r.y),s=Array.from(t,t=>{let[e,n]=a(t),[r,i]=l(t);return[[e,r],[n,r],[n,i],[e,i]].map(t=>o.map(t))});return[t,s]}}b1.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:b0,channels:[...o3({shapes:Object.keys(b0)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4()],postInference:[]};let b3={range:gR},b4=()=>b5();b4.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:b3,channels:[...o3({shapes:Object.keys(b3)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4()],postInference:[]};let b6=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(oX))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,rN({},e,{encode:{x:oG(r(n,0)),x1:oG(r(n,1))}})]}return[t,e]};b6.props={};let b8={range:gR},b9=()=>b5({extendY:!0});b9.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:b8,channels:[...o3({shapes:Object.keys(b8)}),{name:"x",required:!0}],preInference:[...o4(),{type:b6}],postInference:[]};let b7=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(oX))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,rN({},e,{encode:{y:oG(r(n,0)),y1:oG(r(n,1))}})]}return[t,e]};b7.props={};let xt={range:gR},xe=()=>b5({extendX:!0});xe.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:xt,channels:[...o3({shapes:Object.keys(xt)}),{name:"y",required:!0}],preInference:[...o4(),{type:b7}],postInference:[]};var xn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xr=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=xn(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=xn(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return gs(a.createElement("path",{})).call(gM,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(gM,i).node()}};xr.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xi=(t,e)=>xr(Object.assign({colorAttribute:"fill"},t),e);xi.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xo=(t,e)=>xr(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);xo.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xa={path:xi,hollow:xo},xl=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];xl.props={defaultShape:"path",defaultLabelShape:"label",shape:xa,composite:!1,channels:[...o1({shapes:Object.keys(xa)}),{name:"d",scale:"identity"}],preInference:[...o4()],postInference:[]};var xs=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xu=(t,e)=>{let{render:n}=t,r=xs(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};xu.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xc=()=>(t,e)=>{let{style:n={}}=e;return[t,rN({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};xc.props={};let xf=t=>{let{cartesian:e}=t;return e?o7:(e,n,r,i)=>{let{x:o,y:a}=r,l=o8(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};xf.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:xu},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4(),{type:v2},{type:v3},{type:xc}]};var xp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xh=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=xp(i,["color"]),{color:s=a}=r,[u,...c]=e,f=sF();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),gs(n.createElement("path",{})).call(gM,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(gM,t).node()}};xh.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xd={density:xh},xy=()=>(t,e,n,r)=>{let{x:i,series:o}=n,a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),l=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===i||void 0===a||void 0===l)throw Error("Missing encode for x or y or size channel.");let s=e.x,u=e.series,c=Array.from(t,e=>{let n=s.getBandWidth(s.invert(+i[e])),c=u?u.getBandWidth(u.invert(+(null==o?void 0:o[e]))):1,f=(+(null==o?void 0:o[e])||0)*n,p=+i[e]+f+n*c/2;return[...a.map((n,r)=>[p+ +l[r][e]/t.length,+a[r][e]]),...a.map((n,r)=>[p-+l[r][e]/t.length,+a[r][e]]).reverse()].map(t=>r.map(t))});return[t,c]};function xg(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}function xm(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}xy.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:xd,channels:[...o1({shapes:Object.keys(xd)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...o4(),{type:sb},{type:sx}],postInference:[...o5()],interaction:{shareTooltip:!0}},xg(3);let xv=function(t,e=(...t)=>`${t[0]}`,n=16){let r=xg(n);return(...n)=>{let i=e(...n),o=r.get(i);return r.has(i)?r.get(i):(o=t(...n),r.set(i,o),o)}}((t,e,n)=>{let r=xm(n,2*t,2*t),i=r.getContext("2d");if(1===e)i.beginPath(),i.arc(t,t,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{let n=i.createRadialGradient(t,t,t*e,t,t,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=n,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);var xb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xx=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=xb(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d;let{transform:y}=e,[g,v]=u.getSize(),b=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),x=le(t,t=>t[2]),O=lo(t,t=>t[2]),w=g&&v?function(t,e,n,r,i,o,a){let l=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},o);l.minOpacity*=255,l.opacity*=255,l.maxOpacity*=255;let s=xm(a,t,e).getContext("2d"),u=function(t,e){let n=xm(e,256,1).getContext("2d"),r=n.createLinearGradient(0,0,256,1);return("string"==typeof t?t.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):t).forEach(([t,e])=>{r.addColorStop(t,e)}),n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}(l.gradient,a);s.clearRect(0,0,t,e),function(t,e,n,r,i,o){let{blur:a}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),p=i-c,h=s-c,d=xv(c,1-a,o);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(d,p,h)}}(s,n,r,i,l,a);let c=function(t,e,n,r,i){let{minOpacity:o,opacity:a,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=a||Math.max(0,Math.min(l,Math.max(o,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(s,t,e,u,l),f=xm(a,t,e).getContext("2d");return f.putImageData(c,0,0),f}(g,v,x,O,b,(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,Object.keys(h).reduce((t,e)=>{let n=h[e];return d(n,e)||(t[e]=n),t},{})),c):{canvas:null};return gs(f.createElement("image",{})).call(gM,p).style("x",0).style("y",0).style("width",g).style("height",v).style("src",w.canvas).style("transform",y).call(gM,s).node()}};xx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xO={heatmap:xx},xw=t=>(t,e,n,r)=>{let{x:i,y:o,size:a,color:l}=n;return[[0],[Array.from(t,t=>{let e=a?+a[t]:40;return[...r.map([+i[t],+o[t]]),l[t],e]})]]};xw.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:xO,channels:[...o1({shapes:Object.keys(xO)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...o4(),{type:sx},{type:vx}],postInference:[...o2()]};let xE=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];xE.props={};let xk=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];xk.props={};let xM=t=>new nr(t);xM.props={};let xS=Symbol("defaultUnknown");function x_(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function xP(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==xS)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function xj(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class xA extends eG{getDefaultOptions(){return{domain:[],range:[],unknown:xS}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&x_(this.domainIndexMap,this.getDomain(),this.domainKey),xP({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&x_(this.rangeIndexMap,this.getRange(),this.rangeKey),xP({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=xj(e),this.rangeKey=xj(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new xA(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}let xT=t=>new xA(t);function xC({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function xN(t){return"object"==typeof t?t.valueOf():t}xT.props={};class xL extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=xN,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(xC({map:this.map,initKey:this.initKey},t))}has(t){return super.has(xC({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class xI extends xA{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:xS,flex:[]}}constructor(t){super(t)}clone(){return new xI(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r,{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null==(e=t.flex)?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new xL(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new xL(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}let xR=t=>new xI(t);function xD(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}xR.props={};let xF=[1,5,2,2.5,4,3],xB=100*Number.EPSILON,xz=(t,e,n=5,r=!0,i=xF,o=[.25,.2,.5,.05])=>{let a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];let l={score:-2,lmin:0,lmax:0,lstep:0},s=1;for(;s<1/0;){for(let n=0;n<i.length;n+=1){let c=i[n],f=function(t,e,n){let r=eA(e);return 1-eP(e,t)/(r-1)-n+1}(c,i,s);if(o[0]*f+o[1]+o[2]+o[3]<l.score){s=1/0;break}let p=2;for(;p<1/0;){var u;let n=(u=p)>=a?2-(u-1)/(a-1):1;if(o[0]*f+o[1]+o[2]*n+o[3]<l.score)break;let h=Math.ceil(Math.log10((e-t)/(p+1)/s/c));for(;h<1/0;){let u=s*c*10**h,d=function(t,e,n){let r=e-t;return n>r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,u*(p-1));if(o[0]*f+o[1]*d+o[2]*n+o[3]<l.score)break;let y=Math.floor(e/u)*s-(p-1)*s,g=Math.ceil(t/u)*s;if(y<=g){let n=g-y;for(let f=0;f<=n;f+=1){let n=u/s*(y+f),h=n+u*(p-1),d=function(t,e,n,r,i,o){let a=eA(e),l=eP(e,t),s=0,u=(r%o+o)%o;return(u<xB||o-u<xB)&&r<=0&&i>=0&&(s=1),1-l/(a-1)-n+s}(c,i,s,n,h,u),g=1-.5*((e-h)**2+(t-n)**2)/(.1*(e-t))**2,v=function(t,e,n,r,i,o){let a=(t-1)/(o-i),l=(e-1)/(Math.max(o,r)-Math.min(n,i));return 2-Math.max(a/l,l/a)}(p,a,t,e,n,h),b=o[0]*d+o[1]*g+o[2]*v+ +o[3];b>l.score&&(!r||n<=t&&h>=e)&&(l.lmin=n,l.lmax=h,l.lstep=u,l.score=b)}}h+=1}p+=1}}s+=1}let c=xD(l.lmax),f=xD(l.lmin),p=xD(l.lstep),h=Math.floor(Math.round((c-f)/p*1e12)/1e12)+1,d=Array(h);d[0]=xD(f);for(let t=1;t<h;t+=1)d[t]=xD(d[t-1]+p);return d};class xW extends eG{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:xz}}map(t){return e1(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new xW(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return eE(r)&&eE(i)?n(r,i,e):[]}}let x$=t=>new xW(t);x$.props={};class xG extends xI{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:xS,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new xG(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let xH=t=>new xG(t);xH.props={};var xV=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,xU=/\[([^]*?)\]/gm;function xq(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var xY=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase());return r>-1?r:null}};function xX(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)t[o]=i[o]}return t}var xK=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xZ=["January","February","March","April","May","June","July","August","September","October","November","December"],xQ=xq(xZ,3),xJ=xX({},{dayNamesShort:xq(xK,3),dayNames:xK,monthNamesShort:xQ,monthNames:xZ,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:+(t-t%10!=10)*t%10]}}),x0=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},x1={D:function(t){return String(t.getDate())},DD:function(t){return x0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return x0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return x0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return x0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return x0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return x0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return x0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return x0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return x0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return x0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return x0(t.getMilliseconds(),3)},a:function(t,e){return 12>t.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+x0(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+x0(Math.floor(Math.abs(e)/60),2)+":"+x0(Math.abs(e)%60,2)}};xY("monthNamesShort"),xY("monthNames");var x2={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},x5=function(t,e,n){if(void 0===e&&(e=x2.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=x2[e]||e;var r=[];e=e.replace(xU,function(t,e){return r.push(e),"@@@"});var i=xX(xX({},xJ),n);return(e=e.replace(xV,function(e){return x1[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};function x3(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1;return t},o=(t,n)=>{n&&i(t,n),e(t)},a=(t,e)=>{let r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return o(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),u=i?a(t,r):a(t);for(;u<e;n(u,s),o(u))l.push(new Date(+u));return l},duration:t}}let x4=x3(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),x6=x3(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),x8=x3(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),x9=x3(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),x7=x3(864e5,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getDate()-1),Ot=x3(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),Oe={millisecond:x4,second:x6,minute:x8,hour:x9,day:x7,week:x3(6048e5,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=Ot.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:Ot,year:x3(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear())},On=x3(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Or=x3(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),Oi=x3(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Oo=x3(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),Oa=x3(864e5,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getUTCDate()-1),Ol=x3(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),Os={millisecond:On,second:Or,minute:Oi,hour:Oo,day:Oa,week:x3(6048e5,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+6048e5*e)},t=>{let e=Ol.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:Ol,year:x3(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear())};function Ou(t,e,n,r,i){let o,a=+t,l=+e,{tickIntervals:s,year:u,millisecond:c}=function(t){let{year:e,month:n,week:r,day:i,hour:o,minute:a,second:l,millisecond:s}=t?Os:Oe;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[a,1],[a,5],[a,15],[a,30],[o,1],[o,3],[o,6],[o,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,p=r?(l-a)/r:n||5,h=r||(l-a)/p,d=s.length,y=eU(s,h,0,d,f);if(y===d){let t=e6(a/u.duration,l/u.duration,p);o=[u,t]}else if(y){let[t,e]=h/f(s[y-1])<f(s[y])/h?s[y-1]:s[y],n=r?Math.ceil(r/t.duration):e;o=[t,n]}else o=[c,Math.max(e6(a,l,p),1)];return o}let Oc=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=Ou(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},Of=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=Ou(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function Op(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class Oh extends ne{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:Oc,interpolate:eZ,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Of}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?Os:Oe,r=e?Op:ej;return e=>x5(r(e),t||function(t,e){let{second:n,minute:r,hour:i,day:o,week:a,month:l,year:s}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":o.floor(t)<t?"hh A":l.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new Oh(this.options)}}let Od=t=>new Oh(t);Od.props={};let Oy=t=>e=>-t(-e),Og=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?Oy(r):r},Om=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?Oy(n):n},Ov=(t,e,n,r=10)=>{let i=t<0,o=Om(r,i),a=Og(r,i),l=e<t,s=l?e:t,u=l?t:e,c=a(s),f=a(u),p=[];if(!(r%1)&&f-c<n){if(c=Math.floor(c),f=Math.ceil(f),i)for(;c<=f;c+=1){let t=o(c);for(let e=r-1;e>=1;e-=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}else for(;c<=f;c+=1){let t=o(c);for(let e=1;e<r;e+=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}2*p.length<n&&(p=nn(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=nn(c,f,t).map(o)}return l?p.reverse():p},Ob=(t,e,n,r)=>{let i=t<0,o=Og(r,i),a=Om(r,i),l=t>e,s=[a(Math.floor(o(l?e:t))),a(Math.ceil(o(l?t:e)))];return l?s.reverse():s};class Ox extends ne{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:eJ,tickMethod:Ov,tickCount:5}}chooseNice(){return Ob}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[Og(t,n),Om(t,n)]}clone(){return new Ox(this.options)}}let OO=t=>new Ox(t);OO.props={};let Ow=t=>e=>e<0?-((-e)**t):e**t,OE=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),Ok=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class OM extends ne{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:eJ,tickMethod:nn,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;return 1===t?[ej,ej]:[.5===t?Ok:Ow(t),OE(t)]}clone(){return new OM(this.options)}}let OS=t=>new OM(t);OS.props={};class O_ extends OM{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:eJ,tickMethod:nn,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new O_(this.options)}}let OP=t=>new O_(t);OP.props={};class Oj extends eG{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!e1(t))return this.options.unknown;let e=eU(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new Oj(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let OA=t=>new Oj(t);OA.props={};class OT extends Oj{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:xz}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){n||t.sort((t,e)=>t-e);let r=[];for(let n=1;n<e;n+=1)r.push(function(t,e){let n=t.length;if(!n)return;if(n<2)return t[n-1];let r=(n-1)*e,i=Math.floor(r),o=t[i];return o+(t[i+1]-o)*(r-i)}(t,n/e));return r}(t,this.n+1,!1)}invert(t){let[e,n]=super.invert(t),{domain:r}=this.options,i=r[0],o=r[r.length-1];return void 0===e&&void 0===n?[e,n]:[e||i,n||o]}getThresholds(){return this.thresholds}clone(){return new OT(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}let OC=t=>new OT(t);OC.props={};class ON extends Oj{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:xz}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=e8(t,e,n)}}getTicks(){let{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();let{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){let[e,n]=super.invert(t),[r,i]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||i]}getThresholds(){return this.thresholds}clone(){return new ON(this.options)}}let OL=t=>new ON(t);OL.props={};let OI=t=>e=>{let n=t(e);return eE(n)?Math.round(n):n},OR=et=class extends nr{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ej,tickMethod:nn,tickCount:5}}constructor(t){super(t)}clone(){return new et(this.options)}};OR=et=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([(L=function(t){return[t(0),t(1)]},I=t=>{let[e,n]=t;return eV(eZ(0,1),eH(e,n))},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=L(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=I(n.map(t)),a=i?OI(r):r;this.output=eV(a,o,e,t)},t.prototype.invert=void 0})],OR);let OD=t=>new OR(t);OD.props={};class OF extends eG{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:nn}}map(t){let[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){let[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){let{tickMethod:t,domain:e,tickCount:n}=this.options,[r,i]=e;return eE(r)&&eE(i)?t(r,i,n):[]}clone(){return new OF(this.options)}}let OB=t=>new OF(t);function Oz({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:o,padding2:a,padding3:l,alpha90:s,alpha65:u,alpha45:c,alpha25:f,alpha10:p,category10:h,category20:d,sizeDefault:y=1,padding:g="auto",margin:v=16}){return{padding:g,margin:v,size:y,color:t,category10:h,category20:d,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:p,labelAlign:"horizontal",labelFill:e,labelOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:o,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:c,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:c,titleFill:e,titleOpacity:s,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[o,o],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:o,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:c,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:s,tickStroke:e,tickStrokeOpacity:c},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:e,titleFillOpacity:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:u,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}OB.props={};let OW=Oz({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),O$=t=>rN({},OW,t);O$.props={};let OG=t=>rN({},O$(),{category10:"category10",category20:"category20"},t);OG.props={};let OH=Oz({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"#141414",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),OV=t=>rN({},OH,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{".g2-tooltip":{background:"#1f1f1f",opacity:.95},".g2-tooltip-title":{color:"#A6A6A6"},".g2-tooltip-list-item-name-label":{color:"#A6A6A6"},".g2-tooltip-list-item-value":{color:"#A6A6A6"}}}},t),OU=t=>Object.assign({},OV(),{category10:"category10",category20:"category20"},t);OU.props={};let Oq=Oz({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),OY=t=>rN({},Oq,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(t,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);OY.props={};var OX=function(t){return null==t};function OK(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=eF(t,1)[0];return!e.includes(n)}));return Object.fromEntries(e.map(function(e){return"boolean"!=typeof t&&"enter"in t&&"update"in t&&"exit"in t?!1===t[e]?[e,!1]:[e,eN(eN({},t[e]),n)]:[e,n]}))}function OZ(t,e){t?t.finished.then(e):e()}function OQ(t,e){"update"in t?t.update(e):t.attr(e)}function OJ(t,e,n){return 0===e.length?null:n?t.animate(e,n):(OQ(t,{style:e.slice(-1)[0]}),null)}function O0(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=eF(e,2),o=n[0],a=n[1];if(!OX(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?OJ(t,[r,i],eN({fill:"both"},n)):(OQ(t,i),null)}var O1=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&vT(a)?(vT(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):vC(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},O2=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=eF(t,2),r=e[0],i=n(e[1]);return[r,{name:i,class:".".concat(i),id:"#".concat(i),toString:function(){return i}}]}));return Object.assign(r,{prefix:n}),r},O5={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new d1({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]};O1({},O5,{style:{type:"arc"}}),O1({},O5,{style:{}});var O3=O2({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis");function O4(t,e){return[t[0]*e,t[1]*e]}function O6(t,e){return[t[0]+e[0],t[1]+e[1]]}function O8(t,e){return[t[0]-e[0],t[1]-e[1]]}function O9(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function O7(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function wt(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function we(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function wn(t){return t*Math.PI/180}function wr(t){return Number((180*t/Math.PI).toPrecision(5))}function wi(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function wo(t,e,n){void 0===n&&(n=!0);var r,i=e||(null==(r=t.match(/^([a-z][a-z0-9]+)/))?void 0:r[0])||"",o=t.replace(new RegExp("^(".concat(i,")")),"");return n?o.toString().charAt(0).toLowerCase()+o.toString().slice(1):o}var wa=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function wl(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i=eF(t,2),o=i[0],a=i[1];if("className"===o||"class"===o);else if(wa(o,"show")&&wa(wo(o,"show"),e)!==n)o==="".concat("show").concat(wi(e))?r[o]=a:r[o.replace(new RegExp(wi(e)),"")]=a;else if(!wa(o,"show")&&wa(o,e)!==n){var l=wo(o,e);"filter"===l&&"function"==typeof a||(r[l]=a)}}),r}function ws(t,e){return Object.entries(t).reduce(function(t,n){var r=eF(n,2),i=r[0],o=r[1];return i.startsWith("show")?t["show".concat(e).concat(i.slice(4))]=o:t["".concat(e).concat(wi(i))]=o,t},{})}function wu(t,e){void 0===e&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(t).forEach(function(t){var o=eF(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function wc(t,e){return vk(t)?t.apply(void 0,ez([],eF(e),!1)):t}function wf(t,e){return t.style.opacity||(t.style.opacity=1),O0(t,{opacity:0},e)}var wp=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function wh(t){var e={};for(var n in t)wp.includes(n)&&(e[n]=t[n]);return e}var wd=O2({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function wy(t){return t.reduce(function(t,e,n){return t.push(ez([0===n?"M":"L"],eF(e),!1)),t},[])}function wg(t,e,n){if("surround"===e.type){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return wy(t);if(!i)return[];var o=wt(t[0],i),a=+!n;return t.reduce(function(t,e,n){return 0===n?t.push(ez(["M"],eF(e),!1)):t.push(ez(["A",o,o,0,0,a],eF(e),!1)),t},[])}return wy(t)}var wm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l=eL(t,["type","center","areaFill","closed"]),s=(r=void 0===(n=t.data)?[]:n,t.closed?r.map(function(t){var e=t.points,n=eF(e,1)[0];return eN(eN({},t),{points:ez(ez([],eF(e),!1),[n],!1)})}):r),u=v$(e).maybeAppendByClassName(wd.lineGroup,"g"),c=v$(e).maybeAppendByClassName(wd.regionGroup,"g"),f=(i=t.animate,o=t.isBillboard,a=s.map(function(e,n){return{id:e.id||"grid-line-".concat(n),path:wg(e.points,t)}}),u.selectAll(wd.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=wc(wh(eN({path:t.path},l)),[t,e,a]);this.attr(eN({class:wd.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:o},n))})},function(t){return t.transition(function(t,e){return O0(this,wc(wh(eN({path:t.path},l)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=wf(this,i.exit);return OZ(e,function(){return t.remove()}),e})}).transitions()),p=function(t,e,n){var r=n.animate,i=n.connect,o=n.areaFill;if(e.length<2||!o||!i)return[];for(var a=Array.isArray(o)?o:[o,"transparent"],l=[],s=0;s<e.length-1;s++){var u=eF([e[s].points,e[s+1].points],2),c=function(t,e,n){var r=n.type,i=n.connect,o=n.center,a=n.closed?[["Z"]]:[],l=eF([wg(t,n),wg(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=eF([t[0],e.slice(-1)[0]],2),f=c[0],p=c[1],h=function(t,e){return[s,t,u,e,a].flat()};if("line"===i||"surround"===r)return h([ez(["L"],eF(p),!1)],[ez(["L"],eF(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=eF([wt(p,o),wt(f,o)],2),y=d[0],g=d[1];return h([ez(["A",y,y,0,0,1],eF(p),!1),ez(["L"],eF(p),!1)],[ez(["A",g,g,0,0,0],eF(f),!1),ez(["L"],eF(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(wd.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=wc(t,[t,e,l]);this.attr(n)}).attr("className",wd.region.name)},function(t){return t.transition(function(t,e){return O0(this,wc(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=wf(this,r.exit);return OZ(e,function(){return t.remove()}),e})}).transitions()}(c,s,t);return ez(ez([],eF(f),!1),eF(p),!1)},e}(vF),wv=function(t,e,n){for(var r=0,i=vq(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},wb=function(t){return vA(t,"Number")};function wx(t){return"function"==typeof t?t():vq(t)||wb(t)?new vz({style:{text:String(t)}}):t}function wO(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=e/Math.max(r.width,r.height);return n&&t.scale(i),i}function ww(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)r.includes(i)||(n[i]=t[i]);return n}function wE(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=eF(t,2);return[n[0],wc(n[1],e)]}))}function wk(t,e){return e&&vk(e)?t.filter(e):t}function wM(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function wS(t,e){if("linear"===e.type){var n=eF(e.startPos,2),r=n[0],i=n[1],o=eF(e.endPos,2),a=eF([o[0]-r,o[1]-i],2);return we([a[0],a[1]])}var l=wn(wM(t,e));return[-Math.sin(l),Math.cos(l)]}function w_(t,e,n){var r;return r=wS(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function wP(t,e){return w_(t,e.labelDirection,e)}function wj(t,e){var n,r,i,o,a,l,s,u,c,f;return"linear"===e.type?(r=(n=eF(e.startPos,2))[0],i=n[1],o=eF(e.endPos,2),a=eF([o[0]-r,o[1]-i],2),[r+a[0]*t,i+a[1]*t]):(l=e.radius,u=(s=eF(e.center,2))[0],c=s[1],[u+l*Math.cos(f=wn(wM(t,e))),c+l*Math.sin(f)])}function wA(t){return 0===wS(0,t)[1]}function wT(t){return 0===wS(0,t)[0]}function wC(t,e,n,r,i){var o=e-t,a=eF([i,i],2),l=a[0],s=a[1],u=eF([wn(t),wn(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=eF(p(c),2),d=h[0],y=h[1],g=eF(p(f),2),v=g[0],b=g[1];if(e-t==360){var x=eF(p((f+c)/2),2);return[["M",d,y],["A",l,s,0,1,0,x[0],x[1]],["A",l,s,0,1,0,v,b]]}return"M".concat(d,",").concat(y,",A").concat(l,",").concat(s,",0,").concat(+(o>180),",").concat(t>e?0:1,",").concat(v,",").concat(b)}function wN(t){var e=eF(t,2),n=eF(e[0],2),r=n[0],i=n[1],o=eF(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function wL(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function wI(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!1),!!r&&t===e||!!i&&t===n||t>e&&t<n}var wR=function(t,e,n){if(void 0===n&&(n=128),!vk(t))throw TypeError("Expected a function");var r=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var l=t.apply(this,n);return a.set(o,l),l};return r.cache=function(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}(n),r}(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return en?en(t,n):(ee||(ee=dT.offscreenCanvasCreator.getOrCreateContext(void 0)),ee.font=[o,a,i,"".concat(n,"px"),r].join(" "),ee.measureText(t).width)},function(t,e){return[t,Object.values(e||wD(t)).join()].join("")},4096),wD=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,o=t.style.fontSize;return{fontSize:o="object"==typeof o?o.value:o,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function wF(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function wB(t,e){var n=wF(t);n&&n.attr(e)}function wz(t,e,n){void 0===n&&(n="..."),wB(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function wW(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){var i,o,a,l;return"translate(".concat((o=(i=t.getBBox()).width,a=i.height,[(l=eF([n,r].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?o:a):t}),2))[0],l[1]]),")")});t.attr("transform",n)}catch(t){}}var w$=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function wG(t){if(wb(t))return[t,t,t,t];if(vC(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var wH=function(){function t(t,e,n,r){this.set(t,e,n,r)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=this.y2,l=Math.cos(t),s=Math.sin(t),u=e-e*l+n*s,c=n-e*s-n*l;return[[l*r-s*a+u,s*r+l*a+c],[l*o-s*a+u,s*o+l*a+c],[l*r-s*i+u,s*r+l*i+c],[l*o-s*i+u,s*o+l*i+c]]},t.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function wV(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=eF(r.min,2),o=i[0],a=i[1],l=eF(r.max,2),s=l[0],u=l[1],c=wU(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=wF(t);if(v){p-=1.5;var b=v.style.textAlign,x=v.style.textBaseline;"center"===b?y=(o+s)/2:("right"===b||"end"===b)&&(y=s),"middle"===x?g=(a+u)/2:"bottom"===x&&(g=u)}var O=eF(wG(e),4),w=O[0],E=void 0===w?0:w,k=O[1],M=void 0===k?0:k,S=O[2],_=O[3],P=new wH((h+=o)-(void 0===_?M:_),(d+=a)-E,h+f+M,d+p+(void 0===S?E:S));return t.setEulerAngles(n),P.rotatedPoints(wn(n),y,g)}function wU(t){return t.__bbox__?t.__bbox__:t.getBBox()}function wq(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function wY(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function wX(t,e,n){var r,i,o=e.crossPadding,a=new Set,l=null,s=function(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if("arc"===n){var o=t.center,a=t.radius,l=eF(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=eF(wG(e),4),d=h[0],y=h[1],g=h[2];return new wH(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=eF(t.startPos,2),b=v[0],x=v[1],O=eF(t.endPos,2),w=O[0],E=O[1],k=eF(wT(t)?[-e,0,e,0]:[0,e,0,-e],4),M=k[0],S=k[1],_=k[2],P=k[3],j=O4(wP(0,t),i),A=new wH(b,x,w,E);return A.x1+=P,A.y1+=M,A.x2+=S+j[0],A.y2+=_+j[1],A}(e,o);try{for(var u=eD(t),c=u.next();!c.done;c=u.next()){var f,p=c.value;!function(t){if(s){var e,n,r,i,o,a;return e=s.x1,n=s.x2,r=s.y1,i=s.y2,o=wV(t,void 0),a=[[e,r],[n,r],[n,i],[e,i]],o.every(function(t){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,o=0;do{var a=[t[o],t[(o+1)%n]];if(function(t,e){var n=wY(t[0],t[1],e[0]),r=wY(t[0],t[1],e[1]),i=wY(e[0],e[1],t[0]),o=wY(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&wq(t,e[0])||0===r&&wq(t,e[1])||0===i&&wq(e,t[0])||0===o&&wq(e,t[1]))}(a,r)){if(0===wY(a[0],e,a[1]))return wq(a,e);i++}o=(o+1)%n}while(0!==o);return!!(1&i)}(a,t)})}return!0}(p)?a.add(p):l&&(f=l,f?function(t,e,n){var r,i,o=wV(t,n).flat(1),a=wV(e,n).flat(1),l=[[o[0],o[1],o[2],o[3]],[o[0],o[1],o[4],o[5]],[o[4],o[5],o[6],o[7]],[o[2],o[3],o[6],o[7]]];try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value;if(function(t,e){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return function(t,e){var n=eF(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eF(e,4),s=l[0],u=l[1],c=l[2],f=l[3],p=o-r,h=a-i,d=c-s,y=f-u,g=p*y-d*h;if(0===g)return!1;var v=g>0,b=r-s,x=i-u,O=p*x-h*b;if(O<0===v)return!1;var w=d*x-y*b;return w<0!==v&&O>g!==v&&w>g!==v}(e,t)})}(a,c))return!0}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return!1}(f,p,wG(n)):0)?(a.add(l),a.add(p)):l=p}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return Array.from(a)}function wK(t,e){return(void 0===e&&(e={}),OX(t))?0:"number"==typeof t?t:Math.floor(wR(t,e))}function wZ(t){var e=t.getLocalBounds(),n=eF([e.min,e.max],2),r=eF(n[0],2),i=r[0],o=r[1],a=eF(n[1],2),l=a[0],s=a[1];return{x:i,y:o,width:l-i,height:s-o,left:i,bottom:s,top:o,right:l}}function wQ(t,e){var n=eF(t,2),r=n[0],i=n[1],o=eF(e,2),a=o[0],l=o[1];return r!==a&&i===l}var wJ={parity:function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(vS(t),!1)})}},w0=new Map([["hide",function(t,e,n,r){var i,o,a=t.length,l=e.keepHeader,s=e.keepTail;if(!(a<=1)&&(2!==a||!l||!s)){var u=wJ.parity,c=function(t){return t.forEach(r.show),t},f=2,p=t.slice(),h=t.slice(),d=Math.min.apply(Math,ez([1],eF(t.map(function(t){return wU(t).width})),!1));if("linear"===n.type&&(wA(n)||wT(n))){var y=wZ(t[0]).left,g=Math.abs(wZ(t[a-1]).right-y)||1;f=Math.max(Math.floor(a*d/g),f)}for(l&&(i=p.splice(0,1)[0]),s&&(o=p.splice(-1,1)[0],p.reverse()),c(p);f<t.length&&wX((o?ez(ez([o],eF(h),!1),[i],!1):ez([i],eF(h),!1)).filter(w$),n,null==e?void 0:e.margin).length;){if(o&&!i&&f%2==0){var v=p.splice(0,1);v.forEach(r.hide)}else if(o&&i){var v=p.splice(0,1);v.forEach(r.hide)}h=u(c(p),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=eD(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),wX(t,n,l).length<1)return}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}(void 0===s||s)&&c(u)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1)){var i=e.suffix,o=void 0===i?"...":i,a=e.minLength,l=e.maxLength,s=void 0===l?1/0:l,u=e.step,c=e.margin,f=void 0===c?[0,0,0,0]:c,p=wD(r.getTextShape(t[0])),h=wK(void 0===u?" ":u,p),d=a?wK(a,p):h,y=wK(s,p);(OX(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return wU(t).width})));for(var g=t.slice(),v=eF(f,4),b=(v[0],v[1],v[2],v[3],function(e){if(g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=wX(t,n,f)).length<1)return{value:void 0}}),x=y;x>d+h;x-=h){var O=b(x);if("object"==typeof O)return O.value}}}],["wrap",function(t,e,n,r){var i,o,a=e.wordWrapWidth,l=void 0===a?50:a,s=e.maxLines,u=void 0===s?3:s,c=e.recoverWhenFailed,f=e.margin,p=void 0===f?[0,0,0,0]:f,h=t.map(function(t){return t.attr("maxLines")||1}),d=Math.min.apply(Math,ez([],eF(h),!1)),y=(i=n.type,o=n.labelDirection,"linear"===i&&wA(n)?"negative"===o?"bottom":"top":"middle"),g=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,l,i,y)})};if(!(d>u)){for(var v=d;v<=u;v++)if(g(v),wX(t,n,p).length<1)return;(void 0===c||c)&&g(h)}}]]);function w1(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function w2(t,e){var n=eF(t,2),r=n[0],i=n[1],o=eF(e,2),a=o[0],l=o[1],s=eF([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function w5(t,e,n){var r=n.type,i=n.labelAlign,o=wP(t,n),a=w1(e),l=w1(wr(w2([1,0],o))),s="center",u="middle";return"linear"===r?[90,270].includes(l)&&0===a?(s="center",u=1===o[1]?"top":"bottom"):!(l%180)&&[90,270].includes(a)?s="center":0===l?wI(a,0,90,!1,!0)?s="start":(wI(a,0,90)||wI(a,270,360))&&(s="start"):90===l?wI(a,0,90,!1,!0)?s="start":(wI(a,90,180)||wI(a,270,360))&&(s="end"):270===l?wI(a,0,90,!1,!0)?s="end":(wI(a,90,180)||wI(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(wI(a,0,90)||wI(a,270,360))&&(s="end")):"parallel"===i?u=wI(l,0,180,!0)?"top":"bottom":"horizontal"===i?wI(l,90,270,!1)?s="end":(wI(l,270,360,!1)||wI(l,0,90))&&(s="start"):"perpendicular"===i&&(s=wI(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function w3(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=wc(l,[t,s,e]),c=eF([wP(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(a,o)],2),f=eF(O6(O4(c[0],u+(1===c[1]?wc(r?i:0,[t,s,e]):0)),wj(t.value,n)),2);return{x:f[0],y:f[1]}}function w4(t,e){"text"===t.nodeName&&t.attr(e)}function w6(t){var e,n,r,i;e=this.node().childNodes,n={hide:vS,show:vM,rotate:function(e,n){var r,i,o;r=+n,e.setLocalEulerAngles(r),i=w5(e.__data__.value,r,t),(o=e.querySelector(O3.labelItem.class))&&w4(o,i)},ellipsis:function(t,e,n){t&&wz(t,e||1/0,n)},wrap:function(t,e,n){var r,i;t&&(void 0===(r=n)&&(r=2),void 0===i&&(i="top"),wB(t,{wordWrap:!0,wordWrapWidth:e,maxLines:r,textBaseline:i}))},getTextShape:function(t){return t.querySelector("text")}},(i=void 0===(r=t.labelOverlap)?[]:r).length&&i.forEach(function(r){var i=r.type,o=w0.get(i);t.labelOverlap.length<1||("hide"===i?function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(e[0]):"rotate"===i?e.some(function(t){var e;return!!(null==(e=t.attr("transform"))?void 0:e.includes("rotate"))}):("ellipsis"===i||"wrap"===i)&&!(e.filter(function(t){return t.querySelector("text")}).length>1))||null==o||o(e,r,t,n)})}function w8(t,e,n,r,i){var o,a=n.indexOf(e),l=v$(t).append(vk(o=i.labelFormatter)?function(){return wx(wc(o,[e,a,n,wP(e.value,i)]))}:function(){return wx(e.label||"")}).attr("className",O3.labelItem.name).node(),s=eF(wu(wE(r,[e,a,n])),2),u=s[0],c=s[1],f=c.transform,p=eL(c,["transform"]);wW(t,f);var h=function(t,e,n){var r,i,o=n.labelAlign;if(null==(i=e.style.transform)?void 0:i.includes("rotate"))return e.getLocalEulerAngles();var a=0,l=wP(t.value,n),s=wS(t.value,n);return"horizontal"===o?0:(wI(r=(wr(a="perpendicular"===o?w2([1,0],l):w2([s[0]<0?-1:1,0],s))+360)%180,-90,90)||(r+=180),r)}(e,t,i);return t.setLocalEulerAngles(+h),w4(l,eN(eN({},w5(e.value,h,i)),u)),wW(t,f),t.attr(p),l}function w9(t,e){return w_(t,e.tickDirection,e)}function w7(t,e,n,r,i,o){var a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_=(a=v$(this),l=r.tickFormatter,s=w9(t.value,r),u="line",vk(l)&&(u=function(){return wc(l,[t,e,n,s])}),a.append(u).attr("className",O3.tickItem.name));c=w9(t.value,r),x=(h=eF((f=wc(r.tickLength,[t,e,n]),[[0,0],[(p=eF(c,2))[0]*f,p[1]*f]]),2),y=(d=eF(h[0],2))[0],g=d[1],b={x1:y,x2:(v=eF(h[1],2))[0],y1:g,y2:v[1]}).x1,O=b.x2,w=b.y1,E=b.y2,M=(k=eF(wu(wE(i,[t,e,n,c])),2))[0],S=k[1],"line"===_.node().nodeName&&_.styles(eN({x1:x,x2:O,y1:w,y2:E},M)),this.attr(S),_.styles(M);var P=eF(wj(t.value,r),2);return O0(this,{x:P[0],y:P[1]},o)}var Et=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}(),Ee=O2({text:"text"},"title");function En(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function Er(t,e){var n=Object.entries(e).reduce(function(e,n){var r=eF(n,2),i=r[0],o=r[1];return t.node().attr(i)||(e[i]=o),e},{});t.styles(n)}var Ei=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return eC(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,o=t.inset,a=this.querySelector(Ee.text.class);if(!a)return new Et(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=eF(wG(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eF([0,0,+e,+n],4),g=y[0],v=y[1],b=y[2],x=y[3],O=En(r);if(O.includes("i"))return new Et(g,v,b,x);O.forEach(function(t,r){var i,o;"t"===t&&(v=(i=eF(0===r?[u+h,+n-u-h]:[0,+n],2))[0],x=i[1]),"r"===t&&(b=eF([+e-s-d],1)[0]),"b"===t&&(x=eF([+n-u-f],1)[0]),"l"===t&&(g=(o=eF(0===r?[s+p,+e-s-p]:[0,+e],2))[0],b=o[1])});var w=eF(wG(o),4),E=w[0],k=w[1],M=w[2],S=w[3],_=eF([S+k,E+M],2),P=_[0],j=_[1];return new Et(g+S,v+E,b-P,x-j)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Et(0,0,0,0)},e.prototype.render=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g=this;t.width,t.height,t.position,t.spacing;var v=eL(t,["width","height","position","spacing"]),b=eF(wu(v),1)[0],x=(a=t.width,l=t.height,s=t.position,u=eF([+a/2,+l/2],2),f=(c=eF([+u[0],+u[1],"center","middle"],4))[0],p=c[1],h=c[2],d=c[3],(y=En(s)).includes("l")&&(f=(n=eF([0,"start"],2))[0],h=n[1]),y.includes("r")&&(f=(r=eF([+a,"end"],2))[0],h=r[1]),y.includes("t")&&(p=(i=eF([0,"top"],2))[0],d=i[1]),y.includes("b")&&(p=(o=eF([+l,"bottom"],2))[0],d=o[1]),{x:f,y:p,textAlign:h,textBaseline:d}),O=x.x,w=x.y,E=x.textAlign,k=x.textBaseline;vB(!!v.text,v$(e),function(t){g.title=t.maybeAppendByClassName(Ee.text,"text").styles(b).call(Er,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(vF);function Eo(t,e,n,r,i){var o=eF(wu(wl(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=eL(l,["transform"]);t.styles(a),e.styles(u);var c=s||function(t,e,n){var r=t.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(i/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(i/2,")")}return""}(t.node(),a.direction,a.position);wW(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=En(i),l=t.node().getLocalBounds(),s=eF(l.min,2),u=s[0],c=s[1],f=eF(l.halfExtents,2),p=f[0],h=f[1],d=eF(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=eF([u+p,c+h],2),b=v[0],x=v[1],O=eF(wG(o),4),w=O[0],E=O[1],k=O[2],M=O[3];if(["start","end"].includes(i)&&"linear"===n.type){var S=n.startPos,_=n.endPos,P=eF("start"===i?[S,_]:[_,S],2),j=P[0],A=P[1],T=eF(O4(we([-A[0]+j[0],-A[1]+j[1]]),w),2),C=T[0],N=T[1];return{x:j[0]+C,y:j[1]+N}}return a.includes("t")&&(x-=h+g+w),a.includes("r")&&(b+=p+y+E),a.includes("l")&&(b-=p+2*y+M),a.includes("b")&&(x+=h+2*g+k),{x:b,y:x}}(v$(n._offscreen||n.querySelector(O3.mainGroup.class)),e,r),p=f.x,h=f.y,d=O0(e.node(),{x:p,y:h},i);return wW(t.node(),c),d}function Ea(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=vB(i,e.maybeAppendByClassName(O3.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u=e.type,c=wl(e,"line");return"linear"===u?s=function(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E=e.showTrunc,k=e.startPos,M=e.endPos,S=e.truncRange,_=e.lineExtension,P=eF([k,M],2),j=eF(P[0],2),A=j[0],T=j[1],C=eF(P[1],2),N=C[0],L=C[1],I=eF(_?(void 0===(i=_)&&(i=[0,0]),o=eF([k,M,i],3),l=(a=eF(o[0],2))[0],s=a[1],c=(u=eF(o[1],2))[0],f=u[1],h=(p=eF(o[2],2))[0],d=p[1],g=(y=eF([c-l,f-s],2))[0],[(O=(x=eF([-h/(b=Math.sqrt(Math.pow(g,2)+Math.pow(v=y[1],2))),d/b],2))[0])*g,O*v,(w=x[1])*g,w*v]):[,,,,].fill(0),4),R=I[0],D=I[1],F=I[2],B=I[3],z=function(e){return t.selectAll(O3.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(O3.line.name," ").concat(t.className)}).styles(n).transition(function(t){return O0(this,wN(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return O0(this,wN(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!E||!S)return z([{line:[[A+R,T+D],[N+F,L+B]],className:O3.line.name}]);var W=eF(S,2),$=W[0],G=W[1],H=N-A,V=L-T,U=eF([A+H*$,T+V*$],2),q=U[0],Y=U[1],X=eF([A+H*G,T+V*G],2),K=X[0],Z=X[1],Q=z([{line:[[A+R,T+D],[q,Y]],className:O3.lineFirst.name},{line:[[K,Z],[N+F,L+B]],className:O3.lineSecond.name}]);return e.truncRange,e.truncShape,e.lineExtension,Q}(t,e,ww(c,"arrow"),n):(r=ww(c,"arrow"),i=e.startAngle,o=e.endAngle,a=e.center,l=e.radius,s=t.selectAll(O3.line.class).data([{path:wC.apply(void 0,ez(ez([i,o],eF(a),!1),[l],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",O3.line.name).styles(e).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,e,r,s,u,c=this,f=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,o=function t(e,n){var r,i,o,a,l,s;return"number"==typeof e&&"number"==typeof n?function(t){return e*(1-t)+n*t}:Array.isArray(e)&&Array.isArray(n)?(r=n?n.length:0,i=e?Math.min(r,e.length):0,function(o){var a=Array(i),l=Array(r),s=0;for(s=0;s<i;++s)a[s]=t(e[s],n[s]);for(;s<r;++s)l[s]=n[s];for(s=0;s<i;++s)l[s]=a[s](o);return l}):"object"==typeof e&&"object"==typeof n?(void 0===(o=e)&&(o={}),void 0===(a=n)&&(a={}),l={},s={},Object.entries(a).forEach(function(e){var n=eF(e,2),r=n[0],i=n[1];r in o?l[r]=t(o[r],i):s[r]=i}),function(t){return Object.entries(l).forEach(function(e){var n=eF(e,2),r=n[0],i=n[1];return s[r]=i(t)}),s}):function(t){return e}}(e,n),a=Array(Math.ceil(+(void 0===i?0:i)/16)).fill(0).map(function(t,e,n){return{__keyframe_data__:o(e/(n.length-1))}});return t.animate(a,eN({fill:"both"},r))}(this,(e=(t=this.attributes).startAngle,r=t.endAngle,s=t.center,u=t.radius,ez(ez([e,r],eF(s),!1),[u],!1)),ez(ez([i,o],eF(a),!1),[l],!1),n.update);if(f){var p=function(){var t=wv(c.attributes,"__keyframe_data__");c.style.path=wC.apply(void 0,ez([],eF(t),!1))};f.onframe=p,f.onfinish=p}return f}).styles(e)},function(t){return t.remove()}).styles(r).transitions()),!function(t,e,n,r){var i,o,a=n.showArrow,l=n.showTrunc,s=n.lineArrow,u=n.lineArrowOffset,c=n.lineArrowSize;if(o="arc"===e?t.select(O3.line.class):l?t.select(O3.lineSecond.class):t.select(O3.line.class),!a||!s||"arc"===n.type&&(i=n.startAngle,n.endAngle-i==360)){var f=o.node();f&&(f.style.markerEnd=void 0);return}var p=wx(s);p.attr(r),wO(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,u,e,c),s}(e,t,r)})||[],s=vB(o,e.maybeAppendByClassName(O3.tickGroup,"g"),function(e){var i,o;return i=wk(n,t.tickFilter),o=wl(t,"tick"),e.selectAll(O3.tick.class).data(i,function(t){return t.id||t.label}).join(function(e){return e.append("g").attr("className",O3.tick.name).transition(function(e,n){return w7.call(this,e,n,i,t,o,!1)})},function(e){return e.transition(function(e,n){return this.removeChildren(),w7.call(this,e,n,i,t,o,r.update)})},function(t){return t.transition(function(){var t=this,e=wf(this.childNodes[0],r.exit);return OZ(e,function(){return t.remove()}),e})}).transitions()})||[],u=vB(a,e.maybeAppendByClassName(O3.labelGroup,"g"),function(e){var i,o;return i=wk(n,t.labelFilter),o=wl(t,"label"),e.selectAll(O3.label.class).data(i,function(t,e){return e}).join(function(r){return r.append("g").attr("className",O3.label.name).transition(function(e){return w8(this,e,n,o,t),this.attr(w3(e,n,t)),this.__bbox__=e.bbox,null}).call(function(){return w6.call(e,t)})},function(i){return i.transition(function(e){var i=function(t,e,n,r){if(void 0===r&&(r="destroy"),"text"===t.nodeName&&"text"===e.nodeName&&t.attributes.text===e.attributes.text&&1)return t.remove(),[null];var i=function(){"destroy"===r?t.destroy():"hide"===r&&vS(t),e.isVisible()&&vM(e)};if(!n)return i(),[null];var o=n.duration,a=void 0===o?0:o,l=n.delay,s=void 0===l?0:l,u=Math.ceil(+a/2),c=+a/4,f=function(t){if("circle"===t.nodeName){var e=eF(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},p=eF(f(t),2),h=p[0],d=p[1],y=eF(f(e),2),g=eF([(h+y[0])/2-h,(d+y[1])/2-d],2),v=g[0],b=g[1],x=t.style.opacity,O=e.style.opacity,w=t.animate([{opacity:void 0===x?1:x,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(v,", ").concat(b,")")}],eN(eN({fill:"both"},n),{duration:s+u+c})),E=e.animate([{opacity:0,transform:"translate(".concat(-v,", ").concat(-b,")"),offset:.01},{opacity:void 0===O?1:O,transform:"translate(0, 0)"}],eN(eN({fill:"both"},n),{duration:u+c,delay:s+u-c}));return OZ(E,i),[w,E]}(this.querySelector(O3.labelItem.class),w8(this,e,n,o,t),r.update),a=O0(this,w3(e,n,t),r.update);return this.__bbox__=e.bbox,ez(ez([],eF(i),!1),[a],!1)}).call(function(n){var r,i;r=wv(n,"_transitions").flat().filter(w$),i=function(){return w6.call(e,t)},0===r.length?i():Promise.all(r.map(function(t){return null==t?void 0:t.finished})).then(i)})},function(t){return t.transition(function(){var t=this,e=wf(this.childNodes[0],r.exit);return OZ(e,function(){return v$(t).remove()}),e})}).transitions()})||[];return ez(ez(ez([],eF(l),!1),eF(s),!1),eF(u),!1).filter(function(t){return!!t})}var El=function(t){function e(e){return t.call(this,e,O5)||this}return eC(e,t),e.prototype.render=function(t,e,n){var r=this,i=t.titleText,o=t.data,a=t.animate,l=t.showTitle,s=t.showGrid,u=t.dataThreshold,c=t.truncRange,f=(function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r})(o,u).filter(function(t){var e=t.value;return!c||!(e>c[0])||!(e<c[1])}),p=OK(void 0===n?a:n),h=vB(s,v$(e).maybeAppendByClassName(O3.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u;return r=(n=wl(t,"grid")).type,i=n.areaFill,o=wL(t),a=wk(f,t.gridFilter),s="segment"===r?(l=t.gridLength,a.map(function(e,n){var r=e.value,i=eF(wj(r,t),2),o=i[0],a=i[1],s=eF(O4(w_(r,t.gridDirection,t),l),2);return{id:n,points:[[o,a],[o+s[0],a+s[1]]]}})):function(t,e){var n=e.gridControlAngles,r=wL(e);if(!r)throw Error("grid center is not provide");if(t.length<2)throw Error("Invalid grid data");if(!n||0===n.length)throw Error("Invalid gridControlAngles");var i=eF(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=eF(wj(t.value,e),2),l=eF([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=wn(t),n=eF([Math.cos(e),Math.sin(e)],2),r=n[0],i=n[1];c.push([s*r-u*i+o,s*i+u*r+a])}),{points:c,id:r}})}(a,t),u=eN(eN({},n),{center:o,areaFill:vk(i)?a.map(function(t,e){return wc(i,[t,e,a])}):i,animate:p,data:s}),e.selectAll(O3.grid.class).data([1]).join(function(t){return t.append(function(){return new wm({style:u})}).attr("className",O3.grid.name)},function(t){return t.transition(function(){return this.update(u)})},function(t){return t.remove()}).transitions()})||[],d=v$(e).maybeAppendByClassName(O3.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&Ea(t,v$(this.offscreenGroup),f,OK(!1));var y=Ea(t,v$(d.node()),f,p),g=vB(l,v$(e).maybeAppendByClassName(O3.titleGroup,"g"),function(e){var n;return n=t.titleText,e.selectAll(O3.title.class).data([{title:n}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(i){return i.append(function(){return wx(n)}).attr("className",O3.title.name).transition(function(){return Eo(v$(this),e,r,t,p.enter)})},function(n){return n.transition(function(){return Eo(v$(this),e,r,t,p.update)})},function(t){return t.remove()}).transitions()})||[];return ez(ez(ez([],eF(h),!1),eF(y),!1),eF(g),!1).flat().filter(function(t){return!!t})},e}(vF),Es=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},Eu=function(t,e){if(t){if(rA(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(Es(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},Ec=function(t,e,n){if(!rA(t)&&!rC(t))return t;var r=n;return Eu(t,function(t,n){r=e(r,t,n)}),r},Ef=function(t,e){return Ec(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})};function Ep(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var Eh=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ed(t){var e;if(!(e=Eh.exec(t)))throw Error("invalid format: "+t);return new Ey({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ey(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Eg(t,e){var n=Ep(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+Array(i-r.length+2).join("0")}Ed.prototype=Ey.prototype,Ey.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Em={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Eg(100*t,e),r:Eg,s:function(t,e){var n=Ep(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(er=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+Array(1-o).join("0")+Ep(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ev(t){return t}var Eb=Array.prototype.map,Ex=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function EO(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++){var a=t[o],l=a.x,s=a.y,u=eF([l+a.width,s+a.height],2),c=u[0],f=u[1];l<e&&(e=l),s<n&&(n=s),c>r&&(r=c),f>i&&(i=f)}return new Et(e,n,r-e,i-n)}eo=(ei=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?Ev:(e=Eb.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[a=(a+1)%e.length];return o.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ev:(r=Eb.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return r[+t]})}),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function p(t){var e=(t=Ed(t)).fill,n=t.align,r=t.sign,p=t.symbol,h=t.zero,d=t.width,y=t.comma,g=t.precision,v=t.trim,b=t.type;"n"===b?(y=!0,b="g"):Em[b]||(void 0===g&&(g=12),v=!0,b="g"),(h||"0"===e&&"="===n)&&(h=!0,e="0",n="=");var x="$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",O="$"===p?a:/[%p]/.test(b)?u:"",w=Em[b],E=/[defgprs%]/.test(b);function k(t){var o,a,u,p=x,k=O;if("c"===b)k=w(t)+k,t="";else{var M=(t*=1)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),g),v&&(t=function(t){e:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break e;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==r&&(M=!1),p=(M?"("===r?r:c:"-"===r||"("===r?"":r)+p,k=("s"===b?Ex[8+er/3]:"")+k+(M&&"("===r?")":""),E){for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){k=(46===u?l+t.slice(o+1):t.slice(o))+k,t=t.slice(0,o);break}}}y&&!h&&(t=i(t,1/0));var S=p.length+t.length+k.length,_=S<d?Array(d-S+1).join(e):"";switch(y&&h&&(t=i(_+t,_.length?d-k.length:1/0),_=""),n){case"<":t=p+t+k+_;break;case"=":t=p+_+t+k;break;case"^":t=_.slice(0,S=_.length>>1)+p+t+k+_.slice(S);break;default:t=_+p+t+k}return s(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:p,formatPrefix:function(t,e){var n,r=p(((t=Ed(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=Ep(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=Ex[8+i/3];return function(t){return r(o*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,ei.formatPrefix;var Ew=function(t,e,n){var r=t.width,i=t.height,o=n.flexDirection,a=void 0===o?"row":o,l=(n.flexWrap,n.justifyContent),s=void 0===l?"flex-start":l,u=(n.alignContent,n.alignItems),c=void 0===u?"flex-start":u,f="row"===a,p="row"===a||"column"===a,h=f?p?[1,0]:[-1,0]:p?[0,1]:[0,-1],d=eF([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=eF([y,g],2),o=i[0],a=i[1];return y=(e=eF([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new Et(o,a,n,r)}),b=EO(v),x={"flex-start":0,"flex-end":f?r-b.width:i-b.height,center:f?(r-b.width)/2:(i-b.height)/2},O=v.map(function(t){var e=t.x,n=t.y,r=Et.fromRect(t);return r.x=f?e+x[s]:e,r.y=f?n:n+x[s],r});EO(O);var w=function(t){var e=eF(f?["height",i]:["width",r],2),n=e[0],o=e[1];switch(c){case"flex-start":default:return 0;case"flex-end":return o-t[n];case"center":return o/2-t[n]/2}};return O.map(function(t){var e=t.x,n=t.y,r=Et.fromRect(t);return r.x=f?e:e+w(r),r.y=f?n+w(r):n,r}).map(function(e){var n,r,i=Et.fromRect(e);return i.x+=null!=(n=t.x)?n:0,i.y+=null!=(r=t.y)?r:0,i})},EE=function(t,e,n){return[]},Ek=function(t,e,n){if(0===e.length)return[];var r={flex:Ew,grid:EE},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},EM=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[t6.BOUNDS_CHANGED,t6.INSERTED,t6.REMOVED],n.$margin=wG(0),n.$padding=wG(0);var r=e.style||{},i=r.margin,o=r.padding;return n.margin=void 0===i?0:i,n.padding=void 0===o?0:o,n.isMutationObserved=!0,n.bindEvents(),n}return eC(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=wG(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=wG(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=t.y,r=t.width,i=t.height,o=eF(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new Et((void 0===e?0:e)-u,(void 0===n?0:n)-a,r+u+l,i+a+s)},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=eF(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=eF(this.$margin,4),u=s[0];return new Et(l+s[3],i+u,e-l-o,n-i-a)},e.prototype.layout=function(){if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{var t=Ek(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(e,n){var r=t[n],i=r.x,o=r.y;e.attr({x:i,y:o})})}catch(t){}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target.isMutationObserved=!0,t.layout()})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(dZ),ES=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function E_(t,e,n){return t.querySelector(e)?gs(t).select(e):gs(t).append(n)}function EP(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function Ej(t,e){let{flexDirection:n,justifyContent:r,alignItems:i}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in o&&([n,r,i]=o[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:i},e)}class EA extends EM{get child(){var t;return null==(t=this.children)?void 0:t[0]}update(t){var e;this.attr(t);let{subOptions:n}=t;null==(e=this.child)||e.update(n)}}class ET extends EA{update(t){var e;let{subOptions:n}=t;this.attr(t),null==(e=this.child)||e.update(n)}}function EC(t,e){var n;return null==(n=t.filter(t=>t.getOptions().name===e))?void 0:n[0]}function EN(t,e,n){let{bbox:r}=t,{position:i="top",size:o,length:a}=e,l=["top","bottom","center"].includes(i),[s,u]=l?[r.height,r.width]:[r.width,r.height],{defaultSize:c,defaultLength:f}=n.props,p=o||c||s,h=a||f||u,[d,y]=l?[h,p]:[p,h];return{orientation:l?"horizontal":"vertical",width:d,height:y,size:p,length:h}}function EL(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=ES(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${na(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}var EI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ER(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function ED(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function EF(t,e,n,r,i,o,a,l){var s;(void 0!==n||void 0!==o)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),o&&{tickMethod:o}));let u=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;let[r,i]=gx(e,t=>+t),{tickCount:o}=t.getOptions();return n(r,i,o)}(t,e,o),c=i?u.filter(i):u,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),p=r||(null==(s=t.getFormatter)?void 0:s.call(t))||f,h=function(t,e){if(sY(e))return t=>t;let{innerWidth:n,innerHeight:r,insetTop:i,insetBottom:o,insetLeft:a,insetRight:l}=e.getOptions(),[s,u,c]="left"===t||"right"===t?[i,o,r]:[a,l,n],f=new nr({domain:[0,1],range:[s/c,1-u/c]});return t=>f.map(t)}(a,l),d=function(t,e){let{width:n,height:r}=e.getOptions();return i=>{if(!sQ(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new nr({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new nr({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["top","bottom","center","outer"].includes(t),g=t=>["left","right"].includes(t);return sY(l)||sq(l)?c.map((e,n,r)=>{var i,o;let s=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,u=h(t.map(e)+s);return{value:sX(l)&&"center"===a||sq(l)&&(null==(o=t.getTicks)?void 0:o.call(t))&&y(a)||sq(l)&&g(a)?1-u:u,label:f(p(gv(e),n,r)),id:String(n)}}):c.map((e,n,r)=>{var i;let o=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,l=d(h(t.map(e)+o));return{value:g(a)?1-l:l,label:f(p(gv(e),n,r)),id:String(n)}})}let EB=t=>e=>{let{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var o;let{scales:[a]}=i,l=(null==(o=a.getTicks)?void 0:o.call(a))||a.getOptions().domain,s="string"==typeof n?eo(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},Ez=EB(t=>{let{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:o,actualPosition:a,position:l,size:s,style:u={},title:c,tickCount:f,tickFilter:p,tickMethod:h,transform:d,indexBBox:y}=t,g=EI(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:i,value:v,coordinate:b,theme:x})=>{var O;let{bbox:w}=v,[E]=i,{domain:k,xScale:M}=E.getOptions(),S=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i,o){let a=function(t,e,n,r,i,o){let a=n.axis,l=["top","right","bottom","left"].includes(i)?n[`axis${rD(i)}`]:n.axisLinear,s=t.getOptions().name;return Object.assign({},a,l,n[`axis${na(s)}`]||{})}(t,0,n,0,i,0);if("center"===i)return Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:4*("center"!==r),titleSpacing:10*("vertical"===o||o===-Math.PI/2),tick:"center"!==r&&void 0});return a}(E,0,x,e,l,o)),u),g),_=function(t,e,n="xy"){let[r,i,o]=ED(e);return"xy"===n?t.includes("bottom")||t.includes("top")?i:r:"xz"===n?t.includes("bottom")||t.includes("top")?o:r:t.includes("bottom")||t.includes("top")?i:o}(a||l,b,t.plane),P=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=n;if("bottom"===t)return{startPos:[o,a],endPos:[o+l,a]};if("left"===t)return{startPos:[o+l,a+s],endPos:[o+l,a]};if("right"===t)return{startPos:[o,a+s],endPos:[o,a]};if("top"===t)return{startPos:[o,a+s],endPos:[o+l,a+s]};if("center"===t){if("vertical"===e)return{startPos:[o,a],endPos:[o,a+s]};else if("horizontal"===e)return{startPos:[o,a],endPos:[o+l,a]};else if("number"==typeof e){let[t,n]=r.getCenter(),[u,c]=s0(r),[f,p]=s1(r),h=Math.min(l,s)/2,{insetLeft:d,insetTop:y}=r.getOptions(),g=u*h,v=c*h,[b,x]=[t+o-d,n+a-y],[O,w]=[Math.cos(e),Math.sin(e)],E=sY(r)&&i?(()=>{let{domain:t}=i.getOptions();return t.length})():3;return{startPos:[b+v*O,x+v*w],endPos:[b+g*O,x+g*w],gridClosed:1e-6>Math.abs(p-f-360),gridCenter:[b,x],gridControlAngles:Array(E).fill(0).map((t,e,n)=>(p-f)/E*e)}}}return{}}(l,o,w,b,M),j=function(t){let{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(b),A=EF(E,k,f,r,p,h,l,b),T=y?A.map((t,e)=>{let n=y.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):A,C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},S),{type:"linear",data:T,crossSize:s,titleText:EP(c),labelOverlap:function(t=[],e){if(t.length>0)return t;let{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:o}=e,a=[],l=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return l({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),l({type:"ellipsis",minLength:20},i),l({type:"hide"},r),l({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},o),a}(d,S),grid:(O=S.grid,!(sY(b)&&sq(b)||sZ(b))&&(void 0===O?!!E.getTicks:O)),gridLength:_,line:!0,indexBBox:y}),S.line?null:{lineOpacity:0}),P),j),n);return C.labelOverlap.find(t=>"hide"===t.type)&&(C.crossSize=!1),new El({className:"axis",style:EL(C)})}}),EW=EB(t=>{let{order:e,size:n,position:r,orientation:i,labelFormatter:o,tickFilter:a,tickCount:l,tickMethod:s,important:u={},style:c={},indexBBox:f,title:p,grid:h=!1}=t,d=EI(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[t],value:e,coordinate:n,theme:i})=>{let{bbox:c}=e,{domain:y}=t.getOptions(),g=EF(t,y,l,o,a,s,r,n),v=f?g.map((t,e)=>{let n=f.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):g,[b,x]=s0(n),O=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=e,u=[o+l/2,a+s/2],c=Math.min(l,s)/2,[f,p]=s1(i),[h,d]=ED(i),y={center:u,radius:c,startAngle:f,endAngle:p,gridLength:Math.min(h,d)/2*(r-n)};if("inner"===t){let{insetLeft:t,insetTop:e}=i.getOptions();return Object.assign(Object.assign({},y),{center:[u[0]-t,u[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},y),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(r,c,b,x,n),{axis:w,axisArc:E={}}=i,k=EL(rN({},w,E,O,Object.assign(Object.assign({type:"arc",data:v,titleText:EP(p),grid:h},d),u)));return new El({style:Ef(k,["transform"])})}});Ez.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},EW.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let E$=t=>(...e)=>{let n=Ez(Object.assign({},{crossPadding:50},t))(...e);return ER(n,t),n};E$.props=Object.assign(Object.assign({},Ez.props),{defaultPosition:"bottom"});let EG=t=>(...e)=>{let n=Ez(Object.assign({},{crossPadding:10},t))(...e);return ER(n,t),n};EG.props=Object.assign(Object.assign({},Ez.props),{defaultPosition:"left"});var EH=function(){},EV=function(t,e,n){var r=t,i=vq(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(vU(r[t])||(r[t]=wb(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},EU=function(t,e,n){return t<e?e:t>n?n:t},Eq=function(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||t.apply(i,o)},e),a&&t.apply(i,o)}},EY=O2({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),EX=function(t){function e(e){var n=t.call(this,e,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",-6,-6],["L",6,0],["L",-6,6],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new dZ({class:EY.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new dZ({class:EY.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return eC(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return EU(this.attributes.defaultPage,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t,e,n=eF(((null==(e=(t=this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]}))[0])?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]).map(function(t){return Math.max.apply(Math,ez([],eF(t),!1))}),2),r=n[0],i=n[1],o=this.attributes,a=o.pageWidth,l=o.pageHeight;return{pageWidth:void 0===a?r:a,pageHeight:void 0===l?i:l}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=e.x,r=e.y,i=this.controllerShape,o=this.pageShape,a=o.pageWidth,l=o.pageHeight;return new Et(n,r,a+i.width,l)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,o=this.playWindow,a=this.pageViews;if("idle"!==i||t<0||a.length<=0||t>=a.length)return null;a[r].setLocalPosition(0,0),this.prepareFollowingPage(t);var l=eF(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=OJ(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return OZ(c,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),c},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:EU(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:EU(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;if(!n||!r){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(EY.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?vM(e):vS(e)})},e.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,o=r.controllerPadding,a=n.getBBox(),l=a.width;a.height;var s=eF("horizontal"===i?[-180,0]:[-90,90],2),u=s[0],c=s[1];t.setLocalEulerAngles(u),e.setLocalEulerAngles(c);var f=t.getBBox(),p=f.width,h=f.height,d=e.getBBox(),y=d.width,g=d.height,v=Math.max(p,l,y),b="horizontal"===i?{offset:[[0,0],[p/2+o,0],[p+l+2*o,0]],textAlign:"start"}:{offset:[[v/2,-h-o],[v/2,0],[v/2,g+o]],textAlign:"center"},x=eF(b.offset,3),O=eF(x[0],2),w=O[0],E=O[1],k=eF(x[1],2),M=k[0],S=k[1],_=eF(x[2],2),P=_[0],j=_[1],A=b.textAlign,T=n.querySelector("text");T&&(T.style.textAlign=A),t.setLocalPosition(w,E),n.setLocalPosition(M,S),e.setLocalPosition(P,j)},e.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null==(t=this.pageInfoGroup.querySelector(EY.pageInfo.class))||t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=t<e?-1:1;return"horizontal"===n?[a*i,0]:[0,a*o]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=eF(this.getFollowingPageDiff(t),2),i=r[0],o=r[1];n[t].setLocalPosition(i,o)}},e.prototype.renderController=function(t){var e=this,n=this.attributes.controllerSpacing,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=this.pageViews.length>=2,l=t.maybeAppendByClassName(EY.controller,"g");if(v_(l.node(),a),a){var s=wl(this.attributes,"button"),u=wl(this.attributes,"pageNum"),c=eF(wu(s),2),f=c[0],p=c[1],h=f.size,d=eL(f,["size"]),y=!l.select(EY.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(EY.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(EY.prevBtn,"path"),b=l.maybeAppendByClassName(EY.nextBtnGroup,"g").styles(p);this.nextBtnGroup=b.node(),[v,b.maybeAppendByClassName(EY.nextBtn,"path")].forEach(function(t){t.styles(eN(eN({},d),{transformOrigin:"center"})),wO(t.node(),h,!0)});var x=l.maybeAppendByClassName(EY.pageInfoGroup,"g");this.pageInfoGroup=x.node(),x.maybeAppendByClassName(EY.pageInfo,"text").styles(u),this.updatePageInfo(),l.node().setLocalPosition(i+n,o/2),y&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=v$(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=Eq(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(t6.INSERTED,e),this.playWindow.addEventListener(t6.REMOVED,e)},e}(vF);function EK(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}vY.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),vY.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+o],["L",t+r-2,e+o],["M",a,e-o],["L",t+r-2,e-o]]}),vY.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-o,a],["L",t-o,e+r-2],["M",t+o,a],["L",t+o,e+r-2]]});var EZ=O2({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),EQ=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new dY({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return eC(e,t),Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,r=t.node().getBBox(),i=r.width,o=r.height,a=e.node().getBBox();return{markerWidth:n,labelWidth:i,valueWidth:a.width,height:Math.max(n,o,a.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=eF(wG(t),2),n=e[0],r=e[1],i=this.showValue?r:0,o=n+i;return[n/o,i/o]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,i=this.actualSpace,o=i.markerWidth,a=i.height,l=this.actualSpace,s=l.labelWidth,u=l.valueWidth,c=eF(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=eF(this.span,2);s=(t=eF([d[0]*h,d[1]*h],2))[0],u=t[1]}return{width:o+s+u+f+p,height:a,markerWidth:o,labelWidth:s,valueWidth:u}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes.spacing;if(!t)return[0,0];var e=eF(wG(t),2),n=e[0],r=e[1];return this.showValue?[n,r]:[n,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,o=t.height,a=eF(this.spacing,2),l=a[0];return{height:o,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+l,e+n+l+a[1]]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t,e=(t=this.markerGroup.node().querySelector(EZ.marker.class))?t.style:{},n=this.attributes,r=n.markerSize,i=n.markerStrokeWidth,o=void 0===i?e.strokeWidth:i,a=n.markerLineWidth,l=void 0===a?e.lineWidth:a,s=n.markerStroke,u=void 0===s?e.stroke:s,c=+(o||l||+!!u)*Math.sqrt(2),f=this.markerGroup.node().getBBox();return(1-c/Math.max(f.width,f.height))*r},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=wl(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(EZ.markerGroup,"g").style("zIndex",0),vB(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(EZ.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=eD(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=eF(a.value,2),s=l[0],u=l[1];"id"!==s&&"className"!==s&&t.attr(s,u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(i,o),v$(i).styles(r)):(i.remove(),v$(o).attr("className",EZ.marker.name).styles(r),t.appendChild(o)):(v$(o).attr("className",EZ.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),wO(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=wl(this.attributes,"label"),n=e.text,r=eL(e,["text"]);this.labelGroup=t.maybeAppendByClassName(EZ.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(EZ.label,function(){return wx(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=wl(this.attributes,"value"),r=n.text,i=eL(n,["text"]);this.valueGroup=t.maybeAppendByClassName(EZ.valueGroup,"g").style("zIndex",0),vB(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(EZ.value,function(){return wx(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=wl(this.attributes,"background");this.background=t.maybeAppendByClassName(EZ.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(EZ.background,"rect").styles(eN({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=eF(t.position,3),o=i[0],a=i[1],l=i[2],s=r/2;this.markerGroup.styles({x:o,y:s}),this.labelGroup.styles({x:a,y:s}),wz(this.labelGroup.select(EZ.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),wz(this.valueGroup.select(EZ.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=v$(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(vF),EJ=O2({page:"item-page",navigator:"navigator",item:"item"},"items"),E0=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},E1=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:EH,mouseenter:EH,mouseleave:EH})||this;return n.navigatorShape=[0,0],n}return eC(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=wl(this.attributes,"item");return e.map(function(t,i){var o=t.id,a=void 0===o?i:o,l=t.label,s=t.value;return{id:"".concat(a),index:i,style:eN({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=eF(n,2);return[r[0],wc(r[1],[t,i,e])]})))}})},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,i=e.rowPadding,o=e.colPadding,a=eF(this.navigatorShape,1)[0],l=eF(this.grid,2),s=l[0],u=l[1],c=u*s,f=0;return this.pageViews.children.map(function(e,l){var p,h,d=Math.floor(l/c),y=l%c,g=t.ifHorizontal(u,s),v=[Math.floor(y/g),y%g];"vertical"===n&&v.reverse();var b=eF(v,2),x=b[0],O=b[1],w=(r-a-(u-1)*o)/u,E=e.getBBox().height,k=eF([0,0],2),M=k[0],S=k[1];return"horizontal"===n?(M=(p=eF([f,x*(E+i)],2))[0],S=p[1],f=O===u-1?0:f+w+o):(M=(h=eF([O*(w+o),f],2))[0],S=h[1],f=x===s-1?0:f+E+i),{page:d,index:l,row:x,col:O,pageIndex:y,width:w,height:E,x:M,y:S}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=eF(this.navigatorShape,1)[0],a=eF(this.grid,2),l=a[0],s=a[1],u=eF([e-o,n],2),c=u[0],f=u[1],p=eF([0,0,0,0,0,0,0,0],8),h=p[0],d=p[1],y=p[2],g=p[3],v=p[4],b=p[5],x=p[6],O=p[7];return this.pageViews.children.map(function(t,e){var n,o,a,u,p=t.getBBox(),w=p.width,E=p.height,k=0===x?0:i,M=x+k+w;return M<=c&&E0(v,function(t){return t<s})?(h=(n=eF([x+k,O,M],3))[0],d=n[1],x=n[2]):(b=(o=eF([b+1,0,0,O+E+r],4))[0],v=o[1],x=o[2],(O=o[3])+E<=f&&E0(b,function(t){return t<l}))?(h=(a=eF([x,O,w],3))[0],d=a[1],x=a[2]):(h=(u=eF([0,0,w,0,y+1,0,0,0],8))[0],d=u[1],x=u[2],O=u[3],y=u[4],g=u[5],b=u[6],v=u[7]),{width:w,height:E,x:h,y:d,page:y,index:e,pageIndex:g++,row:b,col:v++}})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return EK(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(EJ.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(EJ.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);v$(t).selectAll(EJ.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new EQ({style:t.style})}).attr("className",EJ.item.name).on("click",function(){null==n||n(this),o("itemClick",{item:this})}).on("pointerenter",function(){null==r||r(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){null==i||i(this),o("itemMouseleave",{item:this})})},function(t){return t.each(function(t){var e=t.style;this.update(e)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,i=(null==(t=this.pageViews.children[0])?void 0:t.getBBox().height)||0,o=eF(this.navigatorShape,2),a=o[0],l=o[1];this.navigator.update("grid"===n?{pageWidth:r-a,pageHeight:i-l}:{})},e.prototype.adjustLayout=function(){var t,e,n=this,r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=eF(t,2);return{page:e[0],layouts:e[1]}}),i=ez([],eF(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new dZ({className:EJ.page.name}));e.forEach(function(t){var e=t.x,n=t.y,o=t.index,a=t.width,l=t.height,s=i[o];r.appendChild(s),EV(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=vL({orientation:this.attributes.orientation},wl(this.attributes,"nav")),n=this;return t.selectAll(EJ.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new EX({style:e})}).attr("className",EJ.navigator.name).each(function(){n.navigator=this})},function(t){return t.each(function(){this.update(e)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(v$(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new dd(t,{detail:e});this.dispatchEvent(n)},e}(vF),E2=O2({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),E5={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},E3=function(t){function e(e){return t.call(this,e,E5)||this}return eC(e,t),e.prototype.render=function(t,e){var n=v$(e).maybeAppendByClassName(E2.markerGroup,"g");this.renderMarker(n);var r=v$(e).maybeAppendByClassName(E2.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.orientation,i=n.markerSymbol,o=void 0===i?EK(r,"horizontalHandle","verticalHandle"):i;vB(!!o,t,function(t){var n=wl(e.attributes,"marker"),r=eN({symbol:o},n);e.marker=t.maybeAppendByClassName(E2.marker,function(){return new vY({style:r})}).update(r)})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.showLabel,i=n.orientation,o=n.spacing,a=void 0===o?0:o,l=n.formatter;vB(r,t,function(t){var n,r=wl(e.attributes,"label"),o=r.text,s=eL(r,["text"]),u=(null==(n=t.select(E2.marker.class))?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=eF(EK(i,[0,(void 0===f?0:f)+a,"center","top"],[(void 0===c?0:c)+a,0,"start","middle"]),4),h=p[0],d=p[1],y=p[2],g=p[3];t.maybeAppendByClassName(E2.label,"text").styles(eN(eN({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(vF),E4={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},E6=vL({},E4,{}),E8=vL({},E4,ws(E5,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),E9=O2({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),E7=function(t){function e(e){return t.call(this,e,E6)||this}return eC(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=eF(wu(wl(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(E9.titleGroup,"g").styles(s);var u=eN(eN({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(E9.title,function(){return new Ei({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=eF(wu(wl(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=eN(eN({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(E9.itemsGroup,"g").styles(eN({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(E9.items.class).data(["items"]).join(function(t){return t.append(function(){return new E1({style:u})}).attr("className",E9.items.name).each(function(){c.items=v$(this)})},function(t){return t.update(u)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().setLocalPosition(e,n)}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,r=t.height;return e?this.title.node().getAvailableSpace():new Et(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null==(e=this.title)?void 0:e.node(),i=null==(n=this.items)?void 0:n.node();return r&&i?function(t,e){var n=t.attributes,r=n.position,i=n.spacing,o=n.inset,a=n.text,l=t.getBBox(),s=e.getBBox(),u=En(r),c=eF(wG(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eF(wG(o),4),g=y[0],v=y[1],b=y[2],x=y[3],O=eF([d+p,f+h],2),w=O[0],E=O[1],k=eF([x+v,g+b],2),M=k[0],S=k[1];if("l"===u[0])return new Et(l.x,l.y,s.width+l.width+w+M,Math.max(s.height+S,l.height));if("t"===u[0])return new Et(l.x,l.y,Math.max(s.width+M,l.width),s.height+l.height+E+S);var _=eF([e.attributes.width||s.width,e.attributes.height||s.height],2),P=_[0],j=_[1];return new Et(s.x,s.y,P+l.width+w+M,j+l.height+E+S)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=v$(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(vF),kt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ke=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=kt(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=c;return e=>{let{value:r,theme:i}=e,{bbox:a}=r,{width:u,height:p}=function(t,e,n){let{position:r}=e;if("center"===r){let{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}let{width:i,height:o}=EN(t,e,n);return{width:i,height:o}}(r,t,ke),h=Ej(o,n),d=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(o)?"vertical":"horizontal",width:u,height:p,layout:void 0!==s?"grid":"flex"},void 0!==s&&{gridCol:s}),void 0!==f&&{gridRow:f}),{titleText:EP(l)}),function(t,e){let{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:i}=e,o=function(t,e){let n=EC(t,"size");return n instanceof xW?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=EC(t,"shape"),r=EC(t,"color"),i=n?n.clone():null,o=[];for(let[t,n]of e){let e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var o;return i?i.map(e||"point"):(null==(o=null==t?void 0:t.style)?void 0:o.shape)||n.defaultShape||"point"});"string"==typeof e&&o.push([e,a])}if(0===o.length)return["point",["point"]];if(1===o.length||!n)return o[0];let{range:a}=n.getOptions();return o.map(([t,e])=>{let n=0;for(let t=0;t<o.length;t++){let r=a[t%a.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(n,i),{itemMarker:l,itemMarkerSize:s}=t,u=(t,e)=>{var n,i,a;let l=(null==(a=null==(i=null==(n=r[`mark.${o}`])?void 0:n.props)?void 0:i.shape[t])?void 0:a.props.defaultMarker)||lq(t.split(".")),u="function"==typeof s?s(e):s;return()=>(function(t,e){var{d:n,fill:r,strokeWidth:i,path:o,stroke:a,lineWidth:l,color:s}=e,u=mL(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=m9.get(t)||m9.get("point");return(...t)=>new d1({style:Object.assign(Object.assign({},u),{path:c(...t),stroke:c.style.includes("stroke")?s||a:"",fill:c.style.includes("fill")?s||r:"",lineWidth:c.style.includes("lineWidth")?l||l||2:0})})})(l,{color:e.color})(0,0,u)},c=t=>`${a[t]}`;return EC(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:function(t){let e=EC(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(r)},l="string"==typeof n?eo(n):n,s=EC(r,"color"),u=r.find(t=>t.getOptions().domain.length>0).getOptions().domain,c=s?t=>s.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:u.map(t=>({id:t,label:l(t),color:c(t)}))})}(t,e)),{legendCategory:y={}}=i,g=EL(Object.assign({},y,d,c)),v=new ET({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new E7({className:"legend-category",style:g})),v}};ke.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var kn={}.toString,kr=function(t,e){return kn.call(t)==="[object "+e+"]"},ki=function(t){return Array.isArray?Array.isArray(t):kr(t,"Array")},ko=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},ka=function(t,e){if(t){if(ki(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(ko(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},kl=function(t){return kr(t,"Function")},ks=Array.prototype;ks.splice,ks.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var ku=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return ka(t,function(n,r){kl(t)&&"prototype"===r||e.push(n)}),e},kc=function(t){if("object"!=typeof t||null===t||!kr(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},kf=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&kc(a)?(kc(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):ki(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var kp=function(t){return t};function kh(){this.map={}}!function(t,e){if(!kl(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return ea||(ea=document.createElement("canvas").getContext("2d")),ea.font=[o,a,i,n+"px",r].join(" "),ea.measureText(kr(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eB([t],ku(e)).join("")}),kh.prototype.has=function(t){return void 0!==this.map[t]},kh.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},kh.prototype.set=function(t,e){this.map[t]=e},kh.prototype.clear=function(){this.map={}},kh.prototype.delete=function(t){delete this.map[t]},kh.prototype.size=function(){return Object.keys(this.map).length};class kd{constructor(t){this.options=kf({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=kf({},this.options,t),this.rescale(t)}rescale(t){}}function ky(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function kg(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function km(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function kv(t){let e=eY().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=km(a,o,e+1/3);return[255*l,255*km(a,o,e),255*km(a,o,e-1/3),i]}(r):null}let kb=(t,e)=>n=>t*(1-n)+e*n,kx=(t,e)=>{let n=kv(t),r=kv(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},kO=(t,e)=>"number"==typeof t&&"number"==typeof e?kb(t,e):"string"==typeof t&&"string"==typeof e?kx(t,e):()=>t,kw=(t,e)=>{let n=kb(t,e);return t=>Math.round(n(t))};function kE(t){return null!=t&&!Number.isNaN(t)}let kk=Math.sqrt(50),kM=Math.sqrt(10),kS=Math.sqrt(2);function k_(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=kk?10:o>=kM?5:o>=kS?2:1)*10**i:-(10**-i)/(o>=kk?10:o>=kM?5:o>=kS?2:1)}let kP=(t,e,n=5)=>{let r,i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=k_(l,s,n))>0?r=k_(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=k_(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},kj=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=ky(o,a),i=n(l,s)):(r=ky(a,o),i=n(s,l)),kg(i,r)},kA=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=ky(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n,r,i){let o=1,a=r||t.length,l=t=>t;for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}(t,e,0,r)-1,a=i[n];return kg(o[n],a)(e)}},kT=(t,e,n,r)=>(Math.min(t.length,e.length)>2?kA:kj)(t,e,r?kw:n);class kC extends kd{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:kb,tickCount:5}}map(t){return kE(t)?this.output(t):this.options.unknown}invert(t){return kE(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return kP}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):kp}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=kT(n.map(t),r,o,i);this.output=kg(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=kT(i,r.map(t),kb);this.input=kg(e,n,o)}}let kN=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=k_(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class kL extends kC{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:kO,tickMethod:kN,tickCount:5}}chooseTransforms(){return[kp,kp]}clone(){return new kL(this.options)}}function kI(t,e){return+t.toPrecision(e)}function kR(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e)return[e.x,e.y];if(n){var o=n[0];return[o.clientX,o.clientY]}return r&&i?[r,i]:[0,0]}var kD={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},kF=O2({background:"background",labelGroup:"label-group",label:"label"},"indicator"),kB=function(t){function e(e){var n=t.call(this,e,kD)||this;return n.point=[0,0],n.group=n.appendChild(new dZ({})),n.isMutationObserved=!0,n}return eC(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=eF(wG(t.padding),4),r=n[0],i=n[1],o=n[2],a=n[3],l=this.label.node().getLocalBounds(),s=l.min,u=l.max,c=new Et(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=wl(this.attributes,"background");this.background=v$(this.group).maybeAppendByClassName(kF.background,"path").styles(eN(eN({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=eF(wu(wl(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,eL(i,["text"]));this.label=v$(this.group).maybeAppendByClassName(kF.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(kF.label,function(){return wx(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=eF(this.point,2),e=t[0],n=t[1];this.group.attr("x",-e).attr("y",-n)},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,i=e.y,o=e.width,a=e.height,l=[["M",r+n,i],["L",r+o-n,i],["A",n,n,0,0,1,r+o,i+n],["L",r+o,i+a-n],["A",n,n,0,0,1,r+o-n,i+a],["L",r+n,i+a],["A",n,n,0,0,1,r,i+a-n],["L",r,i+n],["A",n,n,0,0,1,r+n,i],["Z"]],s={top:4,right:6,bottom:0,left:2}[t],u=this.createCorner([l[s].slice(-2),l[s+1].slice(-2)]);return l.splice.apply(l,ez([s+1,1],eF(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=wQ.apply(void 0,ez([],eF(t),!1)),r=eF(t,2),i=eF(r[0],2),o=i[0],a=i[1],l=eF(r[1],2),s=l[0],u=l[1],c=eF(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=eF(c[1],2),h=p[0],d=p[1],y=f/2,g=f/Math.abs(f)*e,v=g/2,b=g*Math.sqrt(3)/2*.8,x=eF([h,h+y-v,h+y,h+y+v,d],5),O=x[0],w=x[1],E=x[2],k=x[3],M=x[4];return n?(this.point=[E,a-b],[["L",O,a],["L",w,a],["L",E,a-b],["L",k,a],["L",M,a]]):(this.point=[o+b,E],[["L",o,O],["L",o,w],["L",o+b,E],["L",o,k],["L",o,M]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?vS(this):vM(this)},e.prototype.bindEvents=function(){this.label.on(t6.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(vF),kz={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},kW={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},k$={orientation:"horizontal",showLabel:!0,type:"start"},kG=O2({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),kH=O2({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),kV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.render=function(t,e){var n=t.size,r=void 0===n?10:n,i=t.radius,o=t.orientation,a=eL(t,["size","radius","orientation"]),l=2.4*r,s=v$(e).maybeAppendByClassName(kH.iconRect,"rect").styles(eN(eN({},a),{width:r,height:l,radius:void 0===i?r/4:i,x:-r/2,y:-l/2})),u=1/3*r,c=2/3*r,f=1/4*l,p=3/4*l;s.maybeAppendByClassName("".concat(kH.iconLine,"-1"),"line").styles(eN({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(kH.iconLine,"-2"),"line").styles(eN({x1:c,x2:c,y1:f,y2:p},a)),s.node().setOrigin(r/2,l/2),"vertical"===o?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},e}(vF),kU=function(t){function e(e){return t.call(this,e,k$)||this}return eC(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=wl(this.attributes,"label"),i=r.transform,o=eF(wu(eL(r,["transform"]),[]),2),a=o[0],l=o[1],s=v$(t).maybeAppendByClassName(kH.labelGroup,"g").styles(l),u=eN(eN({},kW),a),c=u.text,f=eL(u,["text"]);vB(!!n,s,function(t){e.label=t.maybeAppendByClassName(kH.label,"text").styles(eN(eN({},f),{transform:i,text:"".concat(c)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.orientation,r=e.type,i=eN(eN({orientation:n},kz),wl(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new kV({style:i})}:o;v$(t).maybeAppendByClassName(kH.iconGroup,"g").selectAll(kH.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",kH.icon.name)},function(t){return t.update(i)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(vF);function kq(t,e){var n=eF(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var kY=O2({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function kX(t){var e=t.orientation,n=t.size,r=t.length;return EK(e,[r,n],[n,r])}function kK(t){var e=t.type,n=eF(kX(t),2),r=n[0],i=n[1];return"size"===e?[["M",0,i],["L",0+r,0],["L",0+r,i],["Z"]]:[["M",0,i],["L",0,0],["L",0+r,0],["L",0+r,i],["Z"]]}var kZ=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return eC(e,t),e.prototype.render=function(t,e){n=v$(e).maybeAppendByClassName(kY.trackGroup,"g"),r=wl(t,"track"),n.maybeAppendByClassName(kY.track,"path").styles(eN({path:kK(t)},r));var n,r,i=v$(e).maybeAppendByClassName(kY.selectionGroup,"g"),o=wl(t,"selection"),a=function(t){var e,n,r,i=t.orientation,o=t.color,a=t.block,l=t.partition,s=(r=vk(o)?Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length,u=r.map(function(t){return pO(t).toString()});return s?1===s?u[0]:a?(e=Array.from(u),Array(n=l.length).fill(0).reduce(function(t,r,i){var o=e[i%e.length];return t+" ".concat(l[i],":").concat(o).concat(i<n-1?" ".concat(l[i+1],":").concat(o):"")},"l(".concat("horizontal"===i?"0":"270",")"))):u.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(EK(i,"0","270"),")")):""}(t),l=i.maybeAppendByClassName(kY.selection,"path").styles(eN({path:kK(t),fill:a},o)),s=l.maybeAppendByClassName(kY.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=eF(kX(t),2),i=r[0],o=r[1],a=eF(n,2),l=a[0],s=a[1],u=EK(e,l*i,0),c=EK(e,0,l*o),f=EK(e,s*i,i),p=EK(e,o,s*o);return[["M",u,c],["L",u,p],["L",f,p],["L",f,c],["Z"]]}(t)}).node();l.style("clip-path",s)},e}(vF),kQ=function(t){function e(e){var n=t.call(this,e,E8)||this;return n.eventToOffsetScale=new kL({}),n.innerRibbonScale=new kL({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,i=e.block;t.stopPropagation();var o=n.getValueByCanvasPoint(t);if(i){var a=kq(r.map(function(t){return t.value}),o).range;n.showIndicator((a[0]+a[1])/2,"".concat(a[0],"-").concat(a[1])),n.dispatchIndicated(o,a)}else{var l=n.getTickValue(o);n.showIndicator(l),n.dispatchIndicated(l)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=eF(n.selection,2),i=r[0],o=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),l=a-n.prevValue;"start"===e?i!==a&&n.updateSelection(a,o):"end"===e?o!==a&&n.updateSelection(i,a):"ribbon"===e&&0!==l&&(n.prevValue=a,n.updateSelection(l,l,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return eC(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new Et(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(v$(e));var i=this.availableSpace,o=i.x,a=i.y,l=v$(e).maybeAppendByClassName(E9.contentGroup,"g").styles({x:o,y:a});vB(!!r,l.maybeAppendByClassName(E9.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(E9.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(E9.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(s),this.renderIndicator(l),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t=this.attributes,e=t.data,n=t.domain;return n?{min:n[0],max:n[1]}:{min:Math.min.apply(Math,ez([],eF(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,ez([],eF(e.map(function(t){return t.value})),!1))}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=eF(this.selection,2),e=t[0],n=t[1],r=this.ribbonScale;return[r.map(e),r.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,r=this.attributes.defaultValue,i=eF(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return EK(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,o=e.height,a=wl(this.attributes,"title"),l=eN(eN({},a),{width:i,height:o,text:r}),s=this;t.selectAll(E9.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new Ei({style:l})}).attr("className",E9.title.name).each(function(){s.title=this})},function(t){return t.update(l)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new Et(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return 5*!!this.attributes.showTick},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes;return({vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}})[t.orientation][t.labelDirection]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){if(!this.attributes.showLabel)return new Et(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null==(t=this.label.querySelector(O3.labelGroup.class))?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new Et(0,0,n,r),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing;if(!e)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,i=r.width,o=r.height,a=this.ifHorizontal(o,i)+(void 0===n?0:n)+this.labelFixedSpacing,l=this.ifHorizontal(i,o);return{width:i,height:o,size:a,length:l}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,i=r.width,o=r.height,a=this.labelShape,l=a.size,s=a.length,u=eF(this.ifHorizontal([o,i],[i,o]),2),c=u[0],f=u[1],p=e?this.handleShape:{size:0,length:0},h=p.size,d=p.length,y=this.handleOffsetRatio,g=0,v=this.labelPosition;g=n||(["bottom","right"].includes(v)?Math.min(c-l,(c-h)/y):c*(1-y)>h?Math.max(c-l,0):Math.max((c-l-h)/y,0));var b=Math.max(d,s),x=f-b,O=eF(this.ifHorizontal([x,g],[g,x]),2),w=O[0],E=O[1],k=["top","left"].includes(v)?l:0,M=eF(this.ifHorizontal([b/2,k],[k,b/2]),2);return new Et(M[0],M[1],w,E)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,o=e.color,a=e.block,l=wl(this.attributes,"ribbon"),s=this.range,u=s.min,c=s.max,f=this.ribbonBBox,p=f.x,h=f.y,d=this.ribbonShape,y=vL({x:p,y:h,length:d.length,size:d.size,type:r,orientation:i,color:o,block:a,partition:n.map(function(t){return(t.value-u)/(c-u)}),range:this.ribbonRange},l);this.ribbon=t.maybeAppendByClassName(E9.ribbon,function(){return new kZ({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(E9.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=wl(this.attributes,"handle"),i=eF(this.selection,2),o=i[0],a=i[1],l=eN(eN({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?E3:kU,c=this;this.handlesGroup.selectAll(E9.handle.class).data(e?[{value:o,type:"start"},{value:a,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new u({style:l})}).attr("className",function(t){var e=t.type;return"".concat(E9.handle," ").concat(c.getHandleClassName(e))}).each(function(t){var e=t.type,n=t.value;this.update({labelText:n}),c["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",c.onDragStart(e))})},function(t){return t.update(l).each(function(t){var e=t.value;this.update({labelText:e})})},function(t){return t.each(function(t){var e=t.type;c["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=eF(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n)},e.prototype.adjustTitle=function(){var t=this.attributes,e=t.titlePosition,n=t.orientation,r=eF(this.getElementsByClassName(E9.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(r&&i&&"top-left"===e&&"horizontal"===n){var o=eF(i.getLocalBounds().min,1)[0],a=eF(r.getLocalBounds().min,1)[0];r.style.x=+(this.style.x||0)+(o-a)}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new Et(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=eF([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new Et(0,0,o,a),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=eF(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,o=r.y,a=this.ribbonShape.size,l=this.getOffset(e),s=eF(this.ifHorizontal([i+l,o+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,o+l]),2),u=s[0],c=s[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({x:u,y:c,formatter:n})},e.prototype.renderIndicator=function(t){var e=wl(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(E9.indicator,function(){return new kB({})}).update(e)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,i){var o,a,l=null!=(o=null==n?void 0:n.id)?o:r.toString();if(e.push(eN(eN({},n),{id:l,index:r,type:"value",label:null!=(a=null==n?void 0:n.label)?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var s=i[r+1],u=eF([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(eN(eN({},n),{id:l,index:r,type:"range",range:[c,f],label:[c,f].join("~"),value:t.ribbonScale.map(p)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=eF(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=e.labelFilter,i=e.labelFormatter,o=wl(this.attributes,"tick"),a=wl(this.attributes,"label"),l=a.align,s=vL(eN({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),ws(o,"tick"),ws(a,"label"),{data:this.labelData}),u=eN(eN(eN({},s),{tickFilter:function(t,e,n){return(null==t?void 0:t.type)==="value"&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===l&&(!r||r(t,t.index,n.filter(function(t){return t.type===l})))},labelFormatter:i}),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(E9.label,function(){return new El({style:u})}).node(),this.label.update(u,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,i=t.tickLength,o=this.ribbonShape.size,a=this.labelPosition,l=this.labelFixedSpacing,s=eF([0,0,0],3),u=s[0],c=(s[1],s[2]),f=null!=i?i:o;return e?(c=f,"positive"===n?"right"===a?(u=f,c=f):"bottom"===a&&(u=c):"negative"===n&&("top"===a?u=o:"left"===a&&(u=o))):"positive"===n&&("right"===a||"bottom"===a&&(u=o+l)),{offset:u,spacing:r,tickLength:c}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=t.width,i=t.height,o=this.labelAxisStyle,a=o.offset,l=o.spacing,s=o.tickLength,u=eF(this.ifHorizontal([[e,n+a],[e+r,n+a]],[[e+a,n+i],[e+a,n]]),2),c=u[0],f=u[1];this.label.update({startPos:c,endPos:f,tickLength:s,labelSpacing:l},!1)}},e.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),!this.attributes.showIndicator||"number"!=typeof t)return void this.hideIndicator();var n=this.range,r=n.min,i=n.max,o=this.ribbonBBox,a=o.x,l=o.y,s=EU(t,r,i),u=this.getOffset(s),c=this.ifHorizontal([u+a,l],[a,u+l]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),vM(this.indicator.node())},e.prototype.hideIndicator=function(){vS(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E=eF(this.selection,2),k=E[0],M=E[1],S=eF([t,e],2),_=S[0],P=S[1];n&&(_+=k,P+=M);var j=this.range;_=(w=eF((r=[j.min,j.max],i=[_,P],o=this.selection,void 0===a&&(a=4),u=(s=eF(r,2))[0],c=s[1],p=(f=eF(i,2))[0],h=f[1],y=(d=eF(o,2))[0],g=d[1],b=(v=eF([p,h],2))[0],O=(x=v[1])-b,(b>x&&(b=(l=eF([x,b],2))[0],x=l[1]),O>c-u)?[u,c]:b<u?y===u&&g===x?[u,x]:[u,O+u]:x>c?g===c&&y===b?[b,c]:[c-O,c]:[b,x]),2))[0],P=w[1],this.update({defaultValue:[_,P]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,i=n.max;return void 0===e?kI((i-r)*.01,0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e,n,r=this.attributes,i=r.data,o=r.block,a=this.range.min;return o?kq(i.map(function(t){return t.value}),t).tick:(n=Math.round((t-a)/(e=this.step)),a+n*e)},e.prototype.getValueByCanvasPoint=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=eF(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,ez([],eF(kR(t)),!1));return EU(this.getOffset(u-s,!0),r,i)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=this.ribbonShape.length,a=this.eventToOffsetScale;return(a.update({domain:[r,i],range:[0,o]}),e)?a.invert(t):a.map(t)},e.prototype.dispatchSelection=function(){var t=new dd("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new dd("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(vF),kJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function k0(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],gE(e)];return[n,r]}let k1=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=kJ(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:r,value:i,theme:a,scale:u})=>{let{bbox:c}=i,{x:p,y:h,width:d,height:y}=c,g=Ej(o,n),{legendContinuous:v={}}=a,b=EL(Object.assign({},v,Object.assign(Object.assign({titleText:EP(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>eo(e)(t.label):e},function(t,e,n,r,i,o){let a=EC(t,"color"),l=function(t,e,n){let{size:r}=e,i=EN(t,e,n);var o=i.orientation;return(i.size=r,"horizontal"===o||0===o)?i.height=r:i.width=r,i}(n,r,i);if(a instanceof Oj){let{range:t}=a.getOptions(),[e,n]=k0(a);if(a instanceof ON||a instanceof OT){let r=a.thresholds,i=t=>({value:t/n,label:String(t)});return Object.assign(Object.assign({},l),{color:t,data:[e,...r,n].map(i)})}let r=[-1/0,...a.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},l),{data:r,color:t,labelFilter:(t,e)=>e>0&&e<r.length-1})}return function(t,e,n,r,i,o){let{length:a}=t,l=n||r,s=i.color?o.legendContinuous.ribbonFill||"black":o.color,u=e||function(t,e){let n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[pO(e).toString()]})),r}(l,s),[c,f]=k0(u),[p,h]=k0([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof OF)));return Object.assign(Object.assign({},t),{domain:[p,h],data:u.getTicks().map(t=>({value:t})),color:Array(Math.floor(a)).fill(0).map((t,e)=>{let n=(f-c)/(a-1)*e+c,i=u.map(n)||s,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`)})})}(l,a,EC(t,"size"),EC(t,"opacity"),e,o)}(r,u,i,t,k1,a)),s),f)),x=new EA({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:b})});return x.appendChild(new kQ({className:"legend-continuous",style:b})),x}};k1.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let k2=t=>()=>new dZ;k2.props={};var k5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function k3(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}let k4=(R={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=k5(t,["width","title","subtitle","spacing","align"]),s=rW(l,"title"),u=rW(l,"subtitle"),c=E_(e,".title","text").attr("className","title").call(gM,Object.assign(Object.assign(Object.assign({},k3(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();E_(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},k3(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends dX{constructor(t){super(t),this.descriptor=R}connectedCallback(){var t,e;null==(e=(t=this.descriptor).render)||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(rN({},this.attributes,t)),null==(n=(e=this.descriptor).render)||n.call(e,this.attributes,this)}}),k6=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new k4({style:rN({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function k8({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function k9(t){return"object"==typeof t?t.valueOf():t}k6.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class k7 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=k9,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(k8({map:this.map,initKey:this.initKey},t))}has(t){return super.has(k8({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}let Mt=Symbol("defaultUnknown");function Me(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function Mn(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==Mt)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function Mr(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Mi extends kd{getDefaultOptions(){return{domain:[],range:[],unknown:Mt}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&Me(this.domainIndexMap,this.getDomain(),this.domainKey),Mn({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Me(this.rangeIndexMap,this.getRange(),this.rangeKey),Mn({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=Mr(e),this.rangeKey=Mr(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new Mi(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}class Mo extends Mi{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Mt,flex:[]}}constructor(t){super(t)}clone(){return new Mo(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r,{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null==(e=t.flex)?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new k7(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new k7(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}var Ma=function(t){if("object"!=typeof t||null===t)return t;if(vC(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=Ma(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=Ma(t[i]):e[i]=t[i];return e},Ml=function(t){function e(e){var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,O1({},{type:"column"},eN({style:r},i)))||this).columnsGroup=new dZ({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return eC(e,t),e.prototype.render=function(){var t=this.attributes.columns;v$(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.update=function(t){this.attr(vL({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(dU),Ms=function(t){function e(e){var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,O1({},{type:"lines"},eN({style:r},i)))||this).linesGroup=n.appendChild(new dZ),n.areasGroup=n.appendChild(new dZ),n.render(),n}return eC(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas;e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(vL({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){v$(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.renderAreas=function(t){v$(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})},e}(dU),Mu=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Mc=function(t,e){if(t===e)return!0;if(!t||!e||vq(t)||vq(e))return!1;if(Mu(t)||Mu(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Mc(t[r],e[r]));r++);return n}if(vP(t)||vP(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(var n=!0,r=0;r<i.length&&(n=Mc(t[i[r]],e[i[r]]));r++);return n}return!1};function Mf(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return ez([e===n?"M":"L"],eF(t),!1)});return e?r.reverse():r}function Mp(t,e){if(void 0===e&&(e=!1),t.length<=2)return Mf(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];Mc(o,n.slice(-2))||n.push.apply(n,ez([],eF(o),!1))}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,o,a=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n,r){var i,o,a,l,s,u,c=[],f=!!r,p=[1/0,1/0],h=[-1/0,-1/0];if(f){p=(i=eF(r,2))[0],h=i[1];for(var d=0,y=t.length;d<y;d+=1){var g=t[d];p=O9(p,g),h=O7(h,g)}}for(var d=0,v=t.length;d<v;d+=1){var g=t[d];if(0!==d||n)if(d!==v-1||n){o=t[[d?d-1:v-1,d-1][+!n]];var b=[0,0];b=O4(b=O8(a=t[n?(d+1)%v:d+1],o),.4);var x=wt(g,o),O=wt(g,a),w=x+O;0!==w&&(x/=w,O/=w);var E=O4(b,-x),k=O4(b,O);s=O6(g,E),l=O9(l=O6(g,k),O7(a,g)),E=O4(E=O8(l=O7(l,O9(a,g)),g),-x/O),s=O9(s=O6(g,E),O7(o,g)),s=O7(s,O9(o,g)),k=O4(k=O8(g,s),O/x),l=O6(g,k),f&&(s=O9(s=O7(s,p),h),l=O9(l=O7(l,p),h)),c.push(u),c.push(s),u=l}else s=g,c.push(u),c.push(s);else u=g}return n&&c.push(c.shift()),c}(l,0,a,n),f=l.length,p=[],s=0;s<f-1;s+=1)r=c[2*s],i=c[2*s+1],o=l[s+1],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]]);return a&&(r=c[f],i=c[f+1],o=eF(l,1)[0],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]])),p}(n,!1);return e?a.unshift(ez(["M"],eF(t[r-1]),!1)):a.unshift(ez(["M"],eF(t[0]),!1)),a}function Mh(t,e,n){var r=Ma(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var Md=function(t){if(vC(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},My=function(t,e){if(vC(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=vk(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},Mg=function(t){if(vC(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Mm=function(t,e){if(vC(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=vk(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function Mv(t){return 0===t.length?[0,0]:[Md(My(t,function(t){return Md(t)||0})),Mg(Mm(t,function(t){return Mg(t)||0}))]}function Mb(t){for(var e=Ma(t),n=e[0].length,r=eF([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],o=r[1],a=0;a<e.length;a+=1)for(var l=e[a],s=0;s<n;s+=1)l[s]>=0?(l[s]+=i[s],i[s]=l[s]):(l[s]+=o[s],o[s]=l[s]);return e}var Mx=function(t){function e(e){return t.call(this,e,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return eC(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(null==t?void 0:t.length)===0)return[[]];var e=Ma(t);return wb(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?Mb(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=eF(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return r<0?t.map(r):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,r=e.isStack,i=e.smooth;if("line"!==n)throw Error("linesStyle can only be used in line type");var o=wl(this.attributes,"area"),a=wl(this.attributes,"line"),l=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var u=this.scales,c=(d=(p={type:"line",x:u.x,y:u.y}).x,v=(g=eF((y=p.y).getOptions().range||[0,0],2))[0],(b=g[1])>v&&(b=(h=eF([v,b],2))[0],v=h[1]),s.map(function(t){return t.map(function(t,e){return[d.map(e),EU(y.map(t),b,v)]})})),f=[];if(o){var p,h,d,y,g,v,b,x=this.baseline;f=r?i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=t[i],a=Mp(o),l=void 0;if(0===i)l=Mh(a,e,n);else{var s=Mp(t[i-1],!0),u=o[0];s[0][0]="L",l=ez(ez(ez([],eF(a),!1),eF(s),!1),[ez(["M"],eF(u),!1),["Z"]],!1)}r.push(l)}return r}(c,l,x):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=Mf(t[i]),a=void 0;if(0===i)a=Mh(o,e,n);else{var l=Mf(t[i-1],!0);l[0][0]="L",a=ez(ez(ez([],eF(o),!1),eF(l),!1),[["Z"]],!1)}r.push(a)}return r}(c,l,x):c.map(function(t){return Mh(i?Mp(t):Mf(t),l,x)})}return{lines:c.map(function(e,n){return eN({stroke:t.getColor(n),path:i?Mp(e):Mf(e)},a)}),areas:f.map(function(e,n){return eN({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=wl(this.attributes,"column"),n=this.attributes,r=n.isStack,i=n.type,o=n.scale;if("column"!==i)throw Error("columnsStyle can only be used in column type");var a=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};r&&(l=Mb(l));var s=this.createScales(l),u=s.x,c=s.y,f=eF(Mv(l),2),p=f[0],h=new kL({domain:[0,f[1]-(p>0?0:p)],range:[0,a*o]}),d=u.getBandWidth(),y=this.rawData;return{columns:l.map(function(n,i){return n.map(function(n,o){var a=d/l.length;return eN(eN({fill:t.getColor(i)},e),r?{x:u.map(o),y:c.map(n),width:d,height:h.map(y[i][o])}:{x:u.map(o)+a*i,y:n>=0?c.map(n):c.map(0),width:a,height:h.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){(n=".container",r="rect",!e.querySelector(n)?v$(e).append(r):v$(e).select(n)).attr("className","container").node();var n,r,i=t.type,o="spark".concat(i),a="line"===i?this.linesStyle:this.columnsStyle;v$(e).selectAll(".spark").data([i]).join(function(t){return t.append(function(t){return"line"===t?new Ms({className:o,style:a}):new Ml({className:o,style:a})}).attr("className","spark ".concat(o))},function(t){return t.update(a)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return vC(e)?e[t%e.length]:vk(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,i=r.type,o=r.scale,a=r.range,l=void 0===a?[]:a,s=r.spacing,u=this.containerShape,c=u.width,f=u.height,p=eF(Mv(t),2),h=p[0],d=p[1],y=new kL({domain:[null!=(e=l[0])?e:h,null!=(n=l[1])?n:d],range:[f,f*(1-o)]});return"line"===i?{type:i,x:new kL({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new Mo({domain:t[0].map(function(t,e){return e}),range:[0,c],paddingInner:s,paddingOuter:s/2,align:.5}),y:y}},e.tag="sparkline",e}(vF),MO=function(t){function e(e){var n=t.call(this,e,eN(eN(eN({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},ws(k$,"handle")),ws(kz,"handleIcon")),ws(kW,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(kR(e));var r=n.availableSpace,i=r.x,o=r.y,a=n.getBBox(),l=a.x,s=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([i,o])-n.getOrientVal([+l,+s])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,i=e.brushable,o=e.type;t.stopPropagation();var a=n.getOrientVal(kR(t)),l=a-n.prevPos;if(l){var s=n.getRatio(l);switch(n.target){case"start":r&&n.setValuesOffset(s);break;case"end":r&&n.setValuesOffset(0,s);break;case"selection":r&&n.setValuesOffset(s,s);break;case"track":if(!i)return;n.selectionWidth+=s,"range"===o?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,i=e.type,o="range"===i?t:t[1],a="range"===i?n.getValues():n.getValues()[1],l=new dd("valuechange",{detail:{oldValue:o,value:a}});n.dispatchEvent(l),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return eC(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=wl(this.attributes,"sparkline");return eN(eN({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=eF(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=eF(wG(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],i=t[3],o=this.shape;return{x:i,y:e,width:o.width-(i+n),height:o.height-(e+r)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(kG.selection.class).each(function(n,r){O0(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&O0(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&O0(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=wl(this.attributes,"track");this.trackShape=v$(t).maybeAppendByClassName(kG.track,"rect").styles(eN(eN({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=v$(t).maybeAppendByClassName(kG.brushArea,"rect").styles(eN({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;vB("horizontal"===this.attributes.orientation,v$(t).maybeAppendByClassName(kG.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(kG.sparkline,function(){return new Mx({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle,i=n.type,o=this;null==(t=this.foregroundGroup)||t.selectAll(kG.handle.class).data((r?"range"===i?["start","end"]:["end"]:[]).map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){var n=t.type;return new kU({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(kG.handle.name," ").concat(e,"-handle")),o["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.each(function(t){var e=t.type;this.update(o.getHandleStyle(e))})},function(t){return t.each(function(t){var e=t.type;o["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.type,r=e.selectionType;this.foregroundGroup=v$(t).maybeAppendByClassName(kG.foreground,"g");var i=wl(this.attributes,"selection"),o=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===r?"grab":"invert"===r?"crosshair":"default"}).styles(i)},a=this;this.foregroundGroup.selectAll(kG.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:eN({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",kG.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=v$(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),a.onDragStart("selection")(t)}),a.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),a.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),a.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",a.onDragStart("track"))})},function(t){return t.call(o)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n,r=eF(this.range,2),i=r[0],o=r[1],a=eF(this.getValues().map(function(t){return kI(t,e)}),2),l=a[0],s=a[1],u=eF(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return kI(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,EU(f,i,o)];c>f&&(c=(n=eF([f,c],2))[0],f=n[1]);var p=f-c;return p>o-i?[i,o]:c<i?l===i&&s===f?[i,f]:[i,p+i]:f>o?s===o&&l===c?[c,o]:[o-p,o]:[c,f]},e.prototype.calcSelectionArea=function(t){var e=eF(this.clampValues(t),2),n=e[0],r=e[1],i=this.availableSpace,o=i.x,a=i.y,l=i.width,s=i.height;return this.getOrientVal([[{y:a,height:s,x:o,width:n*l},{y:a,height:s,x:n*l+o,width:(r-n)*l},{y:a,height:s,x:r*l,width:(1-r)*l}],[{x:o,width:l,y:a,height:n*s},{x:o,width:l,y:n*s+a,height:(r-n)*s},{x:o,width:l,y:r*s,height:(1-r)*s}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,i=n.y,o=n.width,a=n.height,l=eF(this.clampValues(),2),s=l[0],u=l[1],c=("start"===t?s:u)*this.getOrientVal([o,a])+("start"===t?-e:e);return{x:r+this.getOrientVal([c,o/2]),y:i+this.getOrientVal([a/2,c])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transform:"rotate(90)",textAlign:"start"}:"end"===t?{transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,i=n.orientation,o=n.formatter,a=n.autoFitLabel,l=wl(this.attributes,"handle"),s=wl(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new vz({style:eN(eN(eN({},s),this.inferTextStyle(t)),{text:p})}),d=h.getBBox(),y=d.width,g=d.height;if(h.destroy(),!a){if("value"===r)return{text:p,x:0,y:-g-u};var v=u+c+("horizontal"===i?y/2:0);return(e={text:p})["horizontal"===i?"x":"y"]="start"===t?-v:v,e}var b=0,x=0,O=this.availableSpace,w=O.width,E=O.height,k=this.calcSelectionArea()[1],M=k.x,S=k.y,_=k.width,P=k.height,j=u+c;if("horizontal"===i){var A=j+y/2;b="start"===t?M-j-y>0?-A:A:w-M-_-j>y?A:-A}else{var T=g+j;x="start"===t?S-c>g?-T:j:E-(S+P)-c>g?T:-j}return{x:b,y:x,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=wl(this.attributes,"handleLabel");return eN(eN(eN({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=wl(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return eN({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,r=e.showLabelOnInteraction,i=e.orientation,o=this.calcHandlePosition(t),a=this.calcHandleText(t),l=n;return!n&&r&&(l=!!this.target),eN(eN(eN(eN({},ws(this.getHandleIconStyle(),"icon")),ws(eN(eN({},this.getHandleLabelStyle(t)),a),"label")),o),{orientation:i,showLabel:l,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,r=t.height;return e||Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=eF(t,2),n=e[0],r=e[1];return"horizontal"===this.attributes.orientation?n:r},e.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=this.attributes.type,i=eF(this.getValues(),2),o=[i[0]+("range"===r?t:0),i[1]+e].sort();n?this.setValues(o):this.innerSetValues(o,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,r=e.height;return t/this.getOrientVal([n,r])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new dd(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=t.deltaX,n=t.deltaY,r=this.getRatio(n||e);this.setValuesOffset(r,r,!0)}},e.tag="slider",e}(vF);function Mw(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ME(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Mk(t){let e,n,r;function i(t,r,o=0,a=t.length){if(o<a){if(0!==e(r,r))return a;do{let e=o+a>>>1;0>n(t[e],r)?o=e+1:a=e}while(o<a)}return o}return 2!==t.length?(e=Mw,n=(e,n)=>Mw(t(e),n),r=(e,n)=>t(e)-n):(e=t===Mw||t===ME?t:MM,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){let a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{let e=i+o>>>1;0>=n(t[e],r)?i=e+1:o=e}while(i<o)}return i}}}function MM(){return 0}function MS(t){return null===t?NaN:+t}let M_=Mk(Mw),MP=M_.right,Mj=M_.left,MA=Mk(MS).center;function MT(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=MN(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>MN(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(MC(n))}function MC(t=Mw){if(t===Mw)return MN;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function MN(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function ML(t){return!!t.getBandWidth}function MI(t,e,n){var r;if(!ML(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep(),l=(r=Mj(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function MR(t,e,n){if(!e)return t.getOptions().domain;if(!ML(t)){let r=MT(e);if(!n)return r;let[i]=r,{range:o}=t.getOptions(),[a,l]=o,s=t.invert(t.map(i)+(a>l?-1:1)*n);return[i,s]}let{domain:r}=t.getOptions(),i=e[0],o=r.indexOf(i);if(n){let t=o+Math.round(r.length*n);return r.slice(o,t)}let a=e[e.length-1],l=r.indexOf(a);return r.slice(o,l+1)}function MD(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[MI(a,n,e),MI(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1);return[MR(a,[u[0],c[0]]),MR(l,[u[1],c[1]])]}function MF(t,e){let[n,r]=t;return[e.map(n),e.map(r)+(e.getStep?e.getStep():0)]}var MB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Mz=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=MB(t,["orientation","labelFormatter","size","style","position"]);return r=>{var l;let{scales:[s],value:u,theme:c,coordinate:f}=r,{bbox:p}=u,{width:h,height:d}=p,{slider:y={}}=c,g=(null==(l=s.getFormatter)?void 0:l.call(s))||(t=>t+""),v="string"==typeof n?eo(n):n,b="horizontal"===e,x=sq(f)&&b,{trackSize:O=y.trackSize}=i,[w,E]=function(t,e,n){let{x:r,y:i,width:o,height:a}=t;return"left"===e?[r+o-n,i]:"right"===e||"bottom"===e?[r,i]:"top"===e?[r,i+a-n]:void 0}(p,o,O);return new MO({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:w,y:E,trackLength:b?h:d,orientation:e,formatter:t=>(v||g)(MI(s,x?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;if(rA(t.sparklineData))return t.sparklineData;var r=["y","series"];let[i]=Array.from(n.entries()).filter(([t])=>"line"===t.type||"area"===t.type).map(([t])=>{let{encode:e,slider:n}=t;if((null==n?void 0:n.x)&&0===Object.keys(n.x).length)return Object.fromEntries(r.map(t=>{let n=e[t];return[t,n?n.value:void 0]}))});return(null==i?void 0:i.series)?Object.values(i.series.reduce((t,e,n)=>(t[e]=t[e]||[],t[e].push(i.y[n]),t),{})):null==i?void 0:i.y}(t,r)},i),a))})}};Mz.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let MW=t=>Mz(Object.assign(Object.assign({},t),{orientation:"horizontal"}));MW.props=Object.assign(Object.assign({},Mz.props),{defaultPosition:"bottom"});let M$=t=>Mz(Object.assign(Object.assign({},t),{orientation:"vertical"}));M$.props=Object.assign(Object.assign({},Mz.props),{defaultPosition:"left"});var MG=function(t){function e(e){var n=t.call(this,e,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new dd("scroll",r)),n.dispatchEvent(new dd("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=eF(n.getLocalPosition(),2),r=e[0],i=e[1],o=eF(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(kR(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new dd("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new dd("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new dd("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new dd("trackMouseleave",{detail:t.detail}))},n}return eC(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return wG(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=eF(this.range,2);return EU(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength;return void 0===n?e:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=eF(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eF(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+l[0]-(a+i),height:+l[1]-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var r=this.availableSpace,i=r.width,o=r.height;return n||this.getOrientVal([o,i])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=eF(this.range,2),i=r[0],o=t*(r[1]-i-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,o=e.slidable,a=wl(this.attributes,"track"),l=wl(this.attributes,"thumb"),s=eN(eN({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},ws(a,"track")),ws(l,"selection"));this.slider=v$(t).maybeAppendByClassName("scrollbar",function(){return new MO({style:s})}).update(s).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=eF(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(EU(t,i,o)),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},e.tag="scrollbar",e}(vF),MH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let MV=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=MH(t,["orientation","labelFormatter","style"]);return({scales:[t],value:n,theme:o})=>{let{bbox:a}=n,{x:l,y:s,width:u,height:c}=a,{scrollbar:f={}}=o,{ratio:p,range:h}=t.getOptions(),d="horizontal"===e?u:c,y=d/p,[g,v]=h;return new MG({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:s,trackLength:d,value:v>g?0:1}),i),{orientation:e,contentLength:y,viewportLength:d}))})}};MV.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let MU=t=>MV(Object.assign(Object.assign({},t),{orientation:"horizontal"}));MU.props=Object.assign(Object.assign({},MV.props),{defaultPosition:"bottom"});let Mq=t=>MV(Object.assign(Object.assign({},t),{orientation:"vertical"}));Mq.props=Object.assign(Object.assign({},MV.props),{defaultPosition:"left"});let MY=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=sq(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u}];return o.animate(p,Object.assign(Object.assign({},i),t))}},MX=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=sq(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},MK=(t,e)=>{let{coordinate:n}=e;return dq({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:t3.NUMBER}),(e,r,i)=>{let[o]=e;if(sY(n))return(e=>{let{__data__:r,style:o}=e,{radius:a=0,inset:l=0,fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=o,{points:f,y:p,y1:h}=r,d=gj(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=sU().cornerRadius(a).padAngle(l*Math.PI/180),b=new d1({}),x=n.getCenter(),O=t=>{b.attr({d:v(t),transform:`translate(${x[0]}, ${x[1]})`});let e=pJ(b);return b.style.transform="",e},w=e.animate([{scaleInYRadius:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:y+1e-4,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:u,opacity:c}],Object.assign(Object.assign({},i),t));return w.onframe=function(){e.style.path=O(Object.assign(Object.assign({},d),{outerRadius:Number(e.style.scaleInYRadius)}))},w.onfinish=function(){e.style.path=O(Object.assign(Object.assign({},d),{outerRadius:g}))},w})(o);let{style:a}=o,{transform:l="",fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=a,[f,p]=sq(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],h=[{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c}];return o.animate(h,Object.assign(Object.assign({},i),t))}},MZ=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=sq(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},MQ=(t,e)=>{dq({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:t3.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!sY(n))return MY(t,e)(r,i,o);let l=n.getCenter(),{__data__:s,style:u}=a,{radius:c=0,inset:f=0,fillOpacity:p=1,strokeOpacity:h=1,opacity:d=1}=u,{points:y,y:g,y1:v}=s,b=sU().cornerRadius(c).padAngle(f*Math.PI/180),x=gj(n,y,[g,v]),{startAngle:O,endAngle:w}=x,E=new d1({}),k=t=>{E.attr({d:b(t),transform:`translate(${l[0]}, ${l[1]})`});let e=pJ(E);return E.style.transform="",e},M=a.animate([{waveInArcAngle:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:O+1e-4,fillOpacity:p,strokeOpacity:h,opacity:d,offset:.01},{waveInArcAngle:w,fillOpacity:p,strokeOpacity:h,opacity:d}],Object.assign(Object.assign({},o),t));return M.onframe=function(){a.style.path=k(Object.assign(Object.assign({},x),{endAngle:Number(a.style.waveInArcAngle)}))},M.onfinish=function(){a.style.path=k(Object.assign(Object.assign({},x),{endAngle:w}))},M}};MQ.props={};let MJ=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:l}],Object.assign(Object.assign({},r),t))};MJ.props={};let M0=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:o,strokeOpacity:a,opacity:l},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};M0.props={};let M1=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))},M2=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.99},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))},M5=t=>(e,n,r)=>{var i;let[o]=e,a=(null==(i=o.getTotalLength)?void 0:i.call(o))||0;return o.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Object.assign(Object.assign({},r),t))};function M3(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}M5.props={};let M4=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function M6(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function M8(t,e){let[n,r,i,o]=M6(t),a=Math.ceil(Math.sqrt(e/(o/i))),l=[],s=o/Math.ceil(e/a),u=0,c=e;for(;c>0;){let t=Math.min(c,a),e=i/t;for(let i=0;i<t;i++){let t=n+i*e,o=r+u*s;l.push(function(t){let[e,n,r,i]=t;return`
|
|
10
|
+
(self.webpackChunk_nocobase_plugin_data_visualization=self.webpackChunk_nocobase_plugin_data_visualization||[]).push([["950"],{823:function(t,e,n){"use strict";let r,i,o,a;n.r(e),n.d(e,{Sankey:function(){return Hk},Mix:function(){return HY},Bar:function(){return G2},Stock:function(){return HS},Rose:function(){return Hd},Sunburst:function(){return HK},Histogram:function(){return Hv},Funnel:function(){return G9},DualAxes:function(){return G6},G2:function(){return ey},Liquid:function(){return HC},Column:function(){return G3},CirclePacking:function(){return Hz},Radar:function(){return Ha},Box:function(){return Hw},Scatter:function(){return Hi},Waterfall:function(){return Hg},Treemap:function(){return HR},BidirectionalBar:function(){return HH},Area:function(){return G0},WordCloud:function(){return HL},Line:function(){return Ht},RadialBar:function(){return HF},Gauge:function(){return HA},Venn:function(){return HU},Tiny:function(){return Hp},Heatmap:function(){return Hx},Bullet:function(){return HP},measureTextWidth:function(){return HQ},Base:function(){return GQ},Violin:function(){return H$},Pie:function(){return Hn}});var l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j,A,T,C,N,L,I,R,D,F,B,z,W,$,G,H,V,U,q,Y,X,K,Z,Q,J,tt,te,tn,tr,ti,to,ta,tl,ts,tu,tc,tf,tp,th,td,ty,tg,tm,tv,tb,tx,tO,tw,tE,tk,tM,tS,t_,tP,tj,tA,tT,tC,tN,tL,tI,tR,tD,tF,tB,tz,tW,t$,tG,tH,tV,tU,tq,tY,tX,tK,tZ,tQ,tJ,t0,t1,t2,t5,t3,t4,t6,t8,t9,t7,et,ee,en,er,ei,eo,ea,el,es,eu,ec={};n.r(ec),n.d(ec,{geoAlbers:function(){return iD},geoAlbersUsa:function(){return i9},geoAzimuthalEqualArea:function(){return i8},geoAzimuthalEqualAreaRaw:function(){return i6},geoAzimuthalEquidistant:function(){return i$},geoAzimuthalEquidistantRaw:function(){return iW},geoConicConformal:function(){return iQ},geoConicConformalRaw:function(){return iZ},geoConicEqualArea:function(){return iL},geoConicEqualAreaRaw:function(){return iN},geoConicEquidistant:function(){return i5},geoConicEquidistantRaw:function(){return i2},geoEqualEarth:function(){return iz},geoEqualEarthRaw:function(){return iB},geoEquirectangular:function(){return iU},geoEquirectangularRaw:function(){return iV},geoGnomonic:function(){return iT},geoGnomonicRaw:function(){return iA},geoIdentity:function(){return i1},geoMercator:function(){return iY},geoMercatorRaw:function(){return iq},geoNaturalEarth1:function(){return iH},geoNaturalEarth1Raw:function(){return iG},geoOrthographic:function(){return i0},geoOrthographicRaw:function(){return iJ},geoProjection:function(){return iP},geoProjectionMutator:function(){return ij},geoStereographic:function(){return iR},geoStereographicRaw:function(){return iI},geoTransverseMercator:function(){return i4},geoTransverseMercatorRaw:function(){return i3}});var ef={};n.r(ef),n.d(ef,{frequency:function(){return lI},id:function(){return lR},name:function(){return lD},weight:function(){return lL}});var ep={};n.r(ep),n.d(ep,{add:function(){return uQ},adjoint:function(){return um},clone:function(){return uc},copy:function(){return uf},create:function(){return uu},determinant:function(){return uv},equals:function(){return u5},exactEquals:function(){return u2},frob:function(){return uZ},fromQuat:function(){return uB},fromQuat2:function(){return uN},fromRotation:function(){return uP},fromRotationTranslation:function(){return uC},fromRotationTranslationScale:function(){return uD},fromRotationTranslationScaleOrigin:function(){return uF},fromScaling:function(){return u_},fromTranslation:function(){return uS},fromValues:function(){return up},fromXRotation:function(){return uj},fromYRotation:function(){return uA},fromZRotation:function(){return uT},frustum:function(){return uz},getRotation:function(){return uR},getScaling:function(){return uI},getTranslation:function(){return uL},identity:function(){return ud},invert:function(){return ug},lookAt:function(){return uY},mul:function(){return u3},multiply:function(){return ub},multiplyScalar:function(){return u0},multiplyScalarAndAdd:function(){return u1},ortho:function(){return uU},orthoNO:function(){return uV},orthoZO:function(){return uq},perspective:function(){return u$},perspectiveFromFieldOfView:function(){return uH},perspectiveNO:function(){return uW},perspectiveZO:function(){return uG},rotate:function(){return uw},rotateX:function(){return uE},rotateY:function(){return uk},rotateZ:function(){return uM},scale:function(){return uO},set:function(){return uh},str:function(){return uK},sub:function(){return u4},subtract:function(){return uJ},targetTo:function(){return uX},translate:function(){return ux},transpose:function(){return uy}});var eh={};n.r(eh),n.d(eh,{area:function(){return Cw},bottom:function(){return Cj},bottomLeft:function(){return Cj},bottomRight:function(){return Cj},inside:function(){return Cj},left:function(){return Cj},outside:function(){return CN},right:function(){return Cj},spider:function(){return CI},surround:function(){return CD},top:function(){return Cj},topLeft:function(){return Cj},topRight:function(){return Cj}});var ed={};n.r(ed),n.d(ed,{interpolateBlues:function(){return Lm},interpolateBrBG:function(){return NB},interpolateBuGn:function(){return N5},interpolateBuPu:function(){return N4},interpolateCividis:function(){return LP},interpolateCool:function(){return LF},interpolateCubehelixDefault:function(){return LR},interpolateGnBu:function(){return N8},interpolateGreens:function(){return Lb},interpolateGreys:function(){return LO},interpolateInferno:function(){return LX},interpolateMagma:function(){return LY},interpolateOrRd:function(){return N7},interpolateOranges:function(){return L_},interpolatePRGn:function(){return NW},interpolatePiYG:function(){return NG},interpolatePlasma:function(){return LK},interpolatePuBu:function(){return Lr},interpolatePuBuGn:function(){return Le},interpolatePuOr:function(){return NV},interpolatePuRd:function(){return Lo},interpolatePurples:function(){return LE},interpolateRainbow:function(){return Lz},interpolateRdBu:function(){return Nq},interpolateRdGy:function(){return NX},interpolateRdPu:function(){return Ll},interpolateRdYlBu:function(){return NZ},interpolateRdYlGn:function(){return NJ},interpolateReds:function(){return LM},interpolateSinebow:function(){return LH},interpolateSpectral:function(){return N1},interpolateTurbo:function(){return LV},interpolateViridis:function(){return Lq},interpolateWarm:function(){return LD},interpolateYlGn:function(){return Lf},interpolateYlGnBu:function(){return Lu},interpolateYlOrBr:function(){return Lh},interpolateYlOrRd:function(){return Ly},schemeAccent:function(){return CQ},schemeBlues:function(){return Lg},schemeBrBG:function(){return NF},schemeBuGn:function(){return N2},schemeBuPu:function(){return N3},schemeCategory10:function(){return CZ},schemeDark2:function(){return CJ},schemeGnBu:function(){return N6},schemeGreens:function(){return Lv},schemeGreys:function(){return Lx},schemeObservable10:function(){return C0},schemeOrRd:function(){return N9},schemeOranges:function(){return LS},schemePRGn:function(){return Nz},schemePaired:function(){return C1},schemePastel1:function(){return C2},schemePastel2:function(){return C5},schemePiYG:function(){return N$},schemePuBu:function(){return Ln},schemePuBuGn:function(){return Lt},schemePuOr:function(){return NH},schemePuRd:function(){return Li},schemePurples:function(){return Lw},schemeRdBu:function(){return NU},schemeRdGy:function(){return NY},schemeRdPu:function(){return La},schemeRdYlBu:function(){return NK},schemeRdYlGn:function(){return NQ},schemeReds:function(){return Lk},schemeSet1:function(){return C3},schemeSet2:function(){return C4},schemeSet3:function(){return C6},schemeSpectral:function(){return N0},schemeTableau10:function(){return C8},schemeYlGn:function(){return Lc},schemeYlGnBu:function(){return Ls},schemeYlOrBr:function(){return Lp},schemeYlOrRd:function(){return Ld}});var ey={};n.r(ey),n.d(ey,{AREA_CLASS_NAME:function(){return Sp},Academy:function(){return OY},Bin:function(){return jp},BinX:function(){return jh},COMPONENT_CLASS_NAME:function(){return Sc},Chart:function(){return Rg},ChartEvent:function(){return S2},Classic:function(){return OG},ClassicDark:function(){return OU},Dark:function(){return OV},DiffY:function(){return jw},DodgeX:function(){return jy},ELEMENT_CLASS_NAME:function(){return Sl},Filter:function(){return jX},FlexX:function(){return jV},Group:function(){return jR},GroupColor:function(){return jB},GroupX:function(){return jD},GroupY:function(){return jF},Jitter:function(){return jm},JitterX:function(){return jv},JitterY:function(){return jb},LABEL_CLASS_NAME:function(){return Sf},LABEL_LAYER_CLASS_NAME:function(){return Sa},Light:function(){return O$},LinearAxis:function(){return Ez},MAIN_LAYER_CLASS_NAME:function(){return So},MASK_CLASS_NAME:function(){return Sh},MaybeDefaultX:function(){return b6},MaybeDefaultY:function(){return b7},MaybeFunctionAttribute:function(){return xc},MaybeGradient:function(){return mP},MaybeIdentityX:function(){return bh},MaybeIdentityY:function(){return bp},MaybeKey:function(){return oJ},MaybeSeries:function(){return mj},MaybeSize:function(){return vO},MaybeStackY:function(){return Rd},MaybeTitle:function(){return oK},MaybeTooltip:function(){return oZ},MaybeTuple:function(){return v2},MaybeTupleX:function(){return bV},MaybeTupleY:function(){return bY},MaybeVisualPosition:function(){return v3},MaybeZeroPadding:function(){return v8},MaybeZeroX:function(){return sx},MaybeZeroY:function(){return vx},MaybeZeroY1:function(){return sb},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return jM},PLOT_CLASS_NAME:function(){return Su},Pack:function(){return jU},Runtime:function(){return Rp},Sample:function(){return jY},Select:function(){return jA},SelectX:function(){return jC},SelectY:function(){return jL},Selection:function(){return gu},SortColor:function(){return jH},SortX:function(){return j$},SortY:function(){return jG},StackEnter:function(){return jE},StackY:function(){return PX},SymmetryY:function(){return jO},VIEW_CLASS_NAME:function(){return Ss},corelib:function(){return AO},extend:function(){return Th},geolib:function(){return oo},graphlib:function(){return sr},plotlib:function(){return Tf},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return gs},stdlib:function(){return Tp}});var eg={}.toString,em=function(t,e){return eg.call(t)==="[object "+e+"]"},ev=function(t){return Array.isArray?Array.isArray(t):em(t,"Array")},eb=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},ex=function(t,e){if(t){if(ev(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(eb(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},eO=function(t){return em(t,"Function")},ew=Array.prototype;ew.splice,ew.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var eE=function(t){return em(t,"Number")},ek=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return ex(t,function(n,r){eO(t)&&"prototype"===r||e.push(n)}),e},eM=function(t){if("object"!=typeof t||null===t||!em(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},eS=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&eM(a)?(eM(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):ev(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},e_=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},eP=function(t,e){if(!e_(t))return -1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var ej=function(t){return t};function eA(t){return null==t?0:e_(t)?t.length:Object.keys(t).length}var eT=function(t,e){return(eT=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function eC(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}eT(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var eN=function(){return(eN=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function eL(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function eI(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{s(r.next(t))}catch(t){o(t)}}function l(t){try{s(r.throw(t))}catch(t){o(t)}}function s(t){var e;t.done?i(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,l)}s((r=r.apply(t,e||[])).next())})}function eR(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(l){return function(s){var u=[l,s];if(n)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(6===u[0]&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function eD(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function eF(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function eB(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],a=0,l=o.length;a<l;a++,i++)r[i]=o[a];return r}function ez(t,e,n){if(n||2==arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function eW(t,e,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function e$(){this.map={}}!function(t,e){if(!eO(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return nR||(nR=document.createElement("canvas").getContext("2d")),nR.font=[o,a,i,n+"px",r].join(" "),nR.measureText(em(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eB([t],ek(e)).join("")}),e$.prototype.has=function(t){return void 0!==this.map[t]},e$.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},e$.prototype.set=function(t,e){this.map[t]=e},e$.prototype.clear=function(){this.map={}},e$.prototype.delete=function(t){delete this.map[t]},e$.prototype.size=function(){return Object.keys(this.map).length};class eG{constructor(t){this.options=eS({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=eS({},this.options,t),this.rescale(t)}rescale(t){}}function eH(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function eV(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function eU(t,e,n,r,i){let o=n||0,a=r||t.length,l=i||(t=>t);for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}var eq=n(254),eY=n.n(eq);function eX(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function eK(t){let e=eY().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=eX(a,o,e+1/3);return[255*l,255*eX(a,o,e),255*eX(a,o,e-1/3),i]}(r):null}let eZ=(t,e)=>n=>t*(1-n)+e*n,eQ=(t,e)=>{let n=eK(t),r=eK(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},eJ=(t,e)=>"number"==typeof t&&"number"==typeof e?eZ(t,e):"string"==typeof t&&"string"==typeof e?eQ(t,e):()=>t,e0=(t,e)=>{let n=eZ(t,e);return t=>Math.round(n(t))};function e1(t){return null!=t&&!Number.isNaN(t)}let e2=Math.sqrt(50),e5=Math.sqrt(10),e3=Math.sqrt(2);function e4(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=e2?10:o>=e5?5:o>=e3?2:1)*10**i:-(10**-i)/(o>=e2?10:o>=e5?5:o>=e3?2:1)}function e6(t,e,n){let r=Math.abs(e-t)/Math.max(0,n),i=10**Math.floor(Math.log(r)/Math.LN10),o=r/i;return o>=e2?i*=10:o>=e5?i*=5:o>=e3&&(i*=2),e<t?-i:i}let e8=(t,e,n=5)=>{let r,i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=e4(l,s,n))>0?r=e4(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=e4(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},e9=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=eH(o,a),i=n(l,s)):(r=eH(a,o),i=n(s,l)),eV(i,r)},e7=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=eH(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=eU(t,e,1,r)-1,a=i[n];return eV(o[n],a)(e)}},nt=(t,e,n,r)=>(Math.min(t.length,e.length)>2?e7:e9)(t,e,r?e0:n);class ne extends eG{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:eZ,tickCount:5}}map(t){return e1(t)?this.output(t):this.options.unknown}invert(t){return e1(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return e8}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):ej}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=nt(n.map(t),r,o,i);this.output=eV(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=nt(i,r.map(t),eZ);this.input=eV(e,n,o)}}let nn=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=e4(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class nr extends ne{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:eJ,tickMethod:nn,tickCount:5}}chooseTransforms(){return[ej,ej]}clone(){return new nr(this.options)}}var ni=function(t){return null==t},no=function(t){return ni(t)?"":t.toString()},na=function(t){var e=no(t);return e.charAt(0).toUpperCase()+e.substring(1)},nl=t=>t;function ns(t,e){t&&nc.hasOwnProperty(t.type)&&nc[t.type](t,e)}var nu={Feature:function(t,e){ns(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)ns(n[r].geometry,e)}},nc={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){nf(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)nf(n[r],e,0)},Polygon:function(t,e){np(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)np(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)ns(n[r],e)}};function nf(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function np(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)nf(t[n],e,1);e.polygonEnd()}function nh(t,e){t&&nu.hasOwnProperty(t.type)?nu[t.type](t,e):ns(t,e)}class nd{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let r=0;r<this._n&&r<32;r++){let i=e[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,r,i,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(r=t[--e]),!(i=r-(o-n))););e>0&&(i<0&&t[e-1]<0||i>0&&t[e-1]>0)&&(n=o+(r=2*i),r==n-o&&(o=n))}return o}}var ny=Math.PI,ng=ny/2,nm=ny/4,nv=2*ny,nb=180/ny,nx=ny/180,nO=Math.abs,nw=Math.atan,nE=Math.atan2,nk=Math.cos,nM=Math.ceil,nS=Math.exp,n_=Math.log,nP=Math.pow,nj=Math.sin,nA=Math.sign||function(t){return t>0?1:t<0?-1:0},nT=Math.sqrt,nC=Math.tan;function nN(t){return t>1?0:t<-1?ny:Math.acos(t)}function nL(t){return t>1?ng:t<-1?-ng:Math.asin(t)}function nI(){}var nR,nD,nF,nB,nz,nW=new nd,n$=new nd,nG={point:nI,lineStart:nI,lineEnd:nI,polygonStart:function(){nG.lineStart=nH,nG.lineEnd=nq},polygonEnd:function(){nG.lineStart=nG.lineEnd=nG.point=nI,nW.add(nO(n$)),n$=new nd},result:function(){var t=nW/2;return nW=new nd,t}};function nH(){nG.point=nV}function nV(t,e){nG.point=nU,nD=nB=t,nF=nz=e}function nU(t,e){n$.add(nz*t-nB*e),nB=t,nz=e}function nq(){nU(nD,nF)}var nY,nX,nK,nZ,nQ=1/0,nJ=1/0,n0=-1/0,n1=n0,n2={point:function(t,e){t<nQ&&(nQ=t),t>n0&&(n0=t),e<nJ&&(nJ=e),e>n1&&(n1=e)},lineStart:nI,lineEnd:nI,polygonStart:nI,polygonEnd:nI,result:function(){var t=[[nQ,nJ],[n0,n1]];return n0=n1=-(nJ=nQ=1/0),t}},n5=0,n3=0,n4=0,n6=0,n8=0,n9=0,n7=0,rt=0,re=0,rn={point:rr,lineStart:ri,lineEnd:rl,polygonStart:function(){rn.lineStart=rs,rn.lineEnd=ru},polygonEnd:function(){rn.point=rr,rn.lineStart=ri,rn.lineEnd=rl},result:function(){var t=re?[n7/re,rt/re]:n9?[n6/n9,n8/n9]:n4?[n5/n4,n3/n4]:[NaN,NaN];return n5=n3=n4=n6=n8=n9=n7=rt=re=0,t}};function rr(t,e){n5+=t,n3+=e,++n4}function ri(){rn.point=ro}function ro(t,e){rn.point=ra,rr(nK=t,nZ=e)}function ra(t,e){var n=t-nK,r=e-nZ,i=nT(n*n+r*r);n6+=i*(nK+t)/2,n8+=i*(nZ+e)/2,n9+=i,rr(nK=t,nZ=e)}function rl(){rn.point=rr}function rs(){rn.point=rc}function ru(){rf(nY,nX)}function rc(t,e){rn.point=rf,rr(nY=nK=t,nX=nZ=e)}function rf(t,e){var n=t-nK,r=e-nZ,i=nT(n*n+r*r);n6+=i*(nK+t)/2,n8+=i*(nZ+e)/2,n9+=i,n7+=(i=nZ*t-nK*e)*(nK+t),rt+=i*(nZ+e),re+=3*i,rr(nK=t,nZ=e)}function rp(t){this._context=t}rp.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,nv)}},result:nI};var rh,rd,ry,rg,rm,rv=new nd,rb={point:nI,lineStart:function(){rb.point=rx},lineEnd:function(){rh&&rO(rd,ry),rb.point=nI},polygonStart:function(){rh=!0},polygonEnd:function(){rh=null},result:function(){var t=+rv;return rv=new nd,t}};function rx(t,e){rb.point=rO,rd=rg=t,ry=rm=e}function rO(t,e){rg-=t,rm-=e,rv.add(nT(rg*rg+rm*rm)),rg=t,rm=e}class rw{constructor(t){this._append=null==t?rE:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return rE;if(e!==r){let t=10**e;r=e,i=function(e){let n=1;this._+=e[0];for(let r=e.length;n<r;++n)this._+=Math.round(arguments[n]*t)/t+e[n]}}return i}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==o||this._append!==i){let t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,o=t,i=this._append,a=this._,this._=e}this._+=a}}result(){let t=this._;return this._="",t.length?t:null}}function rE(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function rk(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),nh(t,i(o))),o.result()}return a.area=function(t){return nh(t,i(nG)),nG.result()},a.measure=function(t){return nh(t,i(rb)),rb.result()},a.bounds=function(t){return nh(t,i(n2)),n2.result()},a.centroid=function(t){return nh(t,i(rn)),rn.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,nl):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new rw(n)):new rp(e=t),"function"!=typeof r&&o.pointRadius(r),a):e},a.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(o.pointRadius(+t),+t),a):r},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);n=e}return null===e&&(o=new rw(n)),a},a.projection(t).digits(n).context(e)}function rM(t,e,n){t*=1,e*=1,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(i);++r<i;)o[r]=t+r*n;return o}function rS(t,e,n){var r=rM(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function r_(t,e,n){var r=rM(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var rP={}.toString,rj=function(t,e){return rP.call(t)==="[object "+e+"]"},rA=function(t){return Array.isArray?Array.isArray(t):rj(t,"Array")},rT=function(t){return"object"==typeof t&&null!==t},rC=function(t){if(!rT(t)||!rj(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},rN=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&rC(a)?(rC(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):rA(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},rL=function(t){var e=no(t);return e.charAt(0).toLowerCase()+e.substring(1)};function rI(t){return t}function rR(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),rI)}function rD(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function rF(t=""){throw Error(t)}function rB(t,e){let{attributes:n}=e,r=new Set(["id","className"]);for(let[e,i]of Object.entries(n))r.has(e)||("transform"===e&&t.attr(e,""),t.attr(e,i))}function rz(t){return null!=t&&!Number.isNaN(t)}function rW(t,e){return r$(t,e)||{}}function r$(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[rL(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function rG(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function rH(t,e){if(void 0===t)return null;if("number"==typeof t)return t;let n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function rV(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function rU(t){return null===t||!1===t}function rq(t,e,n={},r=!1){return rU(t)||Array.isArray(t)&&r?t:rN(n,rW(t,e))}function rY(t,e={}){return rU(t)||Array.isArray(t)||!rX(t)?t:rN(e,t)}function rX(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function rK(t,e){return"object"==typeof t?rW(t,e):t}function rZ(t){return function(e,n){var r=nk(e),i=nk(n),o=t(r*i);return o===1/0?[2,0]:[o*i*nj(e),o*nj(n)]}}function rQ(t){return function(e,n){var r=nT(e*e+n*n),i=t(r),o=nj(i);return[nE(e*o,r*nk(i)),nL(r&&n*o/r)]}}function rJ(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:nI,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function r0(t,e){return 1e-6>nO(t[0]-e[0])&&1e-6>nO(t[1]-e[1])}function r1(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function r2(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(r0(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd();return}a[0]+=2e-6}l.push(n=new r1(r,t,null,!0)),s.push(n.o=new r1(r,null,n,!1)),l.push(n=new r1(a,t,null,!1)),s.push(n.o=new r1(a,null,n,!0))}}),l.length){for(s.sort(e),r5(l),r5(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;u=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(o=(u=p.p.z).length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function r5(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function r3(t){return[nE(t[1],t[0]),nL(t[2])]}function r4(t){var e=t[0],n=t[1],r=nk(n);return[r*nk(e),r*nj(e),nj(n)]}function r6(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function r8(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function r9(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function r7(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function it(t){var e=nT(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ie(t){return nO(t[0])<=ny?t[0]:nA(t[0])*((nO(t[0])+ny)%nv-ny)}function ir(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function ii(t,e,n,r){return function(i){var o,a,l,s=e(i),u=rJ(),c=e(u),f=!1,p={point:h,lineStart:y,lineEnd:g,polygonStart:function(){p.point=v,p.lineStart=b,p.lineEnd=x,a=[],o=[]},polygonEnd:function(){p.point=h,p.lineStart=y,p.lineEnd=g,a=ir(a);var t=function(t,e){var n=ie(e),r=e[1],i=nj(r),o=[nj(n),-nk(n),0],a=0,l=0,s=new nd;1===i?r=ng+1e-6:-1===i&&(r=-ng-1e-6);for(var u=0,c=t.length;u<c;++u)if(p=(f=t[u]).length)for(var f,p,h=f[p-1],d=ie(h),y=h[1]/2+nm,g=nj(y),v=nk(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=ie(x),w=x[1]/2+nm,E=nj(w),k=nk(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>ny,j=g*E;if(s.add(nE(j*S*nj(_),v*k+j*nk(_))),a+=P?M+S*nv:M,P^d>=n^O>=n){var A=r8(r4(h),r4(x));it(A);var T=r8(o,A);it(T);var C=(P^M>=0?-1:1)*nL(T[2]);(r>C||r===C&&(A[0]||A[1]))&&(l+=P^M>=0?1:-1)}}return(a<-1e-6||a<1e-6&&s<-1e-12)^1&l}(o,r);a.length?(f||(i.polygonStart(),f=!0),r2(a,ia,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function y(){p.point=d,s.lineStart()}function g(){p.point=h,s.lineEnd()}function v(t,e){l.push([t,e]),c.point(t,e)}function b(){c.lineStart(),l=[]}function x(){v(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),p=u.result(),h=p.length;if(l.pop(),o.push(l),l=null,h){if(1&s){if((e=(n=p[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}return}h>1&&2&s&&p.push(p.pop().concat(p.shift())),a.push(p.filter(io))}}return p}}function io(t){return t.length>1}function ia(t,e){return((t=t.x)[0]<0?t[1]-ng-1e-6:ng-t[1])-((e=e.x)[0]<0?e[1]-ng-1e-6:ng-e[1])}var il=ii(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l,s,u,c,f,p,h,d=o>0?ny:-ny,y=nO(o-n);1e-6>nO(y-ny)?(t.point(n,r=(r+a)/2>0?ng:-ng),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=ny&&(1e-6>nO(n-i)&&(n-=1e-6*i),1e-6>nO(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=nO(h=nj(l-u))>1e-6?nw((nj(s)*(p=nk(c))*nj(u)-nj(c)*(f=nk(s))*nj(l))/(f*p*h)):(s+c)/2,t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),e=0),t.point(n=o,r=a),i=d},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*ng,r.point(-ny,i),r.point(0,i),r.point(ny,i),r.point(ny,0),r.point(ny,-i),r.point(0,-i),r.point(-ny,-i),r.point(-ny,0),r.point(-ny,i);else if(nO(t[0]-e[0])>1e-6){var o=t[0]<e[0]?ny:-ny;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-ny,-ng]);function is(t,e){e=r4(e),e[0]-=t,it(e);var n=nN(-e[1]);return((0>-e[2]?-n:n)+nv-1e-6)%nv}function iu(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||0>s(i,o)^l>0)do u.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return 1e-6>nO(r[0]-t)?i>0?0:3:1e-6>nO(r[0]-n)?i>0?2:1:1e-6>nO(r[1]-e)?+(i>0):i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,p,h,d,y,g,v,b,x=a,O=rJ(),w={point:E,lineStart:function(){w.point=k,u&&u.push(c=[]),v=!0,g=!1,d=y=NaN},lineEnd:function(){s&&(k(f,p),h&&g&&O.rejoin(),s.push(O.result())),w.point=E,g&&x.lineEnd()},polygonStart:function(){x=O,s=[],u=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],p=f[0],h=f[1];s<c;++s)o=p,a=h,p=(f=l[s])[0],h=f[1],a<=r?h>r&&(p-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(p-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=b&&e,i=(s=ir(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&r2(s,l,e,o,a),a.polygonEnd()),x=a,s=u=c=null}};function E(t,e){i(t,e)&&x.point(t,e)}function k(o,a){var l=i(o,a);if(u&&c.push([o,a]),v)f=o,p=a,h=l,v=!1,l&&(x.lineStart(),x.point(o,a));else if(l&&g)x.point(o,a);else{var s=[d=Math.max(-1e9,Math.min(1e9,d)),y=Math.max(-1e9,Math.min(1e9,y))],O=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=e[0],c=e[1],f=0,p=1,h=u-l,d=c-s;if(a=n-l,!h&&a>0)return;if(a/=h,h<0){if(a<f)return;a<p&&(p=a)}else if(h>0){if(a>p)return;a>f&&(f=a)}if(a=i-l,h||!(a<0)){if(a/=h,h<0){if(a>p)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<p&&(p=a)}if(a=r-s,d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<p&&(p=a)}else if(d>0){if(a>p)return;a>f&&(f=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>p)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<p&&(p=a)}return f>0&&(t[0]=l+f*h,t[1]=s+f*d),p<1&&(e[0]=l+p*h,e[1]=s+p*d),!0}}}}(s,O,t,e,n,r)?l&&(x.lineStart(),x.point(o,a),b=!1):(g||(x.lineStart(),x.point(s[0],s[1])),x.point(O[0],O[1]),l||x.lineEnd(),b=!1)}d=o,y=a,g=l}return w}}function ic(t,e){function n(n,r){return e((n=t(n,r))[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function ip(t,e){return nO(t)>ny&&(t-=Math.round(t/nv)*nv),[t,e]}function ih(t,e,n){return(t%=nv)?e||n?ic(iy(t),ig(e,n)):iy(t):e||n?ig(e,n):ip}function id(t){return function(e,n){return nO(e+=t)>ny&&(e-=Math.round(e/nv)*nv),[e,n]}}function iy(t){var e=id(t);return e.invert=id(-t),e}function ig(t,e){var n=nk(t),r=nj(t),i=nk(e),o=nj(e);function a(t,e){var a=nk(e),l=nk(t)*a,s=nj(t)*a,u=nj(e),c=u*n+l*r;return[nE(s*i-c*o,l*n-u*r),nL(c*i+s*o)]}return a.invert=function(t,e){var a=nk(e),l=nk(t)*a,s=nj(t)*a,u=nj(e),c=u*i-s*o;return[nE(s*i+u*o,l*n+c*r),nL(c*n-l*r)]},a}function im(t){return function(e){var n=new iv;for(var r in t)n[r]=t[r];return n.stream=e,n}}function iv(){}function ib(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nh(n,t.stream(n2)),e(n2.result()),null!=r&&t.clipExtent(r),t}function ix(t,e,n){return ib(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])},n)}function iO(t,e,n){return ix(t,[[0,0],e],n)}function iw(t,e,n){return ib(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])},n)}function iE(t,e,n){return ib(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])},n)}ip.invert=ip,iv.prototype={constructor:iv,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var ik=nk(30*nx);function iM(t,e){var n;return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,p,h,d,y,g){var v=u-r,b=c-i,x=v*v+b*b;if(x>4*e&&y--){var O=a+p,w=l+h,E=s+d,k=nT(O*O+w*w+E*E),M=nL(E/=k),S=1e-6>nO(nO(E)-1)||1e-6>nO(o-f)?(o+f)/2:nE(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||nO((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<ik)&&(n(r,i,o,a,l,s,P,j,S,O/=k,w/=k,E,y,g),g.point(P,j),n(P,j,S,O,w,E,u,c,f,p,h,d,y,g))}}return function(e){var r,i,o,a,l,s,u,c,f,p,h,d,y={point:g,lineStart:v,lineEnd:x,polygonStart:function(){e.polygonStart(),y.lineStart=O},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){c=NaN,y.point=b,e.lineStart()}function b(r,i){var o=r4([r,i]),a=t(r,i);n(c,f,u,p,h,d,c=a[0],f=a[1],u=r,p=o[0],h=o[1],d=o[2],16,e),e.point(c,f)}function x(){y.point=g,e.lineEnd()}function O(){v(),y.point=w,y.lineEnd=E}function w(t,e){b(r=t,e),i=c,o=f,a=p,l=h,s=d,y.point=b}function E(){n(c,f,u,p,h,d,i,o,r,a,l,s,16,e),y.lineEnd=x,x()}return y}}(t,e):(n=t,im({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var iS=im({point:function(t,e){this.stream.point(t*nx,e*nx)}});function i_(t,e,n,r,i,o){if(!o){function a(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return a.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},a}var l=nk(o),s=nj(o),u=l*t,c=s*t,f=l/t,p=s/t,h=(s*n-l*e)/t,d=(s*e+l*n)/t;function y(t,o){return[u*(t*=r)-c*(o*=i)+e,n-c*t-u*o]}return y.invert=function(t,e){return[r*(f*t-p*e+h),i*(d-p*t-f*e)]},y}function iP(t){return ij(function(){return t})()}function ij(t){var e,n,r,i,o,a,l,s,u,c,f=150,p=480,h=250,d=0,y=0,g=0,v=0,b=0,x=0,O=1,w=1,E=null,k=il,M=null,S=nl,_=.5;function P(t){return s(t[0]*nx,t[1]*nx)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*nb,t[1]*nb]}function A(){var t=i_(f,0,0,O,w,x).apply(null,e(d,y)),r=i_(f,p-t[0],h-t[1],O,w,x);return n=ih(g,v,b),l=ic(e,r),s=ic(n,l),a=iM(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=iS((e=n,im({point:function(t,n){var r=e(t,n);return this.stream.point(r[0],r[1])}}))(k(a(S(c=t)))))},P.preclip=function(t){return arguments.length?(k=t,E=void 0,T()):k},P.postclip=function(t){return arguments.length?(S=t,M=r=i=o=null,T()):S},P.clipAngle=function(t){return arguments.length?(k=+t?function(t){var e=nk(t),n=2*nx,r=e>0,i=nO(e)>1e-6;function o(t,n){return nk(t)*nk(n)>e}function a(t,n,r){var i=r4(t),o=r4(n),a=[1,0,0],l=r8(i,o),s=r6(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=r8(a,l),p=r7(a,e*s/c);r9(p,r7(l,-e*u/c));var h=r6(p,f),d=r6(f,f),y=h*h-d*(r6(p,p)-1);if(!(y<0)){var g=nT(y),v=r7(f,(-h-g)/d);if(r9(v,p),v=r3(v),!r)return v;var b,x=t[0],O=n[0],w=t[1],E=n[1];O<x&&(b=x,x=O,O=b);var k=O-x,M=1e-6>nO(k-ny);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>nO(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>ny^(x<=v[0]&&v[0]<=O)){var S=r7(f,(-h+g)/d);return r9(S,p),[v,r3(S)]}}}function l(e,n){var i=r?t:ny-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return ii(o,function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,p){var h,d,y=[f,p],g=o(f,p),v=r?g?0:l(f,p):g?l(f+(f<0?ny:-ny),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||r0(e,d)||r0(y,d))&&(y[2]=1),g!==s?(c=0,g?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d):i&&e&&r^g&&!(v&n)&&(h=a(y,e,!0))&&(c=0,r?(t.lineStart(),t.point(h[0][0],h[0][1]),t.point(h[1][0],h[1][1]),t.lineEnd()):(t.point(h[1][0],h[1][1]),t.lineEnd(),t.lineStart(),t.point(h[0][0],h[0][1],3))),!g||e&&r0(e,y)||t.point(y[0],y[1]),e=y,s=g,n=v},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}},function(e,r,i,o){!function(t,e,n,r,i,o){if(n){var a=nk(e),l=nj(e),s=r*n;null==i?(i=e+r*nv,o=e-s/2):(i=is(a,i),o=is(a,o),(r>0?i<o:i>o)&&(i+=r*nv));for(var u,c=i;r>0?c>o:c<o;c-=s)u=r3([a,-l*nk(c),-l*nj(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-ny,t-ny])}(E=t*nx):(E=null,il),T()):E*nb},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,nl):iu(M=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),T()):null==M?null:[[M,r],[i,o]]},P.scale=function(t){return arguments.length?(f=+t,A()):f},P.translate=function(t){return arguments.length?(p=+t[0],h=+t[1],A()):[p,h]},P.center=function(t){return arguments.length?(d=t[0]%360*nx,y=t[1]%360*nx,A()):[d*nb,y*nb]},P.rotate=function(t){return arguments.length?(g=t[0]%360*nx,v=t[1]%360*nx,b=t.length>2?t[2]%360*nx:0,A()):[g*nb,v*nb,b*nb]},P.angle=function(t){return arguments.length?(x=t%360*nx,A()):x*nb},P.reflectX=function(t){return arguments.length?(O=t?-1:1,A()):O<0},P.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},P.precision=function(t){return arguments.length?(a=iM(l,_=t*t),T()):nT(_)},P.fitExtent=function(t,e){return ix(P,t,e)},P.fitSize=function(t,e){return iO(P,t,e)},P.fitWidth=function(t,e){return iw(P,t,e)},P.fitHeight=function(t,e){return iE(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}function iA(t,e){var n=nk(e),r=nk(t)*n;return[n*nj(t)/r,nj(e)/r]}function iT(){return iP(iA).scale(144.049).clipAngle(60)}function iC(t){var e=0,n=ny/3,r=ij(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*nx,n=t[1]*nx):[e*nb,n*nb]},i}function iN(t,e){var n=nj(t),r=(n+nj(e))/2;if(1e-6>nO(r)){var i=nk(t);function o(t,e){return[t*i,nj(e)/i]}return o.invert=function(t,e){return[t/i,nL(e*i)]},o}var a=1+n*(2*r-n),l=nT(a)/r;function s(t,e){var n=nT(a-2*r*nj(e))/r;return[n*nj(t*=r),l-n*nk(t)]}return s.invert=function(t,e){var n=l-e,i=nE(t,nO(n))*nA(n);return n*r<0&&(i-=ny*nA(t)*nA(n)),[i/r,nL((a-(t*t+n*n)*r*r)/(2*r))]},s}function iL(){return iC(iN).scale(155.424).center([0,33.6442])}function iI(t,e){var n=nk(e),r=1+nk(t)*n;return[n*nj(t)/r,nj(e)/r]}function iR(){return iP(iI).scale(250).clipAngle(142)}function iD(){return iL().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}iA.invert=rQ(nw),iI.invert=rQ(function(t){return 2*nw(t)});var iF=nT(3)/2;function iB(t,e){var n=nL(iF*nj(e)),r=n*n,i=r*r*r;return[t*nk(n)/(iF*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function iz(){return iP(iB).scale(177.158)}iB.invert=function(t,e){for(var n,r,i=e,o=i*i,a=o*o*o,l=0;l<12&&(r=i*(1.340264+-.081106*o+a*(893e-6+.003796*o))-e,i-=n=r/(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o)),a=(o=i*i)*o*o,!(1e-12>nO(n)));++l);return[iF*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/nk(i),nL(nj(i)/iF)]};var iW=rZ(function(t){return(t=nN(t))&&t/nj(t)});function i$(){return iP(iW).scale(79.4188).clipAngle(179.999)}function iG(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}function iH(){return iP(iG).scale(175.295)}function iV(t,e){return[t,e]}function iU(){return iP(iV).scale(152.63)}function iq(t,e){return[t,n_(nC((ng+e)/2))]}function iY(){return iX(iq).scale(961/nv)}function iX(t){var e,n,r,i=iP(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=ny*a(),l=i((function(t){function e(e){return e=t(e[0]*nx,e[1]*nx),e[0]*=nb,e[1]*=nb,e}return t=ih(t[0]*nx,t[1]*nx,t.length>2?t[2]*nx:0),e.invert=function(e){return e=t.invert(e[0]*nx,e[1]*nx),e[0]*=nb,e[1]*=nb,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===iq?[[Math.max(l[0]-o,u),e],[Math.min(l[0]+o,n),r]]:[[u,Math.max(l[1]-o,e)],[n,Math.min(l[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),c()):a()},i.translate=function(t){return arguments.length?(l(t),c()):l()},i.center=function(t){return arguments.length?(o(t),c()):o()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),c()):null==u?null:[[u,e],[n,r]]},c()}function iK(t){return nC((ng+t)/2)}function iZ(t,e){var n=nk(t),r=t===e?nj(t):n_(n/nk(e))/n_(iK(e)/iK(t)),i=n*nP(iK(t),r)/r;if(!r)return iq;function o(t,e){i>0?e<-ng+1e-6&&(e=-ng+1e-6):e>ng-1e-6&&(e=ng-1e-6);var n=i/nP(iK(e),r);return[n*nj(r*t),i-n*nk(r*t)]}return o.invert=function(t,e){var n=i-e,o=nA(r)*nT(t*t+n*n),a=nE(t,nO(n))*nA(n);return n*r<0&&(a-=ny*nA(t)*nA(n)),[a/r,2*nw(nP(i/o,1/r))-ng]},o}function iQ(){return iC(iZ).scale(109.5).parallels([30,30])}function iJ(t,e){return[nk(e)*nj(t),nj(e)]}function i0(){return iP(iJ).scale(249.5).clipAngle(90.000001)}function i1(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,p=0,h=null,d=1,y=1,g=im({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=nl;function b(){return d=l*c,y=l*f,o=a=null,x}function x(n){var r=n[0]*d,i=n[1]*y;if(p){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return x.invert=function(n){var r=n[0]-s,i=n[1]-u;if(p){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/y]},x.stream=function(t){return o&&a===t?o:o=g(v(a=t))},x.postclip=function(t){return arguments.length?(v=t,h=n=r=i=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(h=n=r=i=null,nl):iu(h=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),b()):null==h?null:[[h,n],[r,i]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],b()):[s,u]},x.angle=function(n){return arguments.length?(e=nj(p=n%360*nx),t=nk(p),b()):p*nb},x.reflectX=function(t){return arguments.length?(c=t?-1:1,b()):c<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return ix(x,t,e)},x.fitSize=function(t,e){return iO(x,t,e)},x.fitWidth=function(t,e){return iw(x,t,e)},x.fitHeight=function(t,e){return iE(x,t,e)},x}function i2(t,e){var n=nk(t),r=t===e?nj(t):(n-nk(e))/(e-t),i=n/r+t;if(1e-6>nO(r))return iV;function o(t,e){var n=i-e,o=r*t;return[n*nj(o),i-n*nk(o)]}return o.invert=function(t,e){var n=i-e,o=nE(t,nO(n))*nA(n);return n*r<0&&(o-=ny*nA(t)*nA(n)),[o/r,i-nA(r)*nT(t*t+n*n)]},o}function i5(){return iC(i2).scale(131.154).center([0,13.9389])}function i3(t,e){return[n_(nC((ng+e)/2)),-t]}function i4(){var t=iX(i3),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}iW.invert=rQ(function(t){return t}),iG.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-e)/(1.007226+o*(.045255+a*(-.311325+.259866*o-.005916*11*a)))}while(nO(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},iV.invert=iV,iq.invert=function(t,e){return[t,2*nw(nS(e))-ng]},iJ.invert=rQ(nL),i3.invert=function(t,e){return[-e,2*nw(nS(t))-ng]};var i6=rZ(function(t){return nT(2/(1+t))});function i8(){return iP(i6).scale(124.75).clipAngle(179.999)}function i9(){var t,e,n,r,i,o,a=iD(),l=iL().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=iL().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function f(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},c.stream=function(n){var r,i;return t&&e===n?t:(i=(r=[a.stream(e=n),l.stream(n),s.stream(n)]).length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}})},c.precision=function(t){return arguments.length?(a.precision(t),l.precision(t),s.precision(t),f()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),l.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(u),r=l.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+1e-6,c+.12*e+1e-6],[o-.214*e-1e-6,c+.234*e-1e-6]]).stream(u),i=s.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+1e-6,c+.166*e+1e-6],[o-.115*e-1e-6,c+.234*e-1e-6]]).stream(u),f()},c.fitExtent=function(t,e){return ix(c,t,e)},c.fitSize=function(t,e){return iO(c,t,e)},c.fitWidth=function(t,e){return iw(c,t,e)},c.fitHeight=function(t,e){return iE(c,t,e)},c.scale(1070)}i6.invert=rQ(function(t){return 2*nL(t/2)});var i7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ot(t){let{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});let{type:n}=e;return"graticule10"===n?Object.assign(Object.assign({},t),{data:{value:[(function(){var t,e,n,r,i,o,a,l,s,u,c,f,p=10,h=10,d=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:b()}}function b(){return rM(nM(r/d)*d,n,d).map(c).concat(rM(nM(l/y)*y,a,y).map(f)).concat(rM(nM(e/p)*p,t,p).filter(function(t){return nO(t%d)>1e-6}).map(s)).concat(rM(nM(o/h)*h,i,h).filter(function(t){return nO(t%y)>1e-6}).map(u))}return v.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},v.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(d=+t[0],y=+t[1],v):[d,y]},v.stepMinor=function(t){return arguments.length?(p=+t[0],h=+t[1],v):[p,h]},v.precision=function(p){return arguments.length?(g=+p,s=rS(o,i,90),u=r_(e,t,g),c=rS(l,a,90),f=r_(r,n,g),v):g},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])})()()]}}):"sphere"===n?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function oe(t){return"geoPath"===t.type}let on=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=i7(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=ec[`geo${na(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(ot);return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:function(){return[["custom",(t,n,r,i)=>{let s=a();var u,c=s,f=l,p={x:t,y:n,width:r,height:i},h=o;let{outline:d=(()=>{let t=f.filter(oe);return t.find(t=>t.sphere)?{type:"Sphere"}:{type:"FeatureCollection",features:t.filter(t=>!t.sphere).flatMap(t=>t.data.value).flatMap(t=>(function(t){if(!t||!t.type)return null;let e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0:null})(t).features)}})()}=h,{size:y="fitExtent"}=h;for(let[t,e]of("fitExtent"===y?function(t,e,n){let{x:r,y:i,width:o,height:a}=n;t.fitExtent([[r,i],[o,a]],e)}(c,d,p):"fitWidth"===y&&function(t,e,n){let{width:r,height:i}=n,[[o,a],[l,s]]=rk(t.fitWidth(r,e)).bounds(e),u=Math.ceil(s-a),c=Math.min(Math.ceil(l-o),u),f=t.scale()*(c-1)/c,[p,h]=t.translate();t.scale(f).translate([p,h+(i-u)/2]).precision(.2)}(c,d,p),Object.entries(o)))null==(u=s[t])||u.call(s,e);e=rk(s);let g=new nr({domain:[t,t+r]}),v=new nr({domain:[n,n+i]}),b=t=>{let e=s(t);if(!e)return[null,null];let[n,r]=e;return[g.map(n),v.map(r)]},x=t=>{if(!t)return null;let[e,n]=t,r=[g.invert(e),v.invert(n)];return s.invert(r)};return{transform:t=>b(t),untransform:t=>x(t)}}]]}},children:l.flatMap(t=>oe(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:rY(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};on.props={};var or=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let oi=()=>t=>{let{type:e,data:n,scale:r,encode:i,style:o,animate:a,key:l,state:s}=t;return[Object.assign(Object.assign({type:"geoView"},or(t,["type","data","scale","encode","style","animate","key","state"])),{children:[{type:"geoPath",key:`${l}-0`,data:{value:n},scale:r,encode:i,style:o,animate:a,state:s}]})]};function oo(){return{"composition.geoView":on,"composition.geoPath":oi}}function oa(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,l,s,u,c,f,p,h=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,b=t._y1;if(!h)return t._root=d,t;for(;h.length;)if((u=e>=(o=(y+v)/2))?y=o:v=o,(c=n>=(a=(g+b)/2))?g=a:b=a,i=h,!(h=h[f=c<<1|u]))return i[f]=d,t;if(l=+t._x.call(null,h.data),s=+t._y.call(null,h.data),e===l&&n===s)return d.next=h,i?i[f]=d:t._root=d,t;do i=i?i[f]=[,,,,]:t._root=[,,,,],(u=e>=(o=(y+v)/2))?y=o:v=o,(c=n>=(a=(g+b)/2))?g=a:b=a;while((f=c<<1|u)==(p=(s>=a)<<1|l>=o));return i[p]=h,i[f]=d,t}function ol(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function os(t){return t[0]}function ou(t){return t[1]}function oc(t,e,n){var r=new of(null==e?os:e,null==n?ou:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function of(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function op(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}oi.props={};var oh=oc.prototype=of.prototype;function od(t){return function(){return t}}function oy(t){return(t()-.5)*1e-6}oh.copy=function(){var t,e,n=new of(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=op(r),n;for(t=[{source:r,target:n._root=[,,,,]}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=[,,,,]}):r.target[i]=op(e));return n},oh.add=function(t){let e=+this._x.call(null,t),n=+this._y.call(null,t);return oa(this.cover(e,n),e,n,t)},oh.addAll=function(t){var e,n,r,i,o=t.length,a=Array(o),l=Array(o),s=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<o;++n)!(isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e)))&&(a[n]=r,l[n]=i,r<s&&(s=r),r>c&&(c=r),i<u&&(u=i),i>f&&(f=i));if(s>c||u>f)return this;for(this.cover(s,u).cover(c,f),n=0;n<o;++n)oa(this,a[n],l[n],t[n]);return this},oh.cover=function(t,e){if(isNaN(t*=1)||isNaN(e*=1))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,l,s=i-n||1,u=this._root;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,(a=[,,,,])[l]=u,u=a,s*=2,l){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},oh.data=function(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t},oh.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},oh.find=function(t,e,n){var r,i,o,a,l,s,u,c=this._x0,f=this._y0,p=this._x1,h=this._y1,d=[],y=this._root;for(y&&d.push(new ol(y,c,f,p,h)),null==n?n=1/0:(c=t-n,f=e-n,p=t+n,h=e+n,n*=n);s=d.pop();)if((y=s.node)&&!((i=s.x0)>p)&&!((o=s.y0)>h)&&!((a=s.x1)<c)&&!((l=s.y1)<f))if(y.length){var g=(i+a)/2,v=(o+l)/2;d.push(new ol(y[3],g,v,a,l),new ol(y[2],i,v,g,l),new ol(y[1],g,o,a,v),new ol(y[0],i,o,g,v)),(u=(e>=v)<<1|t>=g)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=s)}else{var b=t-+this._x.call(null,y.data),x=e-+this._y.call(null,y.data),O=b*b+x*x;if(O<n){var w=Math.sqrt(n=O);c=t-w,f=e-w,p=t+w,h=e+w,r=y.data}}return r},oh.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,l,s,u,c,f,p,h=this._root,d=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!h)return this;if(h.length)for(;;){if((u=o>=(l=(d+g)/2))?d=l:g=l,(c=a>=(s=(y+v)/2))?y=s:v=s,e=h,!(h=h[f=c<<1|u]))return this;if(!h.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,p=f)}for(;h.data!==t;)if(r=h,!(h=h.next))return this;return((i=h.next)&&delete h.next,r)?i?r.next=i:delete r.next:e?(i?e[f]=i:delete e[f],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[p]=h:this._root=h)):this._root=i,this},oh.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},oh.root=function(){return this._root},oh.size=function(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t},oh.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new ol(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&s.length){var u=(r+o)/2,c=(i+a)/2;(n=s[3])&&l.push(new ol(n,u,c,o,a)),(n=s[2])&&l.push(new ol(n,r,c,u,a)),(n=s[1])&&l.push(new ol(n,u,i,o,c)),(n=s[0])&&l.push(new ol(n,r,i,u,c))}return this},oh.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new ol(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(a+s)/2,f=(l+u)/2;(o=i[0])&&n.push(new ol(o,a,l,c,f)),(o=i[1])&&n.push(new ol(o,c,l,s,f)),(o=i[2])&&n.push(new ol(o,a,f,c,u)),(o=i[3])&&n.push(new ol(o,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},oh.x=function(t){return arguments.length?(this._x=t,this):this._x},oh.y=function(t){return arguments.length?(this._y=t,this):this._y};var og={value:()=>{}};function om(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new ov(r)}function ov(t){this._=t}function ob(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=og,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ov.prototype=om.prototype={constructor:ov,on:function(t,e){var n,r=this._,i=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(t=i[o]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=ob(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ob(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ov(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var ox,oO,ow=0,oE=0,ok=0,oM=0,oS=0,o_=0,oP="object"==typeof performance&&performance.now?performance:Date,oj="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function oA(){return oS||(oj(oT),oS=oP.now()+o_)}function oT(){oS=0}function oC(){this._call=this._time=this._next=null}function oN(t,e,n){var r=new oC;return r.restart(t,e,n),r}function oL(){oS=(oM=oP.now())+o_,ow=oE=0;try{oA(),++ow;for(var t,e=ox;e;)(t=oS-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ow}finally{ow=0,function(){for(var t,e,n=ox,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ox=e);oO=t,oR(r)}(),oS=0}}function oI(){var t=oP.now(),e=t-oM;e>1e3&&(o_-=e,oM=t)}function oR(t){!ow&&(oE&&(oE=clearTimeout(oE)),t-oS>24?(t<1/0&&(oE=setTimeout(oL,t-oP.now()-o_)),ok&&(ok=clearInterval(ok))):(ok||(oM=oP.now(),ok=setInterval(oI,1e3)),ow=1,oj(oL)))}function oD(t){return t.x}function oF(t){return t.y}oC.prototype=oN.prototype={constructor:oC,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?oA():+n)+(null==e?0:+e),this._next||oO===this||(oO?oO._next=this:ox=this,oO=this),this._call=t,this._time=n,oR()},stop:function(){this._call&&(this._call=null,this._time=1/0,oR())}};var oB=Math.PI*(3-Math.sqrt(5));function oz(t){return t.index}function oW(t,e){var n=t.get(e);if(!n)throw Error("node not found: "+e);return n}function o$(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function oG(t,e){if(null!==t)return{type:"column",value:t,field:e}}function oH(t,e){return Object.assign(Object.assign({},oG(t,e)),{inferred:!0})}function oV(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function oU(t,e){let n=[];for(let r of t)n[r]=e;return n}function oq(t,e){let n=t[e];if(!n)return[null,null];let{value:r,field:i=null}=n;return[r,i]}function oY(t,...e){for(let n of e)if("string"!=typeof n)return[n,null];else{let[e,r]=oq(t,n);if(null!==e)return[e,r]}return[null,null]}function oX(t){return!(t instanceof Date)&&"object"==typeof t}let oK=(t={})=>{let{channel:e="x"}=t;return(t,n)=>{let{encode:r}=n,{tooltip:i}=n;if(rU(i))return[t,n];let{title:o}=i;if(void 0!==o)return[t,n];let a=Object.keys(r).filter(t=>t.startsWith(e)).filter(t=>!r[t].inferred).map(t=>oq(r,t)).filter(([t])=>t).map(t=>t[0]);if(0===a.length)return[t,n];let l=[];for(let e of t)l[e]={value:a.map(t=>t[e]instanceof Date?function(t){let e=t.getFullYear(),n=o$(t.getMonth()+1),r=o$(t.getDate()),i=`${e}-${n}-${r}`,o=t.getHours(),a=t.getMinutes(),l=t.getSeconds();return o||a||l?`${i} ${o$(o)}:${o$(a)}:${o$(l)}`:i}(t[e]):t[e]).join(", ")};return[t,rN({},n,{tooltip:{title:l}})]}};oK.props={};let oZ=t=>{let{channel:e}=t;return(t,n)=>{let{encode:r,tooltip:i}=n;if(rU(i))return[t,n];let{items:o=[]}=i;return!o||o.length>0?[t,n]:[t,rN({},n,{tooltip:{items:(Array.isArray(e)?e:[e]).flatMap(t=>Object.keys(r).filter(e=>e.startsWith(t)).map(t=>{let{field:e,value:n,inferred:i=!1,aggregate:o}=r[t];return i?null:o&&n?{channel:t}:e?{field:e}:n?{channel:t}:null}).filter(t=>null!==t))}})]}};oZ.props={};var oQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let oJ=()=>(t,e)=>{let{encode:n}=e,{key:r}=n,i=oQ(n,["key"]);if(void 0!==r)return[t,e];let o=Object.values(i).map(({value:t})=>t),a=t.map(t=>o.filter(Array.isArray).map(e=>e[t]).join("-"));return[t,rN({},e,{encode:{key:oG(a)}})]};function o0(t={}){let{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function o1(t={}){return[...o0(t),{name:"title",scale:"identity"}]}function o2(){return[{type:oK,channel:"color"},{type:oZ,channel:["x","y"]}]}function o5(){return[{type:oK,channel:"x"},{type:oZ,channel:["y"]}]}function o3(t={}){return o0(t)}function o4(){return[{type:oJ}]}oJ.props={};function o6(t,e){return t.getBandWidth(t.invert(e))}function o8(t,e,n={}){let{x:r,y:i,series:o}=e,{x:a,y:l,series:s}=t,{style:{bandOffset:u=.5*!s,bandOffsetX:c=u,bandOffsetY:f=u}={}}=n,p=!!(null==a?void 0:a.getBandWidth),h=!!(null==l?void 0:l.getBandWidth),d=!!(null==s?void 0:s.getBandWidth);return p||h?(t,e)=>{let n=p?o6(a,r[e]):0,u=h?o6(l,i[e]):0,y=d&&o?(o6(s,o[e])/2+ +o[e])*n:0,[g,v]=t;return[g+c*n+y,v+f*u]}:t=>t}function o9(t){return parseFloat(t)/100}function o7(t,e,n,r){let{x:i,y:o}=n,{innerWidth:a,innerHeight:l}=r.getOptions(),s=Array.from(t,t=>{let e=i[t],n=o[t];return[["string"==typeof e?o9(e)*a:+e,"string"==typeof n?o9(n)*l:+n]]});return[t,s]}function at(t){return"function"==typeof t?t:e=>e[t]}function ae(t,e){return Array.from(t,at(e))}function an(t,e){let{source:n=t=>t.source,target:r=t=>t.target,value:i=t=>t.value}=e,{links:o,nodes:a}=t,l=ae(o,n),s=ae(o,r),u=ae(o,i);return{links:o.map((t,e)=>({target:s[e],source:l[e],value:u[e]})),nodes:a||Array.from(new Set([...l,...s]),t=>({key:t}))}}var ar=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ai={joint:!0},ao={type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},aa={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},al={text:""},as=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,{nodeKey:c=t=>t.id,linkKey:f=t=>t.id}=n,p=Object.assign({nodeKey:c,linkKey:f},ar(n,["nodeKey","linkKey"])),h=rW(p,"node"),d=rW(p,"link"),{links:y,nodes:g}=an(e,p),{nodesData:v,linksData:b}=function(t,e,n){let{nodes:r,links:i}=t,{joint:o,nodeStrength:a,linkStrength:l}=e,{nodeKey:s=t=>t.id,linkKey:u=t=>t.id}=n,c=function(){var t,e,n,r,i,o=od(-30),a=1,l=1/0,s=.81;function u(n){var i,o=t.length,a=oc(t,oD,oF).visitAfter(f);for(r=n,i=0;i<o;++i)e=t[i],a.visit(p)}function c(){if(t){var e,n,r=t.length;for(e=0,i=Array(r);e<r;++e)i[(n=t[e]).index]=+o(n,e,t)}}function f(t){var e,n,r,o,a,l=0,s=0;if(t.length){for(r=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(l+=e.value,s+=n,r+=n*e.x,o+=n*e.y);t.x=r/s,t.y=o/s}else{(e=t).x=e.data.x,e.y=e.data.y;do l+=i[e.data.index];while(e=e.next)}t.value=l}function p(t,o,u,c){if(!t.value)return!0;var f=t.x-e.x,p=t.y-e.y,h=c-o,d=f*f+p*p;if(h*h/s<d)return d<l&&(0===f&&(d+=(f=oy(n))*f),0===p&&(d+=(p=oy(n))*p),d<a&&(d=Math.sqrt(a*d)),e.vx+=f*t.value*r/d,e.vy+=p*t.value*r/d),!0;if(!t.length&&!(d>=l)){(t.data!==e||t.next)&&(0===f&&(d+=(f=oy(n))*f),0===p&&(d+=(p=oy(n))*p),d<a&&(d=Math.sqrt(a*d)));do t.data!==e&&(h=i[t.data.index]*r/d,e.vx+=f*h,e.vy+=p*h);while(t=t.next)}}return u.initialize=function(e,r){t=e,n=r,c()},u.strength=function(t){return arguments.length?(o="function"==typeof t?t:od(+t),c(),u):o},u.distanceMin=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.distanceMax=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u}(),f=(function(t){var e,n,r,i,o,a,l=oz,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=od(30),c=1;function f(r){for(var i=0,l=t.length;i<c;++i)for(var s,u,f,p,h,d,y,g=0;g<l;++g)u=(s=t[g]).source,d=((d=Math.sqrt((p=(f=s.target).x+f.vx-u.x-u.vx||oy(a))*p+(h=f.y+f.vy-u.y-u.vy||oy(a))*h))-n[g])/d*r*e[g],p*=d,h*=d,f.vx-=p*(y=o[g]),f.vy-=h*y,u.vx+=p*(y=1-y),u.vy+=h*y}function p(){if(r){var a,s,u=r.length,c=t.length,f=new Map(r.map((t,e)=>[l(t,e,r),t]));for(a=0,i=Array(u);a<c;++a)(s=t[a]).index=a,"object"!=typeof s.source&&(s.source=oW(f,s.source)),"object"!=typeof s.target&&(s.target=oW(f,s.target)),i[s.source.index]=(i[s.source.index]||0)+1,i[s.target.index]=(i[s.target.index]||0)+1;for(a=0,o=Array(c);a<c;++a)s=t[a],o[a]=i[s.source.index]/(i[s.source.index]+i[s.target.index]);e=Array(c),h(),n=Array(c),d()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),f.initialize=function(t,e){r=t,a=e,p()},f.links=function(e){return arguments.length?(t=e,p(),f):t},f.id=function(t){return arguments.length?(l=t,f):l},f.iterations=function(t){return arguments.length?(c=+t,f):c},f.strength=function(t){return arguments.length?(s="function"==typeof t?t:od(+t),h(),f):s},f.distance=function(t){return arguments.length?(u="function"==typeof t?t:od(+t),d(),f):u},f})(i).id(at(u));"function"==typeof a&&c.strength(a),"function"==typeof l&&f.strength(l);let p=(function(t){let e;var n,r=1,i=.001,o=1-Math.pow(.001,1/300),a=0,l=.6,s=new Map,u=oN(p),c=om("tick","end"),f=(e=1,()=>(e=(1664525*e+0x3c6ef35f)%0x100000000)/0x100000000);function p(){h(),c.call("tick",n),r<i&&(u.stop(),c.call("end",n))}function h(e){var i,u,c=t.length;void 0===e&&(e=1);for(var f=0;f<e;++f)for(r+=(a-r)*o,s.forEach(function(t){t(r)}),i=0;i<c;++i)null==(u=t[i]).fx?u.x+=u.vx*=l:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=l:(u.y=u.fy,u.vy=0);return n}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(.5+n),o=n*oB;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function y(e){return e.initialize&&e.initialize(t,f),e}return null==t&&(t=[]),d(),n={tick:h,restart:function(){return u.restart(p),n},stop:function(){return u.stop(),n},nodes:function(e){return arguments.length?(t=e,d(),s.forEach(y),n):t},alpha:function(t){return arguments.length?(r=+t,n):r},alphaMin:function(t){return arguments.length?(i=+t,n):i},alphaDecay:function(t){return arguments.length?(o=+t,n):+o},alphaTarget:function(t){return arguments.length?(a=+t,n):a},velocityDecay:function(t){return arguments.length?(l=1-t,n):1-l},randomSource:function(t){return arguments.length?(f=t,s.forEach(y),n):f},force:function(t,e){return arguments.length>1?(null==e?s.delete(t):s.set(t,y(e)),n):s.get(t)},find:function(e,n,r){var i,o,a,l,s,u=0,c=t.length;for(null==r?r=1/0:r*=r,u=0;u<c;++u)(a=(i=e-(l=t[u]).x)*i+(o=n-l.y)*o)<r&&(s=l,r=a);return s},on:function(t,e){return arguments.length>1?(c.on(t,e),n):c.on(t)}}})(r).force("link",f).force("charge",c);o?p.force("center",function(t,e){var n,r=1;function i(){var i,o,a=n.length,l=0,s=0;for(i=0;i<a;++i)l+=(o=n[i]).x,s+=o.y;for(l=(l/a-t)*r,s=(s/a-e)*r,i=0;i<a;++i)o=n[i],o.x-=l,o.y-=s}return null==t&&(t=0),null==e&&(e=0),i.initialize=function(t){n=t},i.x=function(e){return arguments.length?(t=+e,i):t},i.y=function(t){return arguments.length?(e=+t,i):e},i.strength=function(t){return arguments.length?(r=+t,i):r},i}()):p.force("x",function(t){var e,n,r,i=od(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)i=e[o],i.vx+=(r[o]-i.x)*n[o]*t}function a(){if(e){var o,a=e.length;for(o=0,n=Array(a),r=Array(a);o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=od(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:od(+t),a(),o):i},o.x=function(e){return arguments.length?(t="function"==typeof e?e:od(+e),a(),o):t},o}()).force("y",function(t){var e,n,r,i=od(.1);function o(t){for(var i,o=0,a=e.length;o<a;++o)i=e[o],i.vy+=(r[o]-i.y)*n[o]*t}function a(){if(e){var o,a=e.length;for(o=0,n=Array(a),r=Array(a);o<a;++o)n[o]=isNaN(r[o]=+t(e[o],o,e))?0:+i(e[o],o,e)}}return"function"!=typeof t&&(t=od(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:od(+t),a(),o):i},o.y=function(e){return arguments.length?(t="function"==typeof e?e:od(+e),a(),o):t},o}()),p.stop();let h=Math.ceil(Math.log(p.alphaMin())/Math.log(1-p.alphaDecay()));for(let t=0;t<h;t++)p.tick();return{nodesData:r,linksData:i}}({links:y,nodes:g},rN({},ai,o),p),x=rq(u,"link",{items:[t=>({name:"source",value:at(f)(t.source)}),t=>({name:"target",value:at(f)(t.target)})]}),O=rq(u,"node",{items:[t=>({name:"key",value:at(c)(t)})]},!0);return[rN({},ao,{data:b,encode:d,labels:l,style:rW(i,"link"),tooltip:x,animate:rK(s,"link")}),rN({},aa,{data:v,encode:Object.assign({},h),scale:r,style:rW(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},al),rW(i,"label")),...a],animate:rK(s,"link")})]};function au(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ac(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=ap)):void 0===e&&(e=af);for(var n,r,i,o,a,l=new ay(t),s=[l];n=s.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)s.push(r=i[o]=new ay(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(ad)}function af(t){return t.children}function ap(t){return Array.isArray(t)?t[1]:null}function ah(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function ad(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ay(t){this.data=t,this.depth=this.height=0,this.parent=null}function ag(t,e){return t.parent===e.parent?1:2}function am(t){var e=t.children;return e?e[0]:t.t}function av(t){var e=t.children;return e?e[e.length-1]:t.t}function ab(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function ax(){var t=ag,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new ab(t,0),l=[a];e=l.pop();)if(r=e._.children)for(e.children=Array(o=r.length),i=o-1;i>=0;--i)l.push(n=e.children[i]=new ab(r[i],i)),n.parent=e;return(a.parent=new ab(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(l);else{var u=i,c=i,f=i;i.eachBefore(function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>f.depth&&(f=t)});var p=u===c?1:t(u,c)/2,h=p-u.x,d=e/(c.x+p+h),y=n/(f.depth||1);i.eachBefore(function(t){t.x=(t.x+h)*d,t.y=t.depth*y})}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)e=i[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o,a,l=e,s=e,u=n,c=l.parent.children[0],f=l.m,p=s.m,h=u.m,d=c.m;u=av(u),l=am(l),u&&l;)c=am(c),(s=av(s)).a=e,(a=u.z+h-l.z-f+t(u._,l._))>0&&(!function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}((i=u,o=r,i.a.parent===e.parent?i.a:o),e,a),f+=a,p+=a),h+=u.m,f+=l.m,d+=c.m,p+=s.m;u&&!av(s)&&(s.t=u,s.m+=h-p),l&&!am(c)&&(c.t=l,c.m+=f-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function aO(t,e){return t.parent===e.parent?1:2}function aw(t,e){return t+e.x}function aE(t,e){return Math.max(t,e.y)}function ak(){var t=aO,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter(function(e){var n=e.children;n?(e.x=n.reduce(aw,0)/n.length,e.y=1+n.reduce(aE,0)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)});var l=function(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=l.x-t(l,s)/2,c=s.x+t(s,l)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}as.props={},ay.prototype=ac.prototype={constructor:ay,count:function(){return this.eachAfter(au)},each:function(t,e){let n=-1;for(let r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],l=[],s=-1;o=a.pop();)if(l.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=l.pop();)t.call(e,o,++s,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(let r of this)if(t.call(e,r,++n,this))return r},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)r.push(e=e.parent);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return ac(this).eachBefore(ah)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);while(o.length)}},ab.prototype=Object.create(ay.prototype);let aM=t=>e=>n=>{let{field:r="value",nodeSize:i,separation:o,sortBy:a,as:l=["x","y"]}=e,[s,u]=l,c=ac(n,t=>t.children).sum(t=>t[r]).sort(a),f=t();f.size([1,1]),i&&f.nodeSize(i),o&&f.separation(o),f(c);let p=[];c.each(t=>{t[s]=t.x,t[u]=t.y,t.name=t.data.name,p.push(t)});let h=c.links();return h.forEach(t=>{t[s]=[t.source[s],t.target[s]],t[u]=[t.source[u],t.target[u]]}),{nodes:p,edges:h}},aS=t=>aM(ak)(t);aS.props={};let a_=t=>aM(ax)(t);a_.props={};let aP={sortBy:(t,e)=>e.value-t.value},aj={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},aA={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},aT={text:"",fontSize:10},aC=t=>{let{data:e,encode:n={},scale:r={},style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,c=null==n?void 0:n.value,{nodes:f,edges:p}=a_(Object.assign(Object.assign(Object.assign({},aP),o),{field:c}))(e),h=rq(u,"node",{title:"name",items:["value"]},!0),d=rq(u,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[rN({},aA,{data:p,encode:rW(n,"link"),scale:rW(r,"link"),labels:l,style:Object.assign({stroke:"#999"},rW(i,"link")),tooltip:d,animate:rK(s,"link")}),rN({},aj,{data:f,scale:rW(r,"node"),encode:rW(n,"node"),labels:[Object.assign(Object.assign({},aT),rW(i,"label")),...a],style:Object.assign({},rW(i,"node")),tooltip:h,animate:rK(s,"node")})]};function aN(t){return null==t?null:aL(t)}function aL(t){if("function"!=typeof t)throw Error();return t}aC.props={};var aI={depth:-1},aR={},aD={};function aF(t){return t.id}function aB(t){return t.parentId}function az(){var t,e=aF,n=aB;function r(r){var i,o,a,l,s,u,c,f,p=Array.from(r),h=e,d=n,y=new Map;if(null!=t){let e=p.map((e,n)=>{var i;let o;return i=t(e,n,r),o=(i=`${i}`).length,a$(i,o-1)&&!a$(i,o-2)&&(i=i.slice(0,-1)),"/"===i[0]?i:`/${i}`}),n=e.map(aW),i=new Set(e).add("");for(let t of n)i.has(t)||(i.add(t),e.push(t),n.push(aW(t)),p.push(aD));h=(t,n)=>e[n],d=(t,e)=>n[e]}for(a=0,i=p.length;a<i;++a)o=p[a],u=p[a]=new ay(o),null!=(c=h(o,a,r))&&(c+="")&&(f=u.id=c,y.set(f,y.has(f)?aR:u)),null!=(c=d(o,a,r))&&(c+="")&&(u.parent=c);for(a=0;a<i;++a)if(c=(u=p[a]).parent){if(!(s=y.get(c)))throw Error("missing: "+c);if(s===aR)throw Error("ambiguous: "+c);s.children?s.children.push(u):s.children=[u],u.parent=s}else{if(l)throw Error("multiple roots");l=u}if(!l)throw Error("no root");if(null!=t){for(;l.data===aD&&1===l.children.length;)l=l.children[0],--i;for(let t=p.length-1;t>=0&&(u=p[t]).data===aD;--t)u.data=null}if(l.parent=aI,l.eachBefore(function(t){t.depth=t.parent.depth+1,--i}).eachBefore(ad),l.parent=null,i>0)throw Error("cycle");return l}return r.id=function(t){return arguments.length?(e=aN(t),r):e},r.parentId=function(t){return arguments.length?(n=aN(t),r):n},r.path=function(e){return arguments.length?(t=aN(e),r):t},r}function aW(t){let e=t.length;if(e<2)return"";for(;--e>1&&!a$(t,e););return t.slice(0,e)}function a$(t,e){if("/"===t[e]){let n=0;for(;e>0&&"\\"===t[--e];)++n;if((1&n)==0)return!0}return!1}function aG(){return 0}function aH(t){return function(){return t}}function aV(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function aU(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function aq(t,e){for(var n=0;n<e.length;++n)if(!aU(t,e[n]))return!1;return!0}function aY(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,l=e.r,s=o-n,u=a-r,c=l-i,f=Math.sqrt(s*s+u*u);return{x:(n+o+s/f*c)/2,y:(r+a+u/f*c)/2,r:(f+i+l)/2}}function aX(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,l=e.y,s=e.r,u=n.x,c=n.y,f=n.r,p=r-a,h=r-u,d=i-l,y=i-c,g=s-o,v=f-o,b=r*r+i*i-o*o,x=b-a*a-l*l+s*s,O=b-u*u-c*c+f*f,w=h*d-p*y,E=(d*O-y*x)/(2*w)-r,k=(y*g-d*v)/w,M=(h*x-p*O)/(2*w)-i,S=(p*v-h*g)/w,_=k*k+S*S-1,P=2*(o+E*k+M*S),j=E*E+M*M-o*o,A=-(Math.abs(_)>1e-6?(P+Math.sqrt(P*P-4*_*j))/(2*_):j/P);return{x:r+E+k*A,y:i+M+S*A,r:A}}function aK(t,e,n){var r,i,o,a,l=t.x-e.x,s=t.y-e.y,u=l*l+s*s;u?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(u+a-i)/(2*u),o=Math.sqrt(Math.max(0,a/u-r*r)),n.x=t.x-r*l-o*s,n.y=t.y-r*s+o*l):(r=(u+i-a)/(2*u),o=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*l-o*s,n.y=e.y+r*s+o*l)):(n.x=e.x+n.r,n.y=e.y)}function aZ(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function aQ(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function aJ(t){this._=t,this.next=null,this.previous=null}function a0(t){return Math.sqrt(t.value)}function a1(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function a2(t,e,n){return function(r){if(i=r.children){var i,o,a,l=i.length,s=t(r)*e||0;if(s)for(o=0;o<l;++o)i[o].r+=s;if(a=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h;if(!(o=(t="object"==typeof(h=t)&&"length"in h?h:Array.from(h)).length))return 0;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;aK(r,n,i=t[2]),n=new aJ(n),r=new aJ(r),i=new aJ(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(s=3;s<o;++s){aK(n._,r._,i=t[s]),i=new aJ(i),u=r.next,c=n.previous,f=r._.r,p=n._.r;do if(f<=p){if(aZ(u._,i._)){r=u,n.next=r,r.previous=n,--s;continue t}f+=u._.r,u=u.next}else{if(aZ(c._,i._)){(n=c).next=r,r.previous=n,--s;continue t}p+=c._.r,c=c.previous}while(u!==c.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=aQ(n);(i=i.next)!==r;)(l=aQ(i))<a&&(n=i,a=l);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(s=0,i=function(t,e){for(var n,r,i=0,o=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,a=[];i<o;)n=t[i],r&&aU(r,n)?++i:(r=function(t){switch(t.length){case 1:var e;return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return aY(t[0],t[1]);case 3:return aX(t[0],t[1],t[2])}}(a=function(t,e){var n,r;if(aq(e,t))return[e];for(n=0;n<t.length;++n)if(aV(e,t[n])&&aq(aY(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(aV(aY(t[n],t[r]),e)&&aV(aY(t[n],e),t[r])&&aV(aY(t[r],e),t[n])&&aq(aX(t[n],t[r],e),t))return[t[n],t[r],e];throw Error()}(a,n)),i=0);return r}(n,e);s<o;++s)n=t[s],n.x-=i.x,n.y-=i.y;return i.r}(i,n),s)for(o=0;o<l;++o)i[o].r-=s;r.r=a+s}}}function a5(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var a3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let a4=(t,e)=>({size:[t,e],padding:0,sort:(t,e)=>e.value-t.value}),a6=(t,e,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:n.color?void 0:t=>0===t.height?"":"#000"}}),a8={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r},a9={title:t=>t.data.name,items:[{field:"value"}]},a7=(t,e,n)=>{let{value:r}=n,i=rA(t)?az().path(e.path)(t):ac(t);return r?i.sum(t=>at(r)(t)).sort(e.sort):i.count(),(function(){var t=null,e=1,n=1,r=aG;function i(i){let o,a=(o=1,()=>(o=(1664525*o+0x3c6ef35f)%0x100000000)/0x100000000);return i.x=e/2,i.y=n/2,t?i.eachBefore(a1(t)).eachAfter(a2(r,.5,a)).eachBefore(a5(1)):i.eachBefore(a1(a0)).eachAfter(a2(aG,1,a)).eachAfter(a2(r,i.r/Math.min(e,n),a)).eachBefore(a5(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=aN(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:aH(+t),i):r},i})().size(e.size).padding(e.padding)(i),i.descendants()},lt=(t,e)=>{let{width:n,height:r}=e,{data:i,encode:o={},scale:a={},style:l={},layout:s={},labels:u=[],tooltip:c={}}=t,f=a3(t,["data","encode","scale","style","layout","labels","tooltip"]),p=a6(n,r,o),h=a7(i,rN({},a4(n,r),s),rN({},p.encode,o)),d=rW(l,"label");return rN({},p,Object.assign(Object.assign({data:h,encode:o,scale:a,style:l,labels:[Object.assign(Object.assign({},a8),d),...u]},f),{tooltip:rY(c,a9),axis:!1}))};function le(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function ln(t){return t.target.depth}function lr(t,e){return t.sourceLinks.length?t.depth:e-1}function li(t,e){let n=0;if(void 0===e)for(let e of t)(e*=1)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function lo(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function la(t){return function(){return t}}function ll(t,e){return lu(t.source,e.source)||t.index-e.index}function ls(t,e){return lu(t.target,e.target)||t.index-e.index}function lu(t,e){return t.y0-e.y0}function lc(t){return t.value}function lf(t){return t.index}function lp(t){return t.nodes}function lh(t){return t.links}function ld(t,e){let n=t.get(e);if(!n)throw Error("missing: "+e);return n}function ly({nodes:t}){for(let e of t){let t=e.y0,n=t;for(let n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(let t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}lt.props={};let lg={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},lm={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?le(t.sourceLinks,ln)-1:0},justify:lr},lv=t=>e=>{let{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:o,nodePadding:a,nodeDepth:l,nodes:s,links:u,linkSort:c,iterations:f}=Object.assign({},lg,t),p=(function(){let t,e,n,r=0,i=0,o=1,a=1,l=24,s=8,u,c=lf,f=lr,p=lp,h=lh,d=6;function y(y){let v={nodes:p(y),links:h(y)};return function({nodes:t,links:e}){t.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});let r=new Map(t.map(t=>[c(t),t]));if(e.forEach((t,e)=>{t.index=e;let{source:n,target:i}=t;"object"!=typeof n&&(n=t.source=ld(r,n)),"object"!=typeof i&&(i=t.target=ld(r,i)),n.sourceLinks.push(t),i.targetLinks.push(t)}),null!=n)for(let{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}(v),function({nodes:t}){for(let e of t)e.value=void 0===e.fixedValue?Math.max(li(e.sourceLinks,lc),li(e.targetLinks,lc)):e.fixedValue}(v),function({nodes:e}){let n=e.length,r=new Set(e),i=new Set,o=0;for(;r.size;){if(r.forEach(t=>{for(let{target:e}of(t.depth=o,t.sourceLinks))i.add(e)}),++o>n)throw Error("circular link");r=i,i=new Set}if(t){let n,r=Math.max(lo(e,t=>t.depth)+1,0);for(let i=0;i<e.length;i++)(n=e[i]).depth=t.call(null,n,r)}}(v),function({nodes:t}){let e=t.length,n=new Set(t),r=new Set,i=0;for(;n.size;){if(n.forEach(t=>{for(let{source:e}of(t.height=i,t.targetLinks))r.add(e)}),++i>e)throw Error("circular link");n=r,r=new Set}}(v),function(t){let c=function({nodes:t}){let n=Math.max(lo(t,t=>t.depth)+1,0),i=(o-r-l)/(n-1),a=Array(n).fill(0).map(()=>[]);for(let e of t){let t=Math.max(0,Math.min(n-1,Math.floor(f.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+l,a[t]?a[t].push(e):a[t]=[e]}if(e)for(let t of a)t.sort(e);return a}(t);u=Math.min(s,(a-i)/(lo(c,t=>t.length)-1));let p=le(c,t=>(a-i-(t.length-1)*u)/li(t,lc));for(let t of c){let e=i;for(let n of t)for(let t of(n.y0=e,n.y1=e+n.value*p,e=n.y1+u,n.sourceLinks))t.width=t.value*p;e=(a-e+u)/(t.length+1);for(let n=0;n<t.length;++n){let r=t[n];r.y0+=e*(n+1),r.y1+=e*(n+1)}var h=t;if(void 0===n)for(let{sourceLinks:t,targetLinks:e}of h)t.sort(ls),e.sort(ll)}for(let t=0;t<d;++t){let n=Math.pow(.99,t),r=Math.max(1-n,(t+1)/d);(function(t,n,r){for(let i=t.length,o=i-2;o>=0;--o){let i=t[o];for(let t of i){let e=0,r=0;for(let{target:n,value:i}of t.sourceLinks){let o=i*(n.layer-t.layer);e+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*u/2;for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+u}for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n-=i}return n}(t,n)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,x(t)}void 0===e&&i.sort(lu),i.length&&g(i,r)}})(c,n,r),function(t,n,r){for(let i=1,o=t.length;i<o;++i){let o=t[i];for(let t of o){let e=0,r=0;for(let{source:n,value:i}of t.targetLinks){let o=i*(t.layer-n.layer);e+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*u/2;for(let{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+u}for(let{source:r,width:i}of e.targetLinks){if(r===t)break;n-=i}return n}(n,t)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,x(t)}void 0===e&&o.sort(lu),o.length&&g(o,r)}}(c,n,r)}}(v),ly(v),v}function g(t,e){let n=t.length>>1,r=t[n];b(t,r.y0-u,n-1,e),v(t,r.y1+u,n+1,e),b(t,a,t.length-1,e),v(t,i,0,e)}function v(t,e,n,r){for(;n<t.length;++n){let i=t[n],o=(e-i.y0)*r;o>1e-6&&(i.y0+=o,i.y1+=o),e=i.y1+u}}function b(t,e,n,r){for(;n>=0;--n){let i=t[n],o=(i.y1-e)*r;o>1e-6&&(i.y0-=o,i.y1-=o),e=i.y0-u}}function x({sourceLinks:t,targetLinks:e}){if(void 0===n){for(let{source:{sourceLinks:t}}of e)t.sort(ls);for(let{target:{targetLinks:e}}of t)e.sort(ll)}}return y.update=function(t){return ly(t),t},y.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:la(t),y):c},y.nodeAlign=function(t){return arguments.length?(f="function"==typeof t?t:la(t),y):f},y.nodeDepth=function(e){return arguments.length?(t=e,y):t},y.nodeSort=function(t){return arguments.length?(e=t,y):e},y.nodeWidth=function(t){return arguments.length?(l=+t,y):l},y.nodePadding=function(t){return arguments.length?(s=u=+t,y):s},y.nodes=function(t){return arguments.length?(p="function"==typeof t?t:la(t),y):p},y.links=function(t){return arguments.length?(h="function"==typeof t?t:la(t),y):h},y.linkSort=function(t){return arguments.length?(n=t,y):n},y.size=function(t){return arguments.length?(r=i=0,o=+t[0],a=+t[1],y):[o-r,a-i]},y.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],i=+t[0][1],a=+t[1][1],y):[[r,i],[o,a]]},y.iterations=function(t){return arguments.length?(d=+t,y):d},y})().nodeSort(r).linkSort(c).links(u).nodes(s).nodeWidth(o).nodePadding(a).nodeDepth(l).nodeAlign(function(t){let e=typeof t;return"string"===e?lm[t]||lr:"function"===e?t:lr}(i)).iterations(f).extent([[0,0],[1,1]]);"function"==typeof n&&p.nodeId(n);let{nodes:h,links:d}=p(e);return{nodes:h.map(t=>{let{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:d.map(t=>{let{source:e,target:n}=t,r=e.x1,i=n.x0,o=t.width/2;return Object.assign(Object.assign({},t),{x:[r,r,i,i],y:[t.y0+o,t.y0-o,t.y1+o,t.y1-o]})})}};lv.props={};var lb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let lx={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},lO={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},lw={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},lE={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},lk=t=>{let{data:e,encode:n={},scale:r,style:i={},layout:o={},nodeLabels:a=[],linkLabels:l=[],animate:s={},tooltip:u={}}=t,{links:c,nodes:f}=an(e,n),p=rW(n,"node"),h=rW(n,"link"),{key:d=t=>t.key,color:y=d}=p,{links:g,nodes:v}=lv(Object.assign(Object.assign(Object.assign({},lx),{nodeId:at(d)}),o))({links:c,nodes:f}),b=rW(i,"label"),{text:x=d,spacing:O=5}=b,w=lb(b,["text","spacing"]),E=at(d),k=rq(u,"node",{title:E,items:[{field:"value"}]},!0),M=rq(u,"link",{title:"",items:[t=>({name:"source",value:E(t.source)}),t=>({name:"target",value:E(t.target)})]});return[rN({},lO,{data:v,encode:Object.assign(Object.assign({},p),{color:y}),scale:r,style:rW(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},lE),{text:x,dx:t=>t.x[0]<.5?O:-O}),w),...a],tooltip:k,animate:rK(s,"node"),axis:!1}),rN({},lw,{data:g,encode:h,labels:l,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},rW(i,"link")),tooltip:M,animate:rK(s,"link")})]};lk.props={};class lM extends Map{constructor(t,e=l_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(lS(this,t))}has(t){return super.has(lS(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function lS({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function l_(t){return null!==t&&"object"==typeof t?t.valueOf():t}function lP(t){return t}function lj(t,...e){return lN(t,lP,lP,e)}function lA(t,...e){return lN(t,Array.from,lP,e)}function lT(t,e,...n){return lN(t,lP,e,n)}function lC(t,e,...n){return lN(t,Array.from,e,n)}function lN(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new lM,l=r[o++],s=-1;for(let t of i){let e=l(t,++s,i),n=a.get(e);n?n.push(t):a.set(e,[t])}for(let[e,n]of a)a.set(e,t(n,o));return e(a)}(t,0)}function lL(t,e){return e.value-t.value}function lI(t,e){return e.frequency-t.frequency}function lR(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function lD(t,e){return`${t.name}`.localeCompare(`${e.name}`)}let lF={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},lB=t=>e=>(function(t){let{y:e,thickness:n,weight:r,marginRatio:i,id:o,source:a,target:l,sourceWeight:s,targetWeight:u,sortBy:c}=Object.assign(Object.assign({},lF),t);return function(t){let f=t.nodes.map(t=>Object.assign({},t)),p=t.edges.map(t=>Object.assign({},t));return function(t,e){e.forEach(t=>{t.source=a(t),t.target=l(t),t.sourceWeight=s(t),t.targetWeight=u(t)});let n=lj(e,t=>t.source),r=lj(e,t=>t.target);t.forEach(t=>{t.id=o(t);let e=n.has(t.id)?n.get(t.id):[],i=r.has(t.id)?r.get(t.id):[];t.frequency=e.length+i.length,t.value=li(e,t=>t.sourceWeight)+li(i,t=>t.targetWeight)})}(f,p),function(t,e){let n="function"==typeof c?c:ef[c];n&&t.sort(n)}(f,0),function(t,o){let a=t.length;if(!a)throw rF("Invalid nodes: it's empty!");if(!r){let n=1/a;return t.forEach((t,r)=>{t.x=(r+.5)*n,t.y=e})}let l=i/(2*a),s=t.reduce((t,e)=>t+=e.value,0);t.reduce((t,r)=>{r.weight=r.value/s,r.width=r.weight*(1-i),r.height=n;let o=l+t,a=o+r.width,u=e-n/2,c=u+n;return r.x=[o,a,a,o],r.y=[u,u,c,c],t+r.width+2*l},0)}(f,0),function(t,n){let i=new Map(t.map(t=>[t.id,t]));if(!r)return n.forEach(t=>{let e=a(t),n=l(t),r=i.get(e),o=i.get(n);r&&o&&(t.x=[r.x,o.x],t.y=[r.y,o.y])});n.forEach(t=>{t.x=[0,0,0,0],t.y=[e,e,e,e]});let o=lj(n,t=>t.source),s=lj(n,t=>t.target);t.forEach(t=>{let{edges:e,width:n,x:r,y:i,value:a,id:l}=t,u=o.get(l)||[],c=s.get(l)||[],f=0;u.map(t=>{let e=t.sourceWeight/a*n;t.x[0]=r[0]+f,t.x[1]=r[0]+f+e,f+=e}),c.forEach(t=>{let e=t.targetWeight/a*n;t.x[3]=r[0]+f,t.x[2]=r[0]+f+e,f+=e})})}(f,p),{nodes:f,edges:p}}})(t)(e);lB.props={};var lz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let lW={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},l$={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},lG={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},lH={position:"outside",fontSize:10},lV=(t,e)=>{let{data:n,encode:r={},scale:i,style:o={},layout:a={},nodeLabels:l=[],linkLabels:s=[],animate:u={},tooltip:c={}}=t,{nodes:f,links:p}=an(n,r),h=rW(r,"node"),d=rW(r,"link"),{key:y=t=>t.key,color:g=y}=h,{linkEncodeColor:v=t=>t.source}=d,{nodeWidthRatio:b=lW.thickness,nodePaddingRatio:x=lW.marginRatio}=a,O=lz(a,["nodeWidthRatio","nodePaddingRatio"]),{nodes:w,edges:E}=lB(Object.assign(Object.assign(Object.assign(Object.assign({},lW),{id:at(y),thickness:b,marginRatio:x}),O),{weight:!0}))({nodes:f,edges:p}),k=rW(o,"label"),{text:M=y}=k,S=lz(k,["text"]),_=rq(c,"node",{title:"",items:[t=>({name:t.key,value:t.value})]},!0),P=rq(c,"link",{title:"",items:[t=>({name:`${t.source} -> ${t.target}`,value:t.value})]}),{height:j,width:A}=e,T=Math.min(j,A);return[rN({},lG,{data:E,encode:Object.assign(Object.assign({},d),{color:v}),labels:s,style:Object.assign({fill:v?void 0:"#aaa"},rW(o,"link")),tooltip:P,animate:rK(u,"link")}),rN({},l$,{data:w,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:rW(o,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-(2*Math.PI),endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},lH),{text:M}),S),...l],tooltip:_,animate:rK(u,"node"),axis:!1})]};lV.props={};var lU=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)};function lq(t){if(lU(t))return t[t.length-1]}var lY=function(t){return rj(t,"String")},lX=function(t,e,n){for(var r=0,i=lY(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t};function lK(t,e,n,r,i){var o,a,l=t.children,s=l.length,u=Array(s+1);for(u[0]=a=o=0;o<s;++o)u[o+1]=a+=l[o].value;!function t(e,n,r,i,o,a,s){if(e>=n-1){var c=l[e];c.x0=i,c.y0=o,c.x1=a,c.y1=s;return}for(var f=u[e],p=r/2+f,h=e+1,d=n-1;h<d;){var y=h+d>>>1;u[y]<p?h=y+1:d=y}p-u[h-1]<u[h]-p&&e+1<h&&--h;var g=u[h]-f,v=r-g;if(a-i>s-o){var b=r?(i*v+a*g)/r:a;t(e,h,g,i,o,b,s),t(h,n,v,b,o,a,s)}else{var x=r?(o*v+s*g)/r:s;t(e,h,g,i,o,a,x),t(h,n,v,i,x,a,s)}}(0,s,t.value,e,n,r,i)}function lZ(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(r-e)/t.value;++l<s;)(o=a[l]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u}function lQ(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(i-n)/t.value;++l<s;)(o=a[l]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u}function lJ(t,e,n,r,i){(1&t.depth?lQ:lZ)(t,e,n,r,i)}var l0=(1+Math.sqrt(5))/2;function l1(t,e,n,r,i,o){for(var a,l,s,u,c,f,p,h,d,y,g,v=[],b=e.children,x=0,O=0,w=b.length,E=e.value;x<w;){s=i-n,u=o-r;do c=b[O++].value;while(!c&&O<w);for(f=p=c,d=Math.max(p/(g=c*c*(y=Math.max(u/s,s/u)/(E*t))),g/f);O<w;++O){if(c+=l=b[O].value,l<f&&(f=l),l>p&&(p=l),(h=Math.max(p/(g=c*c*y),g/f))>d){c-=l;break}d=h}v.push(a={value:c,dice:s<u,children:b.slice(x,O)}),a.dice?lZ(a,n,r,i,E?r+=u*c/E:o):lQ(a,n,r,E?n+=s*c/E:i,o),E-=c,x=O}return v}var l2=function t(e){function n(t,n,r,i,o){l1(e,t,n,r,i,o)}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(l0),l5=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,l,s,u,c,f=-1,p=a.length,h=t.value;++f<p;){for(s=(l=a[f]).children,u=l.value=0,c=s.length;u<c;++u)l.value+=s[u].value;l.dice?lZ(l,n,r,i,h?r+=(o-r)*l.value/h:o):lQ(l,n,r,h?n+=(i-n)*l.value/h:i,o),h-=l.value}else t._squarify=a=l1(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}(l0);function l3(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function l4(t,e,n){var r;let{value:i}=n,o=function(t,e){let n={treemapBinary:lK,treemapDice:lZ,treemapSlice:lQ,treemapSliceDice:lJ,treemapSquarify:l2,treemapResquarify:l5},r="treemapSquarify"===t?n[t].ratio(e):n[t];if(!r)throw TypeError("Invalid tile method!");return r}(e.tile,e.ratio),a=(r=e.path,Array.isArray(t)?"function"==typeof r?az().path(r)(t):az()(t):ac(t));rA(t)?function t(e){let n=lX(e,["data","name"]);n.replaceAll&&(e.path=n.replaceAll(".","/").split("/")),e.children&&e.children.forEach(e=>{t(e)})}(a):function t(e,n=[e.data.name]){e.id=e.id||e.data.name,e.path=n,e.children&&e.children.forEach(r=>{r.id=`${e.id}/${r.data.name}`,r.path=[...n,r.data.name],t(r,r.path)})}(a),i?a.sum(t=>e.ignoreParentValue&&t.children?0:at(i)(t)).sort(e.sort):a.count(),(function(){var t=l2,e=!1,n=1,r=1,i=[0],o=aG,a=aG,l=aG,s=aG,u=aG;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(l3),t}function f(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,f=e.x1-n,p=e.y1-n;f<r&&(r=f=(r+f)/2),p<c&&(c=p=(c+p)/2),e.x0=r,e.y0=c,e.x1=f,e.y1=p,e.children&&(n=i[e.depth+1]=o(e)/2,r+=u(e)-n,c+=a(e)-n,f-=l(e)-n,p-=s(e)-n,f<r&&(r=f=(r+f)/2),p<c&&(c=p=(c+p)/2),t(e,r,c,f,p))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(n=+t[0],r=+t[1],c):[n,r]},c.tile=function(e){return arguments.length?(t=aL(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:aH(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:aH(+t),c):a},c.paddingRight=function(t){return arguments.length?(l="function"==typeof t?t:aH(+t),c):l},c.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:aH(+t),c):s},c.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:aH(+t),c):u},c})().tile(o).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(a);let l=a.descendants().map(t=>Object.assign(t,{id:t.id.replace(/^\//,""),x:[t.x0,t.x1],y:[t.y0,t.y1]}));return[l.filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer),l]}var l6=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let l8=(t,e)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0}),l9=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:t=>t.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),l7={fontSize:10,text:t=>lq(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},st={title:t=>{var e,n;return null==(n=null==(e=t.path)?void 0:e.join)?void 0:n.call(e,".")},items:[{field:"value"}]},se={title:t=>lq(t.path),items:[{field:"value"}]},sn=(t,e)=>{let{width:n,height:r,options:i}=e,{data:o,encode:a={},scale:l,style:s={},layout:u={},labels:c=[],tooltip:f={}}=t,p=l6(t,["data","encode","scale","style","layout","labels","tooltip"]),h=lX(i,["interaction","treemapDrillDown"]),d=rN({},l8(n,r),u,{layer:h?t=>1===t.depth:u.layer}),[y,g]=l4(o,d,a),v=rW(s,"label");return rN({},l9(n,r),Object.assign(Object.assign({data:y,scale:l,style:s,labels:[Object.assign(Object.assign({},l7),v),...c]},p),{encode:a,tooltip:rY(f,st),axis:!1}),h?{interaction:Object.assign(Object.assign({},p.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:g,layout:d}):void 0}),encode:Object.assign({color:t=>lq(t.path)},a),tooltip:rY(f,se)}:{})};function sr(){return{"data.arc":lB,"data.cluster":aS,"mark.forceGraph":as,"mark.tree":aC,"mark.pack":lt,"mark.sankey":lk,"mark.chord":lV,"mark.treemap":sn}}sn.props={};let si=()=>[["cartesian"]];si.props={};let so=(t={})=>{var e,n;let r=Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t);return Object.assign(Object.assign({},r),(e=r.startAngle,n=r.endAngle,e%=2*Math.PI,n%=2*Math.PI,e<0&&(e=2*Math.PI+e),n<0&&(n=2*Math.PI+n),e>=n&&(n+=2*Math.PI),{startAngle:e,endAngle:n}))},sa=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=so(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};sa.props={};let sl=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];sl.props={transform:!0};let ss=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),su=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=ss(t);return[...sl(),...sa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};su.props={};let sc=()=>[["parallel",0,1,0,1]];sc.props={};let sf=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];sf.props={transform:!0};let sp=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),sh=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=sp(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...sa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};sh.props={};let sd=t=>{let{startAngle:e=-Math.PI/2,endAngle:n=3*Math.PI/2,innerRadius:r=0,outerRadius:i=1}=t;return[...sc(),...sa({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};sd.props={};let sy=({value:t})=>e=>e.map(()=>t);sy.props={};let sg=({value:t})=>e=>e.map(e=>e[t]);sg.props={};let sm=({value:t})=>e=>e.map(t);sm.props={};let sv=({value:t})=>()=>t;sv.props={};let sb=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{y1:oH(oU(t,0))}})]};sb.props={};let sx=()=>(t,e)=>{let{encode:n}=e,{x:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{x:oH(oU(t,0))},scale:{x:{guide:null}}})]};function sO(t){return function(){return t}}sx.props={};let sw=Math.abs,sE=Math.atan2,sk=Math.cos,sM=Math.max,sS=Math.min,s_=Math.sin,sP=Math.sqrt,sj=Math.PI,sA=sj/2,sT=2*sj;function sC(t){return t>=1?sA:t<=-1?-sA:Math.asin(t)}let sN=Math.PI,sL=2*sN,sI=sL-1e-6;function sR(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}class sD{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?sR:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return sR;let n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,o){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+o}`}arcTo(t,e,n,r,i){if(t*=1,e*=1,n*=1,r*=1,(i*=1)<0)throw Error(`negative radius: ${i}`);let o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,f=u*u+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(f>1e-6)if(Math.abs(c*l-s*u)>1e-6&&i){let p=n-o,h=r-a,d=l*l+s*s,y=Math.sqrt(d),g=Math.sqrt(f),v=i*Math.tan((sN-Math.acos((d+f-(p*p+h*h))/(2*y*g)))/2),b=v/g,x=v/y;Math.abs(b-1)>1e-6&&this._append`L${t+b*u},${e+b*c}`,this._append`A${i},${i},0,0,${+(c*p>u*h)},${this._x1=t+x*l},${this._y1=e+x*s}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,r,i,o){if(t*=1,e*=1,n*=1,o=!!o,n<0)throw Error(`negative radius: ${n}`);let a=n*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,f=o?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&this._append`L${s},${u}`,n&&(f<0&&(f=f%sL+sL),f>sI?this._append`A${n},${n},0,1,${c},${t-a},${e-l}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:f>1e-6&&this._append`A${n},${n},0,${+(f>=sN)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n*=1}v${+r}h${-n}Z`}toString(){return this._}}function sF(){return new sD}function sB(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{let t=Math.floor(n);if(!(t>=0))throw RangeError(`invalid digits: ${n}`);e=t}return t},()=>new sD(e)}function sz(t){return t.innerRadius}function sW(t){return t.outerRadius}function s$(t){return t.startAngle}function sG(t){return t.endAngle}function sH(t){return t&&t.padAngle}function sV(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/sP(l*l+s*s),c=u*s,f=-u*l,p=t+c,h=e+f,d=n+c,y=r+f,g=(p+d)/2,v=(h+y)/2,b=d-p,x=y-h,O=b*b+x*x,w=i-o,E=p*y-d*h,k=(x<0?-1:1)*sP(sM(0,w*w*O-E*E)),M=(E*x-b*k)/O,S=(-E*b-x*k)/O,_=(E*x+b*k)/O,P=(-E*b+x*k)/O,j=M-g,A=S-v,T=_-g,C=P-v;return j*j+A*A>T*T+C*C&&(M=_,S=P),{cx:M,cy:S,x01:-c,y01:-f,x11:M*(i/w-1),y11:S*(i/w-1)}}function sU(){var t=sz,e=sW,n=sO(0),r=null,i=s$,o=sG,a=sH,l=null,s=sB(u);function u(){var u,c,f=+t.apply(this,arguments),p=+e.apply(this,arguments),h=i.apply(this,arguments)-sA,d=o.apply(this,arguments)-sA,y=sw(d-h),g=d>h;if(l||(l=u=s()),p<f&&(c=p,p=f,f=c),p>1e-12)if(y>sT-1e-12)l.moveTo(p*sk(h),p*s_(h)),l.arc(0,0,p,h,d,!g),f>1e-12&&(l.moveTo(f*sk(d),f*s_(d)),l.arc(0,0,f,d,h,g));else{var v,b,x=h,O=d,w=h,E=d,k=y,M=y,S=a.apply(this,arguments)/2,_=S>1e-12&&(r?+r.apply(this,arguments):sP(f*f+p*p)),P=sS(sw(p-f)/2,+n.apply(this,arguments)),j=P,A=P;if(_>1e-12){var T=sC(_/f*s_(S)),C=sC(_/p*s_(S));(k-=2*T)>1e-12?(T*=g?1:-1,w+=T,E-=T):(k=0,w=E=(h+d)/2),(M-=2*C)>1e-12?(C*=g?1:-1,x+=C,O-=C):(M=0,x=O=(h+d)/2)}var N=p*sk(x),L=p*s_(x),I=f*sk(E),R=f*s_(E);if(P>1e-12){var D,F=p*sk(O),B=p*s_(O),z=f*sk(w),W=f*s_(w);if(y<sj)if(D=function(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,f=l-o,p=f*s-c*u;if(!(p*p<1e-12))return p=(c*(e-o)-f*(t-i))/p,[t+p*s,e+p*u]}(N,L,z,W,F,B,I,R)){var $,G=N-D[0],H=L-D[1],V=F-D[0],U=B-D[1],q=1/s_((($=(G*V+H*U)/(sP(G*G+H*H)*sP(V*V+U*U)))>1?0:$<-1?sj:Math.acos($))/2),Y=sP(D[0]*D[0]+D[1]*D[1]);j=sS(P,(f-Y)/(q-1)),A=sS(P,(p-Y)/(q+1))}else j=A=0}M>1e-12?A>1e-12?(v=sV(z,W,N,L,p,A,g),b=sV(F,B,I,R,p,A,g),l.moveTo(v.cx+v.x01,v.cy+v.y01),A<P?l.arc(v.cx,v.cy,A,sE(v.y01,v.x01),sE(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,A,sE(v.y01,v.x01),sE(v.y11,v.x11),!g),l.arc(0,0,p,sE(v.cy+v.y11,v.cx+v.x11),sE(b.cy+b.y11,b.cx+b.x11),!g),l.arc(b.cx,b.cy,A,sE(b.y11,b.x11),sE(b.y01,b.x01),!g))):(l.moveTo(N,L),l.arc(0,0,p,x,O,!g)):l.moveTo(N,L),f>1e-12&&k>1e-12?j>1e-12?(v=sV(I,R,F,B,f,-j,g),b=sV(N,L,z,W,f,-j,g),l.lineTo(v.cx+v.x01,v.cy+v.y01),j<P?l.arc(v.cx,v.cy,j,sE(v.y01,v.x01),sE(b.y01,b.x01),!g):(l.arc(v.cx,v.cy,j,sE(v.y01,v.x01),sE(v.y11,v.x11),!g),l.arc(0,0,f,sE(v.cy+v.y11,v.cx+v.x11),sE(b.cy+b.y11,b.cx+b.x11),g),l.arc(b.cx,b.cy,j,sE(b.y11,b.x11),sE(b.y01,b.x01),!g))):l.arc(0,0,f,E,w,g):l.lineTo(I,R)}else l.moveTo(0,0);if(l.closePath(),u)return l=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-sj/2;return[sk(r)*n,s_(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:sO(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sO(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:sO(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:sO(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:sO(+t),u):a},u.context=function(t){return arguments.length?(l=null==t?null:t,u):l},u}function sq(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function sY(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function sX(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function sK(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function sZ(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function sQ(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function sJ(t){return sK(t)||sY(t)}function s0(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function s1(t,e=!0){let{transformations:n}=t.getOptions(),[,r,i]=n.find(t=>"polar"===t[0]);return e?[180*+r/Math.PI,180*+i/Math.PI]:[r,i]}sF.prototype=sD.prototype;var s2=n(420),s5="undefined"!=typeof Float32Array?Float32Array:Array;function s3(){var t=new s5(3);return s5!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function s4(t){var e=new s5(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function s6(t){return Math.hypot(t[0],t[1],t[2])}function s8(t,e,n){var r=new s5(3);return r[0]=t,r[1]=e,r[2]=n,r}function s9(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s7(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function ue(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function un(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function ur(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function ui(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function uo(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function ua(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ul(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],l=e[2];return Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-l)<=1e-6*Math.max(1,Math.abs(i),Math.abs(l))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var us=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function uu(){var t=new s5(16);return s5!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function uc(t){var e=new s5(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function uf(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function up(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new s5(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=a,g[7]=l,g[8]=s,g[9]=u,g[10]=c,g[11]=f,g[12]=p,g[13]=h,g[14]=d,g[15]=y,g}function uh(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=l,t[7]=s,t[8]=u,t[9]=c,t[10]=f,t[11]=p,t[12]=h,t[13]=d,t[14]=y,t[15]=g,t}function ud(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uy(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=e[7],l=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=a,t[14]=l}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function ug(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15],b=n*l-r*a,x=n*s-i*a,O=n*u-o*a,w=r*s-i*l,E=r*u-o*l,k=i*u-o*s,M=c*y-f*d,S=c*g-p*d,_=c*v-h*d,P=f*g-p*y,j=f*v-h*y,A=p*v-h*g,T=b*A-x*j+O*P+w*_-E*S+k*M;return T?(T=1/T,t[0]=(l*A-s*j+u*P)*T,t[1]=(i*j-r*A-o*P)*T,t[2]=(y*k-g*E+v*w)*T,t[3]=(p*E-f*k-h*w)*T,t[4]=(s*_-a*A-u*S)*T,t[5]=(n*A-i*_+o*S)*T,t[6]=(g*O-d*k-v*x)*T,t[7]=(c*k-p*O+h*x)*T,t[8]=(a*j-l*_+u*M)*T,t[9]=(r*_-n*j-o*M)*T,t[10]=(d*E-y*O+v*b)*T,t[11]=(f*O-c*E-h*b)*T,t[12]=(l*S-a*P-s*M)*T,t[13]=(n*P-r*S+i*M)*T,t[14]=(y*x-d*w-g*b)*T,t[15]=(c*w-f*x+p*b)*T,t):null}function um(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];return t[0]=l*(p*v-h*g)-f*(s*v-u*g)+y*(s*h-u*p),t[1]=-(r*(p*v-h*g)-f*(i*v-o*g)+y*(i*h-o*p)),t[2]=r*(s*v-u*g)-l*(i*v-o*g)+y*(i*u-o*s),t[3]=-(r*(s*h-u*p)-l*(i*h-o*p)+f*(i*u-o*s)),t[4]=-(a*(p*v-h*g)-c*(s*v-u*g)+d*(s*h-u*p)),t[5]=n*(p*v-h*g)-c*(i*v-o*g)+d*(i*h-o*p),t[6]=-(n*(s*v-u*g)-a*(i*v-o*g)+d*(i*u-o*s)),t[7]=n*(s*h-u*p)-a*(i*h-o*p)+c*(i*u-o*s),t[8]=a*(f*v-h*y)-c*(l*v-u*y)+d*(l*h-u*f),t[9]=-(n*(f*v-h*y)-c*(r*v-o*y)+d*(r*h-o*f)),t[10]=n*(l*v-u*y)-a*(r*v-o*y)+d*(r*u-o*l),t[11]=-(n*(l*h-u*f)-a*(r*h-o*f)+c*(r*u-o*l)),t[12]=-(a*(f*g-p*y)-c*(l*g-s*y)+d*(l*p-s*f)),t[13]=n*(f*g-p*y)-c*(r*g-i*y)+d*(r*p-i*f),t[14]=-(n*(l*g-s*y)-a*(r*g-i*y)+d*(r*s-i*l)),t[15]=n*(l*p-s*f)-a*(r*p-i*f)+c*(r*s-i*l),t}function uv(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],a=t[5],l=t[6],s=t[7],u=t[8],c=t[9],f=t[10],p=t[11],h=t[12],d=t[13],y=t[14],g=t[15];return(e*a-n*o)*(f*g-p*y)-(e*l-r*o)*(c*g-p*d)+(e*s-i*o)*(c*y-f*d)+(n*l-r*a)*(u*g-p*h)-(n*s-i*a)*(u*y-f*h)+(r*s-i*l)*(u*d-c*h)}function ub(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],y=e[12],g=e[13],v=e[14],b=e[15],x=n[0],O=n[1],w=n[2],E=n[3];return t[0]=x*r+O*l+w*f+E*y,t[1]=x*i+O*s+w*p+E*g,t[2]=x*o+O*u+w*h+E*v,t[3]=x*a+O*c+w*d+E*b,x=n[4],O=n[5],w=n[6],E=n[7],t[4]=x*r+O*l+w*f+E*y,t[5]=x*i+O*s+w*p+E*g,t[6]=x*o+O*u+w*h+E*v,t[7]=x*a+O*c+w*d+E*b,x=n[8],O=n[9],w=n[10],E=n[11],t[8]=x*r+O*l+w*f+E*y,t[9]=x*i+O*s+w*p+E*g,t[10]=x*o+O*u+w*h+E*v,t[11]=x*a+O*c+w*d+E*b,x=n[12],O=n[13],w=n[14],E=n[15],t[12]=x*r+O*l+w*f+E*y,t[13]=x*i+O*s+w*p+E*g,t[14]=x*o+O*u+w*h+E*v,t[15]=x*a+O*c+w*d+E*b,t}function ux(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*v+e[12],t[13]=e[1]*y+e[5]*g+e[9]*v+e[13],t[14]=e[2]*y+e[6]*g+e[10]*v+e[14],t[15]=e[3]*y+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=e[8],p=e[9],h=e[10],d=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=l,t[5]=s,t[6]=u,t[7]=c,t[8]=f,t[9]=p,t[10]=h,t[11]=d,t[12]=r*y+l*g+f*v+e[12],t[13]=i*y+s*g+p*v+e[13],t[14]=o*y+u*g+h*v+e[14],t[15]=a*y+c*g+d*v+e[15]),t}function uO(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function uw(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_,P,j=r[0],A=r[1],T=r[2],C=Math.hypot(j,A,T);return C<1e-6?null:(j*=C=1/C,A*=C,T*=C,i=Math.sin(n),a=1-(o=Math.cos(n)),l=e[0],s=e[1],u=e[2],c=e[3],f=e[4],p=e[5],h=e[6],d=e[7],y=e[8],g=e[9],v=e[10],b=e[11],x=j*j*a+o,O=A*j*a+T*i,w=T*j*a-A*i,E=j*A*a-T*i,k=A*A*a+o,M=T*A*a+j*i,S=j*T*a+A*i,_=A*T*a-j*i,P=T*T*a+o,t[0]=l*x+f*O+y*w,t[1]=s*x+p*O+g*w,t[2]=u*x+h*O+v*w,t[3]=c*x+d*O+b*w,t[4]=l*E+f*k+y*M,t[5]=s*E+p*k+g*M,t[6]=u*E+h*k+v*M,t[7]=c*E+d*k+b*M,t[8]=l*S+f*_+y*P,t[9]=s*S+p*_+g*P,t[10]=u*S+h*_+v*P,t[11]=c*S+d*_+b*P,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function uE(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],l=e[6],s=e[7],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=l*i+f*r,t[7]=s*i+p*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=f*i-l*r,t[11]=p*i-s*r,t}function uk(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[8],c=e[9],f=e[10],p=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=l*i-f*r,t[3]=s*i-p*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=l*r+f*i,t[11]=s*r+p*i,t}function uM(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],l=e[2],s=e[3],u=e[4],c=e[5],f=e[6],p=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=l*i+f*r,t[3]=s*i+p*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=f*i-l*r,t[7]=p*i-s*r,t}function uS(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function u_(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uP(t,e,n){var r,i,o,a=n[0],l=n[1],s=n[2],u=Math.hypot(a,l,s);return u<1e-6?null:(a*=u=1/u,l*=u,s*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=l*a*o+s*r,t[2]=s*a*o-l*r,t[3]=0,t[4]=a*l*o-s*r,t[5]=l*l*o+i,t[6]=s*l*o+a*r,t[7]=0,t[8]=a*s*o+l*r,t[9]=l*s*o-a*r,t[10]=s*s*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function uj(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uA(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uT(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uC(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=r+r,s=i+i,u=o+o,c=r*l,f=r*s,p=r*u,h=i*s,d=i*u,y=o*u,g=a*l,v=a*s,b=a*u;return t[0]=1-(h+y),t[1]=f+b,t[2]=p-v,t[3]=0,t[4]=f-b,t[5]=1-(c+y),t[6]=d+g,t[7]=0,t[8]=p+v,t[9]=d-g,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function uN(t,e){var n=new s5(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],l=e[4],s=e[5],u=e[6],c=e[7],f=r*r+i*i+o*o+a*a;return f>0?(n[0]=(l*a+c*r+s*o-u*i)*2/f,n[1]=(s*a+c*i+u*r-l*o)*2/f,n[2]=(u*a+c*o+l*i-s*r)*2/f):(n[0]=(l*a+c*r+s*o-u*i)*2,n[1]=(s*a+c*i+u*r-l*o)*2,n[2]=(u*a+c*o+l*i-s*r)*2),uC(t,e,n),t}function uL(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function uI(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],l=e[6],s=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,l),t[2]=Math.hypot(s,u,c),t}function uR(t,e){var n=new s5(3);uI(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,l=e[1]*i,s=e[2]*o,u=e[4]*r,c=e[5]*i,f=e[6]*o,p=e[8]*r,h=e[9]*i,d=e[10]*o,y=a+c+d,g=0;return y>0?(g=2*Math.sqrt(y+1),t[3]=.25*g,t[0]=(f-h)/g,t[1]=(p-s)/g,t[2]=(l-u)/g):a>c&&a>d?(g=2*Math.sqrt(1+a-c-d),t[3]=(f-h)/g,t[0]=.25*g,t[1]=(l+u)/g,t[2]=(p+s)/g):c>d?(g=2*Math.sqrt(1+c-a-d),t[3]=(p-s)/g,t[0]=(l+u)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=2*Math.sqrt(1+d-a-c),t[3]=(l-u)/g,t[0]=(p+s)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function uD(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=e[3],s=i+i,u=o+o,c=a+a,f=i*s,p=i*u,h=i*c,d=o*u,y=o*c,g=a*c,v=l*s,b=l*u,x=l*c,O=r[0],w=r[1],E=r[2];return t[0]=(1-(d+g))*O,t[1]=(p+x)*O,t[2]=(h-b)*O,t[3]=0,t[4]=(p-x)*w,t[5]=(1-(f+g))*w,t[6]=(y+v)*w,t[7]=0,t[8]=(h+b)*E,t[9]=(y-v)*E,t[10]=(1-(f+d))*E,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function uF(t,e,n,r,i){var o=e[0],a=e[1],l=e[2],s=e[3],u=o+o,c=a+a,f=l+l,p=o*u,h=o*c,d=o*f,y=a*c,g=a*f,v=l*f,b=s*u,x=s*c,O=s*f,w=r[0],E=r[1],k=r[2],M=i[0],S=i[1],_=i[2],P=(1-(y+v))*w,j=(h+O)*w,A=(d-x)*w,T=(h-O)*E,C=(1-(p+v))*E,N=(g+b)*E,L=(d+x)*k,I=(g-b)*k,R=(1-(p+y))*k;return t[0]=P,t[1]=j,t[2]=A,t[3]=0,t[4]=T,t[5]=C,t[6]=N,t[7]=0,t[8]=L,t[9]=I,t[10]=R,t[11]=0,t[12]=n[0]+M-(P*M+T*S+L*_),t[13]=n[1]+S-(j*M+C*S+I*_),t[14]=n[2]+_-(A*M+N*S+R*_),t[15]=1,t}function uB(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,l=r+r,s=i+i,u=n*a,c=r*a,f=r*l,p=i*a,h=i*l,d=i*s,y=o*a,g=o*l,v=o*s;return t[0]=1-f-d,t[1]=c+v,t[2]=p-g,t[3]=0,t[4]=c-v,t[5]=1-u-d,t[6]=h+y,t[7]=0,t[8]=p+g,t[9]=h-y,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function uz(t,e,n,r,i,o,a){var l=1/(n-e),s=1/(i-r),u=1/(o-a);return t[0]=2*o*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*s,t[6]=0,t[7]=0,t[8]=(n+e)*l,t[9]=(i+r)*s,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t}function uW(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}s3();var u$=uW;function uG(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function uH(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),l=Math.tan(e.rightDegrees*Math.PI/180),s=2/(a+l),u=2/(i+o);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-((a-l)*s*.5),t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function uV(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=(a+o)*u,t[15]=1,t}var uU=uV;function uq(t,e,n,r,i,o,a){var l=1/(e-n),s=1/(r-i),u=1/(o-a);return t[0]=-2*l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*l,t[13]=(i+r)*s,t[14]=o*u,t[15]=1,t}function uY(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d=e[0],y=e[1],g=e[2],v=r[0],b=r[1],x=r[2],O=n[0],w=n[1],E=n[2];return 1e-6>Math.abs(d-O)&&1e-6>Math.abs(y-w)&&1e-6>Math.abs(g-E)?ud(t):(h=1/Math.hypot(c=d-O,f=y-w,p=g-E),c*=h,f*=h,p*=h,(h=Math.hypot(i=b*p-x*f,o=x*c-v*p,a=v*f-b*c))?(i*=h=1/h,o*=h,a*=h):(i=0,o=0,a=0),(h=Math.hypot(l=f*a-p*o,s=p*i-c*a,u=c*o-f*i))?(l*=h=1/h,s*=h,u*=h):(l=0,s=0,u=0),t[0]=i,t[1]=l,t[2]=c,t[3]=0,t[4]=o,t[5]=s,t[6]=f,t[7]=0,t[8]=a,t[9]=u,t[10]=p,t[11]=0,t[12]=-(i*d+o*y+a*g),t[13]=-(l*d+s*y+u*g),t[14]=-(c*d+f*y+p*g),t[15]=1,t)}function uX(t,e,n,r){var i=e[0],o=e[1],a=e[2],l=r[0],s=r[1],u=r[2],c=i-n[0],f=o-n[1],p=a-n[2],h=c*c+f*f+p*p;h>0&&(c*=h=1/Math.sqrt(h),f*=h,p*=h);var d=s*p-u*f,y=u*c-l*p,g=l*f-s*c;return(h=d*d+y*y+g*g)>0&&(d*=h=1/Math.sqrt(h),y*=h,g*=h),t[0]=d,t[1]=y,t[2]=g,t[3]=0,t[4]=f*g-p*y,t[5]=p*d-c*g,t[6]=c*y-f*d,t[7]=0,t[8]=c,t[9]=f,t[10]=p,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function uK(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function uZ(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function uQ(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function uJ(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function u0(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function u1(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function u2(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function u5(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],l=t[5],s=t[6],u=t[7],c=t[8],f=t[9],p=t[10],h=t[11],d=t[12],y=t[13],g=t[14],v=t[15],b=e[0],x=e[1],O=e[2],w=e[3],E=e[4],k=e[5],M=e[6],S=e[7],_=e[8],P=e[9],j=e[10],A=e[11],T=e[12],C=e[13],N=e[14],L=e[15];return Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(r-x)<=1e-6*Math.max(1,Math.abs(r),Math.abs(x))&&Math.abs(i-O)<=1e-6*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-E)<=1e-6*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(l-k)<=1e-6*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(s-M)<=1e-6*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(u-S)<=1e-6*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(c-_)<=1e-6*Math.max(1,Math.abs(c),Math.abs(_))&&Math.abs(f-P)<=1e-6*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(p-j)<=1e-6*Math.max(1,Math.abs(p),Math.abs(j))&&Math.abs(h-A)<=1e-6*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(d-T)<=1e-6*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(y-C)<=1e-6*Math.max(1,Math.abs(y),Math.abs(C))&&Math.abs(g-N)<=1e-6*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(v-L)<=1e-6*Math.max(1,Math.abs(v),Math.abs(L))}var u3=ub,u4=uJ;function u6(){var t=new s5(9);return s5!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function u8(){var t=new s5(4);return s5!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function u9(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function u7(){var t=new s5(4);return s5!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function ct(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function ce(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],l=n[0],s=n[1],u=n[2],c=n[3];return t[0]=r*c+a*l+i*u-o*s,t[1]=i*c+a*s+o*l-r*u,t[2]=o*c+a*u+r*s-i*l,t[3]=a*c-r*l-i*s-o*u,t}function cn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,l=a?1/a:0;return t[0]=-n*l,t[1]=-r*l,t[2]=-i*l,t[3]=o*l,t}function cr(t,e,n,r){var i=.5*Math.PI/180,o=Math.sin(e*=i),a=Math.cos(e),l=Math.sin(n*=i),s=Math.cos(n),u=Math.sin(r*=i),c=Math.cos(r);return t[0]=o*s*c-a*l*u,t[1]=a*l*c+o*s*u,t[2]=a*s*u-o*l*c,t[3]=a*s*c+o*l*u,t}u8();var ci=function(t,e,n,r){var i=new s5(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},co=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ca=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};s3(),s8(1,0,0),s8(0,1,0),u7(),u7(),u6(),l=new s5(2),s5!=Float32Array&&(l[0]=0,l[1]=0);var cl={}.toString,cs=function(t,e){return cl.call(t)==="[object "+e+"]"},cu=function(t){return cs(t,"Number")};function cc(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var cf=function(t){return null==t},cp=function(t){return cs(t,"String")},ch=function(t,e,n){return t<e?e:t>n?n:t},cd={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function cy(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return cd[e]===t.length-1&&"achlmqstvz".includes(e)})}function cg(t){return cy(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function cm(t){return cg(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var cv={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function cb(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=cd[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,cd[n]))),cd[n]););}function cx(t){return t>=48&&t<=57}function cO(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}var cw=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function cE(t){if(cm(t))return[].concat(t);for(var e=function(t){if(cg(t))return[].concat(t);var e=function(t){if(cy(t))return[].concat(t);var e=new cw(t);for(cO(e);e.index<e.max&&!e.err.length;)!function(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=cd[n[r].toLowerCase()];if(t.segmentStart=r,!function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,cO(t),t.data=[],!o)return cb(t);for(;;){for(var a,l=o;l>0;l-=1){if((32|i)==97&&(3===l||4===l)?!function(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(48===r){t.param=0,t.index+=1;return}if(49===r){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}(t):!function(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,l=!1,s=!1,u=!1;if(o>=n){t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';return}if((43===(e=r.charCodeAt(o))||45===e)&&(o+=1,e=r.charCodeAt(o)),!cx(e)&&46!==e){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" is not a number';return}if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&cx(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&cx(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;cx(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!l&&!s){t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid float exponent';return}if(o+=1,(43===(e=r.charCodeAt(o))||45===e)&&(o+=1),o<n&&cx(r.charCodeAt(o)))for(;o<n&&cx(r.charCodeAt(o));)o+=1;else{t.err="[path-util]: Invalid path value at index "+o+', "'+r[o]+'" invalid integer exponent';return}}t.index=o,t.param=+t.pathValue.slice(i,o)}(t),t.err.length)return;t.data.push(t.param),cO(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,cO(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}cb(t)}(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),l=t[0],s=l.toUpperCase();if("M"===l)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(l!==s)switch(s){case"A":e=[s,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[s,a[0]+r];break;case"H":e=[s,a[0]+n];break;default:e=[s].concat(a.map(function(t,e){return t+(e%2?r:n)}))}else e=[s].concat(a);var u=e.length;switch(s){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[u-2],r=e[u-1],"M"===s&&(i=n,o=r)}return e})}(t),n=eN({},cv),r=0;r<e.length;r+=1){e[r]=function(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,l=t.slice(1).map(Number),s=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)s=["L",t[1],i];else if("V"===n)s=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,s=["C",u,c].concat(l)}else if("T"===n){var f=2*r-e.qx,p=2*i-e.qy;e.qx=f,e.qy=p,s=["Q",f,p].concat(l)}else if("Q"===n){var h=l[0],d=l[1];e.qx=h,e.qy=d}return s}(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function ck(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function cM(t,e,n,r,i){var o=cc([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var l=ck([t,e],[n,r],i/o);a={x:l[0],y:l[1]}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function cS(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos((n*i+r*o)/a)}function c_(t,e,n,r,i,o,a,l,s,u){var c,f=u.bbox,p=void 0===f||f,h=u.length,d=void 0===h||h,y=u.sampleSize,g=void 0===y?10:y,v="number"==typeof s,b=t,x=e,O=0,w=[b,x,0],E=[b,x],k=0,M={x:0,y:0},S=[{x:b,y:x}];v&&s<=0&&(M={x:b,y:x});for(var _=0;_<=g;_+=1){if(b=(c=function(t,e,n,r,i,o,a,l,s){var u=1-s;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*s*n+3*u*Math.pow(s,2)*i+Math.pow(s,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*s*r+3*u*Math.pow(s,2)*o+Math.pow(s,3)*l}}(t,e,n,r,i,o,a,l,_/g)).x,x=c.y,p&&S.push({x:b,y:x}),d&&(O+=cc(E,[b,x])),E=[b,x],v&&O>=s&&s>w[2]){var P=(O-s)/(O-w[2]);M={x:E[0]*(1-P)+w[0]*P,y:E[1]*(1-P)+w[1]*P}}w=[b,x,O]}return v&&s>=O&&(M={x:a,y:l}),{length:O,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}function cP(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=cE(t),h="number"==typeof e,d=[],y=0,g=0,v=0,b=0,x=[],O=[],w=0,E={x:0,y:0},k=E,M=E,S=E,_=0,P=0,j=p.length;P<j;P+=1)d=(u="M"===(c=(f=p[P])[0]))?d:[y,g].concat(f.slice(1)),u?(k=E={x:v=f[1],y:b=f[2]},w=0,h&&e<.001&&(S=E)):"L"===c?(w=(r=cM(d[0],d[1],d[2],d[3],(e||0)-_)).length,E=r.min,k=r.max,M=r.point):"A"===c?(w=(i=function(t,e,n,r,i,o,a,l,s,u,c){var f,p=c.bbox,h=void 0===p||p,d=c.length,y=void 0===d||d,g=c.sampleSize,v=void 0===g?30:g,b="number"==typeof u,x=t,O=e,w=0,E=[x,O,0],k=[x,O],M=0,S={x:0,y:0},_=[{x:x,y:O}];b&&u<=0&&(S={x:x,y:O});for(var P=0;P<=v;P+=1){if(x=(f=function(t,e,n,r,i,o,a,l,s,u){var c=Math.abs,f=Math.sin,p=Math.cos,h=Math.sqrt,d=Math.PI,y=c(n),g=c(r),v=d/180*((i%360+360)%360);if(t===l&&e===s)return{x:t,y:e};if(0===y||0===g)return cM(t,e,l,s,u).point;var b=(t-l)/2,x=(e-s)/2,O={x:p(v)*b+f(v)*x,y:-f(v)*b+p(v)*x},w=Math.pow(O.x,2)/Math.pow(y,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(y*=h(w),g*=h(w));var E=(Math.pow(y,2)*Math.pow(g,2)-Math.pow(y,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2))/(Math.pow(y,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2)),k=(o!==a?1:-1)*h(E=E<0?0:E),M={x:k*(y*O.y/g),y:k*(-(g*O.x)/y)},S={x:p(v)*M.x-f(v)*M.y+(t+l)/2,y:f(v)*M.x+p(v)*M.y+(e+s)/2},_={x:(O.x-M.x)/y,y:(O.y-M.y)/g},P=cS({x:1,y:0},_),j=cS(_,{x:(-O.x-M.x)/y,y:(-O.y-M.y)/g});!a&&j>0?j-=2*d:a&&j<0&&(j+=2*d);var A=P+(j%=2*d)*u,T=y*p(A),C=g*f(A);return{x:p(v)*T-f(v)*C+S.x,y:f(v)*T+p(v)*C+S.y}}(t,e,n,r,i,o,a,l,s,P/v)).x,O=f.y,h&&_.push({x:x,y:O}),y&&(w+=cc(k,[x,O])),k=[x,O],b&&w>=u&&u>E[2]){var j=(w-u)/(w-E[2]);S={x:k[0]*(1-j)+E[0]*j,y:k[1]*(1-j)+E[1]*j}}E=[x,O,w]}return b&&u>=w&&(S={x:l,y:s}),{length:w,point:S,min:{x:Math.min.apply(null,_.map(function(t){return t.x})),y:Math.min.apply(null,_.map(function(t){return t.y}))},max:{x:Math.max.apply(null,_.map(function(t){return t.x})),y:Math.max.apply(null,_.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-_,n||{})).length,E=i.min,k=i.max,M=i.point):"C"===c?(w=(o=c_(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-_,n||{})).length,E=o.min,k=o.max,M=o.point):"Q"===c?(w=(a=function(t,e,n,r,i,o,a,l){var s,u=l.bbox,c=void 0===u||u,f=l.length,p=void 0===f||f,h=l.sampleSize,d=void 0===h?10:h,y="number"==typeof a,g=t,v=e,b=0,x=[g,v,0],O=[g,v],w=0,E={x:0,y:0},k=[{x:g,y:v}];y&&a<=0&&(E={x:g,y:v});for(var M=0;M<=d;M+=1){if(g=(s=function(t,e,n,r,i,o,a){var l=1-a;return{x:Math.pow(l,2)*t+2*l*a*n+Math.pow(a,2)*i,y:Math.pow(l,2)*e+2*l*a*r+Math.pow(a,2)*o}}(t,e,n,r,i,o,M/d)).x,v=s.y,c&&k.push({x:g,y:v}),p&&(b+=cc(O,[g,v])),O=[g,v],y&&b>=a&&a>x[2]){var S=(b-a)/(b-x[2]);E={x:O[0]*(1-S)+x[0]*S,y:O[1]*(1-S)+x[1]*S}}x=[g,v,b]}return y&&a>=b&&(E={x:i,y:o}),{length:b,point:E,min:{x:Math.min.apply(null,k.map(function(t){return t.x})),y:Math.min.apply(null,k.map(function(t){return t.y}))},max:{x:Math.max.apply(null,k.map(function(t){return t.x})),y:Math.max.apply(null,k.map(function(t){return t.y}))}}}(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-_,n||{})).length,E=a.min,k=a.max,M=a.point):"Z"===c&&(w=(l=cM((d=[y,g,v,b])[0],d[1],d[2],d[3],(e||0)-_)).length,E=l.min,k=l.max,M=l.point),h&&_<e&&_+w>=e&&(S=M),O.push(k),x.push(E),_+=w,y=(s="Z"!==c?f.slice(-2):[v,b])[0],g=s[1];return h&&e>=_&&(S={x:y,y:g}),{length:_,point:S,min:{x:Math.min.apply(null,x.map(function(t){return t.x})),y:Math.min.apply(null,x.map(function(t){return t.y}))},max:{x:Math.max.apply(null,O.map(function(t){return t.x})),y:Math.max.apply(null,O.map(function(t){return t.y}))}}}var cj=function(t){return Array.isArray?Array.isArray(t):cs(t,"Array")},cA=function(t){if(cj(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},cT=function(t){if(cj(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},cC=function(t,e){return(t%e+e)%e};function cN(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var cL=function(t,e,n,r){return ez(ez([],ck([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function cI(t,e){if(void 0===e&&(e=!1),cm(t)&&t.every(function(t){var e=t[0];return"MC".includes(e)})){var n,r,i=[].concat(t);return e?[i,[]]:i}for(var o=cE(t),a=eN({},cv),l=[],s="",u=o.length,c=[],f=0;f<u;f+=1){o[f]&&(s=o[f][0]),l[f]=s;var p=function(t,e){var n,r,i,o,a,l,s,u,c,f=t[0],p=t.slice(1).map(Number),h=p[0],d=p[1],y=e.x1,g=e.y1,v=e.x,b=e.y;switch(!"TQ".includes(f)&&(e.qx=null,e.qy=null),f){case"M":e.x=h,e.y=d;break;case"A":return["C"].concat(function t(e,n,r,i,o,a,l,s,u,c){var f,p,h,d,y,g=e,v=n,b=r,x=i,O=s,w=u,E=120*Math.PI/180,k=Math.PI/180*(+o||0),M=[];if(c)p=c[0],h=c[1],d=c[2],y=c[3];else{g=(f=cN(g,v,-k)).x,v=f.y,O=(f=cN(O,w,-k)).x,w=f.y;var S=(g-O)/2,_=(v-w)/2,P=S*S/(b*b)+_*_/(x*x);P>1&&(b*=P=Math.sqrt(P),x*=P);var j=b*b,A=x*x,T=(a===l?-1:1)*Math.sqrt(Math.abs((j*A-j*_*_-A*S*S)/(j*_*_+A*S*S)));d=T*b*_/x+(g+O)/2,y=-(T*x)*S/b+(v+w)/2,p=Math.asin(((v-y)/x*1e9>>0)/1e9),h=Math.asin(((w-y)/x*1e9>>0)/1e9),p=g<d?Math.PI-p:p,h=O<d?Math.PI-h:h,p<0&&(p=2*Math.PI+p),h<0&&(h=2*Math.PI+h),l&&p>h&&(p-=2*Math.PI),!l&&h>p&&(h-=2*Math.PI)}var C=h-p;if(Math.abs(C)>E){var N=h,L=O,I=w;M=t(O=d+b*Math.cos(h=p+E*(l&&h>p?1:-1)),w=y+x*Math.sin(h),b,x,o,0,l,L,I,[h,N,d,y])}C=h-p;var R=Math.cos(p),D=Math.cos(h),F=Math.tan(C/4),B=4/3*b*F,z=4/3*x*F,W=[g,v],$=[g+B*Math.sin(p),v-z*R],G=[O+B*Math.sin(h),w-z*D],H=[O,w];if($[0]=2*W[0]-$[0],$[1]=2*W[1]-$[1],c)return $.concat(G,H,M);M=$.concat(G,H,M);for(var V=[],U=0,q=M.length;U<q;U+=1)V[U]=U%2?cN(M[U-1],M[U],k).y:cN(M[U],M[U+1],k).x;return V}((c=[y,g].concat(p))[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9]));case"Q":return e.qx=h,e.qy=d,["C"].concat((n=(c=[y,g].concat(p))[0],r=c[1],i=c[2],o=c[3],a=c[4],l=c[5],[1/3*n+2/3*i,1/3*r+2/3*o,1/3*a+2/3*i,1/3*l+2/3*o,a,l]));case"L":return["C"].concat(cL(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(cL(y,g,v,b))}return t}(o[f],a);o[f]=p;var h=f;if(o[h].length>7){o[h].shift();for(var d=o[h],y=h;d.length;)l[h]="A",o.splice(y+=1,0,["C"].concat(d.splice(0,6)));o.splice(h,1)}u=o.length,"Z"===s&&c.push(f),r=(n=o[f]).length,a.x1=+n[r-2],a.y1=+n[r-1],a.x2=+n[r-4]||a.x1,a.y2=+n[r-3]||a.y1}return e?[o,c]:o}function cR(t){return t.map(function(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=e&&n[e-1].slice(-2).concat(t.slice(1)),g=e?c_(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],{bbox:!1}).length:0;return d=e?g?(void 0===r&&(r=.5),i=y.slice(0,2),o=y.slice(2,4),a=y.slice(4,6),l=y.slice(6,8),s=ck(i,o,r),u=ck(o,a,r),c=ck(a,l,r),f=ck(s,u,r),p=ck(u,c,r),h=ck(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function cD(t){var e,n,r;return e=0,n=0,r=0,cI(t).map(function(t){if("M"===t[0])return e=t[1],n=t[2],0;var i,o,a,l=t.slice(1),s=l[0],u=l[1],c=l[2],f=l[3],p=l[4],h=l[5];return o=e,r=3*((h-(a=n))*(s+c)-(p-o)*(u+f)+u*(o-c)-s*(a-f)+h*(c+o/3)-p*(f+a/3))/20,e=(i=t.slice(-2))[0],n=i[1],r}).reduce(function(t,e){return t+e},0)>=0}var cF=function(t){return cs(t,"Boolean")},cB=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},cz=function(t){return void 0===t};function cW(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function c$(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function cG(){}var cH="\\s*([+-]?\\d+)\\s*",cV="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cU="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cq=/^#([0-9a-f]{3,8})$/,cY=RegExp("^rgb\\("+[cH,cH,cH]+"\\)$"),cX=RegExp("^rgb\\("+[cU,cU,cU]+"\\)$"),cK=RegExp("^rgba\\("+[cH,cH,cH,cV]+"\\)$"),cZ=RegExp("^rgba\\("+[cU,cU,cU,cV]+"\\)$"),cQ=RegExp("^hsl\\("+[cV,cU,cU]+"\\)$"),cJ=RegExp("^hsla\\("+[cV,cU,cU,cV]+"\\)$"),c0={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function c1(){return this.rgb().formatHex()}function c2(){return this.rgb().formatRgb()}function c5(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=cq.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?c3(e):3===n?new c6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?c4(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?c4(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=cY.exec(t))?new c6(e[1],e[2],e[3],1):(e=cX.exec(t))?new c6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=cK.exec(t))?c4(e[1],e[2],e[3],e[4]):(e=cZ.exec(t))?c4(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=cQ.exec(t))?ft(e[1],e[2]/100,e[3]/100,1):(e=cJ.exec(t))?ft(e[1],e[2]/100,e[3]/100,e[4]):c0.hasOwnProperty(t)?c3(c0[t]):"transparent"===t?new c6(NaN,NaN,NaN,0):null}function c3(t){return new c6(t>>16&255,t>>8&255,255&t,1)}function c4(t,e,n,r){return r<=0&&(t=e=n=NaN),new c6(t,e,n,r)}function c6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function c8(){return"#"+c7(this.r)+c7(this.g)+c7(this.b)}function c9(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function c7(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ft(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fn(t,e,n,r)}function fe(t){if(t instanceof fn)return new fn(t.h,t.s,t.l,t.opacity);if(t instanceof cG||(t=c5(t)),!t)return new fn;if(t instanceof fn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+(n<r)*6:n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new fn(a,l,s,t.opacity)}function fn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function fi(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function fo(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function fa(t,e){var n=Math.min.apply(Math,ez([],eF(t),!1)),r=Math.min.apply(Math,ez([],eF(e),!1));return{x:n,y:r,width:Math.max.apply(Math,ez([],eF(t),!1))-n,height:Math.max.apply(Math,ez([],eF(e),!1))-r}}function fl(t,e,n,r,i,o){var a=-1,l=1/0,s=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,f=c/10,p=0;p<=u;p++){var h=p*c,d=[i.apply(void 0,ez([],eF(t.concat([h])),!1)),i.apply(void 0,ez([],eF(e.concat([h])),!1))],y=fo(s[0],s[1],d[0],d[1]);y<l&&(a=h,l=y)}if(0===a)return{x:t[0],y:e[0]};if(1===a){var g=t.length;return{x:t[g-1],y:e[g-1]}}l=1/0;for(var p=0;p<32&&!(f<1e-4);p++){var v=a-f,b=a+f,d=[i.apply(void 0,ez([],eF(t.concat([v])),!1)),i.apply(void 0,ez([],eF(e.concat([v])),!1))],y=fo(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,ez([],eF(t.concat([b])),!1)),i.apply(void 0,ez([],eF(e.concat([b])),!1))],O=fo(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,ez([],eF(t.concat([a])),!1)),y:i.apply(void 0,ez([],eF(e.concat([a])),!1))}}cW(cG,c5,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:c1,formatHex:c1,formatHsl:function(){return fe(this).formatHsl()},formatRgb:c2,toString:c2}),cW(c6,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof cG||(i=c5(i)),i)?new c6((i=i.rgb()).r,i.g,i.b,i.opacity):new c6:new c6(t,e,n,null==r?1:r)},c$(cG,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new c6(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new c6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:c8,formatHex:c8,formatRgb:c9,toString:c9})),cW(fn,function(t,e,n,r){return 1==arguments.length?fe(t):new fn(t,e,n,null==r?1:r)},c$(cG,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new fn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new c6(fr(t>=240?t-240:t+120,i,r),fr(t,i,r),fr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));function fs(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function fu(t,e,n,r,i){var o=1-i;return o*o*o*t+3*e*i*o*o+3*n*i*i*o+r*i*i*i}function fc(t,e,n,r){var i,o,a,l=-3*t+9*e-9*n+3*r,s=6*t-12*e+6*n,u=3*e-3*t,c=[];if(fi(l,0))!fi(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;fi(f,0)?c.push(-s/(2*l)):f>0&&(i=(-s+(a=Math.sqrt(f)))/(2*l),o=(-s-a)/(2*l),i>=0&&i<=1&&c.push(i),o>=0&&o<=1&&c.push(o))}return c}function ff(t,e,n,r,i,o,a,l,s,u,c){var f=fl([t,n,i,a],[e,r,o,l],s,u,fu,c);return fo(f.x,f.y,s,u)}function fp(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function fh(t,e,n){var r=t+n-2*e;if(fi(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}"undefined"!=typeof globalThis||("undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self);var fd={exports:{}};fd.exports=function(){function t(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e(t,e){return t<e?-1:+(t>e)}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,e){i(t,0,t.children.length,e,t)}function i(t,e,n,r,i){i||(i=p(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var l=t.children[a];o(i,t.leaf?r(l):l)}return i}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function s(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function u(t){return t.maxX-t.minX+(t.maxY-t.minY)}function c(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function p(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function h(n,r,i,o,a){for(var l=[r,i];l.length;)if(!((i=l.pop())-(r=l.pop())<=o)){var s=r+Math.ceil((i-r)/o/2)*o;(function e(n,r,i,o,a){for(;o>i;){if(o-i>600){var l=o-i+1,s=r-i+1,u=Math.log(l),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(l-c)/l)*(s-l/2<0?-1:1),p=Math.max(i,Math.floor(r-s*c/l+f)),h=Math.min(o,Math.floor(r+(l-s)*c/l+f));e(n,r,p,h,a)}var d=n[r],y=i,g=o;for(t(n,i,r),a(n[o],d)>0&&t(n,i,o);y<g;){for(t(n,y,g),y++,g--;0>a(n[y],d);)y++;for(;a(n[g],d)>0;)g--}0===a(n[i],d)?t(n,i,g):t(n,++g,o),g<=r&&(i=g+1),r<=g&&(o=g-1)}})(n,s,r||0,i||n.length-1,a||e),l.push(r,s,s,i)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var e=this.data,n=[];if(!f(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o<e.children.length;o++){var a=e.children[o],l=e.leaf?r(a):a;f(t,l)&&(e.leaf?n.push(a):c(t,l)?this._all(a,n):i.push(a))}e=i.pop()}return n},n.prototype.collides=function(t){var e=this.data;if(!f(t,e))return!1;for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],o=e.leaf?this.toBBox(i):i;if(f(t,o)){if(e.leaf||c(t,o))return!0;n.push(i)}}e=n.pop()}return!1},n.prototype.load=function(t){if(!(t&&t.length))return this;if(t.length<this._minEntries){for(var e=0;e<t.length;e++)this.insert(t[e]);return this}var n=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===n.height)this._splitRoot(this.data,n);else{if(this.data.height<n.height){var r=this.data;this.data=n,n=r}this._insert(n,this.data.height-n.height-1,!0)}else this.data=n;return this},n.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(t,e){if(!t)return this;for(var n,r,i,o=this.data,a=this.toBBox(t),l=[],s=[];o||l.length;){if(o||(o=l.pop(),r=l[l.length-1],n=s.pop(),i=!0),o.leaf){var u=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return -1}(t,o.children,e);if(-1!==u){o.children.splice(u,1),l.push(o),this._condense(l);break}}!i&&!o.leaf&&c(o,a)?(l.push(o),s.push(n),n=0,r=o,o=o.children[0]):r?(n++,o=r.children[n],i=!1):o=null}return this},n.prototype.toBBox=function(t){return t},n.prototype.compareMinX=function(t,e){return t.minX-e.minX},n.prototype.compareMinY=function(t,e){return t.minY-e.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(t){return this.data=t,this},n.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},n.prototype._build=function(t,e,n,i){var o,a=n-e+1,l=this._maxEntries;if(a<=l)return r(o=p(t.slice(e,n+1)),this.toBBox),o;i||(i=Math.ceil(Math.log(a)/Math.log(l)),l=Math.ceil(a/Math.pow(l,i-1))),(o=p([])).leaf=!1,o.height=i;var s=Math.ceil(a/l),u=s*Math.ceil(Math.sqrt(l));h(t,e,n,u,this.compareMinX);for(var c=e;c<=n;c+=u){var f=Math.min(c+u-1,n);h(t,c,f,s,this.compareMinY);for(var d=c;d<=f;d+=s){var y=Math.min(d+s-1,f);o.children.push(this._build(t,d,y,i-1))}}return r(o,this.toBBox),o},n.prototype._chooseSubtree=function(t,e,n,r){for(;r.push(e),!e.leaf&&r.length-1!==n;){for(var i=1/0,o=1/0,a=void 0,l=0;l<e.children.length;l++){var u,c,f=e.children[l],p=s(f),h=(u=t,(Math.max((c=f).maxX,u.maxX)-Math.min(c.minX,u.minX))*(Math.max(c.maxY,u.maxY)-Math.min(c.minY,u.minY))-p);h<o?(o=h,i=p<i?p:i,a=f):h===o&&p<i&&(i=p,a=f)}e=a||e.children[0]}return e},n.prototype._insert=function(t,e,n){var r=n?t:this.toBBox(t),i=[],a=this._chooseSubtree(r,this.data,e,i);for(a.children.push(t),o(a,r);e>=0;)if(i[e].children.length>this._maxEntries)this._split(i,e),e--;else break;this._adjustParentBBoxes(r,i,e)},n.prototype._split=function(t,e){var n=t[e],i=n.children.length,o=this._minEntries;this._chooseSplitAxis(n,o,i);var a=this._chooseSplitIndex(n,o,i),l=p(n.children.splice(a,n.children.length-a));l.height=n.height,l.leaf=n.leaf,r(n,this.toBBox),r(l,this.toBBox),e?t[e-1].children.push(l):this._splitRoot(n,l)},n.prototype._splitRoot=function(t,e){this.data=p([t,e]),this.data.height=t.height+1,this.data.leaf=!1,r(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,e,n){for(var r,o=1/0,a=1/0,l=e;l<=n-e;l++){var u=i(t,0,l,this.toBBox),c=i(t,l,n,this.toBBox),f=function(t,e){var n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY);return Math.max(0,Math.min(t.maxX,e.maxX)-n)*Math.max(0,Math.min(t.maxY,e.maxY)-r)}(u,c),p=s(u)+s(c);f<o?(o=f,r=l,a=p<a?p:a):f===o&&p<a&&(a=p,r=l)}return r||n-e},n.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:a,i=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},n.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var a=this.toBBox,l=i(t,0,e,a),s=i(t,n-e,n,a),c=u(l)+u(s),f=e;f<n-e;f++){var p=t.children[f];o(l,t.leaf?a(p):p),c+=u(l)}for(var h=n-e-1;h>=e;h--){var d=t.children[h];o(s,t.leaf?a(d):d),c+=u(s)}return c},n.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)o(e[r],t)},n.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():r(t[e],this.toBBox)},n}();var fy=fd.exports;(s=tG||(tG={})).GROUP="g",s.CIRCLE="circle",s.ELLIPSE="ellipse",s.IMAGE="image",s.RECT="rect",s.LINE="line",s.POLYLINE="polyline",s.POLYGON="polygon",s.TEXT="text",s.PATH="path",s.HTML="html",s.MESH="mesh",(u=tH||(tH={}))[u.ZERO=0]="ZERO",u[u.NEGATIVE_ONE=1]="NEGATIVE_ONE";var fg=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},t.prototype.removeAllRenderingPlugins=function(){var t=this;this.plugins.forEach(function(e){var n=t.context.renderingPlugins.indexOf(e);n>=0&&t.context.renderingPlugins.splice(n,1)})},t}(),fm=function(){function t(t){this.clipSpaceNearZ=tH.NEGATIVE_ONE,this.plugins=[],this.config=eN({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},t)}return t.prototype.registerPlugin=function(t){-1===this.plugins.findIndex(function(e){return e===t})&&this.plugins.push(t)},t.prototype.unregisterPlugin=function(t){var e=this.plugins.findIndex(function(e){return e===t});e>-1&&this.plugins.splice(e,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(t){return this.plugins.find(function(e){return e.name===t})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(t){Object.assign(this.config,t)},t}();function fv(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function fb(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function fx(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function fO(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function fw(t){return void 0===t?0:t>360||t<-360?t%360:t}function fE(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?s4(t):cu(t)?s8(t,e,n):s8(t[0],t[1]||e,t[2]||n)}function fk(t){return Math.PI/180*t}function fM(t){return 180/Math.PI*t}function fS(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,b;return 16===e.length?(i=.5*Math.PI,a=(o=eF(uI(s3(),e),3))[0],l=o[1],s=o[2],(u=Math.asin(-e[2]/a))<i?u>-i?(n=Math.atan2(e[6]/l,e[10]/s),r=Math.atan2(e[1]/a,e[0]/a)):(r=0,n=-Math.atan2(e[4]/l,e[5]/l)):(r=0,n=Math.atan2(e[4]/l,e[5]/l)),t[0]=n,t[1]=u,t[2]=r,t):(c=e[0],f=e[1],p=e[2],h=e[3],v=c*c+(d=f*f)+(y=p*p)+(g=h*h),(b=c*h-f*p)>.499995*v?(t[0]=Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):b<-.499995*v?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(f,c),t[2]=0):(t[0]=Math.asin(2*(c*p-h*f)),t[1]=Math.atan2(2*(c*h+f*p),1-2*(y+g)),t[2]=Math.atan2(2*(c*f+p*h),1-2*(d+y))),t)}function f_(t){var e=t[0],n=t[1],r=t[3],i=t[4],o=Math.sqrt(e*e+n*n),a=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?o=-o:a=-a),o&&(e*=1/o,n*=1/o),a&&(r*=1/a,i*=1/a);var l=fM(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var fP=uu(),fj=uu(),fA=u8(),fT=[s3(),s3(),s3()],fC=s3();function fN(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var fL=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]},t.prototype.update=function(t,e){fv(this.center,t),fv(this.halfExtents,e),fb(this.min,this.center,this.halfExtents),fx(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){fx(this.center,e,t),fO(this.center,this.center,.5),fb(this.halfExtents,e,t),fO(this.halfExtents,this.halfExtents,.5),fv(this.min,t),fv(this.max,e)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this))return void this.setMinMax(e.getMin(),e.getMax());var n=this.center,r=n[0],i=n[1],o=n[2],a=this.halfExtents,l=a[0],s=a[1],u=a[2],c=r-l,f=r+l,p=i-s,h=i+s,d=o-u,y=o+u,g=e.center,v=g[0],b=g[1],x=g[2],O=e.halfExtents,w=O[0],E=O[1],k=O[2],M=v-w,S=v+w,_=b-E,P=b+E,j=x-k,A=x+k;M<c&&(c=M),S>f&&(f=S),_<p&&(p=_),P>h&&(h=P),j<d&&(d=j),A>y&&(y=A),n[0]=(c+f)*.5,n[1]=(p+h)*.5,n[2]=(d+y)*.5,a[0]=(f-c)*.5,a[1]=(h-p)*.5,a[2]=(y-d)*.5,this.min[0]=c,this.min[1]=p,this.min[2]=d,this.max[0]=f,this.max[1]=h,this.max[2]=y}},t.prototype.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,o=t.halfExtents,a=e[0],l=e[4],s=e[8],u=e[1],c=e[5],f=e[9],p=e[2],h=e[6],d=e[10],y=Math.abs(a),g=Math.abs(l),v=Math.abs(s),b=Math.abs(u),x=Math.abs(c),O=Math.abs(f),w=Math.abs(p),E=Math.abs(h),k=Math.abs(d);n[0]=e[12]+a*i[0]+l*i[1]+s*i[2],n[1]=e[13]+u*i[0]+c*i[1]+f*i[2],n[2]=e[14]+p*i[0]+h*i[1]+d*i[2],r[0]=y*o[0]+g*o[1]+v*o[2],r[1]=b*o[0]+x*o[1]+O*o[2],r[2]=w*o[0]+E*o[1]+k*o[2],fb(this.min,n,r),fx(this.max,n,r)},t.prototype.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),i=t.getMin();return n[0]<=r[0]&&e[0]>=i[0]&&n[1]<=r[1]&&e[1]>=i[1]&&n[2]<=r[2]&&e[2]>=i[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n,r,i,o,a,l,s=new t,u=(n=[0,0,0],r=this.getMin(),i=e.getMin(),n[0]=Math.max(r[0],i[0]),n[1]=Math.max(r[1],i[1]),n[2]=Math.max(r[2],i[2]),n),c=(o=[0,0,0],a=this.getMax(),l=e.getMax(),o[0]=Math.min(a[0],l[0]),o[1]=Math.min(a[1],l[1]),o[2]=Math.min(a[2],l[2]),o);return s.setMinMax(u,c),s},t.prototype.getNegativeFarPoint=function(t){if(273===t.pnVertexFlag)return fv([0,0,0],this.min);if(272===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];if(257===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];if(256===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];if(17===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];else if(16===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];else if(1===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];else return[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(t){if(273===t.pnVertexFlag)return fv([0,0,0],this.max);if(272===t.pnVertexFlag)return[this.max[0],this.max[1],this.min[2]];if(257===t.pnVertexFlag)return[this.max[0],this.min[1],this.max[2]];if(256===t.pnVertexFlag)return[this.max[0],this.min[1],this.min[2]];if(17===t.pnVertexFlag)return[this.min[0],this.max[1],this.max[2]];else if(16===t.pnVertexFlag)return[this.min[0],this.max[1],this.min[2]];else if(1===t.pnVertexFlag)return[this.min[0],this.min[1],this.max[2]];else return[this.min[0],this.min[1],this.min[2]]},t}(),fI=function(){function t(t,e){this.distance=t||0,this.normal=e||s8(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)},t.prototype.distanceToPoint=function(t){return ui(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/s6(this.normal);un(this.normal,this.normal,t),this.distance*=t},t.prototype.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),i=r/(r-this.distanceToPoint(e)),o=i>=0&&i<=1;return o&&n&&uo(n,t,e,i),o},t}();(c=tV||(tV={}))[c.OUTSIDE=0xffffffff]="OUTSIDE",c[c.INSIDE=0]="INSIDE",c[c.INDETERMINATE=0x7fffffff]="INDETERMINATE";var fR=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new fI)}return t.prototype.extractFromVPMatrix=function(t){var e=eF(t,16),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],l=e[5],s=e[6],u=e[7],c=e[8],f=e[9],p=e[10],h=e[11],d=e[12],y=e[13],g=e[14],v=e[15];s7(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,s7(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,s7(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,s7(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,s7(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,s7(this.planes[5].normal,o+i,u+s,h+p),this.planes[5].distance=v+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}(),fD=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),fF=function(){function t(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),fB="Method not implemented.",fz="Use document.documentElement instead.";(f=tU||(tU={}))[f.ORBITING=0]="ORBITING",f[f.EXPLORING=1]="EXPLORING",f[f.TRACKING=2]="TRACKING",(p=tq||(tq={}))[p.DEFAULT=0]="DEFAULT",p[p.ROTATIONAL=1]="ROTATIONAL",p[p.TRANSLATIONAL=2]="TRANSLATIONAL",p[p.CINEMATIC=3]="CINEMATIC",(h=tY||(tY={}))[h.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",h[h.PERSPECTIVE=1]="PERSPECTIVE";var fW={UPDATED:"updated"},f$=function(){function t(){this.clipSpaceNearZ=tH.NEGATIVE_ONE,this.eventEmitter=new s2,this.matrix=uu(),this.right=s8(1,0,0),this.up=s8(0,1,0),this.forward=s8(0,0,1),this.position=s8(0,0,1),this.focalPoint=s8(0,0,0),this.distanceVector=s8(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=uu(),this.projectionMatrixInverse=uu(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=tU.EXPLORING,this.trackingMode=tq.DEFAULT,this.projectionMode=tY.PERSPECTIVE,this.frustum=new fR,this.orthoMatrix=uu()}return t.prototype.isOrtho=function(){return this.projectionMode===tY.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(t){this.enableUpdate=t},t.prototype.setType=function(t,e){return this.type=t,this.type===tU.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===tU.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},t.prototype.setProjectionMode=function(t){return this.projectionMode=t,this},t.prototype.setTrackingMode=function(t){if(this.type!==tU.TRACKING)throw Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},t.prototype.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},t.prototype.getViewTransform=function(){return ug(uu(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=uS(uu(),[t,e,0]);this.jitteredProjectionMatrix=ub(uu(),n,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(t){return this.matrix=t,this._update(),this},t.prototype.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},t.prototype.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},t.prototype.setNear=function(t){return this.projectionMode===tY.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},t.prototype.setFar=function(t){return this.projectionMode===tY.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},t.prototype.setViewOffset=function(t,e,n,r,i,o){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.projectionMode===tY.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===tY.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.setZoom=function(t){return this.zoom=t,this.projectionMode===tY.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===tY.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,i=n.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(r,i),this.setFocalPoint(r,i),this.setZoom(t),this.rotate(0,0,o);var a=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),l=s8(a.x-r,a.y-i,0),s=ui(l,this.right)/s6(this.right),u=ui(l,this.up)/s6(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=tY.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,o,a,l,s,u,c,f,p,h=this.near*Math.tan(fk(.5*this.fov))/this.zoom,d=2*h,y=this.aspect*d,g=-.5*y;if(null==(p=this.view)?void 0:p.enabled){var v=this.view.fullWidth,b=this.view.fullHeight;g+=this.view.offsetX*y/v,h-=this.view.offsetY*d/b,y*=this.view.width/v,d*=this.view.height/b}return i=this.projectionMatrix,o=g,a=g+y,l=h,s=h-d,u=this.far,this.clipSpaceNearZ===tH.ZERO?(c=-u/(u-t),f=-u*t/(u-t)):(c=-(u+t)/(u-t),f=-2*u*t/(u-t)),i[0]=2*t/(a-o),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=2*t/(l-s),i[6]=0,i[7]=0,i[8]=(a+o)/(a-o),i[9]=(l+s)/(l-s),i[10]=c,i[11]=-1,i[12]=0,i[13]=0,i[14]=f,i[15]=0,uO(this.projectionMatrix,this.projectionMatrix,s8(1,-1,1)),ug(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=tY.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=o;var a,l=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,c=(this.top+this.bottom)/2,f=u-l,p=u+l,h=c+s,d=c-s;if(null==(a=this.view)?void 0:a.enabled){var y=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;f+=y*this.view.offsetX,p=f+y*this.view.width,h-=g*this.view.offsetY,d=h-g*this.view.height}return this.clipSpaceNearZ===tH.NEGATIVE_ONE?uU(this.projectionMatrix,f,p,d,h,i,o):uq(this.projectionMatrix,f,p,d,h,i,o),uO(this.projectionMatrix,this.projectionMatrix,s8(1,-1,1)),ug(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(t,e,n){void 0===e&&(e=this.position[1]),void 0===n&&(n=this.position[2]);var r=fE(t,e,n);return this._setPosition(r),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r=s8(0,1,0);if(this.focalPoint=fE(t,e,n),this.trackingMode===tq.CINEMATIC){var i=ue(s3(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=fM(Math.asin(e/s6(i))),a=90+fM(Math.atan2(n,t)),l=uu();uk(l,l,fk(a)),uE(l,l,fk(o)),r=ua(s3(),[0,1,0],l)}return ug(this.matrix,uY(uu(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100;var e=s3();t=this.distance;var n=this.forward,r=this.focalPoint;return e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(t){return this.maxDistance=t,this},t.prototype.setMinDistance=function(t){return this.minDistance=t,this},t.prototype.setAzimuth=function(t){return this.azimuth=fw(t),this.computeMatrix(),this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=fw(t),this.computeMatrix(),this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=fw(t),this.computeMatrix(),this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var t=ct(u7(),[0,0,1],fk(this.roll));ud(this.matrix);var e=ct(u7(),[1,0,0],fk((this.rotateWorld&&this.type!==tU.TRACKING||this.type===tU.TRACKING?1:-1)*this.elevation)),n=ct(u7(),[0,1,0],fk((this.rotateWorld&&this.type!==tU.TRACKING||this.type===tU.TRACKING?1:-1)*this.azimuth)),r=ce(u7(),n,e);r=ce(u7(),r,t);var i=uB(uu(),r);this.type===tU.ORBITING||this.type===tU.EXPLORING?(ux(this.matrix,this.matrix,this.focalPoint),ub(this.matrix,this.matrix,i),ux(this.matrix,this.matrix,[0,0,this.distance])):this.type===tU.TRACKING&&(ux(this.matrix,this.matrix,this.position),ub(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=fE(t,e,n);var r=this.matrix;r[12]=this.position[0],r[13]=this.position[1],r[14]=this.position[2],r[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){s9(this.right,fE(u9(u8(),[1,0,0,0],this.matrix))),s9(this.up,fE(u9(u8(),[0,1,0,0],this.matrix))),s9(this.forward,fE(u9(u8(),[0,0,1,0],this.matrix))),ur(this.right,this.right),ur(this.up,this.up),ur(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=s6(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===tU.TRACKING||this.rotateWorld?(this.elevation=fM(Math.asin(e/r)),this.azimuth=fM(Math.atan2(-t,-n))):(this.elevation=-fM(Math.asin(e/r)),this.azimuth=-fM(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){s9(this.position,fE(u9(u8(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){var t,e,n,r,i,o,a;n=this.distanceVector,r=[0,0,-this.distance],t=u6(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],i=r[0],o=r[1],a=r[2],n[0]=i*m[0]+o*m[3]+a*m[6],n[1]=i*m[1]+o*m[4]+a*m[7],n[2]=i*m[2]+o*m[5]+a*m[8],ut(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=ue(s3(),this.focalPoint,this.position),this.distance=s6(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===tY.ORTHOGRAPHIC){var t=this.position,e=ct(u7(),[0,0,1],-this.roll*Math.PI/180);uF(this.orthoMatrix,e,s8((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),s8(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=ub(uu(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(fW.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(fB)},t.prototype.pan=function(t,e){throw Error(fB)},t.prototype.dolly=function(t){throw Error(fB)},t.prototype.createLandmark=function(t,e){throw Error(fB)},t.prototype.gotoLandmark=function(t,e){throw Error(fB)},t.prototype.cancelLandmarkAnimation=function(){throw Error(fB)},t}();function fG(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return n.cache=a.set(o,l)||a,l};return n.cache=new(fG.Cache||Map),n}fG.Cache=Map,(d=tX||(tX={}))[d.kUnknown=0]="kUnknown",d[d.kNumber=1]="kNumber",d[d.kPercentage=2]="kPercentage",d[d.kEms=3]="kEms",d[d.kPixels=4]="kPixels",d[d.kRems=5]="kRems",d[d.kDegrees=6]="kDegrees",d[d.kRadians=7]="kRadians",d[d.kGradians=8]="kGradians",d[d.kTurns=9]="kTurns",d[d.kMilliseconds=10]="kMilliseconds",d[d.kSeconds=11]="kSeconds",d[d.kInteger=12]="kInteger",(y=tK||(tK={}))[y.kUNumber=0]="kUNumber",y[y.kUPercent=1]="kUPercent",y[y.kULength=2]="kULength",y[y.kUAngle=3]="kUAngle",y[y.kUTime=4]="kUTime",y[y.kUOther=5]="kUOther",(g=tZ||(tZ={}))[g.kAll=0]="kAll",g[g.kNonNegative=1]="kNonNegative",g[g.kInteger=2]="kInteger",g[g.kNonNegativeInteger=3]="kNonNegativeInteger",g[g.kPositiveInteger=4]="kPositiveInteger",(v=tQ||(tQ={}))[v.kYes=0]="kYes",v[v.kNo=1]="kNo",(b=tJ||(tJ={}))[b.kYes=0]="kYes",b[b.kNo=1]="kNo";var fH=[{name:"em",unit_type:tX.kEms},{name:"px",unit_type:tX.kPixels},{name:"deg",unit_type:tX.kDegrees},{name:"rad",unit_type:tX.kRadians},{name:"grad",unit_type:tX.kGradians},{name:"ms",unit_type:tX.kMilliseconds},{name:"s",unit_type:tX.kSeconds},{name:"rem",unit_type:tX.kRems},{name:"turn",unit_type:tX.kTurns}];(x=t0||(t0={}))[x.kUnknownType=0]="kUnknownType",x[x.kUnparsedType=1]="kUnparsedType",x[x.kKeywordType=2]="kKeywordType",x[x.kUnitType=3]="kUnitType",x[x.kSumType=4]="kSumType",x[x.kProductType=5]="kProductType",x[x.kNegateType=6]="kNegateType",x[x.kInvertType=7]="kInvertType",x[x.kMinType=8]="kMinType",x[x.kMaxType=9]="kMaxType",x[x.kClampType=10]="kClampType",x[x.kTransformType=11]="kTransformType",x[x.kPositionType=12]="kPositionType",x[x.kURLImageType=13]="kURLImageType",x[x.kColorType=14]="kColorType",x[x.kUnsupportedColorType=15]="kUnsupportedColorType";var fV=function(t){return t?"number"===t?tX.kNumber:"percent"===t||"%"===t?tX.kPercentage:fH.find(function(e){return e.name===t}).unit_type:tX.kUnknown},fU=function(t){switch(t){case tX.kNumber:case tX.kInteger:return tK.kUNumber;case tX.kPercentage:return tK.kUPercent;case tX.kPixels:return tK.kULength;case tX.kMilliseconds:case tX.kSeconds:return tK.kUTime;case tX.kDegrees:case tX.kRadians:case tX.kGradians:case tX.kTurns:return tK.kUAngle;default:return tK.kUOther}},fq=function(t){switch(t){case tK.kUNumber:return tX.kNumber;case tK.kULength:return tX.kPixels;case tK.kUPercent:return tX.kPercentage;case tK.kUTime:return tX.kSeconds;case tK.kUAngle:return tX.kDegrees;default:return tX.kUnknown}},fY=function(t){var e=1;switch(t){case tX.kPixels:case tX.kDegrees:case tX.kSeconds:break;case tX.kMilliseconds:e=.001;break;case tX.kRadians:e=180/Math.PI;break;case tX.kGradians:e=.9;break;case tX.kTurns:e=360}return e},fX=function(t){switch(t){case tX.kNumber:case tX.kInteger:break;case tX.kPercentage:return"%";case tX.kEms:return"em";case tX.kRems:return"rem";case tX.kPixels:return"px";case tX.kDegrees:return"deg";case tX.kRadians:return"rad";case tX.kGradians:return"grad";case tX.kMilliseconds:return"ms";case tX.kSeconds:return"s";case tX.kTurns:return"turn"}return""},fK=function(){function t(){}return t.isAngle=function(t){return t===tX.kDegrees||t===tX.kRadians||t===tX.kGradians||t===tX.kTurns},t.isLength=function(t){return t>=tX.kEms&&t<tX.kDegrees},t.isRelativeUnit=function(t){return t===tX.kPercentage||t===tX.kEms||t===tX.kRems},t.isTime=function(t){return t===tX.kSeconds||t===tX.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(tQ.kNo,tJ.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=t0.kUnitType&&this.getType()<=t0.kClampType},t}(),fZ=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return eC(e,t),e.prototype.getType=function(){return t0.kColorType},e.prototype.to=function(t){return this},e}(fK);(O=t1||(t1={}))[O.Constant=0]="Constant",O[O.LinearGradient=1]="LinearGradient",O[O.RadialGradient=2]="RadialGradient";var fQ=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return eC(e,t),e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(t,e,n){return n},e.prototype.getType=function(){return t0.kColorType},e}(fK),fJ=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return eC(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return t0.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(fK),f0=fG(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),f1=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function f2(t){return"function"==typeof t}var f5={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},f3=fG(function(t){var e=f0(t),n=f5[e];return(null==n?void 0:n.alias)||e}),f4=function(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw Error();n="NaN"}else n=t>0?"infinity":"-infinity";return n+e},f6=function(t){return fq(fU(t))},f8=function(t){function e(e,n){void 0===n&&(n=tX.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?fV(n):n,i.value=e,i}return eC(e,t),e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(t){return this.value===t.value&&this.unit===t.unit},e.prototype.getType=function(){return t0.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=f6(this.unit);if(n!==f6(t)||n===tX.kUnknown)return null;var r=fY(this.unit)/fY(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case tX.kUnknown:break;case tX.kInteger:r=Number(this.value).toFixed(0);break;case tX.kNumber:case tX.kPercentage:case tX.kEms:case tX.kRems:case tX.kPixels:case tX.kDegrees:case tX.kRadians:case tX.kGradians:case tX.kMilliseconds:case tX.kSeconds:case tX.kTurns:var i=this.value,o=fX(this.unit);if(i<-999999||i>999999){var a=fX(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?f4(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(fK),f9=new f8(0,"px");new f8(1,"px");var f7=new f8(0,"deg"),pt=function(t){function e(e,n,r,i,o){void 0===i&&(i=1),void 0===o&&(o=!1);var a=t.call(this,"rgb")||this;return a.r=e,a.g=n,a.b=r,a.alpha=i,a.isNone=o,a}return eC(e,t),e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(fZ),pe=new fJ("unset"),pn={"":pe,unset:pe,initial:new fJ("initial"),inherit:new fJ("inherit")},pr=function(t){return pn[t]||(pn[t]=new fJ(t)),pn[t]},pi=new pt(0,0,0,0,!0),po=new pt(0,0,0,0),pa=fG(function(t,e,n,r){return new pt(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),pl=function(t,e){return void 0===e&&(e=tX.kNumber),new f8(t,e)},ps=new f8(50,"%");(w=t2||(t2={}))[w.Standard=0]="Standard",(E=t5||(t5={}))[E.ADDED=0]="ADDED",E[E.REMOVED=1]="REMOVED",E[E.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var pu={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fF(0,0,0,0)};(k=t3||(t3={})).COORDINATE="<coordinate>",k.COLOR="<color>",k.PAINT="<paint>",k.NUMBER="<number>",k.ANGLE="<angle>",k.OPACITY_VALUE="<opacity-value>",k.SHADOW_BLUR="<shadow-blur>",k.LENGTH="<length>",k.PERCENTAGE="<percentage>",k.LENGTH_PERCENTAGE="<length> | <percentage>",k.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",k.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",k.LIST_OF_POINTS="<list-of-points>",k.PATH="<path>",k.FILTER="<filter>",k.Z_INDEX="<z-index>",k.OFFSET_DISTANCE="<offset-distance>",k.DEFINED_PATH="<defined-path>",k.MARKER="<marker>",k.TRANSFORM="<transform>",k.TRANSFORM_ORIGIN="<transform-origin>",k.TEXT="<text>",k.TEXT_TRANSFORM="<text-transform>";var pc=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(t){throw Error(e+": "+t)}function r(){return i("linear-gradient",t.linearGradient,a)||i("repeating-linear-gradient",t.repeatingLinearGradient,a)||i("radial-gradient",t.radialGradient,l)||i("repeating-radial-gradient",t.repeatingRadialGradient,l)||i("conic-gradient",t.conicGradient,l)}function i(e,r,i){return o(r,function(r){var o=i();return o&&!b(t.comma)&&n("Missing comma before color stops"),{type:e,orientation:o,colorStops:p(h)}})}function o(e,r){var i=b(e);if(i){b(t.startCall)||n("Missing (");var o=r(i);return b(t.endCall)||n("Missing )"),o}}function a(){return v("directional",t.sideOrCorner,1)||v("angular",t.angleValue,1)}function l(){var n,r,i=s();return i&&((n=[]).push(i),r=e,b(t.comma)&&((i=s())?n.push(i):e=r)),n}function s(){var t,e,n=((t=v("shape",/^(circle)/i,0))&&(t.style=g()||u()),t||((e=v("shape",/^(ellipse)/i,0))&&(e.style=y()||u()),e));if(n)n.at=c();else{var r=u();if(r){n=r;var i=c();i&&(n.at=i)}else{var o=f();o&&(n={type:"default-radial",at:o})}}return n}function u(){return v("extent-keyword",t.extentKeywords,1)}function c(){if(v("position",/^at/,0)){var t=f();return t||n("Missing positioning value"),t}}function f(){var t={x:y(),y:y()};if(t.x||t.y)return{type:"position",value:t}}function p(e){var r=e(),i=[];if(r)for(i.push(r);b(t.comma);)(r=e())?i.push(r):n("One extra comma");return i}function h(){var e=v("hex",t.hexColor,1)||o(t.rgbaColor,function(){return{type:"rgba",value:p(d)}})||o(t.rgbColor,function(){return{type:"rgb",value:p(d)}})||v("literal",t.literalColor,0);return e||n("Expected color definition"),e.length=y(),e}function d(){return b(t.number)[1]}function y(){return v("%",t.percentageValue,1)||v("position-keyword",t.positionKeywords,1)||g()}function g(){return v("px",t.pixelValue,1)||v("em",t.emValue,1)}function v(t,e,n){var r=b(e);if(r)return{type:t,value:r[n]}}function b(t){var n=/^[\n\r\t\s]+/.exec(e);n&&x(n[0].length);var r=t.exec(e);return r&&x(r[0].length),r}function x(t){e=e.substring(t)}return function(t){var i;return e=t,i=p(r),e.length>0&&n("Invalid input not EOF"),i}}(),pf=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,pp=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ph=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,pd=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,py={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},pg=fG(function(t){var e;return pl("angular"===t.type?Number(t.value):py[t.value]||0,"deg")}),pm=fG(function(t){var e=50,n=50,r="%",i="%";if((null==t?void 0:t.type)==="position"){var o=t.value,a=o.x,l=o.y;(null==a?void 0:a.type)==="position-keyword"&&("left"===a.value?e=0:"center"===a.value?e=50:"right"===a.value?e=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),(null==l?void 0:l.type)==="position-keyword"&&("left"===l.value?e=0:"center"===l.value?n=50:"right"===l.value?e=100:"top"===l.value?n=0:"bottom"===l.value&&(n=100)),((null==a?void 0:a.type)==="px"||(null==a?void 0:a.type)==="%"||(null==a?void 0:a.type)==="em")&&(r=null==a?void 0:a.type,e=Number(a.value)),((null==l?void 0:l.type)==="px"||(null==l?void 0:l.type)==="%"||(null==l?void 0:l.type)==="em")&&(i=null==l?void 0:l.type,n=Number(l.value))}return{cx:pl(e,r),cy:pl(n,i)}}),pv=fG(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return pc(t).map(function(t){var e=t.type,n=t.orientation,r=t.colorStops;!function(t){var e,n,r,i=t.length;t[i-1].length=null!=(e=t[i-1].length)?e:{type:"%",value:"100"},i>1&&(t[0].length=null!=(n=t[0].length)?n:{type:"%",value:"0"});for(var o=0,a=Number(t[0].length.value),l=1;l<i;l++){var s=null==(r=t[l].length)?void 0:r.value;if(!cf(s)&&!cf(a)){for(var u=1;u<l-o;u++)t[o+u].length={type:"%",value:"".concat(a+(Number(s)-a)*u/(l-o))};o=l,a=Number(s)}}}(r);var i=r.map(function(t){var e,n,r;return{offset:pl(Number(t.length.value),"%"),color:(n=(e=t).type,r=e.value,"hex"===n?"#".concat(r):"literal"===n?r:"rgb"===n?"rgb(".concat(r.join(","),")"):"rgba(".concat(r.join(","),")"))}});if("linear-gradient"===e)return new fQ(t1.LinearGradient,{angle:n?pg(n):f7,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=pm(n[0].at),a=o.cx,l=o.cy,s=void 0;if(n[0].style){var u=n[0].style,c=u.type,f=u.value;s="extent-keyword"===c?pr(f):pl(f,c)}return new fQ(t1.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=pf.exec(t);if(r){var i=(null==(e=r[2].match(pd))?void 0:e.map(function(t){return t.split(":")}))||[];return[new fQ(t1.LinearGradient,{angle:pl(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=eF(t,2),n=e[0],r=e[1];return{offset:pl(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=pp.exec(t);if(n){var r=(null==(e=n[4].match(pd))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:pl(50,"%"),cy:pl(50,"%"),steps:r.map(function(t){var e=eF(t,2),n=e[0],r=e[1];return{offset:pl(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!cp(o))return[new fQ(t1.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=ph.exec(a);if(l){var s=l[1],u=l[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;default:s="no-repeat"}return{image:u,repetition:s}}return null}}});function pb(t){return t&&!!t.image}function px(t){return t&&!cf(t.r)&&!cf(t.g)&&!cf(t.b)}var pO=fG(function(t){if(pb(t))return eN({repetition:"repeat"},t);if(cf(t)&&(t=""),"transparent"===t)return po;"currentColor"===t&&(t="black");var e=pv(t);if(e)return e;var n=c5(t),r=[0,0,0,0];return null!==n&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),pa.apply(void 0,ez([],eF(r),!1))});function pw(t,e){if(px(t)&&px(e))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(ch(e[n],0,255));return e[3]=ch(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function pE(t,e){if(cf(e))return pl(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return pl(Number(e),"px");else if("deg".search(t)>=0)return pl(Number(e),"deg")}var n=[];e=e.replace(t,function(t){return n.push(t),"U"+t});var r="U("+t.source+")";return n.map(function(t){return pl(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var pk=function(t){return pE(/px/g,t)},pM=fG(pk);fG(function(t){return pE(RegExp("%","g"),t)});var pS=function(t){return cu(t)||isFinite(Number(t))?pl(Number(t)||0,"px"):pE(RegExp("px|%|em|rem","g"),t)},p_=fG(pS),pP=function(t){return pE(RegExp("deg|rad|grad|turn","g"),t)},pj=fG(pP);function pA(t){var e=0;return t.unit===tX.kDegrees?e=t.value:t.unit===tX.kRadians?e=fM(Number(t.value)):t.unit===tX.kTurns&&(e=360*Number(t.value)),e}function pT(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):cp(t)?n=t.split(" ").map(function(t){return Number(t)}):cu(t)&&(n=[t]),2===e)if(1===n.length)return[n[0],n[0]];else return[n[0],n[1]];return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function pC(t){return cp(t)?t.split(" ").map(function(t){return p_(t)}):t.map(function(t){return p_(t.toString())})}function pN(t,e,n){if(0===t.value)return 0;if(t.unit===tX.kPixels)return Number(t.value);if(t.unit===tX.kPercentage&&n){var r=n.nodeName===tG.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var pL=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function pI(t){if(void 0===t&&(t=""),"none"===(t=t.toLowerCase().trim()))return[];for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;)if(i=e.index+e[0].length,pL.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return pE(/deg|rad|grad|turn|px|%/g,t)||pO(t)})}),n.lastIndex===t.length)return r;return[]}function pR(t){return t.toString()}var pD=function(t){return"number"==typeof t?pl(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?pl(Number(t)):pl(0)},pF=fG(pD);function pB(t,e){return[t,e,pR]}function pz(t,e){return function(n,r){return[n,r,function(n){return pR(ch(n,t,e))}]}}function pW(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function p$(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=cP(t.parsedStyle.path.absolutePath,void 0,eN(eN({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function pG(t,e){return t[0]===e[0]&&t[1]===e[1]}function pH(t,e){var n,r=t.prePoint,i=t.currentPoint,o=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),l=Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2),s=Math.acos((a+l-(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))/(2*Math.sqrt(a)*Math.sqrt(l)));if(!s||0===Math.sin(s)||(void 0===n&&(n=1e-5),Math.abs(s-0)<n))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(o[1]-i[1],o[0]-i[0])),c=Math.abs(Math.atan2(o[0]-i[0],o[1]-i[1]));return{xExtra:e/2*(1/Math.sin(s/2))*Math.cos(s/2-(u=u>Math.PI/2?Math.PI-u:u))-e/2||0,yExtra:e/2*(1/Math.sin(s/2))*Math.cos((c=c>Math.PI/2?Math.PI-c:c)-s/2)-e/2||0}}function pV(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}fG(function(t){return cp(t)?t.split(" ").map(pF):t.map(pF)});var pU=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)},pq=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=fk(r=cC(r,360));if(t.x===a.x&&t.y===a.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(0===e||0===n)return{x:0,y:0,ellipticalArcAngle:0};var u=(t.x-a.x)/2,c=(t.y-a.y)/2,f={x:Math.cos(s)*u+Math.sin(s)*c,y:-Math.sin(s)*u+Math.cos(s)*c},p=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);p>1&&(e=Math.sqrt(p)*e,n=Math.sqrt(p)*n);var h=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2))/(Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2)),d=(i!==o?1:-1)*Math.sqrt(h=h<0?0:h),y={x:d*(e*f.y/n),y:d*(-(n*f.x)/e)},g={x:Math.cos(s)*y.x-Math.sin(s)*y.y+(t.x+a.x)/2,y:Math.sin(s)*y.x+Math.cos(s)*y.y+(t.y+a.y)/2},v={x:(f.x-y.x)/e,y:(f.y-y.y)/n},b=pU({x:1,y:0},v),x=pU(v,{x:(-f.x-y.x)/e,y:(-f.y-y.y)/n});!o&&x>0?x-=2*Math.PI:o&&x<0&&(x+=2*Math.PI);var O=b+(x%=2*Math.PI)*l,w=e*Math.cos(O),E=n*Math.sin(O);return{x:Math.cos(s)*w-Math.sin(s)*E+g.x,y:Math.sin(s)*w+Math.cos(s)*E+g.y,ellipticalArcStartAngle:b,ellipticalArcEndAngle:b+x,ellipticalArcAngle:O,ellipticalArcCenter:g,resultantRx:e,resultantRy:n}};function pY(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,o=void 0===i?0:i,a=r.ry,l=void 0===a?0:a,s=r.xRotation,u=r.arcFlag,c=r.sweepFlag,f=pq({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=pq({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=p.x-f.x,d=p.y-f.y,y=Math.sqrt(h*h+d*d);return{x:-h/y,y:-d/y}}function pX(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function pK(t,e){return pX(t)*pX(e)?(t[0]*e[0]+t[1]*e[1])/(pX(t)*pX(e)):1}function pZ(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(pK(t,e))}function pQ(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,o=t*i,a=e*i,l=n-t,s=n+t,u=r-e,c=r+e;return[["M",l,r],["C",l,r-a,n-o,u,n,u],["C",n+o,u,s,r-a,s,r],["C",s,r+a,n+o,c,n,c],["C",n-o,c,l,r+a,l,r],["Z"]]}function pJ(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case tG.LINE:var h=t.parsedStyle,d=h.x1,y=h.y1,g=h.x2,v=h.y2;p=[["M",void 0===d?0:d,void 0===y?0:y],["L",void 0===g?0:g,void 0===v?0:v]];break;case tG.CIRCLE:var b=t.parsedStyle,x=b.r,O=void 0===x?0:x,w=b.cx,E=void 0===w?0:w,k=b.cy,M=void 0===k?0:k;p=pQ(O,O,E,M);break;case tG.ELLIPSE:var S=t.parsedStyle,_=S.rx,P=S.ry,j=S.cx,E=void 0===j?0:j,A=S.cy,M=void 0===A?0:A;p=pQ(void 0===_?0:_,void 0===P?0:P,E,M);break;case tG.POLYLINE:case tG.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===tG.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case tG.RECT:var T=t.parsedStyle,C=T.width,N=void 0===C?0:C,L=T.height,I=void 0===L?0:L,R=T.x,D=T.y,F=T.radius;p=function(t,e,n,r,i){if(i){var o=eF(i,4),a=o[0],l=o[1],s=o[2],u=o[3],c=t>0?1:-1,f=e>0?1:-1,p=+(c+f!==0);return[["M",c*a+n,r],["L",t-c*l+n,r],l?["A",l,l,0,0,p,t+n,f*l+r]:null,["L",t+n,e-f*s+r],s?["A",s,s,0,0,p,t+n-c*s,e+r]:null,["L",n+c*u,e+r],u?["A",u,u,0,0,p,n,e+r-f*u]:null,["L",n,f*a+r],a?["A",a,a,0,0,p,c*a+n,r]:null,["Z"]].filter(function(t){return t})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}(N,I,void 0===R?0:R,void 0===D?0:D,F&&F.some(function(t){return 0!==t})&&F.map(function(t){return ch(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case tG.PATH:p=ez([],eF(t.parsedStyle.path.absolutePath),!1)}if(p.length)return o=p,a=e,u=void 0===(s=(l=t.parsedStyle).defX)?0:s,f=void 0===(c=l.defY)?0:c,o.reduce(function(t,e){var n="";if("M"===e[0]||"L"===e[0]){var r=s8(e[1]-u,e[2]-f,0);a&&ua(r,r,a),n="".concat(e[0]).concat(r[0],",").concat(r[1])}else if("Z"===e[0])n=e[0];else if("C"===e[0]){var i=s8(e[1]-u,e[2]-f,0),o=s8(e[3]-u,e[4]-f,0),l=s8(e[5]-u,e[6]-f,0);a&&(ua(i,i,a),ua(o,o,a),ua(l,l,a)),n="".concat(e[0]).concat(i[0],",").concat(i[1],",").concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1])}else if("A"===e[0]){var s=s8(e[6]-u,e[7]-f,0);a&&ua(s,s,a),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(s[0],",").concat(s[1])}else if("Q"===e[0]){var i=s8(e[1]-u,e[2]-f,0),o=s8(e[3]-u,e[4]-f,0);a&&(ua(i,i,a),ua(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var p0=function(t){if(""===t||Array.isArray(t)&&0===t.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};try{e=cE(t)}catch(n){e=cE(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}!function(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e];if("M"===r[0]&&n){var i=n[0],o=[r[1],r[2]],a=void 0;"L"===i||"M"===i?a=[n[1],n[2]]:("C"===i||"A"===i||"Q"===i)&&(a=[n[n.length-2],n[n.length-1]]),a&&pG(o,a)&&(t.splice(e,1),e--)}}}(e);var e,n=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(e),r=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=t[i],a=o[0];"M"===a?(r.length&&(n.push(r),r=[]),r.push([o[1],o[2]])):"Z"===a?r.length&&(e.push(r),r=[]):r.push([o[1],o[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}(e),i=r.polygons,o=r.polylines,a=function(t){for(var e=[],n=null,r=null,i=null,o=0,a=t.length,l=0;l<a;l++){var s=t[l];r=t[l+1];var u=s[0],c={command:u,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[s[1],s[2]],o=l;break;case"A":c.arcParams=function(t,e){var n=e[1],r=e[2],i=cC(fk(e[3]),2*Math.PI),o=e[4],a=e[5],l=t[0],s=t[1],u=e[6],c=e[7],f=Math.cos(i)*(l-u)/2+Math.sin(i)*(s-c)/2,p=-1*Math.sin(i)*(l-u)/2+Math.cos(i)*(s-c)/2,h=f*f/(n*n)+p*p/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var d=n*n*(p*p)+r*r*(f*f),y=d?Math.sqrt((n*n*(r*r)-d)/d):1;o===a&&(y*=-1),isNaN(y)&&(y=0);var g=r?y*n*p/r:0,v=n?-(y*r)*f/n:0,b=(l+u)/2+Math.cos(i)*g-Math.sin(i)*v,x=(s+c)/2+Math.sin(i)*g+Math.cos(i)*v,O=[(f-g)/n,(p-v)/r],w=[(-1*f-g)/n,(-1*p-v)/r],E=pZ([1,0],O),k=pZ(O,w);return -1>=pK(O,w)&&(k=Math.PI),pK(O,w)>=1&&(k=0),0===a&&k>0&&(k-=2*Math.PI),1===a&&k<0&&(k+=2*Math.PI),{cx:b,cy:x,rx:pG(t,[u,c])?0:n,ry:pG(t,[u,c])?0:r,startAngle:E,endAngle:E+k,xRotation:i,arcFlag:o,sweepFlag:a}}(n,s)}if("Z"===u)n=i,r=t[o+1];else{var f=s.length;n=[s[f-2],s[f-1]]}r&&"Z"===r[0]&&(r=t[o],e[o]&&(e[o].prePoint=n)),c.currentPoint=n,e[o]&&pG(n,e[o].currentPoint)&&(e[o].prePoint=c.prePoint),c.nextPoint=r?[r[r.length-2],r[r.length-1]]:null;var p=c.prePoint;if(["L","H","V"].includes(u))c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]];else if("Q"===u){var h=[s[1],s[2]];c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]}else if("T"===u){var d=e[l-1],h=pV(d.currentPoint,p);"Q"===d.command?(c.command="Q",c.startTangent=[p[0]-h[0],p[1]-h[1]],c.endTangent=[n[0]-h[0],n[1]-h[1]]):(c.command="TL",c.startTangent=[p[0]-n[0],p[1]-n[1]],c.endTangent=[n[0]-p[0],n[1]-p[1]])}else if("C"===u){var y=[s[1],s[2]],g=[s[3],s[4]];c.startTangent=[p[0]-y[0],p[1]-y[1]],c.endTangent=[n[0]-g[0],n[1]-g[1]],0===c.startTangent[0]&&0===c.startTangent[1]&&(c.startTangent=[y[0]-g[0],y[1]-g[1]]),0===c.endTangent[0]&&0===c.endTangent[1]&&(c.endTangent=[g[0]-y[0],g[1]-y[1]])}else if("S"===u){var d=e[l-1],y=pV(d.currentPoint,p),g=[s[1],s[2]];"C"===d.command?(c.command="C",c.startTangent=[p[0]-y[0],p[1]-y[1]]):(c.command="SQ",c.startTangent=[p[0]-g[0],p[1]-g[1]]),c.endTangent=[n[0]-g[0],n[1]-g[1]]}else if("A"===u){var v=pY(c,0),b=v.x,x=v.y,O=pY(c,1,!1),w=O.x,E=O.y;c.startTangent=[b,x],c.endTangent=[w,E]}e.push(c)}return e}(e),l=function(t,e){for(var n=[],r=[],i=[],o=0;o<t.length;o++){var a=t[o],l=a.currentPoint,s=a.params,u=a.prePoint,c=void 0;switch(a.command){case"Q":c=function(t,e,n,r,i,o){var a=fh(t,n,i)[0],l=fh(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(fp(t,n,i,a)),void 0!==l&&u.push(fp(e,r,o,l)),fa(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4]);break;case"C":c=function(t,e,n,r,i,o,a,l){for(var s=[t,a],u=[e,l],c=fc(t,n,i,a),f=fc(e,r,o,l),p=0;p<c.length;p++)s.push(fu(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(fu(e,r,o,l,f[p]));return fa(s,u)}(u[0],u[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var f=a.arcParams;c=function(t,e,n,r,i,o,a){for(var l=Math.atan(-r/n*Math.tan(i)),s=1/0,u=-1/0,c=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var p=l+f;o<a?o<p&&p<a&&c.push(p):a<p&&p<o&&c.push(p)}for(var f=0;f<c.length;f++){var h,d=n*Math.cos(i)*Math.cos(h=c[f])-r*Math.sin(i)*Math.sin(h)+t;d<s&&(s=d),d>u&&(u=d)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,v=-1/0,b=[o,a],f=-(2*Math.PI);f<=2*Math.PI;f+=Math.PI){var x=y+f;o<a?o<x&&x<a&&b.push(x):a<x&&x<o&&b.push(x)}for(var f=0;f<b.length;f++){var O,w=n*Math.sin(i)*Math.cos(O=b[f])+r*Math.cos(i)*Math.sin(O)+e;w<g&&(g=w),w>v&&(v=w)}return{x:s,y:g,width:u-s,height:v-g}}(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(l[0]),r.push(l[1])}c&&(a.box=c,n.push(c.x,c.x+c.width),r.push(c.y,c.y+c.height))}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var p=cA(n),h=cA(r),d=cT(n),y=cT(r);if(0===i.length)return{x:p,y:h,width:d-p,height:y-h};for(var o=0;o<i.length;o++){var a=i[o],l=a.currentPoint,g=void 0;l[0]===p?p-=pH(a,0).xExtra:l[0]===d&&(d+=pH(a,e).xExtra),l[1]===h?h-=pH(a,e).yExtra:l[1]===y&&(y+=pH(a,e).yExtra)}return{x:p,y:h,width:d-p,height:y-h}}(a,0),s=l.x,u=l.y,c=l.width,f=l.height;return{absolutePath:e,hasArc:n,segments:a,polygons:i,polylines:o,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(u)?u:0,width:Number.isFinite(c)?c:0,height:Number.isFinite(f)?f:0}}},p1=fG(p0);function p2(t){return cp(t)?p1(t):p0(t)}function p5(t,e,n){var r,i,o,a,l,s,u,c,f,p,h=t.curve,d=e.curve;h&&0!==h.length||(h=cI(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=cI(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=cR(e),o=cR(n),a=i.length,l=o.length,s=i.filter(function(t){return t.l}).length,u=o.filter(function(t){return t.l}).length,c=i.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,f=o.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/u||0,p=r||Math.max(a,l),h=[c,f],d=[p-a,p-l],y=0,g=[i,o].map(function(t,e){return t.l===p?t.map(function(t){return t.s}):t.map(function(t,n){return y=n&&d[e]&&t.l>=h[e],d[e]-=+!!y,y?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:t(g[0],g[1],p)}(h,d));var g=cD(y[0])!==cD(y[1])?[["M"].concat((i=(r=y[0]).slice(1).map(function(t,e,n){return e?n[e-1].slice(-2).concat(t.slice(1)):r[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(e,n){return t[t.length-n-2*(1-n%2)]})}).reverse())[0].slice(0,2))].concat(i.map(function(t){return["C"].concat(t.slice(2))})):y[0].map(function(t){return Array.isArray(t)?[].concat(t):t});return[g,(o=y[1],a=o.length-1,l=[],u=0,(f=(c=o.length)-1,p=o.map(function(t,e){return o.map(function(t,n){var r=e+n;return 0===n||o[r]&&"M"===o[r][0]?["M"].concat(o[r].slice(-2)):(r>=c&&(r-=f),o[r])})})).forEach(function(t,e){o.slice(1).forEach(function(t,n){u+=cc(o[(e+n)%a].slice(-2),g[n%a].slice(-2))}),l[e]=u,u=0}),p[l.indexOf(Math.min.apply(null,l))]),function(t){return t}]}function p3(t,e){var n,r,i=cp(t)?t.split(" ").map(function(t){var e=eF(t.split(","),2),n=e[0],r=e[1];return[Number(n),Number(r)]}):t,o=[],a=0,l=function(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=fo(r[0],r[1],i[0],i[1])}return e}(i);i.forEach(function(t,e){if(i[e+1]){var s,u;(n=[0,0])[0]=a/l,s=t[0],u=t[1],r=fo(s,u,i[e+1][0],i[e+1][1]),a+=r,n[1]=a/l,o.push(n)}});var s=Math.min.apply(Math,ez([],eF(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,ez([],eF(i.map(function(t){return t[1]})),!1));return e&&(e.parsedStyle.defX=s,e.parsedStyle.defY=u),{points:i,totalLength:l,segments:o}}function p4(t,e){return[t.points,e.points,function(t){return t}]}function p6(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function p8(t){return t}var p9={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],p8],matrix3d:["NNNNNNNNNNNNNNNN",p8],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",p6([null,null,new f8(1)]),p8],scalex:["N",p6([null,new f8(1),new f8(1)]),p6([null,new f8(1)])],scaley:["N",p6([new f8(1),null,new f8(1)]),p6([new f8(1),null])],scalez:["N",p6([new f8(1),new f8(1),null])],scale3d:["NNN",p8],skew:["Aa",null,p8],skewx:["A",null,p6([null,f7])],skewy:["A",null,p6([f7,null])],translate:["Tt",p6([null,null,f9]),p8],translatex:["T",p6([null,f9,f9]),p6([null,f9])],translatey:["T",p6([f9,null,f9]),p6([f9,null])],translatez:["L",p6([f9,f9,null])],translate3d:["TTL",p8]};function p7(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=p9[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?f7:pj(t)},N:pF,T:p_,L:pM})[p.toUpperCase()](f):({a:f7,n:u[0],t:f9})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function ht(t){if("none"===(t=(t||"none").toLowerCase().trim()))return[];for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;(e=n.exec(t))&&e.index===i;){i=e.index+e[0].length;var o=e[1],a=p9[o];if(!a)break;var l=e[2].split(","),s=a[0];if(s.length<l.length)break;for(var u=[],c=0;c<s.length;c++){var f=l[c],p=s[c],h=void 0;if(void 0===(h=f?({A:function(t){return"0"===t.trim()?f7:pP(t)},N:pD,T:pS,L:pk})[p.toUpperCase()](f):({a:f7,n:u[0],t:f9})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function he(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=fk(pA(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return[Math.cos(i=fk(pA(t.d[0]))),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return[Math.cos(i=fk(pA(t.d[0]))),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value;var e,n,r,i=fk(pA(t.d[3])),o=e*e+n*n+r*r;if(0===o)e=1,n=0,r=0;else if(1!==o){var a=Math.sqrt(o);e/=a,n/=a,r/=a}var l=Math.sin(i/2),s=l*Math.cos(i/2),u=l*l;return[1-2*(n*n+r*r)*u,2*(e*n*u+r*s),2*(e*r*u-n*s),0,2*(e*n*u-r*s),1-2*(e*e+r*r)*u,2*(n*r*u+e*s),0,2*(e*r*u+n*s),2*(n*r*u-e*s),1-2*(e*e+n*n)*u,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var c=fk(pA(t.d[0]));return[1,Math.tan(fk(pA(t.d[1]))),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return[1,0,0,0,Math.tan(i=fk(pA(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=fk(pA(t.d[0]))),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=pN(t.d[0],0,null)||0,n=pN(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=pN(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=pN(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=pN(t.d[0],0,null)||0,1];case"translate3d":return e=pN(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=pN(t.d[1],0,null)||0,r=pN(t.d[2],0,null)||0,1];case"perspective":var f=pN(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,f?-1/f:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function hn(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function hr(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],o=[0,0,0,1];return!function(t,e,n,r,i,o){if(!(!function(t,e){var n=e[15];if(0===n)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}(fP,t)||(uf(fj,fP),fj[3]=0,fj[7]=0,fj[11]=0,fj[15]=1,1e-8>Math.abs(uv(fj))))){var a,l,s,u,c,f,p,h,d,y,g=fP[3],v=fP[7],b=fP[11],x=fP[12],O=fP[13],w=fP[14],E=fP[15];if(0!==g||0!==v||0!==b){if(fA[0]=g,fA[1]=v,fA[2]=b,fA[3]=E,!ug(fj,fj))return;uy(fj,fj),u9(i,fA,fj)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=fT,l=fP,a[0][0]=l[0],a[0][1]=l[1],a[0][2]=l[2],a[1][0]=l[4],a[1][1]=l[5],a[1][2]=l[6],a[2][0]=l[8],a[2][1]=l[9],a[2][2]=l[10],n[0]=s6(fT[0]),ur(fT[0],fT[0]),r[0]=ui(fT[0],fT[1]),fN(fT[1],fT[1],fT[0],1,-r[0]),n[1]=s6(fT[1]),ur(fT[1],fT[1]),r[0]/=n[1],r[1]=ui(fT[0],fT[2]),fN(fT[2],fT[2],fT[0],1,-r[1]),r[2]=ui(fT[1],fT[2]),fN(fT[2],fT[2],fT[1],1,-r[2]),n[2]=s6(fT[2]),ur(fT[2],fT[2]),r[1]/=n[2],r[2]/=n[2],s=fT[1],u=fT[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],fC[0]=f*y-p*d,fC[1]=p*h-c*y,fC[2]=c*d-f*h,0>ui(fT[0],fC))for(var k=0;k<3;k++)n[k]*=-1,fT[k][0]*=-1,fT[k][1]*=-1,fT[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+fT[0][0]-fT[1][1]-fT[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-fT[0][0]+fT[1][1]-fT[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-fT[0][0]-fT[1][1]+fT[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+fT[0][0]+fT[1][1]+fT[2][2],0)),fT[2][1]>fT[1][2]&&(o[0]=-o[0]),fT[0][2]>fT[2][0]&&(o[1]=-o[1]),fT[1][0]>fT[0][1]&&(o[2]=-o[2])}}(0===t.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(he).reduce(hn),e,n,r,i,o),[[e,n,r,o,i]]}var hi=function(){function t(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var o=0;o<4;o++)n[r][i]+=e[r][o]*t[o][i];return n}return function(e,n,r,i,o){for(var a,l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],s=0;s<4;s++)l[s][3]=o[s];for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[3][s]+=e[u]*l[u][s];var c=i[0],f=i[1],p=i[2],h=i[3],d=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];d[0][0]=1-2*(f*f+p*p),d[0][1]=2*(c*f-p*h),d[0][2]=2*(c*p+f*h),d[1][0]=2*(c*f+p*h),d[1][1]=1-2*(c*c+p*p),d[1][2]=2*(f*p-c*h),d[2][0]=2*(c*p-f*h),d[2][1]=2*(f*p+c*h),d[2][2]=1-2*(c*c+f*f),l=t(l,d);var y=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(y[2][1]=r[2],l=t(l,y)),r[1]&&(y[2][1]=0,y[2][0]=r[0],l=t(l,y)),r[0]&&(y[2][0]=0,y[1][0]=r[0],l=t(l,y));for(var s=0;s<3;s++)for(var u=0;u<3;u++)l[s][u]*=n[s];return 0==(a=l)[0][2]&&0==a[0][3]&&0==a[1][2]&&0==a[1][3]&&0==a[2][0]&&0==a[2][1]&&1==a[2][2]&&0==a[2][3]&&0==a[3][2]&&1==a[3][3]?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}}();function ho(t){return t.toFixed(6).replace(".000000","")}function ha(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=hr(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=hr(e)),null===n[0]||null===r[0])?[[!1],[!0],function(n){return n?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e);r=ch(r,-1,1);var i=[];if(1===r)i=t;else for(var o=Math.acos(r),a=+Math.sin(n*o)/Math.sqrt(1-r*r),l=0;l<4;l++)i.push(t[l]*(Math.cos(n*o)-r*a)+e[l]*a);return i}(n[0][3],r[0][3],t[5]);return hi(t[0],t[1],t[2],e,t[4]).map(ho).join(",")}])}function hl(t){return t.replace(/[xy]/,"")}function hs(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function hu(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=0;i<t.length;i++)!function(n){var r=t[n],i=r.t,o=r.d,a=+("scale"===i.substring(0,5));e.push({t:i,d:o.map(function(t){return"number"==typeof t?pl(a):pl(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=ha(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]]}else for(var i=0;i<t.length;i++){var u=t[i].t,c=e[i].t,f=t[i].d,p=e[i].d,h=p9[u],d=p9[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=ha([t[i]],[e[i]]);o.push(s[0]),a.push(s[1]),l.push(["matrix",[s[2]]]);continue}if(u===c)y=u;else if(h[2]&&d[2]&&hl(u)===hl(c))y=hl(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&hs(u)===hs(c))y=hs(u),f=h[1](f),p=d[1](p);else{var s=ha(t,e);o=[s[0]],a=[s[1]],l=[["matrix",[s[2]]]];break}for(var g=[],v=[],b=[],x=0;x<f.length;x++){var s=function(t,e,n,r,i){void 0===i&&(i=0);var o="",a=t.value||0,l=e.value||0,s=f6(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=fX(t.unit)):(f8.isLength(t.unit)||f8.isLength(e.unit))&&(a=pN(t,i,n),l=pN(e,i,n),o="px"),[a,l,function(t){return r&&(t=Math.max(t,0)),t+o}]}(f[x],p[x],n,!1,x);g[x]=s[0],v[x]=s[1],b.push(s[2])}o.push(g),a.push(v),l.push([y,b])}if(r){var O=o;o=a,a=O}return[o,a,function(t){return t.map(function(t,e){var n=t.map(function(t,n){return l[e][1][n](t)}).join(",");return"matrix"===l[e][0]&&16===n.split(",").length&&(l[e][0]="matrix3d"),"matrix3d"===l[e][0]&&6===n.split(",").length&&(l[e][0]="matrix"),l[e][0]+"("+n+")"}).join(" ")}]}var hc=fG(function(t){if(!cp(t))return[pl(t[0]||0,"px"),pl(t[1]||0,"px")];if("text-anchor"===t)return[pl(0,"px"),pl(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[p_(hp(e[0])),p_(hp(e[1]))]}),hf=function(t){if(!cp(t))return[pl(t[0]||0,"px"),pl(t[1]||0,"px")];if("text-anchor"===t)return[pl(0,"px"),pl(0,"px")];var e=t.split(" ");return(1===e.length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length)?null:[pS(hp(e[0])),pS(hp(e[1]))]};function hp(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var hh=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:t3.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:t3.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:t3.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:t3.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:t3.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:t3.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:t3.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:t3.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:t3.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:t3.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:t3.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:t3.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:t3.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:t3.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:t3.FILTER},{n:"clipPath",syntax:t3.DEFINED_PATH},{n:"textPath",syntax:t3.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:t3.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===tG.CIRCLE||t===tG.ELLIPSE?"center":t===tG.TEXT?"text-anchor":"left top"},l:!0,syntax:t3.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===tG.CIRCLE||t===tG.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:t3.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:t3.COORDINATE},{n:"cy",int:!0,d:"0",syntax:t3.COORDINATE},{n:"cz",int:!0,d:"0",syntax:t3.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:t3.COORDINATE},{n:"y",int:!0,d:"0",syntax:t3.COORDINATE},{n:"z",int:!0,d:"0",syntax:t3.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:t3.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:t3.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:t3.COORDINATE},{n:"y1",int:!0,l:!0,syntax:t3.COORDINATE},{n:"z1",int:!0,l:!0,syntax:t3.COORDINATE},{n:"x2",int:!0,l:!0,syntax:t3.COORDINATE},{n:"y2",int:!0,l:!0,syntax:t3.COORDINATE},{n:"z2",int:!0,l:!0,syntax:t3.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:t3.PATH,p:50},{n:"points",int:!0,l:!0,syntax:t3.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:t3.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:t3.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:t3.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:t3.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:t3.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:t3.NUMBER,d:function(t){return t===tG.PATH||t===tG.POLYGON||t===tG.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:t3.MARKER},{n:"markerEnd",syntax:t3.MARKER},{n:"markerMid",syntax:t3.MARKER},{n:"markerStartOffset",syntax:t3.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:t3.LENGTH,l:!0,int:!0,d:"0"}],hd=hh.filter(function(t){return!!t.l}).map(function(t){return t.n}),hy={},hg=new WeakMap,hm=function(t,e){var n=hg.get(t);return!n||0===n.length||n.includes(e)},hv=function(){function t(t){var e=this;this.runtime=t,hh.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){ez([t.n],eF(t.a||[]),!1).forEach(function(e){hy[e]=t})},t.prototype.unregisterMetadata=function(t){delete hy[t]},t.prototype.getPropertySyntax=function(t){return this.runtime.CSSPropertySyntaxFactory[t]},t.prototype.processProperties=function(t,e,n){var r=this;if(void 0===n&&(n={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(t.attributes,e);var i=Object.keys(e),o=t.parsedStyle.clipPath,a=t.parsedStyle.offsetPath;t.parsedStyle=Object.assign(t.parsedStyle,e);var l=!!n.forceUpdateGeometry;if(!l){for(var s=0;s<hd.length;s++)if(hd[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=pO(e.fill)),e.stroke&&(t.parsedStyle.stroke=pO(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=pO(e.shadowColor)),e.filter&&(t.parsedStyle.filter=pI(e.filter)),cf(e.radius)||(t.parsedStyle.radius=pT(e.radius,4)),cf(e.lineDash)||(t.parsedStyle.lineDash=pT(e.lineDash,2)),e.points&&(t.parsedStyle.points=p3(e.points,t)),""===e.path&&(t.parsedStyle.path=eN({},pu)),e.path&&(t.parsedStyle.path=p2(e.path),t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y),e.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},t,null),e.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,t,this.runtime),e.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",a,e.offsetPath,t,this.runtime),e.anchor&&(t.parsedStyle.anchor=pT(e.anchor,2)),e.transform&&(t.parsedStyle.transform=p7(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=hc(e.transformOrigin)),e.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(t.nodeName!==tG.CIRCLE&&t.nodeName!==tG.ELLIPSE||cf(e.cx)&&cf(e.cy))&&(t.nodeName!==tG.RECT&&t.nodeName!==tG.IMAGE&&t.nodeName!==tG.GROUP&&t.nodeName!==tG.HTML&&t.nodeName!==tG.TEXT&&t.nodeName!==tG.MESH||cf(e.x)&&cf(e.y)&&cf(e.z))&&(t.nodeName!==tG.LINE||cf(e.x1)&&cf(e.y1)&&cf(e.z1)&&cf(e.x2)&&cf(e.y2)&&cf(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),cf(e.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(t,i),e.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(t,i),e.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(t,i),cf(e.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(t,i),e.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(t,i),l&&this.updateGeometry(t);return}var u=n.skipUpdateAttribute,c=n.skipParse,f=n.forceUpdateGeometry,p=n.usedAttributes,h=n.memoize,d=f,y=Object.keys(e);y.forEach(function(n){var r;u||(t.attributes[n]=e[n]),!d&&(null==(r=hy[n])?void 0:r.l)&&(d=!0)}),c||y.forEach(function(e){t.computedStyle[e]=r.parseProperty(e,t.attributes[e],t,h)}),(null==p?void 0:p.length)&&(y=Array.from(new Set(y.concat(p)))),y.forEach(function(e){e in t.computedStyle&&(t.parsedStyle[e]=r.computeProperty(e,t.computedStyle[e],t,h))}),d&&this.updateGeometry(t),y.forEach(function(e){e in t.parsedStyle&&r.postProcessProperty(e,t,y)}),this.runtime.enableCSSParsing&&t.children.length&&y.forEach(function(e){e in t.parsedStyle&&r.isPropertyInheritable(e)&&t.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(t,e,n,r){var i=hy[t],o=e;if((""===e||cf(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=pr(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=pr(e):s&&(!r&&s.parserUnmemoize?o=s.parserUnmemoize(e,n):s.parser&&(o=s.parser(e,n)))}return o},t.prototype.computeProperty=function(t,e,n,r){var i=hy[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof fJ){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)cf(u)||(e=this.parseProperty(t,f2(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return cf(f)?void this.addUnresolveProperty(n,t):f}}var p=l&&this.getPropertySyntax(l);if(p&&p.calculator){var h=n.parsedStyle[t];a=p.calculator(t,h,e,n,this.runtime)}else a=e instanceof fJ?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=hy[t];if(r&&r.syntax){var i=r.syntax&&this.getPropertySyntax(r.syntax);i&&i.postProcessor&&i.postProcessor(e,n)}},t.prototype.addUnresolveProperty=function(t,e){var n=hg.get(t);n||(hg.set(t,[]),n=hg.get(t)),-1===n.indexOf(e)&&n.push(e)},t.prototype.tryToResolveProperty=function(t,e,n){if(void 0===n&&(n={}),n.inherited&&t.parentElement&&hm(t.parentElement,e)){var r=t.parentElement.parsedStyle[e];if("unset"!==r&&"initial"!==r&&"inherit"!==r)return r}},t.prototype.recalc=function(t){var e=hg.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),hg.delete(t)}},t.prototype.updateGeometry=function(t){var e=t.nodeName,n=this.runtime.geometryUpdaterFactory[e];if(n){var r=t.geometry;r.contentBounds||(r.contentBounds=new fL),r.renderBounds||(r.renderBounds=new fL);var i=t.parsedStyle,o=n.update(i,t),a=o.width,l=o.height,s=o.depth,u=o.offsetX,c=o.offsetY,f=o.offsetZ,p=[Math.abs(a)/2,Math.abs(l)/2,(void 0===s?0:s)/2],h=i.stroke,d=i.lineWidth,y=i.increasedLineWidthForHitTesting,g=i.shadowType,v=i.shadowColor,b=i.filter,x=i.transformOrigin,O=i.anchor;e===tG.TEXT?delete i.anchor:e===tG.MESH&&(i.anchor[2]=.5);var w=[(1-2*(O&&O[0]||0))*a/2+(void 0===u?0:u),(1-2*(O&&O[1]||0))*l/2+(void 0===c?0:c),(1-2*(O&&O[2]||0))*p[2]+(void 0===f?0:f)];r.contentBounds.update(w,p);var E=e===tG.POLYLINE||e===tG.POLYGON||e===tG.PATH?Math.SQRT2:.5;if(h&&!h.isNone){var k=((d||0)+(y||0))*E;p[0]+=k,p[1]+=k}if(r.renderBounds.update(w,p),v&&g&&"inner"!==g){var M=r.renderBounds,S=M.min,_=M.max,P=i.shadowBlur,j=i.shadowOffsetX,A=i.shadowOffsetY,T=P||0,C=j||0,N=A||0,L=S[0]-T+C,I=_[0]+T+C,R=S[1]-T+N,D=_[1]+T+N;S[0]=Math.min(S[0],L),_[0]=Math.max(_[0],I),S[1]=Math.min(S[1],R),_[1]=Math.max(_[1],D),r.renderBounds.setMinMax(S,_)}(void 0===b?[]:b).forEach(function(t){var e=t.name,n=t.params;if("blur"===e){var i=n[0].value;r.renderBounds.update(r.renderBounds.center,fx(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[i,i,0]))}else if("drop-shadow"===e){var o=n[0].value,a=n[1].value,l=n[2].value,s=r.renderBounds,u=s.min,c=s.max,f=u[0]-l+o,p=c[0]+l+o,h=u[1]-l+a,d=c[1]+l+a;u[0]=Math.min(u[0],f),c[0]=Math.max(c[0],p),u[1]=Math.min(u[1],h),c[1]=Math.max(c[1],d),r.renderBounds.setMinMax(u,c)}}),O=i.anchor;var F=a<0,B=l<0,z=(F?-1:1)*(x?pN(x[0],0,t):0),W=(B?-1:1)*(x?pN(x[1],1,t):0);z-=(F?-1:1)*(O&&O[0]||0)*r.contentBounds.halfExtents[0]*2,W-=(B?-1:1)*(O&&O[1]||0)*r.contentBounds.halfExtents[1]*2,t.setOrigin(z,W),this.runtime.sceneGraphService.dirtifyToRoot(t)}},t.prototype.updateSizeAttenuation=function(t,e){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=t.style.rawLineWidth/e,t.nodeName===tG.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=t.style.rawR/e)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===tG.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=hy[t];return!!e&&e.inh},t}(),hb=function(){function t(){this.parser=pj,this.parserUnmemoize=pP,this.parserWithCSSDisabled=null,this.mixer=pB}return t.prototype.calculator=function(t,e,n,r){return pA(n)},t}(),hx=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof fJ&&(n=null),i.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&i.sceneGraphService.dirtifyToRoot(t)}),n},t}(),hO=function(){function t(){this.parser=pO,this.parserWithCSSDisabled=pO,this.mixer=pw}return t.prototype.calculator=function(t,e,n,r){return n instanceof fJ?"none"===n.value?pi:po:n},t}(),hw=function(){function t(){this.parser=pI}return t.prototype.calculator=function(t,e,n){return n instanceof fJ?[]:n},t}();function hE(t){var e=t.parsedStyle.fontSize;return cf(e)?null:e}var hk=function(){function t(){this.parser=p_,this.parserUnmemoize=pS,this.parserWithCSSDisabled=null,this.mixer=pB}return t.prototype.calculator=function(t,e,n,r,i){if(cu(n))return n;if(!f8.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===tX.kPercentage)return 0;if(n.unit===tX.kEms){if(r.parentNode){var l=hE(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===tX.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=hE(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),hM=function(){function t(){this.mixer=pW}return t.prototype.parser=function(t){var e,n=pC(cu(t)?[t]:t);return 1===n.length?[n[0],n[0]]:[n[0],n[1]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),hS=function(){function t(){this.mixer=pW}return t.prototype.parser=function(t){var e,n=pC(cu(t)?[t]:t);return 1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]},t.prototype.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),h_=uu();function hP(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(t){var i=t.t,o=t.d;if("scale"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1];e.scaleLocal(a[0],a[1],1)}else if("scalex"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(a[0],1,1)}else if("scaley"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,a[0],1)}else if("scalez"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1];e.scaleLocal(1,1,a[0])}else if("scale3d"===i){var a=(null==o?void 0:o.map(function(t){return t.value}))||[1,1,1];e.scaleLocal(a[0],a[1],a[2])}else if("translate"===i){var l=o||[f9,f9];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[f9];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[f9];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[f9];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[f9,f9,f9];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[f7];e.rotateLocal(0,0,pA(s[0]))}else if("rotatex"===i){var s=o||[f7];e.rotateLocal(pA(s[0]),0,0)}else if("rotatey"===i){var s=o||[f7];e.rotateLocal(0,pA(s[0]),0)}else if("rotatez"===i){var s=o||[f7];e.rotateLocal(0,0,pA(s[0]))}else if("rotate3d"===i);else if("skew"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0,0];e.setLocalSkew(fk(u[0]),fk(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(fk(u[0]),e.getLocalSkew()[1])}else if("skewy"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],fk(u[0]))}else if("matrix"===i){var c=eF(o.map(function(t){return t.value}),6),f=c[0],p=c[1],h=c[2],d=c[3],y=c[4],g=c[5];e.setLocalTransform(uh(h_,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(uh.apply(ep,ez([h_],eF(o.map(function(t){return t.value})),!1)),h_[12]+=n,h_[13]+=r,e.setLocalTransform(h_))}),e.getLocalTransform()}var hj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case tG.CIRCLE:case tG.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;cf(a)||(n=a),cf(l)||(r=l),cf(s)||(i=s);break;case tG.LINE:var u=t.parsedStyle,c=u.x1,f=u.x2,p=Math.min(u.y1,u.y2);n=Math.min(c,f),r=p,i=0;break;case tG.RECT:case tG.IMAGE:case tG.GROUP:case tG.HTML:case tG.TEXT:case tG.MESH:cf(t.parsedStyle.x)||(n=t.parsedStyle.x),cf(t.parsedStyle.y)||(r=t.parsedStyle.y),cf(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==tG.PATH&&t.nodeName!==tG.POLYLINE&&t.nodeName!==tG.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!cf(n)||!cf(r)||!cf(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)hP(h,t);else{var d=eF(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(cf(n)?y:n,cf(r)?g:r,cf(i)?v:i)}}},e}(hk),hA=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof fJ&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),hT=function(){function t(){this.mixer=pB,this.parser=pF,this.parserUnmemoize=pD,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),hC=function(){function t(){this.parser=pF,this.parserUnmemoize=pD,this.parserWithCSSDisabled=null,this.mixer=pz(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t.prototype.postProcessor=function(t){var e=t.parsedStyle,n=e.offsetPath,r=e.offsetDistance;if(n){var i=n.nodeName;if(i===tG.LINE||i===tG.PATH||i===tG.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),hN=function(){function t(){this.parser=pF,this.parserUnmemoize=pD,this.parserWithCSSDisabled=null,this.mixer=pz(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),hL=function(){function t(){this.parser=p2,this.parserWithCSSDisabled=p2,this.mixer=p5}return t.prototype.calculator=function(t,e,n){return n instanceof fJ&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fF(0,0,0,0)}:n},t.prototype.postProcessor=function(t,e){if(t.parsedStyle.defX=t.parsedStyle.path.rect.x,t.parsedStyle.defY=t.parsedStyle.path.rect.y,t.nodeName===tG.PATH&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(void 0===r?0:r,void 0===i?0:i)}},t}(),hI=function(){function t(){this.parser=p3,this.mixer=p4}return t.prototype.postProcessor=function(t,e){if((t.nodeName===tG.POLYGON||t.nodeName===tG.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),hR=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.mixer=pz(0,1/0),e}return eC(e,t),e}(hk),hD=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof fJ)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),hF=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i=r.getAttribute("text");if(i){var o=i;"capitalize"===n.value?o=i.charAt(0).toUpperCase()+i.slice(1):"lowercase"===n.value?o=i.toLowerCase():"uppercase"===n.value&&(o=i.toUpperCase()),r.parsedStyle.text=o}return n.value},t}(),hB={},hz=0,hW="undefined"!=typeof window&&void 0!==window.document;function h$(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var o=i.childNodes||[];return o.indexOf(t)-o.indexOf(e)}}return n-r}function hG(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n;n=n.parentElement}while(null!==n);return null}function hH(t,e){if(hW)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var hV={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},hU="object"==typeof performance&&performance.now?performance:Date;function hq(t,e,n){var r=!1,i=!1,o=!!e&&!e.isNone,a=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=o,i=a):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:("visible"===t||"all"===t)&&(r=!0,i=!0),[r,i]}var hY=1,hX="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},hK=Date.now(),hZ={},hQ=Date.now(),hJ=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-hQ,r=hY++;return hZ[r]=t,Object.keys(hZ).length>1||setTimeout(function(){hQ=e;var t=hZ;hZ={},Object.keys(t).forEach(function(e){return t[e](hX.performance&&"function"==typeof hX.performance.now?hX.performance.now():Date.now()-hK)})},n>16?0:16-n),r},h0=function(t){return"string"!=typeof t?hJ:""===t?hX.requestAnimationFrame:hX[t+"RequestAnimationFrame"]},h1=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],function(t){return!!h0(t)}),h2=h0(h1),h5="string"!=typeof h1?function(t){delete hZ[t]}:""===h1?hX.cancelAnimationFrame:hX[h1+"CancelAnimationFrame"]||hX[h1+"CancelRequestAnimationFrame"];hX.requestAnimationFrame=h2,hX.cancelAnimationFrame=h5;var h3=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Promise.all(this.callbacks.map(function(e){return e.apply(void 0,ez([],eF(t),!1))}))},t}(),h4=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(t,e){this.callbacks.push(e)},t.prototype.promise=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return eI(this,void 0,void 0,function(){var e,n,r;return eR(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,ez([],eF(t),!1))];case 1:e=i.sent(),n=0,i.label=2;case 2:if(!(n<this.callbacks.length-1))return[3,5];return[4,(0,this.callbacks[n])(e)];case 3:e=i.sent(),i.label=4;case 4:return n++,[3,2];case 5:return[2,e];case 6:return[2,null]}})})},t}(),h6=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){var t=arguments;this.callbacks.forEach(function(e){e.apply(void 0,t)})},t}(),h8=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(t,e){this.callbacks.push(e)},t.prototype.call=function(){if(this.callbacks.length){for(var t=arguments,e=this.callbacks[0].apply(void 0,t),n=0;n<this.callbacks.length-1;n++)e=(0,this.callbacks[n])(e);return e}return null},t}(),h9=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],h7=/([\"\'])[^\'\"]+\1/,dt=function(){function t(){this.parser=p7,this.parserUnmemoize=ht,this.parserWithCSSDisabled=ht,this.mixer=hu}return t.prototype.calculator=function(t,e,n,r){return n instanceof fJ?[]:n},t.prototype.postProcessor=function(t){hP(t.parsedStyle.transform,t)},t}(),de=function(){function t(){this.parser=pF,this.parserUnmemoize=pD}return t.prototype.calculator=function(t,e,n,r){return n.value},t.prototype.postProcessor=function(t){if(t.parentNode){var e=t.parentNode,n=e.renderable,r=e.sortable;n&&(n.dirty=!0),r&&(r.dirty=!0,r.dirtyReason=t5.Z_INDEX_CHANGED)}},t}(),dn=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),dr=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),di=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,i=t.y2,o=Math.min(e,r),a=Math.min(n,i);return{width:Math.max(e,r)-o,height:Math.max(n,i)-a}},t}(),da=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),dl=function(){function t(){}return t.prototype.update=function(t){if(t.points&&cj(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,ez([],eF(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,ez([],eF(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,ez([],eF(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,ez([],eF(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),ds=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,o=void 0===r?0:r,a=void 0===i?0:i;return n&&!cp(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),du=function(){function t(t){this.globalRuntime=t}return t.prototype.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,o=t.fontSize,a=t.fontStyle,l=t.fontWeight,s=t.fontVariant,u=t.lineWidth;return n&&o&&a&&l&&s&&r&&i&&!cf(u)},t.prototype.update=function(t,e){var n,r,i=t.text,o=t.textAlign,a=t.lineWidth,l=t.textBaseline,s=t.dx,u=t.dy;if(!this.isReadyToMeasure(t,e))return t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var c=((null==(r=null==(n=null==e?void 0:e.ownerDocument)?void 0:n.defaultView)?void 0:r.getConfig())||{}).offscreenCanvas,f=this.globalRuntime.textService.measureText(i,t,c);t.metrics=f;var p=f.width,h=f.height,d=f.lineHeight,y=f.fontProperties,g=[p/2,h/2,0],v=[0,1],b=0;"center"===o||"middle"===o?(b=a/2,v=[.5,1]):("right"===o||"end"===o)&&(b=a,v=[1,1]);var x=0;return"middle"===l?x=g[1]:"top"===l||"hanging"===l?x=2*g[1]:"alphabetic"===l?x=this.globalRuntime.enableCSSParsing?d-y.ascent:0:("bottom"===l||"ideographic"===l)&&(x=0),s&&(b+=s),u&&(x+=u),t.anchor=[v[0],v[1],0],{width:2*g[0],height:2*g[1],offsetX:b,offsetY:x}},t}(),dc=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new fD,this.page=new fD,this.canvas=new fD,this.viewport=new fD,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw Error(fB)},t}(),df=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.client=new fD,e.movement=new fD,e.offset=new fD,e.global=new fD,e.screen=new fD,e}return eC(e,t),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.prototype.initMouseEvent=function(){throw Error(fB)},e}(dc),dp=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return eC(e,t),e.prototype.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.prototype.getPredictedEvents=function(){throw Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(df),dh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(df),dd=function(t){function e(e,n){var r=t.call(this,null)||this;return r.type=e,r.detail=n,Object.assign(r,n),r}return eC(e,t),e}(dc),dy=function(){function t(){this.emitter=new s2}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=cF(n)&&n||cB(n)&&n.capture,i=cB(n)&&n.once,o=f2(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=eF(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=f2(e)?e:e.handleEvent,a){var c=e;e=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];(null==(t=e[0].target)?void 0:t.name)===l&&c.apply(void 0,ez([],eF(e),!1))}}return i?this.emitter.once(t,e,o):this.emitter.on(t,e,o),this},t.prototype.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(t,e,n){var r=cF(n)&&n||cB(n)&&n.capture,i=f2(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=f2(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new dd(t,e))},t.prototype.dispatchEvent=function(t,e){var n,r,i;if(void 0===e&&(e=!1),!t.type)throw Error("DisplayObject cannot propagate events outside of the Federated Events API");if(i=this.document?this:this.defaultView?this.defaultView:null==(n=this.ownerDocument)?void 0:n.defaultView){if(t.manager=i.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null==(r=t.manager)||r.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),dg=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.parentNode=null,e}return eC(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===tG.TEXT&&(n+=this.style.text);try{for(var r=eD(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===tG.TEXT?n+=o.nodeValue:n+=o.textContent}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}return n},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===tG.TEXT&&(this.style.text="".concat(t))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(t){return(void 0===t&&(t={}),this.parentNode)?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(t){throw Error(fB)},e.prototype.lookupNamespaceURI=function(t){throw Error(fB)},e.prototype.lookupPrefix=function(t){throw Error(fB)},e.prototype.normalize=function(){throw Error(fB)},e.prototype.isEqualNode=function(t){return this===t},e.prototype.isSameNode=function(t){return this.isEqualNode(t)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(t){if(t===this)return 0;for(var n,r=t,i=this,o=[r],a=[i];null!=(n=r.parentNode)?n:i.parentNode;)r=r.parentNode?(o.push(r.parentNode),r.parentNode):r,i=i.parentNode?(a.push(i.parentNode),i.parentNode):i;if(r!==i)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var l=o.length>a.length?o:a,s=l===o?a:o;if(l[l.length-s.length]===s[0])return l===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-s.length,c=s.length-1;c>=0;c--){var f=s[c],p=l[u+c];if(p!==f){var h=f.parentNode.childNodes;if(h.indexOf(f)<h.indexOf(p))if(s===o)return e.DOCUMENT_POSITION_PRECEDING;else break;if(l===o)return e.DOCUMENT_POSITION_PRECEDING;break}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(t){return this.contains(t)},e.prototype.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},e.prototype.getAncestor=function(t){for(var e=this;t>0&&e;)e=e.parentNode,t--;return e},e.prototype.forEach=function(t,e){void 0===e&&(e=!1),t(this)||(e?this.childNodes.slice():this.childNodes).forEach(function(e){e.forEach(t)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(dy),dm=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new s2,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=uu(),this.tmpVec3=s3(),this.onPointerDown=function(t){var e=n.createPointerEvent(t);if(n.dispatchEvent(e,"pointerdown"),"touch"===e.pointerType)n.dispatchEvent(e,"touchstart");else if("mouse"===e.pointerType||"pen"===e.pointerType){var r=2===e.button;n.dispatchEvent(e,r?"rightdown":"mousedown")}n.trackingData(t.pointerId).pressTargetsByButton[t.button]=e.composedPath(),n.freeEvent(e)},this.onPointerUp=function(t){var e,r=hU.now(),i=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(i,"pointerup"),"touch"===i.pointerType)n.dispatchEvent(i,"touchend");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.dispatchEvent(i,o?"rightup":"mouseup")}var a=n.trackingData(t.pointerId),l=n.findMountedTarget(a.pressTargetsByButton[t.button]),s=l;if(l&&!i.composedPath().includes(l)){for(var u=l;u&&!i.composedPath().includes(u);){if(i.currentTarget=u,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType)n.notifyTarget(i,"touchendoutside");else if("mouse"===i.pointerType||"pen"===i.pointerType){var o=2===i.button;n.notifyTarget(i,o?"rightupoutside":"mouseupoutside")}dg.isNode(u)&&(u=u.parentNode)}delete a.pressTargetsByButton[t.button],s=u}if(s){var c=n.clonePointerEvent(i,"click");c.target=s,c.path=[],a.clicksByButton[t.button]||(a.clicksByButton[t.button]={clickCount:0,target:c.target,timeStamp:r});var f=a.clicksByButton[t.button];f.target===c.target&&r-f.timeStamp<200?++f.clickCount:f.clickCount=1,f.target=c.target,f.timeStamp=r,c.detail=f.clickCount,(null==(e=i.detail)?void 0:e.preventClick)||(n.context.config.useNativeClickEvent||"mouse"!==c.pointerType&&"touch"!==c.pointerType||n.dispatchEvent(c,"click"),n.dispatchEvent(c,"pointertap")),n.freeEvent(c)}n.freeEvent(i)},this.onPointerMove=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),r="mouse"===e.pointerType||"pen"===e.pointerType,i=n.trackingData(t.pointerId),o=n.findMountedTarget(i.overTargets);if(i.overTargets&&o!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",l=n.createPointerEvent(t,a,o||void 0);if(n.dispatchEvent(l,"pointerout"),r&&n.dispatchEvent(l,"mouseout"),!e.composedPath().includes(o)){var s=n.createPointerEvent(t,"pointerleave",o||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!e.composedPath().includes(s.target);)s.currentTarget=s.target,n.notifyTarget(s),r&&n.notifyTarget(s,"mouseleave"),dg.isNode(s.target)&&(s.target=s.target.parentNode);n.freeEvent(s)}n.freeEvent(l)}if(o!==e.target){var u="mousemove"===t.type?"mouseover":"pointerover",c=n.clonePointerEvent(e,u);n.dispatchEvent(c,"pointerover"),r&&n.dispatchEvent(c,"mouseover");for(var f=o&&dg.isNode(o)&&o.parentNode;f&&f!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode)){var p=n.clonePointerEvent(e,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==o&&p.target!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),dg.isNode(p.target)&&(p.target=p.target.parentNode);n.freeEvent(p)}n.freeEvent(c)}n.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&n.dispatchEvent(e,"touchmove"),r&&(n.dispatchEvent(e,"mousemove"),n.cursor=n.getCursor(e.target)),i.overTargets=e.composedPath(),n.freeEvent(e)},this.onPointerOut=function(t){var e=n.trackingData(t.pointerId);if(e.overTargets){var r="mouse"===t.pointerType||"pen"===t.pointerType,i=n.findMountedTarget(e.overTargets),o=n.createPointerEvent(t,"pointerout",i||void 0);n.dispatchEvent(o),r&&n.dispatchEvent(o,"mouseout");var a=n.createPointerEvent(t,"pointerleave",i||void 0);for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),dg.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,n.freeEvent(o),n.freeEvent(a)}n.cursor=null},this.onPointerOver=function(t){var e=n.trackingData(t.pointerId),r=n.createPointerEvent(t),i="mouse"===r.pointerType||"pen"===r.pointerType;n.dispatchEvent(r,"pointerover"),i&&n.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(n.cursor=n.getCursor(r.target));var o=n.clonePointerEvent(r,"pointerenter");for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(dg.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),dg.isNode(o.target)&&(o.target=o.target.parentNode);e.overTargets=r.composedPath(),n.freeEvent(r),n.freeEvent(o)},this.onPointerUpOutside=function(t){var e=n.trackingData(t.pointerId),r=n.findMountedTarget(e.pressTargetsByButton[t.button]),i=n.createPointerEvent(t);if(r){for(var o=r;o;)i.currentTarget=o,n.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||("mouse"===i.pointerType||"pen"===i.pointerType)&&n.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),dg.isNode(o)&&(o=o.parentNode);delete e.pressTargetsByButton[t.button]}n.freeEvent(i)},this.onWheel=function(t){var e=n.createWheelEvent(t);n.dispatchEvent(e),n.freeEvent(e)},this.onClick=function(t){if(n.context.config.useNativeClickEvent){var e=n.createPointerEvent(t);n.dispatchEvent(e),n.freeEvent(e)}},this.onPointerCancel=function(t){var e=n.createPointerEvent(t,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(e),n.freeEvent(e)}}return t.prototype.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new fD(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},t.prototype.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new fD(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},t.prototype.viewport2Canvas=function(t){var e=t.x,n=t.y,r=this.rootTarget.defaultView.getCamera(),i=this.context.config,o=i.width,a=i.height,l=r.getPerspectiveInverse(),s=r.getWorldTransform(),u=ub(this.tmpMatrix,s,l),c=s7(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return ua(c,c,u),new fD(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=ub(this.tmpMatrix,n,r),o=s7(this.tmpVec3,t.x,t.y,0);ua(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new fD((o[0]+1)/2*l,(1-(o[1]+1)/2)*s)},t.prototype.setPickHandler=function(t){this.pickHandler=t},t.prototype.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},t.prototype.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}},t.prototype.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,t.currentTarget=this.rootTarget.defaultView||null,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},t.prototype.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var r=i+1;r<n.length;r++)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)return e.unshift(n.document),e;for(var r=0;r<2048&&t!==this.rootTarget;r++)dg.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);return n&&e.push(n),e},t.prototype.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,o=r.height,a=r.disableHitTesting;return e<0||n<0||e>i||n>o?null:!a&&this.pickHandler(t)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(t){var e,n=this.context.contextService.getDomElement(),r=null==(e=t.nativeEvent)?void 0:e.target;if(r){if(r===n)return!0;if(n&&n.contains)return n.contains(r)}return!!t.nativeEvent.composedPath&&t.nativeEvent.composedPath().indexOf(n)>-1},t.prototype.getExistedHTML=function(t){var e,n;if(t.nativeEvent.composedPath)try{for(var r=eD(t.nativeEvent.composedPath()),i=r.next();!i.done;i=r.next()){var o=i.value,a=this.nativeHTMLMap.get(o);if(a)return a}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}return null},t.prototype.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},t.prototype.createPointerEvent=function(t,e,n,r){var i=this.allocateEvent(dp);this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.nativeEvent=t.nativeEvent,i.originalEvent=t;var o=this.getExistedHTML(i);return i.target=null!=n?n:o||this.isNativeEventFromCanvas(i)&&this.pickTarget(i)||r,"string"==typeof e&&(i.type=e),i},t.prototype.createWheelEvent=function(t){var e=this.allocateEvent(dh);this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t;var n=this.getExistedHTML(e);return e.target=n||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},t.prototype.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},t.prototype.cloneWheelEvent=function(t){var e=this.allocateEvent(dh);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},t.prototype.clonePointerEvent=function(t,e){var n=this.allocateEvent(dp);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},t.prototype.copyPointerData=function(t,e){e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist},t.prototype.copyMouseData=function(t,e){e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset)},t.prototype.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},t.prototype.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=hU.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},t.prototype.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var e=this.eventPool.get(t).pop()||new t(this);return e.eventPhase=e.NONE,e.currentTarget=null,e.path=[],e.target=null,e},t.prototype.freeEvent=function(t){if(t.manager!==this)throw Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},t.prototype.notifyTarget=function(t,e){e=null!=e?e:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(e,"capture"):e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},t.prototype.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},t.prototype.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;n>=0;n--){var r=t[n];if(r===this.rootTarget||dg.isNode(r)&&r.parentNode===e)e=t[n];else break}return e},t.prototype.getCursor=function(t){for(var e=t;e;){var n=!!e.getAttribute&&e.getAttribute("cursor");if(n)return n;e=dg.isNode(e)&&e.parentNode}},t}(),dv=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||dT.offscreenCanvas)this.canvas=t||dT.offscreenCanvas,this.context=this.canvas.getContext("2d",eN({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",eN({willReadFrequently:!0},e)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",eN({willReadFrequently:!0},e))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}();(M=t4||(t4={}))[M.CAMERA_CHANGED=0]="CAMERA_CHANGED",M[M.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",M[M.NONE=2]="NONE";var db=function(){function t(t,e){this.globalRuntime=t,this.context=e,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new h6,initAsync:new h3,dirtycheck:new h8,cull:new h8,beginFrame:new h6,beforeRender:new h6,render:new h6,afterRender:new h6,endFrame:new h6,destroy:new h6,pick:new h4,pickSync:new h8,pointerDown:new h6,pointerUp:new h6,pointerMove:new h6,pointerOut:new h6,pointerOver:new h6,pointerWheel:new h6,pointerCancel:new h6,click:new h6}}return t.prototype.init=function(t){var e=this,n=eN(eN({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(t){t.apply(n,e.globalRuntime)}),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){e.inited=!0,t()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(t4.CAMERA_CHANGED)},t.prototype.render=function(t,e){var n=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var r=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited){r.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var i=1===r.renderReasons.size&&r.renderReasons.has(t4.CAMERA_CHANGED),o=!t.disableRenderHooks||!(t.disableRenderHooks&&i);o&&this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),o&&r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e()}},t.prototype.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),o=i.enableDirtyCheck,a=i.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(t);var l=t.renderable,s=o?l.dirty||n.dirtyRectangleRenderingDisabled?t:null:t;if(s){var u=a?this.hooks.cull.call(s,this.context.camera):s;u&&(this.stats.rendered++,n.renderListCurrentFrame.push(u))}t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var c=t.sortable;c.dirty&&(this.sort(t,c),c.dirty=!1,c.dirtyChildren=[],c.dirtyReason=void 0),(c.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)})},t.prototype.sort=function(t,e){e.sorted&&e.dirtyReason!==t5.Z_INDEX_CHANGED?e.dirtyChildren.forEach(function(n){if(-1===t.childNodes.indexOf(n)){var r=e.sorted.indexOf(n);r>=0&&e.sorted.splice(r,1)}else if(0===e.sorted.length)e.sorted.push(n);else{var i=function(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;0>h$(t[i],e)?n=i+1:r=i}return n}(e.sorted,n);e.sorted.splice(i,0,n)}}):e.sorted=t.childNodes.slice().sort(h$)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(t4.DISPLAY_OBJECT_CHANGED)},t}(),dx=/\[\s*(.*)=(.*)\s*\]/,dO=function(){function t(){}return t.prototype.selectOne=function(t,e){var n=this;if(t.startsWith("."))return e.find(function(e){return((null==e?void 0:e.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.find(function(e){return e.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.find(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.find(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):null},t.prototype.selectAll=function(t,e){var n=this;if(t.startsWith("."))return e.findAll(function(r){return e!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(t))>-1});if(t.startsWith("#"))return e.findAll(function(r){return e!==r&&r.id===n.getIdOrClassname(t)});if(!t.startsWith("["))return e.findAll(function(n){return e!==n&&n.nodeName===t});var r=this.getAttribute(t),i=r.name,o=r.value;return i?e.findAll(function(t){return e!==t&&("name"===i?t.name===o:n.attributeToString(t,i)===o)}):[]},t.prototype.is=function(t,e){if(t.startsWith("."))return e.className===this.getIdOrClassname(t);if(t.startsWith("#"))return e.id===this.getIdOrClassname(t);if(!t.startsWith("["))return e.nodeName===t;var n=this.getAttribute(t),r=n.name,i=n.value;return"name"===r?e.name===i:this.attributeToString(e,r)===i},t.prototype.getIdOrClassname=function(t){return t.substring(1)},t.prototype.getAttribute=function(t){var e=t.match(dx),n="",r="";return e&&e.length>2&&(n=e[1].replace(/"/g,""),r=e[2].replace(/"/g,"")),{name:n,value:r}},t.prototype.attributeToString=function(t,e){if(!t.getAttribute)return"";var n=t.getAttribute(e);return cf(n)?"":n.toString?n.toString():""},t}(),dw=function(t){function e(e,n,r,i,o,a,l,s){var u=t.call(this,null)||this;return u.relatedNode=n,u.prevValue=r,u.newValue=i,u.attrName=o,u.attrChange=a,u.prevParsedValue=l,u.newParsedValue=s,u.type=e,u}return eC(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(dc);function dE(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(S=t6||(t6={})).REPARENT="reparent",S.DESTROY="destroy",S.ATTR_MODIFIED="DOMAttrModified",S.INSERTED="DOMNodeInserted",S.REMOVED="removed",S.MOUNTED="DOMNodeInsertedIntoDocument",S.UNMOUNTED="DOMNodeRemovedFromDocument",S.BOUNDS_CHANGED="bounds-changed",S.CULLED="culled";var dk=new dw(t6.REPARENT,null,"","","",0,"",""),dM=function(){function t(t){var e,n,r,i,o,a,l,s,u,c,f,p,h=this;this.runtime=t,this.pendingEvents=[],this.boundsChangedEvent=new dd(t6.BOUNDS_CHANGED),this.rotate=(e=u7(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=s8(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=u7();cr(a,n[0],n[1],n[2]);var l=h.getRotation(t);co(e,h.getRotation(t.parentNode)),cn(e,e),ce(a,e,a),ce(o.localRotation,a,l),ca(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=u7(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=s8(e,r,i));var o=t.transformable;cr(n,e[0],e[1],e[2]),ce(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=u7(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=s8(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){cr(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);co(r,cn(u7(),a)),ce(o.localRotation,o.localRotation,r),h.dirtifyLocal(t,o)}else h.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=s8(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;ul(e,s3())||(i=e,o=e,l=(a=E.localRotation)[0],s=a[1],u=a[2],c=a[3],f=o[0],p=o[1],y=s*(d=o[2])-u*p,g=u*f-l*d,v=l*p-s*f,b=s*v-u*g,x=u*y-l*v,O=l*g-s*y,y*=w=2*c,g*=w,v*=w,b*=2,x*=2,O*=2,i[0]=f+y+b,i[1]=p+g+x,i[2]=d+v+O,ut(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=uu(),o=s3(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,ul(h.getPosition(t),o)||(s9(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(uf(i,t.parentNode.transformable.worldTransform),ug(i,i),ua(n.localPosition,o,i)):s9(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=s3(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,ul(n.localPosition,a)||(s9(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=s3(),s=s3(),u=s3(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=s7(s,e,n,r)),ul(e,l)||(ut(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=u7();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=ci(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(co(t,h.getRotation(e.parentNode)),cn(t,t),ce(a.localRotation,t,n),ca(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=uu(),f=s3(),p=ci(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(uF(t.localTransform,t.localRotation,t.localPosition,s8(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=ud(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),ub(t.localTransform,t.localTransform,e)}var n=uF(c,p,f,t.localScale,t.origin);ub(t.localTransform,t.localTransform,n)}else uF(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)})}return t.prototype.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},t.prototype.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},t.prototype.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},t.prototype.attach=function(t,e,n){var r,i,o=!1;t.parentNode&&(o=t.parentNode!==e,this.detach(t)),t.parentNode=e,cf(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);var a=e.sortable;((null==(r=null==a?void 0:a.sorted)?void 0:r.length)||(null==(i=t.style)?void 0:i.zIndex))&&(-1===a.dirtyChildren.indexOf(t)&&a.dirtyChildren.push(t),a.dirty=!0,a.dirtyReason=t5.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(dk)},t.prototype.detach=function(t){var e,n;if(t.parentNode){var r=t.transformable,i=t.parentNode.sortable;((null==(e=null==i?void 0:i.sorted)?void 0:e.length)||(null==(n=t.style)?void 0:n.zIndex))&&(-1===i.dirtyChildren.indexOf(t)&&i.dirtyChildren.push(t),i.dirty=!0,i.dirtyReason=t5.REMOVED);var o=t.parentNode.childNodes.indexOf(t);o>-1&&t.parentNode.childNodes.splice(o,1),r&&this.dirtifyWorld(t,r),t.parentNode=null}},t.prototype.getOrigin=function(t){return t.transformable.origin},t.prototype.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=[e,n,r]);var i=t.transformable;if(e[0]!==i.origin[0]||e[1]!==i.origin[1]||e[2]!==i.origin[2]){var o=i.origin;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,this.dirtifyLocal(t,i)}},t.prototype.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=s8(e,n,r));var i=t.transformable;cr(i.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,i)},t.prototype.scaleLocal=function(t,e){var n,r,i,o=t.transformable;n=o.localScale,r=o.localScale,i=s8(e[0],e[1],e[2]||1),n[0]=r[0]*i[0],n[1]=r[1]*i[1],n[2]=r[2]*i[2],this.dirtifyLocal(t,o)},t.prototype.setLocalScale=function(t,e){var n=t.transformable,r=s8(e[0],e[1],e[2]||n.localScale[2]);ul(r,n.localScale)||(s9(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=ci(e,n,r,i));var o=t.transformable;co(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new s5(2))[0]=r,i[1]=n,e=i);var r,i,o,a,l=t.transformable;o=l.localSkew,a=e,o[0]=a[0],o[1]=a[1],this.dirtifyLocal(t,l)},t.prototype.dirtifyLocal=function(t,e){!e.localDirtyFlag&&(e.localDirtyFlag=!0,e.dirtyFlag||this.dirtifyWorld(t,e))},t.prototype.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},t.prototype.triggerPendingEvents=function(){var t=this,e=new Set,n=function(n,r){n.isConnected&&!e.has(n.entity)&&(t.boundsChangedEvent.detail=r,t.boundsChangedEvent.target=n,n.isMutationObserved?n.dispatchEvent(t.boundsChangedEvent):n.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),e.add(n.entity))};this.pendingEvents.forEach(function(t){var e=eF(t,2),r=e[0],i=e[1];i.affectChildren?r.forEach(function(t){n(t,i)}):n(r,i)}),this.clearPendingEvents(),e.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)dE(n),n=n.parentNode;e&&t.forEach(function(t){dE(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},t.prototype.updateDisplayObjectDependency=function(t,e,n,r){if(e&&e!==n){var i=this.displayObjectDependencyMap.get(e);if(i&&i[t]){var o=i[t].indexOf(r);i[t].splice(o,1)}}if(n){var a=this.displayObjectDependencyMap.get(n);a||(this.displayObjectDependencyMap.set(n,{}),a=this.displayObjectDependencyMap.get(n)),a[t]||(a[t]=[]),a[t].push(r)}},t.prototype.informDependentDisplayObjects=function(t){var e=this,n=this.displayObjectDependencyMap.get(t);n&&Object.keys(n).forEach(function(t){n[t].forEach(function(n){e.dirtifyToRoot(n,!0),n.dispatchEvent(new dw(t6.ATTR_MODIFIED,n,e,e,t,dw.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return uL(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return uR(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return uI(e.scaling,this.getWorldTransform(t,e))},t.prototype.getWorldTransform=function(t,e){return void 0===e&&(e=t.transformable),(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},t.prototype.getLocalPosition=function(t){return t.transformable.localPosition},t.prototype.getLocalRotation=function(t){return t.transformable.localRotation},t.prototype.getLocalScale=function(t){return t.transformable.localScale},t.prototype.getLocalSkew=function(t){return t.transformable.localSkew},t.prototype.getLocalTransform=function(t){var e=t.transformable;return e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.localTransform},t.prototype.setLocalTransform=function(t,e){var n=uL(s3(),e),r=uR(u7(),e),i=uI(s3(),e);this.setLocalScale(t,i),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},t.prototype.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},t.prototype.getTransformedGeometryBounds=function(t,e,n){void 0===e&&(e=!1);var r=this.getGeometryBounds(t,e);if(fL.isEmpty(r))return null;var i=n||new fL;return i.setFromTransformedAABB(r,this.getWorldTransform(t)),i},t.prototype.getGeometryBounds=function(t,e){void 0===e&&(e=!1);var n=t.geometry;return(e?n.renderBounds:n.contentBounds||null)||new fL},t.prototype.getBounds=function(t,e){var n=this;void 0===e&&(e=!1);var r=t.renderable;if(!r.boundsDirty&&!e&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&e&&r.renderBounds)return r.renderBounds;var i=e?r.renderBounds:r.bounds,o=this.getTransformedGeometryBounds(t,e,i);if(t.childNodes.forEach(function(t){var r=n.getBounds(t,e);r&&(o?o.add(r):(o=i||new fL).update(r.center,r.halfExtents))}),e){var a=hG(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new fL),o&&(e?r.renderBounds=o:r.bounds=o),e?r.renderBoundsDirty=!1:r.boundsDirty=!1,o},t.prototype.getLocalBounds=function(t){if(t.parentNode){var e=uu();t.parentNode.transformable&&(e=ug(uu(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!fL.isEmpty(n)){var r=new fL;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);fL.isEmpty(i)||(r=new fL).setFromTransformedAABB(i,this.getWorldTransform(t));var o=null==(n=null==(e=t.ownerDocument)?void 0:e.defaultView)?void 0:n.getContextService().getBoundingClientRect();if(r){var a=eF(r.getMin(),2),l=a[0],s=a[1],u=eF(r.getMax(),2),c=u[0],f=u[1];return new fF(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new fF((null==o?void 0:o.left)||0,(null==o?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(t,e){var n=this;if(!e.dirtyFlag){e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)});var r=t.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0,r.dirty=!0)}},t.prototype.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},t.prototype.sync=function(t,e){if(e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag){var n=t.parentNode,r=n&&n.transformable;null!==n&&r?ub(e.worldTransform,r.worldTransform,e.localTransform):uf(e.worldTransform,e.localTransform),e.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),dS={MetricsString:"|\xc9q\xc5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},d_=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,dP=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),dj=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),dA=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(dj.exec(n)||dP.exec(t)))},this.trimByKinsokuShorui=function(t){var e=ez([],eF(t),!1),n=e[e.length-2];if(!n)return t;var r=n[n.length-1];return e[e.length-2]=n.slice(0,-1),e[e.length-1]=r+e[e.length-1],e}}return t.prototype.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(e),i=this.runtime.offscreenCanvasCreator.getOrCreateContext(e,{willReadFrequently:!0});i.font=t;var o=dS.MetricsString+dS.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(dS.BaselineSymbol).width),s=dS.HeightMultiplier*l;l=l*dS.BaselineMultiplier|0,r.width=a,r.height=s,i.fillStyle="#f00",i.fillRect(0,0,a,s),i.font=t,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,l);var u=i.getImageData(0,0,a||1,s||1).data,c=u.length,f=4*a,p=0,h=0,d=!1;for(p=0;p<l;++p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h+=f}for(n.ascent=l-p,h=c-f,d=!1,p=s;p>l;--p){for(var y=0;y<f;y+=4)if(255!==u[h+y]){d=!0;break}if(d)break;h-=f}return n.descent=p-l,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n,n},t.prototype.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,o=e.lineHeight,a=e.lineWidth,l=e.textBaseline,s=e.textAlign,u=e.letterSpacing,c=e.textPath;e.textPathSide,e.textPathStartOffset;var f=e.leading,p=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=cu(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!h7.test(u)&&0>h9.indexOf(u)&&(u='"'.concat(u,'"')),l[s]=u}return"".concat(r," ").concat(i," ").concat(o," ").concat(a," ").concat(l.join(","))}(e),d=this.measureFont(h,n);0===d.fontSize&&(d.fontSize=r,d.ascent=r);var y=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);y.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=Array(g.length),b=0;if(c){c.getTotalLength();for(var x=0;x<g.length;x++)var O=y.measureText(g[x]).width+(g[x].length-1)*u}else{for(var x=0;x<g.length;x++){var w=y.measureText(g[x]).width+(g[x].length-1)*u;v[x]=w,b=Math.max(b,w)}var O=b+a,E=o||d.fontSize+a,k=Math.max(E,d.fontSize+a)+(g.length-1)*(E+p);E+=p;var M=0;return"middle"===l?M=-k/2:"bottom"===l||"alphabetic"===l||"ideographic"===l?M=-k:("top"===l||"hanging"===l)&&(M=0),{font:h,width:O,height:k,lines:g,lineWidths:v,lineHeight:E,maxLineWidth:b,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===s||"middle"===s?n-=t/2:("right"===s||"end"===s)&&(n-=t),new fF(n-a/2,M+e*E,t+a,E)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(t,e,n){var r=this,i=e.wordWrapWidth,o=e.letterSpacing,a=e.maxLines,l=void 0===a?1/0:a,s=e.textOverflow,u=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),c=(void 0===i?0:i)+o,f="";"ellipsis"===s?f="...":s&&"clip"!==s&&(f=s);for(var p=[],h=0,d=0,y={},g=function(t){return r.getFromCache(t,o,y,u)},v=Array.from(f).reduce(function(t,e){return t+g(e)},0),b=Array.from(t),x=0;x<b.length;x++){var O=b[x],w=t[x-1],E=t[x+1],k=g(O);if(this.isNewline(O)){if(++h>=l){e.isOverflowing=!0;break}d=0,p[h]="";continue}if(d>0&&d+k>c){if(h+1>=l){if(e.isOverflowing=!0,v>0&&v<=c){for(var M=p[h].length,S=0,_=M,P=0;P<M;P++){var j=g(p[h][P]);if(S+j+v>c){_=P;break}S+=j}p[h]=(p[h]||"").slice(0,_)+f}break}if(d=0,p[++h]="",this.isBreakingSpace(O))continue;this.canBreakInLastChar(O)||(p=this.trimToBreakable(p),d=this.sumTextWidthByCache(p[h]||"",y)),this.shouldBreakByKinsokuShorui(O,E)&&(p=this.trimByKinsokuShorui(p),d+=g(w||""))}d+=k,p[h]=(p[h]||"")+O}return p.join("\n")},t.prototype.isBreakingSpace=function(t){return"string"==typeof t&&dS.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&dS.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=ez([],eF(t),!1),n=e[e.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return e;var i=n.slice(r,r+1),o=this.isBreakingSpace(i);return e[e.length-1]+=n.slice(r+1,n.length),e[e.length-2]=n.slice(0,r+ +!o),e},t.prototype.canBreakInLastChar=function(t){return!(t&&d_.test(t))},t.prototype.sumTextWidthByCache=function(t,e){return t.split("").reduce(function(t,n){if(!e[n])throw Error("cannot count the word without cache");return t+e[n]},0)},t.prototype.findBreakableIndex=function(t){for(var e=t.length-1;e>=0;e--)if(!d_.test(t[e]))return e;return -1},t.prototype.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t}(),dT={},dC=(P=new ds,j=new dl,(_={})[tG.CIRCLE]=new dn,_[tG.ELLIPSE]=new dr,_[tG.RECT]=P,_[tG.IMAGE]=P,_[tG.GROUP]=P,_[tG.LINE]=new di,_[tG.TEXT]=new du(dT),_[tG.POLYLINE]=j,_[tG.POLYGON]=j,_[tG.PATH]=new da,_[tG.HTML]=null,_[tG.MESH]=null,_),dN=(T=new hO,C=new hk,(A={})[t3.PERCENTAGE]=null,A[t3.NUMBER]=new hT,A[t3.ANGLE]=new hb,A[t3.DEFINED_PATH]=new hx,A[t3.PAINT]=T,A[t3.COLOR]=T,A[t3.FILTER]=new hw,A[t3.LENGTH]=C,A[t3.LENGTH_PERCENTAGE]=C,A[t3.LENGTH_PERCENTAGE_12]=new hM,A[t3.LENGTH_PERCENTAGE_14]=new hS,A[t3.COORDINATE]=new hj,A[t3.OFFSET_DISTANCE]=new hC,A[t3.OPACITY_VALUE]=new hN,A[t3.PATH]=new hL,A[t3.LIST_OF_POINTS]=new hI,A[t3.SHADOW_BLUR]=new hR,A[t3.TEXT]=new hD,A[t3.TEXT_TRANSFORM]=new hF,A[t3.TRANSFORM]=new dt,A[t3.TRANSFORM_ORIGIN]=new function(){this.parser=hc,this.parserUnmemoize=hf},A[t3.Z_INDEX]=new de,A[t3.MARKER]=new hA,A);dT.CameraContribution=f$,dT.AnimationTimeline=null,dT.EasingFunction=null,dT.offscreenCanvasCreator=new dv,dT.sceneGraphSelector=new dO,dT.sceneGraphService=new dM(dT),dT.textService=new dA(dT),dT.geometryUpdaterFactory=dC,dT.CSSPropertySyntaxFactory=dN,dT.styleValueRegistry=new hv(dT),dT.layoutRegistry=null,dT.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},dT.enableCSSParsing=!0,dT.enableDataset=!1,dT.enableStyleSyntax=!0,dT.enableSizeAttenuation=!1;var dL=0,dI=new dw(t6.INSERTED,null,"","","",0,"",""),dR=new dw(t6.REMOVED,null,"","","",0,"",""),dD=new dd(t6.DESTROY),dF=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.entity=dL++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:t2.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.geometry={contentBounds:void 0,renderBounds:void 0},e.rBushNode={aabb:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.destroyed=!1,e.style={},e.computedStyle=dT.enableCSSParsing?{anchor:pe,opacity:pe,fillOpacity:pe,strokeOpacity:pe,fill:pe,stroke:pe,transform:pe,transformOrigin:pe,visibility:pe,pointerEvents:pe,lineWidth:pe,lineCap:pe,lineJoin:pe,increasedLineWidthForHitTesting:pe,fontSize:pe,fontFamily:pe,fontStyle:pe,fontWeight:pe,fontVariant:pe,textAlign:pe,textBaseline:pe,textTransform:pe,zIndex:pe,filter:pe,shadowType:pe}:null,e.parsedStyle={},e.attributes={},e}return eC(e,t),Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(t){return""!==t})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var t=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[t-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(t){throw Error(fB)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return dT.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),dI.relatedNode=this,t.dispatchEvent(dI),t},e.prototype.insertBefore=function(t,e){if(e){t.parentElement&&t.parentElement.removeChild(t);var n=this.childNodes.indexOf(e);-1===n?this.appendChild(t):this.appendChild(t,n)}else this.appendChild(t);return t},e.prototype.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.prototype.removeChild=function(t){var e;return dR.relatedNode=this,t.dispatchEvent(dR),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),dT.sceneGraphService.detach(t),t},e.prototype.removeChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];this.removeChild(e)}},e.prototype.destroyChildren=function(){for(var t=this.childNodes.length-1;t>=0;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.prototype.matches=function(t){return dT.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return dT.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return dT.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return dT.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return dT.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return dT.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return dT.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(dT.sceneGraphService.matches(t,e))return e;e=e.parentElement}while(null!==e);return null},e.prototype.find=function(t){var e=this,n=null;return this.forEach(function(r){return!!(r!==e&&t(r))&&(n=r,!0)}),n},e.prototype.findAll=function(t){var e=this,n=[];return this.forEach(function(r){r!==e&&t(r)&&n.push(r)}),n},e.prototype.after=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);e.forEach(function(e,n){var i;return null==(i=t.parentNode)?void 0:i.appendChild(e,r+n+1)})}},e.prototype.before=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this),r=eF(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,ez([],eF(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,ez([],eF(t),!1)),this.remove()},e.prototype.append=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e){return t.appendChild(e)})},e.prototype.prepend=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];e.forEach(function(e,n){return t.appendChild(e,n)})},e.prototype.replaceChildren=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,ez([],eF(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(dD),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return dT.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return dT.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return dT.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return dT.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return dT.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(t){if("symbol"==typeof t)return dT.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=f3(t);return e=this.attributes[n],dT.enableCSSParsing&&cf(e)?null:e},e.prototype.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.prototype.setAttribute=function(t,e,n){this.attributes[t]=e},e.prototype.getAttributeNS=function(t,e){throw Error(fB)},e.prototype.getAttributeNode=function(t){throw Error(fB)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(fB)},e.prototype.hasAttributeNS=function(t,e){throw Error(fB)},e.prototype.removeAttributeNS=function(t,e){throw Error(fB)},e.prototype.removeAttributeNode=function(t){throw Error(fB)},e.prototype.setAttributeNS=function(t,e,n){throw Error(fB)},e.prototype.setAttributeNode=function(t){throw Error(fB)},e.prototype.setAttributeNodeNS=function(t){throw Error(fB)},e.prototype.toggleAttribute=function(t,e){throw Error(fB)},e}(dg);function dB(t){return!!(null==t?void 0:t.nodeName)}var dz=new dw(t6.ATTR_MODIFIED,null,null,null,null,dw.MODIFICATION,null,null),dW={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},d$={anchor:[0,0],fill:pi,stroke:pi,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},dG=eN(eN({},d$),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),dH=ez(ez([],eF(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),dV="data-",dU=function(t){function e(e){var n,r=t.call(this)||this;r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=e,r.config.interactive=null!=(n=r.config.capture)?n:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||tG.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,dT.enableCSSParsing?d$:dG,r.config.initialParsedStyle),dT.enableCSSParsing&&Object.assign(r.attributes,dW),r.initAttributes(r.config.style);var i=dT.globalThis.Proxy?dT.globalThis.Proxy:function(){};return dT.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(dV).concat(f1(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(dV).concat(f1(e)),n),!0}})),dT.enableStyleSyntax&&(r.style=new i({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}})),r}return eC(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.prototype.cloneNode=function(t,e){var n=eN({},this.attributes);for(var r in n){var i=n[r];dB(i)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=i.cloneNode(t)),e&&(n[r]=e(r,i))}var o=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:n});return o.setLocalTransform(this.getLocalTransform()),t&&this.children.forEach(function(e){if(!e.style.isMarker){var n=e.cloneNode(t);o.appendChild(n)}}),o},e.prototype.initAttributes=function(t){void 0===t&&(t={});var e=this.renderable,n={forceUpdateGeometry:!0};dT.enableCSSParsing&&(n.usedAttributes=dH);var r={};for(var i in t)r[f3(i)]=t[i];dT.styleValueRegistry.processProperties(this,r,n),e.dirty=!0},e.prototype.setAttribute=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=!0);var o=f3(e);!cz(n)&&(r||n!==this.attributes[o])&&(this.internalSetAttribute(o,n,{memoize:i}),t.prototype.setAttribute.call(this,o,n))},e.prototype.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r,i=this.renderable,o=this.attributes[t],a=this.parsedStyle[t];dT.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(dz.relatedNode=this,dz.prevValue=o,dz.newValue=e,dz.attrName=t,dz.prevParsedValue=a,dz.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(dz):(dz.target=this,this.ownerDocument.defaultView.dispatchEvent(dz,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,o,e,a,l)},e.prototype.getBBox=function(){var t=this.getBounds(),e=eF(t.getMin(),2),n=e[0],r=e[1],i=eF(t.getMax(),2);return new fF(n,r,i[0]-n,i[1]-r)},e.prototype.setOrigin=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.setOrigin(this,fE(t,e,n)),this},e.prototype.getOrigin=function(){return dT.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.setPosition(this,fE(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.setLocalPosition(this,fE(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.translate(this,fE(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dT.sceneGraphService.translateLocal(this,fE(t,e,n)),this},e.prototype.getPosition=function(){return dT.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return dT.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.prototype.scaleLocal=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=fE(t,e,n)),dT.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=fE(t,e,n)),dT.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return dT.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return dT.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return fM(eF(fS(s3(),dT.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return fM(eF(fS(s3(),dT.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return dT.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return dT.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return cf(e)&&cf(n)?dT.sceneGraphService.rotateLocal(this,0,0,t):dT.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return cf(e)&&cf(n)?dT.sceneGraphService.rotate(this,0,0,t):dT.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return dT.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return dT.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return dT.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return dT.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return dT.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return dT.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return dT.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return dT.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return dT.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){dT.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(t,e){var n,r=null==(n=this.ownerDocument)?void 0:n.timeline;return r?r.play(this,t,e):null},e.prototype.isVisible=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var t;return(null==(t=this.parsedStyle)?void 0:t.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,ez([],eF(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,ez([],eF(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=eF(e,2),i=r[0],o=r[1];return i?cB(i)?(Object.keys(i).forEach(function(e){t.setAttribute(e,i[e])}),this):2===e.length?(this.setAttribute(i,o),this):this.attributes[i]:this.attributes},e.prototype.getMatrix=function(t){var e,n,r,i,o,a,l,s,u=t||this.getWorldTransform(),c=eF(uL(s3(),u),2),f=c[0],p=c[1],h=eF(uI(s3(),u),2),d=h[0],y=h[1],g=uR(u7(),u),v=eF(fS(s3(),g),3),b=v[0],x=v[2];return n=Math.cos(e=b||x),r=Math.sin(e),i=d*n,o=y*r,a=-d*r,l=y*n,(s=new s5(9))[0]=i,s[1]=o,s[2]=0,s[3]=a,s[4]=l,s[5]=0,s[6]=f,s[7]=p,s[8]=1,s},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(t){var e=eF(f_(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setEulerAngles(a).setPosition(n,r).setLocalScale(i,o)},e.prototype.setLocalMatrix=function(t){var e=eF(f_(t),5),n=e[0],r=e[1],i=e[2],o=e[3],a=e[4];this.setLocalEulerAngles(a).setLocalPosition(n,r).setLocalScale(i,o)},e.prototype.show=function(){dT.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){dT.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(t){return this.children[t]||null},e.prototype.add=function(t,e){return this.appendChild(t,e)},e.prototype.setClip=function(t){this.style.clipPath=t},e.prototype.set=function(t,e){this.config[t]=e},e.prototype.get=function(t){return this.config[t]},e.prototype.moveTo=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.move=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),this.setPosition(t,e,n),this},e.prototype.setZIndex=function(t){return this.style.zIndex=t,this},e}(dF),dq=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;dT.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},dY=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.CIRCLE,style:dT.enableCSSParsing?eN({cx:"",cy:"",r:""},n):eN({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:dT.enableCSSParsing?null:[ps,ps]}},r))||this}return eC(e,t),e}(dU),dX=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,eN({style:dT.enableCSSParsing?eN({x:"",y:""},r):eN({},r)},i))||this).isCustomElement=!0,n}return eC(e,t),e}(dU),dK=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.ELLIPSE,style:dT.enableCSSParsing?eN({cx:"",cy:"",rx:"",ry:""},n):eN({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:dT.enableCSSParsing?null:[ps,ps]}},r))||this}return eC(e,t),e}(dU),dZ=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.GROUP,style:dT.enableCSSParsing?eN({x:"",y:"",width:"",height:""},n):eN({},n)},r))||this}return eC(e,t),e}(dU),dQ=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,eN({type:tG.HTML,style:dT.enableCSSParsing?eN({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):eN({},r)},i))||this).cullable.enable=!1,n}return eC(e,t),e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var t=this.parsedStyle;return new fF(t.x,t.y,t.width,t.height)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(e=null==(t=this.ownerDocument)?void 0:t.defaultView)?void 0:e.getContextService().getBoundingClientRect(),i=new fL,o=n.left-((null==r?void 0:r.left)||0),a=n.top-((null==r?void 0:r.top)||0);return i.setMinMax([o,a,0],[o+n.width,a+n.height,0]),i},e.prototype.getLocalBounds=function(){if(this.parentNode){var t=ug(uu(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!fL.isEmpty(e)){var n=new fL;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(dU),dJ=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.IMAGE,style:dT.enableCSSParsing?eN({x:"",y:"",img:"",width:"",height:""},n):eN({},n)},r))||this}return eC(e,t),e}(dU),d0=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);(n=t.call(this,eN({type:tG.LINE,style:eN({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},i))||this).markerStartAngle=0,n.markerEndAngle=0;var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd;return a&&dB(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&dB(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eC(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&dB(r)&&(this.markerStartAngle=0,r.remove()),i&&dB(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&dB(r)&&(this.markerEndAngle=0,r.remove()),i&&dB(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1)))},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.x1,h=l.x2,d=l.y1,y=l.y2,g=l.defX,v=l.defY,b=t?s:u;if(b&&dB(b)){var x=0;t?(r=p-g,i=d-v,e=h-p,n=y-d,o=c||0,a=this.markerStartAngle):(r=h-g,i=y-v,e=p-h,n=d-y,o=f||0,a=this.markerEndAngle),x=Math.atan2(n,e),b.setLocalEulerAngles(180*x/Math.PI+a),b.setLocalPosition(r+Math.cos(x)*o,i+Math.sin(x)*o)}},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,o=n.x2,a=n.y2,l=n.defX,s=n.defY,u=fs(r,i,o,a,t),c=u.x,f=u.y,p=ua(s3(),s8(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new fD(p[0],p[1])},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getTotalLength=function(){var t=this.parsedStyle;return fo(t.x1,t.y1,t.x2,t.y2)},e}(dU),d1=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);(n=t.call(this,eN({type:tG.PATH,style:dT.enableCSSParsing?eN({path:"",miterLimit:""},r):eN({},r),initialParsedStyle:dT.enableCSSParsing?null:{miterLimit:4,path:eN({},pu)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&dB(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&dB(s)&&n.placeMarkerMid(s),l&&dB(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eC(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&dB(r)&&(this.markerStartAngle=0,r.remove()),i&&dB(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&dB(r)&&(this.markerEndAngle=0,r.remove()),i&&dB(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.defX,h=l.defY,d=t?s:u;if(d&&dB(d)){var y=0;if(t){var g=eF(this.getStartTangent(),2),v=g[0],b=g[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=c||0,a=this.markerStartAngle}else{var x=eF(this.getEndTangent(),2),v=x[0],b=x[1];r=b[0]-p,i=b[1]-h,e=v[0]-b[0],n=v[1]-b[1],o=f||0,a=this.markerEndAngle}y=Math.atan2(n,e),d.setLocalEulerAngles(180*y/Math.PI+a),d.setLocalPosition(r+Math.cos(y)*o,i+Math.sin(y)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&dB(t))for(var o=1;o<n.length-1;o++){var a=eF(n[o].currentPoint,2),l=a[0],s=a[1],u=1===o?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l-r,s-i)}},e.prototype.getTotalLength=function(){return p$(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=cP(n.path.absolutePath,t,eN(eN({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=ua(s3(),s8(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new fD(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*p$(this),e)},e.prototype.getStartTangent=function(){var t=this.parsedStyle.path.segments,e=[];if(t.length>1){var n=t[0].currentPoint,r=t[1].currentPoint,i=t[1].startTangent;e=[],i?e.push([n[0]-i[0],n[1]-i[1]]):e.push([r[0],r[1]]),e.push([n[0],n[1]])}return e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.path.segments,e=t.length,n=[];if(e>1){var r=t[e-2].currentPoint,i=t[e-1].currentPoint,o=t[e-1].endTangent;n=[],o?n.push([i[0]-o[0],i[1]-o[1]]):n.push([r[0],r[1]]),n.push([i[0],i[1]])}return n},e}(dU),d2=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=eL(e,["style"]);(n=t.call(this,eN({type:tG.POLYGON,style:dT.enableCSSParsing?eN({points:"",miterLimit:"",isClosed:!0},r):eN({},r),initialParsedStyle:dT.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&dB(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&dB(s)&&n.placeMarkerMid(s),l&&dB(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return eC(e,t),e.prototype.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&dB(r)&&(this.markerStartAngle=0,r.remove()),i&&dB(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&dB(r)&&(this.markerEndAngle=0,r.remove()),i&&dB(i)&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.prototype.transformMarker=function(t){var e,n,r,i,o,a,l=this.parsedStyle,s=l.markerStart,u=l.markerEnd,c=l.markerStartOffset,f=l.markerEndOffset,p=l.points,h=l.defX,d=l.defY,y=(p||{}).points,g=t?s:u;if(g&&dB(g)&&y){var v=0;if(r=y[0][0]-h,i=y[0][1]-d,t)e=y[1][0]-y[0][0],n=y[1][1]-y[0][1],o=c||0,a=this.markerStartAngle;else{var b=y.length;this.parsedStyle.isClosed?(e=y[b-1][0]-y[0][0],n=y[b-1][1]-y[0][1]):(r=y[b-1][0]-h,i=y[b-1][1]-d,e=y[b-2][0]-y[b-1][0],n=y[b-2][1]-y[b-1][1]),o=f||0,a=this.markerEndAngle}v=Math.atan2(n,e),g.setLocalEulerAngles(180*v/Math.PI+a),g.setLocalPosition(r+Math.cos(v)*o,i+Math.sin(v)*o)}},e.prototype.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points,r=e.defX,i=e.defY,o=(n||{}).points;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&dB(t)&&o)for(var a=1;a<(this.parsedStyle.isClosed?o.length:o.length-1);a++){var l=o[a][0]-r,s=o[a][1]-i,u=1===a?t:t.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(l,s)}},e}(dU),d5=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.POLYLINE,style:dT.enableCSSParsing?eN({points:"",miterLimit:"",isClosed:!1},n):eN({},n),initialParsedStyle:dT.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return eC(e,t),e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.prototype.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=n.points,a=o.points,l=o.segments,s=0,u=0;l.forEach(function(e,n){t>=e[0]&&t<=e[1]&&(s=(t-e[0])/(e[1]-e[0]),u=n)});var c=fs(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=ua(s3(),s8(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new fD(h[0],h[1])},e.prototype.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},e}(d2),d3=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.RECT,style:dT.enableCSSParsing?eN({x:"",y:"",width:"",height:"",radius:""},n):eN({},n)},r))||this}return eC(e,t),e}(dU),d4=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({type:tG.TEXT,style:dT.enableCSSParsing?eN({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},n):eN({fill:"black"},n),initialParsedStyle:dT.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},r))||this}return eC(e,t),e.prototype.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(dU),d6=function(){function t(){this.registry={},this.define(tG.CIRCLE,dY),this.define(tG.ELLIPSE,dK),this.define(tG.RECT,d3),this.define(tG.IMAGE,dJ),this.define(tG.LINE,d0),this.define(tG.GROUP,dZ),this.define(tG.PATH,d1),this.define(tG.POLYGON,d2),this.define(tG.POLYLINE,d5),this.define(tG.TEXT,d4),this.define(tG.HTML,dQ)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),d8=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new dT.AnimationTimeline(e)}catch(t){}var n={};return hh.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=f2(i)?i(tG.GROUP):i)}),e.documentElement=new dZ({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return eC(e,t),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(t,e){if("svg"===t)return this.documentElement;var n=this.defaultView.customElements.get(t);n||(console.warn("Unsupported tagName: ",t),n="tspan"===t?d4:dZ);var r=new n(e);return r.ownerDocument=this,r},e.prototype.createElementNS=function(t,e,n){return this.createElement(e,n)},e.prototype.cloneNode=function(t){throw Error(fB)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(t){}},e.prototype.elementsFromBBox=function(t,e,n,r){var i=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),o=[];return i.forEach(function(t){var e=t.displayObject,n=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e.parsedStyle.pointerEvents);(!n||n&&e.isVisible())&&!e.isCulled()&&e.isInteractive()&&o.push(e)}),o.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),o},e.prototype.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return null;var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f&&f[0]||this.documentElement},e.prototype.elementFromPoint=function(t,e){return eI(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return eR(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,null];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return[2,(f=p.sent().picked)&&f[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,i=n.y,o=this.defaultView.getConfig(),a=o.width,l=o.height;if(r<0||i<0||r>a||i>l)return[];var s=this.defaultView.viewport2Client({x:r,y:i}),u=s.x,c=s.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]}).picked;return f[f.length-1]!==this.documentElement&&f.push(this.documentElement),f},e.prototype.elementsFromPoint=function(t,e){return eI(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return eR(this,function(p){switch(p.label){case 0:if(r=(n=this.defaultView.canvas2Viewport({x:t,y:e})).x,i=n.y,a=(o=this.defaultView.getConfig()).width,l=o.height,r<0||i<0||r>a||i>l)return[2,[]];return u=(s=this.defaultView.viewport2Client({x:r,y:i})).x,c=s.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:i,clientX:u,clientY:c},picked:[]})];case 1:return(f=p.sent().picked)[f.length-1]!==this.documentElement&&f.push(this.documentElement),[2,f]}})})},e.prototype.appendChild=function(t,e){throw Error(fz)},e.prototype.insertBefore=function(t,e){throw Error(fz)},e.prototype.removeChild=function(t,e){throw Error(fz)},e.prototype.replaceChild=function(t,e,n){throw Error(fz)},e.prototype.append=function(){throw Error(fz)},e.prototype.prepend=function(){throw Error(fz)},e.prototype.getElementById=function(t){return this.documentElement.getElementById(t)},e.prototype.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},e.prototype.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},e.prototype.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},e.prototype.querySelector=function(t){return this.documentElement.querySelector(t)},e.prototype.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},e.prototype.find=function(t){return this.documentElement.find(t)},e.prototype.findAll=function(t){return this.documentElement.findAll(t)},e}(dg),d9=function(){function t(t){this.strategies=t}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,o=this.strategies;r.hooks.cull.tap(t.tag,function(t){if(t){var e=t.cullable;return(0===o.length?e.visible=i.unculledEntities.indexOf(t.entity)>-1:e.visible=o.every(function(e){return e.isVisible(n,t)}),!t.isCulled()&&t.isVisible())?t:(t.dispatchEvent(new dd(t6.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),d7=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new dp(null),this.rootWheelEvent=new dh(null),this.onPointerMove=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView;if(!a.supportsTouchEvents||"touch"!==e.pointerType){var l=t.normalizeToPointerEvent(e,a);try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,i,o,a=null==(o=null==(i=t.context.renderingContext.root)?void 0:i.ownerDocument)?void 0:o.defaultView,l=t.normalizeToPointerEvent(e,a);try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=t.bootstrapEvent(t.rootPointerEvent,c,a,e);t.context.eventService.mapEvent(f)}}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}t.setCursor(t.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(t){return n.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(t){var e=n.normalizeWheelEvent(t);n.context.eventService.mapEvent(e)}),r.hooks.pointerDown.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.normalizeToPointerEvent(t,i);n.autoPreventDefault&&o[0].isNormalized&&(!t.cancelable&&"cancelable"in t||t.preventDefault());try{for(var a=eD(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(t){if(!i.supportsTouchEvents||"touch"!==t.pointerType){var e,r,o=n.context.contextService.getDomElement(),a="outside";try{a=o&&t.target&&t.target!==o&&o.contains&&!o.contains(t.target)?"outside":""}catch(t){}var l=n.normalizeToPointerEvent(t,i);try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value,f=n.bootstrapEvent(n.rootPointerEvent,c,i,t);f.type+=a,n.context.eventService.mapEvent(f)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(t){var e,r,o=n.normalizeToPointerEvent(t,i);try{for(var a=eD(o),l=a.next();!l.done;l=a.next()){var s=l.value,u=n.bootstrapEvent(n.rootPointerEvent,s,i,t);n.context.eventService.mapEvent(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(t){var e,n,r=t.offsetX,i=t.offsetY,o=t.clientX,a=t.clientY;if(!this.context.config.supportsCSSTransform||cf(r)||cf(i)){var l=this.context.eventService.client2Viewport(new fD(o,a));e=l.x,n=l.y}else e=r,n=i;return{x:e,y:n}},t.prototype.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var i=this.getViewportXY(e),o=i.x,a=i.y;t.viewport.x=o,t.viewport.y=a;var l=this.context.eventService.viewport2Canvas(t.viewport),s=l.x,u=l.y;return t.canvas.x=s,t.canvas.y=u,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=hV[t.type]||t.type),t},t.prototype.normalizeWheelEvent=function(t){var e=this.rootWheelEvent;this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ;var n=this.getViewportXY(t),r=n.x,i=n.y;e.viewport.x=r,e.viewport.y=i;var o=this.context.eventService.viewport2Canvas(e.viewport),a=o.x,l=o.y;return e.canvas.x=a,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.prototype.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=hU.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.prototype.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];cz(i.button)&&(i.button=0),cz(i.buttons)&&(i.buttons=1),cz(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),cz(i.width)&&(i.width=i.radiusX||1),cz(i.height)&&(i.height=i.radiusY||1),cz(i.tiltX)&&(i.tiltX=0),cz(i.tiltY)&&(i.tiltY=0),cz(i.pointerType)&&(i.pointerType="touch"),cz(i.pointerId)&&(i.pointerId=i.identifier||0),cz(i.pressure)&&(i.pressure=i.force||.5),cz(i.twist)&&(i.twist=0),cz(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(cz(t.isPrimary)&&(t.isPrimary=!0),cz(t.width)&&(t.width=1),cz(t.height)&&(t.height=1),cz(t.tiltX)&&(t.tiltX=0),cz(t.tiltY)&&(t.tiltY=0),cz(t.pointerType)&&(t.pointerType="mouse"),cz(t.pointerId)&&(t.pointerId=1),cz(t.pressure)&&(t.pressure=.5),cz(t.twist)&&(t.twist=0),cz(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),yt=[tG.CIRCLE,tG.ELLIPSE,tG.IMAGE,tG.RECT,tG.LINE,tG.POLYLINE,tG.POLYGON,tG.TEXT,tG.PATH,tG.HTML],ye=function(){function t(){}return t.prototype.isVisible=function(t,e){var n,r,i=e.cullable;if(!i.enable)return!0;var o=e.getRenderBounds();if(fL.isEmpty(o))return!1;var a=t.getFrustum(),l=null==(r=null==(n=e.parentNode)?void 0:n.cullable)?void 0:r.visibilityPlaneMask;return i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,o,l||tV.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==tV.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===tV.OUTSIDE||n===tV.INSIDE)return n;for(var i=tV.INSIDE,o=yt.indexOf(t.nodeName)>-1,a=0,l=r.length;a<l;++a){var s=1<<a;if((n&s)!=0&&(!o||4!==a&&5!==a)){var u=r[a],c=u.normal,f=u.distance;if(ui(c,e.getPositiveFarPoint(r[a]))+f<0)return tV.OUTSIDE;ui(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),yn=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,o=e.rBushRoot,a=i.root.ownerDocument.defaultView;this.rBush=o;var l=function(t){t.target.renderable.dirty=!0,r.dirtify()},s=function(t){var e=t.detail.affectChildren,i=t.target;e&&i.forEach(function(t){n.toSync.add(t)});for(var o=i;o;)o.renderable&&n.toSync.add(o),o=o.parentElement;r.dirtify()},u=function(t){var e=t.target;dT.enableSizeAttenuation&&dT.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),dT.enableCSSParsing&&dT.styleValueRegistry.recalc(e),dT.sceneGraphService.dirtifyToRoot(e),r.dirtify()},c=function(t){var e=t.target,i=e.rBushNode;i.aabb&&n.rBush.remove(i.aabb),n.toSync.delete(e),dT.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(t6.MOUNTED,u),a.addEventListener(t6.UNMOUNTED,c),a.addEventListener(t6.ATTR_MODIFIED,l),a.addEventListener(t6.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(t6.MOUNTED,u),a.removeEventListener(t6.UNMOUNTED,c),a.removeEventListener(t6.ATTR_MODIFIED,l),a.removeEventListener(t6.BOUNDS_CHANGED,s),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var t=this,e=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(n){var r=n.rBushNode;r&&r.aabb&&t.rBush.remove(r.aabb);var i=n.getRenderBounds();if(i){var o=eF(i.getMin(),2),a=o[0],l=o[1],s=eF(i.getMax(),2),u=s[0],c=s[1];r.aabb||(r.aabb={}),r.aabb.displayObject=n,r.aabb.minX=a,r.aabb.minY=l,r.aabb.maxX=u,r.aabb.maxY=c}!r.aabb||isNaN(r.aabb.maxX)||isNaN(r.aabb.maxX)||isNaN(r.aabb.minX)||isNaN(r.aabb.minY)||e.push(r.aabb)}),this.rBush.load(e),e.length=0,this.toSync.clear()},t.tag="Prepare",t}();(N=t8||(t8={})).READY="ready",N.BEFORE_RENDER="beforerender",N.RERENDER="rerender",N.AFTER_RENDER="afterrender",N.BEFORE_DESTROY="beforedestroy",N.AFTER_DESTROY="afterdestroy",N.RESIZE="resize",N.DIRTY_RECTANGLE="dirtyrectangle",N.RENDERER_CHANGED="rendererchanged";var yr=new dd(t6.MOUNTED),yi=new dd(t6.UNMOUNTED),yo=new dd(t8.BEFORE_RENDER),ya=new dd(t8.RERENDER),yl=new dd(t8.AFTER_RENDER),ys=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=dU,i.inited=!1,i.context={},i.document=new d8,i.document.defaultView=i,i.customElements=new d6;var o=e.container,a=e.canvas,l=e.offscreenCanvas,s=e.width,u=e.height,c=e.devicePixelRatio,f=e.renderer,p=e.background,h=e.cursor,d=e.document,y=e.requestAnimationFrame,g=e.cancelAnimationFrame,v=e.createImage,b=e.supportsPointerEvents,x=e.supportsTouchEvents,O=e.supportsCSSTransform,w=e.supportsMutipleCanvasesInOneContainer,E=e.useNativeClickEvent,k=e.alwaysTriggerPointerEventOnCanvas,M=e.isTouchEvent,S=e.isMouseEvent;w||function(t,e){if(t){var n="string"==typeof t?t:t.id||hz++;hB[n]&&hB[n].destroy(),hB[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||hW&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=hH(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=hH(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(dT.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:h2.bind(dT.globalThis),i.cancelAnimationFrame=null!=g?g:h5.bind(dT.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in dT.globalThis,i.supportsPointerEvents=null!=b?b:!!dT.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof dT.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!dT.globalThis.MouseEvent||t instanceof dT.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof dT.globalThis.PointerEvent))},i.initRenderingContext({container:o,canvas:a,width:_,height:P,renderer:f,offscreenCanvas:l,devicePixelRatio:j,cursor:h||"default",background:p||"transparent",createImage:v,document:d,supportsCSSTransform:O,useNativeClickEvent:E,alwaysTriggerPointerEventOnCanvas:k}),i.initDefaultCamera(_,P,f.clipSpaceNearZ),i.initRenderer(f,!0),i}return eC(e,t),e.prototype.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(t,e,n){var r=this,i=new dT.CameraContribution;i.clipSpaceNearZ=n,i.setType(tU.EXPLORING,tq.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(-(t/2),t/2,e/2,-(e/2),.1,1e3),i.canvas=this,i.eventEmitter.on(fW.UPDATED,function(){r.context.renderingContext.renderReasons.add(t4.CAMERA_CHANGED),dT.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()}),this.context.camera=i},e.prototype.updateSizeAttenuation=function(){var t=this.getCamera().getZoom();this.document.documentElement.forEach(function(e){dT.styleValueRegistry.updateSizeAttenuation(e,t)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(this.readyPromise=new Promise(function(e){t.resolveReadyPromise=function(){e(t)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1),e||this.dispatchEvent(new dd(t8.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),e||this.dispatchEvent(new dd(t8.AFTER_DESTROY))},e.prototype.changeSize=function(t,e){this.resize(t,e)},e.prototype.resize=function(t,e){var n=this.context.config;n.width=t,n.height=e,this.getContextService().resize(t,e);var r=this.context.camera,i=r.getProjectionMode();r.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),i===tY.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new dd(t8.RESIZE,{width:t,height:e}))},e.prototype.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.prototype.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.prototype.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var t=this;this.dispatchEvent(yo),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(ya)}),this.dispatchEvent(yl)},e.prototype.run=function(){var t=this,e=function(){t.render(),t.frameId=t.requestAnimationFrame(e)};e()},e.prototype.initRenderer=function(t,e){var n=this;if(void 0===e&&(e=!1),!t)throw Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new fy,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new d7,new yn,new d9([new ye])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(eN(eN({},dT),this.context)),this.context.renderingService=new db(dT,this.context),this.context.eventService=new dm(dT,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(t,e,!0)):this.context.contextService.initAsync().then(function(){n.initRenderingService(t,e)})},e.prototype.initRenderingService=function(t,e,n){var r=this;void 0===e&&(e=!1),void 0===n&&(n=!1),this.context.renderingService.init(function(){r.inited=!0,e?(n?r.requestAnimationFrame(function(){r.dispatchEvent(new dd(t8.READY))}):r.dispatchEvent(new dd(t8.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new dd(t8.RENDERER_CHANGED)),e||r.getRoot().forEach(function(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}),r.mountChildren(r.getRoot()),t.getConfig().enableAutoRendering&&r.run()})},e.prototype.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init(dT)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),ez([],eF(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(dT)}),this.initRenderer(t)}},e.prototype.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.prototype.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(yi):(yi.target=t,this.dispatchEvent(yi,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.prototype.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(yr):(yr.target=t,this.dispatchEvent(yr,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.prototype.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.prototype.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.prototype.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.prototype.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.prototype.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.prototype.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},e}(dy),yu={}.toString,yc=function(t,e){return yu.call(t)==="[object "+e+"]"},yf=function(t){function e(){var e=t.apply(this,ez([],eF(arguments),!1))||this;return e.landmarks=[],e}return eC(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=fw(e),this.relAzimuth=fw(t),this.relRoll=fw(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===tU.EXPLORING){var r=ct(u7(),[1,0,0],fk((this.rotateWorld?1:-1)*this.relElevation)),i=ct(u7(),[0,1,0],fk((this.rotateWorld?1:-1)*this.relAzimuth)),o=ct(u7(),[0,0,1],fk(this.relRoll)),a=ce(u7(),i,r);a=ce(u7(),a,o);var l=uB(uu(),a);ux(this.matrix,this.matrix,[0,0,-this.distance]),ub(this.matrix,this.matrix,l),ux(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getPosition():this.type===tU.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=fE(t,e,0),r=s4(this.position);return ut(r,r,un(s3(),this.right,n[0])),ut(r,r,un(s3(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=s4(this.position),r=t*this.dollyingStep;return r=Math.max(Math.min(this.distance+t*this.dollyingStep,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*e[0],n[1]+=r*e[1],n[2]+=r*e[2],this._setPosition(n),this.type===tU.ORBITING||this.type===tU.EXPLORING?this._getDistance():this.type===tU.TRACKING&&ut(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(t,e){void 0===e&&(e={});var n,r,i,o,a=e.position,l=void 0===a?this.position:a,s=e.focalPoint,u=void 0===s?this.focalPoint:s,c=e.roll,f=e.zoom,p=new dT.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],null!=(n=l[1])?n:this.position[1],null!=(r=l[2])?r:this.position[2]),p.setFocalPoint(u[0],null!=(i=u[1])?i:this.focalPoint[1],null!=(o=u[2])?o:this.focalPoint[2]),p.setRoll(null!=c?c:this.roll),p.setZoom(null!=f?f:this.zoom);var h={name:t,matrix:uc(p.getWorldTransform()),right:s4(p.right),up:s4(p.up),forward:s4(p.forward),position:s4(p.getPosition()),focalPoint:s4(p.getFocalPoint()),distanceVector:s4(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(h),h},e.prototype.gotoLandmark=function(t,e){var n=this;void 0===e&&(e={});var r=yc(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=yc(e,"Number")?{duration:e}:e,a=o.easing,l=o.duration,s=void 0===l?100:l,u=o.easingFunction,c=o.onfinish,f=void 0===c?void 0:c,p=o.onframe,h=void 0===p?void 0:p;if(0===s){this.syncFromLandmark(r),f&&f();return}this.cancelLandmarkAnimation();var d=r.position,y=r.focalPoint,g=r.zoom,v=r.roll,b=(void 0===u?void 0:u)||dT.EasingFunction(void 0===a?"linear":a),x=function(){n.setFocalPoint(y),n.setPosition(d),n.setRoll(v),n.setZoom(g),n.computeMatrix(),n.triggerUpdate(),f&&f()},O=function(t){void 0===i&&(i=t);var e=t-i;if(e>s)return void x();var r=b(e/s),o=s3(),a=s3(),l=1,u=0;if(uo(o,n.focalPoint,y,r),uo(a,n.position,d,r),u=n.roll*(1-r)+v*r,l=n.zoom*(1-r)+g*r,n.setFocalPoint(o),n.setPosition(a),n.setRoll(u),n.setZoom(l),us(o,y)+us(a,d)<=.01&&void 0==g&&void 0==v)return void x();n.computeMatrix(),n.triggerUpdate(),e<s&&(h&&h(r),n.landmarkAnimationID=n.canvas.requestAnimationFrame(O))};this.canvas.requestAnimationFrame(O)}},e.prototype.syncFromLandmark=function(t){this.matrix=uf(this.matrix,t.matrix),this.right=s9(this.right,t.right),this.up=s9(this.up,t.up),this.forward=s9(this.forward,t.forward),this.position=s9(this.position,t.position),this.focalPoint=s9(this.focalPoint,t.focalPoint),this.distanceVector=s9(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(f$);dT.CameraContribution=yf;var yp=function(){function t(t,e){this.type=t,this.target=e,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),yh=0,yd=new WeakMap,yy=function(){function t(t,e,n){this.observer=t,this.target=e,this.options=n,this.transientObservedNodes=[]}return t.prototype.enqueue=function(t){var e,n=this.observer.records,r=n.length;if(n.length>0){var i=function(t,e){return t===e?t:t7&&(t===t7||t===t9)?t7:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,yb.push(e),yv||(yv=!0,void 0!==dT.globalThis?dT.globalThis.setTimeout(yx):yx())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(t6.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(t6.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(t6.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(t6.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(t6.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(t6.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=yd.get(t),n=0;n<e.length;n++)if(e[n]===this){e.splice(n,1);break}},this)},t.prototype.handleEvent=function(t){switch(t.stopImmediatePropagation(),t.type){case t6.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=t9=new yp("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===dw.ADDITION?null:t.prevValue;ym(n,function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||-1!==t.attributeFilter.indexOf(r)||-1!==t.attributeFilter.indexOf(i))){var n;return t.attributeOldValue?(n=o,t7||((t7=yp.copy(t9)).oldValue=n),t7):e}});break;case t6.REMOVED:case t6.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===t6.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=t9=new yp("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,ym(n,function(t){if(t.childList)return e})}t9=t7=void 0},t}();function yg(t){this.callback=t,this.nodes=[],this.records=[],this.uid=yh++}function ym(t,e){for(var n=t;n;n=n.parentNode){var r=yd.get(n);if(r)for(var i=0;i<r.length;i++){var o=r[i],a=o.options;if(n===t||a.subtree){var l=e(a);l&&o.enqueue(l)}}}}yg.prototype.observe=function(t,e){if(!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw SyntaxError();var n,r=yd.get(t);r||yd.set(t,r=[]);for(var i=0;i<r.length;i++)if(r[i].observer===this){(n=r[i]).removeListeners(),n.options=e;break}n||(n=new yy(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},yg.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=yd.get(e),r=0;r<n.length;r++){var i=n[r];if(i.observer===t){i.removeListeners(),n.splice(r,1);break}}},this),this.records=[]},yg.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var yv=!1,yb=[];function yx(){yv=!1;var t=yb;yb=[],t.sort(function(t,e){return t.uid-e.uid});var e=!1;t.forEach(function(t){var n=t.takeRecords();t.nodes.forEach(function(e){var n=yd.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&yx()}var yO=function(t,e,n){return t<e?e:t>n?n:t},yw={}.toString,yE=function(t){return"[object Number]"===yw.call(t)},yk=function(t){return null==t},yM=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.currentTime=r,o.timelineTime=i,o.target=n,o.type="finish",o.bubbles=!1,o.currentTarget=n,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=r,o.timelineTime=i,o}return eC(e,t),e}(dc),yS=0,y_=function(){function t(t,e){var n;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(yS++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(n=this.effect)?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var t=this;return!this.readyPromise&&(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(e,n){t.resolveReadyPromise=function(){e(t)},t.rejectReadyPromise=function(){n(Error())}}),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var t=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(e,n){t.resolveFinishedPromise=function(){e(t)},t.rejectFinishedPromise=function(){n(Error())}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;isNaN(t=Number(t))||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),!isNaN(t=Number(t))&&(this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises())))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(t){if(t!==this._playbackRate){this.updatePromises();var e=this.currentTime;this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&0>=Number(this._currentTime))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||"running"===this.playState||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var t=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var e=new yM(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(e)})}},t.prototype.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},t.prototype.updatePlaybackRate=function(t){this.playbackRate=t},t.prototype.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},t.prototype.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},t.prototype.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},t.prototype.tick=function(t,e){!this._idle&&!this._paused&&(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw Error(fB)},t.prototype.addEventListener=function(t,e,n){throw Error(fB)},t.prototype.removeEventListener=function(t,e,n){throw Error(fB)},t.prototype.dispatchEvent=function(t){throw Error(fB)},t.prototype.commitStyles=function(){throw Error(fB)},t.prototype.ensureAlive=function(){var t,e;this.playbackRate<0&&0===this.currentTime?this._inEffect=!!(null==(t=this.effect)?void 0:t.update(-1)):this._inEffect=!!(null==(e=this.effect)?void 0:e.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(t){var e=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new yM(null,this,this.currentTime,t);setTimeout(function(){e.onfinish&&e.onfinish(n)})}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new yM(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),yP="function"==typeof Float32Array,yj=function(t,e){return 1-3*e+3*t},yA=function(t,e){return 3*e-6*t},yT=function(t){return 3*t},yC=function(t,e,n){return((yj(e,n)*t+yA(e,n))*t+yT(e))*t},yN=function(t,e,n){return 3*yj(e,n)*t*t+2*yA(e,n)*t+yT(e)},yL=function(t,e,n,r,i){var o,a,l=0;do(o=yC(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},yI=function(t,e,n,r){for(var i=0;i<4;++i){var o=yN(e,n,r);if(0===o)break;var a=yC(e,n,r)-t;e-=a/o}return e},yR=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(t){return t};for(var i=yP?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=yC(.1*o,t,n);var a=function(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;var a=r+(e-i[--o])/(i[o+1]-i[o])*.1,l=yN(a,t,n);return l>=.001?yI(e,a,t,n):0===l?a:yL(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:yC(a(t),e,r)}},yD=function(t){return Math.pow(t,2)},yF=function(t){return Math.pow(t,3)},yB=function(t){return Math.pow(t,4)},yz=function(t){return Math.pow(t,5)},yW=function(t){return Math.pow(t,6)},y$=function(t){return 1-Math.cos(t*Math.PI/2)},yG=function(t){return 1-Math.sqrt(1-t*t)},yH=function(t){return t*t*(3*t-2)},yV=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)},yU=function(t,e){void 0===e&&(e=[]);var n=eF(e,2),r=n[0],i=n[1],o=yO(Number(void 0===r?1:r),1,10),a=yO(Number(void 0===i?.5:i),.1,2);return 0===t||1===t?t:-o*Math.pow(2,10*(t-1))*Math.sin(2*Math.PI*(t-1-a/(2*Math.PI)*Math.asin(1/o))/a)},yq=function(t,e,n){void 0===e&&(e=[]);var r=eF(e,4),i=r[0],o=void 0===i?1:i,a=r[1],l=void 0===a?100:a,s=r[2],u=void 0===s?10:s,c=r[3],f=void 0===c?0:c;o=yO(o,.1,1e3),l=yO(l,.1,1e3),u=yO(u,.1,1e3),f=yO(f,.1,1e3);var p=Math.sqrt(l/o),h=u/(2*Math.sqrt(l*o)),d=h<1?p*Math.sqrt(1-h*h):0,y=h<1?(h*p+-f)/d:-f+p,g=n?n*t/1e3:t;return(g=h<1?Math.exp(-g*h*p)*(+Math.cos(d*g)+y*Math.sin(d*g)):(1+y*g)*Math.exp(-g*p),0===t||1===t)?t:1-g},yY=function(t,e){void 0===e&&(e=[]);var n=eF(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(yO(t,0,1)*i)/i},yX=function(t,e){void 0===e&&(e=[]);var n=eF(e,4);return yR(n[0],n[1],n[2],n[3])(t)},yK=yR(.42,0,1,1),yZ=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},yQ=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?t(2*e,n,r)/2:1-t(-2*e+2,n,r)/2}},yJ=function(t){return function(e,n,r){return void 0===n&&(n=[]),e<.5?(1-t(1-2*e,n,r))/2:(t(2*e-1,n,r)+1)/2}},y0={steps:yY,"step-start":function(t){return yY(t,[1,"start"])},"step-end":function(t){return yY(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":yX,ease:function(t){return yX(t,[.25,.1,.25,1])},in:yK,out:yZ(yK),"in-out":yQ(yK),"out-in":yJ(yK),"in-quad":yD,"out-quad":yZ(yD),"in-out-quad":yQ(yD),"out-in-quad":yJ(yD),"in-cubic":yF,"out-cubic":yZ(yF),"in-out-cubic":yQ(yF),"out-in-cubic":yJ(yF),"in-quart":yB,"out-quart":yZ(yB),"in-out-quart":yQ(yB),"out-in-quart":yJ(yB),"in-quint":yz,"out-quint":yZ(yz),"in-out-quint":yQ(yz),"out-in-quint":yJ(yz),"in-expo":yW,"out-expo":yZ(yW),"in-out-expo":yQ(yW),"out-in-expo":yJ(yW),"in-sine":y$,"out-sine":yZ(y$),"in-out-sine":yQ(y$),"out-in-sine":yJ(y$),"in-circ":yG,"out-circ":yZ(yG),"in-out-circ":yQ(yG),"out-in-circ":yJ(yG),"in-back":yH,"out-back":yZ(yH),"in-out-back":yQ(yH),"out-in-back":yJ(yH),"in-bounce":yV,"out-bounce":yZ(yV),"in-out-bounce":yQ(yV),"out-in-bounce":yJ(yV),"in-elastic":yU,"out-elastic":yZ(yU),"in-out-elastic":yQ(yU),"out-in-elastic":yJ(yU),spring:yq,"spring-in":yq,"spring-out":yZ(yq),"spring-in-out":yQ(yq),"spring-out-in":yJ(yq)},y1=function(t){var e;return("-"===(e=(e=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?e.substring(1):e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},y2=function(t){return t};function y5(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var y3="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",y4=RegExp("cubic-bezier\\("+y3+","+y3+","+y3+","+y3+"\\)"),y6=/steps\(\s*(\d+)\s*\)/,y8=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function y9(t){var e=y4.exec(t);if(e)return yR.apply(void 0,ez([],eF(e.slice(1).map(Number)),!1));var n=y6.exec(t);if(n)return y5(Number(n[1]),0);var r=y8.exec(t);return r?y5(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):y0[y1(t)]||y0.linear}function y7(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var gt=function(t,e,n){return function(r){var i=function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)){for(var i=e.length,o=n.length,a=Math.max(i,o),l=[],s=0;s<a;s++)l.push(t(e[s<i?s:i-1],n[s<o?s:o-1],r));return l}throw Error("Mismatched interpolation arguments "+e+":"+n)}(t,e,r);return!dT.enableCSSParsing&&yE(i)?i:n(i)}},ge=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=y2,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(t){this.easingFunction=y9(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function gn(t,e){if(null===t)return[];Array.isArray(t)||(t=function(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,o=0;o<i;o++){if(!e[o]){var a={};"offset"in t&&(a.offset=Number(t.offset)),"easing"in t&&(a.easing=t.easing),"composite"in t&&(a.composite=t.composite),e[o]=a}void 0!==r[o]&&null!==r[o]&&(e[o][n]=r[o])}}return e.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),e}(t));for(var n=t.map(function(t){var n={};for(var r in(null==e?void 0:e.composite)&&(n.composite="auto"),t){var i=t[r];if("offset"===r){if(null!==i){if(!isFinite(i=Number(i)))throw Error("Keyframe offsets must be numbers.");if(i<0||i>1)throw Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=i}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(i))throw Error("".concat(i," compositing is not supported"));n[r]=i}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==e?void 0:e.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),r=!0,i=-1/0,o=0;o<n.length;o++){var a=n[o].offset;if(yk(a))r=!1;else{if(a<i)throw TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=a}}return n=n.filter(function(t){return Number(t.offset)>=0&&1>=Number(t.offset)}),r||function(){var t,e,r=n.length;n[r-1].computedOffset=Number(null!=(t=n[r-1].offset)?t:1),r>1&&(n[0].computedOffset=Number(null!=(e=n[0].offset)?e:0));for(var i=0,o=Number(n[0].computedOffset),a=1;a<r;a++){var l=n[a].computedOffset;if(!yk(l)&&!yk(o)){for(var s=1;s<a-i;s++)n[i+s].computedOffset=o+(Number(l)-o)*s/(a-i);i=a,o=Number(l)}}}(),n}var gr="backwards|forwards|both|none".split("|"),gi="reverse|alternate|alternate-reverse".split("|"),go=function(){function t(t,e,n){var r,i,o,a,l,s,u,c,f,p,h,d,y=this;this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=("number"==typeof(r=null!=(a=n)?a:{duration:"auto"})&&(r=isNaN(r)?{duration:"auto"}:{duration:r}),l=a=r,s=new ge,"number"!=typeof l||isNaN(l)?void 0!==l&&Object.keys(l).forEach(function(t){void 0!==l[t]&&null!==l[t]&&"auto"!==l[t]&&(("number"==typeof s[t]||"duration"===t)&&("number"!=typeof l[t]||isNaN(l[t]))||"fill"===t&&-1===gr.indexOf(l[t])||("direction"!==t||-1!==gi.indexOf(l[t]))&&(s[t]=l[t]))}):s.duration=l,s),this.timing.effect=this,this.timing.activeDuration=Math.abs((0===(i=u=this.timing).duration||0===i.iterations?0:("auto"===i.duration?0:Number(i.duration))*(null!=(o=i.iterations)?o:1))/(u.playbackRate||1)),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=gn(e,this.timing),this.interpolations=(c=this.normalizedKeyframes,f=this.timing,p=this.target,d=function(t,e){var n=[];for(var r in t)for(var i=t[r],o=0;o<i.length-1;o++){var a=o,l=o+1,s=i[a].computedOffset,u=i[l].computedOffset,c=s,f=u;0===o&&(c=-1/0,0===u&&(l=a)),o===i.length-2&&(f=1/0,1===s&&(a=l)),n.push({applyFrom:c,applyTo:f,startOffset:i[a].computedOffset,endOffset:i[l].computedOffset,easingFunction:i[a].easingFunction,property:r,interpolation:function(t,e,n,r){var i=hy[t];if(i&&i.syntax&&i.int){var o=dT.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(dT.enableCSSParsing){var s=dT.styleValueRegistry.parseProperty(t,e,r,!1),u=dT.styleValueRegistry.parseProperty(t,n,r,!1);a=dT.styleValueRegistry.computeProperty(t,s,r,!1),l=dT.styleValueRegistry.computeProperty(t,u,r,!1)}else{var c=o.parserWithCSSDisabled;a=c?c(e,r):e,l=c?c(n,r):n}var f=o.mixer(a,l,r);if(f){var p=gt.apply(void 0,ez([],eF(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return gt(!1,!0,function(t){return t?n:e})}(r,i[a].value,i[l].value,e)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}(h=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(y7(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:y9(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(o)}return n}(c,f),p),function(t,e){if(null!==e)d.filter(function(t){return e>=t.applyFrom&&e<t.applyTo}).forEach(function(n){var r=e-n.startOffset,i=n.endOffset-n.startOffset,o=0===i?0:n.easingFunction(r/i);t.setAttribute(n.property,n.interpolation(o),!1,!1)});else for(var n in h)y7(n)&&t.setAttribute(n,null)});var g=dT.globalThis.Proxy;this.computedTiming=g?new g(this.timing,{get:function(t,e){if("duration"===e)return"auto"===t.duration?0:t.duration;if("fill"===e)return"auto"===t.fill?"none":t.fill;if("localTime"===e)return y.animation&&y.animation.currentTime||null;if("currentIteration"===e)return y.animation&&"running"===y.animation.playState?t.currentIteration||0:null;if("progress"===e)return y.animation&&"running"===y.animation.playState?t.progress||0:null;return t[e]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(t){return null!==t&&(this.timeFraction=function(t,e,n){var r,i,o,a,l,s,u,c=function(t,e,n){if(null===e)return 0;var r=n.endTime;return e<Math.min(n.delay,r)?1:e>=Math.min(n.delay+t+n.endDelay,r)?2:3}(t,e,n),f=function(t,e,n,r,i){switch(r){case 1:if("backwards"===e||"both"===e)return 0;return null;case 3:return n-i;case 2:if("forwards"===e||"both"===e)return t;return null;case 0:return null}}(t,n.fill,e,c,n.delay);if(null===f)return null;var p="auto"===n.duration?0:n.duration,h=(r=n.iterations,o=i=n.iterationStart,0===p?1!==c&&(o+=r):o+=f/p,o),d=(a=n.iterationStart,l=n.iterations,0==(s=h===1/0?a%1:h%1)&&2===c&&0!==l&&(0!==f||0===p)&&(s=1),s),y=(u=n.iterations,2===c&&u===1/0?1/0:1===d?Math.floor(h)-1:Math.floor(h)),g=function(t,e,n){var r=t;if("normal"!==t&&"reverse"!==t){var i=e;"alternate-reverse"===t&&(i+=1),r="normal",i!==1/0&&i%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,y,d);return n.currentIteration=y,n.progress=g,n.easingFunction(g)}(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(t){this.normalizedKeyframes=gn(t)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(t){var e=this;Object.keys(t||{}).forEach(function(n){e.timing[n]=t[n]})},t}();function ga(t,e){return Number(t.id)-Number(e.id)}var gl=function(){function t(t){var e=this;this.document=t,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(t){e.currentTime=t,e.discardAnimations(),0===e.animations.length?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(t){var n=e.rafCallbacks;e.rafCallbacks=[],t<Number(e.currentTime)&&(t=Number(e.currentTime)),e.animations.sort(ga),e.animations=e.tick(t,!0,e.animations)[0],n.forEach(function(e){e[1](t)}),e.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(t,e,n){var r=new y_(new go(t,e,n),this);return this.animations.push(r),this.restartWebAnimationsNextTick(),r.updatePromises(),r.play(),r.updatePromises(),r},t.prototype.applyDirtiedAnimation=function(t){var e=this;if(!this.inTick){t.markTarget();var n=t.targetAnimations();n.sort(ga),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach(function(t){var n=e.animations.indexOf(t);-1!==n&&e.animations.splice(n,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null==t||t.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},t.prototype.requestAnimationFrame=function(t){var e=this;return this.rAF(function(n){e.updateAnimationsPromises(),t(n),e.updateAnimationsPromises()})},t.prototype.tick=function(t,e,n){var r,i,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var a=[],l=[],s=[],u=[];return n.forEach(function(n){n.tick(t,e),n._inEffect?(l.push(n.effect),n.markTarget()):(a.push(n.effect),n.unmarkTarget()),n._needsTick&&(o.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):u.push(n)}),(r=this.pendingEffects).push.apply(r,ez([],eF(a),!1)),(i=this.pendingEffects).push.apply(i,ez([],eF(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();function gs(t){return new gu([t],null,t,t.ownerDocument)}dT.EasingFunction=y9,dT.AnimationTimeline=gl;class gu{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],o=[],a=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=o,this._facetElements=a}selectAll(t){return new gu("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)}selectFacetAll(t){let e="string"==typeof t?this._parent.querySelectorAll(t):t;return new gu(this._elements,null,this._parent,this._document,void 0,void 0,e)}select(t){let e="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new gu([e],null,e,this._document)}append(t){let e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){let r=this._data[t],[i,o]=Array.isArray(r)?r:[r,null],a=e(i,t);a.__data__=i,null!==o&&(a.__fromElements__=o),this._parent.appendChild(a),n.push(a)}return new gu(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){let r=this._elements[t],i=e(r.__data__,t);r.appendChild(i),n.push(i)}return new gu(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new gu([i],null,this._parent,this._document);let o="string"==typeof e?this.createElement(e):e();return o.id=t,n&&(o.className=n),r.appendChild(o),new gu([o],null,this._parent,this._document)}data(t,e=t=>t,n=()=>null){let r=[],i=[],o=new Set(this._elements),a=[],l=new Set,s=new Map(this._elements.map((t,n)=>[e(t.__data__,n),t])),u=new Map(this._facetElements.map((t,n)=>[e(t.__data__,n),t])),c=lj(this._elements,t=>n(t.__data__));for(let f=0;f<t.length;f++){let p=t[f],h=e(p,f),d=n(p,f);if(s.has(h)){let t=s.get(h);t.__data__=p,t.__facet__=!1,i.push(t),o.delete(t),s.delete(h)}else if(u.has(h)){let t=u.get(h);t.__data__=p,t.__facet__=!0,i.push(t),u.delete(h)}else if(c.has(h)){let t=c.get(h);for(let e of(a.push([p,t]),t))o.delete(e);c.delete(h)}else if(s.has(d)){let t=s.get(d);t.__toData__?t.__toData__.push(p):t.__toData__=[p],l.add(t),o.delete(t)}else r.push(p)}let f=[new gu([],r,this._parent,this._document),new gu(i,null,this._parent,this._document),new gu(o,null,this._parent,this._document),new gu([],a,this._parent,this._document),new gu(l,null,this._parent,this._document)];return new gu(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new gu(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=gu.registry[t];return e?new e:rF(`Unknown node type: ${t}`)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){let o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)}remove(){for(let t=0;t<this._elements.length;t++){let e=this._transitions[t];e?Promise.all((Array.isArray(e)?e:[e]).map(t=>t.finished)).then(()=>{this._elements[t].remove()}):this._elements[t].remove()}return new gu([],null,this._parent,this._document,void 0,this._transitions)}each(t){for(let e=0;e<this._elements.length;e++){let n=this._elements[e];t(n.__data__,e,n)}return this}attr(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o[t]=n(r,i,o))})}style(t,e){let n="function"!=typeof e?()=>e:e;return this.each(function(r,i,o){void 0!==e&&(o.style[t]=n(r,i,o))})}transition(t){let e="function"!=typeof t?()=>t:t,{_transitions:n}=this;return this.each(function(t,r,i){n[r]=e(t,r,i)})}on(t,e){return this.each(function(n,r,i){i.addEventListener(t,e)}),this}call(t,...e){return t(this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function gc([t,e],[n,r]){return[t-n,e-r]}function gf([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function gp([t,e]){return Math.atan2(e,t)}function gh([t,e]){return gp([t,e])+Math.PI/2}function gd(t,e){let n=gp(t),r=gp(e);return n<r?r-n:2*Math.PI-(n-r)}function gy(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(let[o,a]of t)e=Math.min(o,e),n=Math.max(o,n),r=Math.min(a,r),i=Math.max(a,i);let o=n-e,a=i-r;return[e,r,o,a]}function gg([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function gm(t,e,n){return Math.max(e,Math.min(t,n))}function gv(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}gu.registry={g:dZ,rect:d3,circle:dY,path:d1,text:d4,ellipse:dK,image:dJ,line:d0,polygon:d2,polyline:d5,html:dQ};var gb=function(t){return rj(t,"Number")};function gx(t,e){let n,r;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}function gO(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function gw(t){return t.map((t,e)=>e)}function gE(t){return t[t.length-1]}function gk(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function gM(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function gS(t,e,n,r,i){let o=gp(gc(r,e))+Math.PI,a=gp(gc(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function g_(t,e,n,r="y",i="between",o=!1){let a="y"===r||!0===r?n:e,l=((t,e)=>{if("y"===t||!0===t)if(e)return 180;else return 90;return 90*!!e})(r,o),s=gw(a),[u,c]=gx(s,t=>a[t]),f=new nr({domain:[u,c],range:[0,100]}),p=t=>gb(a[t])&&!Number.isNaN(a[t])?f.map(a[t]):0,h={between:e=>`${t[e]} ${p(e)}%`,start:e=>0===e?`${t[e]} ${p(e)}%`:`${t[e-1]} ${p(e)}%, ${t[e]} ${p(e)}%`,end:e=>e===t.length-1?`${t[e]} ${p(e)}%`:`${t[e]} ${p(e)}%, ${t[e+1]} ${p(e)}%`},d=s.sort((t,e)=>p(t)-p(e)).map(h[i]||h.between).join(",");return`linear-gradient(${l}deg, ${d})`}function gP(t){let[e,n,r,i]=t;return[i,e,n,r]}function gj(t,e,n){let[r,i,,o]=sq(t)?gP(e):e,[a,l]=n,s=t.getCenter(),u=gh(gc(r,s)),c=gh(gc(i,s)),f=c===u&&a!==l?c+2*Math.PI:c;return{startAngle:u,endAngle:f-u>=0?f:2*Math.PI+f,innerRadius:gf(o,s),outerRadius:gf(r,s)}}function gA(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function gT(t,e){if(!sY(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function gC(t){if(1===t.length)return t[0];let[[e,n,r=0],[i,o,a=0]]=t;return[(e+i)/2,(n+o)/2,(r+a)/2]}var gN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gL(t,e,n,r,i={}){let{inset:o=0,radius:a=0,insetLeft:l=o,insetTop:s=o,insetRight:u=o,insetBottom:c=o,radiusBottomLeft:f=a,radiusBottomRight:p=a,radiusTopLeft:h=a,radiusTopRight:d=a,minWidth:y=-1/0,maxWidth:g=1/0,minHeight:v=-1/0}=i,b=gN(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!sY(r)&&!sK(r)){let n=!!sq(r),[i,,o]=n?gP(e):e,[a,x]=i,[O,w]=gc(o,i),E=Math.abs(O),k=Math.abs(w),M=(O>0?a:a+O)+l,S=(w>0?x:x+w)+s,_=E-(l+u),P=k-(s+c),j=n?gm(_,v,1/0):gm(_,y,g),A=n?gm(P,y,g):gm(P,v,1/0),T=n?M:M-(j-_)/2,C=n?S-(A-P)/2:S-(A-P);return gs(t.createElement("rect",{})).style("x",T).style("y",C).style("width",j).style("height",A).style("radius",[h,d,p,f]).call(gM,b).node()}let{y:x,y1:O}=n,w=r.getCenter(),E=gj(r,e,[x,O]),k=sU().cornerRadius(a).padAngle(o*Math.PI/180);return gs(t.createElement("path",{})).style("path",k(E)).style("transform",`translate(${w[0]}, ${w[1]})`).style("radius",a).style("inset",o).call(gM,b).node()}let gI=(t,e)=>{let{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:o=!0}=t,a=gN(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:l,document:s}=e;return(e,r,u)=>{let{color:c,radius:f=0}=u,p=gN(u,["color","radius"]),h=p.lineWidth||1,{stroke:d,radius:y=f,radiusTopLeft:g=y,radiusTopRight:v=y,radiusBottomRight:b=y,radiusBottomLeft:x=y,innerRadius:O=0,innerRadiusTopLeft:w=O,innerRadiusTopRight:E=O,innerRadiusBottomRight:k=O,innerRadiusBottomLeft:M=O,lineWidth:S="stroke"===n||d?h:0,inset:_=0,insetLeft:P=_,insetRight:j=_,insetBottom:A=_,insetTop:T=_,minWidth:C,maxWidth:N,minHeight:L}=a,I=gN(a,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:R=c,opacity:D}=r,F=[i?g:w,i?v:E,o?b:k,o?x:M],B=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];sq(l)&&B.push(B.shift());let z=Object.assign(Object.assign({radius:y},Object.fromEntries(B.map((t,e)=>[t,F[e]]))),{inset:_,insetLeft:P,insetRight:j,insetBottom:A,insetTop:T,minWidth:C,maxWidth:N,minHeight:L});return gs(gL(s,e,r,l,z)).call(gM,p).style("fill","transparent").style(n,R).style(gA(t),D).style("lineWidth",S).style("stroke",void 0===d?R:d).call(gM,I).node()}};gI.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let gR=(t,e)=>gI(Object.assign({colorAttribute:"fill"},t),e);gR.props=Object.assign(Object.assign({},gI.props),{defaultMarker:"square"});let gD=(t,e)=>gI(Object.assign({colorAttribute:"stroke"},t),e);function gF(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function gB(t){this._context=t}function gz(t){return new gB(t)}function gW(t){return t[0]}function g$(t){return t[1]}function gG(t,e){var n=sO(!0),r=null,i=gz,o=null,a=sB(l);function l(l){var s,u,c,f=(l=gF(l)).length,p=!1;for(null==r&&(o=i(c=a())),s=0;s<=f;++s)!(s<f&&n(u=l[s],s,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+t(u,s,l),+e(u,s,l));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?gW:sO(t),e="function"==typeof e?e:void 0===e?g$:sO(e),l.x=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),l):t},l.y=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),l):e},l.defined=function(t){return arguments.length?(n="function"==typeof t?t:sO(!!t),l):n},l.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),l):i},l.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),l):r},l}function gH(){}function gV(t){this._context=t}function gU(t){return new gV(t)}gD.props=Object.assign(Object.assign({},gI.props),{defaultMarker:"hollowSquare"}),Array.prototype.slice,gB.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},gV.prototype={areaStart:gH,areaEnd:gH,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var gq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gY(t,e,n){let[r,i,o,a]=t;return sq(n)?[r,[e?e[0][0]:i[0],i[1]],[e?e[3][0]:o[0],o[1]],a]:[r,[i[0],e?e[0][1]:i[1]],[o[0],e?e[3][1]:o[1]],a]}let gX=(t,e)=>{let{adjustPoints:n=gY}=t,r=gq(t,["adjustPoints"]),{coordinate:i,document:o}=e;return(t,e,a,l)=>{let{index:s}=e,{color:u}=a,c=gq(a,["color"]),f=n(t,l[s+1],i),[p,h,d,y]=sq(i)?gP(f):f,{color:g=u,opacity:v}=e,b=gG().curve(gU)([p,h,d,y]);return gs(o.createElement("path",{})).call(gM,c).style("path",b).style("fill",g).style("fillOpacity",v).call(gM,r).node()}};function gK(t,e,n){let[r,i,o,a]=t;return sq(n)?[r,[e?e[0][0]:(i[0]+o[0])/2,i[1]],[e?e[3][0]:(i[0]+o[0])/2,o[1]],a]:[r,[i[0],e?e[0][1]:(i[1]+o[1])/2],[o[0],e?e[3][1]:(i[1]+o[1])/2],a]}gX.props={defaultMarker:"square"};let gZ=(t,e)=>gX(Object.assign({adjustPoints:gK},t),e);function gQ(t,e){return t.getBandWidth(t.invert(e))}gZ.props={defaultMarker:"square"};let gJ={rect:gR,hollow:gD,funnel:gX,pyramid:gZ},g0=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,series:l,size:s}=n,u=e.x,c=e.series,[f]=r.getSize(),p=s?s.map(t=>+t/f):null,h=s?(t,e,n)=>{let r=t+e/2,i=p[n];return[r-i/2,r+i/2]}:(t,e,n)=>[t,t+e],d=Array.from(t,t=>{let e=gQ(u,i[t]),n=c?gQ(c,null==l?void 0:l[t]):1,s=(+(null==l?void 0:l[t])||0)*e,[f,p]=h(+i[t]+s,e*n,t),d=+o[t],y=+a[t];return[[f,d],[p,d],[p,y],[f,y]].map(t=>r.map(t))});return[t,d]};g0.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:gJ,channels:[...o1({shapes:Object.keys(gJ)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...o4(),{type:sb},{type:sx}],postInference:[...o5()],interaction:{shareTooltip:!0}};let g1={rect:gR,hollow:gD},g2=()=>(t,e,n,r)=>{let{x:i,x1:o,y:a,y1:l}=n,s=Array.from(t,t=>{let e=[+i[t],+a[t]],n=[+o[t],+a[t]];return[e,n,[+o[t],+l[t]],[+i[t],+l[t]]].map(t=>r.map(t))});return[t,s]};g2.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:g1,channels:[...o1({shapes:Object.keys(g1)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4(),{type:sb}],postInference:[...o5()],interaction:{shareTooltip:!0}};var g5=g4(gz);function g3(t){this._curve=t}function g4(t){function e(e){return new g3(t(e))}return e._curve=t,e}function g6(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(g4(t)):e()._curve},t}function g8(t){let e="function"==typeof t?t:t.render;return class extends dX{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}g3.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}};var g9=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let g7=g8(t=>{let{d1:e,d2:n,style1:r,style2:i}=t.attributes,o=t.ownerDocument;gs(t).maybeAppend("line",()=>o.createElement("path",{})).style("d",e).call(gM,r),gs(t).maybeAppend("line1",()=>o.createElement("path",{})).style("d",n).call(gM,i)}),mt=(t,e)=>{let{curve:n,gradient:r=!1,gradientColor:i="between",defined:o=t=>!Number.isNaN(t)&&null!=t,connect:a=!1}=t,l=g9(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:s,document:u}=e;return(t,e,c)=>{let f,{color:p,lineWidth:h}=c,d=g9(c,["color","lineWidth"]),{color:y=p,size:g=h,seriesColor:v,seriesX:b,seriesY:x}=e,O=gT(s,e),w=sq(s),E=r&&v?g_(v,b,x,r,i,w):y,k=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},d),E&&{stroke:E}),g&&{lineWidth:g}),O&&{transform:O}),l);if(sY(s)){let t=s.getCenter();f=e=>g6(gG().curve(g5)).angle((n,r)=>gh(gc(e[r],t))).radius((n,r)=>gf(e[r],t)).defined(([t,e])=>o(t)&&o(e)).curve(n)(e)}else f=gG().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>o(t)&&o(e)).curve(n);let[M,S]=function(t,e){let n=[],r=[],i=!1,o=null;for(let a of t)e(a[0])&&e(a[1])?(n.push(a),i&&(i=!1,r.push([o,a])),o=a):i=!0;return[n,r]}(t,o),_=rW(k,"connect"),P=!!S.length;return P&&(!a||Object.keys(_).length)?P&&!a?gs(u.createElement("path",{})).style("d",f(t)).call(gM,k).node():gs(new g7).style("style1",Object.assign(Object.assign({},k),_)).style("style2",k).style("d1",S.map(f).join(",")).style("d2",f(t)).node():gs(u.createElement("path",{})).style("d",f(M)||[]).call(gM,k).node()}};mt.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let me=(t,e)=>{let{coordinate:n}=e;return(...r)=>mt(Object.assign({curve:sY(n)?gU:gz},t),e)(...r)};function mn(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function mr(t,e){this._context=t,this._k=(1-e)/6}function mi(t,e){this._context=t,this._k=(1-e)/6}function mo(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function ma(t,e){this._context=t,this._alpha=e}function ml(t,e){this._context=t,this._alpha=e}me.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"line"}),mr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:mn(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:mn(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new mr(t,e)}return n.tension=function(e){return t(+e)},n}(0),mi.prototype={areaStart:gH,areaEnd:gH,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mn(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new mi(t,e)}return n.tension=function(e){return t(+e)},n}(0),ma.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:mo(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return e?new ma(t,e):new mr(t,0)}return n.alpha=function(e){return t(+e)},n}(.5),ml.prototype={areaStart:gH,areaEnd:gH,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mo(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var ms=function t(e){function n(t){return e?new ml(t,e):new mi(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function mu(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs((o*i+a*r)/(r+i)))||0}function mc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function mf(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,a-l*n,o,a)}function mp(t){this._context=t}function mh(t){this._context=new md(t)}function md(t){this._context=t}function my(t){return new mp(t)}function mg(t){return new mh(t)}mp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mf(this,this._t0,mc(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e*=1,(t*=1)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,mf(this,mc(this,n=mu(this,t,e)),n);break;default:mf(this,this._t0,n=mu(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(mh.prototype=Object.create(mp.prototype)).point=function(t,e){mp.prototype.point.call(this,e,t)},md.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};var mm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let mv=(t,e)=>{let n=mm(t,[]),{coordinate:r}=e;return(...t)=>mt(Object.assign({curve:sY(r)?ms:sq(r)?mg:my},n),e)(...t)};function mb(t,e){this._context=t,this._t=e}function mx(t){return new mb(t,.5)}function mO(t){return new mb(t,0)}function mw(t){return new mb(t,1)}mv.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"smooth"}),mb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};let mE=(t,e)=>mt(Object.assign({curve:mw},t),e);mE.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"hv"});let mk=(t,e)=>mt(Object.assign({curve:mO},t),e);mk.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"vh"});let mM=(t,e)=>mt(Object.assign({curve:mx},t),e);mM.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"hvh"});var mS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let m_=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{seriesSize:o,color:a}=r,{color:l}=i,s=mS(i,["color"]),u=sF();for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1],i=o[t],a=o[t+1];[...n,...r].every(rz)&&function(t,e,n,r,i){let o=gp(gc(n,e)),a=o+Math.PI/2,l=[r/2*Math.cos(a),r/2*Math.sin(a)],s=[i/2*Math.cos(a),i/2*Math.sin(a)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],c=[r/2*Math.cos(o),r/2*Math.sin(o)],f=function([t,e],[n,r]){return[t+n,e+r]}(e,l),p=function([t,e],[n,r]){return[t+n,e+r]}(n,s),h=function([t,e],[n,r]){return[t+n,e+r]}(p,u),d=function([t,e],[n,r]){return[t+n,e+r]}(n,u),y=gc(d,s),g=gc(n,s),v=gc(e,l),b=gc(v,c),x=gc(e,c),O=gc(f,c);t.moveTo(...f),t.lineTo(...p),t.arcTo(...h,...d,i/2),t.arcTo(...y,...g,i/2),t.lineTo(...v),t.arcTo(...b,...x,r/2),t.arcTo(...O,...f,r/2),t.closePath()}(u,n,r,i,a)}return gs(n.createElement("path",{})).call(gM,s).style("fill",a||l).style("d",u.toString()).call(gM,t).node()}};m_.props=Object.assign(Object.assign({},mt.props),{defaultMarker:"line"});let mP=()=>(t,e)=>{let{style:n={},encode:r}=e,{series:i}=r,{gradient:o}=n;return!o||i?[t,e]:[t,rN({},e,{encode:{series:oV(oU(t,void 0))}})]};mP.props={};let mj=()=>(t,e)=>{let{encode:n}=e,{series:r,color:i}=n;if(void 0!==r||void 0===i)return[t,e];let[o,a]=oq(n,"color");return[t,rN({},e,{encode:{series:oG(o,a)}})]};mj.props={};let mA={line:me,smooth:mv,hv:mE,vh:mk,hvh:mM,trail:m_},mT=(t,e,n,r)=>{var i,o;let{series:a,x:l,y:s}=n,{x:u,y:c}=e;if(void 0===l||void 0===s)throw Error("Missing encode for x or y channel.");let f=a?Array.from(lj(t,t=>a[t]).values()):[t],p=f.map(t=>t[0]).filter(t=>void 0!==t),h=((null==(i=null==u?void 0:u.getBandWidth)?void 0:i.call(u))||0)/2,d=((null==(o=null==c?void 0:c.getBandWidth)?void 0:o.call(c))||0)/2;return[p,Array.from(f,t=>t.map(t=>r.map([+l[t]+h,+s[t]+d]))),f]},mC=(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===i.length)throw Error("Missing encode for position channel.");let o=Array.from(t,t=>{let e=i.map(e=>+e[t]),n=r.map(e),o=[];for(let t=0;t<n.length;t+=2)o.push([n[t],n[t+1]]);return o});return[t,o]},mN=()=>(t,e,n,r)=>(sZ(r)?mC:mT)(t,e,n,r);mN.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:mA,channels:[...o1({shapes:Object.keys(mA)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...o4(),{type:mP},{type:mj}],postInference:[...o5(),{type:oK,channel:"color"},{type:oZ,channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var mL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let mI=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];mI.style=["fill"];let mR=mI.bind(void 0);mR.style=["stroke","lineWidth"];let mD=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];mD.style=["fill"];let mF=mD.bind(void 0);mF.style=["fill"];let mB=mD.bind(void 0);mB.style=["stroke","lineWidth"];let mz=(t,e,n)=>{let r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};mz.style=["fill"];let mW=mz.bind(void 0);mW.style=["stroke","lineWidth"];let m$=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};m$.style=["fill"];let mG=m$.bind(void 0);mG.style=["stroke","lineWidth"];let mH=(t,e,n)=>{let r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};mH.style=["fill"];let mV=mH.bind(void 0);mV.style=["stroke","lineWidth"];let mU=(t,e,n)=>{let r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};mU.style=["fill"];let mq=mU.bind(void 0);mq.style=["stroke","lineWidth"];let mY=(t,e,n)=>{let r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};mY.style=["fill"];let mX=mY.bind(void 0);mX.style=["stroke","lineWidth"];let mK=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];mK.style=["stroke","lineWidth"];let mZ=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];mZ.style=["stroke","lineWidth"];let mQ=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];mQ.style=["stroke","lineWidth"];let mJ=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];mJ.style=["stroke","lineWidth"];let m0=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];m0.style=["stroke","lineWidth"];let m1=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];m1.style=["stroke","lineWidth"];let m2=m1.bind(void 0);m2.style=["stroke","lineWidth"];let m5=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];m5.style=["stroke","lineWidth"];let m3=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];m3.style=["stroke","lineWidth"];let m4=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];m4.style=["stroke","lineWidth"];let m6=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];m6.style=["stroke","lineWidth"];let m8=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];m8.style=["stroke","lineWidth"];let m9=new Map([["bowtie",mY],["cross",mZ],["dash",m2],["diamond",mz],["dot",m1],["hexagon",mU],["hollowBowtie",mX],["hollowDiamond",mW],["hollowHexagon",mq],["hollowPoint",mR],["hollowSquare",mB],["hollowTriangle",mG],["hollowTriangleDown",mV],["hv",m3],["hvh",m6],["hyphen",m0],["line",mK],["plus",mJ],["point",mI],["rect",mF],["smooth",m5],["square",mD],["tick",mQ],["triangleDown",mH],["triangle",m$],["vh",m4],["vhv",m8]]);var m7=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vt=(t,e)=>{let{colorAttribute:n,symbol:r,mode:i="auto"}=t,o=m7(t,["colorAttribute","symbol","mode"]),a=m9.get(r)||m9.get("point"),{coordinate:l,document:s}=e;return(e,r,u)=>{let{lineWidth:c,color:f}=u,p=o.stroke?c||1:c,{color:h=f,transform:d,opacity:y}=r,[g,v]=gC(e),b=function(t,e,n,r){if(1===e.length)return;let{size:i}=n;if("fixed"===t)return i;if("normal"===t||sQ(r)){let[[t,n],[r,i]]=e;return Math.max(0,(Math.abs((r-t)/2)+Math.abs((i-n)/2))/2)}return i}(i,e,r,l)||o.r||u.r;return gs(s.createElement("path",{})).call(gM,u).style("fill","transparent").style("d",a(g,v,b)).style("lineWidth",p).style("transform",d).style("stroke",h).style(gA(t),y).style(n,h).call(gM,o).node()}};vt.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let ve=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);ve.props=Object.assign({defaultMarker:"hollowPoint"},vt.props);let vn=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);vn.props=Object.assign({defaultMarker:"hollowDiamond"},vt.props);let vr=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);vr.props=Object.assign({defaultMarker:"hollowHexagon"},vt.props);let vi=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);vi.props=Object.assign({defaultMarker:"hollowSquare"},vt.props);let vo=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);vo.props=Object.assign({defaultMarker:"hollowTriangleDown"},vt.props);let va=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);va.props=Object.assign({defaultMarker:"hollowTriangle"},vt.props);let vl=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);vl.props=Object.assign({defaultMarker:"hollowBowtie"},vt.props);let vs=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);vs.props=Object.assign({defaultMarker:"point"},vt.props);let vu=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);vu.props=Object.assign({defaultMarker:"plus"},vt.props);let vc=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);vc.props=Object.assign({defaultMarker:"diamond"},vt.props);let vf=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);vf.props=Object.assign({defaultMarker:"square"},vt.props);let vp=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);vp.props=Object.assign({defaultMarker:"triangle"},vt.props);let vh=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);vh.props=Object.assign({defaultMarker:"hexagon"},vt.props);let vd=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);vd.props=Object.assign({defaultMarker:"cross"},vt.props);let vy=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);vy.props=Object.assign({defaultMarker:"bowtie"},vt.props);let vg=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);vg.props=Object.assign({defaultMarker:"hyphen"},vt.props);let vm=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);vm.props=Object.assign({defaultMarker:"line"},vt.props);let vv=(t,e)=>vt(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);vv.props=Object.assign({defaultMarker:"tick"},vt.props);let vb=(t,e)=>vt(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);vb.props=Object.assign({defaultMarker:"triangleDown"},vt.props);let vx=()=>(t,e)=>{let{encode:n}=e,{y:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{y:oH(oU(t,0))},scale:{y:{guide:null}}})]};vx.props={};let vO=()=>(t,e)=>{let{encode:n}=e,{size:r}=n;return void 0!==r?[t,e]:[t,rN({},e,{encode:{size:oV(oU(t,3))}})]};vO.props={};let vw={hollow:ve,hollowDiamond:vn,hollowHexagon:vr,hollowSquare:vi,hollowTriangleDown:vo,hollowTriangle:va,hollowBowtie:vl,point:vs,plus:vu,diamond:vc,square:vf,triangle:vp,hexagon:vh,cross:vd,bowtie:vy,hyphen:vg,line:vm,tick:vv,triangleDown:vb},vE=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l,y1:s,size:u,dx:c,dy:f}=r,[p,h]=i.getSize(),d=o8(n,r,t),y=t=>{let e=+((null==c?void 0:c[t])||0),n=+((null==f?void 0:f[t])||0),r=l?(+o[t]+ +l[t])/2:+o[t];return[r+e,(s?(+a[t]+ +s[t])/2:+a[t])+n]},g=u?Array.from(e,t=>{let[e,n]=y(t),r=+u[t],o=r/p,a=r/h;return[i.map(d([e-o,n-a],t)),i.map(d([e+o,n+a],t))]}):Array.from(e,t=>[i.map(d(y(t),t))]);return[e,g]};vE.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:vw,channels:[...o1({shapes:Object.keys(vw)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...o4(),{type:sx},{type:vx}],postInference:[{type:vO},...o2()]};var vk=function(t){return"function"==typeof t};function vM(t){v_(t,!0)}function vS(t){v_(t,!1)}function v_(t,e){var n=e?"visible":"hidden";!function t(e,n){n(e),e.children&&e.children.forEach(function(e){e&&t(e,n)})}(t,function(t){t.attr("visibility",n)})}var vP=function(t){return"object"==typeof t&&null!==t},vj={}.toString,vA=function(t,e){return vj.call(t)==="[object "+e+"]"},vT=function(t){if(!vP(t)||!vA(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},vC=function(t){return Array.isArray?Array.isArray(t):vA(t,"Array")},vN=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=5),Object.entries(e).forEach(function(i){var o=eF(i,2),a=o[0],l=o[1];Object.prototype.hasOwnProperty.call(e,a)&&(l?vT(l)?(vT(t[a])||(t[a]={}),n<r?vN(t[a],l,n+1,r):t[a]=e[a]):vC(l)?(t[a]=[],t[a]=t[a].concat(l)):t[a]=l:t[a]=l)})},vL=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)vN(t,e[r]);return t},vI=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=t.apply(this,ez([],eF(e),!1))||this;return r.addEventListener(t6.INSERTED,function(){vS(r)}),r}return eC(e,t),e}(dZ);function vR(t){var e=t.appendChild(new vI({class:"offscreen"}));return vS(e),e}function vD(){v_(this,"hidden"!==this.attributes.visibility)}var vF=function(t){function e(e,n){void 0===n&&(n={});var r=t.call(this,vL({},{style:n},e))||this;return r.initialized=!1,r._defaultOptions=n,r}return eC(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=vR(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e.prototype.attributeChangedCallback=function(t){"visibility"===t&&vD.call(this)},e.prototype.update=function(t,e){var n;return this.attr(vL({},this.attributes,t||{})),null==(n=this.render)?void 0:n.call(this,this.attributes,this,e)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,e){},e}(dX);function vB(t,e,n,r,i){return(void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t)?n(e):(r&&i(e),null)}var vz=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=eL(e,["style"]);return t.call(this,eN({style:eN({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},r))||this}return eC(e,t),Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=vR(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;null==(t=this._offscreen)||t.destroy()},e}(d4),vW=function(){var t,e,n;function r(e,n,r,i,o,a,l){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),void 0===o&&(o=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===l&&(l=[]),t.add(this),this._elements=Array.from(e),this._data=n,this._parent=r,this._document=i,this._enter=o[0],this._update=o[1],this._exit=o[2],this._merge=o[3],this._split=o[4],this._transitions=a,this._facetElements=l}return r.prototype.selectAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(n,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t):t;return new e(this._elements,null,this._parent,this._document,void 0,void 0,n)},r.prototype.select=function(t){var n="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new e([n],null,n,this._document)},r.prototype.append=function(t){var n=this,r="function"==typeof t?t:function(){return n.createElement(t)},i=[];if(null!==this._data){for(var o=0;o<this._data.length;o++){var a=this._data[o],l=eF(Array.isArray(a)?a:[a,null],2),s=l[0],u=l[1],c=r(s,o);c.__data__=s,null!==u&&(c.__fromElements__=u),this._parent.appendChild(c),i.push(c)}return new e(i,null,this._parent,this._document)}for(var o=0;o<this._elements.length;o++){var f=this._elements[o],s=f.__data__,c=r(s,o);f.appendChild(c),i.push(c)}return new e(i,null,i[0],this._document)},r.prototype.maybeAppend=function(e,r){var i=eW(this,t,"m",n).call(this,"#"===e[0]?e:"#".concat(e),r);return i.attr("id",e),i},r.prototype.maybeAppendByClassName=function(e,r){var i=e.toString(),o=eW(this,t,"m",n).call(this,"."===i[0]?i:".".concat(i),r);return o.attr("className",i),o},r.prototype.maybeAppendByName=function(e,r){var i=eW(this,t,"m",n).call(this,'[name="'.concat(e,'"]'),r);return i.attr("name",e),i},r.prototype.data=function(t,n,r){void 0===n&&(n=function(t){return t}),void 0===r&&(r=function(){return null});for(var i,o,a,l,s,u=[],c=[],f=new Set(this._elements),p=[],h=new Set,d=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),y=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),g=(i=this._elements,o=function(t){return r(t.__data__)},a=new Map,i.forEach(function(t){var e=o(t);a.has(e)||a.set(e,[]),a.get(e).push(t)}),a),v=0;v<t.length;v++){var b=t[v],x=n(b,v),O=r(b,v);if(d.has(x)){var w=d.get(x);w.__data__=b,w.__facet__=!1,c.push(w),f.delete(w),d.delete(x)}else if(y.has(x)){var w=y.get(x);w.__data__=b,w.__facet__=!0,c.push(w),y.delete(x)}else if(g.has(x)){var E=g.get(x);p.push([b,E]);try{for(var k=(l=void 0,eD(E)),M=k.next();!M.done;M=k.next()){var w=M.value;f.delete(w)}}catch(t){l={error:t}}finally{try{M&&!M.done&&(s=k.return)&&s.call(k)}finally{if(l)throw l.error}}g.delete(x)}else if(d.has(O)){var w=d.get(O);w.__toData__?w.__toData__.push(b):w.__toData__=[b],h.add(w),f.delete(w)}else u.push(b)}var S=[new e([],u,this._parent,this._document),new e(c,null,this._parent,this._document),new e(f,null,this._parent,this._document),new e([],p,this._parent,this._document),new e(h,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,S)},r.prototype.merge=function(t){var n=ez(ez([],eF(this._elements),!1),eF(t._elements),!1),r=ez(ez([],eF(this._transitions),!1),eF(t._transitions),!1);return new e(n,null,this._parent,this._document,void 0,r)},r.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var n=e.registry[t];if(n)return new n;throw Error("Unknown node type: ".concat(t))},r.prototype.join=function(t,e,n,r,i){void 0===t&&(t=function(t){return t}),void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});var o=t(this._enter),a=e(this._update),l=n(this._exit),s=r(this._merge),u=i(this._split);return a.merge(o).merge(l).merge(s).merge(u)},r.prototype.remove=function(){for(var t=this,n=0;n<this._elements.length;n++)!function(e){var n=t._elements[e],r=t._transitions[e];r?r.then(function(){return n.remove()}):n.remove()}(n);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},r.prototype.attr=function(t,e){var n="function"!=typeof e?function(){return e}:e;return this.each(function(r,i){void 0!==e&&(this[t]=n.call(this,r,i))})},r.prototype.style=function(t,e,n){void 0===n&&(n=!0);var r="function"==typeof e&&n?e:function(){return e};return this.each(function(n,i){void 0!==e&&(this.style[t]=r.call(this,n,i))})},r.prototype.styles=function(t,e){return void 0===t&&(t={}),void 0===e&&(e=!0),this.each(function(n,r){var i=this;Object.entries(t).forEach(function(t){var o=eF(t,2),a=o[0],l=o[1],s="function"==typeof l&&e?l:function(){return l};void 0!==l&&i.attr(a,s.call(i,n,r))})})},r.prototype.update=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.maybeUpdate=function(t,e){void 0===e&&(e=!0);var n="function"==typeof t&&e?t:function(){return t};return this.each(function(e,r){t&&this.update&&this.update(n.call(this,e,r))})},r.prototype.transition=function(t){var e=this._transitions;return this.each(function(n,r){e[r]=t.call(this,n,r)})},r.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},r.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,ez([this._parent,this],eF(e),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},r.prototype.parent=function(){return this._parent},e=r,t=new WeakSet,n=function(t,n){var r=this._elements[0],i=r.querySelector(t);if(i)return new e([i],null,this._parent,this._document);var o="string"==typeof n?this.createElement(n):n();return r.appendChild(o),new e([o],null,this._parent,this._document)},r.registry={g:dZ,rect:d3,circle:dY,path:d1,text:vz,ellipse:dK,image:dJ,line:d0,polygon:d2,polyline:d5,html:dQ},r}();function v$(t){return new vW([t],null,t,t.ownerDocument)}var vG=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},vH=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},vV=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},vU=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},vq=function(t){return vA(t,"String")},vY=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.render=function(t,n){var r,i=t.symbol,o=t.size,a=void 0===o?16:o,l=eL(t,["symbol","size"]),s=["base64","url","image"].includes(r=function(t){var e="default";if(vU(t)&&t instanceof Image)e="image";else if(vk(t))e="symbol";else if(vq(t)){var n=RegExp("data:(image|text)");e=t.match(n)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?"url":"symbol"}return e}(i))?"image":i&&"symbol"===r?"path":null;vB(!!s,v$(n),function(t){t.maybeAppendByClassName("marker",s).attr("className","marker ".concat(s,"-marker")).call(function(t){if("image"===s){var n=2*a;t.styles({img:i,width:n,height:n,x:-a,y:-a})}else{var n=a/2,r=vk(i)?i:e.getSymbol(i);t.styles(eN({path:null==r?void 0:r(0,0,n)},l))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,n){e.MARKER_SYMBOL_MAP.set(t,n)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(vF);vY.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),vY.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),vY.registerSymbol("line",vH),vY.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),vY.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),vY.registerSymbol("circle",vG),vY.registerSymbol("point",vG),vY.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),vY.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),vY.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),vY.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),vY.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),vY.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),vY.registerSymbol("line",vH),vY.registerSymbol("dot",vV),vY.registerSymbol("dash",vV),vY.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),vY.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),vY.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),vY.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),vY.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});var vX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let vK=(t,e,n)=>{let r=gf(t,e),i=gf(e,n);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(gf(n,t),2))/(2*r*i)},vZ=g8(t=>{let e,n=t.attributes,{className:r,class:i,transform:o,rotate:a,labelTransform:l,labelTransformOrigin:s,x:u,y:c,x0:f=u,y0:p=c,text:h,background:d,connector:y,startMarker:g,endMarker:v,coordCenter:b,innerHTML:x}=n,O=vX(n,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([u,c,f,p].some(t=>!gb(t)))return void t.children.forEach(t=>t.remove());let w=rW(O,"background"),{padding:E}=w,k=vX(w,["padding"]),M=rW(O,"connector"),{points:S=[]}=M,_=vX(M,["points"]),P=[[+f,+p],[+u,+c]];e=x?gs(t).maybeAppend("html","html",r).style("zIndex",0).style("innerHTML",x).call(gM,Object.assign({transform:l,transformOrigin:s},O)).node():gs(t).maybeAppend("text","text").style("zIndex",0).style("text",h).call(gM,Object.assign({textBaseline:"middle",transform:l,transformOrigin:s},O)).node();let j=function(t,e,n,r){let[[i,o],[a,l]]=e,[s,u]=function(t){let{min:[e,n],max:[r,i]}=t.getLocalBounds(),o=0,a=0;return e>0&&(o=e),r<0&&(o=r),n>0&&(a=n),i<0&&(a=i),[o,a]}(t);if(i===a&&o===l)return gG()([[0,0],[s,u]]);let c=[[i-a,o-l]].concat(n.length?n:[[0,0]]),f=[r[0]-a,r[1]-l],[p,h]=c;if(vK(f,p,h)>0){let e=(()=>{let{min:e,max:n}=t.getLocalBounds(),r=p[0]+(p[1]-f[1])*(p[1]-0)/(p[0]-f[0]);return n[0]<f[0]?Math.min(n[0],r):Math.max(e[0],r)})();c.splice(1,1,[e,0])}return gG()(c)}(gs(t).maybeAppend("background","rect").style("zIndex",-1).call(gM,function(t,e=[]){let[n=0,r=0,i=n,o=r]=e,a=t.parentNode,l=a.getEulerAngles();a.setEulerAngles(0);let{min:s,halfExtents:u}=t.getLocalBounds(),[c,f]=s,[p,h]=u;return a.setEulerAngles(l),{x:c-o,y:f-n,width:2*p+o+r,height:2*h+n+i}}(e,E)).call(gM,d?k:{}).node(),P,S,b),A=g&&new vY({id:"startMarker",style:Object.assign({x:0,y:0},rW(O,"startMarker"))}),T=v&&new vY({id:"endMarker",style:Object.assign({x:0,y:0},rW(O,"endMarker"))});gs(t).maybeAppend("connector","path").style("zIndex",0).style("path",j).style("markerStart",A).style("markerEnd",T).call(gM,y?_:{})}),vQ=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let{color:o,text:a="",fontSize:l,rotate:s=0,transform:u=""}=r,c={text:String(a),stroke:o,fill:o,fontSize:l},[[f,p]]=e;return gs(new vZ).style("x",f).style("y",p).call(gM,i).style("transform",`${u}rotate(${+s})`).style("coordCenter",n.getCenter()).call(gM,c).call(gM,t).node()}};vQ.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var vJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let v0=g8(t=>{let e=t.attributes,{class:n,x:r,y:i}=e,o=vJ(e,["class","x","y"]),a=rW(o,"marker"),{size:l=24}=a,s=()=>(function(t){let e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[o,a]=[0,0],[l,s]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,l,s],["L",o,a],["Z"]]})(l/2),[u,c]=function(t){let{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}(gs(t).maybeAppend("marker",()=>new vY({})).call(t=>t.node().update(Object.assign({symbol:s},a))).node());gs(t).maybeAppend("text","text").style("x",u).style("y",c).call(gM,o)}),v1=(t,e)=>{let n=vJ(t,[]);return(t,e,r)=>{let{color:i}=r,o=vJ(r,["color"]),{color:a=i,text:l=""}=e,s={text:String(l),stroke:a,fill:a},[[u,c]]=t;return gs(new v0).call(gM,o).style("x",u).style("y",c).call(gM,s).call(gM,n).node()}};v1.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let v2=()=>(t,e)=>{let{data:n}=e;if(!Array.isArray(n)||n.some(oX))return[t,e];let r=Array.isArray(n[0])?n:[n],i=r.map(t=>t[0]),o=r.map(t=>t[1]);return[t,rN({},e,{encode:{x:oG(i),y:oG(o)}})]};v2.props={};var v5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let v3=()=>(t,e)=>{let{data:n,style:r={}}=e,i=v5(e,["data","style"]),{x:o,y:a}=r,l=v5(r,["x","y"]);return void 0==o||void 0==a?[t,e]:[[0],rN({},i,{data:[0],cartesian:!0,encode:{x:oG([o||0]),y:oG([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:l})]};v3.props={};let v4={text:vQ,badge:v1},v6=t=>{let{cartesian:e=!1}=t;return e?o7:(e,n,r,i)=>{let{x:o,y:a}=r,l=o8(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};v6.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:v4,channels:[...o1({shapes:Object.keys(v4)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...o4(),{type:v2},{type:v3}],postInference:[...o2()]};let v8=()=>(t,e)=>[t,rN({scale:{x:{padding:0},y:{padding:0}}},e)];v8.props={};let v9={cell:gR,hollow:gD},v7=()=>(t,e,n,r)=>{let{x:i,y:o}=n,a=e.x,l=e.y,s=Array.from(t,t=>{let e=a.getBandWidth(a.invert(+i[t])),n=l.getBandWidth(l.invert(+o[t])),s=+i[t],u=+o[t];return[[s,u],[s+e,u],[s+e,u+n],[s,u+n]].map(t=>r.map(t))});return[t,s]};function bt(t,e,n){var r=null,i=sO(!0),o=null,a=gz,l=null,s=sB(u);function u(u){var c,f,p,h,d,y=(u=gF(u)).length,g=!1,v=Array(y),b=Array(y);for(null==o&&(l=a(d=s())),c=0;c<=y;++c){if(!(c<y&&i(h=u[c],c,u))===g)if(g=!g)f=c,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),p=c-1;p>=f;--p)l.point(v[p],b[p]);l.lineEnd(),l.areaEnd()}g&&(v[c]=+t(h,c,u),b[c]=+e(h,c,u),l.point(r?+r(h,c,u):v[c],n?+n(h,c,u):b[c]))}if(d)return l=null,d+""||null}function c(){return gG().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?gW:sO(+t),e="function"==typeof e?e:void 0===e?sO(0):sO(+e),n="function"==typeof n?n:void 0===n?g$:sO(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:sO(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sO(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:sO(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:sO(+t),u):n},u.lineX0=u.lineY0=function(){return c().x(t).y(e)},u.lineY1=function(){return c().x(t).y(n)},u.lineX1=function(){return c().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:sO(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),u):o},u}v7.props={defaultShape:"cell",defaultLabelShape:"label",shape:v9,composite:!1,channels:[...o1({shapes:Object.keys(v9)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...o4(),{type:sx},{type:vx},{type:v8}],postInference:[...o2()]};var be=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bn=g8(t=>{let{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,o=t.ownerDocument;gs(t).maybeAppend("connect-path",()=>o.createElement("path",{})).style("d",n).call(gM,i),gs(t).maybeAppend("area-path",()=>o.createElement("path",{})).style("d",e).call(gM,r)}),br=(t,e)=>{let{curve:n,gradient:r=!1,defined:i=t=>!Number.isNaN(t)&&null!=t,connect:o=!1}=t,a=be(t,["curve","gradient","defined","connect"]),{coordinate:l,document:s}=e;return(t,e,u)=>{let{color:c}=u,{color:f=c,seriesColor:p,seriesX:h,seriesY:d}=e,y=sq(l),g=gT(l,e),v=r&&p?g_(p,h,d,r,void 0,y):f,b=Object.assign(Object.assign(Object.assign(Object.assign({},u),{stroke:v,fill:v}),g&&{transform:g}),a),[x,O]=function(t,e){let n=[],r=[],i=[],o=!1,a=null,l=t.length/2;for(let s=0;s<l;s++){let u=t[s],c=t[s+l];if([...u,...c].some(t=>!e(t)))o=!0;else{if(n.push(u),r.push(c),o&&a){o=!1;let[t,e]=a;i.push([t,u,e,c])}a=[u,c]}}return[n.concat(r),i]}(t,i),w=rW(b,"connect"),E=!!O.length,k=t=>gs(s.createElement("path",{})).style("d",t||"").call(gM,b).node();if(sY(l)){let e=t=>{var e,r,o,a,s,u;let c=l.getCenter(),f=t.slice(0,t.length/2),p=t.slice(t.length/2);return(r=(e=bt().curve(g5)).curve,o=e.lineX0,a=e.lineX1,s=e.lineY0,u=e.lineY1,e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return g6(o())},delete e.lineX0,e.lineEndAngle=function(){return g6(a())},delete e.lineX1,e.lineInnerRadius=function(){return g6(s())},delete e.lineY0,e.lineOuterRadius=function(){return g6(u())},delete e.lineY1,e.curve=function(t){return arguments.length?r(g4(t)):r()._curve},e).angle((t,e)=>gh(gc(f[e],c))).outerRadius((t,e)=>gf(f[e],c)).innerRadius((t,e)=>gf(p[e],c)).defined((t,e)=>[...f[e],...p[e]].every(i)).curve(n)(p)};return E&&(!o||Object.keys(w).length)?E&&!o?k(e(t)):gs(new bn).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():k(e(x))}{let e=t=>{let e=t.slice(0,t.length/2),r=t.slice(t.length/2);return y?bt().y((t,n)=>e[n][1]).x1((t,n)=>e[n][0]).x0((t,e)=>r[e][0]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e):bt().x((t,n)=>e[n][0]).y1((t,n)=>e[n][1]).y0((t,e)=>r[e][1]).defined((t,n)=>[...e[n],...r[n]].every(i)).curve(n)(e)};return E&&(!o||Object.keys(w).length)?E&&!o?k(e(t)):gs(new bn).style("areaStyle",b).style("connectStyle",Object.assign(Object.assign({},w),a)).style("areaPath",e(t)).style("connectPath",O.map(e).join("")).node():k(e(x))}}};br.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bi=(t,e)=>{let{coordinate:n}=e;return(...r)=>br(Object.assign({curve:sY(n)?gU:gz},t),e)(...r)};bi.props=Object.assign(Object.assign({},br.props),{defaultMarker:"square"});var bo=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ba=(t,e)=>{let n=bo(t,[]),{coordinate:r}=e;return(...t)=>br(Object.assign({curve:sY(r)?ms:sq(r)?mg:my},n),e)(...t)};ba.props=Object.assign(Object.assign({},br.props),{defaultMarker:"smooth"});let bl=(t,e)=>(...n)=>br(Object.assign({curve:mx},t),e)(...n);bl.props=Object.assign(Object.assign({},br.props),{defaultMarker:"hvh"});let bs=(t,e)=>(...n)=>br(Object.assign({curve:mO},t),e)(...n);bs.props=Object.assign(Object.assign({},br.props),{defaultMarker:"vh"});let bu=(t,e)=>(...n)=>br(Object.assign({curve:mw},t),e)(...n);bu.props=Object.assign(Object.assign({},br.props),{defaultMarker:"hv"});let bc={area:bi,smooth:ba,hvh:bl,vh:bs,hv:bu},bf=()=>(t,e,n,r)=>{var i,o;let{x:a,y:l,y1:s,series:u}=n,{x:c,y:f}=e,p=u?Array.from(lj(t,t=>u[t]).values()):[t],h=p.map(t=>t[0]).filter(t=>void 0!==t),d=((null==(i=null==c?void 0:c.getBandWidth)?void 0:i.call(c))||0)/2,y=((null==(o=null==f?void 0:f.getBandWidth)?void 0:o.call(f))||0)/2;return[h,Array.from(p,t=>{let e=t.length,n=Array(2*e);for(let i=0;i<t.length;i++){let o=t[i];n[i]=r.map([+a[o]+d,+l[o]+y]),n[e+i]=r.map([+a[o]+d,+s[o]+y])}return n}),p]};bf.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:bc,channels:[...o1({shapes:Object.keys(bc)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...o4(),{type:mj},{type:sb},{type:v8}],postInference:[...o5()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};let bp=()=>(t,e)=>{let{encode:n}=e,{y1:r}=n;if(r)return[t,e];let[i]=oq(n,"y");return[t,rN({},e,{encode:{y1:oG([...i])}})]};bp.props={};let bh=()=>(t,e)=>{let{encode:n}=e,{x1:r}=n;if(r)return[t,e];let[i]=oq(n,"x");return[t,rN({},e,{encode:{x1:oG([...i])}})]};bh.props={};var bd=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let by=(t,e)=>{let{arrow:n=!0,arrowSize:r="40%"}=t,i=bd(t,["arrow","arrowSize"]),{document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=bd(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=sF();if(h.moveTo(...f),h.lineTo(...p),n){let[t,e]=function(t,e,n){let{arrowSize:r}=n,i="string"==typeof r?+parseFloat(r)/100*gf(t,e):r,o=Math.PI/6,a=Math.atan2(e[1]-t[1],e[0]-t[0]),l=Math.PI/2-a-o,s=[e[0]-i*Math.sin(l),e[1]-i*Math.cos(l)],u=a-o;return[s,[e[0]-i*Math.cos(u),e[1]-i*Math.sin(u)]]}(f,p,{arrowSize:r});h.moveTo(...p),h.lineTo(...t),h.moveTo(...p),h.lineTo(...e)}return gs(o.createElement("path",{})).call(gM,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(gM,i).node()}};by.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bg=(t,e)=>{let{arrow:n=!1}=t;return(...r)=>by(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};bg.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bv=(t,e)=>{let n=bm(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=bm(o,["color"]),{color:s=a,transform:u}=e,[c,f]=t,p=sF();if(p.moveTo(c[0],c[1]),sY(r)){let t=r.getCenter();p.quadraticCurveTo(t[0],t[1],f[0],f[1])}else{let t=gg(c,f),e=gf(c,f)/2;gS(p,c,f,t,e)}return gs(i.createElement("path",{})).call(gM,l).style("d",p.toString()).style("stroke",s).style("transform",u).call(gM,n).node()}};bv.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bx=(t,e)=>{let n=bb(t,[]),{document:r}=e;return(t,e,i)=>{let{color:o}=i,a=bb(i,["color"]),{color:l=o,transform:s}=e,[u,c]=t,f=sF();return f.moveTo(u[0],u[1]),f.bezierCurveTo(u[0]/2+c[0]/2,u[1],u[0]/2+c[0]/2,c[1],c[0],c[1]),gs(r.createElement("path",{})).call(gM,a).style("d",f.toString()).style("stroke",l).style("transform",s).call(gM,n).node()}};bx.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bO=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bw=(t,e)=>{let{cornerRatio:n=1/3}=t,r=bO(t,["cornerRatio"]),{coordinate:i,document:o}=e;return(t,e,a)=>{let{defaultColor:l}=a,s=bO(a,["defaultColor"]),{color:u=l,transform:c}=e,[f,p]=t,h=function(t,e,n,r){let i=sF();if(sY(n)){let o=n.getCenter(),a=gf(t,o),l=gf(e,o);return i.moveTo(t[0],t[1]),gS(i,t,e,o,(l-a)*r+a),i.lineTo(e[0],e[1]),i}return sq(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1])):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r)),i.lineTo(e[0],e[1]),i}(f,p,i,n);return gs(o.createElement("path",{})).call(gM,s).style("d",h.toString()).style("stroke",u).style("transform",c).call(gM,r).node()}};bw.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bE={link:bg,arc:bv,smooth:bx,vhv:bw},bk=t=>(e,n,r,i)=>{let{x:o,y:a,x1:l=o,y1:s=a}=r,u=o8(n,r,t),c=e.map(t=>[i.map(u([+o[t],+a[t]],t)),i.map(u([+l[t],+s[t]],t))]);return[e,c]};bk.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:bE,channels:[...o1({shapes:Object.keys(bE)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4(),{type:bp},{type:bh}],postInference:[...o2()]};var bM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bS=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=bM(o,["color"]),{color:s=a,src:u="",size:c=32,transform:f=""}=i,{width:p=c,height:h=c}=t,[[d,y]]=e,[g,v]=n.getSize();p="string"==typeof p?o9(p)*g:p,h="string"==typeof h?o9(h)*v:h;let b=d-Number(p)/2,x=y-Number(h)/2;return gs(r.createElement("image",{})).call(gM,l).style("x",b).style("y",x).style("img",u).style("stroke",s).style("transform",f).call(gM,t).style("width",p).style("height",h).node()}};bS.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let b_={image:bS},bP=t=>{let{cartesian:e}=t;return e?o7:(e,n,r,i)=>{let{x:o,y:a}=r,l=o8(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};bP.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:b_,channels:[...o1({shapes:Object.keys(b_)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...o4(),{type:v2},{type:v3}],postInference:[...o2()]};var bj=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bA=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a}=o,l=bj(o,["color"]),{color:s=a,transform:u}=i,c=function(t,e){let n=sF();if(sY(e)){let r=e.getCenter(),i=[...t,t[0]],o=i.map(t=>gf(t,r));return i.forEach((e,i)=>{if(0===i)return void n.moveTo(e[0],e[1]);let a=o[i],l=t[i-1],s=o[i-1];void 0!==s&&1e-10>Math.abs(a-s)?gS(n,l,e,r,a):n.lineTo(e[0],e[1])}),n.closePath(),n}return t.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n}(e,n);return gs(r.createElement("path",{})).call(gM,l).style("d",c.toString()).style("stroke",s).style("fill",s).style("transform",u).call(gM,t).node()}};bA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bC=(t,e)=>{let n=bT(t,[]),{coordinate:r,document:i}=e;return(t,e,o)=>{let{color:a}=o,l=bT(o,["color"]),{color:s=a,transform:u}=e,c=function(t,e){let[n,r,i,o]=t,a=sF();if(sY(e)){let t=e.getCenter(),l=gf(t,n);return a.moveTo(n[0],n[1]),a.quadraticCurveTo(t[0],t[1],i[0],i[1]),gS(a,i,o,t,l),a.quadraticCurveTo(t[0],t[1],r[0],r[1]),gS(a,r,n,t,l),a.closePath(),a}return a.moveTo(n[0],n[1]),a.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),a.lineTo(o[0],o[1]),a.bezierCurveTo(o[0]/2+r[0]/2,o[1],o[0]/2+r[0]/2,r[1],r[0],r[1]),a.lineTo(n[0],n[1]),a.closePath(),a}(t,r);return gs(i.createElement("path",{})).call(gM,l).style("d",c.toString()).style("fill",s||a).style("stroke",s||a).style("transform",u).call(gM,n).node()}};bC.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bN={polygon:bA,ribbon:bC},bL=()=>(t,e,n,r)=>{let i=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),o=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),a=t.map(t=>{let e=[];for(let n=0;n<i.length;n++){let a=i[n][t];if(void 0===a)break;let l=o[n][t];e.push(r.map([+a,+l]))}return e});return[t,a]};bL.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:bN,channels:[...o1({shapes:Object.keys(bN)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4()],postInference:[...o2()]};var bI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bR=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=bI(o,["color","fill","stroke"]),p=function(t,e){let n=sF();if(sY(e)){let r=e.getCenter(),[i,o]=r,a=gp(gc(t[0],r)),l=gp(gc(t[1],r)),s=gf(r,t[2]),u=gf(r,t[3]),c=gf(r,t[8]),f=gf(r,t[10]),p=gf(r,t[11]);n.moveTo(...t[0]),n.arc(i,o,s,a,l),n.arc(i,o,s,l,a,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,o,u,a,l),n.lineTo(...t[6]),n.arc(i,o,f,l,a,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,o,c,a,l),n.arc(i,o,c,l,a,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,o,p,a,l),n.arc(i,o,p,l,a,!0)}else n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);return n}(e,n);return gs(r.createElement("path",{})).call(gM,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(gM,t).node()}};bR.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bD=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bF=(t,e)=>{let{coordinate:n,document:r}=e;return(e,i,o)=>{let{color:a,transform:l}=i,{color:s,fill:u=s,stroke:c=s}=o,f=bD(o,["color","fill","stroke"]),p=function(t,e,n=4){let r=sF();if(!sY(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,2*Math.PI),r.closePath(),r;let i=e.getCenter(),[o,a]=i,l=gf(i,t[3]),s=gf(i,t[8]),u=gf(i,t[10]),c=gp(gc(t[2],i)),f=Math.asin(n/s),p=c-f,h=c+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.arc(o,a,l,p,h),r.lineTo(Math.cos(h)*u+o,Math.sin(h)*u+a),r.arc(o,a,u,h,p,!0),r.lineTo(Math.cos(p)*l+o,Math.sin(p)*l+a),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);let d=(p+h)/2;return r.moveTo(Math.cos(d)*(s+n/2)+o,Math.sin(d)*(s+n/2)+a),r.arc(Math.cos(d)*s+o,Math.sin(d)*s+a,n/2,d,2*Math.PI+d),r.closePath(),r}(e,n,4);return gs(r.createElement("path",{})).call(gM,f).style("d",p.toString()).style("stroke",c).style("fill",a||u).style("transform",l).call(gM,t).node()}};bF.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bB={box:bR,violin:bF},bz=()=>(t,e,n,r)=>{let{x:i,y:o,y1:a,y2:l,y3:s,y4:u,series:c}=n,f=e.x,p=e.series,h=Array.from(t,t=>{let e=f.getBandWidth(f.invert(+i[t])),n=e*(p?p.getBandWidth(p.invert(+(null==c?void 0:c[t]))):1),h=(+(null==c?void 0:c[t])||0)*e,d=+i[t]+h+n/2,[y,g,v,b,x]=[+o[t],+a[t],+l[t],+s[t],+u[t]];return[[d-n/2,x],[d+n/2,x],[d,x],[d,b],[d-n/2,b],[d+n/2,b],[d+n/2,g],[d-n/2,g],[d-n/2,v],[d+n/2,v],[d,g],[d,y],[d-n/2,y],[d+n/2,y]].map(t=>r.map(t))});return[t,h]};bz.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:bB,channels:[...o1({shapes:Object.keys(bB)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...o4(),{type:sx}],postInference:[...o5()],interaction:{shareTooltip:!0}};let bW={vector:by},b$=()=>(t,e,n,r)=>{let{x:i,y:o,size:a,rotate:l}=n,[s,u]=r.getSize(),c=t.map(t=>{let e=+l[t]/180*Math.PI,n=+a[t],c=n/s*Math.cos(e),f=-(n/u)*Math.sin(e);return[r.map([+i[t]-c/2,+o[t]-f/2]),r.map([+i[t]+c/2,+o[t]+f/2])]});return[t,c]};b$.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:bW,channels:[...o1({shapes:Object.keys(bW)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...o4()],postInference:[...o2()]};var bG=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let bH=(t,e)=>{let{arrow:n,arrowSize:r=4}=t,i=bG(t,["arrow","arrowSize"]),{coordinate:o,document:a}=e;return(t,e,l)=>{var s;let{color:u,lineWidth:c}=l,f=bG(l,["color","lineWidth"]),{color:p=u,size:h=c}=e,d=n?(s=Object.assign({fill:i.stroke||p,stroke:i.stroke||p},rW(i,"arrow")),a.createElement("path",{style:Object.assign({path:`M ${r},${r} L -${r},0 L ${r},-${r} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},s)})):null,y=function(t,e){if(!sY(e))return gG().x(t=>t[0]).y(t=>t[1])(t);let n=e.getCenter();return sU()({startAngle:0,endAngle:2*Math.PI,outerRadius:gf(t[0],n),innerRadius:gf(t[1],n)})}(t,o),g=function(t,e){if(!sY(t))return e;let[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}(o,e.transform);return gs(a.createElement("path",{})).call(gM,f).style("d",y).style("stroke",p).style("lineWidth",h).style("transform",g).style("markerEnd",d).call(gM,i).node()}};bH.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let bV=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(oX)?[t,e]:[t,rN({},e,{encode:{x:oG(n)}})]};bV.props={};let bU={line:bH},bq=t=>(e,n,r,i)=>{let{x:o}=r,a=o8(n,r,rN({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[o[t],1],[o[t],0]].map(e=>i.map(a(e,t))));return[e,l]};bq.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:bU,channels:[...o3({shapes:Object.keys(bU)}),{name:"x",required:!0}],preInference:[...o4(),{type:bV}],postInference:[]};let bY=()=>(t,e)=>{let{data:n}=e;return!Array.isArray(n)||n.some(oX)?[t,e]:[t,rN({},e,{encode:{y:oG(n)}})]};bY.props={};let bX={line:bH},bK=t=>(e,n,r,i)=>{let{y:o}=r,a=o8(n,r,rN({style:{bandOffset:0}},t)),l=Array.from(e,t=>[[0,o[t]],[1,o[t]]].map(e=>i.map(a(e,t))));return[e,l]};bK.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:bX,channels:[...o3({shapes:Object.keys(bX)}),{name:"y",required:!0}],preInference:[...o4(),{type:bY}],postInference:[]};var bZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function bQ(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}let bJ=(t,e)=>{let{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:o,endMarker:a=!0}=t,l=bZ(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:s}=e;return(t,e,n)=>{let{color:u,connectLength1:c}=n,f=bZ(n,["color","connectLength1"]),{color:p,transform:h}=e,d=function(t,e,n,r,i=0){let[[o,a],[l,s]]=e;if(sq(t)){let t=o+n,e=t+i;return[[t,a],[e,a],[e,s],[l+r,s]]}let u=a-n,c=u-i;return[[o,u],[o,c],[l,c],[l,s-r]]}(s,t,r,i,null!=o?o:c),y=rW(Object.assign(Object.assign({},l),n),"endMarker");return gs(new d1).call(gM,f).style("path",gG().x(t=>t[0]).y(t=>t[1])(d)).style("stroke",p||u).style("transform",h).style("markerEnd",a?new vY({className:"marker",style:Object.assign(Object.assign({},y),{symbol:bQ})}):null).call(gM,l).node()}};bJ.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let b0={connector:bJ},b1=(...t)=>bk(...t);function b2(t,e,n,r){if(e)return()=>[0,1];let{[t]:i,[`${t}1`]:o}=n;return t=>{var e;let n=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+o[t])))||0;return[i[t],o[t]+n]}}function b5(t={}){let{extendX:e=!1,extendY:n=!1}=t;return(t,r,i,o)=>{let a=b2("x",e,i,r.x),l=b2("y",n,i,r.y),s=Array.from(t,t=>{let[e,n]=a(t),[r,i]=l(t);return[[e,r],[n,r],[n,i],[e,i]].map(t=>o.map(t))});return[t,s]}}b1.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:b0,channels:[...o3({shapes:Object.keys(b0)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4()],postInference:[]};let b3={range:gR},b4=()=>b5();b4.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:b3,channels:[...o3({shapes:Object.keys(b3)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4()],postInference:[]};let b6=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(oX))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,rN({},e,{encode:{x:oG(r(n,0)),x1:oG(r(n,1))}})]}return[t,e]};b6.props={};let b8={range:gR},b9=()=>b5({extendY:!0});b9.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:b8,channels:[...o3({shapes:Object.keys(b8)}),{name:"x",required:!0}],preInference:[...o4(),{type:b6}],postInference:[]};let b7=()=>(t,e)=>{let{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(oX))){let r=(t,e)=>Array.isArray(t[0])?t.map(t=>t[e]):[t[e]];return[t,rN({},e,{encode:{y:oG(r(n,0)),y1:oG(r(n,1))}})]}return[t,e]};b7.props={};let xt={range:gR},xe=()=>b5({extendX:!0});xe.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:xt,channels:[...o3({shapes:Object.keys(xt)}),{name:"y",required:!0}],preInference:[...o4(),{type:b7}],postInference:[]};var xn=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xr=(t,e)=>{let{arrow:n,colorAttribute:r}=t,i=xn(t,["arrow","colorAttribute"]),{coordinate:o,document:a}=e;return(t,e,n)=>{let{color:l,stroke:s}=n,u=xn(n,["color","stroke"]),{d:c,color:f=l}=e,[p,h]=o.getSize();return gs(a.createElement("path",{})).call(gM,u).style("d","function"==typeof c?c({width:p,height:h}):c).style(r,f).call(gM,i).node()}};xr.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xi=(t,e)=>xr(Object.assign({colorAttribute:"fill"},t),e);xi.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xo=(t,e)=>xr(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);xo.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xa={path:xi,hollow:xo},xl=t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])];xl.props={defaultShape:"path",defaultLabelShape:"label",shape:xa,composite:!1,channels:[...o1({shapes:Object.keys(xa)}),{name:"d",scale:"identity"}],preInference:[...o4()],postInference:[]};var xs=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xu=(t,e)=>{let{render:n}=t,r=xs(t,["render"]);return t=>{let[[i,o]]=t;return n(Object.assign(Object.assign({},r),{x:i,y:o}),e)}};xu.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xc=()=>(t,e)=>{let{style:n={}}=e;return[t,rN({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]};xc.props={};let xf=t=>{let{cartesian:e}=t;return e?o7:(e,n,r,i)=>{let{x:o,y:a}=r,l=o8(n,r,t),s=Array.from(e,t=>{let e=[+o[t],+a[t]];return[i.map(l(e,t))]});return[e,s]}};xf.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:{shape:xu},channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...o4(),{type:v2},{type:v3},{type:xc}]};var xp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xh=(t,e)=>{let{document:n}=e;return(e,r,i)=>{let{transform:o}=r,{color:a}=i,l=xp(i,["color"]),{color:s=a}=r,[u,...c]=e,f=sF();return f.moveTo(...u),c.forEach(([t,e])=>{f.lineTo(t,e)}),f.closePath(),gs(n.createElement("path",{})).call(gM,l).style("d",f.toString()).style("stroke",s||a).style("fill",s||a).style("fillOpacity",.4).style("transform",o).call(gM,t).node()}};xh.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xd={density:xh},xy=()=>(t,e,n,r)=>{let{x:i,series:o}=n,a=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t),l=Object.entries(n).filter(([t])=>t.startsWith("size")).map(([,t])=>t);if(void 0===i||void 0===a||void 0===l)throw Error("Missing encode for x or y or size channel.");let s=e.x,u=e.series,c=Array.from(t,e=>{let n=s.getBandWidth(s.invert(+i[e])),c=u?u.getBandWidth(u.invert(+(null==o?void 0:o[e]))):1,f=(+(null==o?void 0:o[e])||0)*n,p=+i[e]+f+n*c/2;return[...a.map((n,r)=>[p+ +l[r][e]/t.length,+a[r][e]]),...a.map((n,r)=>[p-+l[r][e]/t.length,+a[r][e]]).reverse()].map(t=>r.map(t))});return[t,c]};function xg(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}function xm(t,e,n){let r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}xy.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:xd,channels:[...o1({shapes:Object.keys(xd)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...o4(),{type:sb},{type:sx}],postInference:[...o5()],interaction:{shareTooltip:!0}},xg(3);let xv=function(t,e=(...t)=>`${t[0]}`,n=16){let r=xg(n);return(...n)=>{let i=e(...n),o=r.get(i);return r.has(i)?r.get(i):(o=t(...n),r.set(i,o),o)}}((t,e,n)=>{let r=xm(n,2*t,2*t),i=r.getContext("2d");if(1===e)i.beginPath(),i.arc(t,t,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{let n=i.createRadialGradient(t,t,t*e,t,t,t);n.addColorStop(0,"rgba(0,0,0,1)"),n.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=n,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);var xb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let xx=(t,e)=>{let{gradient:n,opacity:r,maxOpacity:i,minOpacity:o,blur:a,useGradientOpacity:l}=t,s=xb(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:u,createCanvas:c,document:f}=e;return(t,e,p)=>{var h,d;let{transform:y}=e,[g,v]=u.getSize(),b=t.map(t=>({x:t[0],y:t[1],value:t[2],radius:t[3]})),x=le(t,t=>t[2]),O=lo(t,t=>t[2]),w=g&&v?function(t,e,n,r,i,o,a){let l=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},o);l.minOpacity*=255,l.opacity*=255,l.maxOpacity*=255;let s=xm(a,t,e).getContext("2d"),u=function(t,e){let n=xm(e,256,1).getContext("2d"),r=n.createLinearGradient(0,0,256,1);return("string"==typeof t?t.split(" ").map(t=>{let[e,n]=t.split(":");return[+e,n]}):t).forEach(([t,e])=>{r.addColorStop(t,e)}),n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}(l.gradient,a);s.clearRect(0,0,t,e),function(t,e,n,r,i,o){let{blur:a}=i,l=r.length;for(;l--;){let{x:i,y:s,value:u,radius:c}=r[l],f=Math.min(u,n),p=i-c,h=s-c,d=xv(c,1-a,o);t.globalAlpha=Math.max((f-e)/(n-e),.001),t.drawImage(d,p,h)}}(s,n,r,i,l,a);let c=function(t,e,n,r,i){let{minOpacity:o,opacity:a,maxOpacity:l,useGradientOpacity:s}=i,u=t.getImageData(0,0,e,n),c=u.data,f=c.length;for(let t=3;t<f;t+=4){let e=c[t],n=4*e;if(!n)continue;let i=a||Math.max(0,Math.min(l,Math.max(o,e)));c[t-3]=r[n],c[t-2]=r[n+1],c[t-1]=r[n+2],c[t]=s?r[n+3]:i}return u}(s,t,e,u,l),f=xm(a,t,e).getContext("2d");return f.putImageData(c,0,0),f}(g,v,x,O,b,(h={gradient:n,opacity:r,minOpacity:o,maxOpacity:i,blur:a,useGradientOpacity:l},d=t=>void 0===t,Object.keys(h).reduce((t,e)=>{let n=h[e];return d(n,e)||(t[e]=n),t},{})),c):{canvas:null};return gs(f.createElement("image",{})).call(gM,p).style("x",0).style("y",0).style("width",g).style("height",v).style("src",w.canvas).style("transform",y).call(gM,s).node()}};xx.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};let xO={heatmap:xx},xw=t=>(t,e,n,r)=>{let{x:i,y:o,size:a,color:l}=n;return[[0],[Array.from(t,t=>{let e=a?+a[t]:40;return[...r.map([+i[t],+o[t]]),l[t],e]})]]};xw.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:xO,channels:[...o1({shapes:Object.keys(xO)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...o4(),{type:sx},{type:vx}],postInference:[...o2()]};let xE=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];xE.props={};let xk=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];xk.props={};let xM=t=>new nr(t);xM.props={};let xS=Symbol("defaultUnknown");function x_(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function xP(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==xS)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function xj(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class xA extends eG{getDefaultOptions(){return{domain:[],range:[],unknown:xS}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&x_(this.domainIndexMap,this.getDomain(),this.domainKey),xP({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&x_(this.rangeIndexMap,this.getRange(),this.rangeKey),xP({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=xj(e),this.rangeKey=xj(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new xA(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}let xT=t=>new xA(t);function xC({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function xN(t){return"object"==typeof t?t.valueOf():t}xT.props={};class xL extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=xN,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(xC({map:this.map,initKey:this.initKey},t))}has(t){return super.has(xC({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}class xI extends xA{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:xS,flex:[]}}constructor(t){super(t)}clone(){return new xI(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r,{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null==(e=t.flex)?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new xL(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new xL(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}let xR=t=>new xI(t);function xD(t){return 1e-14>Math.abs(t)?t:parseFloat(t.toFixed(14))}xR.props={};let xF=[1,5,2,2.5,4,3],xB=100*Number.EPSILON,xz=(t,e,n=5,r=!0,i=xF,o=[.25,.2,.5,.05])=>{let a=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||"number"!=typeof t||"number"!=typeof e||!a)return[];if(e-t<1e-15||1===a)return[t];let l={score:-2,lmin:0,lmax:0,lstep:0},s=1;for(;s<1/0;){for(let n=0;n<i.length;n+=1){let c=i[n],f=function(t,e,n){let r=eA(e);return 1-eP(e,t)/(r-1)-n+1}(c,i,s);if(o[0]*f+o[1]+o[2]+o[3]<l.score){s=1/0;break}let p=2;for(;p<1/0;){var u;let n=(u=p)>=a?2-(u-1)/(a-1):1;if(o[0]*f+o[1]+o[2]*n+o[3]<l.score)break;let h=Math.ceil(Math.log10((e-t)/(p+1)/s/c));for(;h<1/0;){let u=s*c*10**h,d=function(t,e,n){let r=e-t;return n>r?1-((n-r)/2)**2/(.1*r)**2:1}(t,e,u*(p-1));if(o[0]*f+o[1]*d+o[2]*n+o[3]<l.score)break;let y=Math.floor(e/u)*s-(p-1)*s,g=Math.ceil(t/u)*s;if(y<=g){let n=g-y;for(let f=0;f<=n;f+=1){let n=u/s*(y+f),h=n+u*(p-1),d=function(t,e,n,r,i,o){let a=eA(e),l=eP(e,t),s=0,u=(r%o+o)%o;return(u<xB||o-u<xB)&&r<=0&&i>=0&&(s=1),1-l/(a-1)-n+s}(c,i,s,n,h,u),g=1-.5*((e-h)**2+(t-n)**2)/(.1*(e-t))**2,v=function(t,e,n,r,i,o){let a=(t-1)/(o-i),l=(e-1)/(Math.max(o,r)-Math.min(n,i));return 2-Math.max(a/l,l/a)}(p,a,t,e,n,h),b=o[0]*d+o[1]*g+o[2]*v+ +o[3];b>l.score&&(!r||n<=t&&h>=e)&&(l.lmin=n,l.lmax=h,l.lstep=u,l.score=b)}}h+=1}p+=1}}s+=1}let c=xD(l.lmax),f=xD(l.lmin),p=xD(l.lstep),h=Math.floor(Math.round((c-f)/p*1e12)/1e12)+1,d=Array(h);d[0]=xD(f);for(let t=1;t<h;t+=1)d[t]=xD(d[t-1]+p);return d};class xW extends eG{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:xz}}map(t){return e1(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new xW(this.options)}getTicks(){let{domain:t,tickCount:e,tickMethod:n}=this.options,[r,i]=t;return eE(r)&&eE(i)?n(r,i,e):[]}}let x$=t=>new xW(t);x$.props={};class xG extends xI{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:xS,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new xG(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}let xH=t=>new xG(t);xH.props={};var xV=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,xU=/\[([^]*?)\]/gm;function xq(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var xY=function(t){return function(e,n){var r=n[t].map(function(t){return t.toLowerCase()}).indexOf(e.toLowerCase());return r>-1?r:null}};function xX(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++){var i=e[r];for(var o in i)t[o]=i[o]}return t}var xK=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],xZ=["January","February","March","April","May","June","July","August","September","October","November","December"],xQ=xq(xZ,3),xJ=xX({},{dayNamesShort:xq(xK,3),dayNames:xK,monthNamesShort:xQ,monthNames:xZ,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:+(t-t%10!=10)*t%10]}}),x0=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},x1={D:function(t){return String(t.getDate())},DD:function(t){return x0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return x0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return x0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return x0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return x0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return x0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return x0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return x0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return x0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return x0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return x0(t.getMilliseconds(),3)},a:function(t,e){return 12>t.getHours()?e.amPm[0]:e.amPm[1]},A:function(t,e){return 12>t.getHours()?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+x0(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+x0(Math.floor(Math.abs(e)/60),2)+":"+x0(Math.abs(e)%60,2)}};xY("monthNamesShort"),xY("monthNames");var x2={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},x5=function(t,e,n){if(void 0===e&&(e=x2.default),void 0===n&&(n={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw Error("Invalid Date pass to format");e=x2[e]||e;var r=[];e=e.replace(xU,function(t,e){return r.push(e),"@@@"});var i=xX(xX({},xJ),n);return(e=e.replace(xV,function(e){return x1[e](t,i)})).replace(/@@@/g,function(){return r.shift()})};function x3(t,e,n,r){let i=(t,e)=>{let i=t=>r(t)%e==0,o=e;for(;o&&!i(t);)n(t,-1),o-=1;return t},o=(t,n)=>{n&&i(t,n),e(t)},a=(t,e)=>{let r=new Date(+t-1);return o(r,e),n(r,e),o(r),r};return{ceil:a,floor:(t,e)=>{let n=new Date(+t);return o(n,e),n},range:(t,e,r,i)=>{let l=[],s=Math.floor(r),u=i?a(t,r):a(t);for(;u<e;n(u,s),o(u))l.push(new Date(+u));return l},duration:t}}let x4=x3(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),x6=x3(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),x8=x3(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),x9=x3(36e5,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getHours()),x7=x3(864e5,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getDate()-1),Ot=x3(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),Oe={millisecond:x4,second:x6,minute:x8,hour:x9,day:x7,week:x3(6048e5,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{let e=Ot.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:Ot,year:x3(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{let n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear())},On=x3(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Or=x3(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),Oi=x3(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Oo=x3(36e5,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+36e5*e)},t=>t.getUTCHours()),Oa=x3(864e5,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+864e5*e)},t=>t.getUTCDate()-1),Ol=x3(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),Os={millisecond:On,second:Or,minute:Oi,hour:Oo,day:Oa,week:x3(6048e5,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+6048e5*e)},t=>{let e=Ol.floor(t);return Math.floor((+new Date(+t)-+e)/6048e5)}),month:Ol,year:x3(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{let n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear())};function Ou(t,e,n,r,i){let o,a=+t,l=+e,{tickIntervals:s,year:u,millisecond:c}=function(t){let{year:e,month:n,week:r,day:i,hour:o,minute:a,second:l,millisecond:s}=t?Os:Oe;return{tickIntervals:[[l,1],[l,5],[l,15],[l,30],[a,1],[a,5],[a,15],[a,30],[o,1],[o,3],[o,6],[o,12],[i,1],[i,2],[r,1],[n,1],[n,3],[e,1]],year:e,millisecond:s}}(i),f=([t,e])=>t.duration*e,p=r?(l-a)/r:n||5,h=r||(l-a)/p,d=s.length,y=eU(s,h,0,d,f);if(y===d){let t=e6(a/u.duration,l/u.duration,p);o=[u,t]}else if(y){let[t,e]=h/f(s[y-1])<f(s[y])/h?s[y-1]:s[y],n=r?Math.ceil(r/t.duration):e;o=[t,n]}else o=[c,Math.max(e6(a,l,p),1)];return o}let Oc=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=Ou(a,l,n,r,i),c=s.range(a,new Date(+l+1),u,!0);return o?c.reverse():c},Of=(t,e,n,r,i)=>{let o=t>e,a=o?e:t,l=o?t:e,[s,u]=Ou(a,l,n,r,i),c=[s.floor(a,u),s.ceil(l,u)];return o?c.reverse():c};function Op(t){let e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class Oh extends ne{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:Oc,interpolate:eZ,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Of}getTickMethodOptions(){let{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){let{mask:t,utc:e}=this.options,n=e?Os:Oe,r=e?Op:ej;return e=>x5(r(e),t||function(t,e){let{second:n,minute:r,hour:i,day:o,week:a,month:l,year:s}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":o.floor(t)<t?"hh A":l.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(e,n))}clone(){return new Oh(this.options)}}let Od=t=>new Oh(t);Od.props={};let Oy=t=>e=>-t(-e),Og=(t,e)=>{let n=Math.log(t),r=t===Math.E?Math.log:10===t?Math.log10:2===t?Math.log2:t=>Math.log(t)/n;return e?Oy(r):r},Om=(t,e)=>{let n=t===Math.E?Math.exp:e=>t**e;return e?Oy(n):n},Ov=(t,e,n,r=10)=>{let i=t<0,o=Om(r,i),a=Og(r,i),l=e<t,s=l?e:t,u=l?t:e,c=a(s),f=a(u),p=[];if(!(r%1)&&f-c<n){if(c=Math.floor(c),f=Math.ceil(f),i)for(;c<=f;c+=1){let t=o(c);for(let e=r-1;e>=1;e-=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}else for(;c<=f;c+=1){let t=o(c);for(let e=1;e<r;e+=1){let n=t*e;if(n>u)break;n>=s&&p.push(n)}}2*p.length<n&&(p=nn(s,u,n))}else{let t=-1===n?f-c:Math.min(f-c,n);p=nn(c,f,t).map(o)}return l?p.reverse():p},Ob=(t,e,n,r)=>{let i=t<0,o=Og(r,i),a=Om(r,i),l=t>e,s=[a(Math.floor(o(l?e:t))),a(Math.ceil(o(l?t:e)))];return l?s.reverse():s};class Ox extends ne{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:eJ,tickMethod:Ov,tickCount:5}}chooseNice(){return Ob}getTickMethodOptions(){let{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){let{base:t,domain:e}=this.options,n=e[0]<0;return[Og(t,n),Om(t,n)]}clone(){return new Ox(this.options)}}let OO=t=>new Ox(t);OO.props={};let Ow=t=>e=>e<0?-((-e)**t):e**t,OE=t=>e=>e<0?-((-e)**(1/t)):e**(1/t),Ok=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class OM extends ne{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:eJ,tickMethod:nn,tickCount:5}}constructor(t){super(t)}chooseTransforms(){let{exponent:t}=this.options;return 1===t?[ej,ej]:[.5===t?Ok:Ow(t),OE(t)]}clone(){return new OM(this.options)}}let OS=t=>new OM(t);OS.props={};class O_ extends OM{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:eJ,tickMethod:nn,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new O_(this.options)}}let OP=t=>new O_(t);OP.props={};class Oj extends eG{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(t){super(t)}map(t){if(!e1(t))return this.options.unknown;let e=eU(this.thresholds,t,0,this.n);return this.options.range[e]}invert(t){let{range:e}=this.options,n=e.indexOf(t),r=this.thresholds;return[r[n-1],r[n]]}clone(){return new Oj(this.options)}rescale(){let{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}let OA=t=>new Oj(t);OA.props={};class OT extends Oj{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:xz}}constructor(t){super(t)}rescale(){let{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=function(t,e,n=!1){n||t.sort((t,e)=>t-e);let r=[];for(let n=1;n<e;n+=1)r.push(function(t,e){let n=t.length;if(!n)return;if(n<2)return t[n-1];let r=(n-1)*e,i=Math.floor(r),o=t[i];return o+(t[i+1]-o)*(r-i)}(t,n/e));return r}(t,this.n+1,!1)}invert(t){let[e,n]=super.invert(t),{domain:r}=this.options,i=r[0],o=r[r.length-1];return void 0===e&&void 0===n?[e,n]:[e||i,n||o]}getThresholds(){return this.thresholds}clone(){return new OT(this.options)}getTicks(){let{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}let OC=t=>new OT(t);OC.props={};class ON extends Oj{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:xz}}constructor(t){super(t)}nice(){let{nice:t}=this.options;if(t){let[t,e,n]=this.getTickMethodOptions();this.options.domain=e8(t,e,n)}}getTicks(){let{tickMethod:t}=this.options,[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();let{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){let[e,n]=super.invert(t),[r,i]=this.options.domain;return void 0===e&&void 0===n?[e,n]:[e||r,n||i]}getThresholds(){return this.thresholds}clone(){return new ON(this.options)}}let OL=t=>new ON(t);OL.props={};let OI=t=>e=>{let n=t(e);return eE(n)?Math.round(n):n},OR=et=class extends nr{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ej,tickMethod:nn,tickCount:5}}constructor(t){super(t)}clone(){return new et(this.options)}};OR=et=function(t,e,n,r){var i,o=arguments.length,a=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var l=t.length-1;l>=0;l--)(i=t[l])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}([(L=function(t){return[t(0),t(1)]},I=t=>{let[e,n]=t;return eV(eZ(0,1),eH(e,n))},t=>{t.prototype.rescale=function(){this.initRange(),this.nice();let[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){let{interpolator:t}=this.options;this.options.range=L(t)},t.prototype.composeOutput=function(t,e){let{domain:n,interpolator:r,round:i}=this.getOptions(),o=I(n.map(t)),a=i?OI(r):r;this.output=eV(a,o,e,t)},t.prototype.invert=void 0})],OR);let OD=t=>new OR(t);OD.props={};class OF extends eG{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:nn}}map(t){let[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){let[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){let{tickMethod:t,domain:e,tickCount:n}=this.options,[r,i]=e;return eE(r)&&eE(i)?t(r,i,n):[]}clone(){return new OF(this.options)}}let OB=t=>new OF(t);function Oz({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:o,padding2:a,padding3:l,alpha90:s,alpha65:u,alpha45:c,alpha25:f,alpha10:p,category10:h,category20:d,sizeDefault:y=1,padding:g="auto",margin:v=16}){return{padding:g,margin:v,size:y,color:t,category10:h,category20:d,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:p,labelAlign:"horizontal",labelFill:e,labelOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:o,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:c,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:c,titleFill:e,titleOpacity:s,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:s,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[o,o],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:o,colPadding:a,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:c,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:c,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:s,tickStroke:e,tickStrokeOpacity:c},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:e,titleFillOpacity:s,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:u,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}OB.props={};let OW=Oz({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),O$=t=>rN({},OW,t);O$.props={};let OG=t=>rN({},O$(),{category10:"category10",category20:"category20"},t);OG.props={};let OH=Oz({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"#141414",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),OV=t=>rN({},OH,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{".g2-tooltip":{background:"#1f1f1f",opacity:.95},".g2-tooltip-title":{color:"#A6A6A6"},".g2-tooltip-list-item-name-label":{color:"#A6A6A6"},".g2-tooltip-list-item-value":{color:"#A6A6A6"}}}},t),OU=t=>Object.assign({},OV(),{category10:"category10",category20:"category20"},t);OU.props={};let Oq=Oz({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),OY=t=>rN({},Oq,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(t,e)=>0!==e},axisRight:{gridFilter:(t,e)=>0!==e},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);OY.props={};var OX=function(t){return null==t};function OK(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(t){var n=eF(t,1)[0];return!e.includes(n)}));return Object.fromEntries(e.map(function(e){return"boolean"!=typeof t&&"enter"in t&&"update"in t&&"exit"in t?!1===t[e]?[e,!1]:[e,eN(eN({},t[e]),n)]:[e,n]}))}function OZ(t,e){t?t.finished.then(e):e()}function OQ(t,e){"update"in t?t.update(e):t.attr(e)}function OJ(t,e,n){return 0===e.length?null:n?t.animate(e,n):(OQ(t,{style:e.slice(-1)[0]}),null)}function O0(t,e,n){var r={},i={};return(Object.entries(e).forEach(function(e){var n=eF(e,2),o=n[0],a=n[1];if(!OX(a)){var l=t.style[o]||t.parsedStyle[o]||0;l!==a&&(r[o]=l,i[o]=a)}}),n)?OJ(t,[r,i],eN({fill:"both"},n)):(OQ(t,i),null)}var O1=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(function(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}(n,o)){var a=n[o];null!==a&&vT(a)?(vT(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):vC(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},O2=function(t,e){var n=function(t){return"".concat(e,"-").concat(t)},r=Object.fromEntries(Object.entries(t).map(function(t){var e=eF(t,2),r=e[0],i=n(e[1]);return[r,{name:i,class:".".concat(i),id:"#".concat(i),toString:function(){return i}}]}));return Object.assign(r,{prefix:n}),r},O5={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new d1({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]};O1({},O5,{style:{type:"arc"}}),O1({},O5,{style:{}});var O3=O2({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis");function O4(t,e){return[t[0]*e,t[1]*e]}function O6(t,e){return[t[0]+e[0],t[1]+e[1]]}function O8(t,e){return[t[0]-e[0],t[1]-e[1]]}function O9(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function O7(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function wt(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function we(t){if(0===t[0]&&0===t[1])return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function wn(t){return t*Math.PI/180}function wr(t){return Number((180*t/Math.PI).toPrecision(5))}function wi(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function wo(t,e,n){void 0===n&&(n=!0);var r,i=e||(null==(r=t.match(/^([a-z][a-z0-9]+)/))?void 0:r[0])||"",o=t.replace(new RegExp("^(".concat(i,")")),"");return n?o.toString().charAt(0).toLowerCase()+o.toString().slice(1):o}var wa=function(t,e){if(!(null==t?void 0:t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function wl(t,e,n){void 0===n&&(n=!1);var r={};return Object.entries(t).forEach(function(t){var i=eF(t,2),o=i[0],a=i[1];if("className"===o||"class"===o);else if(wa(o,"show")&&wa(wo(o,"show"),e)!==n)o==="".concat("show").concat(wi(e))?r[o]=a:r[o.replace(new RegExp(wi(e)),"")]=a;else if(!wa(o,"show")&&wa(o,e)!==n){var l=wo(o,e);"filter"===l&&"function"==typeof a||(r[l]=a)}}),r}function ws(t,e){return Object.entries(t).reduce(function(t,n){var r=eF(n,2),i=r[0],o=r[1];return i.startsWith("show")?t["show".concat(e).concat(i.slice(4))]=o:t["".concat(e).concat(wi(i))]=o,t},{})}function wu(t,e){void 0===e&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(t).forEach(function(t){var o=eF(t,2),a=o[0],l=o[1];e.includes(a)||(-1!==n.indexOf(a)?i[a]=l:r[a]=l)}),[r,i]}function wc(t,e){return vk(t)?t.apply(void 0,ez([],eF(e),!1)):t}function wf(t,e){return t.style.opacity||(t.style.opacity=1),O0(t,{opacity:0},e)}var wp=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function wh(t){var e={};for(var n in t)wp.includes(n)&&(e[n]=t[n]);return e}var wd=O2({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function wy(t){return t.reduce(function(t,e,n){return t.push(ez([0===n?"M":"L"],eF(e),!1)),t},[])}function wg(t,e,n){if("surround"===e.type){var r=e.connect,i=e.center;if("line"===(void 0===r?"line":r))return wy(t);if(!i)return[];var o=wt(t[0],i),a=+!n;return t.reduce(function(t,e,n){return 0===n?t.push(ez(["M"],eF(e),!1)):t.push(ez(["A",o,o,0,0,a],eF(e),!1)),t},[])}return wy(t)}var wm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,o,a,l=eL(t,["type","center","areaFill","closed"]),s=(r=void 0===(n=t.data)?[]:n,t.closed?r.map(function(t){var e=t.points,n=eF(e,1)[0];return eN(eN({},t),{points:ez(ez([],eF(e),!1),[n],!1)})}):r),u=v$(e).maybeAppendByClassName(wd.lineGroup,"g"),c=v$(e).maybeAppendByClassName(wd.regionGroup,"g"),f=(i=t.animate,o=t.isBillboard,a=s.map(function(e,n){return{id:e.id||"grid-line-".concat(n),path:wg(e.points,t)}}),u.selectAll(wd.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){var n=wc(wh(eN({path:t.path},l)),[t,e,a]);this.attr(eN({class:wd.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:o},n))})},function(t){return t.transition(function(t,e){return O0(this,wc(wh(eN({path:t.path},l)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=wf(this,i.exit);return OZ(e,function(){return t.remove()}),e})}).transitions()),p=function(t,e,n){var r=n.animate,i=n.connect,o=n.areaFill;if(e.length<2||!o||!i)return[];for(var a=Array.isArray(o)?o:[o,"transparent"],l=[],s=0;s<e.length-1;s++){var u=eF([e[s].points,e[s+1].points],2),c=function(t,e,n){var r=n.type,i=n.connect,o=n.center,a=n.closed?[["Z"]]:[],l=eF([wg(t,n),wg(e.slice().reverse(),n,!0)],2),s=l[0],u=l[1],c=eF([t[0],e.slice(-1)[0]],2),f=c[0],p=c[1],h=function(t,e){return[s,t,u,e,a].flat()};if("line"===i||"surround"===r)return h([ez(["L"],eF(p),!1)],[ez(["L"],eF(f),!1)]);if(!o)throw Error("Arc grid need to specified center");var d=eF([wt(p,o),wt(f,o)],2),y=d[0],g=d[1];return h([ez(["A",y,y,0,0,1],eF(p),!1),ez(["L"],eF(p),!1)],[ez(["A",g,g,0,0,0],eF(f),!1),ez(["L"],eF(f),!1)])}(u[0],u[1],n);l.push({path:c,fill:a[s%a.length]})}return t.selectAll(wd.region.class).data(l,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){var n=wc(t,[t,e,l]);this.attr(n)}).attr("className",wd.region.name)},function(t){return t.transition(function(t,e){return O0(this,wc(t,[t,e,l]),r.update)})},function(t){return t.transition(function(){var t=this,e=wf(this,r.exit);return OZ(e,function(){return t.remove()}),e})}).transitions()}(c,s,t);return ez(ez([],eF(f),!1),eF(p),!1)},e}(vF),wv=function(t,e,n){for(var r=0,i=vq(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},wb=function(t){return vA(t,"Number")};function wx(t){return"function"==typeof t?t():vq(t)||wb(t)?new vz({style:{text:String(t)}}):t}function wO(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=e/Math.max(r.width,r.height);return n&&t.scale(i),i}function ww(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)r.includes(i)||(n[i]=t[i]);return n}function wE(t,e){return Object.fromEntries(Object.entries(t).map(function(t){var n=eF(t,2);return[n[0],wc(n[1],e)]}))}function wk(t,e){return e&&vk(e)?t.filter(e):t}function wM(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n}function wS(t,e){if("linear"===e.type){var n=eF(e.startPos,2),r=n[0],i=n[1],o=eF(e.endPos,2),a=eF([o[0]-r,o[1]-i],2);return we([a[0],a[1]])}var l=wn(wM(t,e));return[-Math.sin(l),Math.cos(l)]}function w_(t,e,n){var r;return r=wS(t,n),"positive"!==e?[r[1],-r[0]]:[-r[1],r[0]]}function wP(t,e){return w_(t,e.labelDirection,e)}function wj(t,e){var n,r,i,o,a,l,s,u,c,f;return"linear"===e.type?(r=(n=eF(e.startPos,2))[0],i=n[1],o=eF(e.endPos,2),a=eF([o[0]-r,o[1]-i],2),[r+a[0]*t,i+a[1]*t]):(l=e.radius,u=(s=eF(e.center,2))[0],c=s[1],[u+l*Math.cos(f=wn(wM(t,e))),c+l*Math.sin(f)])}function wA(t){return 0===wS(0,t)[1]}function wT(t){return 0===wS(0,t)[0]}function wC(t,e,n,r,i){var o=e-t,a=eF([i,i],2),l=a[0],s=a[1],u=eF([wn(t),wn(e)],2),c=u[0],f=u[1],p=function(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]},h=eF(p(c),2),d=h[0],y=h[1],g=eF(p(f),2),v=g[0],b=g[1];if(e-t==360){var x=eF(p((f+c)/2),2);return[["M",d,y],["A",l,s,0,1,0,x[0],x[1]],["A",l,s,0,1,0,v,b]]}return"M".concat(d,",").concat(y,",A").concat(l,",").concat(s,",0,").concat(+(o>180),",").concat(t>e?0:1,",").concat(v,",").concat(b)}function wN(t){var e=eF(t,2),n=eF(e[0],2),r=n[0],i=n[1],o=eF(e[1],2);return{x1:r,y1:i,x2:o[0],y2:o[1]}}function wL(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function wI(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!1),!!r&&t===e||!!i&&t===n||t>e&&t<n}var wR=function(t,e,n){if(void 0===n&&(n=128),!vk(t))throw TypeError("Expected a function");var r=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var l=t.apply(this,n);return a.set(o,l),l};return r.cache=function(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}(n),r}(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return en?en(t,n):(ee||(ee=dT.offscreenCanvasCreator.getOrCreateContext(void 0)),ee.font=[o,a,i,"".concat(n,"px"),r].join(" "),ee.measureText(t).width)},function(t,e){return[t,Object.values(e||wD(t)).join()].join("")},4096),wD=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,o=t.style.fontSize;return{fontSize:o="object"==typeof o?o.value:o,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function wF(t){return"text"===t.nodeName?t:"g"===t.nodeName&&1===t.children.length&&"text"===t.children[0].nodeName?t.children[0]:null}function wB(t,e){var n=wF(t);n&&n.attr(e)}function wz(t,e,n){void 0===n&&(n="..."),wB(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function wW(t,e){if(e)try{var n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(e,n,r){var i,o,a,l;return"translate(".concat((o=(i=t.getBBox()).width,a=i.height,[(l=eF([n,r].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?o:a):t}),2))[0],l[1]]),")")});t.attr("transform",n)}catch(t){}}var w$=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function wG(t){if(wb(t))return[t,t,t,t];if(vC(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var wH=function(){function t(t,e,n,r){this.set(t,e,n,r)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,o=this.x2,a=this.y2,l=Math.cos(t),s=Math.sin(t),u=e-e*l+n*s,c=n-e*s-n*l;return[[l*r-s*a+u,s*r+l*a+c],[l*o-s*a+u,s*o+l*a+c],[l*r-s*i+u,s*r+l*i+c],[l*o-s*i+u,s*o+l*i+c]]},t.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},t.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},t}();function wV(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=eF(r.min,2),o=i[0],a=i[1],l=eF(r.max,2),s=l[0],u=l[1],c=wU(t),f=c.width,p=c.height,h=0,d=0,y=o,g=a,v=wF(t);if(v){p-=1.5;var b=v.style.textAlign,x=v.style.textBaseline;"center"===b?y=(o+s)/2:("right"===b||"end"===b)&&(y=s),"middle"===x?g=(a+u)/2:"bottom"===x&&(g=u)}var O=eF(wG(e),4),w=O[0],E=void 0===w?0:w,k=O[1],M=void 0===k?0:k,S=O[2],_=O[3],P=new wH((h+=o)-(void 0===_?M:_),(d+=a)-E,h+f+M,d+p+(void 0===S?E:S));return t.setEulerAngles(n),P.rotatedPoints(wn(n),y,g)}function wU(t){return t.__bbox__?t.__bbox__:t.getBBox()}function wq(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function wY(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return 0===r?0:r<0?2:1}function wX(t,e,n){var r,i,o=e.crossPadding,a=new Set,l=null,s=function(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if("arc"===n){var o=t.center,a=t.radius,l=eF(o,2),s=l[0],u=l[1],c="negative"===r?0:i,f=-a-c,p=a+c,h=eF(wG(e),4),d=h[0],y=h[1],g=h[2];return new wH(s+f-h[3],u+f-d,s+p+y,u+p+g)}var v=eF(t.startPos,2),b=v[0],x=v[1],O=eF(t.endPos,2),w=O[0],E=O[1],k=eF(wT(t)?[-e,0,e,0]:[0,e,0,-e],4),M=k[0],S=k[1],_=k[2],P=k[3],j=O4(wP(0,t),i),A=new wH(b,x,w,E);return A.x1+=P,A.y1+=M,A.x2+=S+j[0],A.y2+=_+j[1],A}(e,o);try{for(var u=eD(t),c=u.next();!c.done;c=u.next()){var f,p=c.value;!function(t){if(s){var e,n,r,i,o,a;return e=s.x1,n=s.x2,r=s.y1,i=s.y2,o=wV(t,void 0),a=[[e,r],[n,r],[n,i],[e,i]],o.every(function(t){return function(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,o=0;do{var a=[t[o],t[(o+1)%n]];if(function(t,e){var n=wY(t[0],t[1],e[0]),r=wY(t[0],t[1],e[1]),i=wY(e[0],e[1],t[0]),o=wY(e[0],e[1],t[1]);return!!(n!==r&&i!==o||0===n&&wq(t,e[0])||0===r&&wq(t,e[1])||0===i&&wq(e,t[0])||0===o&&wq(e,t[1]))}(a,r)){if(0===wY(a[0],e,a[1]))return wq(a,e);i++}o=(o+1)%n}while(0!==o);return!!(1&i)}(a,t)})}return!0}(p)?a.add(p):l&&(f=l,f?function(t,e,n){var r,i,o=wV(t,n).flat(1),a=wV(e,n).flat(1),l=[[o[0],o[1],o[2],o[3]],[o[0],o[1],o[4],o[5]],[o[4],o[5],o[6],o[7]],[o[2],o[3],o[6],o[7]]];try{for(var s=eD(l),u=s.next();!u.done;u=s.next()){var c=u.value;if(function(t,e){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return function(t,e){var n=eF(t,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eF(e,4),s=l[0],u=l[1],c=l[2],f=l[3],p=o-r,h=a-i,d=c-s,y=f-u,g=p*y-d*h;if(0===g)return!1;var v=g>0,b=r-s,x=i-u,O=p*x-h*b;if(O<0===v)return!1;var w=d*x-y*b;return w<0!==v&&O>g!==v&&w>g!==v}(e,t)})}(a,c))return!0}}catch(t){r={error:t}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return!1}(f,p,wG(n)):0)?(a.add(l),a.add(p)):l=p}}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}return Array.from(a)}function wK(t,e){return(void 0===e&&(e={}),OX(t))?0:"number"==typeof t?t:Math.floor(wR(t,e))}function wZ(t){var e=t.getLocalBounds(),n=eF([e.min,e.max],2),r=eF(n[0],2),i=r[0],o=r[1],a=eF(n[1],2),l=a[0],s=a[1];return{x:i,y:o,width:l-i,height:s-o,left:i,bottom:s,top:o,right:l}}function wQ(t,e){var n=eF(t,2),r=n[0],i=n[1],o=eF(e,2),a=o[0],l=o[1];return r!==a&&i===l}var wJ={parity:function(t,e){var n=e.seq,r=void 0===n?2:n;return t.filter(function(t,e){return!(e%r)||(vS(t),!1)})}},w0=new Map([["hide",function(t,e,n,r){var i,o,a=t.length,l=e.keepHeader,s=e.keepTail;if(!(a<=1)&&(2!==a||!l||!s)){var u=wJ.parity,c=function(t){return t.forEach(r.show),t},f=2,p=t.slice(),h=t.slice(),d=Math.min.apply(Math,ez([1],eF(t.map(function(t){return wU(t).width})),!1));if("linear"===n.type&&(wA(n)||wT(n))){var y=wZ(t[0]).left,g=Math.abs(wZ(t[a-1]).right-y)||1;f=Math.max(Math.floor(a*d/g),f)}for(l&&(i=p.splice(0,1)[0]),s&&(o=p.splice(-1,1)[0],p.reverse()),c(p);f<t.length&&wX((o?ez(ez([o],eF(h),!1),[i],!1):ez([i],eF(h),!1)).filter(w$),n,null==e?void 0:e.margin).length;){if(o&&!i&&f%2==0){var v=p.splice(0,1);v.forEach(r.hide)}else if(o&&i){var v=p.splice(0,1);v.forEach(r.hide)}h=u(c(p),{seq:f}),f++}}}],["rotate",function(t,e,n,r){var i,o,a=e.optionalAngles,l=e.margin,s=e.recoverWhenFailed,u=t.map(function(t){return t.getLocalEulerAngles()}),c=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.rotate(t,+i)})};try{for(var f=eD(void 0===a?[0,45,90]:a),p=f.next();!p.done;p=f.next()){var h=p.value;if(c(h),wX(t,n,l).length<1)return}}catch(t){i={error:t}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}(void 0===s||s)&&c(u)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1)){var i=e.suffix,o=void 0===i?"...":i,a=e.minLength,l=e.maxLength,s=void 0===l?1/0:l,u=e.step,c=e.margin,f=void 0===c?[0,0,0,0]:c,p=wD(r.getTextShape(t[0])),h=wK(void 0===u?" ":u,p),d=a?wK(a,p):h,y=wK(s,p);(OX(y)||y===1/0)&&(y=Math.max.apply(null,t.map(function(t){return wU(t).width})));for(var g=t.slice(),v=eF(f,4),b=(v[0],v[1],v[2],v[3],function(e){if(g.forEach(function(t){r.ellipsis(r.getTextShape(t),e,o)}),(g=wX(t,n,f)).length<1)return{value:void 0}}),x=y;x>d+h;x-=h){var O=b(x);if("object"==typeof O)return O.value}}}],["wrap",function(t,e,n,r){var i,o,a=e.wordWrapWidth,l=void 0===a?50:a,s=e.maxLines,u=void 0===s?3:s,c=e.recoverWhenFailed,f=e.margin,p=void 0===f?[0,0,0,0]:f,h=t.map(function(t){return t.attr("maxLines")||1}),d=Math.min.apply(Math,ez([],eF(h),!1)),y=(i=n.type,o=n.labelDirection,"linear"===i&&wA(n)?"negative"===o?"bottom":"top":"middle"),g=function(e){return t.forEach(function(t,n){var i=Array.isArray(e)?e[n]:e;r.wrap(t,l,i,y)})};if(!(d>u)){for(var v=d;v<=u;v++)if(g(v),wX(t,n,p).length<1)return;(void 0===c||c)&&g(h)}}]]);function w1(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function w2(t,e){var n=eF(t,2),r=n[0],i=n[1],o=eF(e,2),a=o[0],l=o[1],s=eF([r*a+i*l,r*l-i*a],2),u=s[0];return Math.atan2(s[1],u)}function w5(t,e,n){var r=n.type,i=n.labelAlign,o=wP(t,n),a=w1(e),l=w1(wr(w2([1,0],o))),s="center",u="middle";return"linear"===r?[90,270].includes(l)&&0===a?(s="center",u=1===o[1]?"top":"bottom"):!(l%180)&&[90,270].includes(a)?s="center":0===l?wI(a,0,90,!1,!0)?s="start":(wI(a,0,90)||wI(a,270,360))&&(s="start"):90===l?wI(a,0,90,!1,!0)?s="start":(wI(a,90,180)||wI(a,270,360))&&(s="end"):270===l?wI(a,0,90,!1,!0)?s="end":(wI(a,90,180)||wI(a,270,360))&&(s="start"):180===l&&(90===a?s="start":(wI(a,0,90)||wI(a,270,360))&&(s="end")):"parallel"===i?u=wI(l,0,180,!0)?"top":"bottom":"horizontal"===i?wI(l,90,270,!1)?s="end":(wI(l,270,360,!1)||wI(l,0,90))&&(s="start"):"perpendicular"===i&&(s=wI(l,90,270)?"end":"start"),{textAlign:s,textBaseline:u}}function w3(t,e,n){var r=n.showTick,i=n.tickLength,o=n.tickDirection,a=n.labelDirection,l=n.labelSpacing,s=e.indexOf(t),u=wc(l,[t,s,e]),c=eF([wP(t.value,n),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(a,o)],2),f=eF(O6(O4(c[0],u+(1===c[1]?wc(r?i:0,[t,s,e]):0)),wj(t.value,n)),2);return{x:f[0],y:f[1]}}function w4(t,e){"text"===t.nodeName&&t.attr(e)}function w6(t){var e,n,r,i;e=this.node().childNodes,n={hide:vS,show:vM,rotate:function(e,n){var r,i,o;r=+n,e.setLocalEulerAngles(r),i=w5(e.__data__.value,r,t),(o=e.querySelector(O3.labelItem.class))&&w4(o,i)},ellipsis:function(t,e,n){t&&wz(t,e||1/0,n)},wrap:function(t,e,n){var r,i;t&&(void 0===(r=n)&&(r=2),void 0===i&&(i="top"),wB(t,{wordWrap:!0,wordWrapWidth:e,maxLines:r,textBaseline:i}))},getTextShape:function(t){return t.querySelector("text")}},(i=void 0===(r=t.labelOverlap)?[]:r).length&&i.forEach(function(r){var i=r.type,o=w0.get(i);t.labelOverlap.length<1||("hide"===i?function(t){for(var e=t;e;){if("offscreen"===e.className)return!0;e=e.parent}return!1}(e[0]):"rotate"===i?e.some(function(t){var e;return!!(null==(e=t.attr("transform"))?void 0:e.includes("rotate"))}):("ellipsis"===i||"wrap"===i)&&!(e.filter(function(t){return t.querySelector("text")}).length>1))||null==o||o(e,r,t,n)})}function w8(t,e,n,r,i){var o,a=n.indexOf(e),l=v$(t).append(vk(o=i.labelFormatter)?function(){return wx(wc(o,[e,a,n,wP(e.value,i)]))}:function(){return wx(e.label||"")}).attr("className",O3.labelItem.name).node(),s=eF(wu(wE(r,[e,a,n])),2),u=s[0],c=s[1],f=c.transform,p=eL(c,["transform"]);wW(t,f);var h=function(t,e,n){var r,i,o=n.labelAlign;if(null==(i=e.style.transform)?void 0:i.includes("rotate"))return e.getLocalEulerAngles();var a=0,l=wP(t.value,n),s=wS(t.value,n);return"horizontal"===o?0:(wI(r=(wr(a="perpendicular"===o?w2([1,0],l):w2([s[0]<0?-1:1,0],s))+360)%180,-90,90)||(r+=180),r)}(e,t,i);return t.setLocalEulerAngles(+h),w4(l,eN(eN({},w5(e.value,h,i)),u)),wW(t,f),t.attr(p),l}function w9(t,e){return w_(t,e.tickDirection,e)}function w7(t,e,n,r,i,o){var a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E,k,M,S,_=(a=v$(this),l=r.tickFormatter,s=w9(t.value,r),u="line",vk(l)&&(u=function(){return wc(l,[t,e,n,s])}),a.append(u).attr("className",O3.tickItem.name));c=w9(t.value,r),x=(h=eF((f=wc(r.tickLength,[t,e,n]),[[0,0],[(p=eF(c,2))[0]*f,p[1]*f]]),2),y=(d=eF(h[0],2))[0],g=d[1],b={x1:y,x2:(v=eF(h[1],2))[0],y1:g,y2:v[1]}).x1,O=b.x2,w=b.y1,E=b.y2,M=(k=eF(wu(wE(i,[t,e,n,c])),2))[0],S=k[1],"line"===_.node().nodeName&&_.styles(eN({x1:x,x2:O,y1:w,y2:E},M)),this.attr(S),_.styles(M);var P=eF(wj(t.value,r),2);return O0(this,{x:P[0],y:P[1]},o)}var Et=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},t}(),Ee=O2({text:"text"},"title");function En(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):t.length>2?[t[0]]:t.split("")}function Er(t,e){var n=Object.entries(e).reduce(function(e,n){var r=eF(n,2),i=r[0],o=r[1];return t.node().attr(i)||(e[i]=o),e},{});t.styles(n)}var Ei=function(t){function e(e){return t.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return eC(e,t),e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,o=t.inset,a=this.querySelector(Ee.text.class);if(!a)return new Et(0,0,+e,+n);var l=a.getBBox(),s=l.width,u=l.height,c=eF(wG(i),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eF([0,0,+e,+n],4),g=y[0],v=y[1],b=y[2],x=y[3],O=En(r);if(O.includes("i"))return new Et(g,v,b,x);O.forEach(function(t,r){var i,o;"t"===t&&(v=(i=eF(0===r?[u+h,+n-u-h]:[0,+n],2))[0],x=i[1]),"r"===t&&(b=eF([+e-s-d],1)[0]),"b"===t&&(x=eF([+n-u-f],1)[0]),"l"===t&&(g=(o=eF(0===r?[s+p,+e-s-p]:[0,+e],2))[0],b=o[1])});var w=eF(wG(o),4),E=w[0],k=w[1],M=w[2],S=w[3],_=eF([S+k,E+M],2),P=_[0],j=_[1];return new Et(g+S,v+E,b-P,x-j)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Et(0,0,0,0)},e.prototype.render=function(t,e){var n,r,i,o,a,l,s,u,c,f,p,h,d,y,g=this;t.width,t.height,t.position,t.spacing;var v=eL(t,["width","height","position","spacing"]),b=eF(wu(v),1)[0],x=(a=t.width,l=t.height,s=t.position,u=eF([+a/2,+l/2],2),f=(c=eF([+u[0],+u[1],"center","middle"],4))[0],p=c[1],h=c[2],d=c[3],(y=En(s)).includes("l")&&(f=(n=eF([0,"start"],2))[0],h=n[1]),y.includes("r")&&(f=(r=eF([+a,"end"],2))[0],h=r[1]),y.includes("t")&&(p=(i=eF([0,"top"],2))[0],d=i[1]),y.includes("b")&&(p=(o=eF([+l,"bottom"],2))[0],d=o[1]),{x:f,y:p,textAlign:h,textBaseline:d}),O=x.x,w=x.y,E=x.textAlign,k=x.textBaseline;vB(!!v.text,v$(e),function(t){g.title=t.maybeAppendByClassName(Ee.text,"text").styles(b).call(Er,{x:O,y:w,textAlign:E,textBaseline:k}).node()})},e}(vF);function Eo(t,e,n,r,i){var o=eF(wu(wl(r,"title")),2),a=o[0],l=o[1],s=l.transform,u=eL(l,["transform"]);t.styles(a),e.styles(u);var c=s||function(t,e,n){var r=t.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if("vertical"===e){if("left"===n)return"rotate(-90) translate(0, ".concat(i/2,")");if("right"===n)return"rotate(-90) translate(0, -".concat(i/2,")")}return""}(t.node(),a.direction,a.position);wW(t.node(),c);var f=function(t,e,n){var r=n.titlePosition,i=void 0===r?"lb":r,o=n.titleSpacing,a=En(i),l=t.node().getLocalBounds(),s=eF(l.min,2),u=s[0],c=s[1],f=eF(l.halfExtents,2),p=f[0],h=f[1],d=eF(e.node().getLocalBounds().halfExtents,2),y=d[0],g=d[1],v=eF([u+p,c+h],2),b=v[0],x=v[1],O=eF(wG(o),4),w=O[0],E=O[1],k=O[2],M=O[3];if(["start","end"].includes(i)&&"linear"===n.type){var S=n.startPos,_=n.endPos,P=eF("start"===i?[S,_]:[_,S],2),j=P[0],A=P[1],T=eF(O4(we([-A[0]+j[0],-A[1]+j[1]]),w),2),C=T[0],N=T[1];return{x:j[0]+C,y:j[1]+N}}return a.includes("t")&&(x-=h+g+w),a.includes("r")&&(b+=p+y+E),a.includes("l")&&(b-=p+2*y+M),a.includes("b")&&(x+=h+2*g+k),{x:b,y:x}}(v$(n._offscreen||n.querySelector(O3.mainGroup.class)),e,r),p=f.x,h=f.y,d=O0(e.node(),{x:p,y:h},i);return wW(t.node(),c),d}function Ea(t,e,n,r){var i=t.showLine,o=t.showTick,a=t.showLabel,l=vB(i,e.maybeAppendByClassName(O3.lineGroup,"g"),function(e){return function(t,e,n){var r,i,o,a,l,s,u=e.type,c=wl(e,"line");return"linear"===u?s=function(t,e,n,r){var i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E=e.showTrunc,k=e.startPos,M=e.endPos,S=e.truncRange,_=e.lineExtension,P=eF([k,M],2),j=eF(P[0],2),A=j[0],T=j[1],C=eF(P[1],2),N=C[0],L=C[1],I=eF(_?(void 0===(i=_)&&(i=[0,0]),o=eF([k,M,i],3),l=(a=eF(o[0],2))[0],s=a[1],c=(u=eF(o[1],2))[0],f=u[1],h=(p=eF(o[2],2))[0],d=p[1],g=(y=eF([c-l,f-s],2))[0],[(O=(x=eF([-h/(b=Math.sqrt(Math.pow(g,2)+Math.pow(v=y[1],2))),d/b],2))[0])*g,O*v,(w=x[1])*g,w*v]):[,,,,].fill(0),4),R=I[0],D=I[1],F=I[2],B=I[3],z=function(e){return t.selectAll(O3.line.class).data(e,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(O3.line.name," ").concat(t.className)}).styles(n).transition(function(t){return O0(this,wN(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return O0(this,wN(t.line),r.update)})},function(t){return t.remove()}).transitions()};if(!E||!S)return z([{line:[[A+R,T+D],[N+F,L+B]],className:O3.line.name}]);var W=eF(S,2),$=W[0],G=W[1],H=N-A,V=L-T,U=eF([A+H*$,T+V*$],2),q=U[0],Y=U[1],X=eF([A+H*G,T+V*G],2),K=X[0],Z=X[1],Q=z([{line:[[A+R,T+D],[q,Y]],className:O3.lineFirst.name},{line:[[K,Z],[N+F,L+B]],className:O3.lineSecond.name}]);return e.truncRange,e.truncShape,e.lineExtension,Q}(t,e,ww(c,"arrow"),n):(r=ww(c,"arrow"),i=e.startAngle,o=e.endAngle,a=e.center,l=e.radius,s=t.selectAll(O3.line.class).data([{path:wC.apply(void 0,ez(ez([i,o],eF(a),!1),[l],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",O3.line.name).styles(e).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,e,r,s,u,c=this,f=function(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,o=function t(e,n){var r,i,o,a,l,s;return"number"==typeof e&&"number"==typeof n?function(t){return e*(1-t)+n*t}:Array.isArray(e)&&Array.isArray(n)?(r=n?n.length:0,i=e?Math.min(r,e.length):0,function(o){var a=Array(i),l=Array(r),s=0;for(s=0;s<i;++s)a[s]=t(e[s],n[s]);for(;s<r;++s)l[s]=n[s];for(s=0;s<i;++s)l[s]=a[s](o);return l}):"object"==typeof e&&"object"==typeof n?(void 0===(o=e)&&(o={}),void 0===(a=n)&&(a={}),l={},s={},Object.entries(a).forEach(function(e){var n=eF(e,2),r=n[0],i=n[1];r in o?l[r]=t(o[r],i):s[r]=i}),function(t){return Object.entries(l).forEach(function(e){var n=eF(e,2),r=n[0],i=n[1];return s[r]=i(t)}),s}):function(t){return e}}(e,n),a=Array(Math.ceil(+(void 0===i?0:i)/16)).fill(0).map(function(t,e,n){return{__keyframe_data__:o(e/(n.length-1))}});return t.animate(a,eN({fill:"both"},r))}(this,(e=(t=this.attributes).startAngle,r=t.endAngle,s=t.center,u=t.radius,ez(ez([e,r],eF(s),!1),[u],!1)),ez(ez([i,o],eF(a),!1),[l],!1),n.update);if(f){var p=function(){var t=wv(c.attributes,"__keyframe_data__");c.style.path=wC.apply(void 0,ez([],eF(t),!1))};f.onframe=p,f.onfinish=p}return f}).styles(e)},function(t){return t.remove()}).styles(r).transitions()),!function(t,e,n,r){var i,o,a=n.showArrow,l=n.showTrunc,s=n.lineArrow,u=n.lineArrowOffset,c=n.lineArrowSize;if(o="arc"===e?t.select(O3.line.class):l?t.select(O3.lineSecond.class):t.select(O3.line.class),!a||!s||"arc"===n.type&&(i=n.startAngle,n.endAngle-i==360)){var f=o.node();f&&(f.style.markerEnd=void 0);return}var p=wx(s);p.attr(r),wO(p,c,!0),o.style("markerEnd",p).style("markerEndOffset",-u)}(t,u,e,c),s}(e,t,r)})||[],s=vB(o,e.maybeAppendByClassName(O3.tickGroup,"g"),function(e){var i,o;return i=wk(n,t.tickFilter),o=wl(t,"tick"),e.selectAll(O3.tick.class).data(i,function(t){return t.id||t.label}).join(function(e){return e.append("g").attr("className",O3.tick.name).transition(function(e,n){return w7.call(this,e,n,i,t,o,!1)})},function(e){return e.transition(function(e,n){return this.removeChildren(),w7.call(this,e,n,i,t,o,r.update)})},function(t){return t.transition(function(){var t=this,e=wf(this.childNodes[0],r.exit);return OZ(e,function(){return t.remove()}),e})}).transitions()})||[],u=vB(a,e.maybeAppendByClassName(O3.labelGroup,"g"),function(e){var i,o;return i=wk(n,t.labelFilter),o=wl(t,"label"),e.selectAll(O3.label.class).data(i,function(t,e){return e}).join(function(r){return r.append("g").attr("className",O3.label.name).transition(function(e){return w8(this,e,n,o,t),this.attr(w3(e,n,t)),this.__bbox__=e.bbox,null}).call(function(){return w6.call(e,t)})},function(i){return i.transition(function(e){var i=function(t,e,n,r){if(void 0===r&&(r="destroy"),"text"===t.nodeName&&"text"===e.nodeName&&t.attributes.text===e.attributes.text&&1)return t.remove(),[null];var i=function(){"destroy"===r?t.destroy():"hide"===r&&vS(t),e.isVisible()&&vM(e)};if(!n)return i(),[null];var o=n.duration,a=void 0===o?0:o,l=n.delay,s=void 0===l?0:l,u=Math.ceil(+a/2),c=+a/4,f=function(t){if("circle"===t.nodeName){var e=eF(t.getLocalPosition(),2),n=e[0],r=e[1],i=t.attr("r");return[n-i,r-i]}return t.getLocalPosition()},p=eF(f(t),2),h=p[0],d=p[1],y=eF(f(e),2),g=eF([(h+y[0])/2-h,(d+y[1])/2-d],2),v=g[0],b=g[1],x=t.style.opacity,O=e.style.opacity,w=t.animate([{opacity:void 0===x?1:x,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(v,", ").concat(b,")")}],eN(eN({fill:"both"},n),{duration:s+u+c})),E=e.animate([{opacity:0,transform:"translate(".concat(-v,", ").concat(-b,")"),offset:.01},{opacity:void 0===O?1:O,transform:"translate(0, 0)"}],eN(eN({fill:"both"},n),{duration:u+c,delay:s+u-c}));return OZ(E,i),[w,E]}(this.querySelector(O3.labelItem.class),w8(this,e,n,o,t),r.update),a=O0(this,w3(e,n,t),r.update);return this.__bbox__=e.bbox,ez(ez([],eF(i),!1),[a],!1)}).call(function(n){var r,i;r=wv(n,"_transitions").flat().filter(w$),i=function(){return w6.call(e,t)},0===r.length?i():Promise.all(r.map(function(t){return null==t?void 0:t.finished})).then(i)})},function(t){return t.transition(function(){var t=this,e=wf(this.childNodes[0],r.exit);return OZ(e,function(){return v$(t).remove()}),e})}).transitions()})||[];return ez(ez(ez([],eF(l),!1),eF(s),!1),eF(u),!1).filter(function(t){return!!t})}var El=function(t){function e(e){return t.call(this,e,O5)||this}return eC(e,t),e.prototype.render=function(t,e,n){var r=this,i=t.titleText,o=t.data,a=t.animate,l=t.showTitle,s=t.showGrid,u=t.dataThreshold,c=t.truncRange,f=(function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r})(o,u).filter(function(t){var e=t.value;return!c||!(e>c[0])||!(e<c[1])}),p=OK(void 0===n?a:n),h=vB(s,v$(e).maybeAppendByClassName(O3.gridGroup,"g"),function(e){var n,r,i,o,a,l,s,u;return r=(n=wl(t,"grid")).type,i=n.areaFill,o=wL(t),a=wk(f,t.gridFilter),s="segment"===r?(l=t.gridLength,a.map(function(e,n){var r=e.value,i=eF(wj(r,t),2),o=i[0],a=i[1],s=eF(O4(w_(r,t.gridDirection,t),l),2);return{id:n,points:[[o,a],[o+s[0],a+s[1]]]}})):function(t,e){var n=e.gridControlAngles,r=wL(e);if(!r)throw Error("grid center is not provide");if(t.length<2)throw Error("Invalid grid data");if(!n||0===n.length)throw Error("Invalid gridControlAngles");var i=eF(r,2),o=i[0],a=i[1];return t.map(function(t,r){var i=eF(wj(t.value,e),2),l=eF([i[0]-o,i[1]-a],2),s=l[0],u=l[1],c=[];return n.forEach(function(t){var e=wn(t),n=eF([Math.cos(e),Math.sin(e)],2),r=n[0],i=n[1];c.push([s*r-u*i+o,s*i+u*r+a])}),{points:c,id:r}})}(a,t),u=eN(eN({},n),{center:o,areaFill:vk(i)?a.map(function(t,e){return wc(i,[t,e,a])}):i,animate:p,data:s}),e.selectAll(O3.grid.class).data([1]).join(function(t){return t.append(function(){return new wm({style:u})}).attr("className",O3.grid.name)},function(t){return t.transition(function(){return this.update(u)})},function(t){return t.remove()}).transitions()})||[],d=v$(e).maybeAppendByClassName(O3.mainGroup,"g");i&&(!this.initialized&&p.enter||this.initialized&&p.update)&&Ea(t,v$(this.offscreenGroup),f,OK(!1));var y=Ea(t,v$(d.node()),f,p),g=vB(l,v$(e).maybeAppendByClassName(O3.titleGroup,"g"),function(e){var n;return n=t.titleText,e.selectAll(O3.title.class).data([{title:n}].filter(function(t){return!!t.title}),function(t,e){return t.title}).join(function(i){return i.append(function(){return wx(n)}).attr("className",O3.title.name).transition(function(){return Eo(v$(this),e,r,t,p.enter)})},function(n){return n.transition(function(){return Eo(v$(this),e,r,t,p.update)})},function(t){return t.remove()}).transitions()})||[];return ez(ez(ez([],eF(h),!1),eF(y),!1),eF(g),!1).flat().filter(function(t){return!!t})},e}(vF),Es=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},Eu=function(t,e){if(t){if(rA(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(Es(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},Ec=function(t,e,n){if(!rA(t)&&!rC(t))return t;var r=n;return Eu(t,function(t,n){r=e(r,t,n)}),r},Ef=function(t,e){return Ec(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})};function Ep(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var Eh=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ed(t){var e;if(!(e=Eh.exec(t)))throw Error("invalid format: "+t);return new Ey({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ey(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Eg(t,e){var n=Ep(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+Array(i-r.length+2).join("0")}Ed.prototype=Ey.prototype,Ey.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Em={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Eg(100*t,e),r:Eg,s:function(t,e){var n=Ep(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(er=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+Array(1-o).join("0")+Ep(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ev(t){return t}var Eb=Array.prototype.map,Ex=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function EO(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<t.length;o++){var a=t[o],l=a.x,s=a.y,u=eF([l+a.width,s+a.height],2),c=u[0],f=u[1];l<e&&(e=l),s<n&&(n=s),c>r&&(r=c),f>i&&(i=f)}return new Et(e,n,r-e,i-n)}eo=(ei=function(t){var e,n,r,i=void 0===t.grouping||void 0===t.thousands?Ev:(e=Eb.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[a=(a+1)%e.length];return o.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ev:(r=Eb.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return r[+t]})}),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function p(t){var e=(t=Ed(t)).fill,n=t.align,r=t.sign,p=t.symbol,h=t.zero,d=t.width,y=t.comma,g=t.precision,v=t.trim,b=t.type;"n"===b?(y=!0,b="g"):Em[b]||(void 0===g&&(g=12),v=!0,b="g"),(h||"0"===e&&"="===n)&&(h=!0,e="0",n="=");var x="$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",O="$"===p?a:/[%p]/.test(b)?u:"",w=Em[b],E=/[defgprs%]/.test(b);function k(t){var o,a,u,p=x,k=O;if("c"===b)k=w(t)+k,t="";else{var M=(t*=1)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),g),v&&(t=function(t){e:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break e;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&"+"!==r&&(M=!1),p=(M?"("===r?r:c:"-"===r||"("===r?"":r)+p,k=("s"===b?Ex[8+er/3]:"")+k+(M&&"("===r?")":""),E){for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){k=(46===u?l+t.slice(o+1):t.slice(o))+k,t=t.slice(0,o);break}}}y&&!h&&(t=i(t,1/0));var S=p.length+t.length+k.length,_=S<d?Array(d-S+1).join(e):"";switch(y&&h&&(t=i(_+t,_.length?d-k.length:1/0),_=""),n){case"<":t=p+t+k+_;break;case"=":t=p+_+t+k;break;case"^":t=_.slice(0,S=_.length>>1)+p+t+k+_.slice(S);break;default:t=_+p+t+k}return s(t)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),k.toString=function(){return t+""},k}return{format:p,formatPrefix:function(t,e){var n,r=p(((t=Ed(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(((n=Ep(Math.abs(n=e)))?n[1]:NaN)/3))),o=Math.pow(10,-i),a=Ex[8+i/3];return function(t){return r(o*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,ei.formatPrefix;var Ew=function(t,e,n){var r=t.width,i=t.height,o=n.flexDirection,a=void 0===o?"row":o,l=(n.flexWrap,n.justifyContent),s=void 0===l?"flex-start":l,u=(n.alignContent,n.alignItems),c=void 0===u?"flex-start":u,f="row"===a,p="row"===a||"column"===a,h=f?p?[1,0]:[-1,0]:p?[0,1]:[0,-1],d=eF([0,0],2),y=d[0],g=d[1],v=e.map(function(t){var e,n=t.width,r=t.height,i=eF([y,g],2),o=i[0],a=i[1];return y=(e=eF([y+n*h[0],g+r*h[1]],2))[0],g=e[1],new Et(o,a,n,r)}),b=EO(v),x={"flex-start":0,"flex-end":f?r-b.width:i-b.height,center:f?(r-b.width)/2:(i-b.height)/2},O=v.map(function(t){var e=t.x,n=t.y,r=Et.fromRect(t);return r.x=f?e+x[s]:e,r.y=f?n:n+x[s],r});EO(O);var w=function(t){var e=eF(f?["height",i]:["width",r],2),n=e[0],o=e[1];switch(c){case"flex-start":default:return 0;case"flex-end":return o-t[n];case"center":return o/2-t[n]/2}};return O.map(function(t){var e=t.x,n=t.y,r=Et.fromRect(t);return r.x=f?e:e+w(r),r.y=f?n+w(r):n,r}).map(function(e){var n,r,i=Et.fromRect(e);return i.x+=null!=(n=t.x)?n:0,i.y+=null!=(r=t.y)?r:0,i})},EE=function(t,e,n){return[]},Ek=function(t,e,n){if(0===e.length)return[];var r={flex:Ew,grid:EE},i=n.display in r?r[n.display]:null;return(null==i?void 0:i.call(null,t,e,n))||[]},EM=function(t){function e(e){var n=t.call(this,e)||this;n.layoutEvents=[t6.BOUNDS_CHANGED,t6.INSERTED,t6.REMOVED],n.$margin=wG(0),n.$padding=wG(0);var r=e.style||{},i=r.margin,o=r.padding;return n.margin=void 0===i?0:i,n.padding=void 0===o?0:o,n.isMutationObserved=!0,n.bindEvents(),n}return eC(e,t),Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=wG(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=wG(t)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes,e=t.x,n=t.y,r=t.width,i=t.height,o=eF(this.$margin,4),a=o[0],l=o[1],s=o[2],u=o[3];return new Et((void 0===e?0:e)-u,(void 0===n?0:n)-a,r+u+l,i+a+s)},e.prototype.appendChild=function(e,n){return e.isMutationObserved=!0,t.prototype.appendChild.call(this,e,n),e},e.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=eF(this.$padding,4),i=r[0],o=r[1],a=r[2],l=r[3],s=eF(this.$margin,4),u=s[0];return new Et(l+s[3],i+u,e-l-o,n-i-a)},e.prototype.layout=function(){if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{var t=Ek(this.getAvailableSpace(),this.children.map(function(t){return t.getBBox()}),this.attributes);this.children.forEach(function(e,n){var r=t[n],i=r.x,o=r.y;e.attr({x:i,y:o})})}catch(t){}},e.prototype.bindEvents=function(){var t=this;this.layoutEvents.forEach(function(e){t.addEventListener(e,function(e){e.target.isMutationObserved=!0,t.layout()})})},e.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()},e}(dZ),ES=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function E_(t,e,n){return t.querySelector(e)?gs(t).select(e):gs(t).append(n)}function EP(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function Ej(t,e){let{flexDirection:n,justifyContent:r,alignItems:i}={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in o&&([n,r,i]=o[t]),Object.assign({display:"flex",flexDirection:n,justifyContent:r,alignItems:i},e)}class EA extends EM{get child(){var t;return null==(t=this.children)?void 0:t[0]}update(t){var e;this.attr(t);let{subOptions:n}=t;null==(e=this.child)||e.update(n)}}class ET extends EA{update(t){var e;let{subOptions:n}=t;this.attr(t),null==(e=this.child)||e.update(n)}}function EC(t,e){var n;return null==(n=t.filter(t=>t.getOptions().name===e))?void 0:n[0]}function EN(t,e,n){let{bbox:r}=t,{position:i="top",size:o,length:a}=e,l=["top","bottom","center"].includes(i),[s,u]=l?[r.height,r.width]:[r.width,r.height],{defaultSize:c,defaultLength:f}=n.props,p=o||c||s,h=a||f||u,[d,y]=l?[h,p]:[p,h];return{orientation:l?"horizontal":"vertical",width:d,height:y,size:p,length:h}}function EL(t){let e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=ES(t,["style"]),i={};return Object.entries(r).forEach(([t,n])=>{e.includes(t)?i[`show${na(t)}`]=n:i[t]=n}),Object.assign(Object.assign({},i),n)}var EI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ER(t,e){let{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function ED(t){let{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function EF(t,e,n,r,i,o,a,l){var s;(void 0!==n||void 0!==o)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),o&&{tickMethod:o}));let u=function(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;let[r,i]=gx(e,t=>+t),{tickCount:o}=t.getOptions();return n(r,i,o)}(t,e,o),c=i?u.filter(i):u,f=t=>t instanceof Date?String(t):"object"==typeof t&&t?t:String(t),p=r||(null==(s=t.getFormatter)?void 0:s.call(t))||f,h=function(t,e){if(sY(e))return t=>t;let{innerWidth:n,innerHeight:r,insetTop:i,insetBottom:o,insetLeft:a,insetRight:l}=e.getOptions(),[s,u,c]="left"===t||"right"===t?[i,o,r]:[a,l,n],f=new nr({domain:[0,1],range:[s/c,1-u/c]});return t=>f.map(t)}(a,l),d=function(t,e){let{width:n,height:r}=e.getOptions();return i=>{if(!sQ(e))return i;let o=e.map("bottom"===t?[i,1]:[0,i]);if("bottom"===t){let t=o[0];return new nr({domain:[0,n],range:[0,1]}).map(t)}if("left"===t){let t=o[1];return new nr({domain:[0,r],range:[0,1]}).map(t)}return i}}(a,l),y=t=>["top","bottom","center","outer"].includes(t),g=t=>["left","right"].includes(t);return sY(l)||sq(l)?c.map((e,n,r)=>{var i,o;let s=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,u=h(t.map(e)+s);return{value:sX(l)&&"center"===a||sq(l)&&(null==(o=t.getTicks)?void 0:o.call(t))&&y(a)||sq(l)&&g(a)?1-u:u,label:f(p(gv(e),n,r)),id:String(n)}}):c.map((e,n,r)=>{var i;let o=(null==(i=t.getBandWidth)?void 0:i.call(t,e))/2||0,l=d(h(t.map(e)+o));return{value:g(a)?1-l:l,label:f(p(gv(e),n,r)),id:String(n)}})}let EB=t=>e=>{let{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var o;let{scales:[a]}=i,l=(null==(o=a.getTicks)?void 0:o.call(a))||a.getOptions().domain,s="string"==typeof n?eo(n):n;return t(Object.assign(Object.assign({},e),{labelFormatter:s,labelFilter:(t,e,n)=>r(l[e],e,l),scale:a}))(i)}},Ez=EB(t=>{let{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:o,actualPosition:a,position:l,size:s,style:u={},title:c,tickCount:f,tickFilter:p,tickMethod:h,transform:d,indexBBox:y}=t,g=EI(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:i,value:v,coordinate:b,theme:x})=>{var O;let{bbox:w}=v,[E]=i,{domain:k,xScale:M}=E.getOptions(),S=Object.assign(Object.assign(Object.assign({},function(t,e,n,r,i,o){let a=function(t,e,n,r,i,o){let a=n.axis,l=["top","right","bottom","left"].includes(i)?n[`axis${rD(i)}`]:n.axisLinear,s=t.getOptions().name;return Object.assign({},a,l,n[`axis${na(s)}`]||{})}(t,0,n,0,i,0);if("center"===i)return Object.assign(Object.assign(Object.assign(Object.assign({},a),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:4*("center"!==r),titleSpacing:10*("vertical"===o||o===-Math.PI/2),tick:"center"!==r&&void 0});return a}(E,0,x,e,l,o)),u),g),_=function(t,e,n="xy"){let[r,i,o]=ED(e);return"xy"===n?t.includes("bottom")||t.includes("top")?i:r:"xz"===n?t.includes("bottom")||t.includes("top")?o:r:t.includes("bottom")||t.includes("top")?i:o}(a||l,b,t.plane),P=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=n;if("bottom"===t)return{startPos:[o,a],endPos:[o+l,a]};if("left"===t)return{startPos:[o+l,a+s],endPos:[o+l,a]};if("right"===t)return{startPos:[o,a+s],endPos:[o,a]};if("top"===t)return{startPos:[o,a+s],endPos:[o+l,a+s]};if("center"===t){if("vertical"===e)return{startPos:[o,a],endPos:[o,a+s]};else if("horizontal"===e)return{startPos:[o,a],endPos:[o+l,a]};else if("number"==typeof e){let[t,n]=r.getCenter(),[u,c]=s0(r),[f,p]=s1(r),h=Math.min(l,s)/2,{insetLeft:d,insetTop:y}=r.getOptions(),g=u*h,v=c*h,[b,x]=[t+o-d,n+a-y],[O,w]=[Math.cos(e),Math.sin(e)],E=sY(r)&&i?(()=>{let{domain:t}=i.getOptions();return t.length})():3;return{startPos:[b+v*O,x+v*w],endPos:[b+g*O,x+g*w],gridClosed:1e-6>Math.abs(p-f-360),gridCenter:[b,x],gridControlAngles:Array(E).fill(0).map((t,e,n)=>(p-f)/E*e)}}}return{}}(l,o,w,b,M),j=function(t){let{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}(b),A=EF(E,k,f,r,p,h,l,b),T=y?A.map((t,e)=>{let n=y.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):A,C=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},S),{type:"linear",data:T,crossSize:s,titleText:EP(c),labelOverlap:function(t=[],e){if(t.length>0)return t;let{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:o}=e,a=[],l=(t,e)=>{e&&a.push(Object.assign(Object.assign({},t),e))};return l({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),l({type:"ellipsis",minLength:20},i),l({type:"hide"},r),l({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},o),a}(d,S),grid:(O=S.grid,!(sY(b)&&sq(b)||sZ(b))&&(void 0===O?!!E.getTicks:O)),gridLength:_,line:!0,indexBBox:y}),S.line?null:{lineOpacity:0}),P),j),n);return C.labelOverlap.find(t=>"hide"===t.type)&&(C.crossSize=!1),new El({className:"axis",style:EL(C)})}}),EW=EB(t=>{let{order:e,size:n,position:r,orientation:i,labelFormatter:o,tickFilter:a,tickCount:l,tickMethod:s,important:u={},style:c={},indexBBox:f,title:p,grid:h=!1}=t,d=EI(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[t],value:e,coordinate:n,theme:i})=>{let{bbox:c}=e,{domain:y}=t.getOptions(),g=EF(t,y,l,o,a,s,r,n),v=f?g.map((t,e)=>{let n=f.get(e);return n&&n[0]===t.label?Object.assign(Object.assign({},t),{bbox:n[1]}):t}):g,[b,x]=s0(n),O=function(t,e,n,r,i){let{x:o,y:a,width:l,height:s}=e,u=[o+l/2,a+s/2],c=Math.min(l,s)/2,[f,p]=s1(i),[h,d]=ED(i),y={center:u,radius:c,startAngle:f,endAngle:p,gridLength:Math.min(h,d)/2*(r-n)};if("inner"===t){let{insetLeft:t,insetTop:e}=i.getOptions();return Object.assign(Object.assign({},y),{center:[u[0]-t,u[1]-e],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},y),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}(r,c,b,x,n),{axis:w,axisArc:E={}}=i,k=EL(rN({},w,E,O,Object.assign(Object.assign({type:"arc",data:v,titleText:EP(p),grid:h},d),u)));return new El({style:Ef(k,["transform"])})}});Ez.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},EW.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let E$=t=>(...e)=>{let n=Ez(Object.assign({},{crossPadding:50},t))(...e);return ER(n,t),n};E$.props=Object.assign(Object.assign({},Ez.props),{defaultPosition:"bottom"});let EG=t=>(...e)=>{let n=Ez(Object.assign({},{crossPadding:10},t))(...e);return ER(n,t),n};EG.props=Object.assign(Object.assign({},Ez.props),{defaultPosition:"left"});var EH=function(){},EV=function(t,e,n){var r=t,i=vq(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(vU(r[t])||(r[t]=wb(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},EU=function(t,e,n){return t<e?e:t>n?n:t},Eq=function(t,e,n){var r;return function(){var i=this,o=arguments,a=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||t.apply(i,o)},e),a&&t.apply(i,o)}},EY=O2({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),EX=function(t){function e(e){var n=t.call(this,e,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",-6,-6],["L",6,0],["L",-6,6],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new dZ({class:EY.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new dZ({class:EY.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return eC(e,t),Object.defineProperty(e.prototype,"defaultPage",{get:function(){return EU(this.attributes.defaultPage,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t,e,n=eF(((null==(e=(t=this.pageViews.map(function(t){var e=t.getBBox();return[e.width,e.height]}))[0])?void 0:e.map(function(e,n){return t.map(function(t){return t[n]})}))||[]).map(function(t){return Math.max.apply(Math,ez([],eF(t),!1))}),2),r=n[0],i=n[1],o=this.attributes,a=o.pageWidth,l=o.pageHeight;return{pageWidth:void 0===a?r:a,pageHeight:void 0===l?i:l}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e=t.prototype.getBBox.call(this),n=e.x,r=e.y,i=this.controllerShape,o=this.pageShape,a=o.pageWidth,l=o.pageHeight;return new Et(n,r,a+i.width,l)},e.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,o=this.playWindow,a=this.pageViews;if("idle"!==i||t<0||a.length<=0||t>=a.length)return null;a[r].setLocalPosition(0,0),this.prepareFollowingPage(t);var l=eF(this.getFollowingPageDiff(t),2),s=l[0],u=l[1];this.playState="running";var c=OJ(o,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-s,", ").concat(-u,")")}],n);return OZ(c,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),c},e.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n<=0)return null;var r=t?(n-1+e)%e:EU(n-1,0,e);return this.goTo(r)},e.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;if(!t&&n>=e-1)return null;var r=t?(n+1)%e:EU(n+1,0,e);return this.goTo(r)},e.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,r=e.pageHeight;if(!n||!r){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(EY.clipPath,"rect").styles({width:n,height:r}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(e,n){t.includes(n)?vM(e):vS(e)})},e.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,o=r.controllerPadding,a=n.getBBox(),l=a.width;a.height;var s=eF("horizontal"===i?[-180,0]:[-90,90],2),u=s[0],c=s[1];t.setLocalEulerAngles(u),e.setLocalEulerAngles(c);var f=t.getBBox(),p=f.width,h=f.height,d=e.getBBox(),y=d.width,g=d.height,v=Math.max(p,l,y),b="horizontal"===i?{offset:[[0,0],[p/2+o,0],[p+l+2*o,0]],textAlign:"start"}:{offset:[[v/2,-h-o],[v/2,0],[v/2,g+o]],textAlign:"center"},x=eF(b.offset,3),O=eF(x[0],2),w=O[0],E=O[1],k=eF(x[1],2),M=k[0],S=k[1],_=eF(x[2],2),P=_[0],j=_[1],A=b.textAlign,T=n.querySelector("text");T&&(T.style.textAlign=A),t.setLocalPosition(w,E),n.setLocalPosition(M,S),e.setLocalPosition(P,j)},e.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null==(t=this.pageInfoGroup.querySelector(EY.pageInfo.class))||t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var e=this.currPage;if(e===t)return[0,0];var n=this.attributes.orientation,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=t<e?-1:1;return"horizontal"===n?[a*i,0]:[0,a*o]},e.prototype.prepareFollowingPage=function(t){var e=this.currPage,n=this.pageViews;if(this.setVisiblePages([t,e]),t!==e){var r=eF(this.getFollowingPageDiff(t),2),i=r[0],o=r[1];n[t].setLocalPosition(i,o)}},e.prototype.renderController=function(t){var e=this,n=this.attributes.controllerSpacing,r=this.pageShape,i=r.pageWidth,o=r.pageHeight,a=this.pageViews.length>=2,l=t.maybeAppendByClassName(EY.controller,"g");if(v_(l.node(),a),a){var s=wl(this.attributes,"button"),u=wl(this.attributes,"pageNum"),c=eF(wu(s),2),f=c[0],p=c[1],h=f.size,d=eL(f,["size"]),y=!l.select(EY.prevBtnGroup.class).node(),g=l.maybeAppendByClassName(EY.prevBtnGroup,"g").styles(p);this.prevBtnGroup=g.node();var v=g.maybeAppendByClassName(EY.prevBtn,"path"),b=l.maybeAppendByClassName(EY.nextBtnGroup,"g").styles(p);this.nextBtnGroup=b.node(),[v,b.maybeAppendByClassName(EY.nextBtn,"path")].forEach(function(t){t.styles(eN(eN({},d),{transformOrigin:"center"})),wO(t.node(),h,!0)});var x=l.maybeAppendByClassName(EY.pageInfoGroup,"g");this.pageInfoGroup=x.node(),x.maybeAppendByClassName(EY.pageInfo,"text").styles(u),this.updatePageInfo(),l.node().setLocalPosition(i+n,o/2),y&&(this.prevBtnGroup.addEventListener("click",function(){e.prev()}),this.nextBtnGroup.addEventListener("click",function(){e.next()}))}},e.prototype.render=function(t,e){var n=v$(e);this.renderClipPath(n),this.renderController(n),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,e=Eq(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(t6.INSERTED,e),this.playWindow.addEventListener(t6.REMOVED,e)},e}(vF);function EK(t,e,n){return void 0===t&&(t="horizontal"),"horizontal"===t?e:n}vY.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),vY.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+o],["L",t+r-2,e+o],["M",a,e-o],["L",t+r-2,e-o]]}),vY.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,o=n/6,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-o,a],["L",t-o,e+r-2],["M",t+o,a],["L",t+o,e+r-2]]});var EZ=O2({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),EQ=function(t){function e(e){return t.call(this,e,{span:[1,1],marker:function(){return new dY({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return eC(e,t),Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,r=t.node().getBBox(),i=r.width,o=r.height,a=e.node().getBBox();return{markerWidth:n,labelWidth:i,valueWidth:a.width,height:Math.max(n,o,a.height)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var e=eF(wG(t),2),n=e[0],r=e[1],i=this.showValue?r:0,o=n+i;return[n/o,i/o]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t,e=this.attributes,n=e.markerSize,r=e.width,i=this.actualSpace,o=i.markerWidth,a=i.height,l=this.actualSpace,s=l.labelWidth,u=l.valueWidth,c=eF(this.spacing,2),f=c[0],p=c[1];if(r){var h=r-n-f-p,d=eF(this.span,2);s=(t=eF([d[0]*h,d[1]*h],2))[0],u=t[1]}return{width:o+s+u+f+p,height:a,markerWidth:o,labelWidth:s,valueWidth:u}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes.spacing;if(!t)return[0,0];var e=eF(wG(t),2),n=e[0],r=e[1];return this.showValue?[n,r]:[n,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,o=t.height,a=eF(this.spacing,2),l=a[0];return{height:o,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+l,e+n+l+a[1]]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t,e=(t=this.markerGroup.node().querySelector(EZ.marker.class))?t.style:{},n=this.attributes,r=n.markerSize,i=n.markerStrokeWidth,o=void 0===i?e.strokeWidth:i,a=n.markerLineWidth,l=void 0===a?e.lineWidth:a,s=n.markerStroke,u=void 0===s?e.stroke:s,c=+(o||l||+!!u)*Math.sqrt(2),f=this.markerGroup.node().getBBox();return(1-c/Math.max(f.width,f.height))*r},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=wl(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(EZ.markerGroup,"g").style("zIndex",0),vB(!!n,this.markerGroup,function(){var t=e.markerGroup.node(),i=t.getElementsByClassName(EZ.marker.name)[0],o=n();i?o.nodeName===i.nodeName?(!function(t,e){var n,r,i=e.attributes;try{for(var o=eD(Object.entries(i)),a=o.next();!a.done;a=o.next()){var l=eF(a.value,2),s=l[0],u=l[1];"id"!==s&&"className"!==s&&t.attr(s,u)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}(i,o),v$(i).styles(r)):(i.remove(),v$(o).attr("className",EZ.marker.name).styles(r),t.appendChild(o)):(v$(o).attr("className",EZ.marker.name).styles(r),t.appendChild(o)),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),wO(e.markerGroup.node(),e.scaleSize,!0)})},e.prototype.renderLabel=function(t){var e=wl(this.attributes,"label"),n=e.text,r=eL(e,["text"]);this.labelGroup=t.maybeAppendByClassName(EZ.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(EZ.label,function(){return wx(n)}).styles(r)},e.prototype.renderValue=function(t){var e=this,n=wl(this.attributes,"value"),r=n.text,i=eL(n,["text"]);this.valueGroup=t.maybeAppendByClassName(EZ.valueGroup,"g").style("zIndex",0),vB(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(EZ.value,function(){return wx(r)}).styles(i)})},e.prototype.renderBackground=function(t){var e=this.shape,n=e.width,r=e.height,i=wl(this.attributes,"background");this.background=t.maybeAppendByClassName(EZ.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(EZ.background,"rect").styles(eN({width:n,height:r},i))},e.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,i=eF(t.position,3),o=i[0],a=i[1],l=i[2],s=r/2;this.markerGroup.styles({x:o,y:s}),this.labelGroup.styles({x:a,y:s}),wz(this.labelGroup.select(EZ.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:l,y:s}),wz(this.valueGroup.select(EZ.value.class).node(),Math.ceil(n)))},e.prototype.render=function(t,e){var n=v$(e);this.renderMarker(n),this.renderLabel(n),this.renderValue(n),this.renderBackground(n),this.adjustLayout()},e}(vF),EJ=O2({page:"item-page",navigator:"navigator",item:"item"},"items"),E0=function(t,e,n){return(void 0===n&&(n=!0),t)?e(t):n},E1=function(t){function e(e){var n=t.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:EH,mouseenter:EH,mouseleave:EH})||this;return n.navigatorShape=[0,0],n}return eC(e,t),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,e=t.gridRow,n=t.gridCol,r=t.data;if(!e&&!n)throw Error("gridRow and gridCol can not be set null at the same time");return e&&n?[e,n]:e?[e,r.length]:[r.length,n]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,e=t.data,n=t.layout,r=wl(this.attributes,"item");return e.map(function(t,i){var o=t.id,a=void 0===o?i:o,l=t.label,s=t.value;return{id:"".concat(a),index:i,style:eN({layout:n,labelText:l,valueText:s},Object.fromEntries(Object.entries(r).map(function(n){var r=eF(n,2);return[r[0],wc(r[1],[t,i,e])]})))}})},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,e=this.attributes,n=e.orientation,r=e.width,i=e.rowPadding,o=e.colPadding,a=eF(this.navigatorShape,1)[0],l=eF(this.grid,2),s=l[0],u=l[1],c=u*s,f=0;return this.pageViews.children.map(function(e,l){var p,h,d=Math.floor(l/c),y=l%c,g=t.ifHorizontal(u,s),v=[Math.floor(y/g),y%g];"vertical"===n&&v.reverse();var b=eF(v,2),x=b[0],O=b[1],w=(r-a-(u-1)*o)/u,E=e.getBBox().height,k=eF([0,0],2),M=k[0],S=k[1];return"horizontal"===n?(M=(p=eF([f,x*(E+i)],2))[0],S=p[1],f=O===u-1?0:f+w+o):(M=(h=eF([O*(w+o),f],2))[0],S=h[1],f=x===s-1?0:f+E+i),{page:d,index:l,row:x,col:O,pageIndex:y,width:w,height:E,x:M,y:S}})},e.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,r=t.rowPadding,i=t.colPadding,o=eF(this.navigatorShape,1)[0],a=eF(this.grid,2),l=a[0],s=a[1],u=eF([e-o,n],2),c=u[0],f=u[1],p=eF([0,0,0,0,0,0,0,0],8),h=p[0],d=p[1],y=p[2],g=p[3],v=p[4],b=p[5],x=p[6],O=p[7];return this.pageViews.children.map(function(t,e){var n,o,a,u,p=t.getBBox(),w=p.width,E=p.height,k=0===x?0:i,M=x+k+w;return M<=c&&E0(v,function(t){return t<s})?(h=(n=eF([x+k,O,M],3))[0],d=n[1],x=n[2]):(b=(o=eF([b+1,0,0,O+E+r],4))[0],v=o[1],x=o[2],(O=o[3])+E<=f&&E0(b,function(t){return t<l}))?(h=(a=eF([x,O,w],3))[0],d=a[1],x=a[2]):(h=(u=eF([0,0,w,0,y+1,0,0,0],8))[0],d=u[1],x=u[2],O=u[3],y=u[4],g=u[5],b=u[6],v=u[7]),{width:w,height:E,x:h,y:d,page:y,index:e,pageIndex:g++,row:b,col:v++}})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return e.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return EK(this.attributes.orientation,t,e)},e.prototype.flattenPage=function(t){t.querySelectorAll(EJ.item.class).forEach(function(e){t.appendChild(e)}),t.querySelectorAll(EJ.page.class).forEach(function(e){t.removeChild(e).destroy()})},e.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);v$(t).selectAll(EJ.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){return new EQ({style:t.style})}).attr("className",EJ.item.name).on("click",function(){null==n||n(this),o("itemClick",{item:this})}).on("pointerenter",function(){null==r||r(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){null==i||i(this),o("itemMouseleave",{item:this})})},function(t){return t.each(function(t){var e=t.style;this.update(e)})},function(t){return t.remove()})},e.prototype.relayoutNavigator=function(){var t,e=this.attributes,n=e.layout,r=e.width,i=(null==(t=this.pageViews.children[0])?void 0:t.getBBox().height)||0,o=eF(this.navigatorShape,2),a=o[0],l=o[1];this.navigator.update("grid"===n?{pageWidth:r-a,pageHeight:i-l}:{})},e.prototype.adjustLayout=function(){var t,e,n=this,r=Object.entries((t=this.itemsLayout,e="page",t.reduce(function(t,n){return(t[n[e]]=t[n[e]]||[]).push(n),t},{}))).map(function(t){var e=eF(t,2);return{page:e[0],layouts:e[1]}}),i=ez([],eF(this.navigator.getContainer().children),!1);r.forEach(function(t){var e=t.layouts,r=n.pageViews.appendChild(new dZ({className:EJ.page.name}));e.forEach(function(t){var e=t.x,n=t.y,o=t.index,a=t.width,l=t.height,s=i[o];r.appendChild(s),EV(s,"__layout__",t),s.update({x:e,y:n,width:a,height:l})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var e=vL({orientation:this.attributes.orientation},wl(this.attributes,"nav")),n=this;return t.selectAll(EJ.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new EX({style:e})}).attr("className",EJ.navigator.name).each(function(){n.navigator=this})},function(t){return t.each(function(){this.update(e)})},function(t){return t.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,e){var n=this.attributes.data;if(n&&0!==n.length){var r=this.renderNavigator(v$(e));this.renderItems(r.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,e){var n=new dd(t,{detail:e});this.dispatchEvent(n)},e}(vF),E2=O2({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),E5={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},E3=function(t){function e(e){return t.call(this,e,E5)||this}return eC(e,t),e.prototype.render=function(t,e){var n=v$(e).maybeAppendByClassName(E2.markerGroup,"g");this.renderMarker(n);var r=v$(e).maybeAppendByClassName(E2.labelGroup,"g");this.renderLabel(r)},e.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.orientation,i=n.markerSymbol,o=void 0===i?EK(r,"horizontalHandle","verticalHandle"):i;vB(!!o,t,function(t){var n=wl(e.attributes,"marker"),r=eN({symbol:o},n);e.marker=t.maybeAppendByClassName(E2.marker,function(){return new vY({style:r})}).update(r)})},e.prototype.renderLabel=function(t){var e=this,n=this.attributes,r=n.showLabel,i=n.orientation,o=n.spacing,a=void 0===o?0:o,l=n.formatter;vB(r,t,function(t){var n,r=wl(e.attributes,"label"),o=r.text,s=eL(r,["text"]),u=(null==(n=t.select(E2.marker.class))?void 0:n.node().getBBox())||{},c=u.width,f=u.height,p=eF(EK(i,[0,(void 0===f?0:f)+a,"center","top"],[(void 0===c?0:c)+a,0,"start","middle"]),4),h=p[0],d=p[1],y=p[2],g=p[3];t.maybeAppendByClassName(E2.label,"text").styles(eN(eN({},s),{x:h,y:d,text:l(o).toString(),textAlign:y,textBaseline:g}))})},e}(vF),E4={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},E6=vL({},E4,{}),E8=vL({},E4,ws(E5,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),E9=O2({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),E7=function(t){function e(e){return t.call(this,e,E6)||this}return eC(e,t),e.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,o=r.titleText,a=eF(wu(wl(this.attributes,"title")),2),l=a[0],s=a[1];this.titleGroup=t.maybeAppendByClassName(E9.titleGroup,"g").styles(s);var u=eN(eN({width:e,height:n},l),{text:i?o:""});this.title=this.titleGroup.maybeAppendByClassName(E9.title,function(){return new Ei({style:u})}).update(u)},e.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,o=e.height,a=eF(wu(wl(this.attributes,"title",!0)),2),l=a[0],s=a[1],u=eN(eN({},l),{width:i,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(E9.itemsGroup,"g").styles(eN({x:n,y:r},s));var c=this;this.itemsGroup.selectAll(E9.items.class).data(["items"]).join(function(t){return t.append(function(){return new E1({style:u})}).attr("className",E9.items.name).each(function(){c.items=v$(this)})},function(t){return t.update(u)},function(t){return t.remove()})},e.prototype.adjustLayout=function(){if(this.attributes.showTitle){var t=this.title.node().getAvailableSpace(),e=t.x,n=t.y;this.itemsGroup.node().setLocalPosition(e,n)}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,r=t.height;return e?this.title.node().getAvailableSpace():new Et(0,0,n,r)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var e,n,r=null==(e=this.title)?void 0:e.node(),i=null==(n=this.items)?void 0:n.node();return r&&i?function(t,e){var n=t.attributes,r=n.position,i=n.spacing,o=n.inset,a=n.text,l=t.getBBox(),s=e.getBBox(),u=En(r),c=eF(wG(a?i:0),4),f=c[0],p=c[1],h=c[2],d=c[3],y=eF(wG(o),4),g=y[0],v=y[1],b=y[2],x=y[3],O=eF([d+p,f+h],2),w=O[0],E=O[1],k=eF([x+v,g+b],2),M=k[0],S=k[1];if("l"===u[0])return new Et(l.x,l.y,s.width+l.width+w+M,Math.max(s.height+S,l.height));if("t"===u[0])return new Et(l.x,l.y,Math.max(s.width+M,l.width),s.height+l.height+E+S);var _=eF([e.attributes.width||s.width,e.attributes.height||s.height],2),P=_[0],j=_[1];return new Et(s.x,s.y,P+l.width+w+M,j+l.height+E+S)}(r,i):t.prototype.getBBox.call(this)},e.prototype.render=function(t,e){var n=t.width,r=t.height,i=v$(e);this.renderTitle(i,n,r),this.renderItems(i,this.availableSpace),this.adjustLayout()},e}(vF),kt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let ke=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,cols:s,itemMarker:u}=t,c=kt(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=c;return e=>{let{value:r,theme:i}=e,{bbox:a}=r,{width:u,height:p}=function(t,e,n){let{position:r}=e;if("center"===r){let{bbox:e}=t,{width:n,height:r}=e;return{width:n,height:r}}let{width:i,height:o}=EN(t,e,n);return{width:i,height:o}}(r,t,ke),h=Ej(o,n),d=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(o)?"vertical":"horizontal",width:u,height:p,layout:void 0!==s?"grid":"flex"},void 0!==s&&{gridCol:s}),void 0!==f&&{gridRow:f}),{titleText:EP(l)}),function(t,e){let{labelFormatter:n=t=>`${t}`}=t,{scales:r,theme:i}=e,o=function(t,e){let n=EC(t,"size");return n instanceof xW?2*n.map(NaN):e}(r,i.legendCategory.itemMarkerSize),a={itemMarker:function(t,e){let{scales:n,library:r,markState:i}=e,[o,a]=function(t,e){let n=EC(t,"shape"),r=EC(t,"color"),i=n?n.clone():null,o=[];for(let[t,n]of e){let e=t.type,a=((null==r?void 0:r.getOptions().domain.length)>0?null==r?void 0:r.getOptions().domain:n.data).map((e,r)=>{var o;return i?i.map(e||"point"):(null==(o=null==t?void 0:t.style)?void 0:o.shape)||n.defaultShape||"point"});"string"==typeof e&&o.push([e,a])}if(0===o.length)return["point",["point"]];if(1===o.length||!n)return o[0];let{range:a}=n.getOptions();return o.map(([t,e])=>{let n=0;for(let t=0;t<o.length;t++){let r=a[t%a.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(n,i),{itemMarker:l,itemMarkerSize:s}=t,u=(t,e)=>{var n,i,a;let l=(null==(a=null==(i=null==(n=r[`mark.${o}`])?void 0:n.props)?void 0:i.shape[t])?void 0:a.props.defaultMarker)||lq(t.split(".")),u="function"==typeof s?s(e):s;return()=>(function(t,e){var{d:n,fill:r,strokeWidth:i,path:o,stroke:a,lineWidth:l,color:s}=e,u=mL(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);let c=m9.get(t)||m9.get("point");return(...t)=>new d1({style:Object.assign(Object.assign({},u),{path:c(...t),stroke:c.style.includes("stroke")?s||a:"",fill:c.style.includes("fill")?s||r:"",lineWidth:c.style.includes("lineWidth")?l||l||2:0})})})(l,{color:e.color})(0,0,u)},c=t=>`${a[t]}`;return EC(n,"shape")&&!l?(t,e)=>u(c(e),t):"function"==typeof l?(t,e)=>{let n=l(t.id,e);return"string"==typeof n?u(n,t):n}:(t,e)=>u(l||c(e),t)}(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:function(t){let e=EC(t,"opacity");if(e){let{range:t}=e.getOptions();return(e,n)=>t[n]}}(r)},l="string"==typeof n?eo(n):n,s=EC(r,"color"),u=r.find(t=>t.getOptions().domain.length>0).getOptions().domain,c=s?t=>s.map(t):()=>e.theme.color;return Object.assign(Object.assign({},a),{data:u.map(t=>({id:t,label:l(t),color:c(t)}))})}(t,e)),{legendCategory:y={}}=i,g=EL(Object.assign({},y,d,c)),v=new ET({style:Object.assign(Object.assign({x:a.x,y:a.y,width:a.width,height:a.height},h),{subOptions:g})});return v.appendChild(new E7({className:"legend-category",style:g})),v}};ke.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var kn={}.toString,kr=function(t,e){return kn.call(t)==="[object "+e+"]"},ki=function(t){return Array.isArray?Array.isArray(t):kr(t,"Array")},ko=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},ka=function(t,e){if(t){if(ki(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(ko(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},kl=function(t){return kr(t,"Function")},ks=Array.prototype;ks.splice,ks.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var ku=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return ka(t,function(n,r){kl(t)&&"prototype"===r||e.push(n)}),e},kc=function(t){if("object"!=typeof t||null===t||!kr(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},kf=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var o in r=r||0,i=i||5,n)if(n.hasOwnProperty(o)){var a=n[o];null!==a&&kc(a)?(kc(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):ki(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t};Object.prototype.hasOwnProperty,Object.prototype.hasOwnProperty;var kp=function(t){return t};function kh(){this.map={}}!function(t,e){if(!kl(t))throw TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var l=t.apply(this,r);return a.set(o,l),l};n.cache=new Map}(function(t,e){void 0===e&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=e.fontStyle,a=e.fontVariant;return ea||(ea=document.createElement("canvas").getContext("2d")),ea.font=[o,a,i,n+"px",r].join(" "),ea.measureText(kr(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),eB([t],ku(e)).join("")}),kh.prototype.has=function(t){return void 0!==this.map[t]},kh.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},kh.prototype.set=function(t,e){this.map[t]=e},kh.prototype.clear=function(){this.map={}},kh.prototype.delete=function(t){delete this.map[t]},kh.prototype.size=function(){return Object.keys(this.map).length};class kd{constructor(t){this.options=kf({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=kf({},this.options,t),this.rescale(t)}rescale(t){}}function ky(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function kg(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function km(t,e,n){let r=n;return(r<0&&(r+=1),r>1&&(r-=1),r<1/6)?t+(e-t)*6*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function kv(t){let e=eY().get(t);if(!e)return null;let{model:n,value:r}=e;return"rgb"===n?r:"hsl"===n?function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(0===n)return[255*r,255*r,255*r,i];let o=r<.5?r*(1+n):r+n-r*n,a=2*r-o,l=km(a,o,e+1/3);return[255*l,255*km(a,o,e),255*km(a,o,e-1/3),i]}(r):null}let kb=(t,e)=>n=>t*(1-n)+e*n,kx=(t,e)=>{let n=kv(t),r=kv(e);return null===n||null===r?n?()=>t:()=>e:t=>{let e=[,,,,];for(let i=0;i<4;i+=1){let o=n[i],a=r[i];e[i]=o*(1-t)+a*t}let[i,o,a,l]=e;return`rgba(${Math.round(i)}, ${Math.round(o)}, ${Math.round(a)}, ${l})`}},kO=(t,e)=>"number"==typeof t&&"number"==typeof e?kb(t,e):"string"==typeof t&&"string"==typeof e?kx(t,e):()=>t,kw=(t,e)=>{let n=kb(t,e);return t=>Math.round(n(t))};function kE(t){return null!=t&&!Number.isNaN(t)}let kk=Math.sqrt(50),kM=Math.sqrt(10),kS=Math.sqrt(2);function k_(t,e,n){let r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/10**i;return i>=0?(o>=kk?10:o>=kM?5:o>=kS?2:1)*10**i:-(10**-i)/(o>=kk?10:o>=kM?5:o>=kS?2:1)}let kP=(t,e,n=5)=>{let r,i=[t,e],o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&([l,s]=[s,l],[o,a]=[a,o]),(r=k_(l,s,n))>0?r=k_(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=k_(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r),i},kj=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=ky(o,a),i=n(l,s)):(r=ky(a,o),i=n(s,l)),kg(i,r)},kA=(t,e,n)=>{let r=Math.min(t.length,e.length)-1,i=Array(r),o=Array(r),a=t[0]>t[r],l=a?[...t].reverse():t,s=a?[...e].reverse():e;for(let t=0;t<r;t+=1)i[t]=ky(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=function(t,e,n,r,i){let o=1,a=r||t.length,l=t=>t;for(;o<a;){let n=Math.floor((o+a)/2);l(t[n])>e?a=n:o=n+1}return o}(t,e,0,r)-1,a=i[n];return kg(o[n],a)(e)}},kT=(t,e,n,r)=>(Math.min(t.length,e.length)>2?kA:kj)(t,e,r?kw:n);class kC extends kd{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:kb,tickCount:5}}map(t){return kE(t)?this.output(t):this.options.unknown}invert(t){return kE(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;let[t,e,n,...r]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...r)}getTicks(){let{tickMethod:t}=this.options,[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){let{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return kP}rescale(){this.nice();let[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){let{clamp:e,range:n}=this.options,r=this.options.domain.map(t),i=Math.min(r.length,n.length);return e?function(t,e){let n=e<t?e:t,r=t>e?t:e;return t=>Math.min(Math.max(n,t),r)}(r[0],r[i-1]):kp}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=kT(n.map(t),r,o,i);this.output=kg(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=kT(i,r.map(t),kb);this.input=kg(e,n,o)}}let kN=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=k_(o,a,n);if(0===l||!Number.isFinite(l))return[];if(l>0){o=Math.ceil(o/l),i=Array(r=Math.ceil((a=Math.floor(a/l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)*l}else{o=Math.ceil(o*(l=-l)),i=Array(r=Math.ceil((a=Math.floor(a*l))-o+1));for(let t=0;t<r;t+=1)i[t]=(o+t)/l}return i};class kL extends kC{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:kO,tickMethod:kN,tickCount:5}}chooseTransforms(){return[kp,kp]}clone(){return new kL(this.options)}}function kI(t,e){return+t.toPrecision(e)}function kR(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e)return[e.x,e.y];if(n){var o=n[0];return[o.clientX,o.clientY]}return r&&i?[r,i]:[0,0]}var kD={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},kF=O2({background:"background",labelGroup:"label-group",label:"label"},"indicator"),kB=function(t){function e(e){var n=t.call(this,e,kD)||this;return n.point=[0,0],n.group=n.appendChild(new dZ({})),n.isMutationObserved=!0,n}return eC(e,t),e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,e=t.position,n=eF(wG(t.padding),4),r=n[0],i=n[1],o=n[2],a=n[3],l=this.label.node().getLocalBounds(),s=l.min,u=l.max,c=new Et(s[0]-a,s[1]-r,u[0]+i-s[0]+a,u[1]+o-s[1]+r),f=this.getPath(e,c),p=wl(this.attributes,"background");this.background=v$(this.group).maybeAppendByClassName(kF.background,"path").styles(eN(eN({},p),{path:f})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,r=eF(wu(wl(this.attributes,"label")),2),i=r[0],o=r[1],a=(i.text,eL(i,["text"]));this.label=v$(this.group).maybeAppendByClassName(kF.labelGroup,"g").styles(o),n&&this.label.maybeAppendByClassName(kF.label,function(){return wx(e(n))}).style("text",e(n).toString()).selectAll("text").styles(a)},e.prototype.adjustLayout=function(){var t=eF(this.point,2),e=t[0],n=t[1];this.group.attr("x",-e).attr("y",-n)},e.prototype.getPath=function(t,e){var n=this.attributes.radius,r=e.x,i=e.y,o=e.width,a=e.height,l=[["M",r+n,i],["L",r+o-n,i],["A",n,n,0,0,1,r+o,i+n],["L",r+o,i+a-n],["A",n,n,0,0,1,r+o-n,i+a],["L",r+n,i+a],["A",n,n,0,0,1,r,i+a-n],["L",r,i+n],["A",n,n,0,0,1,r+n,i],["Z"]],s={top:4,right:6,bottom:0,left:2}[t],u=this.createCorner([l[s].slice(-2),l[s+1].slice(-2)]);return l.splice.apply(l,ez([s+1,1],eF(u),!1)),l[0][0]="M",l},e.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=wQ.apply(void 0,ez([],eF(t),!1)),r=eF(t,2),i=eF(r[0],2),o=i[0],a=i[1],l=eF(r[1],2),s=l[0],u=l[1],c=eF(n?[s-o,[o,s]]:[u-a,[a,u]],2),f=c[0],p=eF(c[1],2),h=p[0],d=p[1],y=f/2,g=f/Math.abs(f)*e,v=g/2,b=g*Math.sqrt(3)/2*.8,x=eF([h,h+y-v,h+y,h+y+v,d],5),O=x[0],w=x[1],E=x[2],k=x[3],M=x[4];return n?(this.point=[E,a-b],[["L",O,a],["L",w,a],["L",E,a-b],["L",k,a],["L",M,a]]):(this.point=[o+b,E],[["L",o,O],["L",o,w],["L",o+b,E],["L",o,k],["L",o,M]])},e.prototype.applyVisibility=function(){"hidden"===this.attributes.visibility?vS(this):vM(this)},e.prototype.bindEvents=function(){this.label.on(t6.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(vF),kz={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},kW={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},k$={orientation:"horizontal",showLabel:!0,type:"start"},kG=O2({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),kH=O2({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),kV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eC(e,t),e.prototype.render=function(t,e){var n=t.size,r=void 0===n?10:n,i=t.radius,o=t.orientation,a=eL(t,["size","radius","orientation"]),l=2.4*r,s=v$(e).maybeAppendByClassName(kH.iconRect,"rect").styles(eN(eN({},a),{width:r,height:l,radius:void 0===i?r/4:i,x:-r/2,y:-l/2})),u=1/3*r,c=2/3*r,f=1/4*l,p=3/4*l;s.maybeAppendByClassName("".concat(kH.iconLine,"-1"),"line").styles(eN({x1:u,x2:u,y1:f,y2:p},a)),s.maybeAppendByClassName("".concat(kH.iconLine,"-2"),"line").styles(eN({x1:c,x2:c,y1:f,y2:p},a)),s.node().setOrigin(r/2,l/2),"vertical"===o?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},e}(vF),kU=function(t){function e(e){return t.call(this,e,k$)||this}return eC(e,t),e.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=wl(this.attributes,"label"),i=r.transform,o=eF(wu(eL(r,["transform"]),[]),2),a=o[0],l=o[1],s=v$(t).maybeAppendByClassName(kH.labelGroup,"g").styles(l),u=eN(eN({},kW),a),c=u.text,f=eL(u,["text"]);vB(!!n,s,function(t){e.label=t.maybeAppendByClassName(kH.label,"text").styles(eN(eN({},f),{transform:i,text:"".concat(c)})),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},e.prototype.renderIcon=function(t){var e=this.attributes,n=e.orientation,r=e.type,i=eN(eN({orientation:n},kz),wl(this.attributes,"icon")),o=this.attributes.iconShape,a=void 0===o?function(){return new kV({style:i})}:o;v$(t).maybeAppendByClassName(kH.iconGroup,"g").selectAll(kH.icon.class).data([a]).join(function(t){return t.append("string"==typeof a?a:function(){return a(r)}).attr("className",kH.icon.name)},function(t){return t.update(i)},function(t){return t.remove()})},e.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},e}(vF);function kq(t,e){var n=eF(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var kY=O2({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function kX(t){var e=t.orientation,n=t.size,r=t.length;return EK(e,[r,n],[n,r])}function kK(t){var e=t.type,n=eF(kX(t),2),r=n[0],i=n[1];return"size"===e?[["M",0,i],["L",0+r,0],["L",0+r,i],["Z"]]:[["M",0,i],["L",0,0],["L",0+r,0],["L",0+r,i],["Z"]]}var kZ=function(t){function e(e){return t.call(this,e,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return eC(e,t),e.prototype.render=function(t,e){n=v$(e).maybeAppendByClassName(kY.trackGroup,"g"),r=wl(t,"track"),n.maybeAppendByClassName(kY.track,"path").styles(eN({path:kK(t)},r));var n,r,i=v$(e).maybeAppendByClassName(kY.selectionGroup,"g"),o=wl(t,"selection"),a=function(t){var e,n,r,i=t.orientation,o=t.color,a=t.block,l=t.partition,s=(r=vk(o)?Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length,u=r.map(function(t){return pO(t).toString()});return s?1===s?u[0]:a?(e=Array.from(u),Array(n=l.length).fill(0).reduce(function(t,r,i){var o=e[i%e.length];return t+" ".concat(l[i],":").concat(o).concat(i<n-1?" ".concat(l[i+1],":").concat(o):"")},"l(".concat("horizontal"===i?"0":"270",")"))):u.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(EK(i,"0","270"),")")):""}(t),l=i.maybeAppendByClassName(kY.selection,"path").styles(eN({path:kK(t),fill:a},o)),s=l.maybeAppendByClassName(kY.clipPath,"path").styles({path:function(t){var e=t.orientation,n=t.range;if(!n)return[];var r=eF(kX(t),2),i=r[0],o=r[1],a=eF(n,2),l=a[0],s=a[1],u=EK(e,l*i,0),c=EK(e,0,l*o),f=EK(e,s*i,i),p=EK(e,o,s*o);return[["M",u,c],["L",u,p],["L",f,p],["L",f,c],["Z"]]}(t)}).node();l.style("clip-path",s)},e}(vF),kQ=function(t){function e(e){var n=t.call(this,e,E8)||this;return n.eventToOffsetScale=new kL({}),n.innerRibbonScale=new kL({}),n.cacheLabelBBox=null,n.cacheHandleBBox=null,n.onHovering=function(t){var e=n.attributes,r=e.data,i=e.block;t.stopPropagation();var o=n.getValueByCanvasPoint(t);if(i){var a=kq(r.map(function(t){return t.value}),o).range;n.showIndicator((a[0]+a[1])/2,"".concat(a[0],"-").concat(a[1])),n.dispatchIndicated(o,a)}else{var l=n.getTickValue(o);n.showIndicator(l),n.dispatchIndicated(l)}},n.onDragStart=function(t){return function(e){e.stopPropagation(),n.attributes.slidable&&(n.target=t,n.prevValue=n.getTickValue(n.getValueByCanvasPoint(e)),document.addEventListener("mousemove",n.onDragging),document.addEventListener("touchmove",n.onDragging),document.addEventListener("mouseleave",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("mouseup",n.onDragEnd),document.addEventListener("touchend",n.onDragEnd))}},n.onDragging=function(t){var e=n.target;n.updateMouse();var r=eF(n.selection,2),i=r[0],o=r[1],a=n.getTickValue(n.getValueByCanvasPoint(t)),l=a-n.prevValue;"start"===e?i!==a&&n.updateSelection(a,o):"end"===e?o!==a&&n.updateSelection(i,a):"ribbon"===e&&0!==l&&(n.prevValue=a,n.updateSelection(l,l,!0))},n.onDragEnd=function(){n.style.cursor="pointer",document.removeEventListener("mousemove",n.onDragging),document.removeEventListener("touchmove",n.onDragging),document.removeEventListener("mouseup",n.onDragEnd),document.removeEventListener("touchend",n.onDragEnd)},n}return eC(e,t),Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=this.attributes;return new Et(0,0,t.width,t.height)},e.prototype.render=function(t,e){var n=this,r=t.showLabel;this.renderTitle(v$(e));var i=this.availableSpace,o=i.x,a=i.y,l=v$(e).maybeAppendByClassName(E9.contentGroup,"g").styles({x:o,y:a});vB(!!r,l.maybeAppendByClassName(E9.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)});var s=l.maybeAppendByClassName(E9.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(E9.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(s),this.renderIndicator(l),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var t=this.attributes,e=t.data,n=t.domain;return n?{min:n[0],max:n[1]}:{min:Math.min.apply(Math,ez([],eF(e.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,ez([],eF(e.map(function(t){return t.value})),!1))}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,n=t.max;return this.innerRibbonScale.update({domain:[e,n],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var t=eF(this.selection,2),e=t[0],n=t[1],r=this.ribbonScale;return[r.map(e),r.map(n)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var t=this.range,e=t.min,n=t.max,r=this.attributes.defaultValue,i=eF(void 0===r?[e,n]:r,2);return[i[0],i[1]]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,e){return EK(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},e.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,o=e.height,a=wl(this.attributes,"title"),l=eN(eN({},a),{width:i,height:o,text:r}),s=this;t.selectAll(E9.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new Ei({style:l})}).attr("className",E9.title.name).each(function(){s.title=this})},function(t){return t.update(l)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var t=this.attributes;return new Et(0,0,t.width,t.height)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){return 5*!!this.attributes.showTick},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var t=this.attributes;return({vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}})[t.orientation][t.labelDirection]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){if(!this.attributes.showLabel)return new Et(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var t,e=(null==(t=this.label.querySelector(O3.labelGroup.class))?void 0:t.children.slice(-1)[0]).getBBox(),n=e.width,r=e.height;return this.cacheLabelBBox=new Et(0,0,n,r),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var t=this.attributes,e=t.showLabel,n=t.labelSpacing;if(!e)return{width:0,height:0,size:0,length:0};var r=this.labelBBox,i=r.width,o=r.height,a=this.ifHorizontal(o,i)+(void 0===n?0:n)+this.labelFixedSpacing,l=this.ifHorizontal(i,o);return{width:i,height:o,size:a,length:l}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var t=this.attributes,e=t.showHandle,n=t.ribbonSize,r=this.availableSpace,i=r.width,o=r.height,a=this.labelShape,l=a.size,s=a.length,u=eF(this.ifHorizontal([o,i],[i,o]),2),c=u[0],f=u[1],p=e?this.handleShape:{size:0,length:0},h=p.size,d=p.length,y=this.handleOffsetRatio,g=0,v=this.labelPosition;g=n||(["bottom","right"].includes(v)?Math.min(c-l,(c-h)/y):c*(1-y)>h?Math.max(c-l,0):Math.max((c-l-h)/y,0));var b=Math.max(d,s),x=f-b,O=eF(this.ifHorizontal([x,g],[g,x]),2),w=O[0],E=O[1],k=["top","left"].includes(v)?l:0,M=eF(this.ifHorizontal([b/2,k],[k,b/2]),2);return new Et(M[0],M[1],w,E)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,n=t.height;return this.ifHorizontal({size:n,length:e},{size:e,length:n})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,o=e.color,a=e.block,l=wl(this.attributes,"ribbon"),s=this.range,u=s.min,c=s.max,f=this.ribbonBBox,p=f.x,h=f.y,d=this.ribbonShape,y=vL({x:p,y:h,length:d.length,size:d.size,type:r,orientation:i,color:o,block:a,partition:n.map(function(t){return(t.value-u)/(c-u)}),range:this.ribbonRange},l);this.ribbon=t.maybeAppendByClassName(E9.ribbon,function(){return new kZ({style:y})}).update(y)},e.prototype.getHandleClassName=function(t){return"".concat(E9.prefix("".concat(t,"-handle")))},e.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,n=t.orientation,r=wl(this.attributes,"handle"),i=eF(this.selection,2),o=i[0],a=i[1],l=eN(eN({},r),{orientation:n}),s=r.shape,u="basic"===(void 0===s?"slider":s)?E3:kU,c=this;this.handlesGroup.selectAll(E9.handle.class).data(e?[{value:o,type:"start"},{value:a,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new u({style:l})}).attr("className",function(t){var e=t.type;return"".concat(E9.handle," ").concat(c.getHandleClassName(e))}).each(function(t){var e=t.type,n=t.value;this.update({labelText:n}),c["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",c.onDragStart(e))})},function(t){return t.update(l).each(function(t){var e=t.value;this.update({labelText:e})})},function(t){return t.each(function(t){var e=t.type;c["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.adjustHandles=function(){var t=eF(this.selection,2),e=t[0],n=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",n)},e.prototype.adjustTitle=function(){var t=this.attributes,e=t.titlePosition,n=t.orientation,r=eF(this.getElementsByClassName(E9.title.name),1)[0],i=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(r&&i&&"top-left"===e&&"horizontal"===n){var o=eF(i.getLocalBounds().min,1)[0],a=eF(r.getLocalBounds().min,1)[0];r.style.x=+(this.style.x||0)+(o-a)}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new Et(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,n=t.height,r=this.endHandle.getBBox(),i=eF([Math.max(e,r.width),Math.max(n,r.height)],2),o=i[0],a=i[1];return this.cacheHandleBBox=new Et(0,0,o,a),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,n=t.height,r=eF(this.ifHorizontal([n,e],[e,n]),2);return{width:e,height:n,size:r[0],length:r[1]}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,o=r.y,a=this.ribbonShape.size,l=this.getOffset(e),s=eF(this.ifHorizontal([i+l,o+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,o+l]),2),u=s[0],c=s[1],f=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null==f||f.update({x:u,y:c,formatter:n})},e.prototype.renderIndicator=function(t){var e=wl(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(E9.indicator,function(){return new kB({})}).update(e)},Object.defineProperty(e.prototype,"labelData",{get:function(){var t=this;return this.attributes.data.reduce(function(e,n,r,i){var o,a,l=null!=(o=null==n?void 0:n.id)?o:r.toString();if(e.push(eN(eN({},n),{id:l,index:r,type:"value",label:null!=(a=null==n?void 0:n.label)?a:n.value.toString(),value:t.ribbonScale.map(n.value)})),r<i.length-1){var s=i[r+1],u=eF([n.value,s.value],2),c=u[0],f=u[1],p=(c+f)/2;e.push(eN(eN({},n),{id:l,index:r,type:"range",range:[c,f],label:[c,f].join("~"),value:t.ribbonScale.map(p)}))}return e},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var t=eF(["center","middle"],2),e=t[0],n=t[1],r=this.labelPosition;return"top"===r?n="bottom":"bottom"===r?n="top":"left"===r?e="end":"right"===r&&(e="start"),{labelTextAlign:e,labelTextBaseline:n}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,r=e.labelFilter,i=e.labelFormatter,o=wl(this.attributes,"tick"),a=wl(this.attributes,"label"),l=a.align,s=vL(eN({showLine:!1,showGrid:!1,showTick:void 0!==n&&n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),ws(o,"tick"),ws(a,"label"),{data:this.labelData}),u=eN(eN(eN({},s),{tickFilter:function(t,e,n){return(null==t?void 0:t.type)==="value"&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===l&&(!r||r(t,t.index,n.filter(function(t){return t.type===l})))},labelFormatter:i}),{labelOverlap:[{type:"hide"}]});this.label=t.maybeAppendByClassName(E9.label,function(){return new El({style:u})}).node(),this.label.update(u,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,r=t.labelSpacing,i=t.tickLength,o=this.ribbonShape.size,a=this.labelPosition,l=this.labelFixedSpacing,s=eF([0,0,0],3),u=s[0],c=(s[1],s[2]),f=null!=i?i:o;return e?(c=f,"positive"===n?"right"===a?(u=f,c=f):"bottom"===a&&(u=c):"negative"===n&&("top"===a?u=o:"left"===a&&(u=o))):"positive"===n&&("right"===a||"bottom"===a&&(u=o+l)),{offset:u,spacing:r,tickLength:c}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){if(this.attributes.showLabel){var t=this.ribbonBBox,e=t.x,n=t.y,r=t.width,i=t.height,o=this.labelAxisStyle,a=o.offset,l=o.spacing,s=o.tickLength,u=eF(this.ifHorizontal([[e,n+a],[e+r,n+a]],[[e+a,n+i],[e+a,n]]),2),c=u[0],f=u[1];this.label.update({startPos:c,endPos:f,tickLength:s,labelSpacing:l},!1)}},e.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},e.prototype.showIndicator=function(t,e){if(void 0===e&&(e="".concat(t)),!this.attributes.showIndicator||"number"!=typeof t)return void this.hideIndicator();var n=this.range,r=n.min,i=n.max,o=this.ribbonBBox,a=o.x,l=o.y,s=EU(t,r,i),u=this.getOffset(s),c=this.ifHorizontal([u+a,l],[a,u+l]);this.indicator.update({x:c[0],y:c[1],position:this.ifHorizontal("top","left"),labelText:e}),vM(this.indicator.node())},e.prototype.hideIndicator=function(){vS(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(t,e){this.updateSelection(t,e)},e.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,o,a,l,s,u,c,f,p,h,d,y,g,v,b,x,O,w,E=eF(this.selection,2),k=E[0],M=E[1],S=eF([t,e],2),_=S[0],P=S[1];n&&(_+=k,P+=M);var j=this.range;_=(w=eF((r=[j.min,j.max],i=[_,P],o=this.selection,void 0===a&&(a=4),u=(s=eF(r,2))[0],c=s[1],p=(f=eF(i,2))[0],h=f[1],y=(d=eF(o,2))[0],g=d[1],b=(v=eF([p,h],2))[0],O=(x=v[1])-b,(b>x&&(b=(l=eF([x,b],2))[0],x=l[1]),O>c-u)?[u,c]:b<u?y===u&&g===x?[u,x]:[u,O+u]:x>c?g===c&&y===b?[b,c]:[c-O,c]:[b,x]),2))[0],P=w[1],this.update({defaultValue:[_,P]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var t=this.attributes.step,e=void 0===t?1:t,n=this.range,r=n.min,i=n.max;return void 0===e?kI((i-r)*.01,0):e},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(t){var e,n,r=this.attributes,i=r.data,o=r.block,a=this.range.min;return o?kq(i.map(function(t){return t.value}),t).tick:(n=Math.round((t-a)/(e=this.step)),a+n*e)},e.prototype.getValueByCanvasPoint=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=eF(this.ribbon.node().getPosition(),2),a=o[0],l=o[1],s=this.ifHorizontal(a,l),u=this.ifHorizontal.apply(this,ez([],eF(kR(t)),!1));return EU(this.getOffset(u-s,!0),r,i)},e.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,i=n.max,o=this.ribbonShape.length,a=this.eventToOffsetScale;return(a.update({domain:[r,i],range:[0,o]}),e)?a.invert(t):a.map(t)},e.prototype.dispatchSelection=function(){var t=new dd("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},e.prototype.dispatchIndicated=function(t,e){var n=new dd("indicate",{detail:{value:t,range:e}});this.dispatchEvent(n)},e}(vF),kJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function k0(t){let{domain:e}=t.getOptions(),[n,r]=[e[0],gE(e)];return[n,r]}let k1=t=>{let{labelFormatter:e,layout:n,order:r,orientation:i,position:o,size:a,title:l,style:s,crossPadding:u,padding:c}=t,f=kJ(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:r,value:i,theme:a,scale:u})=>{let{bbox:c}=i,{x:p,y:h,width:d,height:y}=c,g=Ej(o,n),{legendContinuous:v={}}=a,b=EL(Object.assign({},v,Object.assign(Object.assign({titleText:EP(l),labelAlign:"value",labelFormatter:"string"==typeof e?t=>eo(e)(t.label):e},function(t,e,n,r,i,o){let a=EC(t,"color"),l=function(t,e,n){let{size:r}=e,i=EN(t,e,n);var o=i.orientation;return(i.size=r,"horizontal"===o||0===o)?i.height=r:i.width=r,i}(n,r,i);if(a instanceof Oj){let{range:t}=a.getOptions(),[e,n]=k0(a);if(a instanceof ON||a instanceof OT){let r=a.thresholds,i=t=>({value:t/n,label:String(t)});return Object.assign(Object.assign({},l),{color:t,data:[e,...r,n].map(i)})}let r=[-1/0,...a.thresholds,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({},l),{data:r,color:t,labelFilter:(t,e)=>e>0&&e<r.length-1})}return function(t,e,n,r,i,o){let{length:a}=t,l=n||r,s=i.color?o.legendContinuous.ribbonFill||"black":o.color,u=e||function(t,e){let n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[pO(e).toString()]})),r}(l,s),[c,f]=k0(u),[p,h]=k0([e,n,r].filter(t=>void 0!==t).find(t=>!(t instanceof OF)));return Object.assign(Object.assign({},t),{domain:[p,h],data:u.getTicks().map(t=>({value:t})),color:Array(Math.floor(a)).fill(0).map((t,e)=>{let n=(f-c)/(a-1)*e+c,i=u.map(n)||s,o=r?r.map(n):1;return i.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${o})`)})})}(l,a,EC(t,"size"),EC(t,"opacity"),e,o)}(r,u,i,t,k1,a)),s),f)),x=new EA({style:Object.assign(Object.assign({x:p,y:h,width:d,height:y},g),{subOptions:b})});return x.appendChild(new kQ({className:"legend-continuous",style:b})),x}};k1.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};let k2=t=>()=>new dZ;k2.props={};var k5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function k3(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}let k4=(R={render(t,e){let{width:n,title:r,subtitle:i,spacing:o=2,align:a="left"}=t,l=k5(t,["width","title","subtitle","spacing","align"]),s=rW(l,"title"),u=rW(l,"subtitle"),c=E_(e,".title","text").attr("className","title").call(gM,Object.assign(Object.assign(Object.assign({},k3(0,0,n,a)),{fontSize:14,textBaseline:"top",text:r}),s)).node().getLocalBounds();E_(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},k3(0,c.max[1]+o,n,a)),{fontSize:12,textBaseline:"top",text:i}),u))})}},class extends dX{constructor(t){super(t),this.descriptor=R}connectedCallback(){var t,e;null==(e=(t=this.descriptor).render)||e.call(t,this.attributes,this)}update(t={}){var e,n;this.attr(rN({},this.attributes,t)),null==(n=(e=this.descriptor).render)||n.call(e,this.attributes,this)}}),k6=t=>({value:e,theme:n})=>{let{x:r,y:i,width:o,height:a}=e.bbox;return new k4({style:rN({},n.title,Object.assign({x:r,y:i,width:o,height:a},t))})};function k8({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):n}function k9(t){return"object"==typeof t?t.valueOf():t}k6.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};class k7 extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=k9,null!==t)for(let[e,n]of t)this.set(e,n)}get(t){return super.get(k8({map:this.map,initKey:this.initKey},t))}has(t){return super.has(k8({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(function({map:t,initKey:e},n){let r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(function({map:t,initKey:e},n){let r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}({map:this.map,initKey:this.initKey},t))}}let Mt=Symbol("defaultUnknown");function Me(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function Mn(t){let{value:e,from:n,to:r,mapper:i,notFoundReturn:o}=t,a=i.get(e);if(void 0===a){if(o!==Mt)return o;a=n.push(e)-1,i.set(e,a)}return r[a%r.length]}function Mr(t){return t instanceof Date?t=>`${t}`:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Mi extends kd{getDefaultOptions(){return{domain:[],range:[],unknown:Mt}}constructor(t){super(t)}map(t){return 0===this.domainIndexMap.size&&Me(this.domainIndexMap,this.getDomain(),this.domainKey),Mn({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Me(this.rangeIndexMap,this.getRange(),this.rangeKey),Mn({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){let[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=Mr(e),this.rangeKey=Mr(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new Mi(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;let{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}class Mo extends Mi{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Mt,flex:[]}}constructor(t){super(t)}clone(){return new Mo(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){let{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){let{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();let{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:o,valueBandWidth:a,valueStep:l}=function(t){var e;let n,r,{domain:i}=t,o=i.length;if(0===o)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(null==(e=t.flex)?void 0:e.length)return function(t){let{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:o,round:a,align:l}=t,s=e.length,u=function(t,e){let n=e-t.length;return n>0?[...t,...Array(n).fill(1)]:n<0?t.slice(0,e):t}(o,s),[c,f]=n,p=f-c,h=p/(2/s*r+1-1/s*i),d=h*i/s,y=h-s*d,g=function(t){let e=Math.min(...t);return t.map(t=>t/e)}(u),v=y/g.reduce((t,e)=>t+e),b=new k7(e.map((t,e)=>{let n=g[e]*v;return[t,a?Math.floor(n):n]})),x=new k7(e.map((t,e)=>{let n=g[e]*v+d;return[t,a?Math.floor(n):n]})),O=Array.from(x.values()).reduce((t,e)=>t+e),w=c+(p-(O-O/s*i))*l,E=a?Math.round(w):w,k=Array(s);for(let t=0;t<s;t+=1){k[t]=Math.round(1e12*E)/1e12;let n=e[t];E+=x.get(n)}return{valueBandWidth:b,valueStep:x,adjustedRange:k}}(t);let{range:a,paddingOuter:l,paddingInner:s,round:u,align:c}=t,f=a[0],p=a[1]-f;n=p/Math.max(1,2*l+(o-s)),u&&(n=Math.floor(n)),f+=(p-n*(o-s))*c,r=n*(1-s),u&&(f=Math.round(f),r=Math.round(r));let h=Array(o).fill(0).map((t,e)=>f+e*n);return{valueStep:n,valueBandWidth:r,adjustedRange:h}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=l,this.valueBandWidth=a,this.adjustedRange=o}}var Ma=function(t){if("object"!=typeof t||null===t)return t;if(vC(t)){e=[];for(var e,n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=Ma(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=Ma(t[i]):e[i]=t[i];return e},Ml=function(t){function e(e){var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,O1({},{type:"column"},eN({style:r},i)))||this).columnsGroup=new dZ({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return eC(e,t),e.prototype.render=function(){var t=this.attributes.columns;v$(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.update=function(t){this.attr(vL({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(dU),Ms=function(t){function e(e){var n=this,r=e.style,i=eL(e,["style"]);return(n=t.call(this,O1({},{type:"lines"},eN({style:r},i)))||this).linesGroup=n.appendChild(new dZ),n.areasGroup=n.appendChild(new dZ),n.render(),n}return eC(e,t),e.prototype.render=function(){var t=this.attributes,e=t.lines,n=t.areas;e&&this.renderLines(e),n&&this.renderAreas(n)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(vL({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){v$(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},e.prototype.renderAreas=function(t){v$(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})},e}(dU),Mu=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Mc=function(t,e){if(t===e)return!0;if(!t||!e||vq(t)||vq(e))return!1;if(Mu(t)||Mu(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Mc(t[r],e[r]));r++);return n}if(vP(t)||vP(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(var n=!0,r=0;r<i.length&&(n=Mc(t[i[r]],e[i[r]]));r++);return n}return!1};function Mf(t,e){void 0===e&&(e=!1);var n=e?t.length-1:0,r=t.map(function(t,e){return ez([e===n?"M":"L"],eF(t),!1)});return e?r.reverse():r}function Mp(t,e){if(void 0===e&&(e=!1),t.length<=2)return Mf(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var o=e?t[r-i-1]:t[i];Mc(o,n.slice(-2))||n.push.apply(n,ez([],eF(o),!1))}var a=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=[[0,0],[1,1]]);for(var r,i,o,a=!!e,l=[],s=0,u=t.length;s<u;s+=2)l.push([t[s],t[s+1]]);for(var c=function(t,e,n,r){var i,o,a,l,s,u,c=[],f=!!r,p=[1/0,1/0],h=[-1/0,-1/0];if(f){p=(i=eF(r,2))[0],h=i[1];for(var d=0,y=t.length;d<y;d+=1){var g=t[d];p=O9(p,g),h=O7(h,g)}}for(var d=0,v=t.length;d<v;d+=1){var g=t[d];if(0!==d||n)if(d!==v-1||n){o=t[[d?d-1:v-1,d-1][+!n]];var b=[0,0];b=O4(b=O8(a=t[n?(d+1)%v:d+1],o),.4);var x=wt(g,o),O=wt(g,a),w=x+O;0!==w&&(x/=w,O/=w);var E=O4(b,-x),k=O4(b,O);s=O6(g,E),l=O9(l=O6(g,k),O7(a,g)),E=O4(E=O8(l=O7(l,O9(a,g)),g),-x/O),s=O9(s=O6(g,E),O7(o,g)),s=O7(s,O9(o,g)),k=O4(k=O8(g,s),O/x),l=O6(g,k),f&&(s=O9(s=O7(s,p),h),l=O9(l=O7(l,p),h)),c.push(u),c.push(s),u=l}else s=g,c.push(u),c.push(s);else u=g}return n&&c.push(c.shift()),c}(l,0,a,n),f=l.length,p=[],s=0;s<f-1;s+=1)r=c[2*s],i=c[2*s+1],o=l[s+1],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]]);return a&&(r=c[f],i=c[f+1],o=eF(l,1)[0],p.push(["C",r[0],r[1],i[0],i[1],o[0],o[1]])),p}(n,!1);return e?a.unshift(ez(["M"],eF(t[r-1]),!1)):a.unshift(ez(["M"],eF(t[0]),!1)),a}function Mh(t,e,n){var r=Ma(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}var Md=function(t){if(vC(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},My=function(t,e){if(vC(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=vk(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},Mg=function(t){if(vC(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Mm=function(t,e){if(vC(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=vk(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}};function Mv(t){return 0===t.length?[0,0]:[Md(My(t,function(t){return Md(t)||0})),Mg(Mm(t,function(t){return Mg(t)||0}))]}function Mb(t){for(var e=Ma(t),n=e[0].length,r=eF([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],o=r[1],a=0;a<e.length;a+=1)for(var l=e[a],s=0;s<n;s+=1)l[s]>=0?(l[s]+=i[s],i[s]=l[s]):(l[s]+=o[s],o[s]=l[s]);return e}var Mx=function(t){function e(e){return t.call(this,e,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return eC(e,t),Object.defineProperty(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(null==t?void 0:t.length)===0)return[[]];var e=Ma(t);return wb(e[0])?[e]:e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?Mb(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,e=eF(t.getOptions().domain||[0,0],2),n=e[0],r=e[1];return r<0?t.map(r):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,e=this.attributes,n=e.type,r=e.isStack,i=e.smooth;if("line"!==n)throw Error("linesStyle can only be used in line type");var o=wl(this.attributes,"area"),a=wl(this.attributes,"line"),l=this.containerShape.width,s=this.data;if(0===s[0].length)return{lines:[],areas:[]};var u=this.scales,c=(d=(p={type:"line",x:u.x,y:u.y}).x,v=(g=eF((y=p.y).getOptions().range||[0,0],2))[0],(b=g[1])>v&&(b=(h=eF([v,b],2))[0],v=h[1]),s.map(function(t){return t.map(function(t,e){return[d.map(e),EU(y.map(t),b,v)]})})),f=[];if(o){var p,h,d,y,g,v,b,x=this.baseline;f=r?i?function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=t[i],a=Mp(o),l=void 0;if(0===i)l=Mh(a,e,n);else{var s=Mp(t[i-1],!0),u=o[0];s[0][0]="L",l=ez(ez(ez([],eF(a),!1),eF(s),!1),[ez(["M"],eF(u),!1),["Z"]],!1)}r.push(l)}return r}(c,l,x):function(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var o=Mf(t[i]),a=void 0;if(0===i)a=Mh(o,e,n);else{var l=Mf(t[i-1],!0);l[0][0]="L",a=ez(ez(ez([],eF(o),!1),eF(l),!1),[["Z"]],!1)}r.push(a)}return r}(c,l,x):c.map(function(t){return Mh(i?Mp(t):Mf(t),l,x)})}return{lines:c.map(function(e,n){return eN({stroke:t.getColor(n),path:i?Mp(e):Mf(e)},a)}),areas:f.map(function(e,n){return eN({path:e,fill:t.getColor(n)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,e=wl(this.attributes,"column"),n=this.attributes,r=n.isStack,i=n.type,o=n.scale;if("column"!==i)throw Error("columnsStyle can only be used in column type");var a=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};r&&(l=Mb(l));var s=this.createScales(l),u=s.x,c=s.y,f=eF(Mv(l),2),p=f[0],h=new kL({domain:[0,f[1]-(p>0?0:p)],range:[0,a*o]}),d=u.getBandWidth(),y=this.rawData;return{columns:l.map(function(n,i){return n.map(function(n,o){var a=d/l.length;return eN(eN({fill:t.getColor(i)},e),r?{x:u.map(o),y:c.map(n),width:d,height:h.map(y[i][o])}:{x:u.map(o)+a*i,y:n>=0?c.map(n):c.map(0),width:a,height:h.map(Math.abs(n))})})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,e){(n=".container",r="rect",!e.querySelector(n)?v$(e).append(r):v$(e).select(n)).attr("className","container").node();var n,r,i=t.type,o="spark".concat(i),a="line"===i?this.linesStyle:this.columnsStyle;v$(e).selectAll(".spark").data([i]).join(function(t){return t.append(function(t){return"line"===t?new Ms({className:o,style:a}):new Ml({className:o,style:a})}).attr("className","spark ".concat(o))},function(t){return t.update(a)},function(t){return t.remove()})},e.prototype.getColor=function(t){var e=this.attributes.color;return vC(e)?e[t%e.length]:vk(e)?e.call(null,t):e},e.prototype.createScales=function(t){var e,n,r=this.attributes,i=r.type,o=r.scale,a=r.range,l=void 0===a?[]:a,s=r.spacing,u=this.containerShape,c=u.width,f=u.height,p=eF(Mv(t),2),h=p[0],d=p[1],y=new kL({domain:[null!=(e=l[0])?e:h,null!=(n=l[1])?n:d],range:[f,f*(1-o)]});return"line"===i?{type:i,x:new kL({domain:[0,t[0].length-1],range:[0,c]}),y:y}:{type:i,x:new Mo({domain:t[0].map(function(t,e){return e}),range:[0,c],paddingInner:s,paddingOuter:s/2,align:.5}),y:y}},e.tag="sparkline",e}(vF),MO=function(t){function e(e){var n=t.call(this,e,eN(eN(eN({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},ws(k$,"handle")),ws(kz,"handleIcon")),ws(kW,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(t){return function(e){e.stopPropagation(),n.target=t,n.prevPos=n.getOrientVal(kR(e));var r=n.availableSpace,i=r.x,o=r.y,a=n.getBBox(),l=a.x,s=a.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([i,o])-n.getOrientVal([+l,+s])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(t){var e=n.attributes,r=e.slidable,i=e.brushable,o=e.type;t.stopPropagation();var a=n.getOrientVal(kR(t)),l=a-n.prevPos;if(l){var s=n.getRatio(l);switch(n.target){case"start":r&&n.setValuesOffset(s);break;case"end":r&&n.setValuesOffset(0,s);break;case"selection":r&&n.setValuesOffset(s,s);break;case"track":if(!i)return;n.selectionWidth+=s,"range"===o?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0)}n.prevPos=a}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(t){var e=n.attributes,r=e.onChange,i=e.type,o="range"===i?t:t[1],a="range"===i?n.getValues():n.getValues()[1],l=new dd("valuechange",{detail:{oldValue:o,value:a}});n.dispatchEvent(l),null==r||r(a)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return eC(e,t),Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){if("horizontal"!==this.attributes.orientation)return null;var t=wl(this.attributes,"sparkline");return eN(eN({zIndex:0},this.availableSpace),t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,n=t.trackSize,r=eF(this.getOrientVal([[e,n],[n,e]]),2);return{width:r[0],height:r[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=eF(wG(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],i=t[3],o=this.shape;return{x:i,y:e,width:o.width-(i+n),height:o.height-(e+r)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1),this.attributes.values=t;var n=!1!==e&&this.attributes.animate;this.updateSelectionArea(n),this.updateHandlesPosition(n)},e.prototype.updateSelectionArea=function(t){var e=this.calcSelectionArea();this.foregroundGroup.selectAll(kG.selection.class).each(function(n,r){O0(this,e[r],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&O0(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&O0(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,e){void 0===t&&(t=[0,0]),void 0===e&&(e=!1);var n=this.values,r=this.clampValues(t);this.attributes.values=r,this.setValues(r),e&&this.onValueChange(n)},e.prototype.renderTrack=function(t){var e=wl(this.attributes,"track");this.trackShape=v$(t).maybeAppendByClassName(kG.track,"rect").styles(eN(eN({},this.shape),e))},e.prototype.renderBrushArea=function(t){var e=this.attributes.brushable;this.brushArea=v$(t).maybeAppendByClassName(kG.brushArea,"rect").styles(eN({fill:"transparent",cursor:e?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var e=this;vB("horizontal"===this.attributes.orientation,v$(t).maybeAppendByClassName(kG.sparklineGroup,"g"),function(t){var n=e.sparklineStyle;t.maybeAppendByClassName(kG.sparkline,function(){return new Mx({style:n})}).update(n)})},e.prototype.renderHandles=function(){var t,e=this,n=this.attributes,r=n.showHandle,i=n.type,o=this;null==(t=this.foregroundGroup)||t.selectAll(kG.handle.class).data((r?"range"===i?["start","end"]:["end"]:[]).map(function(t){return{type:t}}),function(t){return t.type}).join(function(t){return t.append(function(t){var n=t.type;return new kU({style:e.getHandleStyle(n)})}).each(function(t){var e=t.type;this.attr("class","".concat(kG.handle.name," ").concat(e,"-handle")),o["".concat(e,"Handle")]=this,this.addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.each(function(t){var e=t.type;this.update(o.getHandleStyle(e))})},function(t){return t.each(function(t){var e=t.type;o["".concat(e,"Handle")]=void 0}).remove()})},e.prototype.renderSelection=function(t){var e=this.attributes,n=e.type,r=e.selectionType;this.foregroundGroup=v$(t).maybeAppendByClassName(kG.foreground,"g");var i=wl(this.attributes,"selection"),o=function(t){return t.style("visibility",function(t){return t.show?"visible":"hidden"}).style("cursor",function(t){return"select"===r?"grab":"invert"===r?"crosshair":"default"}).styles(i)},a=this;this.foregroundGroup.selectAll(kG.selection.class).data("value"===n?[]:this.calcSelectionArea().map(function(t,e){return{style:eN({},t),index:e,show:"select"===r?1===e:1!==e}}),function(t){return t.index}).join(function(t){return t.append("rect").attr("className",kG.selection.name).call(o).each(function(t,e){var n=this;1===e?(a.selectionShape=v$(this),this.on("pointerdown",function(t){n.attr("cursor","grabbing"),a.onDragStart("selection")(t)}),a.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),a.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),a.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){n.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){n.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){n.attr("cursor","pointer")})):this.on("pointerdown",a.onDragStart("track"))})},function(t){return t.call(o)},function(t){return t.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderBrushArea(e),this.renderSelection(e)},e.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n,r=eF(this.range,2),i=r[0],o=r[1],a=eF(this.getValues().map(function(t){return kI(t,e)}),2),l=a[0],s=a[1],u=eF(((Array.isArray(t)?t:[l,null!=t?t:s])||[l,s]).map(function(t){return kI(t,e)}),2),c=u[0],f=u[1];if("value"===this.attributes.type)return[0,EU(f,i,o)];c>f&&(c=(n=eF([f,c],2))[0],f=n[1]);var p=f-c;return p>o-i?[i,o]:c<i?l===i&&s===f?[i,f]:[i,p+i]:f>o?s===o&&l===c?[c,o]:[o-p,o]:[c,f]},e.prototype.calcSelectionArea=function(t){var e=eF(this.clampValues(t),2),n=e[0],r=e[1],i=this.availableSpace,o=i.x,a=i.y,l=i.width,s=i.height;return this.getOrientVal([[{y:a,height:s,x:o,width:n*l},{y:a,height:s,x:n*l+o,width:(r-n)*l},{y:a,height:s,x:r*l,width:(1-r)*l}],[{x:o,width:l,y:a,height:n*s},{x:o,width:l,y:n*s+a,height:(r-n)*s},{x:o,width:l,y:r*s,height:(1-r)*s}]])},e.prototype.calcHandlePosition=function(t){var e=this.attributes.handleIconOffset,n=this.availableSpace,r=n.x,i=n.y,o=n.width,a=n.height,l=eF(this.clampValues(),2),s=l[0],u=l[1],c=("start"===t?s:u)*this.getOrientVal([o,a])+("start"===t?-e:e);return{x:r+this.getOrientVal([c,o/2]),y:i+this.getOrientVal([a/2,c])}},e.prototype.inferTextStyle=function(t){return"horizontal"===this.attributes.orientation?{}:"start"===t?{transform:"rotate(90)",textAlign:"start"}:"end"===t?{transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.type,i=n.orientation,o=n.formatter,a=n.autoFitLabel,l=wl(this.attributes,"handle"),s=wl(l,"label"),u=l.spacing,c=this.getHandleSize(),f=this.clampValues(),p=o("start"===t?f[0]:f[1]),h=new vz({style:eN(eN(eN({},s),this.inferTextStyle(t)),{text:p})}),d=h.getBBox(),y=d.width,g=d.height;if(h.destroy(),!a){if("value"===r)return{text:p,x:0,y:-g-u};var v=u+c+("horizontal"===i?y/2:0);return(e={text:p})["horizontal"===i?"x":"y"]="start"===t?-v:v,e}var b=0,x=0,O=this.availableSpace,w=O.width,E=O.height,k=this.calcSelectionArea()[1],M=k.x,S=k.y,_=k.width,P=k.height,j=u+c;if("horizontal"===i){var A=j+y/2;b="start"===t?M-j-y>0?-A:A:w-M-_-j>y?A:-A}else{var T=g+j;x="start"===t?S-c>g?-T:j:E-(S+P)-c>g?T:-j}return{x:b,y:x,text:p}},e.prototype.getHandleLabelStyle=function(t){var e=wl(this.attributes,"handleLabel");return eN(eN(eN({},e),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=wl(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return eN({cursor:n,shape:t,size:r},e)},e.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,r=e.showLabelOnInteraction,i=e.orientation,o=this.calcHandlePosition(t),a=this.calcHandleText(t),l=n;return!n&&r&&(l=!!this.target),eN(eN(eN(eN({},ws(this.getHandleIconStyle(),"icon")),ws(eN(eN({},this.getHandleLabelStyle(t)),a),"label")),o),{orientation:i,showLabel:l,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,r=t.height;return e||Math.floor((this.getOrientVal([+r,+n])+4)/2.4)},e.prototype.getOrientVal=function(t){var e=eF(t,2),n=e[0],r=e[1];return"horizontal"===this.attributes.orientation?n:r},e.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=this.attributes.type,i=eF(this.getValues(),2),o=[i[0]+("range"===r?t:0),i[1]+e].sort();n?this.setValues(o):this.innerSetValues(o,!0)},e.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,r=e.height;return t/this.getOrientVal([n,r])},e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new dd(n,{detail:t}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){if(this.attributes.scrollable){var e=t.deltaX,n=t.deltaY,r=this.getRatio(n||e);this.setValuesOffset(r,r,!0)}},e.tag="slider",e}(vF);function Mw(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ME(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Mk(t){let e,n,r;function i(t,r,o=0,a=t.length){if(o<a){if(0!==e(r,r))return a;do{let e=o+a>>>1;0>n(t[e],r)?o=e+1:a=e}while(o<a)}return o}return 2!==t.length?(e=Mw,n=(e,n)=>Mw(t(e),n),r=(e,n)=>t(e)-n):(e=t===Mw||t===ME?t:MM,n=t,r=t),{left:i,center:function(t,e,n=0,o=t.length){let a=i(t,e,n,o-1);return a>n&&r(t[a-1],e)>-r(t[a],e)?a-1:a},right:function(t,r,i=0,o=t.length){if(i<o){if(0!==e(r,r))return o;do{let e=i+o>>>1;0>=n(t[e],r)?i=e+1:o=e}while(i<o)}return i}}}function MM(){return 0}function MS(t){return null===t?NaN:+t}let M_=Mk(Mw),MP=M_.right,Mj=M_.left,MA=Mk(MS).center;function MT(t,...e){if("function"!=typeof t[Symbol.iterator])throw TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&2!==n.length||e.length>1){var r;let i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,n)=>{for(let r of e){let e=MN(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>MN(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(MC(n))}function MC(t=Mw){if(t===Mw)return MN;if("function"!=typeof t)throw TypeError("compare is not a function");return(e,n)=>{let r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}function MN(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function ML(t){return!!t.getBandWidth}function MI(t,e,n){var r;if(!ML(t))return t.invert(e);let{adjustedRange:i}=t,{domain:o}=t.getOptions(),a=t.getStep(),l=(r=Mj(n?i:i.map(t=>t+a),e)+(n?-1:0),Math.min(o.length-1,Math.max(0,r)));return o[l]}function MR(t,e,n){if(!e)return t.getOptions().domain;if(!ML(t)){let r=MT(e);if(!n)return r;let[i]=r,{range:o}=t.getOptions(),[a,l]=o,s=t.invert(t.map(i)+(a>l?-1:1)*n);return[i,s]}let{domain:r}=t.getOptions(),i=e[0],o=r.indexOf(i);if(n){let t=o+Math.round(r.length*n);return r.slice(o,t)}let a=e[e.length-1],l=r.indexOf(a);return r.slice(o,l+1)}function MD(t,e,n,r,i,o){let{x:a,y:l}=i,s=(t,e)=>{let[n,r]=o.invert(t);return[MI(a,n,e),MI(l,r,e)]},u=s([t,e],!0),c=s([n,r],!1);return[MR(a,[u[0],c[0]]),MR(l,[u[1],c[1]])]}function MF(t,e){let[n,r]=t;return[e.map(n),e.map(r)+(e.getStep?e.getStep():0)]}var MB=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let Mz=t=>{let{orientation:e,labelFormatter:n,size:r,style:i={},position:o}=t,a=MB(t,["orientation","labelFormatter","size","style","position"]);return r=>{var l;let{scales:[s],value:u,theme:c,coordinate:f}=r,{bbox:p}=u,{width:h,height:d}=p,{slider:y={}}=c,g=(null==(l=s.getFormatter)?void 0:l.call(s))||(t=>t+""),v="string"==typeof n?eo(n):n,b="horizontal"===e,x=sq(f)&&b,{trackSize:O=y.trackSize}=i,[w,E]=function(t,e,n){let{x:r,y:i,width:o,height:a}=t;return"left"===e?[r+o-n,i]:"right"===e||"bottom"===e?[r,i]:"top"===e?[r,i+a-n]:void 0}(p,o,O);return new MO({className:"slider",style:Object.assign({},y,Object.assign(Object.assign({x:w,y:E,trackLength:b?h:d,orientation:e,formatter:t=>(v||g)(MI(s,x?1-t:t,!0)),sparklineData:function(t,e){let{markState:n}=e;if(rA(t.sparklineData))return t.sparklineData;var r=["y","series"];let[i]=Array.from(n.entries()).filter(([t])=>"line"===t.type||"area"===t.type).map(([t])=>{let{encode:e,slider:n}=t;if((null==n?void 0:n.x)&&0===Object.keys(n.x).length)return Object.fromEntries(r.map(t=>{let n=e[t];return[t,n?n.value:void 0]}))});return(null==i?void 0:i.series)?Object.values(i.series.reduce((t,e,n)=>(t[e]=t[e]||[],t[e].push(i.y[n]),t),{})):null==i?void 0:i.y}(t,r)},i),a))})}};Mz.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let MW=t=>Mz(Object.assign(Object.assign({},t),{orientation:"horizontal"}));MW.props=Object.assign(Object.assign({},Mz.props),{defaultPosition:"bottom"});let M$=t=>Mz(Object.assign(Object.assign({},t),{orientation:"vertical"}));M$.props=Object.assign(Object.assign({},Mz.props),{defaultPosition:"left"});var MG=function(t){function e(e){var n=t.call(this,e,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return n.range=[0,1],n.onValueChange=function(t){var e=n.attributes.value;if(t!==e){var r={detail:{oldValue:t,value:e}};n.dispatchEvent(new dd("scroll",r)),n.dispatchEvent(new dd("valuechange",r))}},n.onTrackClick=function(t){if(n.attributes.slidable){var e=eF(n.getLocalPosition(),2),r=e[0],i=e[1],o=eF(n.padding,4),a=o[0],l=o[3],s=n.getOrientVal([r+l,i+a]),u=(n.getOrientVal(kR(t))-s)/n.trackLength;n.setValue(u,!0)}},n.onThumbMouseenter=function(t){n.dispatchEvent(new dd("thumbMouseenter",{detail:t.detail}))},n.onTrackMouseenter=function(t){n.dispatchEvent(new dd("trackMouseenter",{detail:t.detail}))},n.onThumbMouseleave=function(t){n.dispatchEvent(new dd("thumbMouseleave",{detail:t.detail}))},n.onTrackMouseleave=function(t){n.dispatchEvent(new dd("trackMouseleave",{detail:t.detail}))},n}return eC(e,t),Object.defineProperty(e.prototype,"padding",{get:function(){return wG(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var t=this.attributes.value,e=eF(this.range,2);return EU(t,e[0],e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,n=t.trackLength;return void 0===n?e:n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=eF(this.padding,4),r=n[0],i=n[1],o=n[2],a=n[3],l=eF(this.getOrientVal([[e,t],[t,e]]),2);return{x:a,y:r,width:+l[0]-(a+i),height:+l[1]-(r+o)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.trackSize;return e?n/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var t=this.attributes,e=t.isRound,n=t.thumbRadius;if(!e)return 0;var r=this.availableSpace,i=r.width,o=r.height;return n||this.getOrientVal([o,i])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,n=e.viewportLength/e.contentLength,r=eF(this.range,2),i=r[0],o=t*(r[1]-i-n);return[o,o+n]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,o=e.slidable,a=wl(this.attributes,"track"),l=wl(this.attributes,"thumb"),s=eN(eN({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:o,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},ws(a,"track")),ws(l,"selection"));this.slider=v$(t).maybeAppendByClassName("scrollbar",function(){return new MO({style:s})}).update(s).node()},e.prototype.render=function(t,e){this.renderSlider(e)},e.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=eF(this.range,2),i=r[0],o=r[1];this.slider.setValues(this.getValues(EU(t,i,o)),e),this.onValueChange(n)},e.prototype.bindEvents=function(){var t=this;this.slider.addEventListener("trackClick",function(e){e.stopPropagation(),t.onTrackClick(e.detail)}),this.onHover()},e.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},e.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},e.tag="scrollbar",e}(vF),MH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};let MV=t=>{let{orientation:e,labelFormatter:n,style:r}=t,i=MH(t,["orientation","labelFormatter","style"]);return({scales:[t],value:n,theme:o})=>{let{bbox:a}=n,{x:l,y:s,width:u,height:c}=a,{scrollbar:f={}}=o,{ratio:p,range:h}=t.getOptions(),d="horizontal"===e?u:c,y=d/p,[g,v]=h;return new MG({className:"g2-scrollbar",style:Object.assign({},f,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:s,trackLength:d,value:v>g?0:1}),i),{orientation:e,contentLength:y,viewportLength:d}))})}};MV.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};let MU=t=>MV(Object.assign(Object.assign({},t),{orientation:"horizontal"}));MU.props=Object.assign(Object.assign({},MV.props),{defaultPosition:"bottom"});let Mq=t=>MV(Object.assign(Object.assign({},t),{orientation:"vertical"}));Mq.props=Object.assign(Object.assign({},MV.props),{defaultPosition:"left"});let MY=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=sq(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.01},{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u}];return o.animate(p,Object.assign(Object.assign({},i),t))}},MX=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=sq(n)?["left bottom","scale(1, 0.0001)"]:["left top","scale(0.0001, 1)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},MK=(t,e)=>{let{coordinate:n}=e;return dq({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:t3.NUMBER}),(e,r,i)=>{let[o]=e;if(sY(n))return(e=>{let{__data__:r,style:o}=e,{radius:a=0,inset:l=0,fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=o,{points:f,y:p,y1:h}=r,d=gj(n,f,[p,h]),{innerRadius:y,outerRadius:g}=d,v=sU().cornerRadius(a).padAngle(l*Math.PI/180),b=new d1({}),x=n.getCenter(),O=t=>{b.attr({d:v(t),transform:`translate(${x[0]}, ${x[1]})`});let e=pJ(b);return b.style.transform="",e},w=e.animate([{scaleInYRadius:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:y+1e-4,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{scaleInYRadius:g,fillOpacity:s,strokeOpacity:u,opacity:c}],Object.assign(Object.assign({},i),t));return w.onframe=function(){e.style.path=O(Object.assign(Object.assign({},d),{outerRadius:Number(e.style.scaleInYRadius)}))},w.onfinish=function(){e.style.path=O(Object.assign(Object.assign({},d),{outerRadius:g}))},w})(o);let{style:a}=o,{transform:l="",fillOpacity:s=1,strokeOpacity:u=1,opacity:c=1}=a,[f,p]=sq(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],h=[{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${l} ${p}`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c,offset:.01},{transform:`${l} scale(1, 1)`.trimStart(),transformOrigin:f,fillOpacity:s,strokeOpacity:u,opacity:c}];return o.animate(h,Object.assign(Object.assign({},i),t))}},MZ=(t,e)=>{let{coordinate:n}=e;return(e,r,i)=>{let[o]=e,{transform:a="",fillOpacity:l=1,strokeOpacity:s=1,opacity:u=1}=o.style,[c,f]=sq(n)?["left top","scale(0.0001, 1)"]:["left bottom","scale(1, 0.0001)"],p=[{transform:`${a} scale(1, 1)`.trimStart(),transformOrigin:c},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:l,strokeOpacity:s,opacity:u,offset:.99},{transform:`${a} ${f}`.trimStart(),transformOrigin:c,fillOpacity:0,strokeOpacity:0,opacity:0}];return o.animate(p,Object.assign(Object.assign({},i),t))}},MQ=(t,e)=>{dq({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:t3.NUMBER});let{coordinate:n}=e;return(r,i,o)=>{let[a]=r;if(!sY(n))return MY(t,e)(r,i,o);let l=n.getCenter(),{__data__:s,style:u}=a,{radius:c=0,inset:f=0,fillOpacity:p=1,strokeOpacity:h=1,opacity:d=1}=u,{points:y,y:g,y1:v}=s,b=sU().cornerRadius(c).padAngle(f*Math.PI/180),x=gj(n,y,[g,v]),{startAngle:O,endAngle:w}=x,E=new d1({}),k=t=>{E.attr({d:b(t),transform:`translate(${l[0]}, ${l[1]})`});let e=pJ(E);return E.style.transform="",e},M=a.animate([{waveInArcAngle:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:O+1e-4,fillOpacity:p,strokeOpacity:h,opacity:d,offset:.01},{waveInArcAngle:w,fillOpacity:p,strokeOpacity:h,opacity:d}],Object.assign(Object.assign({},o),t));return M.onframe=function(){a.style.path=k(Object.assign(Object.assign({},x),{endAngle:Number(a.style.waveInArcAngle)}))},M.onfinish=function(){a.style.path=k(Object.assign(Object.assign({},x),{endAngle:w}))},M}};MQ.props={};let MJ=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:o,strokeOpacity:a,opacity:l}],Object.assign(Object.assign({},r),t))};MJ.props={};let M0=t=>(e,n,r)=>{let[i]=e,{fillOpacity:o=1,strokeOpacity:a=1,opacity:l=1}=i.style;return i.animate([{fillOpacity:o,strokeOpacity:a,opacity:l},{fillOpacity:0,strokeOpacity:0,opacity:0}],Object.assign(Object.assign({},r),t))};M0.props={};let M1=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))},M2=t=>(e,n,r)=>{let[i]=e,{transform:o="",fillOpacity:a=1,strokeOpacity:l=1,opacity:s=1}=i.style,u="center center",c=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:a,strokeOpacity:l,opacity:s,offset:.99},{transform:`${o} scale(0.0001)`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))},M5=t=>(e,n,r)=>{var i;let[o]=e,a=(null==(i=o.getTotalLength)?void 0:i.call(o))||0;return o.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Object.assign(Object.assign({},r),t))};function M3(t,e){let n={};for(let r of e){let e=t.style[r];e&&(n[r]=e)}return n}M5.props={};let M4=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function M6(t){let{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[o,a]=n;return[r,i,o-r,a-i]}function M8(t,e){let[n,r,i,o]=M6(t),a=Math.ceil(Math.sqrt(e/(o/i))),l=[],s=o/Math.ceil(e/a),u=0,c=e;for(;c>0;){let t=Math.min(c,a),e=i/t;for(let i=0;i<t;i++){let t=n+i*e,o=r+u*s;l.push(function(t){let[e,n,r,i]=t;return`
|
|
11
11
|
M ${e} ${n}
|
|
12
12
|
L ${e+r} ${n}
|
|
13
13
|
L ${e+r} ${n+i}
|