@nocobase/plugin-data-visualization 1.9.0-alpha.1 → 1.9.0-beta.2

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 tC},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_={};n.r(t_),n.d(t_,{geoAlbers:function(){return it},geoAlbersUsa:function(){return ie},geoAzimuthalEqualArea:function(){return rU},geoAzimuthalEqualAreaRaw:function(){return rV},geoAzimuthalEquidistant:function(){return r2},geoAzimuthalEquidistantRaw:function(){return r1},geoConicConformal:function(){return ip},geoConicConformalRaw:function(){return ic},geoConicEqualArea:function(){return r7},geoConicEqualAreaRaw:function(){return r9},geoConicEquidistant:function(){return is},geoConicEquidistantRaw:function(){return il},geoEqualEarth:function(){return r0},geoEqualEarthRaw:function(){return rJ},geoEquirectangular:function(){return ia},geoEquirectangularRaw:function(){return io},geoGnomonic:function(){return r6},geoGnomonicRaw:function(){return r4},geoIdentity:function(){return iy},geoMercator:function(){return rY},geoMercatorRaw:function(){return rq},geoNaturalEarth1:function(){return r3},geoNaturalEarth1Raw:function(){return r5},geoOrthographic:function(){return id},geoOrthographicRaw:function(){return ih},geoProjection:function(){return rG},geoProjectionMutator:function(){return rH},geoStereographic:function(){return ii},geoStereographicRaw:function(){return ir},geoTransverseMercator:function(){return rZ},geoTransverseMercatorRaw:function(){return rK}});var tP={};n.r(tP),n.d(tP,{add:function(){return oZ},adjoint:function(){return og},clone:function(){return ou},copy:function(){return oc},create:function(){return os},determinant:function(){return om},equals:function(){return o2},exactEquals:function(){return o1},frob:function(){return oK},fromQuat:function(){return oF},fromQuat2:function(){return oC},fromRotation:function(){return o_},fromRotationTranslation:function(){return oT},fromRotationTranslationScale:function(){return oR},fromRotationTranslationScaleOrigin:function(){return oD},fromScaling:function(){return oS},fromTranslation:function(){return oM},fromValues:function(){return of},fromXRotation:function(){return oP},fromYRotation:function(){return oj},fromZRotation:function(){return oA},frustum:function(){return oB},getRotation:function(){return oI},getScaling:function(){return oL},getTranslation:function(){return oN},identity:function(){return oh},invert:function(){return oy},lookAt:function(){return oq},mul:function(){return o5},multiply:function(){return ov},multiplyScalar:function(){return oJ},multiplyScalarAndAdd:function(){return o0},ortho:function(){return oV},orthoNO:function(){return oH},orthoZO:function(){return oU},perspective:function(){return oW},perspectiveFromFieldOfView:function(){return oG},perspectiveNO:function(){return oz},perspectiveZO:function(){return o$},rotate:function(){return oO},rotateX:function(){return ow},rotateY:function(){return oE},rotateZ:function(){return ok},scale:function(){return ox},set:function(){return op},str:function(){return oX},sub:function(){return o3},subtract:function(){return oQ},targetTo:function(){return oY},translate:function(){return ob},transpose:function(){return od}});var tj={};n.r(tj),n.d(tj,{frequency:function(){return gS},id:function(){return g_},name:function(){return gP},weight:function(){return gM}});var tA={};n.r(tA),n.d(tA,{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 tT={};n.r(tT),n.d(tT,{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 tC={};n.r(tC),n.d(tC,{AREA_CLASS_NAME:function(){return _s},Academy:function(){return wX},Bin:function(){return An},BinX:function(){return Ar},COMPONENT_CLASS_NAME:function(){return _a},Chart:function(){return Rg},ChartEvent:function(){return _Z},Classic:function(){return wH},ClassicDark:function(){return wq},Dark:function(){return wU},DiffY:function(){return Ap},DodgeX:function(){return Ao},ELEMENT_CLASS_NAME:function(){return _r},Filter:function(){return AB},FlexX:function(){return AI},Group:function(){return AS},GroupColor:function(){return Aj},GroupX:function(){return A_},GroupY:function(){return AP},Jitter:function(){return Al},JitterX:function(){return As},JitterY:function(){return Au},LABEL_CLASS_NAME:function(){return _l},LABEL_LAYER_CLASS_NAME:function(){return _n},Light:function(){return wG},LinearAxis:function(){return kW},MAIN_LAYER_CLASS_NAME:function(){return _e},MASK_CLASS_NAME:function(){return _u},MaybeDefaultX:function(){return x8},MaybeDefaultY:function(){return Ot},MaybeFunctionAttribute:function(){return Of},MaybeGradient:function(){return vj},MaybeIdentityX:function(){return xd},MaybeIdentityY:function(){return xh},MaybeKey:function(){return d1},MaybeSeries:function(){return vA},MaybeSize:function(){return bw},MaybeStackY:function(){return Rd},MaybeTitle:function(){return dQ},MaybeTooltip:function(){return dJ},MaybeTuple:function(){return b5},MaybeTupleX:function(){return xU},MaybeTupleY:function(){return xX},MaybeVisualPosition:function(){return b4},MaybeZeroPadding:function(){return b9},MaybeZeroX:function(){return ml},MaybeZeroY:function(){return bO},MaybeZeroY1:function(){return ma},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return Ay},PLOT_CLASS_NAME:function(){return _o},Pack:function(){return AR},Runtime:function(){return Rp},Sample:function(){return AF},Select:function(){return Ax},SelectX:function(){return Aw},SelectY:function(){return Ak},Selection:function(){return pz},SortColor:function(){return AL},SortX:function(){return AC},SortY:function(){return AN},StackEnter:function(){return Ah},StackY:function(){return j$},SymmetryY:function(){return Af},VIEW_CLASS_NAME:function(){return _i},corelib:function(){return Tf},extend:function(){return Th},geolib:function(){return iw},graphlib:function(){return g3},plotlib:function(){return hE},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return pB},stdlib:function(){return Tp}});var tN={}.toString,tL=function(t,e){return tN.call(t)==="[object "+e+"]"},tI=function(t){return Array.isArray?Array.isArray(t):tL(t,"Array")},tR=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},tD=function(t,e){if(t){if(tI(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(tR(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},tF=function(t){return tL(t,"Function")},tB=Array.prototype;tB.splice,tB.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var tz=function(t){return tL(t,"Number")},tW=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return tD(t,function(n,r){tF(t)&&"prototype"===r||e.push(n)}),e},t$=function(t){if("object"!=typeof t||null===t||!tL(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},tG=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&&t$(a)?(t$(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tI(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},tH=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tV=function(t,e){if(!tH(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 tU=function(t){return t};function tq(t){return null==t?0:tH(t)?t.length:Object.keys(t).length}var tY=function(t,e){return(tY=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 tX(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}tY(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var tK=function(){return(tK=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 tZ(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 tQ(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 tJ(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 t0(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 t1(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 t2(){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 t5(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 t3(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 t4(){this.map={}}!function(t,e){if(!tF(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 eJ||(eJ=document.createElement("canvas").getContext("2d")),eJ.font=[o,a,i,n+"px",r].join(" "),eJ.measureText(tL(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),t2([t],tW(e)).join("")}),t4.prototype.has=function(t){return void 0!==this.map[t]},t4.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t4.prototype.set=function(t,e){this.map[t]=e},t4.prototype.clear=function(){this.map={}},t4.prototype.delete=function(t){delete this.map[t]},t4.prototype.size=function(){return Object.keys(this.map).length};class t6{constructor(t){this.options=tG({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tG({},this.options,t),this.rescale(t)}rescale(t){}}function t8(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function t9(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function t7(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 et=n(254),ee=n.n(et);function en(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 er(t){let e=ee().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=en(a,o,e+1/3);return[255*l,255*en(a,o,e),255*en(a,o,e-1/3),i]}(r):null}let ei=(t,e)=>n=>t*(1-n)+e*n,eo=(t,e)=>{let n=er(t),r=er(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})`}},ea=(t,e)=>"number"==typeof t&&"number"==typeof e?ei(t,e):"string"==typeof t&&"string"==typeof e?eo(t,e):()=>t,el=(t,e)=>{let n=ei(t,e);return t=>Math.round(n(t))};function es(t){return null!=t&&!Number.isNaN(t)}let eu=Math.sqrt(50),ec=Math.sqrt(10),ef=Math.sqrt(2);function ep(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>=eu?10:o>=ec?5:o>=ef?2:1)*10**i:-(10**-i)/(o>=eu?10:o>=ec?5:o>=ef?2:1)}function eh(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>=eu?i*=10:o>=ec?i*=5:o>=ef&&(i*=2),e<t?-i:i}let ed=(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=ep(l,s,n))>0?r=ep(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=ep(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},ey=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=t8(o,a),i=n(l,s)):(r=t8(a,o),i=n(s,l)),t9(i,r)},eg=(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]=t8(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=t7(t,e,1,r)-1,a=i[n];return t9(o[n],a)(e)}},em=(t,e,n,r)=>(Math.min(t.length,e.length)>2?eg:ey)(t,e,r?el:n);class ev extends t6{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ei,tickCount:5}}map(t){return es(t)?this.output(t):this.options.unknown}invert(t){return es(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 ed}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]):tU}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=em(n.map(t),r,o,i);this.output=t9(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=em(i,r.map(t),ei);this.input=t9(e,n,o)}}let eb=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=ep(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 ex extends ev{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:ea,tickMethod:eb,tickCount:5}}chooseTransforms(){return[tU,tU]}clone(){return new ex(this.options)}}var eO=function(t){return null==t},ew=function(t){return eO(t)?"":t.toString()},eE=function(t){var e=ew(t);return e.charAt(0).toUpperCase()+e.substring(1)},ek=t=>t;function eM(t,e){t&&e_.hasOwnProperty(t.type)&&e_[t.type](t,e)}var eS={Feature:function(t,e){eM(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)eM(n[r].geometry,e)}},e_={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){eP(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eP(n[r],e,0)},Polygon:function(t,e){ej(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ej(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)eM(n[r],e)}};function eP(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 ej(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)eP(t[n],e,1);e.polygonEnd()}function eA(t,e){t&&eS.hasOwnProperty(t.type)?eS[t.type](t,e):eM(t,e)}class eT{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 eC=Math.PI,eN=eC/2,eL=eC/4,eI=2*eC,eR=180/eC,eD=eC/180,eF=Math.abs,eB=Math.atan,ez=Math.atan2,eW=Math.cos,e$=Math.ceil,eG=Math.exp,eH=Math.log,eV=Math.pow,eU=Math.sin,eq=Math.sign||function(t){return t>0?1:t<0?-1:0},eY=Math.sqrt,eX=Math.tan;function eK(t){return t>1?0:t<-1?eC:Math.acos(t)}function eZ(t){return t>1?eN:t<-1?-eN:Math.asin(t)}function eQ(){}var eJ,e0,e1,e2,e5,e3=new eT,e4=new eT,e6={point:eQ,lineStart:eQ,lineEnd:eQ,polygonStart:function(){e6.lineStart=e8,e6.lineEnd=nt},polygonEnd:function(){e6.lineStart=e6.lineEnd=e6.point=eQ,e3.add(eF(e4)),e4=new eT},result:function(){var t=e3/2;return e3=new eT,t}};function e8(){e6.point=e9}function e9(t,e){e6.point=e7,e0=e2=t,e1=e5=e}function e7(t,e){e4.add(e5*t-e2*e),e2=t,e5=e}function nt(){e7(e0,e1)}var ne,nn,nr,ni,no=1/0,na=1/0,nl=-1/0,ns=nl,nu={point:function(t,e){t<no&&(no=t),t>nl&&(nl=t),e<na&&(na=e),e>ns&&(ns=e)},lineStart:eQ,lineEnd:eQ,polygonStart:eQ,polygonEnd:eQ,result:function(){var t=[[no,na],[nl,ns]];return nl=ns=-(na=no=1/0),t}},nc=0,nf=0,np=0,nh=0,nd=0,ny=0,ng=0,nm=0,nv=0,nb={point:nx,lineStart:nO,lineEnd:nk,polygonStart:function(){nb.lineStart=nM,nb.lineEnd=nS},polygonEnd:function(){nb.point=nx,nb.lineStart=nO,nb.lineEnd=nk},result:function(){var t=nv?[ng/nv,nm/nv]:ny?[nh/ny,nd/ny]:np?[nc/np,nf/np]:[NaN,NaN];return nc=nf=np=nh=nd=ny=ng=nm=nv=0,t}};function nx(t,e){nc+=t,nf+=e,++np}function nO(){nb.point=nw}function nw(t,e){nb.point=nE,nx(nr=t,ni=e)}function nE(t,e){var n=t-nr,r=e-ni,i=eY(n*n+r*r);nh+=i*(nr+t)/2,nd+=i*(ni+e)/2,ny+=i,nx(nr=t,ni=e)}function nk(){nb.point=nx}function nM(){nb.point=n_}function nS(){nP(ne,nn)}function n_(t,e){nb.point=nP,nx(ne=nr=t,nn=ni=e)}function nP(t,e){var n=t-nr,r=e-ni,i=eY(n*n+r*r);nh+=i*(nr+t)/2,nd+=i*(ni+e)/2,ny+=i,ng+=(i=ni*t-nr*e)*(nr+t),nm+=i*(ni+e),nv+=3*i,nx(nr=t,ni=e)}function nj(t){this._context=t}nj.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,eI)}},result:eQ};var nA,nT,nC,nN,nL,nI=new eT,nR={point:eQ,lineStart:function(){nR.point=nD},lineEnd:function(){nA&&nF(nT,nC),nR.point=eQ},polygonStart:function(){nA=!0},polygonEnd:function(){nA=null},result:function(){var t=+nI;return nI=new eT,t}};function nD(t,e){nR.point=nF,nT=nN=t,nC=nL=e}function nF(t,e){nN-=t,nL-=e,nI.add(eY(nN*nN+nL*nL)),nN=t,nL=e}class nB{constructor(t){this._append=null==t?nz:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return nz;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 nz(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function nW(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),eA(t,i(o))),o.result()}return a.area=function(t){return eA(t,i(e6)),e6.result()},a.measure=function(t){return eA(t,i(nR)),nR.result()},a.bounds=function(t){return eA(t,i(nu)),nu.result()},a.centroid=function(t){return eA(t,i(nb)),nb.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,ek):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new nB(n)):new nj(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 nB(n)),a},a.projection(t).digits(n).context(e)}function n$(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 nG(t,e,n){var r=n$(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function nH(t,e,n){var r=n$(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var nV={}.toString,nU=function(t,e){return nV.call(t)==="[object "+e+"]"},nq=function(t){return Array.isArray?Array.isArray(t):nU(t,"Array")},nY=function(t){return"object"==typeof t&&null!==t},nX=function(t){if(!nY(t)||!nU(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},nK=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&&nX(a)?(nX(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):nq(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},nZ=function(t){var e=ew(t);return e.charAt(0).toLowerCase()+e.substring(1)};function nQ(t){return t}function nJ(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),nQ)}function n0(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function n1(t=""){throw Error(t)}function n2(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 n5(t){return null!=t&&!Number.isNaN(t)}function n3(t,e){return n4(t,e)||{}}function n4(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[nZ(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function n6(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function n8(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 n9(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function n7(t){return null===t||!1===t}function rt(t,e,n={},r=!1){return n7(t)||Array.isArray(t)&&r?t:nK(n,n3(t,e))}function re(t,e={}){return n7(t)||Array.isArray(t)||!rn(t)?t:nK(e,t)}function rn(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function rr(t,e){return"object"==typeof t?n3(t,e):t}function ri(t){return function(e,n){var r=eW(e),i=eW(n),o=t(r*i);return o===1/0?[2,0]:[o*i*eU(e),o*eU(n)]}}function ro(t){return function(e,n){var r=eY(e*e+n*n),i=t(r),o=eU(i);return[ez(e*o,r*eW(i)),eZ(r&&n*o/r)]}}function ra(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:eQ,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function rl(t,e){return 1e-6>eF(t[0]-e[0])&&1e-6>eF(t[1]-e[1])}function rs(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 ru(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(rl(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 rs(r,t,null,!0)),s.push(n.o=new rs(r,null,n,!1)),l.push(n=new rs(a,t,null,!1)),s.push(n.o=new rs(a,null,n,!0))}}),l.length){for(s.sort(e),rc(l),rc(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 rc(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 rf(t){return[ez(t[1],t[0]),eZ(t[2])]}function rp(t){var e=t[0],n=t[1],r=eW(n);return[r*eW(e),r*eU(e),eU(n)]}function rh(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function rd(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 ry(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rg(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function rm(t){var e=eY(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function rv(t){return eF(t[0])<=eC?t[0]:eq(t[0])*((eF(t[0])+eC)%eI-eC)}function rb(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function rx(t,e,n,r){return function(i){var o,a,l,s=e(i),u=ra(),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=rb(a);var t=function(t,e){var n=rv(e),r=e[1],i=eU(r),o=[eU(n),-eW(n),0],a=0,l=0,s=new eT;1===i?r=eN+1e-6:-1===i&&(r=-eN-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=rv(h),y=h[1]/2+eL,g=eU(y),v=eW(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=rv(x),w=x[1]/2+eL,E=eU(w),k=eW(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>eC,j=g*E;if(s.add(ez(j*S*eU(_),v*k+j*eW(_))),a+=P?M+S*eI:M,P^d>=n^O>=n){var A=rd(rp(h),rp(x));rm(A);var T=rd(o,A);rm(T);var C=(P^M>=0?-1:1)*eZ(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),ru(a,rw,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(rO))}}return p}}function rO(t){return t.length>1}function rw(t,e){return((t=t.x)[0]<0?t[1]-eN-1e-6:eN-t[1])-((e=e.x)[0]<0?e[1]-eN-1e-6:eN-e[1])}var rE=rx(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?eC:-eC,y=eF(o-n);1e-6>eF(y-eC)?(t.point(n,r=(r+a)/2>0?eN:-eN),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=eC&&(1e-6>eF(n-i)&&(n-=1e-6*i),1e-6>eF(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=eF(h=eU(l-u))>1e-6?eB((eU(s)*(p=eW(c))*eU(u)-eU(c)*(f=eW(s))*eU(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*eN,r.point(-eC,i),r.point(0,i),r.point(eC,i),r.point(eC,0),r.point(eC,-i),r.point(0,-i),r.point(-eC,-i),r.point(-eC,0),r.point(-eC,i);else if(eF(t[0]-e[0])>1e-6){var o=t[0]<e[0]?eC:-eC;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-eC,-eN]);function rk(t,e){e=rp(e),e[0]-=t,rm(e);var n=eK(-e[1]);return((0>-e[2]?-n:n)+eI-1e-6)%eI}function rM(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>eF(r[0]-t)?i>0?0:3:1e-6>eF(r[0]-n)?i>0?2:1:1e-6>eF(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=ra(),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=rb(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ru(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 rS(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 r_(t,e){return eF(t)>eC&&(t-=Math.round(t/eI)*eI),[t,e]}function rP(t,e,n){return(t%=eI)?e||n?rS(rA(t),rT(e,n)):rA(t):e||n?rT(e,n):r_}function rj(t){return function(e,n){return eF(e+=t)>eC&&(e-=Math.round(e/eI)*eI),[e,n]}}function rA(t){var e=rj(t);return e.invert=rj(-t),e}function rT(t,e){var n=eW(t),r=eU(t),i=eW(e),o=eU(e);function a(t,e){var a=eW(e),l=eW(t)*a,s=eU(t)*a,u=eU(e),c=u*n+l*r;return[ez(s*i-c*o,l*n-u*r),eZ(c*i+s*o)]}return a.invert=function(t,e){var a=eW(e),l=eW(t)*a,s=eU(t)*a,u=eU(e),c=u*i-s*o;return[ez(s*i+u*o,l*n+c*r),eZ(c*n-l*r)]},a}function rC(t){return function(e){var n=new rN;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rN(){}function rL(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),eA(n,t.stream(nu)),e(nu.result()),null!=r&&t.clipExtent(r),t}function rI(t,e,n){return rL(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 rR(t,e,n){return rI(t,[[0,0],e],n)}function rD(t,e,n){return rL(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 rF(t,e,n){return rL(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)}r_.invert=r_,rN.prototype={constructor:rN,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 rB=eW(30*eD);function rz(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=eY(O*O+w*w+E*E),M=eZ(E/=k),S=1e-6>eF(eF(E)-1)||1e-6>eF(o-f)?(o+f)/2:ez(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||eF((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<rB)&&(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=rp([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,rC({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var rW=rC({point:function(t,e){this.stream.point(t*eD,e*eD)}});function r$(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=eW(o),s=eU(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 rG(t){return rH(function(){return t})()}function rH(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=rE,M=null,S=ek,_=.5;function P(t){return s(t[0]*eD,t[1]*eD)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*eR,t[1]*eR]}function A(){var t=r$(f,0,0,O,w,x).apply(null,e(d,y)),r=r$(f,p-t[0],h-t[1],O,w,x);return n=rP(g,v,b),l=rS(e,r),s=rS(n,l),a=rz(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=rW((e=n,rC({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=eW(t),n=2*eD,r=e>0,i=eF(e)>1e-6;function o(t,n){return eW(t)*eW(n)>e}function a(t,n,r){var i=rp(t),o=rp(n),a=[1,0,0],l=rd(i,o),s=rh(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=rd(a,l),p=rg(a,e*s/c);ry(p,rg(l,-e*u/c));var h=rh(p,f),d=rh(f,f),y=h*h-d*(rh(p,p)-1);if(!(y<0)){var g=eY(y),v=rg(f,(-h-g)/d);if(ry(v,p),v=rf(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>eF(k-eC);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>eF(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>eC^(x<=v[0]&&v[0]<=O)){var S=rg(f,(-h+g)/d);return ry(S,p),[v,rf(S)]}}}function l(e,n){var i=r?t:eC-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return rx(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?eC:-eC),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||rl(e,d)||rl(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&&rl(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=eW(e),l=eU(e),s=r*n;null==i?(i=e+r*eI,o=e-s/2):(i=rk(a,i),o=rk(a,o),(r>0?i<o:i>o)&&(i+=r*eI));for(var u,c=i;r>0?c>o:c<o;c-=s)u=rf([a,-l*eW(c),-l*eU(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-eC,t-eC])}(E=t*eD):(E=null,rE),T()):E*eR},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,ek):rM(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*eD,y=t[1]%360*eD,A()):[d*eR,y*eR]},P.rotate=function(t){return arguments.length?(g=t[0]%360*eD,v=t[1]%360*eD,b=t.length>2?t[2]%360*eD:0,A()):[g*eR,v*eR,b*eR]},P.angle=function(t){return arguments.length?(x=t%360*eD,A()):x*eR},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=rz(l,_=t*t),T()):eY(_)},P.fitExtent=function(t,e){return rI(P,t,e)},P.fitSize=function(t,e){return rR(P,t,e)},P.fitWidth=function(t,e){return rD(P,t,e)},P.fitHeight=function(t,e){return rF(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}var rV=ri(function(t){return eY(2/(1+t))});function rU(){return rG(rV).scale(124.75).clipAngle(179.999)}function rq(t,e){return[t,eH(eX((eN+e)/2))]}function rY(){return rX(rq).scale(961/eI)}function rX(t){var e,n,r,i=rG(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=eC*a(),l=i((function(t){function e(e){return e=t(e[0]*eD,e[1]*eD),e[0]*=eR,e[1]*=eR,e}return t=rP(t[0]*eD,t[1]*eD,t.length>2?t[2]*eD:0),e.invert=function(e){return e=t.invert(e[0]*eD,e[1]*eD),e[0]*=eR,e[1]*=eR,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===rq?[[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 rK(t,e){return[eH(eX((eN+e)/2)),-t]}function rZ(){var t=rX(rK),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)}rV.invert=ro(function(t){return 2*eZ(t/2)}),rq.invert=function(t,e){return[t,2*eB(eG(e))-eN]},rK.invert=function(t,e){return[-e,2*eB(eG(t))-eN]};var rQ=eY(3)/2;function rJ(t,e){var n=eZ(rQ*eU(e)),r=n*n,i=r*r*r;return[t*eW(n)/(rQ*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function r0(){return rG(rJ).scale(177.158)}rJ.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>eF(n)));++l);return[rQ*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/eW(i),eZ(eU(i)/rQ)]};var r1=ri(function(t){return(t=eK(t))&&t/eU(t)});function r2(){return rG(r1).scale(79.4188).clipAngle(179.999)}function r5(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 r3(){return rG(r5).scale(175.295)}function r4(t,e){var n=eW(e),r=eW(t)*n;return[n*eU(t)/r,eU(e)/r]}function r6(){return rG(r4).scale(144.049).clipAngle(60)}function r8(t){var e=0,n=eC/3,r=rH(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*eD,n=t[1]*eD):[e*eR,n*eR]},i}function r9(t,e){var n=eU(t),r=(n+eU(e))/2;if(1e-6>eF(r)){var i=eW(t);function o(t,e){return[t*i,eU(e)/i]}return o.invert=function(t,e){return[t/i,eZ(e*i)]},o}var a=1+n*(2*r-n),l=eY(a)/r;function s(t,e){var n=eY(a-2*r*eU(e))/r;return[n*eU(t*=r),l-n*eW(t)]}return s.invert=function(t,e){var n=l-e,i=ez(t,eF(n))*eq(n);return n*r<0&&(i-=eC*eq(t)*eq(n)),[i/r,eZ((a-(t*t+n*n)*r*r)/(2*r))]},s}function r7(){return r8(r9).scale(155.424).center([0,33.6442])}function it(){return r7().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ie(){var t,e,n,r,i,o,a=it(),l=r7().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=r7().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 rI(c,t,e)},c.fitSize=function(t,e){return rR(c,t,e)},c.fitWidth=function(t,e){return rD(c,t,e)},c.fitHeight=function(t,e){return rF(c,t,e)},c.scale(1070)}function ir(t,e){var n=eW(e),r=1+eW(t)*n;return[n*eU(t)/r,eU(e)/r]}function ii(){return rG(ir).scale(250).clipAngle(142)}function io(t,e){return[t,e]}function ia(){return rG(io).scale(152.63)}function il(t,e){var n=eW(t),r=t===e?eU(t):(n-eW(e))/(e-t),i=n/r+t;if(1e-6>eF(r))return io;function o(t,e){var n=i-e,o=r*t;return[n*eU(o),i-n*eW(o)]}return o.invert=function(t,e){var n=i-e,o=ez(t,eF(n))*eq(n);return n*r<0&&(o-=eC*eq(t)*eq(n)),[o/r,i-eq(r)*eY(t*t+n*n)]},o}function is(){return r8(il).scale(131.154).center([0,13.9389])}function iu(t){return eX((eN+t)/2)}function ic(t,e){var n=eW(t),r=t===e?eU(t):eH(n/eW(e))/eH(iu(e)/iu(t)),i=n*eV(iu(t),r)/r;if(!r)return rq;function o(t,e){i>0?e<-eN+1e-6&&(e=-eN+1e-6):e>eN-1e-6&&(e=eN-1e-6);var n=i/eV(iu(e),r);return[n*eU(r*t),i-n*eW(r*t)]}return o.invert=function(t,e){var n=i-e,o=eq(r)*eY(t*t+n*n),a=ez(t,eF(n))*eq(n);return n*r<0&&(a-=eC*eq(t)*eq(n)),[a/r,2*eB(eV(i/o,1/r))-eN]},o}function ip(){return r8(ic).scale(109.5).parallels([30,30])}function ih(t,e){return[eW(e)*eU(t),eU(e)]}function id(){return rG(ih).scale(249.5).clipAngle(90.000001)}function iy(){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=rC({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=ek;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,ek):rM(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=eU(p=n%360*eD),t=eW(p),b()):p*eR},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 rI(x,t,e)},x.fitSize=function(t,e){return rR(x,t,e)},x.fitWidth=function(t,e){return rD(x,t,e)},x.fitHeight=function(t,e){return rF(x,t,e)},x}r1.invert=ro(function(t){return t}),r5.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(eF(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},r4.invert=ro(eB),ir.invert=ro(function(t){return 2*eB(t)}),io.invert=io,ih.invert=ro(eZ);var ig=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 im(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 n$(e$(r/d)*d,n,d).map(c).concat(n$(e$(l/y)*y,a,y).map(f)).concat(n$(e$(e/p)*p,t,p).filter(function(t){return eF(t%d)>1e-6}).map(s)).concat(n$(e$(o/h)*h,i,h).filter(function(t){return eF(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=nG(o,i,90),u=nH(e,t,g),c=nG(l,a,90),f=nH(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 iv(t){return"geoPath"===t.type}let ib=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=ig(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=t_[`geo${eE(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(im);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(iv);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]]=nW(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=nW(s);let g=new ex({domain:[t,t+r]}),v=new ex({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=>iv(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:re(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};ib.props={};var ix=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 iO=()=>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"},ix(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 iw(){return{"composition.geoView":ib,"composition.geoPath":iO}}function iE(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 ik(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 iM(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function iS(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function i_(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iP(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=iA(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>iA(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(ij(n))}function ij(t=i_){if(t===i_)return iA;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 iA(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function iT(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?iA:ij(i);r>n;){if(r-n>600){let o=r-n+1,a=e-n+1,l=Math.log(o),s=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*s*(o-s)/o)*(a-o/2<0?-1:1),c=Math.max(n,Math.floor(e-a*s/o+u)),f=Math.min(r,Math.floor(e+(o-a)*s/o+u));iT(t,e,c,f,i)}let o=t[e],a=n,l=r;for(iC(t,n,e),i(t[r],o)>0&&iC(t,n,r);a<l;){for(iC(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?iC(t,n,l):iC(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function iC(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function iN(t){return null===t?NaN:+t}function iL(t,e,n){if(!(!(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r*=1)>=r&&(yield r)}}(t,n))).length)||isNaN(e*=1))){if(e<=0||r<2)return iE(t);if(e>=1)return ik(t);var r,i=(r-1)*e,o=Math.floor(i),a=ik(iT(t,o).subarray(0,o+1));return a+(iE(t.subarray(o+1))-a)*(i-o)}}iO.props={};class iI extends Map{constructor(t,e=iD){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(iR(this,t))}has(t){return super.has(iR(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 iR({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function iD(t){return null!==t&&"object"==typeof t?t.valueOf():t}function iF(t){return t}function iB(t,...e){return iG(t,iF,iF,e)}function iz(t,...e){return iG(t,Array.from,iF,e)}function iW(t,e,...n){return iG(t,iF,e,n)}function i$(t,e,...n){return iG(t,Array.from,e,n)}function iG(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new iI,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)}var iH=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 iV(t,e){return iE(t,t=>e[t])}function iU(t,e){return ik(t,t=>e[t])}function iq(t,e){let n=2.5*iY(t,e)-1.5*iK(t,e);return iE(t,t=>e[t]>=n?e[t]:NaN)}function iY(t,e){return iL(t,.25,t=>e[t])}function iX(t,e){return iL(t,.5,t=>e[t])}function iK(t,e){return iL(t,.75,t=>e[t])}function iZ(t,e){let n=2.5*iK(t,e)-1.5*iY(t,e);return ik(t,t=>e[t]<=n?e[t]:NaN)}function iQ(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(iB(t,t=>a[+t]).values()).flatMap(t=>{let e=iq(t,o),n=iZ(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let iJ=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=iH(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=iH(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:iY,y2:iX,y3:iK},h=rt(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),d=rt(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iV},p),{y4:iU})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=n3(u,"box"),g=n3(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iq},p),{y4:iZ})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:rr(a,"box")},l),{type:"point",data:e,transform:[{type:iQ}],encode:n,style:Object.assign({},g),tooltip:d,animate:rr(a,"point")}]};iJ.props={};var i0=function(t){return nU(t,"Number")},i1=n(420),i2="undefined"!=typeof Float32Array?Float32Array:Array;function i5(){var t=new i2(3);return i2!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i3(t){var e=new i2(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function i4(t){return Math.hypot(t[0],t[1],t[2])}function i6(t,e,n){var r=new i2(3);return r[0]=t,r[1]=e,r[2]=n,r}function i8(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i9(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function i7(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function ot(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function oe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function on(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 or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function oi(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 oo(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 oa(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 ol=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function os(){var t=new i2(16);return i2!=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 ou(t){var e=new i2(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 oc(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 of(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new i2(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 op(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 oh(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 od(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 oy(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 og(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 om(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 ov(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 ob(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 ox(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 oO(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 ow(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 oE(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 ok(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 oM(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 oS(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 o_(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 oP(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 oj(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 oA(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 oT(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 oC(t,e){var n=new i2(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),oT(t,e,n),t}function oN(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function oL(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 oI(t,e){var n=new i2(3);oL(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 oR(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 oD(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 oF(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 oB(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 oz(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}i5();var oW=oz;function o$(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 oG(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 oH(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 oV=oH;function oU(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 oq(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)?oh(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 oY(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 oX(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 oK(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 oZ(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 oQ(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 oJ(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 o0(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 o1(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 o2(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 o5=ov,o3=oQ;function o4(){var t=new i2(9);return i2!=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 o6(){var t=new i2(4);return i2!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function o8(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 o9(){var t=new i2(4);return i2!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function o7(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 at(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 ae(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 an(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}o6();var ar=function(t,e,n,r){var i=new i2(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ai=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ao=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};i5(),i6(1,0,0),i6(0,1,0),o9(),o9(),o4(),hF=new i2(2),i2!=Float32Array&&(hF[0]=0,hF[1]=0);var aa={}.toString,al=function(t,e){return aa.call(t)==="[object "+e+"]"},as=function(t){return al(t,"Number")};function au(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ac=function(t){return null==t},af=function(t){return al(t,"String")},ap=function(t,e,n){return t<e?e:t>n?n:t},ah={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ad(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return ah[e]===t.length-1&&"achlmqstvz".includes(e)})}function ay(t){return ad(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function ag(t){return ay(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var am={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function av(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ah[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,ah[n]))),ah[n]););}function ab(t){return t>=48&&t<=57}function ax(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 aO=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 aw(t){if(ag(t))return[].concat(t);for(var e=function(t){if(ay(t))return[].concat(t);var e=function(t){if(ad(t))return[].concat(t);var e=new aO(t);for(ax(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=ah[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,ax(t),t.data=[],!o)return av(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)),!ab(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&&ab(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&ab(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;ab(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&&ab(r.charCodeAt(o)))for(;o<n&&ab(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),ax(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,ax(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}av(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=tK({},am),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 aE(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function ak(t,e,n,r,i){var o=au([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=aE([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 aM(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 aS(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+=au(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 a_(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=aw(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=ak(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 ak(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=aM({x:1,y:0},_),j=aM(_,{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+=au(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=aS(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+=au(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=ak((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 aP=function(t){return Array.isArray?Array.isArray(t):al(t,"Array")},aj=function(t){if(aP(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},aA=function(t){if(aP(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},aT=function(t,e){return(t%e+e)%e};function aC(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var aN=function(t,e,n,r){return t5(t5([],aE([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function aL(t,e){if(void 0===e&&(e=!1),ag(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=aw(t),a=tK({},am),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=aC(g,v,-k)).x,v=f.y,O=(f=aC(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?aC(M[U-1],M[U],k).y:aC(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(aN(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(aN(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 aI(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?aS(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=aE(i,o,r),u=aE(o,a,r),c=aE(a,l,r),f=aE(s,u,r),p=aE(u,c,r),h=aE(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function aR(t){var e,n,r;return e=0,n=0,r=0,aL(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 aD=function(t){return al(t,"Boolean")},aF=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},aB=function(t){return void 0===t};function az(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function aW(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function a$(){}var aG="\\s*([+-]?\\d+)\\s*",aH="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",aV="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aU=/^#([0-9a-f]{3,8})$/,aq=RegExp("^rgb\\("+[aG,aG,aG]+"\\)$"),aY=RegExp("^rgb\\("+[aV,aV,aV]+"\\)$"),aX=RegExp("^rgba\\("+[aG,aG,aG,aH]+"\\)$"),aK=RegExp("^rgba\\("+[aV,aV,aV,aH]+"\\)$"),aZ=RegExp("^hsl\\("+[aH,aV,aV]+"\\)$"),aQ=RegExp("^hsla\\("+[aH,aV,aV,aH]+"\\)$"),aJ={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 a0(){return this.rgb().formatHex()}function a1(){return this.rgb().formatRgb()}function a2(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=aU.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?a5(e):3===n?new a4(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?a3(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?a3(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=aq.exec(t))?new a4(e[1],e[2],e[3],1):(e=aY.exec(t))?new a4(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=aX.exec(t))?a3(e[1],e[2],e[3],e[4]):(e=aK.exec(t))?a3(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=aZ.exec(t))?a7(e[1],e[2]/100,e[3]/100,1):(e=aQ.exec(t))?a7(e[1],e[2]/100,e[3]/100,e[4]):aJ.hasOwnProperty(t)?a5(aJ[t]):"transparent"===t?new a4(NaN,NaN,NaN,0):null}function a5(t){return new a4(t>>16&255,t>>8&255,255&t,1)}function a3(t,e,n,r){return r<=0&&(t=e=n=NaN),new a4(t,e,n,r)}function a4(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function a6(){return"#"+a9(this.r)+a9(this.g)+a9(this.b)}function a8(){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 a9(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function a7(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new le(t,e,n,r)}function lt(t){if(t instanceof le)return new le(t.h,t.s,t.l,t.opacity);if(t instanceof a$||(t=a2(t)),!t)return new le;if(t instanceof le)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 le(a,l,s,t.opacity)}function le(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ln(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 lr(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function li(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function lo(t,e){var n=Math.min.apply(Math,t5([],t1(t),!1)),r=Math.min.apply(Math,t5([],t1(e),!1));return{x:n,y:r,width:Math.max.apply(Math,t5([],t1(t),!1))-n,height:Math.max.apply(Math,t5([],t1(e),!1))-r}}function la(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,t5([],t1(t.concat([h])),!1)),i.apply(void 0,t5([],t1(e.concat([h])),!1))],y=li(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,t5([],t1(t.concat([v])),!1)),i.apply(void 0,t5([],t1(e.concat([v])),!1))],y=li(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,t5([],t1(t.concat([b])),!1)),i.apply(void 0,t5([],t1(e.concat([b])),!1))],O=li(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,t5([],t1(t.concat([a])),!1)),y:i.apply(void 0,t5([],t1(e.concat([a])),!1))}}az(a$,a2,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:a0,formatHex:a0,formatHsl:function(){return lt(this).formatHsl()},formatRgb:a1,toString:a1}),az(a4,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof a$||(i=a2(i)),i)?new a4((i=i.rgb()).r,i.g,i.b,i.opacity):new a4:new a4(t,e,n,null==r?1:r)},aW(a$,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new a4(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new a4(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:a6,formatHex:a6,formatRgb:a8,toString:a8})),az(le,function(t,e,n,r){return 1==arguments.length?lt(t):new le(t,e,n,null==r?1:r)},aW(a$,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new le(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new le(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 a4(ln(t>=240?t-240:t+120,i,r),ln(t,i,r),ln(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 ll(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function ls(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 lu(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(lr(l,0))!lr(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;lr(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 lc(t,e,n,r,i,o,a,l,s,u,c){var f=la([t,n,i,a],[e,r,o,l],s,u,ls,c);return li(f.x,f.y,s,u)}function lf(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function lp(t,e,n){var r=t+n-2*e;if(lr(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 lh={exports:{}};lh.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 ld=lh.exports;(hB=dt||(dt={})).GROUP="g",hB.CIRCLE="circle",hB.ELLIPSE="ellipse",hB.IMAGE="image",hB.RECT="rect",hB.LINE="line",hB.POLYLINE="polyline",hB.POLYGON="polygon",hB.TEXT="text",hB.PATH="path",hB.HTML="html",hB.MESH="mesh",(hz=de||(de={}))[hz.ZERO=0]="ZERO",hz[hz.NEGATIVE_ONE=1]="NEGATIVE_ONE";var ly=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}(),lg=function(){function t(t){this.clipSpaceNearZ=de.NEGATIVE_ONE,this.plugins=[],this.config=tK({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 lm(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function lv(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function lb(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function lx(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function lO(t){return void 0===t?0:t>360||t<-360?t%360:t}function lw(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?i3(t):as(t)?i6(t,e,n):i6(t[0],t[1]||e,t[2]||n)}function lE(t){return Math.PI/180*t}function lk(t){return 180/Math.PI*t}function lM(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=t1(oL(i5(),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 lS(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=lk(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var l_=os(),lP=os(),lj=o6(),lA=[i5(),i5(),i5()],lT=i5();function lC(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 lN=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){lm(this.center,t),lm(this.halfExtents,e),lv(this.min,this.center,this.halfExtents),lb(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){lb(this.center,e,t),lx(this.center,this.center,.5),lv(this.halfExtents,e,t),lx(this.halfExtents,this.halfExtents,.5),lm(this.min,t),lm(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],lv(this.min,n,r),lb(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 lm([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 lm([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}(),lL=function(){function t(t,e){this.distance=t||0,this.normal=e||i6(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 or(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/i4(this.normal);oe(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&&oi(n,t,e,i),o},t}();(hW=dn||(dn={}))[hW.OUTSIDE=0xffffffff]="OUTSIDE",hW[hW.INSIDE=0]="INSIDE",hW[hW.INDETERMINATE=0x7fffffff]="INDETERMINATE";var lI=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new lL)}return t.prototype.extractFromVPMatrix=function(t){var e=t1(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];i9(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,i9(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,i9(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,i9(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,i9(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,i9(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}(),lR=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}(),lD=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}(),lF="Method not implemented.",lB="Use document.documentElement instead.";(h$=dr||(dr={}))[h$.ORBITING=0]="ORBITING",h$[h$.EXPLORING=1]="EXPLORING",h$[h$.TRACKING=2]="TRACKING",(hG=di||(di={}))[hG.DEFAULT=0]="DEFAULT",hG[hG.ROTATIONAL=1]="ROTATIONAL",hG[hG.TRANSLATIONAL=2]="TRANSLATIONAL",hG[hG.CINEMATIC=3]="CINEMATIC",(hH=da||(da={}))[hH.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",hH[hH.PERSPECTIVE=1]="PERSPECTIVE";var lz={UPDATED:"updated"},lW=function(){function t(){this.clipSpaceNearZ=de.NEGATIVE_ONE,this.eventEmitter=new i1,this.matrix=os(),this.right=i6(1,0,0),this.up=i6(0,1,0),this.forward=i6(0,0,1),this.position=i6(0,0,1),this.focalPoint=i6(0,0,0),this.distanceVector=i6(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=os(),this.projectionMatrixInverse=os(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=dr.EXPLORING,this.trackingMode=di.DEFAULT,this.projectionMode=da.PERSPECTIVE,this.frustum=new lI,this.orthoMatrix=os()}return t.prototype.isOrtho=function(){return this.projectionMode===da.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===dr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===dr.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!==dr.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 oy(os(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=oM(os(),[t,e,0]);this.jitteredProjectionMatrix=ov(os(),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===da.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===da.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===da.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===da.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===da.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===da.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=i6(a.x-r,a.y-i,0),s=or(l,this.right)/i4(this.right),u=or(l,this.up)/i4(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=da.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(lE(.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===de.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,ox(this.projectionMatrix,this.projectionMatrix,i6(1,-1,1)),oy(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=da.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===de.NEGATIVE_ONE?oV(this.projectionMatrix,f,p,d,h,i,o):oU(this.projectionMatrix,f,p,d,h,i,o),ox(this.projectionMatrix,this.projectionMatrix,i6(1,-1,1)),oy(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=lw(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=i6(0,1,0);if(this.focalPoint=lw(t,e,n),this.trackingMode===di.CINEMATIC){var i=ot(i5(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=lk(Math.asin(e/i4(i))),a=90+lk(Math.atan2(n,t)),l=os();oE(l,l,lE(a)),ow(l,l,lE(o)),r=oo(i5(),[0,1,0],l)}return oy(this.matrix,oq(os(),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=i5();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=lO(t),this.computeMatrix(),this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=lO(t),this.computeMatrix(),this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=lO(t),this.computeMatrix(),this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.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=o7(o9(),[0,0,1],lE(this.roll));oh(this.matrix);var e=o7(o9(),[1,0,0],lE((this.rotateWorld&&this.type!==dr.TRACKING||this.type===dr.TRACKING?1:-1)*this.elevation)),n=o7(o9(),[0,1,0],lE((this.rotateWorld&&this.type!==dr.TRACKING||this.type===dr.TRACKING?1:-1)*this.azimuth)),r=at(o9(),n,e);r=at(o9(),r,t);var i=oF(os(),r);this.type===dr.ORBITING||this.type===dr.EXPLORING?(ob(this.matrix,this.matrix,this.focalPoint),ov(this.matrix,this.matrix,i),ob(this.matrix,this.matrix,[0,0,this.distance])):this.type===dr.TRACKING&&(ob(this.matrix,this.matrix,this.position),ov(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=lw(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(){i8(this.right,lw(o8(o6(),[1,0,0,0],this.matrix))),i8(this.up,lw(o8(o6(),[0,1,0,0],this.matrix))),i8(this.forward,lw(o8(o6(),[0,0,1,0],this.matrix))),on(this.right,this.right),on(this.up,this.up),on(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=i4(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===dr.TRACKING||this.rotateWorld?(this.elevation=lk(Math.asin(e/r)),this.azimuth=lk(Math.atan2(-t,-n))):(this.elevation=-lk(Math.asin(e/r)),this.azimuth=-lk(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){i8(this.position,lw(o8(o6(),[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=o4(),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],i7(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=ot(i5(),this.focalPoint,this.position),this.distance=i4(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===da.ORTHOGRAPHIC){var t=this.position,e=o7(o9(),[0,0,1],-this.roll*Math.PI/180);oD(this.orthoMatrix,e,i6((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),i6(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=ov(os(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(lz.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(lF)},t.prototype.pan=function(t,e){throw Error(lF)},t.prototype.dolly=function(t){throw Error(lF)},t.prototype.createLandmark=function(t,e){throw Error(lF)},t.prototype.gotoLandmark=function(t,e){throw Error(lF)},t.prototype.cancelLandmarkAnimation=function(){throw Error(lF)},t}();function l$(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(l$.Cache||Map),n}l$.Cache=Map,(hV=dl||(dl={}))[hV.kUnknown=0]="kUnknown",hV[hV.kNumber=1]="kNumber",hV[hV.kPercentage=2]="kPercentage",hV[hV.kEms=3]="kEms",hV[hV.kPixels=4]="kPixels",hV[hV.kRems=5]="kRems",hV[hV.kDegrees=6]="kDegrees",hV[hV.kRadians=7]="kRadians",hV[hV.kGradians=8]="kGradians",hV[hV.kTurns=9]="kTurns",hV[hV.kMilliseconds=10]="kMilliseconds",hV[hV.kSeconds=11]="kSeconds",hV[hV.kInteger=12]="kInteger",(hU=ds||(ds={}))[hU.kUNumber=0]="kUNumber",hU[hU.kUPercent=1]="kUPercent",hU[hU.kULength=2]="kULength",hU[hU.kUAngle=3]="kUAngle",hU[hU.kUTime=4]="kUTime",hU[hU.kUOther=5]="kUOther",(hq=du||(du={}))[hq.kAll=0]="kAll",hq[hq.kNonNegative=1]="kNonNegative",hq[hq.kInteger=2]="kInteger",hq[hq.kNonNegativeInteger=3]="kNonNegativeInteger",hq[hq.kPositiveInteger=4]="kPositiveInteger",(hY=dc||(dc={}))[hY.kYes=0]="kYes",hY[hY.kNo=1]="kNo",(hX=df||(df={}))[hX.kYes=0]="kYes",hX[hX.kNo=1]="kNo";var lG=[{name:"em",unit_type:dl.kEms},{name:"px",unit_type:dl.kPixels},{name:"deg",unit_type:dl.kDegrees},{name:"rad",unit_type:dl.kRadians},{name:"grad",unit_type:dl.kGradians},{name:"ms",unit_type:dl.kMilliseconds},{name:"s",unit_type:dl.kSeconds},{name:"rem",unit_type:dl.kRems},{name:"turn",unit_type:dl.kTurns}];(hK=dp||(dp={}))[hK.kUnknownType=0]="kUnknownType",hK[hK.kUnparsedType=1]="kUnparsedType",hK[hK.kKeywordType=2]="kKeywordType",hK[hK.kUnitType=3]="kUnitType",hK[hK.kSumType=4]="kSumType",hK[hK.kProductType=5]="kProductType",hK[hK.kNegateType=6]="kNegateType",hK[hK.kInvertType=7]="kInvertType",hK[hK.kMinType=8]="kMinType",hK[hK.kMaxType=9]="kMaxType",hK[hK.kClampType=10]="kClampType",hK[hK.kTransformType=11]="kTransformType",hK[hK.kPositionType=12]="kPositionType",hK[hK.kURLImageType=13]="kURLImageType",hK[hK.kColorType=14]="kColorType",hK[hK.kUnsupportedColorType=15]="kUnsupportedColorType";var lH=function(t){return t?"number"===t?dl.kNumber:"percent"===t||"%"===t?dl.kPercentage:lG.find(function(e){return e.name===t}).unit_type:dl.kUnknown},lV=function(t){switch(t){case dl.kNumber:case dl.kInteger:return ds.kUNumber;case dl.kPercentage:return ds.kUPercent;case dl.kPixels:return ds.kULength;case dl.kMilliseconds:case dl.kSeconds:return ds.kUTime;case dl.kDegrees:case dl.kRadians:case dl.kGradians:case dl.kTurns:return ds.kUAngle;default:return ds.kUOther}},lU=function(t){switch(t){case ds.kUNumber:return dl.kNumber;case ds.kULength:return dl.kPixels;case ds.kUPercent:return dl.kPercentage;case ds.kUTime:return dl.kSeconds;case ds.kUAngle:return dl.kDegrees;default:return dl.kUnknown}},lq=function(t){var e=1;switch(t){case dl.kPixels:case dl.kDegrees:case dl.kSeconds:break;case dl.kMilliseconds:e=.001;break;case dl.kRadians:e=180/Math.PI;break;case dl.kGradians:e=.9;break;case dl.kTurns:e=360}return e},lY=function(t){switch(t){case dl.kNumber:case dl.kInteger:break;case dl.kPercentage:return"%";case dl.kEms:return"em";case dl.kRems:return"rem";case dl.kPixels:return"px";case dl.kDegrees:return"deg";case dl.kRadians:return"rad";case dl.kGradians:return"grad";case dl.kMilliseconds:return"ms";case dl.kSeconds:return"s";case dl.kTurns:return"turn"}return""},lX=function(){function t(){}return t.isAngle=function(t){return t===dl.kDegrees||t===dl.kRadians||t===dl.kGradians||t===dl.kTurns},t.isLength=function(t){return t>=dl.kEms&&t<dl.kDegrees},t.isRelativeUnit=function(t){return t===dl.kPercentage||t===dl.kEms||t===dl.kRems},t.isTime=function(t){return t===dl.kSeconds||t===dl.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(dc.kNo,df.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=dp.kUnitType&&this.getType()<=dp.kClampType},t}(),lK=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return tX(e,t),e.prototype.getType=function(){return dp.kColorType},e.prototype.to=function(t){return this},e}(lX);(hZ=dh||(dh={}))[hZ.Constant=0]="Constant",hZ[hZ.LinearGradient=1]="LinearGradient",hZ[hZ.RadialGradient=2]="RadialGradient";var lZ=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return tX(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 dp.kColorType},e}(lX),lQ=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return tX(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return dp.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(lX),lJ=l$(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),l0=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function l1(t){return"function"==typeof t}var l2={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},l5=l$(function(t){var e=lJ(t),n=l2[e];return(null==n?void 0:n.alias)||e}),l3=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},l4=function(t){return lU(lV(t))},l6=function(t){function e(e,n){void 0===n&&(n=dl.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?lH(n):n,i.value=e,i}return tX(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 dp.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=l4(this.unit);if(n!==l4(t)||n===dl.kUnknown)return null;var r=lq(this.unit)/lq(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case dl.kUnknown:break;case dl.kInteger:r=Number(this.value).toFixed(0);break;case dl.kNumber:case dl.kPercentage:case dl.kEms:case dl.kRems:case dl.kPixels:case dl.kDegrees:case dl.kRadians:case dl.kGradians:case dl.kMilliseconds:case dl.kSeconds:case dl.kTurns:var i=this.value,o=lY(this.unit);if(i<-999999||i>999999){var a=lY(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?l3(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(lX),l8=new l6(0,"px");new l6(1,"px");var l9=new l6(0,"deg"),l7=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 tX(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}(lK),st=new lQ("unset"),se={"":st,unset:st,initial:new lQ("initial"),inherit:new lQ("inherit")},sn=function(t){return se[t]||(se[t]=new lQ(t)),se[t]},sr=new l7(0,0,0,0,!0),si=new l7(0,0,0,0),so=l$(function(t,e,n,r){return new l7(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),sa=function(t,e){return void 0===e&&(e=dl.kNumber),new l6(t,e)},sl=new l6(50,"%");(hQ=dd||(dd={}))[hQ.Standard=0]="Standard",(hJ=dy||(dy={}))[hJ.ADDED=0]="ADDED",hJ[hJ.REMOVED=1]="REMOVED",hJ[hJ.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var ss={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new lD(0,0,0,0)};(h0=dg||(dg={})).COORDINATE="<coordinate>",h0.COLOR="<color>",h0.PAINT="<paint>",h0.NUMBER="<number>",h0.ANGLE="<angle>",h0.OPACITY_VALUE="<opacity-value>",h0.SHADOW_BLUR="<shadow-blur>",h0.LENGTH="<length>",h0.PERCENTAGE="<percentage>",h0.LENGTH_PERCENTAGE="<length> | <percentage>",h0.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",h0.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",h0.LIST_OF_POINTS="<list-of-points>",h0.PATH="<path>",h0.FILTER="<filter>",h0.Z_INDEX="<z-index>",h0.OFFSET_DISTANCE="<offset-distance>",h0.DEFINED_PATH="<defined-path>",h0.MARKER="<marker>",h0.TRANSFORM="<transform>",h0.TRANSFORM_ORIGIN="<transform-origin>",h0.TEXT="<text>",h0.TEXT_TRANSFORM="<text-transform>";var su=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}}(),sc=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,sf=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,sp=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,sh=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,sd={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},sy=l$(function(t){var e;return sa("angular"===t.type?Number(t.value):sd[t.value]||0,"deg")}),sg=l$(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:sa(e,r),cy:sa(n,i)}}),sm=l$(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return su(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(!ac(s)&&!ac(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:sa(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 lZ(dh.LinearGradient,{angle:n?sy(n):l9,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=sg(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?sn(f):sa(f,c)}return new lZ(dh.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=sc.exec(t);if(r){var i=(null==(e=r[2].match(sh))?void 0:e.map(function(t){return t.split(":")}))||[];return[new lZ(dh.LinearGradient,{angle:sa(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=t1(t,2),n=e[0],r=e[1];return{offset:sa(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=sf.exec(t);if(n){var r=(null==(e=n[4].match(sh))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:sa(50,"%"),cy:sa(50,"%"),steps:r.map(function(t){var e=t1(t,2),n=e[0],r=e[1];return{offset:sa(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!af(o))return[new lZ(dh.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=sp.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 sv(t){return t&&!!t.image}function sb(t){return t&&!ac(t.r)&&!ac(t.g)&&!ac(t.b)}var sx=l$(function(t){if(sv(t))return tK({repetition:"repeat"},t);if(ac(t)&&(t=""),"transparent"===t)return si;"currentColor"===t&&(t="black");var e=sm(t);if(e)return e;var n=a2(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),so.apply(void 0,t5([],t1(r),!1))});function sO(t,e){if(sb(t)&&sb(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(ap(e[n],0,255));return e[3]=ap(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function sw(t,e){if(ac(e))return sa(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return sa(Number(e),"px");else if("deg".search(t)>=0)return sa(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 sa(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var sE=function(t){return sw(/px/g,t)},sk=l$(sE);l$(function(t){return sw(RegExp("%","g"),t)});var sM=function(t){return as(t)||isFinite(Number(t))?sa(Number(t)||0,"px"):sw(RegExp("px|%|em|rem","g"),t)},sS=l$(sM),s_=function(t){return sw(RegExp("deg|rad|grad|turn","g"),t)},sP=l$(s_);function sj(t){var e=0;return t.unit===dl.kDegrees?e=t.value:t.unit===dl.kRadians?e=lk(Number(t.value)):t.unit===dl.kTurns&&(e=360*Number(t.value)),e}function sA(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):af(t)?n=t.split(" ").map(function(t){return Number(t)}):as(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 sT(t){return af(t)?t.split(" ").map(function(t){return sS(t)}):t.map(function(t){return sS(t.toString())})}function sC(t,e,n){if(0===t.value)return 0;if(t.unit===dl.kPixels)return Number(t.value);if(t.unit===dl.kPercentage&&n){var r=n.nodeName===dt.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var sN=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function sL(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,sN.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return sw(/deg|rad|grad|turn|px|%/g,t)||sx(t)})}),n.lastIndex===t.length)return r;return[]}function sI(t){return t.toString()}var sR=function(t){return"number"==typeof t?sa(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?sa(Number(t)):sa(0)},sD=l$(sR);function sF(t,e){return[t,e,sI]}function sB(t,e){return function(n,r){return[n,r,function(n){return sI(ap(n,t,e))}]}}function sz(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function sW(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=a_(t.parsedStyle.path.absolutePath,void 0,tK(tK({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function s$(t,e){return t[0]===e[0]&&t[1]===e[1]}function sG(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 sH(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}l$(function(t){return af(t)?t.split(" ").map(sD):t.map(sD)});var sV=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)},sU=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=lE(r=aT(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=sV({x:1,y:0},v),x=sV(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 sq(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=sU({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=sU({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 sY(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function sX(t,e){return sY(t)*sY(e)?(t[0]*e[0]+t[1]*e[1])/(sY(t)*sY(e)):1}function sK(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sX(t,e))}function sZ(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 sQ(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case dt.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 dt.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=sZ(O,O,E,M);break;case dt.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=sZ(void 0===_?0:_,void 0===P?0:P,E,M);break;case dt.POLYLINE:case dt.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===dt.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case dt.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=t1(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 ap(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case dt.PATH:p=t5([],t1(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=i6(e[1]-u,e[2]-f,0);a&&oo(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=i6(e[1]-u,e[2]-f,0),o=i6(e[3]-u,e[4]-f,0),l=i6(e[5]-u,e[6]-f,0);a&&(oo(i,i,a),oo(o,o,a),oo(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=i6(e[6]-u,e[7]-f,0);a&&oo(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=i6(e[1]-u,e[2]-f,0),o=i6(e[3]-u,e[4]-f,0);a&&(oo(i,i,a),oo(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var sJ=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=aw(t)}catch(n){e=aw(""),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&&s$(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=aT(lE(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=sK([1,0],O),k=sK(O,w);return -1>=sX(O,w)&&(k=Math.PI),sX(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:s$(t,[u,c])?0:n,ry:s$(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]&&s$(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=sH(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=sH(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=sq(c,0),b=v.x,x=v.y,O=sq(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=lp(t,n,i)[0],l=lp(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(lf(t,n,i,a)),void 0!==l&&u.push(lf(e,r,o,l)),lo(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=lu(t,n,i,a),f=lu(e,r,o,l),p=0;p<c.length;p++)s.push(ls(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(ls(e,r,o,l,f[p]));return lo(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=aj(n),h=aj(r),d=aA(n),y=aA(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-=sG(a,0).xExtra:l[0]===d&&(d+=sG(a,e).xExtra),l[1]===h?h-=sG(a,e).yExtra:l[1]===y&&(y+=sG(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}}},s0=l$(sJ);function s1(t){return af(t)?s0(t):sJ(t)}function s2(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=aL(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=aL(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=aI(e),o=aI(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=aR(y[0])!==aR(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+=au(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 s5(t,e){var n,r,i=af(t)?t.split(" ").map(function(t){var e=t1(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+=li(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=li(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,t5([],t1(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,t5([],t1(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 s3(t,e){return[t.points,e.points,function(t){return t}]}function s4(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function s6(t){return t}var s8={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],s6],matrix3d:["NNNNNNNNNNNNNNNN",s6],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",s4([null,null,new l6(1)]),s6],scalex:["N",s4([null,new l6(1),new l6(1)]),s4([null,new l6(1)])],scaley:["N",s4([new l6(1),null,new l6(1)]),s4([new l6(1),null])],scalez:["N",s4([new l6(1),new l6(1),null])],scale3d:["NNN",s6],skew:["Aa",null,s6],skewx:["A",null,s4([null,l9])],skewy:["A",null,s4([l9,null])],translate:["Tt",s4([null,null,l8]),s6],translatex:["T",s4([null,l8,l8]),s4([null,l8])],translatey:["T",s4([l8,null,l8]),s4([l8,null])],translatez:["L",s4([l8,l8,null])],translate3d:["TTL",s6]};function s9(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=s8[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()?l9:sP(t)},N:sD,T:sS,L:sk})[p.toUpperCase()](f):({a:l9,n:u[0],t:l8})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function s7(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=s8[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()?l9:s_(t)},N:sR,T:sM,L:sE})[p.toUpperCase()](f):({a:l9,n:u[0],t:l8})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function ut(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=lE(sj(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=lE(sj(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=lE(sj(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=lE(sj(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=lE(sj(t.d[0]));return[1,Math.tan(lE(sj(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=lE(sj(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=lE(sj(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=sC(t.d[0],0,null)||0,n=sC(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sC(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=sC(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=sC(t.d[0],0,null)||0,1];case"translate3d":return e=sC(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=sC(t.d[1],0,null)||0,r=sC(t.d[2],0,null)||0,1];case"perspective":var f=sC(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 ue(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 un(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}(l_,t)||(oc(lP,l_),lP[3]=0,lP[7]=0,lP[11]=0,lP[15]=1,1e-8>Math.abs(om(lP))))){var a,l,s,u,c,f,p,h,d,y,g=l_[3],v=l_[7],b=l_[11],x=l_[12],O=l_[13],w=l_[14],E=l_[15];if(0!==g||0!==v||0!==b){if(lj[0]=g,lj[1]=v,lj[2]=b,lj[3]=E,!oy(lP,lP))return;od(lP,lP),o8(i,lj,lP)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=lA,l=l_,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]=i4(lA[0]),on(lA[0],lA[0]),r[0]=or(lA[0],lA[1]),lC(lA[1],lA[1],lA[0],1,-r[0]),n[1]=i4(lA[1]),on(lA[1],lA[1]),r[0]/=n[1],r[1]=or(lA[0],lA[2]),lC(lA[2],lA[2],lA[0],1,-r[1]),r[2]=or(lA[1],lA[2]),lC(lA[2],lA[2],lA[1],1,-r[2]),n[2]=i4(lA[2]),on(lA[2],lA[2]),r[1]/=n[2],r[2]/=n[2],s=lA[1],u=lA[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],lT[0]=f*y-p*d,lT[1]=p*h-c*y,lT[2]=c*d-f*h,0>or(lA[0],lT))for(var k=0;k<3;k++)n[k]*=-1,lA[k][0]*=-1,lA[k][1]*=-1,lA[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+lA[0][0]-lA[1][1]-lA[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-lA[0][0]+lA[1][1]-lA[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-lA[0][0]-lA[1][1]+lA[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+lA[0][0]+lA[1][1]+lA[2][2],0)),lA[2][1]>lA[1][2]&&(o[0]=-o[0]),lA[0][2]>lA[2][0]&&(o[1]=-o[1]),lA[1][0]>lA[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(ut).reduce(ue),e,n,r,i,o),[[e,n,r,o,i]]}var ur=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 ui(t){return t.toFixed(6).replace(".000000","")}function uo(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=un(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=un(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=ap(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 ur(t[0],t[1],t[2],e,t[4]).map(ui).join(",")}])}function ua(t){return t.replace(/[xy]/,"")}function ul(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function us(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?sa(a):sa(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=uo(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=s8[u],d=s8[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=uo([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]&&ua(u)===ua(c))y=ua(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&ul(u)===ul(c))y=ul(u),f=h[1](f),p=d[1](p);else{var s=uo(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=l4(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=lY(t.unit)):(l6.isLength(t.unit)||l6.isLength(e.unit))&&(a=sC(t,i,n),l=sC(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 uu=l$(function(t){if(!af(t))return[sa(t[0]||0,"px"),sa(t[1]||0,"px")];if("text-anchor"===t)return[sa(0,"px"),sa(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:[sS(uf(e[0])),sS(uf(e[1]))]}),uc=function(t){if(!af(t))return[sa(t[0]||0,"px"),sa(t[1]||0,"px")];if("text-anchor"===t)return[sa(0,"px"),sa(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:[sM(uf(e[0])),sM(uf(e[1]))]};function uf(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var up=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:dg.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:dg.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:dg.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:dg.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:dg.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:dg.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:dg.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:dg.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:dg.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:dg.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:dg.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:dg.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:dg.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:dg.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:dg.FILTER},{n:"clipPath",syntax:dg.DEFINED_PATH},{n:"textPath",syntax:dg.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:dg.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===dt.CIRCLE||t===dt.ELLIPSE?"center":t===dt.TEXT?"text-anchor":"left top"},l:!0,syntax:dg.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===dt.CIRCLE||t===dt.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:dg.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:dg.COORDINATE},{n:"cy",int:!0,d:"0",syntax:dg.COORDINATE},{n:"cz",int:!0,d:"0",syntax:dg.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:dg.COORDINATE},{n:"y",int:!0,d:"0",syntax:dg.COORDINATE},{n:"z",int:!0,d:"0",syntax:dg.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:dg.COORDINATE},{n:"y1",int:!0,l:!0,syntax:dg.COORDINATE},{n:"z1",int:!0,l:!0,syntax:dg.COORDINATE},{n:"x2",int:!0,l:!0,syntax:dg.COORDINATE},{n:"y2",int:!0,l:!0,syntax:dg.COORDINATE},{n:"z2",int:!0,l:!0,syntax:dg.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:dg.PATH,p:50},{n:"points",int:!0,l:!0,syntax:dg.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:dg.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:dg.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:dg.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:dg.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:dg.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:dg.NUMBER,d:function(t){return t===dt.PATH||t===dt.POLYGON||t===dt.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:dg.MARKER},{n:"markerEnd",syntax:dg.MARKER},{n:"markerMid",syntax:dg.MARKER},{n:"markerStartOffset",syntax:dg.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:dg.LENGTH,l:!0,int:!0,d:"0"}],uh=up.filter(function(t){return!!t.l}).map(function(t){return t.n}),ud={},uy=new WeakMap,ug=function(t,e){var n=uy.get(t);return!n||0===n.length||n.includes(e)},um=function(){function t(t){var e=this;this.runtime=t,up.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){t5([t.n],t1(t.a||[]),!1).forEach(function(e){ud[e]=t})},t.prototype.unregisterMetadata=function(t){delete ud[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<uh.length;s++)if(uh[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=sx(e.fill)),e.stroke&&(t.parsedStyle.stroke=sx(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=sx(e.shadowColor)),e.filter&&(t.parsedStyle.filter=sL(e.filter)),ac(e.radius)||(t.parsedStyle.radius=sA(e.radius,4)),ac(e.lineDash)||(t.parsedStyle.lineDash=sA(e.lineDash,2)),e.points&&(t.parsedStyle.points=s5(e.points,t)),""===e.path&&(t.parsedStyle.path=tK({},ss)),e.path&&(t.parsedStyle.path=s1(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=sA(e.anchor,2)),e.transform&&(t.parsedStyle.transform=s9(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=uu(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!==dt.CIRCLE&&t.nodeName!==dt.ELLIPSE||ac(e.cx)&&ac(e.cy))&&(t.nodeName!==dt.RECT&&t.nodeName!==dt.IMAGE&&t.nodeName!==dt.GROUP&&t.nodeName!==dt.HTML&&t.nodeName!==dt.TEXT&&t.nodeName!==dt.MESH||ac(e.x)&&ac(e.y)&&ac(e.z))&&(t.nodeName!==dt.LINE||ac(e.x1)&&ac(e.y1)&&ac(e.z1)&&ac(e.x2)&&ac(e.y2)&&ac(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),ac(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),ac(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=ud[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=ud[t],o=e;if((""===e||ac(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=sn(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=sn(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=ud[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof lQ){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)ac(u)||(e=this.parseProperty(t,l1(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return ac(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 lQ?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=ud[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=uy.get(t);n||(uy.set(t,[]),n=uy.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&&ug(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=uy.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),uy.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 lN),r.renderBounds||(r.renderBounds=new lN);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===dt.TEXT?delete i.anchor:e===dt.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===dt.POLYLINE||e===dt.POLYGON||e===dt.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,lb(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?sC(x[0],0,t):0),W=(B?-1:1)*(x?sC(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===dt.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===dt.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=ud[t];return!!e&&e.inh},t}(),uv=function(){function t(){this.parser=sP,this.parserUnmemoize=s_,this.parserWithCSSDisabled=null,this.mixer=sF}return t.prototype.calculator=function(t,e,n,r){return sj(n)},t}(),ub=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof lQ&&(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}(),ux=function(){function t(){this.parser=sx,this.parserWithCSSDisabled=sx,this.mixer=sO}return t.prototype.calculator=function(t,e,n,r){return n instanceof lQ?"none"===n.value?sr:si:n},t}(),uO=function(){function t(){this.parser=sL}return t.prototype.calculator=function(t,e,n){return n instanceof lQ?[]:n},t}();function uw(t){var e=t.parsedStyle.fontSize;return ac(e)?null:e}var uE=function(){function t(){this.parser=sS,this.parserUnmemoize=sM,this.parserWithCSSDisabled=null,this.mixer=sF}return t.prototype.calculator=function(t,e,n,r,i){if(as(n))return n;if(!l6.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===dl.kPercentage)return 0;if(n.unit===dl.kEms){if(r.parentNode){var l=uw(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===dl.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=uw(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),uk=function(){function t(){this.mixer=sz}return t.prototype.parser=function(t){var e,n=sT(as(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}(),uM=function(){function t(){this.mixer=sz}return t.prototype.parser=function(t){var e,n=sT(as(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}(),uS=os();function u_(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||[l8,l8];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[l8];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[l8];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[l8];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[l8,l8,l8];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[l9];e.rotateLocal(0,0,sj(s[0]))}else if("rotatex"===i){var s=o||[l9];e.rotateLocal(sj(s[0]),0,0)}else if("rotatey"===i){var s=o||[l9];e.rotateLocal(0,sj(s[0]),0)}else if("rotatez"===i){var s=o||[l9];e.rotateLocal(0,0,sj(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(lE(u[0]),lE(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(lE(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],lE(u[0]))}else if("matrix"===i){var c=t1(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(op(uS,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(op.apply(tP,t5([uS],t1(o.map(function(t){return t.value})),!1)),uS[12]+=n,uS[13]+=r,e.setLocalTransform(uS))}),e.getLocalTransform()}var uP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tX(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case dt.CIRCLE:case dt.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;ac(a)||(n=a),ac(l)||(r=l),ac(s)||(i=s);break;case dt.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 dt.RECT:case dt.IMAGE:case dt.GROUP:case dt.HTML:case dt.TEXT:case dt.MESH:ac(t.parsedStyle.x)||(n=t.parsedStyle.x),ac(t.parsedStyle.y)||(r=t.parsedStyle.y),ac(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==dt.PATH&&t.nodeName!==dt.POLYLINE&&t.nodeName!==dt.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!ac(n)||!ac(r)||!ac(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)u_(h,t);else{var d=t1(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(ac(n)?y:n,ac(r)?g:r,ac(i)?v:i)}}},e}(uE),uj=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof lQ&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),uA=function(){function t(){this.mixer=sF,this.parser=sD,this.parserUnmemoize=sR,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uT=function(){function t(){this.parser=sD,this.parserUnmemoize=sR,this.parserWithCSSDisabled=null,this.mixer=sB(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===dt.LINE||i===dt.PATH||i===dt.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),uC=function(){function t(){this.parser=sD,this.parserUnmemoize=sR,this.parserWithCSSDisabled=null,this.mixer=sB(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uN=function(){function t(){this.parser=s1,this.parserWithCSSDisabled=s1,this.mixer=s2}return t.prototype.calculator=function(t,e,n){return n instanceof lQ&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new lD(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===dt.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}(),uL=function(){function t(){this.parser=s5,this.mixer=s3}return t.prototype.postProcessor=function(t,e){if((t.nodeName===dt.POLYGON||t.nodeName===dt.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),uI=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.mixer=sB(0,1/0),e}return tX(e,t),e}(uE),uR=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof lQ)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),uD=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}(),uF={},uB=0,uz="undefined"!=typeof window&&void 0!==window.document;function uW(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 u$(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 uG(t,e){if(uz)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var uH={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},uV="object"==typeof performance&&performance.now?performance:Date;function uU(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 uq=1,uY="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},uX=Date.now(),uK={},uZ=Date.now(),uQ=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-uZ,r=uq++;return uK[r]=t,Object.keys(uK).length>1||setTimeout(function(){uZ=e;var t=uK;uK={},Object.keys(t).forEach(function(e){return t[e](uY.performance&&"function"==typeof uY.performance.now?uY.performance.now():Date.now()-uX)})},n>16?0:16-n),r},uJ=function(t){return"string"!=typeof t?uQ:""===t?uY.requestAnimationFrame:uY[t+"RequestAnimationFrame"]},u0=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!!uJ(t)}),u1=uJ(u0),u2="string"!=typeof u0?function(t){delete uK[t]}:""===u0?uY.cancelAnimationFrame:uY[u0+"CancelAnimationFrame"]||uY[u0+"CancelRequestAnimationFrame"];uY.requestAnimationFrame=u1,uY.cancelAnimationFrame=u2;var u5=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,t5([],t1(t),!1))}))},t}(),u3=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 tQ(this,void 0,void 0,function(){var e,n,r;return tJ(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,t5([],t1(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}(),u4=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}(),u6=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}(),u8=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],u9=/([\"\'])[^\'\"]+\1/,u7=function(){function t(){this.parser=s9,this.parserUnmemoize=s7,this.parserWithCSSDisabled=s7,this.mixer=us}return t.prototype.calculator=function(t,e,n,r){return n instanceof lQ?[]:n},t.prototype.postProcessor=function(t){u_(t.parsedStyle.transform,t)},t}(),ct=function(){function t(){this.parser=sD,this.parserUnmemoize=sR}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=dy.Z_INDEX_CHANGED)}},t}(),ce=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),cn=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),cr=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}(),ci=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),co=function(){function t(){}return t.prototype.update=function(t){if(t.points&&aP(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,t5([],t1(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,t5([],t1(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,t5([],t1(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,t5([],t1(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),ca=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&&!af(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),cl=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&&!ac(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}(),cs=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 lR,this.page=new lR,this.canvas=new lR,this.viewport=new lR,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(lF)},t}(),cu=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.client=new lR,e.movement=new lR,e.offset=new lR,e.global=new lR,e.screen=new lR,e}return tX(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(lF)},e}(cs),cc=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return tX(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}(cu),cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tX(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(cu),cp=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 tX(e,t),e}(cs),ch=function(){function t(){this.emitter=new i1}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=aD(n)&&n||aF(n)&&n.capture,i=aF(n)&&n.once,o=l1(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=t1(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=l1(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,t5([],t1(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=aD(n)&&n||aF(n)&&n.capture,i=l1(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=l1(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new cp(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}(),cd=function(t){function e(){var e=t.apply(this,t5([],t1(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 tX(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===dt.TEXT&&(n+=this.style.text);try{for(var r=t0(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===dt.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===dt.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(lF)},e.prototype.lookupNamespaceURI=function(t){throw Error(lF)},e.prototype.lookupPrefix=function(t){throw Error(lF)},e.prototype.normalize=function(){throw Error(lF)},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}(ch),cy=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new i1,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=os(),this.tmpVec3=i5(),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=uV.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")}cd.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"),cd.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&&cd.isNode(o)&&o.parentNode;f&&f!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(cd.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!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),cd.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!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),cd.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!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),cd.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"),cd.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 lR(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 lR(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=ov(this.tmpMatrix,s,l),c=i9(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return oo(c,c,u),new lR(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=ov(this.tmpMatrix,n,r),o=i9(this.tmpVec3,t.x,t.y,0);oo(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new lR((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++)cd.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=t0(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(cc);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(cf);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(cf);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(cc);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=uV.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||cd.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=cd.isNode(e)&&e.parentNode}},t}(),cg=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||cj.offscreenCanvas)this.canvas=t||cj.offscreenCanvas,this.context=this.canvas.getContext("2d",tK({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",tK({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",tK({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}();(h1=dm||(dm={}))[h1.CAMERA_CHANGED=0]="CAMERA_CHANGED",h1[h1.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",h1[h1.NONE=2]="NONE";var cm=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 u4,initAsync:new u5,dirtycheck:new u6,cull:new u6,beginFrame:new u4,beforeRender:new u4,render:new u4,afterRender:new u4,endFrame:new u4,destroy:new u4,pick:new u3,pickSync:new u6,pointerDown:new u4,pointerUp:new u4,pointerMove:new u4,pointerOut:new u4,pointerOver:new u4,pointerWheel:new u4,pointerCancel:new u4,click:new u4}}return t.prototype.init=function(t){var e=this,n=tK(tK({},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(dm.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(dm.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!==dy.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>uW(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(uW)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(dm.DISPLAY_OBJECT_CHANGED)},t}(),cv=/\[\s*(.*)=(.*)\s*\]/,cb=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(cv),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 ac(n)?"":n.toString?n.toString():""},t}(),cx=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 tX(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(cs);function cO(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(h2=dv||(dv={})).REPARENT="reparent",h2.DESTROY="destroy",h2.ATTR_MODIFIED="DOMAttrModified",h2.INSERTED="DOMNodeInserted",h2.REMOVED="removed",h2.MOUNTED="DOMNodeInsertedIntoDocument",h2.UNMOUNTED="DOMNodeRemovedFromDocument",h2.BOUNDS_CHANGED="bounds-changed",h2.CULLED="culled";var cw=new cx(dv.REPARENT,null,"","","",0,"",""),cE=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 cp(dv.BOUNDS_CHANGED),this.rotate=(e=o9(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=i6(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=o9();an(a,n[0],n[1],n[2]);var l=h.getRotation(t);ai(e,h.getRotation(t.parentNode)),ae(e,e),at(a,e,a),at(o.localRotation,a,l),ao(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=o9(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=i6(e,r,i));var o=t.transformable;an(n,e[0],e[1],e[2]),at(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=o9(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=i6(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){an(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);ai(r,ae(o9(),a)),at(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=i6(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;oa(e,i5())||(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,i7(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=os(),o=i5(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,oa(h.getPosition(t),o)||(i8(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(oc(i,t.parentNode.transformable.worldTransform),oy(i,i),oo(n.localPosition,o,i)):i8(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=i5(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,oa(n.localPosition,a)||(i8(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=i5(),s=i5(),u=i5(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=i9(s,e,n,r)),oa(e,l)||(i7(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=o9();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=ar(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(ai(t,h.getRotation(e.parentNode)),ae(t,t),at(a.localRotation,t,n),ao(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=os(),f=i5(),p=ar(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(oD(t.localTransform,t.localRotation,t.localPosition,i6(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=oh(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),ov(t.localTransform,t.localTransform,e)}var n=oD(c,p,f,t.localScale,t.origin);ov(t.localTransform,t.localTransform,n)}else oD(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,ac(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=dy.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(cw)},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=dy.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=i6(e,n,r));var i=t.transformable;an(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=i6(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=i6(e[0],e[1],e[2]||n.localScale[2]);oa(r,n.localScale)||(i8(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=ar(e,n,r,i));var o=t.transformable;ai(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new i2(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=t1(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;)cO(n),n=n.parentNode;e&&t.forEach(function(t){cO(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 cx(dv.ATTR_MODIFIED,n,e,e,t,cx.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return oN(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return oI(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return oL(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=oN(i5(),e),r=oI(o9(),e),i=oL(i5(),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(lN.isEmpty(r))return null;var i=n||new lN;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 lN},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 lN).update(r.center,r.halfExtents))}),e){var a=u$(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new lN),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=os();t.parentNode.transformable&&(e=oy(os(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!lN.isEmpty(n)){var r=new lN;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);lN.isEmpty(i)||(r=new lN).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=t1(r.getMin(),2),l=a[0],s=a[1],u=t1(r.getMax(),2),c=u[0],f=u[1];return new lD(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new lD((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?ov(e.worldTransform,r.worldTransform,e.localTransform):oc(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}(),ck={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]},cM=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,cS=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),c_=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),cP=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(c_.exec(n)||cS.exec(t)))},this.trimByKinsokuShorui=function(t){var e=t5([],t1(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=ck.MetricsString+ck.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(ck.BaselineSymbol).width),s=ck.HeightMultiplier*l;l=l*ck.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=as(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!u9.test(u)&&0>u8.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 lD(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&&ck.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&ck.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=t5([],t1(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&&cM.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(!cM.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}(),cj={},cA=(h3=new ca,h4=new co,(h5={})[dt.CIRCLE]=new ce,h5[dt.ELLIPSE]=new cn,h5[dt.RECT]=h3,h5[dt.IMAGE]=h3,h5[dt.GROUP]=h3,h5[dt.LINE]=new cr,h5[dt.TEXT]=new cl(cj),h5[dt.POLYLINE]=h4,h5[dt.POLYGON]=h4,h5[dt.PATH]=new ci,h5[dt.HTML]=null,h5[dt.MESH]=null,h5),cT=(h8=new ux,h9=new uE,(h6={})[dg.PERCENTAGE]=null,h6[dg.NUMBER]=new uA,h6[dg.ANGLE]=new uv,h6[dg.DEFINED_PATH]=new ub,h6[dg.PAINT]=h8,h6[dg.COLOR]=h8,h6[dg.FILTER]=new uO,h6[dg.LENGTH]=h9,h6[dg.LENGTH_PERCENTAGE]=h9,h6[dg.LENGTH_PERCENTAGE_12]=new uk,h6[dg.LENGTH_PERCENTAGE_14]=new uM,h6[dg.COORDINATE]=new uP,h6[dg.OFFSET_DISTANCE]=new uT,h6[dg.OPACITY_VALUE]=new uC,h6[dg.PATH]=new uN,h6[dg.LIST_OF_POINTS]=new uL,h6[dg.SHADOW_BLUR]=new uI,h6[dg.TEXT]=new uR,h6[dg.TEXT_TRANSFORM]=new uD,h6[dg.TRANSFORM]=new u7,h6[dg.TRANSFORM_ORIGIN]=new function(){this.parser=uu,this.parserUnmemoize=uc},h6[dg.Z_INDEX]=new ct,h6[dg.MARKER]=new uj,h6);cj.CameraContribution=lW,cj.AnimationTimeline=null,cj.EasingFunction=null,cj.offscreenCanvasCreator=new cg,cj.sceneGraphSelector=new cb,cj.sceneGraphService=new cE(cj),cj.textService=new cP(cj),cj.geometryUpdaterFactory=cA,cj.CSSPropertySyntaxFactory=cT,cj.styleValueRegistry=new um(cj),cj.layoutRegistry=null,cj.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},cj.enableCSSParsing=!0,cj.enableDataset=!1,cj.enableStyleSyntax=!0,cj.enableSizeAttenuation=!1;var cC=0,cN=new cx(dv.INSERTED,null,"","","",0,"",""),cL=new cx(dv.REMOVED,null,"","","",0,"",""),cI=new cp(dv.DESTROY),cR=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.entity=cC++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:dd.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=cj.enableCSSParsing?{anchor:st,opacity:st,fillOpacity:st,strokeOpacity:st,fill:st,stroke:st,transform:st,transformOrigin:st,visibility:st,pointerEvents:st,lineWidth:st,lineCap:st,lineJoin:st,increasedLineWidthForHitTesting:st,fontSize:st,fontFamily:st,fontStyle:st,fontWeight:st,fontVariant:st,textAlign:st,textBaseline:st,textTransform:st,zIndex:st,filter:st,shadowType:st}:null,e.parsedStyle={},e.attributes={},e}return tX(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(lF)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return cj.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),cN.relatedNode=this,t.dispatchEvent(cN),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 cL.relatedNode=this,t.dispatchEvent(cL),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),cj.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 cj.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return cj.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return cj.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return cj.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return cj.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return cj.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return cj.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(cj.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=t1(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,t5([],t1(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,t5([],t1(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,t5([],t1(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(cI),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return cj.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return cj.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return cj.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return cj.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return cj.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 cj.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=l5(t);return e=this.attributes[n],cj.enableCSSParsing&&ac(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(lF)},e.prototype.getAttributeNode=function(t){throw Error(lF)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(lF)},e.prototype.hasAttributeNS=function(t,e){throw Error(lF)},e.prototype.removeAttributeNS=function(t,e){throw Error(lF)},e.prototype.removeAttributeNode=function(t){throw Error(lF)},e.prototype.setAttributeNS=function(t,e,n){throw Error(lF)},e.prototype.setAttributeNode=function(t){throw Error(lF)},e.prototype.setAttributeNodeNS=function(t){throw Error(lF)},e.prototype.toggleAttribute=function(t,e){throw Error(lF)},e}(cd);function cD(t){return!!(null==t?void 0:t.nodeName)}var cF=new cx(dv.ATTR_MODIFIED,null,null,null,null,cx.MODIFICATION,null,null),cB={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:""},cz={anchor:[0,0],fill:sr,stroke:sr,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},cW=tK(tK({},cz),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),c$=t5(t5([],t1(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),cG="data-",cH=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||dt.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,cj.enableCSSParsing?cz:cW,r.config.initialParsedStyle),cj.enableCSSParsing&&Object.assign(r.attributes,cB),r.initAttributes(r.config.style);var i=cj.globalThis.Proxy?cj.globalThis.Proxy:function(){};return cj.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(cG).concat(l0(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(cG).concat(l0(e)),n),!0}})),cj.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 tX(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=tK({},this.attributes);for(var r in n){var i=n[r];cD(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};cj.enableCSSParsing&&(n.usedAttributes=c$);var r={};for(var i in t)r[l5(i)]=t[i];cj.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=l5(e);!aB(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];cj.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(cF.relatedNode=this,cF.prevValue=o,cF.newValue=e,cF.attrName=t,cF.prevParsedValue=a,cF.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(cF):(cF.target=this,this.ownerDocument.defaultView.dispatchEvent(cF,!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=t1(t.getMin(),2),n=e[0],r=e[1],i=t1(t.getMax(),2);return new lD(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),cj.sceneGraphService.setOrigin(this,lw(t,e,n)),this},e.prototype.getOrigin=function(){return cj.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.setPosition(this,lw(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.setLocalPosition(this,lw(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.translate(this,lw(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.translateLocal(this,lw(t,e,n)),this},e.prototype.getPosition=function(){return cj.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return cj.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=lw(t,e,n)),cj.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lw(t,e,n)),cj.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return cj.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return cj.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return lk(t1(lM(i5(),cj.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return lk(t1(lM(i5(),cj.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return cj.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return cj.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return ac(e)&&ac(n)?cj.sceneGraphService.rotateLocal(this,0,0,t):cj.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return ac(e)&&ac(n)?cj.sceneGraphService.rotate(this,0,0,t):cj.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return cj.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return cj.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return cj.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return cj.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return cj.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return cj.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return cj.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return cj.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return cj.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){cj.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,t5([],t1(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,t5([],t1(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=t1(e,2),i=r[0],o=r[1];return i?aF(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=t1(oN(i5(),u),2),f=c[0],p=c[1],h=t1(oL(i5(),u),2),d=h[0],y=h[1],g=oI(o9(),u),v=t1(lM(i5(),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 i2(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=t1(lS(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=t1(lS(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(){cj.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){cj.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}(cR),cV=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;cj.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},cU=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.CIRCLE,style:cj.enableCSSParsing?tK({cx:"",cy:"",r:""},n):tK({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cj.enableCSSParsing?null:[sl,sl]}},r))||this}return tX(e,t),e}(cH),cq=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);return(n=t.call(this,tK({style:cj.enableCSSParsing?tK({x:"",y:""},r):tK({},r)},i))||this).isCustomElement=!0,n}return tX(e,t),e}(cH),cY=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.ELLIPSE,style:cj.enableCSSParsing?tK({cx:"",cy:"",rx:"",ry:""},n):tK({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cj.enableCSSParsing?null:[sl,sl]}},r))||this}return tX(e,t),e}(cH),cX=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.GROUP,style:cj.enableCSSParsing?tK({x:"",y:"",width:"",height:""},n):tK({},n)},r))||this}return tX(e,t),e}(cH),cK=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);return(n=t.call(this,tK({type:dt.HTML,style:cj.enableCSSParsing?tK({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):tK({},r)},i))||this).cullable.enable=!1,n}return tX(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 lD(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 lN,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=oy(os(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!lN.isEmpty(e)){var n=new lN;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(cH),cZ=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.IMAGE,style:cj.enableCSSParsing?tK({x:"",y:"",img:"",width:"",height:""},n):tK({},n)},r))||this}return tX(e,t),e}(cH),cQ=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);(n=t.call(this,tK({type:dt.LINE,style:tK({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&&cD(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&cD(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tX(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&&cD(r)&&(this.markerStartAngle=0,r.remove()),i&&cD(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&cD(r)&&(this.markerEndAngle=0,r.remove()),i&&cD(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&&cD(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=ll(r,i,o,a,t),c=u.x,f=u.y,p=oo(i5(),i6(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new lR(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 li(t.x1,t.y1,t.x2,t.y2)},e}(cH),cJ=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);(n=t.call(this,tK({type:dt.PATH,style:cj.enableCSSParsing?tK({path:"",miterLimit:""},r):tK({},r),initialParsedStyle:cj.enableCSSParsing?null:{miterLimit:4,path:tK({},ss)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&cD(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&cD(s)&&n.placeMarkerMid(s),l&&cD(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tX(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&&cD(r)&&(this.markerStartAngle=0,r.remove()),i&&cD(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&cD(r)&&(this.markerEndAngle=0,r.remove()),i&&cD(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&&cD(d)){var y=0;if(t){var g=t1(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=t1(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&&cD(t))for(var o=1;o<n.length-1;o++){var a=t1(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 sW(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=a_(n.path.absolutePath,t,tK(tK({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=oo(i5(),i6(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lR(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*sW(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}(cH),c0=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);(n=t.call(this,tK({type:dt.POLYGON,style:cj.enableCSSParsing?tK({points:"",miterLimit:"",isClosed:!0},r):tK({},r),initialParsedStyle:cj.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&&cD(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&cD(s)&&n.placeMarkerMid(s),l&&cD(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tX(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&&cD(r)&&(this.markerStartAngle=0,r.remove()),i&&cD(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&cD(r)&&(this.markerEndAngle=0,r.remove()),i&&cD(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&&cD(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&&cD(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}(cH),c1=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.POLYLINE,style:cj.enableCSSParsing?tK({points:"",miterLimit:"",isClosed:!1},n):tK({},n),initialParsedStyle:cj.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return tX(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=ll(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=oo(i5(),i6(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lR(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}(c0),c2=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.RECT,style:cj.enableCSSParsing?tK({x:"",y:"",width:"",height:"",radius:""},n):tK({},n)},r))||this}return tX(e,t),e}(cH),c5=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.TEXT,style:cj.enableCSSParsing?tK({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):tK({fill:"black"},n),initialParsedStyle:cj.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 tX(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}(cH),c3=function(){function t(){this.registry={},this.define(dt.CIRCLE,cU),this.define(dt.ELLIPSE,cY),this.define(dt.RECT,c2),this.define(dt.IMAGE,cZ),this.define(dt.LINE,cQ),this.define(dt.GROUP,cX),this.define(dt.PATH,cJ),this.define(dt.POLYGON,c0),this.define(dt.POLYLINE,c1),this.define(dt.TEXT,c5),this.define(dt.HTML,cK)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),c4=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new cj.AnimationTimeline(e)}catch(t){}var n={};return up.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=l1(i)?i(dt.GROUP):i)}),e.documentElement=new cX({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return tX(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?c5:cX);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(lF)},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 tQ(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tJ(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 tQ(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tJ(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(lB)},e.prototype.insertBefore=function(t,e){throw Error(lB)},e.prototype.removeChild=function(t,e){throw Error(lB)},e.prototype.replaceChild=function(t,e,n){throw Error(lB)},e.prototype.append=function(){throw Error(lB)},e.prototype.prepend=function(){throw Error(lB)},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}(cd),c6=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 cp(dv.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),c8=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new cc(null),this.rootWheelEvent=new cf(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=t0(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=t0(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=t0(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=t0(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=t0(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||ac(r)||ac(i)){var l=this.context.eventService.client2Viewport(new lR(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=uH[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=uV.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];aB(i.button)&&(i.button=0),aB(i.buttons)&&(i.buttons=1),aB(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),aB(i.width)&&(i.width=i.radiusX||1),aB(i.height)&&(i.height=i.radiusY||1),aB(i.tiltX)&&(i.tiltX=0),aB(i.tiltY)&&(i.tiltY=0),aB(i.pointerType)&&(i.pointerType="touch"),aB(i.pointerId)&&(i.pointerId=i.identifier||0),aB(i.pressure)&&(i.pressure=i.force||.5),aB(i.twist)&&(i.twist=0),aB(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(aB(t.isPrimary)&&(t.isPrimary=!0),aB(t.width)&&(t.width=1),aB(t.height)&&(t.height=1),aB(t.tiltX)&&(t.tiltX=0),aB(t.tiltY)&&(t.tiltY=0),aB(t.pointerType)&&(t.pointerType="mouse"),aB(t.pointerId)&&(t.pointerId=1),aB(t.pressure)&&(t.pressure=.5),aB(t.twist)&&(t.twist=0),aB(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),c9=[dt.CIRCLE,dt.ELLIPSE,dt.IMAGE,dt.RECT,dt.LINE,dt.POLYLINE,dt.POLYGON,dt.TEXT,dt.PATH,dt.HTML],c7=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(lN.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||dn.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==dn.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===dn.OUTSIDE||n===dn.INSIDE)return n;for(var i=dn.INSIDE,o=c9.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(or(c,e.getPositiveFarPoint(r[a]))+f<0)return dn.OUTSIDE;or(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),ft=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;cj.enableSizeAttenuation&&cj.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),cj.enableCSSParsing&&cj.styleValueRegistry.recalc(e),cj.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),cj.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(dv.MOUNTED,u),a.addEventListener(dv.UNMOUNTED,c),a.addEventListener(dv.ATTR_MODIFIED,l),a.addEventListener(dv.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(dv.MOUNTED,u),a.removeEventListener(dv.UNMOUNTED,c),a.removeEventListener(dv.ATTR_MODIFIED,l),a.removeEventListener(dv.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=t1(i.getMin(),2),a=o[0],l=o[1],s=t1(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}();(h7=db||(db={})).READY="ready",h7.BEFORE_RENDER="beforerender",h7.RERENDER="rerender",h7.AFTER_RENDER="afterrender",h7.BEFORE_DESTROY="beforedestroy",h7.AFTER_DESTROY="afterdestroy",h7.RESIZE="resize",h7.DIRTY_RECTANGLE="dirtyrectangle",h7.RENDERER_CHANGED="rendererchanged";var fe=new cp(dv.MOUNTED),fn=new cp(dv.UNMOUNTED),fr=new cp(db.BEFORE_RENDER),fi=new cp(db.RERENDER),fo=new cp(db.AFTER_RENDER),fa=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=cH,i.inited=!1,i.context={},i.document=new c4,i.document.defaultView=i,i.customElements=new c3;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||uB++;uF[n]&&uF[n].destroy(),uF[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||uz&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=uG(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=uG(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(cj.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:u1.bind(cj.globalThis),i.cancelAnimationFrame=null!=g?g:u2.bind(cj.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in cj.globalThis,i.supportsPointerEvents=null!=b?b:!!cj.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof cj.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!cj.globalThis.MouseEvent||t instanceof cj.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof cj.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 tX(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 cj.CameraContribution;i.clipSpaceNearZ=n,i.setType(dr.EXPLORING,di.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(lz.UPDATED,function(){r.context.renderingContext.renderReasons.add(dm.CAMERA_CHANGED),cj.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){cj.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 cp(db.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 cp(db.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===da.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new cp(db.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(fr),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(fi)}),this.dispatchEvent(fo)},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 ld,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new c8,new ft,new c6([new c7])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(tK(tK({},cj),this.context)),this.context.renderingService=new cm(cj,this.context),this.context.eventService=new cy(cj,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 cp(db.READY))}):r.dispatchEvent(new cp(db.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new cp(db.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(cj)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),t5([],t1(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(cj)}),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(fn):(fn.target=t,this.dispatchEvent(fn,!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(fe):(fe.target=t,this.dispatchEvent(fe,!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}(ch),fl={}.toString,fs=function(t,e){return fl.call(t)==="[object "+e+"]"},fu=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.landmarks=[],e}return tX(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=lO(e),this.relAzimuth=lO(t),this.relRoll=lO(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===dr.EXPLORING){var r=o7(o9(),[1,0,0],lE((this.rotateWorld?1:-1)*this.relElevation)),i=o7(o9(),[0,1,0],lE((this.rotateWorld?1:-1)*this.relAzimuth)),o=o7(o9(),[0,0,1],lE(this.relRoll)),a=at(o9(),i,r);a=at(o9(),a,o);var l=oF(os(),a);ob(this.matrix,this.matrix,[0,0,-this.distance]),ov(this.matrix,this.matrix,l),ob(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=lw(t,e,0),r=i3(this.position);return i7(r,r,oe(i5(),this.right,n[0])),i7(r,r,oe(i5(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=i3(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===dr.ORBITING||this.type===dr.EXPLORING?this._getDistance():this.type===dr.TRACKING&&i7(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 cj.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:ou(p.getWorldTransform()),right:i3(p.right),up:i3(p.up),forward:i3(p.forward),position:i3(p.getPosition()),focalPoint:i3(p.getFocalPoint()),distanceVector:i3(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=fs(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=fs(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)||cj.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=i5(),a=i5(),l=1,u=0;if(oi(o,n.focalPoint,y,r),oi(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),ol(o,y)+ol(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=oc(this.matrix,t.matrix),this.right=i8(this.right,t.right),this.up=i8(this.up,t.up),this.forward=i8(this.forward,t.forward),this.position=i8(this.position,t.position),this.focalPoint=i8(this.focalPoint,t.focalPoint),this.distanceVector=i8(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}(lW);cj.CameraContribution=fu;var fc=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}(),ff=0,fp=new WeakMap,fh=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:dO&&(t===dO||t===dx)?dO:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,fm.push(e),fg||(fg=!0,void 0!==cj.globalThis?cj.globalThis.setTimeout(fv):fv())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(dv.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(dv.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(dv.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(dv.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(dv.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(dv.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=fp.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 dv.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=dx=new fc("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===cx.ADDITION?null:t.prevValue;fy(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,dO||((dO=fc.copy(dx)).oldValue=n),dO):e}});break;case dv.REMOVED:case dv.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===dv.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=dx=new fc("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,fy(n,function(t){if(t.childList)return e})}dx=dO=void 0},t}();function fd(t){this.callback=t,this.nodes=[],this.records=[],this.uid=ff++}function fy(t,e){for(var n=t;n;n=n.parentNode){var r=fp.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)}}}}fd.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=fp.get(t);r||fp.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 fh(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},fd.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=fp.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=[]},fd.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var fg=!1,fm=[];function fv(){fg=!1;var t=fm;fm=[],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=fp.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&fv()}var fb=function(t,e,n){return t<e?e:t>n?n:t},fx={}.toString,fO=function(t){return"[object Number]"===fx.call(t)},fw=function(t){return null==t},fE=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 tX(e,t),e}(cs),fk=0,fM=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(fk++),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 fE(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(lF)},t.prototype.addEventListener=function(t,e,n){throw Error(lF)},t.prototype.removeEventListener=function(t,e,n){throw Error(lF)},t.prototype.dispatchEvent=function(t){throw Error(lF)},t.prototype.commitStyles=function(){throw Error(lF)},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 fE(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 fE(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),fS="function"==typeof Float32Array,f_=function(t,e){return 1-3*e+3*t},fP=function(t,e){return 3*e-6*t},fj=function(t){return 3*t},fA=function(t,e,n){return((f_(e,n)*t+fP(e,n))*t+fj(e))*t},fT=function(t,e,n){return 3*f_(e,n)*t*t+2*fP(e,n)*t+fj(e)},fC=function(t,e,n,r,i){var o,a,l=0;do(o=fA(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},fN=function(t,e,n,r){for(var i=0;i<4;++i){var o=fT(e,n,r);if(0===o)break;var a=fA(e,n,r)-t;e-=a/o}return e},fL=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=fS?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=fA(.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=fT(a,t,n);return l>=.001?fN(e,a,t,n):0===l?a:fC(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:fA(a(t),e,r)}},fI=function(t){return Math.pow(t,2)},fR=function(t){return Math.pow(t,3)},fD=function(t){return Math.pow(t,4)},fF=function(t){return Math.pow(t,5)},fB=function(t){return Math.pow(t,6)},fz=function(t){return 1-Math.cos(t*Math.PI/2)},fW=function(t){return 1-Math.sqrt(1-t*t)},f$=function(t){return t*t*(3*t-2)},fG=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)},fH=function(t,e){void 0===e&&(e=[]);var n=t1(e,2),r=n[0],i=n[1],o=fb(Number(void 0===r?1:r),1,10),a=fb(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)},fV=function(t,e,n){void 0===e&&(e=[]);var r=t1(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=fb(o,.1,1e3),l=fb(l,.1,1e3),u=fb(u,.1,1e3),f=fb(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},fU=function(t,e){void 0===e&&(e=[]);var n=t1(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(fb(t,0,1)*i)/i},fq=function(t,e){void 0===e&&(e=[]);var n=t1(e,4);return fL(n[0],n[1],n[2],n[3])(t)},fY=fL(.42,0,1,1),fX=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},fK=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}},fZ=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}},fQ={steps:fU,"step-start":function(t){return fU(t,[1,"start"])},"step-end":function(t){return fU(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":fq,ease:function(t){return fq(t,[.25,.1,.25,1])},in:fY,out:fX(fY),"in-out":fK(fY),"out-in":fZ(fY),"in-quad":fI,"out-quad":fX(fI),"in-out-quad":fK(fI),"out-in-quad":fZ(fI),"in-cubic":fR,"out-cubic":fX(fR),"in-out-cubic":fK(fR),"out-in-cubic":fZ(fR),"in-quart":fD,"out-quart":fX(fD),"in-out-quart":fK(fD),"out-in-quart":fZ(fD),"in-quint":fF,"out-quint":fX(fF),"in-out-quint":fK(fF),"out-in-quint":fZ(fF),"in-expo":fB,"out-expo":fX(fB),"in-out-expo":fK(fB),"out-in-expo":fZ(fB),"in-sine":fz,"out-sine":fX(fz),"in-out-sine":fK(fz),"out-in-sine":fZ(fz),"in-circ":fW,"out-circ":fX(fW),"in-out-circ":fK(fW),"out-in-circ":fZ(fW),"in-back":f$,"out-back":fX(f$),"in-out-back":fK(f$),"out-in-back":fZ(f$),"in-bounce":fG,"out-bounce":fX(fG),"in-out-bounce":fK(fG),"out-in-bounce":fZ(fG),"in-elastic":fH,"out-elastic":fX(fH),"in-out-elastic":fK(fH),"out-in-elastic":fZ(fH),spring:fV,"spring-in":fV,"spring-out":fX(fV),"spring-in-out":fK(fV),"spring-out-in":fZ(fV)},fJ=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()},f0=function(t){return t};function f1(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var f2="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",f5=RegExp("cubic-bezier\\("+f2+","+f2+","+f2+","+f2+"\\)"),f3=/steps\(\s*(\d+)\s*\)/,f4=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function f6(t){var e=f5.exec(t);if(e)return fL.apply(void 0,t5([],t1(e.slice(1).map(Number)),!1));var n=f3.exec(t);if(n)return f1(Number(n[1]),0);var r=f4.exec(t);return r?f1(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):fQ[fJ(t)]||fQ.linear}function f8(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var f9=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!cj.enableCSSParsing&&fO(i)?i:n(i)}},f7=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=f0,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=f6(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function pt(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(fw(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(!fw(l)&&!fw(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 pe="backwards|forwards|both|none".split("|"),pn="reverse|alternate|alternate-reverse".split("|"),pr=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 f7,"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===pe.indexOf(l[t])||("direction"!==t||-1!==pn.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=pt(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=ud[t];if(i&&i.syntax&&i.int){var o=cj.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(cj.enableCSSParsing){var s=cj.styleValueRegistry.parseProperty(t,e,r,!1),u=cj.styleValueRegistry.parseProperty(t,n,r,!1);a=cj.styleValueRegistry.computeProperty(t,s,r,!1),l=cj.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=f9.apply(void 0,t5([],t1(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return f9(!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(f8(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:f6(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)f8(n)&&t.setAttribute(n,null)});var g=cj.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=pt(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 pi(t,e){return Number(t.id)-Number(e.id)}var po=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(pi),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 fM(new pr(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(pi),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,t5([],t1(a),!1)),(i=this.pendingEffects).push.apply(i,t5([],t1(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();function pa(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function pl(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function ps(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function pu(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function pc(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function pf(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function pp(t){return pu(t)||pl(t)}function ph(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function pd(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]}cj.EasingFunction=f6,cj.AnimationTimeline=po;let py=(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}))},pg=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=py(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};pg.props={};let pm=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),pv=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=pm(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...pg({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};function pb(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 px(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function pO(t){return t.map((t,e)=>e)}function pw(t){return t[t.length-1]}function pE(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function pk([t,e],[n,r]){return[t-n,e-r]}pv.props={};function pM([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function pS([t,e]){return Math.atan2(e,t)}function p_([t,e]){return pS([t,e])+Math.PI/2}function pP(t,e){let n=pS(t),r=pS(e);return n<r?r-n:2*Math.PI-(n-r)}function pj(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 pA([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function pT(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function pC(t,e,n,r,i){let o=pS(pk(r,e))+Math.PI,a=pS(pk(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function pN(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=pO(a),[u,c]=pb(s,t=>a[t]),f=new ex({domain:[u,c],range:[0,100]}),p=t=>i0(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 pL(t){let[e,n,r,i]=t;return[i,e,n,r]}function pI(t,e,n){let[r,i,,o]=pa(t)?pL(e):e,[a,l]=n,s=t.getCenter(),u=p_(pk(r,s)),c=p_(pk(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:pM(o,s),outerRadius:pM(r,s)}}function pR(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function pD(t,e){if(!pl(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function pF(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]}function pB(t){return new pz([t],null,t,t.ownerDocument)}class pz{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 pz("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 pz(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 pz([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 pz(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 pz(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new pz([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 pz([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=iB(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 pz([],r,this._parent,this._document),new pz(i,null,this._parent,this._document),new pz(o,null,this._parent,this._document),new pz([],a,this._parent,this._document),new pz(l,null,this._parent,this._document)];return new pz(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new pz(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=pz.registry[t];return e?new e:n1(`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 pz([],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}}pz.registry={g:cX,rect:c2,circle:cU,path:cJ,text:c5,ellipse:cY,image:cZ,line:cQ,polygon:c0,polyline:c1,html:cK};var pW=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 p$={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},pG={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=pW(t,["shape","radius"]),o=n3(i,"pointer"),a=n3(i,"pin"),{shape:l}=o,s=pW(o,["shape"]),{shape:u}=a,c=pW(a,["shape"]),{coordinate:f,theme:p}=e;return(t,e)=>{let n=t.map(t=>f.invert(t)),[o,a,h]=function(t,e){let{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),d=f.clone(),{color:y}=e,g=pv({startAngle:o,endAngle:a,innerRadius:h,outerRadius:r});g.push(["cartesian"]),d.update({transformations:g});let v=n.map(t=>d.map(t)),[b,x]=pF(v),[O,w]=f.getCenter(),E=Object.assign(Object.assign({x1:b,y1:x,x2:O,y2:w,stroke:y},s),i),k=Object.assign(Object.assign({cx:O,cy:w,stroke:y},c),i),M=pB(new cX);return n7(l)||("function"==typeof l?M.append(()=>l(v,e,d,p)):M.append("line").call(pT,E).node()),n7(u)||("function"==typeof u?M.append(()=>u(v,e,d,p)):M.append("circle").call(pT,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},pH={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},pV=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=pW(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:u,target:c,total:f,scale:p}=function(t,e){let{name:n="score",target:r,total:i,percent:o,thresholds:a=[]}=function(t){if(i0(t)){let e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),l=o||r,s=o?1:i,u=Object.assign({y:{domain:[0,s]}},e);return a.length?{targetData:[{x:n,y:l,color:"target"}],totalData:a.map((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e})),target:l,total:s,scale:u}:{targetData:[{x:n,y:l,color:"target"}],totalData:[{x:n,y:l,color:"target"},{x:n,y:s-l,color:"total"}],target:l,total:s,scale:u}}(n,r),h=n3(i,"text"),d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[nK({},p$,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:n3(i,"arc"),animate:"object"==typeof o?n3(o,"arc"):o},l)),nK({},p$,pG,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?n3(o,"indicator"):o},l)),nK({},pH,{style:Object.assign({text:function(t,{target:e,total:n}){let{content:r}=t;return r?r(e,n):e.toString()}(h,{target:c,total:f})},h),animate:"object"==typeof o?n3(o,"text"):o})]};pV.props={};let pU=Math.PI/180;function pq(t){return t.text}function pY(){return"serif"}function pX(){return"normal"}function pK(t){return t.value}function pZ(){return 90*~~(2*Math.random())}function pQ(){return 1}function pJ(){}function p0(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function p1(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function p2(t){return"function"==typeof t?t:function(){return t}}let p5={archimedean:p0,rectangular:function(t){let e=4*t[0]/t[1],n=0,r=0;return function(t){let i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};var p3=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 p4={size:[500,500],fontSize:[14,28]};function p6(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)return void e(t);if("string"==typeof t){let r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}let p8=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let n=Object.assign({},p4,t),r=function(){let t=[256,256],e=pq,n=pY,r=pK,i=pX,o=pZ,a=pQ,l=p0,s=Math.random,u=pJ,c=[],f=null,p=1/0,h={};return h.start=function(){let[d,y]=t,g=function(t){t.width=t.height=1;let e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;let n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(document.createElement("canvas")),v=h.board?h.board:p1((t[0]>>5)*t[1]),b=c.length,x=[],O=c.map(function(t,l,s){return t.text=e.call(this,t,l,s),t.font=n.call(this,t,l,s),t.style=pX.call(this,t,l,s),t.weight=i.call(this,t,l,s),t.rotate=o.call(this,t,l,s),t.size=~~r.call(this,t,l,s),t.padding=a.call(this,t,l,s),t}).sort(function(t,e){return e.size-t.size}),w=-1,E=h.board?[{x:0,y:0},{x:d,y:y}]:void 0;function k(){let e=Date.now();for(;Date.now()-e<p&&++w<b;){let e=O[w];e.x=d*(s()+.5)>>1,e.y=y*(s()+.5)>>1,function(t,e,n,r){if(e.sprite)return;let i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);let a=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*pU),r=Math.cos(e.rotate*pU),i=t*r,o=t*n,a=u*r,l=u*n;t=Math.max(Math.abs(i+l),Math.abs(i-l))+31>>5<<5,u=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(u>s&&(s=u),a+t>=2048&&(a=0,l+=s,s=0),l+u>=2048)break;i.translate((a+(t>>1))/o,(l+(u>>1))/o),e.rotate&&i.rotate(e.rotate*pU),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=a,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}let c=i.getImageData(0,0,2048/o,2048/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(null==(a=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,o--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(g,e,O,w),e.hasText&&function(e,n,r){let i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=l(t),c=.5>s()?1:-1,f,p=-c,h,d;for(;(f=u(p+=c))&&!(Math.min(Math.abs(h=~~f[0]),Math.abs(d=~~f[1]))>=a);){;if((n.x=i+h,n.y=o+d,!(n.x+n.x0<0)&&!(n.y+n.y0<0)&&!(n.x+n.x1>t[0])&&!(n.y+n.y1>t[1]))&&(!r||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,l=32-a,s=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}(n,e,t[0]))&&(!r||n.x+n.x1>r[0].x&&n.x+n.x0<r[1].x&&n.y+n.y1>r[0].y&&n.y+n.y0<r[1].y)){let r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),l=127&a,s=32-l,u=n.y1-n.y0,c,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<u;t++){c=0;for(let n=0;n<=i;n++)e[f+n]|=c<<s|(n<i?(c=r[t*i+n])>>>l:0);f+=o}return delete n.sprite,!0}}return!1}(v,e,E)&&(u.call(null,"word",{cloud:h,word:e}),x.push(e),E?h.hasImage||function(t,e){let n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}h._tags=x,h._bounds=E,w>=b&&(h.stop(),u.call(null,"end",{cloud:h,words:x,bounds:E}))}return f&&clearInterval(f),f=setInterval(k,0),k(),h},h.stop=function(){return f&&(clearInterval(f),f=null),h},h.createMask=e=>{let n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;let o=r>>5,a=p1((r>>5)*i);n.width=r,n.height=i;let l=n.getContext("2d");l.drawImage(e,0,0,e.width,e.height,0,0,r,i);let s=l.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n=o*t+(e>>5),i=t*r+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;a[n]|=l}h.board=a,h.hasImage=!0},h.timeInterval=function(t){p=null==t?1/0:t},h.words=function(t){c=t},h.size=function(e=[]){t=[+e[0],+e[1]]},h.text=function(t){e=p2(t)},h.font=function(t){n=p2(t)},h.fontWeight=function(t){i=p2(t)},h.rotate=function(t){o=p2(t)},h.spiral=function(t){l=p5[t]||t},h.fontSize=function(t){r=p2(t)},h.padding=function(t){a=p2(t)},h.random=function(t){s=p2(t)},h.on=function(t){u=p2(t)},h}();yield({set(t,e,i){if(void 0===n[t])return this;let o=e?e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},setAsync(t,e,i){var o,a,l,s;return o=this,a=void 0,l=void 0,s=function*(){if(void 0===n[t])return this;let o=e?yield e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},new(l||(l=Promise))(function(t,e){function n(t){try{i(s.next(t))}catch(t){e(t)}}function r(t){try{i(s.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}i((s=s.apply(o,a||[])).next())})}}).set("fontSize",t=>{let n=e.map(t=>t.value);var r=[iE(n),ik(n)];if("function"==typeof t)return t;if(Array.isArray(t)){let[e,n]=t;if(!r)return()=>(n+e)/2;let[i,o]=r;return o===i?()=>(n+e)/2:({value:t})=>(n-e)/(o-i)*(t-i)+e}return()=>t}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",p6,r.createMask),r.words([...e]);let i=r.start(),[o,a]=n.size,l=[{x:0,y:0},{x:o,y:a}],{_bounds:s=l,_tags:u,hasImage:c}=i,f=u.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},p3(t,["x","y"])),{x:e+o/2,y:n+a/2})}),[{x:p,y:h},{x:d,y:y}]=s,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:c?0:p,y:c?0:h}),Object.assign(Object.assign({},g),{x:c?o:d,y:c?a:y})),f},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};p8.props={};var p9=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 p7=(t,e)=>({size:[t,e]}),ht=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),he=(t,e)=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let{width:n,height:r}=e,{data:i,encode:o={},scale:a,style:l={},layout:s={}}=t,u=p9(t,["data","encode","scale","style","layout"]),c=function(t,e){let{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(i,o),f=yield p8(Object.assign(Object.assign({},p7(n,r)),s))(c);return nK({},ht(n,r),Object.assign(Object.assign({data:f,encode:o,scale:a,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};function hn(t,e,n){return Math.max(e,Math.min(t,n))}function hr(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}he.props={};var hi=function(t){return"function"==typeof t};let ho={pin:function(t,e,n){let r=4*n/3,i=Math.max(r,2*n),o=r/2,a=o+e-i/2,l=Math.asin(o/((i-o)*.85)),s=Math.sin(l)*o,u=Math.cos(l)*o,c=t-u,f=a+s,p=a+o/Math.sin(l);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 tC},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_={};n.r(t_),n.d(t_,{geoAlbers:function(){return id},geoAlbersUsa:function(){return iy},geoAzimuthalEqualArea:function(){return it},geoAzimuthalEqualAreaRaw:function(){return r7},geoAzimuthalEquidistant:function(){return rU},geoAzimuthalEquidistantRaw:function(){return rV},geoConicConformal:function(){return r5},geoConicConformalRaw:function(){return r2},geoConicEqualArea:function(){return ic},geoConicEqualAreaRaw:function(){return iu},geoConicEquidistant:function(){return r9},geoConicEquidistantRaw:function(){return r8},geoEqualEarth:function(){return ia},geoEqualEarthRaw:function(){return io},geoEquirectangular:function(){return rK},geoEquirectangularRaw:function(){return rX},geoGnomonic:function(){return is},geoGnomonicRaw:function(){return il},geoIdentity:function(){return r6},geoMercator:function(){return rJ},geoMercatorRaw:function(){return rQ},geoNaturalEarth1:function(){return rY},geoNaturalEarth1Raw:function(){return rq},geoOrthographic:function(){return r4},geoOrthographicRaw:function(){return r3},geoProjection:function(){return rG},geoProjectionMutator:function(){return rH},geoStereographic:function(){return ih},geoStereographicRaw:function(){return ip},geoTransverseMercator:function(){return ir},geoTransverseMercatorRaw:function(){return ie}});var tP={};n.r(tP),n.d(tP,{add:function(){return oZ},adjoint:function(){return og},clone:function(){return ou},copy:function(){return oc},create:function(){return os},determinant:function(){return om},equals:function(){return o2},exactEquals:function(){return o1},frob:function(){return oK},fromQuat:function(){return oF},fromQuat2:function(){return oC},fromRotation:function(){return o_},fromRotationTranslation:function(){return oT},fromRotationTranslationScale:function(){return oR},fromRotationTranslationScaleOrigin:function(){return oD},fromScaling:function(){return oS},fromTranslation:function(){return oM},fromValues:function(){return of},fromXRotation:function(){return oP},fromYRotation:function(){return oj},fromZRotation:function(){return oA},frustum:function(){return oB},getRotation:function(){return oI},getScaling:function(){return oL},getTranslation:function(){return oN},identity:function(){return oh},invert:function(){return oy},lookAt:function(){return oq},mul:function(){return o5},multiply:function(){return ov},multiplyScalar:function(){return oJ},multiplyScalarAndAdd:function(){return o0},ortho:function(){return oV},orthoNO:function(){return oH},orthoZO:function(){return oU},perspective:function(){return oW},perspectiveFromFieldOfView:function(){return oG},perspectiveNO:function(){return oz},perspectiveZO:function(){return o$},rotate:function(){return oO},rotateX:function(){return ow},rotateY:function(){return oE},rotateZ:function(){return ok},scale:function(){return ox},set:function(){return op},str:function(){return oX},sub:function(){return o3},subtract:function(){return oQ},targetTo:function(){return oY},translate:function(){return ob},transpose:function(){return od}});var tj={};n.r(tj),n.d(tj,{frequency:function(){return gS},id:function(){return g_},name:function(){return gP},weight:function(){return gM}});var tA={};n.r(tA),n.d(tA,{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 tT={};n.r(tT),n.d(tT,{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 tC={};n.r(tC),n.d(tC,{AREA_CLASS_NAME:function(){return _s},Academy:function(){return wX},Bin:function(){return An},BinX:function(){return Ar},COMPONENT_CLASS_NAME:function(){return _a},Chart:function(){return Rg},ChartEvent:function(){return _Z},Classic:function(){return wH},ClassicDark:function(){return wq},Dark:function(){return wU},DiffY:function(){return Ap},DodgeX:function(){return Ao},ELEMENT_CLASS_NAME:function(){return _r},Filter:function(){return AB},FlexX:function(){return AI},Group:function(){return AS},GroupColor:function(){return Aj},GroupX:function(){return A_},GroupY:function(){return AP},Jitter:function(){return Al},JitterX:function(){return As},JitterY:function(){return Au},LABEL_CLASS_NAME:function(){return _l},LABEL_LAYER_CLASS_NAME:function(){return _n},Light:function(){return wG},LinearAxis:function(){return kW},MAIN_LAYER_CLASS_NAME:function(){return _e},MASK_CLASS_NAME:function(){return _u},MaybeDefaultX:function(){return x8},MaybeDefaultY:function(){return Ot},MaybeFunctionAttribute:function(){return Of},MaybeGradient:function(){return vj},MaybeIdentityX:function(){return xd},MaybeIdentityY:function(){return xh},MaybeKey:function(){return d1},MaybeSeries:function(){return vA},MaybeSize:function(){return bw},MaybeStackY:function(){return Rd},MaybeTitle:function(){return dQ},MaybeTooltip:function(){return dJ},MaybeTuple:function(){return b5},MaybeTupleX:function(){return xU},MaybeTupleY:function(){return xX},MaybeVisualPosition:function(){return b4},MaybeZeroPadding:function(){return b9},MaybeZeroX:function(){return ml},MaybeZeroY:function(){return bO},MaybeZeroY1:function(){return ma},MaybeZeroZ:function(){return Ry},NormalizeY:function(){return Ay},PLOT_CLASS_NAME:function(){return _o},Pack:function(){return AR},Runtime:function(){return Rp},Sample:function(){return AF},Select:function(){return Ax},SelectX:function(){return Aw},SelectY:function(){return Ak},Selection:function(){return pz},SortColor:function(){return AL},SortX:function(){return AC},SortY:function(){return AN},StackEnter:function(){return Ah},StackY:function(){return j$},SymmetryY:function(){return Af},VIEW_CLASS_NAME:function(){return _i},corelib:function(){return Tf},extend:function(){return Th},geolib:function(){return iw},graphlib:function(){return g3},plotlib:function(){return hE},register:function(){return Ru},render:function(){return IJ},renderToMountedElement:function(){return I0},select:function(){return pB},stdlib:function(){return Tp}});var tN={}.toString,tL=function(t,e){return tN.call(t)==="[object "+e+"]"},tI=function(t){return Array.isArray?Array.isArray(t):tL(t,"Array")},tR=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},tD=function(t,e){if(t){if(tI(t))for(var n,r=0,i=t.length;r<i&&!1!==e(t[r],r);r++);else if(tR(t)){for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}}},tF=function(t){return tL(t,"Function")},tB=Array.prototype;tB.splice,tB.indexOf,Array.prototype.splice,Object.prototype.hasOwnProperty;var tz=function(t){return tL(t,"Number")},tW=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return tD(t,function(n,r){tF(t)&&"prototype"===r||e.push(n)}),e},t$=function(t){if("object"!=typeof t||null===t||!tL(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},tG=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&&t$(a)?(t$(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):tI(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},tH=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tV=function(t,e){if(!tH(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 tU=function(t){return t};function tq(t){return null==t?0:tH(t)?t.length:Object.keys(t).length}var tY=function(t,e){return(tY=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 tX(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}tY(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var tK=function(){return(tK=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 tZ(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 tQ(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 tJ(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 t0(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 t1(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 t2(){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 t5(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 t3(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 t4(){this.map={}}!function(t,e){if(!tF(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 eJ||(eJ=document.createElement("canvas").getContext("2d")),eJ.font=[o,a,i,n+"px",r].join(" "),eJ.measureText(tL(t,"String")?t:"").width},function(t,e){return void 0===e&&(e={}),t2([t],tW(e)).join("")}),t4.prototype.has=function(t){return void 0!==this.map[t]},t4.prototype.get=function(t,e){var n=this.map[t];return void 0===n?e:n},t4.prototype.set=function(t,e){this.map[t]=e},t4.prototype.clear=function(){this.map={}},t4.prototype.delete=function(t){delete this.map[t]},t4.prototype.size=function(){return Object.keys(this.map).length};class t6{constructor(t){this.options=tG({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=tG({},this.options,t),this.rescale(t)}rescale(t){}}function t8(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}function t9(t,...e){return e.reduce((t,e)=>n=>t(e(n)),t)}function t7(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 et=n(254),ee=n.n(et);function en(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 er(t){let e=ee().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=en(a,o,e+1/3);return[255*l,255*en(a,o,e),255*en(a,o,e-1/3),i]}(r):null}let ei=(t,e)=>n=>t*(1-n)+e*n,eo=(t,e)=>{let n=er(t),r=er(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})`}},ea=(t,e)=>"number"==typeof t&&"number"==typeof e?ei(t,e):"string"==typeof t&&"string"==typeof e?eo(t,e):()=>t,el=(t,e)=>{let n=ei(t,e);return t=>Math.round(n(t))};function es(t){return null!=t&&!Number.isNaN(t)}let eu=Math.sqrt(50),ec=Math.sqrt(10),ef=Math.sqrt(2);function ep(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>=eu?10:o>=ec?5:o>=ef?2:1)*10**i:-(10**-i)/(o>=eu?10:o>=ec?5:o>=ef?2:1)}function eh(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>=eu?i*=10:o>=ec?i*=5:o>=ef&&(i*=2),e<t?-i:i}let ed=(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=ep(l,s,n))>0?r=ep(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=ep(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},ey=(t,e,n)=>{let r,i,[o,a]=t,[l,s]=e;return o<a?(r=t8(o,a),i=n(l,s)):(r=t8(a,o),i=n(s,l)),t9(i,r)},eg=(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]=t8(l[t],l[t+1]),o[t]=n(s[t],s[t+1]);return e=>{let n=t7(t,e,1,r)-1,a=i[n];return t9(o[n],a)(e)}},em=(t,e,n,r)=>(Math.min(t.length,e.length)>2?eg:ey)(t,e,r?el:n);class ev extends t6{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ei,tickCount:5}}map(t){return es(t)?this.output(t):this.options.unknown}invert(t){return es(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 ed}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]):tU}composeOutput(t,e){let{domain:n,range:r,round:i,interpolate:o}=this.options,a=em(n.map(t),r,o,i);this.output=t9(a,e,t)}composeInput(t,e,n){let{domain:r,range:i}=this.options,o=em(i,r.map(t),ei);this.input=t9(e,n,o)}}let eb=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&n>0)return[o];let l=ep(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 ex extends ev{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:ea,tickMethod:eb,tickCount:5}}chooseTransforms(){return[tU,tU]}clone(){return new ex(this.options)}}var eO=function(t){return null==t},ew=function(t){return eO(t)?"":t.toString()},eE=function(t){var e=ew(t);return e.charAt(0).toUpperCase()+e.substring(1)},ek=t=>t;function eM(t,e){t&&e_.hasOwnProperty(t.type)&&e_[t.type](t,e)}var eS={Feature:function(t,e){eM(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)eM(n[r].geometry,e)}},e_={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){eP(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eP(n[r],e,0)},Polygon:function(t,e){ej(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ej(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)eM(n[r],e)}};function eP(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 ej(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)eP(t[n],e,1);e.polygonEnd()}function eA(t,e){t&&eS.hasOwnProperty(t.type)?eS[t.type](t,e):eM(t,e)}class eT{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 eC=Math.PI,eN=eC/2,eL=eC/4,eI=2*eC,eR=180/eC,eD=eC/180,eF=Math.abs,eB=Math.atan,ez=Math.atan2,eW=Math.cos,e$=Math.ceil,eG=Math.exp,eH=Math.log,eV=Math.pow,eU=Math.sin,eq=Math.sign||function(t){return t>0?1:t<0?-1:0},eY=Math.sqrt,eX=Math.tan;function eK(t){return t>1?0:t<-1?eC:Math.acos(t)}function eZ(t){return t>1?eN:t<-1?-eN:Math.asin(t)}function eQ(){}var eJ,e0,e1,e2,e5,e3=new eT,e4=new eT,e6={point:eQ,lineStart:eQ,lineEnd:eQ,polygonStart:function(){e6.lineStart=e8,e6.lineEnd=nt},polygonEnd:function(){e6.lineStart=e6.lineEnd=e6.point=eQ,e3.add(eF(e4)),e4=new eT},result:function(){var t=e3/2;return e3=new eT,t}};function e8(){e6.point=e9}function e9(t,e){e6.point=e7,e0=e2=t,e1=e5=e}function e7(t,e){e4.add(e5*t-e2*e),e2=t,e5=e}function nt(){e7(e0,e1)}var ne,nn,nr,ni,no=1/0,na=1/0,nl=-1/0,ns=nl,nu={point:function(t,e){t<no&&(no=t),t>nl&&(nl=t),e<na&&(na=e),e>ns&&(ns=e)},lineStart:eQ,lineEnd:eQ,polygonStart:eQ,polygonEnd:eQ,result:function(){var t=[[no,na],[nl,ns]];return nl=ns=-(na=no=1/0),t}},nc=0,nf=0,np=0,nh=0,nd=0,ny=0,ng=0,nm=0,nv=0,nb={point:nx,lineStart:nO,lineEnd:nk,polygonStart:function(){nb.lineStart=nM,nb.lineEnd=nS},polygonEnd:function(){nb.point=nx,nb.lineStart=nO,nb.lineEnd=nk},result:function(){var t=nv?[ng/nv,nm/nv]:ny?[nh/ny,nd/ny]:np?[nc/np,nf/np]:[NaN,NaN];return nc=nf=np=nh=nd=ny=ng=nm=nv=0,t}};function nx(t,e){nc+=t,nf+=e,++np}function nO(){nb.point=nw}function nw(t,e){nb.point=nE,nx(nr=t,ni=e)}function nE(t,e){var n=t-nr,r=e-ni,i=eY(n*n+r*r);nh+=i*(nr+t)/2,nd+=i*(ni+e)/2,ny+=i,nx(nr=t,ni=e)}function nk(){nb.point=nx}function nM(){nb.point=n_}function nS(){nP(ne,nn)}function n_(t,e){nb.point=nP,nx(ne=nr=t,nn=ni=e)}function nP(t,e){var n=t-nr,r=e-ni,i=eY(n*n+r*r);nh+=i*(nr+t)/2,nd+=i*(ni+e)/2,ny+=i,ng+=(i=ni*t-nr*e)*(nr+t),nm+=i*(ni+e),nv+=3*i,nx(nr=t,ni=e)}function nj(t){this._context=t}nj.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,eI)}},result:eQ};var nA,nT,nC,nN,nL,nI=new eT,nR={point:eQ,lineStart:function(){nR.point=nD},lineEnd:function(){nA&&nF(nT,nC),nR.point=eQ},polygonStart:function(){nA=!0},polygonEnd:function(){nA=null},result:function(){var t=+nI;return nI=new eT,t}};function nD(t,e){nR.point=nF,nT=nN=t,nC=nL=e}function nF(t,e){nN-=t,nL-=e,nI.add(eY(nN*nN+nL*nL)),nN=t,nL=e}class nB{constructor(t){this._append=null==t?nz:function(t){let e=Math.floor(t);if(!(e>=0))throw RangeError(`invalid digits: ${t}`);if(e>15)return nz;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 nz(t){let e=1;this._+=t[0];for(let n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function nW(t,e){let n=3,r=4.5,i,o;function a(t){return t&&("function"==typeof r&&o.pointRadius(+r.apply(this,arguments)),eA(t,i(o))),o.result()}return a.area=function(t){return eA(t,i(e6)),e6.result()},a.measure=function(t){return eA(t,i(nR)),nR.result()},a.bounds=function(t){return eA(t,i(nu)),nu.result()},a.centroid=function(t){return eA(t,i(nb)),nb.result()},a.projection=function(e){return arguments.length?(i=null==e?(t=null,ek):(t=e).stream,a):t},a.context=function(t){return arguments.length?(o=null==t?(e=null,new nB(n)):new nj(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 nB(n)),a},a.projection(t).digits(n).context(e)}function n$(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 nG(t,e,n){var r=n$(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function nH(t,e,n){var r=n$(t,e-1e-6,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}var nV={}.toString,nU=function(t,e){return nV.call(t)==="[object "+e+"]"},nq=function(t){return Array.isArray?Array.isArray(t):nU(t,"Array")},nY=function(t){return"object"==typeof t&&null!==t},nX=function(t){if(!nY(t)||!nU(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},nK=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&&nX(a)?(nX(e[o])||(e[o]={}),r<i?t(e[o],a,r+1,i):e[o]=n[o]):nq(a)?(e[o]=[],e[o]=e[o].concat(a)):void 0!==a&&(e[o]=a)}}(t,e[r]);return t},nZ=function(t){var e=ew(t);return e.charAt(0).toLowerCase()+e.substring(1)};function nQ(t){return t}function nJ(t){return t.reduce((t,e)=>(n,...r)=>e(t(n,...r),...r),nQ)}function n0(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function n1(t=""){throw Error(t)}function n2(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 n5(t){return null!=t&&!Number.isNaN(t)}function n3(t,e){return n4(t,e)||{}}function n4(t,e){let n=Object.entries(t||{}).filter(([t])=>t.startsWith(e)).map(([t,n])=>[nZ(t.replace(e,"").trim()),n]).filter(([t])=>!!t);return 0===n.length?null:Object.fromEntries(n)}function n6(t,...e){return Object.fromEntries(Object.entries(t).filter(([t])=>e.every(e=>!t.startsWith(e))))}function n8(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 n9(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t&&!Array.isArray(t)}function n7(t){return null===t||!1===t}function rt(t,e,n={},r=!1){return n7(t)||Array.isArray(t)&&r?t:nK(n,n3(t,e))}function re(t,e={}){return n7(t)||Array.isArray(t)||!rn(t)?t:nK(e,t)}function rn(t){if(0===Object.keys(t).length)return!0;let{title:e,items:n}=t;return void 0!==e||void 0!==n}function rr(t,e){return"object"==typeof t?n3(t,e):t}function ri(t){return function(e,n){var r=eW(e),i=eW(n),o=t(r*i);return o===1/0?[2,0]:[o*i*eU(e),o*eU(n)]}}function ro(t){return function(e,n){var r=eY(e*e+n*n),i=t(r),o=eU(i);return[ez(e*o,r*eW(i)),eZ(r&&n*o/r)]}}function ra(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:eQ,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function rl(t,e){return 1e-6>eF(t[0]-e[0])&&1e-6>eF(t[1]-e[1])}function rs(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 ru(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(rl(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 rs(r,t,null,!0)),s.push(n.o=new rs(r,null,n,!1)),l.push(n=new rs(a,t,null,!1)),s.push(n.o=new rs(a,null,n,!0))}}),l.length){for(s.sort(e),rc(l),rc(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 rc(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 rf(t){return[ez(t[1],t[0]),eZ(t[2])]}function rp(t){var e=t[0],n=t[1],r=eW(n);return[r*eW(e),r*eU(e),eU(n)]}function rh(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function rd(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 ry(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rg(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function rm(t){var e=eY(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function rv(t){return eF(t[0])<=eC?t[0]:eq(t[0])*((eF(t[0])+eC)%eI-eC)}function rb(t){return Array.from(function*(t){for(let e of t)yield*e}(t))}function rx(t,e,n,r){return function(i){var o,a,l,s=e(i),u=ra(),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=rb(a);var t=function(t,e){var n=rv(e),r=e[1],i=eU(r),o=[eU(n),-eW(n),0],a=0,l=0,s=new eT;1===i?r=eN+1e-6:-1===i&&(r=-eN-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=rv(h),y=h[1]/2+eL,g=eU(y),v=eW(y),b=0;b<p;++b,d=O,g=E,v=k,h=x){var x=f[b],O=rv(x),w=x[1]/2+eL,E=eU(w),k=eW(w),M=O-d,S=M>=0?1:-1,_=S*M,P=_>eC,j=g*E;if(s.add(ez(j*S*eU(_),v*k+j*eW(_))),a+=P?M+S*eI:M,P^d>=n^O>=n){var A=rd(rp(h),rp(x));rm(A);var T=rd(o,A);rm(T);var C=(P^M>=0?-1:1)*eZ(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),ru(a,rw,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(rO))}}return p}}function rO(t){return t.length>1}function rw(t,e){return((t=t.x)[0]<0?t[1]-eN-1e-6:eN-t[1])-((e=e.x)[0]<0?e[1]-eN-1e-6:eN-e[1])}var rE=rx(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?eC:-eC,y=eF(o-n);1e-6>eF(y-eC)?(t.point(n,r=(r+a)/2>0?eN:-eN),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(d,r),t.point(o,r),e=0):i!==d&&y>=eC&&(1e-6>eF(n-i)&&(n-=1e-6*i),1e-6>eF(o-d)&&(o-=1e-6*d),l=n,s=r,u=o,c=a,r=eF(h=eU(l-u))>1e-6?eB((eU(s)*(p=eW(c))*eU(u)-eU(c)*(f=eW(s))*eU(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*eN,r.point(-eC,i),r.point(0,i),r.point(eC,i),r.point(eC,0),r.point(eC,-i),r.point(0,-i),r.point(-eC,-i),r.point(-eC,0),r.point(-eC,i);else if(eF(t[0]-e[0])>1e-6){var o=t[0]<e[0]?eC:-eC;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])},[-eC,-eN]);function rk(t,e){e=rp(e),e[0]-=t,rm(e);var n=eK(-e[1]);return((0>-e[2]?-n:n)+eI-1e-6)%eI}function rM(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>eF(r[0]-t)?i>0?0:3:1e-6>eF(r[0]-n)?i>0?2:1:1e-6>eF(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=ra(),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=rb(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ru(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 rS(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 r_(t,e){return eF(t)>eC&&(t-=Math.round(t/eI)*eI),[t,e]}function rP(t,e,n){return(t%=eI)?e||n?rS(rA(t),rT(e,n)):rA(t):e||n?rT(e,n):r_}function rj(t){return function(e,n){return eF(e+=t)>eC&&(e-=Math.round(e/eI)*eI),[e,n]}}function rA(t){var e=rj(t);return e.invert=rj(-t),e}function rT(t,e){var n=eW(t),r=eU(t),i=eW(e),o=eU(e);function a(t,e){var a=eW(e),l=eW(t)*a,s=eU(t)*a,u=eU(e),c=u*n+l*r;return[ez(s*i-c*o,l*n-u*r),eZ(c*i+s*o)]}return a.invert=function(t,e){var a=eW(e),l=eW(t)*a,s=eU(t)*a,u=eU(e),c=u*i-s*o;return[ez(s*i+u*o,l*n+c*r),eZ(c*n-l*r)]},a}function rC(t){return function(e){var n=new rN;for(var r in t)n[r]=t[r];return n.stream=e,n}}function rN(){}function rL(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),eA(n,t.stream(nu)),e(nu.result()),null!=r&&t.clipExtent(r),t}function rI(t,e,n){return rL(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 rR(t,e,n){return rI(t,[[0,0],e],n)}function rD(t,e,n){return rL(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 rF(t,e,n){return rL(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)}r_.invert=r_,rN.prototype={constructor:rN,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 rB=eW(30*eD);function rz(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=eY(O*O+w*w+E*E),M=eZ(E/=k),S=1e-6>eF(eF(E)-1)||1e-6>eF(o-f)?(o+f)/2:ez(w,O),_=t(S,M),P=_[0],j=_[1],A=P-r,T=j-i,C=b*A-v*T;(C*C/x>e||eF((v*A+b*T)/x-.5)>.3||a*p+l*h+s*d<rB)&&(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=rp([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,rC({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}))}var rW=rC({point:function(t,e){this.stream.point(t*eD,e*eD)}});function r$(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=eW(o),s=eU(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 rG(t){return rH(function(){return t})()}function rH(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=rE,M=null,S=ek,_=.5;function P(t){return s(t[0]*eD,t[1]*eD)}function j(t){return(t=s.invert(t[0],t[1]))&&[t[0]*eR,t[1]*eR]}function A(){var t=r$(f,0,0,O,w,x).apply(null,e(d,y)),r=r$(f,p-t[0],h-t[1],O,w,x);return n=rP(g,v,b),l=rS(e,r),s=rS(n,l),a=rz(l,_),T()}function T(){return u=c=null,P}return P.stream=function(t){var e;return u&&c===t?u:u=rW((e=n,rC({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=eW(t),n=2*eD,r=e>0,i=eF(e)>1e-6;function o(t,n){return eW(t)*eW(n)>e}function a(t,n,r){var i=rp(t),o=rp(n),a=[1,0,0],l=rd(i,o),s=rh(l,l),u=l[0],c=s-u*u;if(!c)return!r&&t;var f=rd(a,l),p=rg(a,e*s/c);ry(p,rg(l,-e*u/c));var h=rh(p,f),d=rh(f,f),y=h*h-d*(rh(p,p)-1);if(!(y<0)){var g=eY(y),v=rg(f,(-h-g)/d);if(ry(v,p),v=rf(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>eF(k-eC);if(!M&&E<w&&(b=w,w=E,E=b),M||k<1e-6?M?w+E>0^v[1]<(1e-6>eF(v[0]-x)?w:E):w<=v[1]&&v[1]<=E:k>eC^(x<=v[0]&&v[0]<=O)){var S=rg(f,(-h+g)/d);return ry(S,p),[v,rf(S)]}}}function l(e,n){var i=r?t:eC-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return rx(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?eC:-eC),p):0;!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(d=a(e,y))||rl(e,d)||rl(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&&rl(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=eW(e),l=eU(e),s=r*n;null==i?(i=e+r*eI,o=e-s/2):(i=rk(a,i),o=rk(a,o),(r>0?i<o:i>o)&&(i+=r*eI));for(var u,c=i;r>0?c>o:c<o;c-=s)u=rf([a,-l*eW(c),-l*eU(c)]),t.point(u[0],u[1])}}(o,t,n,i,e,r)},r?[0,-t]:[-eC,t-eC])}(E=t*eD):(E=null,rE),T()):E*eR},P.clipExtent=function(t){return arguments.length?(S=null==t?(M=r=i=o=null,ek):rM(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*eD,y=t[1]%360*eD,A()):[d*eR,y*eR]},P.rotate=function(t){return arguments.length?(g=t[0]%360*eD,v=t[1]%360*eD,b=t.length>2?t[2]%360*eD:0,A()):[g*eR,v*eR,b*eR]},P.angle=function(t){return arguments.length?(x=t%360*eD,A()):x*eR},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=rz(l,_=t*t),T()):eY(_)},P.fitExtent=function(t,e){return rI(P,t,e)},P.fitSize=function(t,e){return rR(P,t,e)},P.fitWidth=function(t,e){return rD(P,t,e)},P.fitHeight=function(t,e){return rF(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&j,A()}}var rV=ri(function(t){return(t=eK(t))&&t/eU(t)});function rU(){return rG(rV).scale(79.4188).clipAngle(179.999)}function rq(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 rY(){return rG(rq).scale(175.295)}function rX(t,e){return[t,e]}function rK(){return rG(rX).scale(152.63)}function rZ(t){var e=0,n=eC/3,r=rH(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*eD,n=t[1]*eD):[e*eR,n*eR]},i}function rQ(t,e){return[t,eH(eX((eN+e)/2))]}function rJ(){return r0(rQ).scale(961/eI)}function r0(t){var e,n,r,i=rG(t),o=i.center,a=i.scale,l=i.translate,s=i.clipExtent,u=null;function c(){var o=eC*a(),l=i((function(t){function e(e){return e=t(e[0]*eD,e[1]*eD),e[0]*=eR,e[1]*=eR,e}return t=rP(t[0]*eD,t[1]*eD,t.length>2?t[2]*eD:0),e.invert=function(e){return e=t.invert(e[0]*eD,e[1]*eD),e[0]*=eR,e[1]*=eR,e},e})(i.rotate()).invert([0,0]));return s(null==u?[[l[0]-o,l[1]-o],[l[0]+o,l[1]+o]]:t===rQ?[[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 r1(t){return eX((eN+t)/2)}function r2(t,e){var n=eW(t),r=t===e?eU(t):eH(n/eW(e))/eH(r1(e)/r1(t)),i=n*eV(r1(t),r)/r;if(!r)return rQ;function o(t,e){i>0?e<-eN+1e-6&&(e=-eN+1e-6):e>eN-1e-6&&(e=eN-1e-6);var n=i/eV(r1(e),r);return[n*eU(r*t),i-n*eW(r*t)]}return o.invert=function(t,e){var n=i-e,o=eq(r)*eY(t*t+n*n),a=ez(t,eF(n))*eq(n);return n*r<0&&(a-=eC*eq(t)*eq(n)),[a/r,2*eB(eV(i/o,1/r))-eN]},o}function r5(){return rZ(r2).scale(109.5).parallels([30,30])}function r3(t,e){return[eW(e)*eU(t),eU(e)]}function r4(){return rG(r3).scale(249.5).clipAngle(90.000001)}function r6(){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=rC({point:function(t,e){var n=x([t,e]);this.stream.point(n[0],n[1])}}),v=ek;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,ek):rM(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=eU(p=n%360*eD),t=eW(p),b()):p*eR},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 rI(x,t,e)},x.fitSize=function(t,e){return rR(x,t,e)},x.fitWidth=function(t,e){return rD(x,t,e)},x.fitHeight=function(t,e){return rF(x,t,e)},x}function r8(t,e){var n=eW(t),r=t===e?eU(t):(n-eW(e))/(e-t),i=n/r+t;if(1e-6>eF(r))return rX;function o(t,e){var n=i-e,o=r*t;return[n*eU(o),i-n*eW(o)]}return o.invert=function(t,e){var n=i-e,o=ez(t,eF(n))*eq(n);return n*r<0&&(o-=eC*eq(t)*eq(n)),[o/r,i-eq(r)*eY(t*t+n*n)]},o}function r9(){return rZ(r8).scale(131.154).center([0,13.9389])}rV.invert=ro(function(t){return t}),rq.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(eF(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]},rX.invert=rX,rQ.invert=function(t,e){return[t,2*eB(eG(e))-eN]},r3.invert=ro(eZ);var r7=ri(function(t){return eY(2/(1+t))});function it(){return rG(r7).scale(124.75).clipAngle(179.999)}function ie(t,e){return[eH(eX((eN+e)/2)),-t]}function ir(){var t=r0(ie),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)}r7.invert=ro(function(t){return 2*eZ(t/2)}),ie.invert=function(t,e){return[-e,2*eB(eG(t))-eN]};var ii=eY(3)/2;function io(t,e){var n=eZ(ii*eU(e)),r=n*n,i=r*r*r;return[t*eW(n)/(ii*(1.340264+-.24331799999999998*r+i*(.0062510000000000005+.034164*r))),n*(1.340264+-.081106*r+i*(893e-6+.003796*r))]}function ia(){return rG(io).scale(177.158)}function il(t,e){var n=eW(e),r=eW(t)*n;return[n*eU(t)/r,eU(e)/r]}function is(){return rG(il).scale(144.049).clipAngle(60)}function iu(t,e){var n=eU(t),r=(n+eU(e))/2;if(1e-6>eF(r)){var i=eW(t);function o(t,e){return[t*i,eU(e)/i]}return o.invert=function(t,e){return[t/i,eZ(e*i)]},o}var a=1+n*(2*r-n),l=eY(a)/r;function s(t,e){var n=eY(a-2*r*eU(e))/r;return[n*eU(t*=r),l-n*eW(t)]}return s.invert=function(t,e){var n=l-e,i=ez(t,eF(n))*eq(n);return n*r<0&&(i-=eC*eq(t)*eq(n)),[i/r,eZ((a-(t*t+n*n)*r*r)/(2*r))]},s}function ic(){return rZ(iu).scale(155.424).center([0,33.6442])}function ip(t,e){var n=eW(e),r=1+eW(t)*n;return[n*eU(t)/r,eU(e)/r]}function ih(){return rG(ip).scale(250).clipAngle(142)}function id(){return ic().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function iy(){var t,e,n,r,i,o,a=id(),l=ic().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=ic().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 rI(c,t,e)},c.fitSize=function(t,e){return rR(c,t,e)},c.fitWidth=function(t,e){return rD(c,t,e)},c.fitHeight=function(t,e){return rF(c,t,e)},c.scale(1070)}io.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>eF(n)));++l);return[ii*t*(1.340264+-.24331799999999998*o+a*(.0062510000000000005+.034164*o))/eW(i),eZ(eU(i)/ii)]},il.invert=ro(eB),ip.invert=ro(function(t){return 2*eB(t)});var ig=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 im(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 n$(e$(r/d)*d,n,d).map(c).concat(n$(e$(l/y)*y,a,y).map(f)).concat(n$(e$(e/p)*p,t,p).filter(function(t){return eF(t%d)>1e-6}).map(s)).concat(n$(e$(o/h)*h,i,h).filter(function(t){return eF(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=nG(o,i,90),u=nH(e,t,g),c=nG(l,a,90),f=nH(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 iv(t){return"geoPath"===t.type}let ib=()=>t=>{let e,{children:n,coordinate:r={}}=t;if(!Array.isArray(n))return[];let{type:i="equalEarth"}=r,o=ig(r,["type"]),a=function(t){if("function"==typeof t)return t;let e=t_[`geo${eE(t)}`];if(!e)throw Error(`Unknown coordinate: ${t}`);return e}(i),l=n.map(im);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(iv);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]]=nW(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=nW(s);let g=new ex({domain:[t,t+r]}),v=new ex({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=>iv(t)?function(t){let{style:n,tooltip:r={}}=t;return Object.assign(Object.assign({},t),{type:"path",tooltip:re(r,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},n),{d:t=>e(t)||[]})})}(t):t)})]};ib.props={};var ix=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 iO=()=>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"},ix(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 iw(){return{"composition.geoView":ib,"composition.geoPath":iO}}function iE(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 ik(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 iM(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n<e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);return r}function iS(t,e){let n,r=-1,i=-1;if(void 0===e)for(let e of t)++i,null!=e&&(n>e||void 0===n&&e>=e)&&(n=e,r=i);else for(let o of t)null!=(o=e(o,++i,t))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function i_(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function iP(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=iA(r[t],r[n]);if(e)return e}})):(n=t.map(n),i.sort((t,e)=>iA(n[t],n[e]))),r=t,Array.from(i,t=>r[t])}return t.sort(ij(n))}function ij(t=i_){if(t===i_)return iA;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 iA(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:+(t>e))}function iT(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=void 0===i?iA:ij(i);r>n;){if(r-n>600){let o=r-n+1,a=e-n+1,l=Math.log(o),s=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*s*(o-s)/o)*(a-o/2<0?-1:1),c=Math.max(n,Math.floor(e-a*s/o+u)),f=Math.min(r,Math.floor(e+(o-a)*s/o+u));iT(t,e,c,f,i)}let o=t[e],a=n,l=r;for(iC(t,n,e),i(t[r],o)>0&&iC(t,n,r);a<l;){for(iC(t,a,l),++a,--l;0>i(t[a],o);)++a;for(;i(t[l],o)>0;)--l}0===i(t[n],o)?iC(t,n,l):iC(t,++l,r),l<=e&&(n=l+1),e<=l&&(r=l-1)}return t}function iC(t,e,n){let r=t[e];t[e]=t[n],t[n]=r}function iN(t){return null===t?NaN:+t}function iL(t,e,n){if(!(!(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e*=1)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r*=1)>=r&&(yield r)}}(t,n))).length)||isNaN(e*=1))){if(e<=0||r<2)return iE(t);if(e>=1)return ik(t);var r,i=(r-1)*e,o=Math.floor(i),a=ik(iT(t,o).subarray(0,o+1));return a+(iE(t.subarray(o+1))-a)*(i-o)}}iO.props={};class iI extends Map{constructor(t,e=iD){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(iR(this,t))}has(t){return super.has(iR(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 iR({_intern:t,_key:e},n){let r=e(n);return t.has(r)?t.get(r):n}function iD(t){return null!==t&&"object"==typeof t?t.valueOf():t}function iF(t){return t}function iB(t,...e){return iG(t,iF,iF,e)}function iz(t,...e){return iG(t,Array.from,iF,e)}function iW(t,e,...n){return iG(t,iF,e,n)}function i$(t,e,...n){return iG(t,Array.from,e,n)}function iG(t,e,n,r){return function t(i,o){if(o>=r.length)return n(i);let a=new iI,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)}var iH=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 iV(t,e){return iE(t,t=>e[t])}function iU(t,e){return ik(t,t=>e[t])}function iq(t,e){let n=2.5*iY(t,e)-1.5*iK(t,e);return iE(t,t=>e[t]>=n?e[t]:NaN)}function iY(t,e){return iL(t,.25,t=>e[t])}function iX(t,e){return iL(t,.5,t=>e[t])}function iK(t,e){return iL(t,.75,t=>e[t])}function iZ(t,e){let n=2.5*iK(t,e)-1.5*iY(t,e);return ik(t,t=>e[t]<=n?e[t]:NaN)}function iQ(){return(t,e)=>{let{encode:n}=e,{y:r,x:i}=n,{value:o}=r,{value:a}=i;return[Array.from(iB(t,t=>a[+t]).values()).flatMap(t=>{let e=iq(t,o),n=iZ(t,o);return t.filter(t=>o[t]<e||o[t]>n)}),e]}}let iJ=t=>{let{data:e,encode:n,style:r={},tooltip:i={},transform:o,animate:a}=t,l=iH(t,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,u=iH(r,["point"]),{y:c}=n,f={y:c,y1:c,y2:c,y3:c,y4:c},p={y1:iY,y2:iX,y3:iK},h=rt(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),d=rt(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!s)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iV},p),{y4:iU})],encode:Object.assign(Object.assign({},n),f),style:u,tooltip:h},l);let y=n3(u,"box"),g=n3(u,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:iq},p),{y4:iZ})],encode:Object.assign(Object.assign({},n),f),style:y,tooltip:h,animate:rr(a,"box")},l),{type:"point",data:e,transform:[{type:iQ}],encode:n,style:Object.assign({},g),tooltip:d,animate:rr(a,"point")}]};iJ.props={};var i0=function(t){return nU(t,"Number")},i1=n(420),i2="undefined"!=typeof Float32Array?Float32Array:Array;function i5(){var t=new i2(3);return i2!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function i3(t){var e=new i2(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function i4(t){return Math.hypot(t[0],t[1],t[2])}function i6(t,e,n){var r=new i2(3);return r[0]=t,r[1]=e,r[2]=n,r}function i8(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i9(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function i7(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function ot(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function oe(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function on(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 or(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function oi(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 oo(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 oa(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 ol=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])};function os(){var t=new i2(16);return i2!=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 ou(t){var e=new i2(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 oc(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 of(t,e,n,r,i,o,a,l,s,u,c,f,p,h,d,y){var g=new i2(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 op(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 oh(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 od(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 oy(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 og(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 om(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 ov(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 ob(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 ox(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 oO(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 ow(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 oE(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 ok(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 oM(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 oS(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 o_(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 oP(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 oj(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 oA(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 oT(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 oC(t,e){var n=new i2(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),oT(t,e,n),t}function oN(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function oL(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 oI(t,e){var n=new i2(3);oL(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 oR(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 oD(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 oF(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 oB(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 oz(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}i5();var oW=oz;function o$(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 oG(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 oH(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 oV=oH;function oU(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 oq(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)?oh(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 oY(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 oX(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 oK(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 oZ(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 oQ(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 oJ(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 o0(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 o1(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 o2(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 o5=ov,o3=oQ;function o4(){var t=new i2(9);return i2!=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 o6(){var t=new i2(4);return i2!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function o8(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 o9(){var t=new i2(4);return i2!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function o7(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 at(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 ae(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 an(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}o6();var ar=function(t,e,n,r){var i=new i2(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ai=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ao=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};i5(),i6(1,0,0),i6(0,1,0),o9(),o9(),o4(),hF=new i2(2),i2!=Float32Array&&(hF[0]=0,hF[1]=0);var aa={}.toString,al=function(t,e){return aa.call(t)==="[object "+e+"]"},as=function(t){return al(t,"Number")};function au(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ac=function(t){return null==t},af=function(t){return al(t,"String")},ap=function(t,e,n){return t<e?e:t>n?n:t},ah={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ad(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return ah[e]===t.length-1&&"achlmqstvz".includes(e)})}function ay(t){return ad(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function ag(t){return ay(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var am={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function av(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ah[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,ah[n]))),ah[n]););}function ab(t){return t>=48&&t<=57}function ax(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 aO=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 aw(t){if(ag(t))return[].concat(t);for(var e=function(t){if(ay(t))return[].concat(t);var e=function(t){if(ad(t))return[].concat(t);var e=new aO(t);for(ax(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=ah[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,ax(t),t.data=[],!o)return av(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)),!ab(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&&ab(e)){t.err="[path-util]: Invalid path value at index "+i+', "'+r[i]+'" illegal number';return}for(;o<n&&ab(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;ab(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&&ab(r.charCodeAt(o)))for(;o<n&&ab(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),ax(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,ax(t))}if(t.index>=t.max||!((a=n.charCodeAt(t.index))>=48&&a<=57||43===a||45===a||46===a))break}av(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=tK({},am),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 aE(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}function ak(t,e,n,r,i){var o=au([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=aE([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 aM(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 aS(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+=au(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 a_(t,e,n){for(var r,i,o,a,l,s,u,c,f,p=aw(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=ak(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 ak(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=aM({x:1,y:0},_),j=aM(_,{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+=au(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=aS(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+=au(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=ak((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 aP=function(t){return Array.isArray?Array.isArray(t):al(t,"Array")},aj=function(t){if(aP(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},aA=function(t){if(aP(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},aT=function(t,e){return(t%e+e)%e};function aC(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}var aN=function(t,e,n,r){return t5(t5([],aE([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function aL(t,e){if(void 0===e&&(e=!1),ag(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=aw(t),a=tK({},am),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=aC(g,v,-k)).x,v=f.y,O=(f=aC(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?aC(M[U-1],M[U],k).y:aC(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(aN(y,g,h,d));case"Z":if(y===v&&g===b)return["C",y,g,v,b,v,b];return["C"].concat(aN(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 aI(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?aS(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=aE(i,o,r),u=aE(o,a,r),c=aE(a,l,r),f=aE(s,u,r),p=aE(u,c,r),h=aE(f,p,r),[["C"].concat(s,f,h),["C"].concat(p,c,l)]):[t,t]:[t],{s:t,ss:d,l:g}})}function aR(t){var e,n,r;return e=0,n=0,r=0,aL(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 aD=function(t){return al(t,"Boolean")},aF=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e},aB=function(t){return void 0===t};function az(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function aW(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function a$(){}var aG="\\s*([+-]?\\d+)\\s*",aH="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",aV="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",aU=/^#([0-9a-f]{3,8})$/,aq=RegExp("^rgb\\("+[aG,aG,aG]+"\\)$"),aY=RegExp("^rgb\\("+[aV,aV,aV]+"\\)$"),aX=RegExp("^rgba\\("+[aG,aG,aG,aH]+"\\)$"),aK=RegExp("^rgba\\("+[aV,aV,aV,aH]+"\\)$"),aZ=RegExp("^hsl\\("+[aH,aV,aV]+"\\)$"),aQ=RegExp("^hsla\\("+[aH,aV,aV,aH]+"\\)$"),aJ={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 a0(){return this.rgb().formatHex()}function a1(){return this.rgb().formatRgb()}function a2(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=aU.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?a5(e):3===n?new a4(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?a3(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?a3(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=aq.exec(t))?new a4(e[1],e[2],e[3],1):(e=aY.exec(t))?new a4(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=aX.exec(t))?a3(e[1],e[2],e[3],e[4]):(e=aK.exec(t))?a3(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=aZ.exec(t))?a7(e[1],e[2]/100,e[3]/100,1):(e=aQ.exec(t))?a7(e[1],e[2]/100,e[3]/100,e[4]):aJ.hasOwnProperty(t)?a5(aJ[t]):"transparent"===t?new a4(NaN,NaN,NaN,0):null}function a5(t){return new a4(t>>16&255,t>>8&255,255&t,1)}function a3(t,e,n,r){return r<=0&&(t=e=n=NaN),new a4(t,e,n,r)}function a4(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function a6(){return"#"+a9(this.r)+a9(this.g)+a9(this.b)}function a8(){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 a9(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function a7(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new le(t,e,n,r)}function lt(t){if(t instanceof le)return new le(t.h,t.s,t.l,t.opacity);if(t instanceof a$||(t=a2(t)),!t)return new le;if(t instanceof le)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 le(a,l,s,t.opacity)}function le(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ln(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 lr(t,e,n){return void 0===n&&(n=1e-5),Math.abs(t-e)<n}function li(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function lo(t,e){var n=Math.min.apply(Math,t5([],t1(t),!1)),r=Math.min.apply(Math,t5([],t1(e),!1));return{x:n,y:r,width:Math.max.apply(Math,t5([],t1(t),!1))-n,height:Math.max.apply(Math,t5([],t1(e),!1))-r}}function la(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,t5([],t1(t.concat([h])),!1)),i.apply(void 0,t5([],t1(e.concat([h])),!1))],y=li(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,t5([],t1(t.concat([v])),!1)),i.apply(void 0,t5([],t1(e.concat([v])),!1))],y=li(s[0],s[1],d[0],d[1]);if(v>=0&&y<l)a=v,l=y;else{var x=[i.apply(void 0,t5([],t1(t.concat([b])),!1)),i.apply(void 0,t5([],t1(e.concat([b])),!1))],O=li(s[0],s[1],x[0],x[1]);b<=1&&O<l?(a=b,l=O):f*=.5}}return{x:i.apply(void 0,t5([],t1(t.concat([a])),!1)),y:i.apply(void 0,t5([],t1(e.concat([a])),!1))}}az(a$,a2,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:a0,formatHex:a0,formatHsl:function(){return lt(this).formatHsl()},formatRgb:a1,toString:a1}),az(a4,function(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof a$||(i=a2(i)),i)?new a4((i=i.rgb()).r,i.g,i.b,i.opacity):new a4:new a4(t,e,n,null==r?1:r)},aW(a$,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new a4(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new a4(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:a6,formatHex:a6,formatRgb:a8,toString:a8})),az(le,function(t,e,n,r){return 1==arguments.length?lt(t):new le(t,e,n,null==r?1:r)},aW(a$,{brighter:function(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new le(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new le(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 a4(ln(t>=240?t-240:t+120,i,r),ln(t,i,r),ln(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 ll(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function ls(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 lu(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(lr(l,0))!lr(s,0)&&(i=-u/s)>=0&&i<=1&&c.push(i);else{var f=s*s-4*l*u;lr(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 lc(t,e,n,r,i,o,a,l,s,u,c){var f=la([t,n,i,a],[e,r,o,l],s,u,ls,c);return li(f.x,f.y,s,u)}function lf(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function lp(t,e,n){var r=t+n-2*e;if(lr(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 lh={exports:{}};lh.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 ld=lh.exports;(hB=dt||(dt={})).GROUP="g",hB.CIRCLE="circle",hB.ELLIPSE="ellipse",hB.IMAGE="image",hB.RECT="rect",hB.LINE="line",hB.POLYLINE="polyline",hB.POLYGON="polygon",hB.TEXT="text",hB.PATH="path",hB.HTML="html",hB.MESH="mesh",(hz=de||(de={}))[hz.ZERO=0]="ZERO",hz[hz.NEGATIVE_ONE=1]="NEGATIVE_ONE";var ly=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}(),lg=function(){function t(t){this.clipSpaceNearZ=de.NEGATIVE_ONE,this.plugins=[],this.config=tK({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 lm(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function lv(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function lb(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function lx(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function lO(t){return void 0===t?0:t>360||t<-360?t%360:t}function lw(t,e,n){return(void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length)?i3(t):as(t)?i6(t,e,n):i6(t[0],t[1]||e,t[2]||n)}function lE(t){return Math.PI/180*t}function lk(t){return 180/Math.PI*t}function lM(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=t1(oL(i5(),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 lS(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=lk(Math.atan2(n,e));return[t[6],t[7],o,a,l]}var l_=os(),lP=os(),lj=o6(),lA=[i5(),i5(),i5()],lT=i5();function lC(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 lN=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){lm(this.center,t),lm(this.halfExtents,e),lv(this.min,this.center,this.halfExtents),lb(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(t,e){lb(this.center,e,t),lx(this.center,this.center,.5),lv(this.halfExtents,e,t),lx(this.halfExtents,this.halfExtents,.5),lm(this.min,t),lm(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],lv(this.min,n,r),lb(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 lm([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 lm([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}(),lL=function(){function t(t,e){this.distance=t||0,this.normal=e||i6(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 or(t,this.normal)-this.distance},t.prototype.normalize=function(){var t=1/i4(this.normal);oe(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&&oi(n,t,e,i),o},t}();(hW=dn||(dn={}))[hW.OUTSIDE=0xffffffff]="OUTSIDE",hW[hW.INSIDE=0]="INSIDE",hW[hW.INDETERMINATE=0x7fffffff]="INDETERMINATE";var lI=function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new lL)}return t.prototype.extractFromVPMatrix=function(t){var e=t1(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];i9(this.planes[0].normal,o-n,u-a,h-c),this.planes[0].distance=v-d,i9(this.planes[1].normal,o+n,u+a,h+c),this.planes[1].distance=v+d,i9(this.planes[2].normal,o+r,u+l,h+f),this.planes[2].distance=v+y,i9(this.planes[3].normal,o-r,u-l,h-f),this.planes[3].distance=v-y,i9(this.planes[4].normal,o-i,u-s,h-p),this.planes[4].distance=v-g,i9(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}(),lR=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}(),lD=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}(),lF="Method not implemented.",lB="Use document.documentElement instead.";(h$=dr||(dr={}))[h$.ORBITING=0]="ORBITING",h$[h$.EXPLORING=1]="EXPLORING",h$[h$.TRACKING=2]="TRACKING",(hG=di||(di={}))[hG.DEFAULT=0]="DEFAULT",hG[hG.ROTATIONAL=1]="ROTATIONAL",hG[hG.TRANSLATIONAL=2]="TRANSLATIONAL",hG[hG.CINEMATIC=3]="CINEMATIC",(hH=da||(da={}))[hH.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",hH[hH.PERSPECTIVE=1]="PERSPECTIVE";var lz={UPDATED:"updated"},lW=function(){function t(){this.clipSpaceNearZ=de.NEGATIVE_ONE,this.eventEmitter=new i1,this.matrix=os(),this.right=i6(1,0,0),this.up=i6(0,1,0),this.forward=i6(0,0,1),this.position=i6(0,0,1),this.focalPoint=i6(0,0,0),this.distanceVector=i6(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=os(),this.projectionMatrixInverse=os(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=dr.EXPLORING,this.trackingMode=di.DEFAULT,this.projectionMode=da.PERSPECTIVE,this.frustum=new lI,this.orthoMatrix=os()}return t.prototype.isOrtho=function(){return this.projectionMode===da.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===dr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===dr.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!==dr.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 oy(os(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(t,e){var n=oM(os(),[t,e,0]);this.jitteredProjectionMatrix=ov(os(),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===da.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===da.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===da.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===da.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===da.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===da.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=i6(a.x-r,a.y-i,0),s=or(l,this.right)/i4(this.right),u=or(l,this.up)/i4(this.up);return this.pan(-s,-u),this},t.prototype.setPerspective=function(t,e,n,r){this.projectionMode=da.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(lE(.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===de.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,ox(this.projectionMatrix,this.projectionMatrix,i6(1,-1,1)),oy(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(t,e,n,r,i,o){this.projectionMode=da.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===de.NEGATIVE_ONE?oV(this.projectionMatrix,f,p,d,h,i,o):oU(this.projectionMatrix,f,p,d,h,i,o),ox(this.projectionMatrix,this.projectionMatrix,i6(1,-1,1)),oy(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=lw(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=i6(0,1,0);if(this.focalPoint=lw(t,e,n),this.trackingMode===di.CINEMATIC){var i=ot(i5(),this.focalPoint,this.position);t=i[0],e=i[1],n=i[2];var o=lk(Math.asin(e/i4(i))),a=90+lk(Math.atan2(n,t)),l=os();oE(l,l,lE(a)),ow(l,l,lE(o)),r=oo(i5(),[0,1,0],l)}return oy(this.matrix,oq(os(),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=i5();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=lO(t),this.computeMatrix(),this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(t){return this.elevation=lO(t),this.computeMatrix(),this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(t){return this.roll=lO(t),this.computeMatrix(),this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.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=o7(o9(),[0,0,1],lE(this.roll));oh(this.matrix);var e=o7(o9(),[1,0,0],lE((this.rotateWorld&&this.type!==dr.TRACKING||this.type===dr.TRACKING?1:-1)*this.elevation)),n=o7(o9(),[0,1,0],lE((this.rotateWorld&&this.type!==dr.TRACKING||this.type===dr.TRACKING?1:-1)*this.azimuth)),r=at(o9(),n,e);r=at(o9(),r,t);var i=oF(os(),r);this.type===dr.ORBITING||this.type===dr.EXPLORING?(ob(this.matrix,this.matrix,this.focalPoint),ov(this.matrix,this.matrix,i),ob(this.matrix,this.matrix,[0,0,this.distance])):this.type===dr.TRACKING&&(ob(this.matrix,this.matrix,this.position),ov(this.matrix,this.matrix,i))},t.prototype._setPosition=function(t,e,n){this.position=lw(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(){i8(this.right,lw(o8(o6(),[1,0,0,0],this.matrix))),i8(this.up,lw(o8(o6(),[0,1,0,0],this.matrix))),i8(this.forward,lw(o8(o6(),[0,0,1,0],this.matrix))),on(this.right,this.right),on(this.up,this.up),on(this.forward,this.forward)},t.prototype._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=i4(this.distanceVector);if(0===r){this.elevation=0,this.azimuth=0;return}this.type===dr.TRACKING||this.rotateWorld?(this.elevation=lk(Math.asin(e/r)),this.azimuth=lk(Math.atan2(-t,-n))):(this.elevation=-lk(Math.asin(e/r)),this.azimuth=-lk(Math.atan2(-t,-n)))},t.prototype._getPosition=function(){i8(this.position,lw(o8(o6(),[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=o4(),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],i7(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=ot(i5(),this.focalPoint,this.position),this.distance=i4(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===da.ORTHOGRAPHIC){var t=this.position,e=o7(o9(),[0,0,1],-this.roll*Math.PI/180);oD(this.orthoMatrix,e,i6((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),i6(this.zoom,this.zoom,1),t)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var t=this.getViewTransform(),e=ov(os(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(e),this.eventEmitter.emit(lz.UPDATED)}},t.prototype.rotate=function(t,e,n){throw Error(lF)},t.prototype.pan=function(t,e){throw Error(lF)},t.prototype.dolly=function(t){throw Error(lF)},t.prototype.createLandmark=function(t,e){throw Error(lF)},t.prototype.gotoLandmark=function(t,e){throw Error(lF)},t.prototype.cancelLandmarkAnimation=function(){throw Error(lF)},t}();function l$(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(l$.Cache||Map),n}l$.Cache=Map,(hV=dl||(dl={}))[hV.kUnknown=0]="kUnknown",hV[hV.kNumber=1]="kNumber",hV[hV.kPercentage=2]="kPercentage",hV[hV.kEms=3]="kEms",hV[hV.kPixels=4]="kPixels",hV[hV.kRems=5]="kRems",hV[hV.kDegrees=6]="kDegrees",hV[hV.kRadians=7]="kRadians",hV[hV.kGradians=8]="kGradians",hV[hV.kTurns=9]="kTurns",hV[hV.kMilliseconds=10]="kMilliseconds",hV[hV.kSeconds=11]="kSeconds",hV[hV.kInteger=12]="kInteger",(hU=ds||(ds={}))[hU.kUNumber=0]="kUNumber",hU[hU.kUPercent=1]="kUPercent",hU[hU.kULength=2]="kULength",hU[hU.kUAngle=3]="kUAngle",hU[hU.kUTime=4]="kUTime",hU[hU.kUOther=5]="kUOther",(hq=du||(du={}))[hq.kAll=0]="kAll",hq[hq.kNonNegative=1]="kNonNegative",hq[hq.kInteger=2]="kInteger",hq[hq.kNonNegativeInteger=3]="kNonNegativeInteger",hq[hq.kPositiveInteger=4]="kPositiveInteger",(hY=dc||(dc={}))[hY.kYes=0]="kYes",hY[hY.kNo=1]="kNo",(hX=df||(df={}))[hX.kYes=0]="kYes",hX[hX.kNo=1]="kNo";var lG=[{name:"em",unit_type:dl.kEms},{name:"px",unit_type:dl.kPixels},{name:"deg",unit_type:dl.kDegrees},{name:"rad",unit_type:dl.kRadians},{name:"grad",unit_type:dl.kGradians},{name:"ms",unit_type:dl.kMilliseconds},{name:"s",unit_type:dl.kSeconds},{name:"rem",unit_type:dl.kRems},{name:"turn",unit_type:dl.kTurns}];(hK=dp||(dp={}))[hK.kUnknownType=0]="kUnknownType",hK[hK.kUnparsedType=1]="kUnparsedType",hK[hK.kKeywordType=2]="kKeywordType",hK[hK.kUnitType=3]="kUnitType",hK[hK.kSumType=4]="kSumType",hK[hK.kProductType=5]="kProductType",hK[hK.kNegateType=6]="kNegateType",hK[hK.kInvertType=7]="kInvertType",hK[hK.kMinType=8]="kMinType",hK[hK.kMaxType=9]="kMaxType",hK[hK.kClampType=10]="kClampType",hK[hK.kTransformType=11]="kTransformType",hK[hK.kPositionType=12]="kPositionType",hK[hK.kURLImageType=13]="kURLImageType",hK[hK.kColorType=14]="kColorType",hK[hK.kUnsupportedColorType=15]="kUnsupportedColorType";var lH=function(t){return t?"number"===t?dl.kNumber:"percent"===t||"%"===t?dl.kPercentage:lG.find(function(e){return e.name===t}).unit_type:dl.kUnknown},lV=function(t){switch(t){case dl.kNumber:case dl.kInteger:return ds.kUNumber;case dl.kPercentage:return ds.kUPercent;case dl.kPixels:return ds.kULength;case dl.kMilliseconds:case dl.kSeconds:return ds.kUTime;case dl.kDegrees:case dl.kRadians:case dl.kGradians:case dl.kTurns:return ds.kUAngle;default:return ds.kUOther}},lU=function(t){switch(t){case ds.kUNumber:return dl.kNumber;case ds.kULength:return dl.kPixels;case ds.kUPercent:return dl.kPercentage;case ds.kUTime:return dl.kSeconds;case ds.kUAngle:return dl.kDegrees;default:return dl.kUnknown}},lq=function(t){var e=1;switch(t){case dl.kPixels:case dl.kDegrees:case dl.kSeconds:break;case dl.kMilliseconds:e=.001;break;case dl.kRadians:e=180/Math.PI;break;case dl.kGradians:e=.9;break;case dl.kTurns:e=360}return e},lY=function(t){switch(t){case dl.kNumber:case dl.kInteger:break;case dl.kPercentage:return"%";case dl.kEms:return"em";case dl.kRems:return"rem";case dl.kPixels:return"px";case dl.kDegrees:return"deg";case dl.kRadians:return"rad";case dl.kGradians:return"grad";case dl.kMilliseconds:return"ms";case dl.kSeconds:return"s";case dl.kTurns:return"turn"}return""},lX=function(){function t(){}return t.isAngle=function(t){return t===dl.kDegrees||t===dl.kRadians||t===dl.kGradians||t===dl.kTurns},t.isLength=function(t){return t>=dl.kEms&&t<dl.kDegrees},t.isRelativeUnit=function(t){return t===dl.kPercentage||t===dl.kEms||t===dl.kRems},t.isTime=function(t){return t===dl.kSeconds||t===dl.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(dc.kNo,df.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=dp.kUnitType&&this.getType()<=dp.kClampType},t}(),lK=function(t){function e(e){var n=t.call(this)||this;return n.colorSpace=e,n}return tX(e,t),e.prototype.getType=function(){return dp.kColorType},e.prototype.to=function(t){return this},e}(lX);(hZ=dh||(dh={}))[hZ.Constant=0]="Constant",hZ[hZ.LinearGradient=1]="LinearGradient",hZ[hZ.RadialGradient=2]="RadialGradient";var lZ=function(t){function e(e,n){var r=t.call(this)||this;return r.type=e,r.value=n,r}return tX(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 dp.kColorType},e}(lX),lQ=function(t){function e(e){var n=t.call(this)||this;return n.value=e,n}return tX(e,t),e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return dp.kKeywordType},e.prototype.buildCSSText=function(t,e,n){return n+this.value},e}(lX),lJ=l$(function(t){return void 0===t&&(t=""),t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}),l0=function(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?"".concat(0!==e?"-":"").concat(t.toLowerCase()):t}).join("")};function l1(t){return"function"==typeof t}var l2={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},l5=l$(function(t){var e=lJ(t),n=l2[e];return(null==n?void 0:n.alias)||e}),l3=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},l4=function(t){return lU(lV(t))},l6=function(t){function e(e,n){void 0===n&&(n=dl.kNumber);var r,i=t.call(this)||this;return i.unit="string"==typeof n?lH(n):n,i.value=e,i}return tX(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 dp.kUnitType},e.prototype.convertTo=function(t){if(this.unit===t)return new e(this.value,this.unit);var n=l4(this.unit);if(n!==l4(t)||n===dl.kUnknown)return null;var r=lq(this.unit)/lq(t);return new e(this.value*r,t)},e.prototype.buildCSSText=function(t,e,n){var r;switch(this.unit){case dl.kUnknown:break;case dl.kInteger:r=Number(this.value).toFixed(0);break;case dl.kNumber:case dl.kPercentage:case dl.kEms:case dl.kRems:case dl.kPixels:case dl.kDegrees:case dl.kRadians:case dl.kGradians:case dl.kMilliseconds:case dl.kSeconds:case dl.kTurns:var i=this.value,o=lY(this.unit);if(i<-999999||i>999999){var a=lY(this.unit);r=!Number.isFinite(i)||Number.isNaN(i)?l3(i,a):i+(a||"")}else r="".concat(i).concat(o)}return n+r},e}(lX),l8=new l6(0,"px");new l6(1,"px");var l9=new l6(0,"deg"),l7=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 tX(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}(lK),st=new lQ("unset"),se={"":st,unset:st,initial:new lQ("initial"),inherit:new lQ("inherit")},sn=function(t){return se[t]||(se[t]=new lQ(t)),se[t]},sr=new l7(0,0,0,0,!0),si=new l7(0,0,0,0),so=l$(function(t,e,n,r){return new l7(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),sa=function(t,e){return void 0===e&&(e=dl.kNumber),new l6(t,e)},sl=new l6(50,"%");(hQ=dd||(dd={}))[hQ.Standard=0]="Standard",(hJ=dy||(dy={}))[hJ.ADDED=0]="ADDED",hJ[hJ.REMOVED=1]="REMOVED",hJ[hJ.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED";var ss={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new lD(0,0,0,0)};(h0=dg||(dg={})).COORDINATE="<coordinate>",h0.COLOR="<color>",h0.PAINT="<paint>",h0.NUMBER="<number>",h0.ANGLE="<angle>",h0.OPACITY_VALUE="<opacity-value>",h0.SHADOW_BLUR="<shadow-blur>",h0.LENGTH="<length>",h0.PERCENTAGE="<percentage>",h0.LENGTH_PERCENTAGE="<length> | <percentage>",h0.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",h0.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",h0.LIST_OF_POINTS="<list-of-points>",h0.PATH="<path>",h0.FILTER="<filter>",h0.Z_INDEX="<z-index>",h0.OFFSET_DISTANCE="<offset-distance>",h0.DEFINED_PATH="<defined-path>",h0.MARKER="<marker>",h0.TRANSFORM="<transform>",h0.TRANSFORM_ORIGIN="<transform-origin>",h0.TEXT="<text>",h0.TEXT_TRANSFORM="<text-transform>";var su=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}}(),sc=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,sf=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,sp=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,sh=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,sd={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},sy=l$(function(t){var e;return sa("angular"===t.type?Number(t.value):sd[t.value]||0,"deg")}),sg=l$(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:sa(e,r),cy:sa(n,i)}}),sm=l$(function(t){if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var e;return su(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(!ac(s)&&!ac(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:sa(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 lZ(dh.LinearGradient,{angle:n?sy(n):l9,steps:i});if("radial-gradient"===e&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o=sg(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?sn(f):sa(f,c)}return new lZ(dh.RadialGradient,{cx:a,cy:l,size:s,steps:i})}})}var n=t[0];if("("===t[1]||"("===t[2]){if("l"===n){var r=sc.exec(t);if(r){var i=(null==(e=r[2].match(sh))?void 0:e.map(function(t){return t.split(":")}))||[];return[new lZ(dh.LinearGradient,{angle:sa(parseFloat(r[1]),"deg"),steps:i.map(function(t){var e=t1(t,2),n=e[0],r=e[1];return{offset:sa(100*Number(n),"%"),color:r}})})]}}else if("r"===n){var o=function(t){var e,n=sf.exec(t);if(n){var r=(null==(e=n[4].match(sh))?void 0:e.map(function(t){return t.split(":")}))||[];return{cx:sa(50,"%"),cy:sa(50,"%"),steps:r.map(function(t){var e=t1(t,2),n=e[0],r=e[1];return{offset:sa(100*Number(n),"%"),color:r}})}}return null}(t);if(o)if(!af(o))return[new lZ(dh.RadialGradient,o)];else t=o}else if("p"===n){var a=t,l=sp.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 sv(t){return t&&!!t.image}function sb(t){return t&&!ac(t.r)&&!ac(t.g)&&!ac(t.b)}var sx=l$(function(t){if(sv(t))return tK({repetition:"repeat"},t);if(ac(t)&&(t=""),"transparent"===t)return si;"currentColor"===t&&(t="black");var e=sm(t);if(e)return e;var n=a2(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),so.apply(void 0,t5([],t1(r),!1))});function sO(t,e){if(sb(t)&&sb(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(ap(e[n],0,255));return e[3]=ap(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function sw(t,e){if(ac(e))return sa(0,"px");if(isFinite(Number(e="".concat(e).trim().toLowerCase()))){if("px".search(t)>=0)return sa(Number(e),"px");else if("deg".search(t)>=0)return sa(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 sa(Number(e.replace(RegExp("U"+t,"g"),"").replace(RegExp(r,"g"),"*0")),t)})[0]}var sE=function(t){return sw(/px/g,t)},sk=l$(sE);l$(function(t){return sw(RegExp("%","g"),t)});var sM=function(t){return as(t)||isFinite(Number(t))?sa(Number(t)||0,"px"):sw(RegExp("px|%|em|rem","g"),t)},sS=l$(sM),s_=function(t){return sw(RegExp("deg|rad|grad|turn","g"),t)},sP=l$(s_);function sj(t){var e=0;return t.unit===dl.kDegrees?e=t.value:t.unit===dl.kRadians?e=lk(Number(t.value)):t.unit===dl.kTurns&&(e=360*Number(t.value)),e}function sA(t,e){var n;if(Array.isArray(t)?n=t.map(function(t){return Number(t)}):af(t)?n=t.split(" ").map(function(t){return Number(t)}):as(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 sT(t){return af(t)?t.split(" ").map(function(t){return sS(t)}):t.map(function(t){return sS(t.toString())})}function sC(t,e,n){if(0===t.value)return 0;if(t.unit===dl.kPixels)return Number(t.value);if(t.unit===dl.kPercentage&&n){var r=n.nodeName===dt.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var sN=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function sL(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,sN.indexOf(e[1])>-1&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return sw(/deg|rad|grad|turn|px|%/g,t)||sx(t)})}),n.lastIndex===t.length)return r;return[]}function sI(t){return t.toString()}var sR=function(t){return"number"==typeof t?sa(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?sa(Number(t)):sa(0)},sD=l$(sR);function sF(t,e){return[t,e,sI]}function sB(t,e){return function(n,r){return[n,r,function(n){return sI(ap(n,t,e))}]}}function sz(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}function sW(t){return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=a_(t.parsedStyle.path.absolutePath,void 0,tK(tK({},void 0),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function s$(t,e){return t[0]===e[0]&&t[1]===e[1]}function sG(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 sH(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}l$(function(t){return af(t)?t.split(" ").map(sD):t.map(sD)});var sV=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)},sU=function(t,e,n,r,i,o,a,l){e=Math.abs(e),n=Math.abs(n);var s=lE(r=aT(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=sV({x:1,y:0},v),x=sV(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 sq(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=sU({x:t.prePoint[0],y:t.prePoint[1]},o,l,s,!!u,!!c,{x:t.currentPoint[0],y:t.currentPoint[1]},e),p=sU({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 sY(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function sX(t,e){return sY(t)*sY(e)?(t[0]*e[0]+t[1]*e[1])/(sY(t)*sY(e)):1}function sK(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sX(t,e))}function sZ(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 sQ(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,o,a,l,s,u,c,f,p=[];switch(t.nodeName){case dt.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 dt.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=sZ(O,O,E,M);break;case dt.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=sZ(void 0===_?0:_,void 0===P?0:P,E,M);break;case dt.POLYLINE:case dt.POLYGON:n=t.parsedStyle.points.points,r=t.nodeName===dt.POLYGON,i=n.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),r&&i.push(["Z"]),p=i;break;case dt.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=t1(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 ap(t,0,Math.min(Math.abs(N)/2,Math.abs(I)/2))}));break;case dt.PATH:p=t5([],t1(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=i6(e[1]-u,e[2]-f,0);a&&oo(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=i6(e[1]-u,e[2]-f,0),o=i6(e[3]-u,e[4]-f,0),l=i6(e[5]-u,e[6]-f,0);a&&(oo(i,i,a),oo(o,o,a),oo(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=i6(e[6]-u,e[7]-f,0);a&&oo(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=i6(e[1]-u,e[2]-f,0),o=i6(e[3]-u,e[4]-f,0);a&&(oo(i,i,a),oo(o,o,a)),n="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")}return t+n},"")}var sJ=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=aw(t)}catch(n){e=aw(""),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&&s$(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=aT(lE(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=sK([1,0],O),k=sK(O,w);return -1>=sX(O,w)&&(k=Math.PI),sX(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:s$(t,[u,c])?0:n,ry:s$(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]&&s$(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=sH(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=sH(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=sq(c,0),b=v.x,x=v.y,O=sq(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=lp(t,n,i)[0],l=lp(e,r,o)[0],s=[t,i],u=[e,o];return void 0!==a&&s.push(lf(t,n,i,a)),void 0!==l&&u.push(lf(e,r,o,l)),lo(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=lu(t,n,i,a),f=lu(e,r,o,l),p=0;p<c.length;p++)s.push(ls(t,n,i,a,c[p]));for(var p=0;p<f.length;p++)u.push(ls(e,r,o,l,f[p]));return lo(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=aj(n),h=aj(r),d=aA(n),y=aA(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-=sG(a,0).xExtra:l[0]===d&&(d+=sG(a,e).xExtra),l[1]===h?h-=sG(a,e).yExtra:l[1]===y&&(y+=sG(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}}},s0=l$(sJ);function s1(t){return af(t)?s0(t):sJ(t)}function s2(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=aL(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=aL(e.absolutePath,!1),e.curve=d);var y=[h,d];h.length!==d.length&&(y=function t(e,n,r){var i=aI(e),o=aI(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=aR(y[0])!==aR(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+=au(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 s5(t,e){var n,r,i=af(t)?t.split(" ").map(function(t){var e=t1(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+=li(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=li(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,t5([],t1(i.map(function(t){return t[0]})),!1)),u=Math.min.apply(Math,t5([],t1(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 s3(t,e){return[t.points,e.points,function(t){return t}]}function s4(t){return function(e){var n=0;return t.map(function(t){return null===t?e[n++]:t})}}function s6(t){return t}var s8={matrix:["NNNNNN",[null,null,0,0,null,null,0,0,0,0,1,0,null,null,0,1],s6],matrix3d:["NNNNNNNNNNNNNNNN",s6],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",s4([null,null,new l6(1)]),s6],scalex:["N",s4([null,new l6(1),new l6(1)]),s4([null,new l6(1)])],scaley:["N",s4([new l6(1),null,new l6(1)]),s4([new l6(1),null])],scalez:["N",s4([new l6(1),new l6(1),null])],scale3d:["NNN",s6],skew:["Aa",null,s6],skewx:["A",null,s4([null,l9])],skewy:["A",null,s4([l9,null])],translate:["Tt",s4([null,null,l8]),s6],translatex:["T",s4([null,l8,l8]),s4([null,l8])],translatey:["T",s4([l8,null,l8]),s4([l8,null])],translatez:["L",s4([l8,l8,null])],translate3d:["TTL",s6]};function s9(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=s8[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()?l9:sP(t)},N:sD,T:sS,L:sk})[p.toUpperCase()](f):({a:l9,n:u[0],t:l8})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function s7(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=s8[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()?l9:s_(t)},N:sR,T:sM,L:sE})[p.toUpperCase()](f):({a:l9,n:u[0],t:l8})[p]))return[];u.push(h)}if(r.push({t:o,d:u}),n.lastIndex===t.length)return r}return[]}function ut(t){switch(t.t){case"rotatex":return[1,0,0,0,0,Math.cos(i=lE(sj(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=lE(sj(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=lE(sj(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=lE(sj(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=lE(sj(t.d[0]));return[1,Math.tan(lE(sj(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=lE(sj(t.d[0]))),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return[1,Math.tan(i=lE(sj(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=sC(t.d[0],0,null)||0,n=sC(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=sC(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=sC(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=sC(t.d[0],0,null)||0,1];case"translate3d":return e=sC(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n=sC(t.d[1],0,null)||0,r=sC(t.d[2],0,null)||0,1];case"perspective":var f=sC(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 ue(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 un(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}(l_,t)||(oc(lP,l_),lP[3]=0,lP[7]=0,lP[11]=0,lP[15]=1,1e-8>Math.abs(om(lP))))){var a,l,s,u,c,f,p,h,d,y,g=l_[3],v=l_[7],b=l_[11],x=l_[12],O=l_[13],w=l_[14],E=l_[15];if(0!==g||0!==v||0!==b){if(lj[0]=g,lj[1]=v,lj[2]=b,lj[3]=E,!oy(lP,lP))return;od(lP,lP),o8(i,lj,lP)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=x,e[1]=O,e[2]=w,a=lA,l=l_,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]=i4(lA[0]),on(lA[0],lA[0]),r[0]=or(lA[0],lA[1]),lC(lA[1],lA[1],lA[0],1,-r[0]),n[1]=i4(lA[1]),on(lA[1],lA[1]),r[0]/=n[1],r[1]=or(lA[0],lA[2]),lC(lA[2],lA[2],lA[0],1,-r[1]),r[2]=or(lA[1],lA[2]),lC(lA[2],lA[2],lA[1],1,-r[2]),n[2]=i4(lA[2]),on(lA[2],lA[2]),r[1]/=n[2],r[2]/=n[2],s=lA[1],u=lA[2],c=s[0],f=s[1],p=s[2],h=u[0],d=u[1],y=u[2],lT[0]=f*y-p*d,lT[1]=p*h-c*y,lT[2]=c*d-f*h,0>or(lA[0],lT))for(var k=0;k<3;k++)n[k]*=-1,lA[k][0]*=-1,lA[k][1]*=-1,lA[k][2]*=-1;o[0]=.5*Math.sqrt(Math.max(1+lA[0][0]-lA[1][1]-lA[2][2],0)),o[1]=.5*Math.sqrt(Math.max(1-lA[0][0]+lA[1][1]-lA[2][2],0)),o[2]=.5*Math.sqrt(Math.max(1-lA[0][0]-lA[1][1]+lA[2][2],0)),o[3]=.5*Math.sqrt(Math.max(1+lA[0][0]+lA[1][1]+lA[2][2],0)),lA[2][1]>lA[1][2]&&(o[0]=-o[0]),lA[0][2]>lA[2][0]&&(o[1]=-o[1]),lA[1][0]>lA[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(ut).reduce(ue),e,n,r,i,o),[[e,n,r,o,i]]}var ur=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 ui(t){return t.toFixed(6).replace(".000000","")}function uo(t,e){var n,r;return(t.decompositionPair!==e&&(t.decompositionPair=e,n=un(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=un(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=ap(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 ur(t[0],t[1],t[2],e,t[4]).map(ui).join(",")}])}function ua(t){return t.replace(/[xy]/,"")}function ul(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function us(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?sa(a):sa(a,t.unit)})})}(i)}var o=[],a=[],l=[];if(t.length!==e.length){var s=uo(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=s8[u],d=s8[c],y=void 0;if("perspective"===u&&"perspective"===c||("matrix"===u||"matrix3d"===u)&&("matrix"===c||"matrix3d"===c)){var s=uo([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]&&ua(u)===ua(c))y=ua(u),f=h[2](f),p=d[2](p);else if(h[1]&&d[1]&&ul(u)===ul(c))y=ul(u),f=h[1](f),p=d[1](p);else{var s=uo(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=l4(t.unit),u=t.convertTo(s),c=e.convertTo(s);return u&&c?(a=u.value,l=c.value,o=lY(t.unit)):(l6.isLength(t.unit)||l6.isLength(e.unit))&&(a=sC(t,i,n),l=sC(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 uu=l$(function(t){if(!af(t))return[sa(t[0]||0,"px"),sa(t[1]||0,"px")];if("text-anchor"===t)return[sa(0,"px"),sa(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:[sS(uf(e[0])),sS(uf(e[1]))]}),uc=function(t){if(!af(t))return[sa(t[0]||0,"px"),sa(t[1]||0,"px")];if("text-anchor"===t)return[sa(0,"px"),sa(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:[sM(uf(e[0])),sM(uf(e[1]))]};function uf(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var up=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:dg.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:dg.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:dg.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:dg.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:dg.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:dg.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:dg.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:dg.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:dg.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:dg.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:dg.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:dg.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:dg.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:dg.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:dg.FILTER},{n:"clipPath",syntax:dg.DEFINED_PATH},{n:"textPath",syntax:dg.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:dg.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===dt.CIRCLE||t===dt.ELLIPSE?"center":t===dt.TEXT?"text-anchor":"left top"},l:!0,syntax:dg.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===dt.CIRCLE||t===dt.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:dg.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:dg.COORDINATE},{n:"cy",int:!0,d:"0",syntax:dg.COORDINATE},{n:"cz",int:!0,d:"0",syntax:dg.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:dg.COORDINATE},{n:"y",int:!0,d:"0",syntax:dg.COORDINATE},{n:"z",int:!0,d:"0",syntax:dg.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:dg.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:dg.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:dg.COORDINATE},{n:"y1",int:!0,l:!0,syntax:dg.COORDINATE},{n:"z1",int:!0,l:!0,syntax:dg.COORDINATE},{n:"x2",int:!0,l:!0,syntax:dg.COORDINATE},{n:"y2",int:!0,l:!0,syntax:dg.COORDINATE},{n:"z2",int:!0,l:!0,syntax:dg.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:dg.PATH,p:50},{n:"points",int:!0,l:!0,syntax:dg.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:dg.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:dg.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:dg.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:dg.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:dg.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:dg.NUMBER,d:function(t){return t===dt.PATH||t===dt.POLYGON||t===dt.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:dg.MARKER},{n:"markerEnd",syntax:dg.MARKER},{n:"markerMid",syntax:dg.MARKER},{n:"markerStartOffset",syntax:dg.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:dg.LENGTH,l:!0,int:!0,d:"0"}],uh=up.filter(function(t){return!!t.l}).map(function(t){return t.n}),ud={},uy=new WeakMap,ug=function(t,e){var n=uy.get(t);return!n||0===n.length||n.includes(e)},um=function(){function t(t){var e=this;this.runtime=t,up.forEach(function(t){e.registerMetadata(t)})}return t.prototype.registerMetadata=function(t){t5([t.n],t1(t.a||[]),!1).forEach(function(e){ud[e]=t})},t.prototype.unregisterMetadata=function(t){delete ud[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<uh.length;s++)if(uh[s]in e){l=!0;break}}e.fill&&(t.parsedStyle.fill=sx(e.fill)),e.stroke&&(t.parsedStyle.stroke=sx(e.stroke)),e.shadowColor&&(t.parsedStyle.shadowColor=sx(e.shadowColor)),e.filter&&(t.parsedStyle.filter=sL(e.filter)),ac(e.radius)||(t.parsedStyle.radius=sA(e.radius,4)),ac(e.lineDash)||(t.parsedStyle.lineDash=sA(e.lineDash,2)),e.points&&(t.parsedStyle.points=s5(e.points,t)),""===e.path&&(t.parsedStyle.path=tK({},ss)),e.path&&(t.parsedStyle.path=s1(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=sA(e.anchor,2)),e.transform&&(t.parsedStyle.transform=s9(e.transform)),e.transformOrigin&&(t.parsedStyle.transformOrigin=uu(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!==dt.CIRCLE&&t.nodeName!==dt.ELLIPSE||ac(e.cx)&&ac(e.cy))&&(t.nodeName!==dt.RECT&&t.nodeName!==dt.IMAGE&&t.nodeName!==dt.GROUP&&t.nodeName!==dt.HTML&&t.nodeName!==dt.TEXT&&t.nodeName!==dt.MESH||ac(e.x)&&ac(e.y)&&ac(e.z))&&(t.nodeName!==dt.LINE||ac(e.x1)&&ac(e.y1)&&ac(e.z1)&&ac(e.x2)&&ac(e.y2)&&ac(e.z2))||this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(t,i),ac(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),ac(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=ud[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=ud[t],o=e;if((""===e||ac(e))&&(e="unset"),"unset"===e||"initial"===e||"inherit"===e)o=sn(e);else if(i){var a=i.k,l=i.syntax,s=l&&this.getPropertySyntax(l);a&&a.indexOf(e)>-1?o=sn(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=ud[t],o="g-root"===n.id,a=e;if(i){var l=i.syntax,s=i.inh,u=i.d;if(e instanceof lQ){var c=e.value;if("unset"===c&&(c=s&&!o?"inherit":"initial"),"initial"===c)ac(u)||(e=this.parseProperty(t,l1(u)?u(n.nodeName):u,n,r));else if("inherit"===c){var f=this.tryToResolveProperty(n,t,{inherited:!0});return ac(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 lQ?e.value:e}return a},t.prototype.postProcessProperty=function(t,e,n){var r=ud[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=uy.get(t);n||(uy.set(t,[]),n=uy.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&&ug(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=uy.get(t);if(e&&e.length){var n={};e.forEach(function(e){n[e]=t.attributes[e]}),this.processProperties(t,n),uy.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 lN),r.renderBounds||(r.renderBounds=new lN);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===dt.TEXT?delete i.anchor:e===dt.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===dt.POLYLINE||e===dt.POLYGON||e===dt.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,lb(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?sC(x[0],0,t):0),W=(B?-1:1)*(x?sC(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===dt.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===dt.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))},t.prototype.isPropertyInheritable=function(t){var e=ud[t];return!!e&&e.inh},t}(),uv=function(){function t(){this.parser=sP,this.parserUnmemoize=s_,this.parserWithCSSDisabled=null,this.mixer=sF}return t.prototype.calculator=function(t,e,n,r){return sj(n)},t}(),ub=function(){function t(){}return t.prototype.calculator=function(t,e,n,r,i){return n instanceof lQ&&(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}(),ux=function(){function t(){this.parser=sx,this.parserWithCSSDisabled=sx,this.mixer=sO}return t.prototype.calculator=function(t,e,n,r){return n instanceof lQ?"none"===n.value?sr:si:n},t}(),uO=function(){function t(){this.parser=sL}return t.prototype.calculator=function(t,e,n){return n instanceof lQ?[]:n},t}();function uw(t){var e=t.parsedStyle.fontSize;return ac(e)?null:e}var uE=function(){function t(){this.parser=sS,this.parserUnmemoize=sM,this.parserWithCSSDisabled=null,this.mixer=sF}return t.prototype.calculator=function(t,e,n,r,i){if(as(n))return n;if(!l6.isRelativeUnit(n.unit))return n.value;var o,a=i.styleValueRegistry;if(n.unit===dl.kPercentage)return 0;if(n.unit===dl.kEms){if(r.parentNode){var l=uw(r.parentNode);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}if(n.unit===dl.kRems){if(null==(o=null==r?void 0:r.ownerDocument)?void 0:o.documentElement){var l=uw(r.ownerDocument.documentElement);if(l)return l*n.value;a.addUnresolveProperty(r,t)}else a.addUnresolveProperty(r,t);return 0}},t}(),uk=function(){function t(){this.mixer=sz}return t.prototype.parser=function(t){var e,n=sT(as(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}(),uM=function(){function t(){this.mixer=sz}return t.prototype.parser=function(t){var e,n=sT(as(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}(),uS=os();function u_(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||[l8,l8];e.translateLocal(l[0].value,l[1].value,0)}else if("translatex"===i){var l=o||[l8];e.translateLocal(l[0].value,0,0)}else if("translatey"===i){var l=o||[l8];e.translateLocal(0,l[0].value,0)}else if("translatez"===i){var l=o||[l8];e.translateLocal(0,0,l[0].value)}else if("translate3d"===i){var l=o||[l8,l8,l8];e.translateLocal(l[0].value,l[1].value,l[2].value)}else if("rotate"===i){var s=o||[l9];e.rotateLocal(0,0,sj(s[0]))}else if("rotatex"===i){var s=o||[l9];e.rotateLocal(sj(s[0]),0,0)}else if("rotatey"===i){var s=o||[l9];e.rotateLocal(0,sj(s[0]),0)}else if("rotatez"===i){var s=o||[l9];e.rotateLocal(0,0,sj(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(lE(u[0]),lE(u[1]))}else if("skewx"===i){var u=(null==o?void 0:o.map(function(t){return t.value}))||[0];e.setLocalSkew(lE(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],lE(u[0]))}else if("matrix"===i){var c=t1(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(op(uS,f,p,0,0,h,d,0,0,0,0,1,0,y+n,g+r,0,1))}else"matrix3d"===i&&(op.apply(tP,t5([uS],t1(o.map(function(t){return t.value})),!1)),uS[12]+=n,uS[13]+=r,e.setLocalTransform(uS))}),e.getLocalTransform()}var uP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tX(e,t),e.prototype.postProcessor=function(t,e){switch(t.nodeName){case dt.CIRCLE:case dt.ELLIPSE:var n,r,i,o=t.parsedStyle,a=o.cx,l=o.cy,s=o.cz;ac(a)||(n=a),ac(l)||(r=l),ac(s)||(i=s);break;case dt.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 dt.RECT:case dt.IMAGE:case dt.GROUP:case dt.HTML:case dt.TEXT:case dt.MESH:ac(t.parsedStyle.x)||(n=t.parsedStyle.x),ac(t.parsedStyle.y)||(r=t.parsedStyle.y),ac(t.parsedStyle.z)||(i=t.parsedStyle.z)}if(t.nodeName!==dt.PATH&&t.nodeName!==dt.POLYLINE&&t.nodeName!==dt.POLYGON&&(t.parsedStyle.defX=n||0,t.parsedStyle.defY=r||0),(!ac(n)||!ac(r)||!ac(i))&&-1===e.indexOf("transform")){var h=t.parsedStyle.transform;if(h&&h.length)u_(h,t);else{var d=t1(t.getLocalPosition(),3),y=d[0],g=d[1],v=d[2];t.setLocalPosition(ac(n)?y:n,ac(r)?g:r,ac(i)?v:i)}}},e}(uE),uj=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n instanceof lQ&&(n=null);var i=null==n?void 0:n.cloneNode(!0);return i&&(i.style.isMarker=!0),i},t}(),uA=function(){function t(){this.mixer=sF,this.parser=sD,this.parserUnmemoize=sR,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uT=function(){function t(){this.parser=sD,this.parserUnmemoize=sR,this.parserWithCSSDisabled=null,this.mixer=sB(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===dt.LINE||i===dt.PATH||i===dt.POLYLINE){var o=n.getPoint(r);o&&(t.parsedStyle.defX=o.x,t.parsedStyle.defY=o.y,t.setLocalPosition(o.x,o.y))}}},t}(),uC=function(){function t(){this.parser=sD,this.parserUnmemoize=sR,this.parserWithCSSDisabled=null,this.mixer=sB(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),uN=function(){function t(){this.parser=s1,this.parserWithCSSDisabled=s1,this.mixer=s2}return t.prototype.calculator=function(t,e,n){return n instanceof lQ&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new lD(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===dt.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}(),uL=function(){function t(){this.parser=s5,this.mixer=s3}return t.prototype.postProcessor=function(t,e){if((t.nodeName===dt.POLYGON||t.nodeName===dt.POLYLINE)&&-1===e.indexOf("transform")){var n=t.parsedStyle,r=n.defX,i=n.defY;t.setLocalPosition(r,i)}},t}(),uI=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.mixer=sB(0,1/0),e}return tX(e,t),e}(uE),uR=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){if(n instanceof lQ)if("unset"===n.value)return"";else return n.value;return"".concat(n)},t.prototype.postProcessor=function(t){t.nodeValue="".concat(t.parsedStyle.text)||""},t}(),uD=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}(),uF={},uB=0,uz="undefined"!=typeof window&&void 0!==window.document;function uW(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 u$(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 uG(t,e){if(uz)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var uH={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},uV="object"==typeof performance&&performance.now?performance:Date;function uU(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 uq=1,uY="object"==typeof self&&self.self==self?self:"object"==typeof n.g&&n.g.global==n.g?n.g:{},uX=Date.now(),uK={},uZ=Date.now(),uQ=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function");var e=Date.now(),n=e-uZ,r=uq++;return uK[r]=t,Object.keys(uK).length>1||setTimeout(function(){uZ=e;var t=uK;uK={},Object.keys(t).forEach(function(e){return t[e](uY.performance&&"function"==typeof uY.performance.now?uY.performance.now():Date.now()-uX)})},n>16?0:16-n),r},uJ=function(t){return"string"!=typeof t?uQ:""===t?uY.requestAnimationFrame:uY[t+"RequestAnimationFrame"]},u0=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!!uJ(t)}),u1=uJ(u0),u2="string"!=typeof u0?function(t){delete uK[t]}:""===u0?uY.cancelAnimationFrame:uY[u0+"CancelAnimationFrame"]||uY[u0+"CancelRequestAnimationFrame"];uY.requestAnimationFrame=u1,uY.cancelAnimationFrame=u2;var u5=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,t5([],t1(t),!1))}))},t}(),u3=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 tQ(this,void 0,void 0,function(){var e,n,r;return tJ(this,function(i){switch(i.label){case 0:if(!this.callbacks.length)return[3,6];return[4,(r=this.callbacks)[0].apply(r,t5([],t1(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}(),u4=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}(),u6=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}(),u8=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],u9=/([\"\'])[^\'\"]+\1/,u7=function(){function t(){this.parser=s9,this.parserUnmemoize=s7,this.parserWithCSSDisabled=s7,this.mixer=us}return t.prototype.calculator=function(t,e,n,r){return n instanceof lQ?[]:n},t.prototype.postProcessor=function(t){u_(t.parsedStyle.transform,t)},t}(),ct=function(){function t(){this.parser=sD,this.parserUnmemoize=sR}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=dy.Z_INDEX_CHANGED)}},t}(),ce=function(){function t(){}return t.prototype.update=function(t,e){var n=t.r;return{width:2*n,height:2*n}},t}(),cn=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),cr=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}(),ci=function(){function t(){}return t.prototype.update=function(t){var e=t.path.rect;return{width:e.width,height:e.height}},t}(),co=function(){function t(){}return t.prototype.update=function(t){if(t.points&&aP(t.points.points)){var e=t.points.points,n=Math.min.apply(Math,t5([],t1(e.map(function(t){return t[0]})),!1)),r=Math.max.apply(Math,t5([],t1(e.map(function(t){return t[0]})),!1)),i=Math.min.apply(Math,t5([],t1(e.map(function(t){return t[1]})),!1));return{width:r-n,height:Math.max.apply(Math,t5([],t1(e.map(function(t){return t[1]})),!1))-i}}return{width:0,height:0}},t}(),ca=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&&!af(n)&&(o||(t.width=o=n.width),a||(t.height=a=n.height)),{width:o,height:a}},t}(),cl=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&&!ac(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}(),cs=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 lR,this.page=new lR,this.canvas=new lR,this.viewport=new lR,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(lF)},t}(),cu=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.client=new lR,e.movement=new lR,e.offset=new lR,e.global=new lR,e.screen=new lR,e}return tX(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(lF)},e}(cs),cc=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.width=0,e.height=0,e.isPrimary=!1,e}return tX(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}(cu),cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tX(e,t),e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(cu),cp=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 tX(e,t),e}(cs),ch=function(){function t(){this.emitter=new i1}return t.prototype.on=function(t,e,n){return this.addEventListener(t,e,n),this},t.prototype.addEventListener=function(t,e,n){var r=aD(n)&&n||aF(n)&&n.capture,i=aF(n)&&n.once,o=l1(e)?void 0:e,a=!1,l="";if(t.indexOf(":")>-1){var s=t1(t.split(":"),2),u=s[0];t=s[1],l=u,a=!0}if(t=r?"".concat(t,"capture"):t,e=l1(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,t5([],t1(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=aD(n)&&n||aF(n)&&n.capture,i=l1(e)?void 0:e;return t=r?"".concat(t,"capture"):t,e=l1(e)?e:null==e?void 0:e.handleEvent,this.emitter.off(t,e,i),this},t.prototype.emit=function(t,e){this.dispatchEvent(new cp(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}(),cd=function(t){function e(){var e=t.apply(this,t5([],t1(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 tX(e,t),e.isNode=function(t){return!!t.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var t,e,n="";this.nodeName===dt.TEXT&&(n+=this.style.text);try{for(var r=t0(this.childNodes),i=r.next();!i.done;i=r.next()){var o=i.value;o.nodeName===dt.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===dt.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(lF)},e.prototype.lookupNamespaceURI=function(t){throw Error(lF)},e.prototype.lookupPrefix=function(t){throw Error(lF)},e.prototype.normalize=function(){throw Error(lF)},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}(ch),cy=function(){function t(t,e){var n=this;this.globalRuntime=t,this.context=e,this.emitter=new i1,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=os(),this.tmpVec3=i5(),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=uV.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")}cd.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"),cd.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&&cd.isNode(o)&&o.parentNode;f&&f!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==e.target;)f=f.parentNode;if(!f||f===(cd.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!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode);)p.currentTarget=p.target,n.notifyTarget(p),r&&n.notifyTarget(p,"mouseenter"),cd.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!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode);)a.currentTarget=a.target,n.notifyTarget(a),r&&n.notifyTarget(a,"mouseleave"),cd.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!==(cd.isNode(n.rootTarget)&&n.rootTarget.parentNode);)o.currentTarget=o.target,n.notifyTarget(o),i&&n.notifyTarget(o,"mouseenter"),cd.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"),cd.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 lR(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 lR(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=ov(this.tmpMatrix,s,l),c=i9(this.tmpVec3,e/o*2-1,(1-n/a)*2-1,0);return oo(c,c,u),new lR(c[0],c[1])},t.prototype.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),r=e.getViewTransform(),i=ov(this.tmpMatrix,n,r),o=i9(this.tmpVec3,t.x,t.y,0);oo(this.tmpVec3,this.tmpVec3,i);var a=this.context.config,l=a.width,s=a.height;return new lR((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++)cd.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=t0(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(cc);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(cf);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(cf);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(cc);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=uV.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||cd.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=cd.isNode(e)&&e.parentNode}},t}(),cg=function(){function t(){}return t.prototype.getOrCreateCanvas=function(t,e){if(this.canvas)return this.canvas;if(t||cj.offscreenCanvas)this.canvas=t||cj.offscreenCanvas,this.context=this.canvas.getContext("2d",tK({willReadFrequently:!0},e));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",tK({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",tK({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}();(h1=dm||(dm={}))[h1.CAMERA_CHANGED=0]="CAMERA_CHANGED",h1[h1.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",h1[h1.NONE=2]="NONE";var cm=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 u4,initAsync:new u5,dirtycheck:new u6,cull:new u6,beginFrame:new u4,beforeRender:new u4,render:new u4,afterRender:new u4,endFrame:new u4,destroy:new u4,pick:new u3,pickSync:new u6,pointerDown:new u4,pointerUp:new u4,pointerMove:new u4,pointerOut:new u4,pointerOver:new u4,pointerWheel:new u4,pointerCancel:new u4,click:new u4}}return t.prototype.init=function(t){var e=this,n=tK(tK({},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(dm.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(dm.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!==dy.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>uW(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(uW)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(dm.DISPLAY_OBJECT_CHANGED)},t}(),cv=/\[\s*(.*)=(.*)\s*\]/,cb=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(cv),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 ac(n)?"":n.toString?n.toString():""},t}(),cx=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 tX(e,t),e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(cs);function cO(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}(h2=dv||(dv={})).REPARENT="reparent",h2.DESTROY="destroy",h2.ATTR_MODIFIED="DOMAttrModified",h2.INSERTED="DOMNodeInserted",h2.REMOVED="removed",h2.MOUNTED="DOMNodeInsertedIntoDocument",h2.UNMOUNTED="DOMNodeRemovedFromDocument",h2.BOUNDS_CHANGED="bounds-changed",h2.CULLED="culled";var cw=new cx(dv.REPARENT,null,"","","",0,"",""),cE=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 cp(dv.BOUNDS_CHANGED),this.rotate=(e=o9(),function(t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof n&&(n=i6(n,r,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){var a=o9();an(a,n[0],n[1],n[2]);var l=h.getRotation(t);ai(e,h.getRotation(t.parentNode)),ae(e,e),at(a,e,a),at(o.localRotation,a,l),ao(o.localRotation,o.localRotation),h.dirtifyLocal(t,o)}else h.rotateLocal(t,n)}),this.rotateLocal=(n=o9(),function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),"number"==typeof e&&(e=i6(e,r,i));var o=t.transformable;an(n,e[0],e[1],e[2]),at(o.localRotation,o.localRotation,n),h.dirtifyLocal(t,o)}),this.setEulerAngles=(r=o9(),function(t,e,n,i){void 0===n&&(n=0),void 0===i&&(i=0),"number"==typeof e&&(e=i6(e,n,i));var o=t.transformable;if(null!==t.parentNode&&t.parentNode.transformable){an(o.localRotation,e[0],e[1],e[2]);var a=h.getRotation(t.parentNode);ai(r,ae(o9(),a)),at(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=i6(e,n,r));var i,o,a,l,s,u,c,f,p,d,y,g,v,b,x,O,w,E=t.transformable;oa(e,i5())||(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,i7(E.localPosition,E.localPosition,e),h.dirtifyLocal(t,E))},this.setPosition=(i=os(),o=i5(),function(t,e){var n=t.transformable;o[0]=e[0],o[1]=e[1],o[2]=e[2]||0,oa(h.getPosition(t),o)||(i8(n.position,o),null!==t.parentNode&&t.parentNode.transformable?(oc(i,t.parentNode.transformable.worldTransform),oy(i,i),oo(n.localPosition,o,i)):i8(n.localPosition,o),h.dirtifyLocal(t,n))}),this.setLocalPosition=(a=i5(),function(t,e){var n=t.transformable;a[0]=e[0],a[1]=e[1],a[2]=e[2]||0,oa(n.localPosition,a)||(i8(n.localPosition,a),h.dirtifyLocal(t,n))}),this.translate=(l=i5(),s=i5(),u=i5(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=i9(s,e,n,r)),oa(e,l)||(i7(u,h.getPosition(t),e),h.setPosition(t,u))}),this.setRotation=function(){var t=o9();return function(e,n,r,i,o){var a=e.transformable;"number"==typeof n&&(n=ar(n,r,i,o)),null!==e.parentNode&&e.parentNode.transformable?(ai(t,h.getRotation(e.parentNode)),ae(t,t),at(a.localRotation,t,n),ao(a.localRotation,a.localRotation),h.dirtifyLocal(e,a)):h.setLocalRotation(e,n)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(c=os(),f=i5(),p=ar(0,0,0,1),function(t){if(0!==t.localSkew[0]||0!==t.localSkew[1]){if(oD(t.localTransform,t.localRotation,t.localPosition,i6(1,1,1),t.origin),0!==t.localSkew[0]||0!==t.localSkew[1]){var e=oh(c);e[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),ov(t.localTransform,t.localTransform,e)}var n=oD(c,p,f,t.localScale,t.origin);ov(t.localTransform,t.localTransform,n)}else oD(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,ac(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=dy.ADDED);var l=t.transformable;l&&this.dirtifyWorld(t,l),l.frozen&&this.unfreezeParentToRoot(t),o&&t.dispatchEvent(cw)},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=dy.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=i6(e,n,r));var i=t.transformable;an(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=i6(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=i6(e[0],e[1],e[2]||n.localScale[2]);oa(r,n.localScale)||(i8(n.localScale,r),this.dirtifyLocal(t,n))},t.prototype.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=ar(e,n,r,i));var o=t.transformable;ai(o.localRotation,e),this.dirtifyLocal(t,o)},t.prototype.setLocalSkew=function(t,e,n){"number"==typeof e&&(r=e,(i=new i2(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=t1(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;)cO(n),n=n.parentNode;e&&t.forEach(function(t){cO(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 cx(dv.ATTR_MODIFIED,n,e,e,t,cx.MODIFICATION,e,e)),n.isCustomElement&&n.isConnected&&n.attributeChangedCallback&&n.attributeChangedCallback(t,e,e)})})},t.prototype.getPosition=function(t){var e=t.transformable;return oN(e.position,this.getWorldTransform(t,e))},t.prototype.getRotation=function(t){var e=t.transformable;return oI(e.rotation,this.getWorldTransform(t,e))},t.prototype.getScale=function(t){var e=t.transformable;return oL(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=oN(i5(),e),r=oI(o9(),e),i=oL(i5(),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(lN.isEmpty(r))return null;var i=n||new lN;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 lN},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 lN).update(r.center,r.halfExtents))}),e){var a=u$(t);if(a){var l=a.parsedStyle.clipPath.getBounds(e);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new lN),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=os();t.parentNode.transformable&&(e=oy(os(),this.getWorldTransform(t.parentNode)));var n=this.getBounds(t);if(!lN.isEmpty(n)){var r=new lN;return r.setFromTransformedAABB(n,e),r}}return this.getBounds(t)},t.prototype.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t);lN.isEmpty(i)||(r=new lN).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=t1(r.getMin(),2),l=a[0],s=a[1],u=t1(r.getMax(),2),c=u[0],f=u[1];return new lD(l+((null==o?void 0:o.left)||0),s+((null==o?void 0:o.top)||0),c-l,f-s)}return new lD((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?ov(e.worldTransform,r.worldTransform,e.localTransform):oc(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}(),ck={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]},cM=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,cS=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),c_=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),cP=function(){function t(t){var e=this;this.runtime=t,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,n){return!e.isBreakingSpace(n)&&!!(t&&(c_.exec(n)||cS.exec(t)))},this.trimByKinsokuShorui=function(t){var e=t5([],t1(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=ck.MetricsString+ck.BaselineSymbol,a=Math.ceil(i.measureText(o).width),l=Math.ceil(i.measureText(ck.BaselineSymbol).width),s=ck.HeightMultiplier*l;l=l*ck.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=as(e)&&"".concat(e,"px")||"16px",l=n.split(","),s=l.length-1;s>=0;s--){var u=l[s].trim();!u9.test(u)&&0>u8.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 lD(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&&ck.BreakingSpaces.indexOf(t.charCodeAt(0))>=0},t.prototype.isNewline=function(t){return"string"==typeof t&&ck.Newlines.indexOf(t.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(t){var e=t5([],t1(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&&cM.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(!cM.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}(),cj={},cA=(h3=new ca,h4=new co,(h5={})[dt.CIRCLE]=new ce,h5[dt.ELLIPSE]=new cn,h5[dt.RECT]=h3,h5[dt.IMAGE]=h3,h5[dt.GROUP]=h3,h5[dt.LINE]=new cr,h5[dt.TEXT]=new cl(cj),h5[dt.POLYLINE]=h4,h5[dt.POLYGON]=h4,h5[dt.PATH]=new ci,h5[dt.HTML]=null,h5[dt.MESH]=null,h5),cT=(h8=new ux,h9=new uE,(h6={})[dg.PERCENTAGE]=null,h6[dg.NUMBER]=new uA,h6[dg.ANGLE]=new uv,h6[dg.DEFINED_PATH]=new ub,h6[dg.PAINT]=h8,h6[dg.COLOR]=h8,h6[dg.FILTER]=new uO,h6[dg.LENGTH]=h9,h6[dg.LENGTH_PERCENTAGE]=h9,h6[dg.LENGTH_PERCENTAGE_12]=new uk,h6[dg.LENGTH_PERCENTAGE_14]=new uM,h6[dg.COORDINATE]=new uP,h6[dg.OFFSET_DISTANCE]=new uT,h6[dg.OPACITY_VALUE]=new uC,h6[dg.PATH]=new uN,h6[dg.LIST_OF_POINTS]=new uL,h6[dg.SHADOW_BLUR]=new uI,h6[dg.TEXT]=new uR,h6[dg.TEXT_TRANSFORM]=new uD,h6[dg.TRANSFORM]=new u7,h6[dg.TRANSFORM_ORIGIN]=new function(){this.parser=uu,this.parserUnmemoize=uc},h6[dg.Z_INDEX]=new ct,h6[dg.MARKER]=new uj,h6);cj.CameraContribution=lW,cj.AnimationTimeline=null,cj.EasingFunction=null,cj.offscreenCanvasCreator=new cg,cj.sceneGraphSelector=new cb,cj.sceneGraphService=new cE(cj),cj.textService=new cP(cj),cj.geometryUpdaterFactory=cA,cj.CSSPropertySyntaxFactory=cT,cj.styleValueRegistry=new um(cj),cj.layoutRegistry=null,cj.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},cj.enableCSSParsing=!0,cj.enableDataset=!1,cj.enableStyleSyntax=!0,cj.enableSizeAttenuation=!1;var cC=0,cN=new cx(dv.INSERTED,null,"","","",0,"",""),cL=new cx(dv.REMOVED,null,"","","",0,"",""),cI=new cp(dv.DESTROY),cR=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.entity=cC++,e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.cullable={strategy:dd.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=cj.enableCSSParsing?{anchor:st,opacity:st,fillOpacity:st,strokeOpacity:st,fill:st,stroke:st,transform:st,transformOrigin:st,visibility:st,pointerEvents:st,lineWidth:st,lineCap:st,lineJoin:st,increasedLineWidthForHitTesting:st,fontSize:st,fontFamily:st,fontStyle:st,fontWeight:st,fontVariant:st,textAlign:st,textBaseline:st,textTransform:st,zIndex:st,filter:st,shadowType:st}:null,e.parsedStyle={},e.attributes={},e}return tX(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(lF)},e.prototype.appendChild=function(t,e){var n;if(t.destroyed)throw Error("Cannot append a destroyed element.");return cj.sceneGraphService.attach(t,this,e),(null==(n=this.ownerDocument)?void 0:n.defaultView)&&this.ownerDocument.defaultView.mountChildren(t),cN.relatedNode=this,t.dispatchEvent(cN),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 cL.relatedNode=this,t.dispatchEvent(cL),(null==(e=t.ownerDocument)?void 0:e.defaultView)&&t.ownerDocument.defaultView.unmountChildren(t),cj.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 cj.sceneGraphService.matches(t,this)},e.prototype.getElementById=function(t){return cj.sceneGraphService.querySelector("#".concat(t),this)},e.prototype.getElementsByName=function(t){return cj.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)},e.prototype.getElementsByClassName=function(t){return cj.sceneGraphService.querySelectorAll(".".concat(t),this)},e.prototype.getElementsByTagName=function(t){return cj.sceneGraphService.querySelectorAll(t,this)},e.prototype.querySelector=function(t){return cj.sceneGraphService.querySelector(t,this)},e.prototype.querySelectorAll=function(t){return cj.sceneGraphService.querySelectorAll(t,this)},e.prototype.closest=function(t){var e=this;do{if(cj.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=t1(t),i=r[0],o=r.slice(1);this.parentNode.appendChild(i,n),i.after.apply(i,t5([],t1(o),!1))}},e.prototype.replaceWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.after.apply(this,t5([],t1(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,t5([],t1(t),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(cI),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return cj.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return cj.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return cj.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return cj.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return cj.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 cj.enableCSSParsing?null:void 0;var e=this.attributes[t];if(void 0!==e)return e;var n=l5(t);return e=this.attributes[n],cj.enableCSSParsing&&ac(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(lF)},e.prototype.getAttributeNode=function(t){throw Error(lF)},e.prototype.getAttributeNodeNS=function(t,e){throw Error(lF)},e.prototype.hasAttributeNS=function(t,e){throw Error(lF)},e.prototype.removeAttributeNS=function(t,e){throw Error(lF)},e.prototype.removeAttributeNode=function(t){throw Error(lF)},e.prototype.setAttributeNS=function(t,e,n){throw Error(lF)},e.prototype.setAttributeNode=function(t){throw Error(lF)},e.prototype.setAttributeNodeNS=function(t){throw Error(lF)},e.prototype.toggleAttribute=function(t,e){throw Error(lF)},e}(cd);function cD(t){return!!(null==t?void 0:t.nodeName)}var cF=new cx(dv.ATTR_MODIFIED,null,null,null,null,cx.MODIFICATION,null,null),cB={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:""},cz={anchor:[0,0],fill:sr,stroke:sr,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},cW=tK(tK({},cz),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),c$=t5(t5([],t1(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"]),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),cG="data-",cH=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||dt.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,cj.enableCSSParsing?cz:cW,r.config.initialParsedStyle),cj.enableCSSParsing&&Object.assign(r.attributes,cB),r.initAttributes(r.config.style);var i=cj.globalThis.Proxy?cj.globalThis.Proxy:function(){};return cj.enableDataset&&(r.dataset=new i({},{get:function(t,e){var n="".concat(cG).concat(l0(e));return void 0!==t[n]?t[n]:r.getAttribute(n)},set:function(t,e,n){return r.setAttribute("".concat(cG).concat(l0(e)),n),!0}})),cj.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 tX(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=tK({},this.attributes);for(var r in n){var i=n[r];cD(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};cj.enableCSSParsing&&(n.usedAttributes=c$);var r={};for(var i in t)r[l5(i)]=t[i];cj.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=l5(e);!aB(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];cj.styleValueRegistry.processProperties(this,((r={})[t]=e,r),n),i.dirty=!0;var l=this.parsedStyle[t];this.isConnected&&(cF.relatedNode=this,cF.prevValue=o,cF.newValue=e,cF.attrName=t,cF.prevParsedValue=a,cF.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(cF):(cF.target=this,this.ownerDocument.defaultView.dispatchEvent(cF,!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=t1(t.getMin(),2),n=e[0],r=e[1],i=t1(t.getMax(),2);return new lD(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),cj.sceneGraphService.setOrigin(this,lw(t,e,n)),this},e.prototype.getOrigin=function(){return cj.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.setPosition(this,lw(t,e,n)),this},e.prototype.setLocalPosition=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.setLocalPosition(this,lw(t,e,n)),this},e.prototype.translate=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.translate(this,lw(t,e,n)),this},e.prototype.translateLocal=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),cj.sceneGraphService.translateLocal(this,lw(t,e,n)),this},e.prototype.getPosition=function(){return cj.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return cj.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=lw(t,e,n)),cj.sceneGraphService.scaleLocal(this,t),this},e.prototype.setLocalScale=function(t,e,n){return"number"==typeof t&&(e=e||t,n=n||t,t=lw(t,e,n)),cj.sceneGraphService.setLocalScale(this,t),this},e.prototype.getLocalScale=function(){return cj.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return cj.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){return lk(t1(lM(i5(),cj.sceneGraphService.getWorldTransform(this)),3)[2])},e.prototype.getLocalEulerAngles=function(){return lk(t1(lM(i5(),cj.sceneGraphService.getLocalRotation(this)),3)[2])},e.prototype.setEulerAngles=function(t){return cj.sceneGraphService.setEulerAngles(this,0,0,t),this},e.prototype.setLocalEulerAngles=function(t){return cj.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.prototype.rotateLocal=function(t,e,n){return ac(e)&&ac(n)?cj.sceneGraphService.rotateLocal(this,0,0,t):cj.sceneGraphService.rotateLocal(this,t,e,n),this},e.prototype.rotate=function(t,e,n){return ac(e)&&ac(n)?cj.sceneGraphService.rotate(this,0,0,t):cj.sceneGraphService.rotate(this,t,e,n),this},e.prototype.setRotation=function(t,e,n,r){return cj.sceneGraphService.setRotation(this,t,e,n,r),this},e.prototype.setLocalRotation=function(t,e,n,r){return cj.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.prototype.setLocalSkew=function(t,e){return cj.sceneGraphService.setLocalSkew(this,t,e),this},e.prototype.getRotation=function(){return cj.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return cj.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return cj.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return cj.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return cj.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(t){return cj.sceneGraphService.setLocalTransform(this,t),this},e.prototype.resetLocalTransform=function(){cj.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,t5([],t1(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,t5([],t1(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=t1(e,2),i=r[0],o=r[1];return i?aF(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=t1(oN(i5(),u),2),f=c[0],p=c[1],h=t1(oL(i5(),u),2),d=h[0],y=h[1],g=oI(o9(),u),v=t1(lM(i5(),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 i2(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=t1(lS(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=t1(lS(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(){cj.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.prototype.hide=function(){cj.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}(cR),cV=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,o=t.syntax;cj.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:o})},cU=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.CIRCLE,style:cj.enableCSSParsing?tK({cx:"",cy:"",r:""},n):tK({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cj.enableCSSParsing?null:[sl,sl]}},r))||this}return tX(e,t),e}(cH),cq=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);return(n=t.call(this,tK({style:cj.enableCSSParsing?tK({x:"",y:""},r):tK({},r)},i))||this).isCustomElement=!0,n}return tX(e,t),e}(cH),cY=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.ELLIPSE,style:cj.enableCSSParsing?tK({cx:"",cy:"",rx:"",ry:""},n):tK({},n),initialParsedStyle:{anchor:[.5,.5],transformOrigin:cj.enableCSSParsing?null:[sl,sl]}},r))||this}return tX(e,t),e}(cH),cX=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.GROUP,style:cj.enableCSSParsing?tK({x:"",y:"",width:"",height:""},n):tK({},n)},r))||this}return tX(e,t),e}(cH),cK=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);return(n=t.call(this,tK({type:dt.HTML,style:cj.enableCSSParsing?tK({x:"",y:"",width:"auto",height:"auto",innerHTML:""},r):tK({},r)},i))||this).cullable.enable=!1,n}return tX(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 lD(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 lN,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=oy(os(),this.parentNode.getWorldTransform()),e=this.getBounds();if(!lN.isEmpty(e)){var n=new lN;return n.setFromTransformedAABB(e,t),n}}return this.getBounds()},e}(cH),cZ=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.IMAGE,style:cj.enableCSSParsing?tK({x:"",y:"",img:"",width:"",height:""},n):tK({},n)},r))||this}return tX(e,t),e}(cH),cQ=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);(n=t.call(this,tK({type:dt.LINE,style:tK({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&&cD(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),l&&cD(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tX(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&&cD(r)&&(this.markerStartAngle=0,r.remove()),i&&cD(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&cD(r)&&(this.markerEndAngle=0,r.remove()),i&&cD(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&&cD(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=ll(r,i,o,a,t),c=u.x,f=u.y,p=oo(i5(),i6(c-l,f-s,0),e?this.getWorldTransform():this.getLocalTransform());return new lR(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 li(t.x1,t.y1,t.x2,t.y2)},e}(cH),cJ=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);(n=t.call(this,tK({type:dt.PATH,style:cj.enableCSSParsing?tK({path:"",miterLimit:""},r):tK({},r),initialParsedStyle:cj.enableCSSParsing?null:{miterLimit:4,path:tK({},ss)}},i))||this).markerStartAngle=0,n.markerEndAngle=0,n.markerMidList=[];var o=n.parsedStyle,a=o.markerStart,l=o.markerEnd,s=o.markerMid;return a&&cD(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&cD(s)&&n.placeMarkerMid(s),l&&cD(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tX(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&&cD(r)&&(this.markerStartAngle=0,r.remove()),i&&cD(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&cD(r)&&(this.markerEndAngle=0,r.remove()),i&&cD(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&&cD(d)){var y=0;if(t){var g=t1(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=t1(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&&cD(t))for(var o=1;o<n.length-1;o++){var a=t1(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 sW(this)},e.prototype.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,o=a_(n.path.absolutePath,t,tK(tK({},void 0),{bbox:!1,length:!0})).point,a=o.x,l=o.y,s=oo(i5(),i6(a-r,l-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lR(s[0],s[1])},e.prototype.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*sW(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}(cH),c0=function(t){function e(e){void 0===e&&(e={});var n=this,r=e.style,i=tZ(e,["style"]);(n=t.call(this,tK({type:dt.POLYGON,style:cj.enableCSSParsing?tK({points:"",miterLimit:"",isClosed:!0},r):tK({},r),initialParsedStyle:cj.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&&cD(a)&&(n.markerStartAngle=a.getLocalEulerAngles(),n.appendChild(a)),s&&cD(s)&&n.placeMarkerMid(s),l&&cD(l)&&(n.markerEndAngle=l.getLocalEulerAngles(),n.appendChild(l)),n.transformMarker(!0),n.transformMarker(!1),n}return tX(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&&cD(r)&&(this.markerStartAngle=0,r.remove()),i&&cD(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&cD(r)&&(this.markerEndAngle=0,r.remove()),i&&cD(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&&cD(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&&cD(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}(cH),c1=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.POLYLINE,style:cj.enableCSSParsing?tK({points:"",miterLimit:"",isClosed:!1},n):tK({},n),initialParsedStyle:cj.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r))||this}return tX(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=ll(a[u][0],a[u][1],a[u+1][0],a[u+1][1],s),f=c.x,p=c.y,h=oo(i5(),i6(f-r,p-i,0),e?this.getWorldTransform():this.getLocalTransform());return new lR(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}(c0),c2=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.RECT,style:cj.enableCSSParsing?tK({x:"",y:"",width:"",height:"",radius:""},n):tK({},n)},r))||this}return tX(e,t),e}(cH),c5=function(t){function e(e){void 0===e&&(e={});var n=e.style,r=tZ(e,["style"]);return t.call(this,tK({type:dt.TEXT,style:cj.enableCSSParsing?tK({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):tK({fill:"black"},n),initialParsedStyle:cj.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 tX(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}(cH),c3=function(){function t(){this.registry={},this.define(dt.CIRCLE,cU),this.define(dt.ELLIPSE,cY),this.define(dt.RECT,c2),this.define(dt.IMAGE,cZ),this.define(dt.LINE,cQ),this.define(dt.GROUP,cX),this.define(dt.PATH,cJ),this.define(dt.POLYGON,c0),this.define(dt.POLYLINE,c1),this.define(dt.TEXT,c5),this.define(dt.HTML,cK)}return t.prototype.define=function(t,e){this.registry[t]=e},t.prototype.get=function(t){return this.registry[t]},t}(),c4=function(t){function e(){var e=t.call(this)||this;e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new cj.AnimationTimeline(e)}catch(t){}var n={};return up.forEach(function(t){var e=t.n,r=t.inh,i=t.d;r&&i&&(n[e]=l1(i)?i(dt.GROUP):i)}),e.documentElement=new cX({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return tX(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?c5:cX);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(lF)},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 tQ(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tJ(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 tQ(this,void 0,void 0,function(){var n,r,i,o,a,l,s,u,c,f;return tJ(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(lB)},e.prototype.insertBefore=function(t,e){throw Error(lB)},e.prototype.removeChild=function(t,e){throw Error(lB)},e.prototype.replaceChild=function(t,e,n){throw Error(lB)},e.prototype.append=function(){throw Error(lB)},e.prototype.prepend=function(){throw Error(lB)},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}(cd),c6=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 cp(dv.CULLED)),null)}return t}),r.hooks.afterRender.tap(t.tag,function(t){t.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),c8=function(){function t(){var t=this;this.autoPreventDefault=!1,this.rootPointerEvent=new cc(null),this.rootWheelEvent=new cf(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=t0(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=t0(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=t0(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=t0(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=t0(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||ac(r)||ac(i)){var l=this.context.eventService.client2Viewport(new lR(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=uH[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=uV.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];aB(i.button)&&(i.button=0),aB(i.buttons)&&(i.buttons=1),aB(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),aB(i.width)&&(i.width=i.radiusX||1),aB(i.height)&&(i.height=i.radiusY||1),aB(i.tiltX)&&(i.tiltX=0),aB(i.tiltY)&&(i.tiltY=0),aB(i.pointerType)&&(i.pointerType="touch"),aB(i.pointerId)&&(i.pointerId=i.identifier||0),aB(i.pressure)&&(i.pressure=i.force||.5),aB(i.twist)&&(i.twist=0),aB(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)&&(aB(t.isPrimary)&&(t.isPrimary=!0),aB(t.width)&&(t.width=1),aB(t.height)&&(t.height=1),aB(t.tiltX)&&(t.tiltX=0),aB(t.tiltY)&&(t.tiltY=0),aB(t.pointerType)&&(t.pointerType="mouse"),aB(t.pointerId)&&(t.pointerId=1),aB(t.pressure)&&(t.pressure=.5),aB(t.twist)&&(t.twist=0),aB(t.tangentialPressure)&&(t.tangentialPressure=0),t.isNormalized=!0),n.push(t);return n},t.tag="Event",t}(),c9=[dt.CIRCLE,dt.ELLIPSE,dt.IMAGE,dt.RECT,dt.LINE,dt.POLYLINE,dt.POLYGON,dt.TEXT,dt.PATH,dt.HTML],c7=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(lN.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||dn.INDETERMINATE,a.planes),i.visible=i.visibilityPlaneMask!==dn.OUTSIDE,i.visible},t.prototype.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===dn.OUTSIDE||n===dn.INSIDE)return n;for(var i=dn.INSIDE,o=c9.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(or(c,e.getPositiveFarPoint(r[a]))+f<0)return dn.OUTSIDE;or(c,e.getNegativeFarPoint(r[a]))+f<0&&(i|=s)}}return i},t}(),ft=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;cj.enableSizeAttenuation&&cj.styleValueRegistry.updateSizeAttenuation(e,a.getCamera().getZoom()),cj.enableCSSParsing&&cj.styleValueRegistry.recalc(e),cj.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),cj.sceneGraphService.dirtifyToRoot(e),r.dirtify()};r.hooks.init.tap(t.tag,function(){a.addEventListener(dv.MOUNTED,u),a.addEventListener(dv.UNMOUNTED,c),a.addEventListener(dv.ATTR_MODIFIED,l),a.addEventListener(dv.BOUNDS_CHANGED,s)}),r.hooks.destroy.tap(t.tag,function(){a.removeEventListener(dv.MOUNTED,u),a.removeEventListener(dv.UNMOUNTED,c),a.removeEventListener(dv.ATTR_MODIFIED,l),a.removeEventListener(dv.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=t1(i.getMin(),2),a=o[0],l=o[1],s=t1(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}();(h7=db||(db={})).READY="ready",h7.BEFORE_RENDER="beforerender",h7.RERENDER="rerender",h7.AFTER_RENDER="afterrender",h7.BEFORE_DESTROY="beforedestroy",h7.AFTER_DESTROY="afterdestroy",h7.RESIZE="resize",h7.DIRTY_RECTANGLE="dirtyrectangle",h7.RENDERER_CHANGED="rendererchanged";var fe=new cp(dv.MOUNTED),fn=new cp(dv.UNMOUNTED),fr=new cp(db.BEFORE_RENDER),fi=new cp(db.RERENDER),fo=new cp(db.AFTER_RENDER),fa=function(t){function e(e){var n,r,i=t.call(this)||this;i.Element=cH,i.inited=!1,i.context={},i.document=new c4,i.document.defaultView=i,i.customElements=new c3;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||uB++;uF[n]&&uF[n].destroy(),uF[n]=e}}(o,i);var _=s,P=u,j=c;return a&&(j=(j=c||uz&&window.devicePixelRatio||1)>=1?Math.ceil(j):1,_=s||("auto"===(n=uG(a,"width"))?a.offsetWidth:parseFloat(n))||a.width/j,P=u||("auto"===(r=uG(a,"height"))?a.offsetHeight:parseFloat(r))||a.height/j),l&&(cj.offscreenCanvas=l),i.devicePixelRatio=j,i.requestAnimationFrame=null!=y?y:u1.bind(cj.globalThis),i.cancelAnimationFrame=null!=g?g:u2.bind(cj.globalThis),i.supportsTouchEvents=null!=x?x:"ontouchstart"in cj.globalThis,i.supportsPointerEvents=null!=b?b:!!cj.globalThis.PointerEvent,i.isTouchEvent=null!=M?M:function(t){return i.supportsTouchEvents&&t instanceof cj.globalThis.TouchEvent},i.isMouseEvent=null!=S?S:function(t){return!cj.globalThis.MouseEvent||t instanceof cj.globalThis.MouseEvent&&(!i.supportsPointerEvents||!(t instanceof cj.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 tX(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 cj.CameraContribution;i.clipSpaceNearZ=n,i.setType(dr.EXPLORING,di.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(lz.UPDATED,function(){r.context.renderingContext.renderReasons.add(dm.CAMERA_CHANGED),cj.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){cj.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 cp(db.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 cp(db.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===da.ORTHOGRAPHIC?r.setOrthographic(-(t/2),t/2,e/2,-(e/2),r.getNear(),r.getFar()):r.setAspect(t/e),this.dispatchEvent(new cp(db.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(fr),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(fi)}),this.dispatchEvent(fo)},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 ld,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new c8,new ft,new c6([new c7])),this.loadRendererContainerModule(t),this.context.contextService=new this.context.ContextService(tK(tK({},cj),this.context)),this.context.renderingService=new cm(cj,this.context),this.context.eventService=new cy(cj,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 cp(db.READY))}):r.dispatchEvent(new cp(db.READY)),r.readyPromise&&r.resolveReadyPromise()):r.dispatchEvent(new cp(db.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(cj)})},e.prototype.setRenderer=function(t){var e=this.getConfig();if(e.renderer!==t){var n=e.renderer;e.renderer=t,this.destroy(!1,!0),t5([],t1(null==n?void 0:n.getPlugins()),!1).reverse().forEach(function(t){t.destroy(cj)}),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(fn):(fn.target=t,this.dispatchEvent(fn,!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(fe):(fe.target=t,this.dispatchEvent(fe,!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}(ch),fl={}.toString,fs=function(t,e){return fl.call(t)==="[object "+e+"]"},fu=function(t){function e(){var e=t.apply(this,t5([],t1(arguments),!1))||this;return e.landmarks=[],e}return tX(e,t),e.prototype.rotate=function(t,e,n){if(this.relElevation=lO(e),this.relAzimuth=lO(t),this.relRoll=lO(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===dr.EXPLORING){var r=o7(o9(),[1,0,0],lE((this.rotateWorld?1:-1)*this.relElevation)),i=o7(o9(),[0,1,0],lE((this.rotateWorld?1:-1)*this.relAzimuth)),o=o7(o9(),[0,0,1],lE(this.relRoll)),a=at(o9(),i,r);a=at(o9(),a,o);var l=oF(os(),a);ob(this.matrix,this.matrix,[0,0,-this.distance]),ov(this.matrix,this.matrix,l),ob(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===dr.ORBITING||this.type===dr.EXPLORING?this._getPosition():this.type===dr.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(t,e){var n=lw(t,e,0),r=i3(this.position);return i7(r,r,oe(i5(),this.right,n[0])),i7(r,r,oe(i5(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this},e.prototype.dolly=function(t){var e=this.forward,n=i3(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===dr.ORBITING||this.type===dr.EXPLORING?this._getDistance():this.type===dr.TRACKING&&i7(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 cj.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:ou(p.getWorldTransform()),right:i3(p.right),up:i3(p.up),forward:i3(p.forward),position:i3(p.getPosition()),focalPoint:i3(p.getFocalPoint()),distanceVector:i3(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=fs(t,"String")?this.landmarks.find(function(e){return e.name===t}):t;if(r){var i,o=fs(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)||cj.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=i5(),a=i5(),l=1,u=0;if(oi(o,n.focalPoint,y,r),oi(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),ol(o,y)+ol(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=oc(this.matrix,t.matrix),this.right=i8(this.right,t.right),this.up=i8(this.up,t.up),this.forward=i8(this.forward,t.forward),this.position=i8(this.position,t.position),this.focalPoint=i8(this.focalPoint,t.focalPoint),this.distanceVector=i8(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}(lW);cj.CameraContribution=fu;var fc=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}(),ff=0,fp=new WeakMap,fh=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:dO&&(t===dO||t===dx)?dO:null}(n[r-1],t);if(i){n[r-1]=i;return}}else{e=this.observer,fm.push(e),fg||(fg=!0,void 0!==cj.globalThis?cj.globalThis.setTimeout(fv):fv())}n[r]=t},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(t){var e=this.options;e.attributes&&t.addEventListener(dv.ATTR_MODIFIED,this,!0),e.childList&&t.addEventListener(dv.INSERTED,this,!0),(e.childList||e.subtree)&&t.addEventListener(dv.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(t){var e=this.options;e.attributes&&t.removeEventListener(dv.ATTR_MODIFIED,this,!0),e.childList&&t.removeEventListener(dv.INSERTED,this,!0),(e.childList||e.subtree)&&t.removeEventListener(dv.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=fp.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 dv.ATTR_MODIFIED:var e,n,r=t.attrName,i=t.relatedNode.namespaceURI;(e=dx=new fc("attributes",n=t.target)).attributeName=r,e.attributeNamespace=i;var o=t.attrChange===cx.ADDITION?null:t.prevValue;fy(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,dO||((dO=fc.copy(dx)).oldValue=n),dO):e}});break;case dv.REMOVED:case dv.INSERTED:n=t.relatedNode;var a=t.target,l=void 0,s=void 0;t.type===dv.INSERTED?(l=[a],s=[]):(l=[],s=[a]);var u=a.previousSibling,c=a.nextSibling;(e=dx=new fc("childList",n)).addedNodes=l,e.removedNodes=s,e.previousSibling=u,e.nextSibling=c,fy(n,function(t){if(t.childList)return e})}dx=dO=void 0},t}();function fd(t){this.callback=t,this.nodes=[],this.records=[],this.uid=ff++}function fy(t,e){for(var n=t;n;n=n.parentNode){var r=fp.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)}}}}fd.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=fp.get(t);r||fp.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 fh(this,t,e),r.push(n),this.nodes.push(t)),n.addListeners()},fd.prototype.disconnect=function(){var t=this;this.nodes.forEach(function(e){for(var n=fp.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=[]},fd.prototype.takeRecords=function(){var t=this.records;return this.records=[],t};var fg=!1,fm=[];function fv(){fg=!1;var t=fm;fm=[],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=fp.get(e);n&&n.forEach(function(e){e.observer===t&&e.removeTransientObservers()})}),n.length&&(t.callback(n,t),e=!0)}),e&&fv()}var fb=function(t,e,n){return t<e?e:t>n?n:t},fx={}.toString,fO=function(t){return"[object Number]"===fx.call(t)},fw=function(t){return null==t},fE=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 tX(e,t),e}(cs),fk=0,fM=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(fk++),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 fE(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(lF)},t.prototype.addEventListener=function(t,e,n){throw Error(lF)},t.prototype.removeEventListener=function(t,e,n){throw Error(lF)},t.prototype.dispatchEvent=function(t){throw Error(lF)},t.prototype.commitStyles=function(){throw Error(lF)},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 fE(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 fE(null,this,this.currentTime,t);this.onframe(r)}this._finishedFlag=!1}},t}(),fS="function"==typeof Float32Array,f_=function(t,e){return 1-3*e+3*t},fP=function(t,e){return 3*e-6*t},fj=function(t){return 3*t},fA=function(t,e,n){return((f_(e,n)*t+fP(e,n))*t+fj(e))*t},fT=function(t,e,n){return 3*f_(e,n)*t*t+2*fP(e,n)*t+fj(e)},fC=function(t,e,n,r,i){var o,a,l=0;do(o=fA(a=e+(n-e)/2,r,i)-t)>0?n=a:e=a;while(Math.abs(o)>1e-7&&++l<10);return a},fN=function(t,e,n,r){for(var i=0;i<4;++i){var o=fT(e,n,r);if(0===o)break;var a=fA(e,n,r)-t;e-=a/o}return e},fL=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=fS?new Float32Array(11):Array(11),o=0;o<11;++o)i[o]=fA(.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=fT(a,t,n);return l>=.001?fN(e,a,t,n):0===l?a:fC(e,r,r+.1,t,n)};return function(t){return 0===t||1===t?t:fA(a(t),e,r)}},fI=function(t){return Math.pow(t,2)},fR=function(t){return Math.pow(t,3)},fD=function(t){return Math.pow(t,4)},fF=function(t){return Math.pow(t,5)},fB=function(t){return Math.pow(t,6)},fz=function(t){return 1-Math.cos(t*Math.PI/2)},fW=function(t){return 1-Math.sqrt(1-t*t)},f$=function(t){return t*t*(3*t-2)},fG=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)},fH=function(t,e){void 0===e&&(e=[]);var n=t1(e,2),r=n[0],i=n[1],o=fb(Number(void 0===r?1:r),1,10),a=fb(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)},fV=function(t,e,n){void 0===e&&(e=[]);var r=t1(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=fb(o,.1,1e3),l=fb(l,.1,1e3),u=fb(u,.1,1e3),f=fb(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},fU=function(t,e){void 0===e&&(e=[]);var n=t1(e,2),r=n[0],i=void 0===r?10:r;return("start"==n[1]?Math.ceil:Math.floor)(fb(t,0,1)*i)/i},fq=function(t,e){void 0===e&&(e=[]);var n=t1(e,4);return fL(n[0],n[1],n[2],n[3])(t)},fY=fL(.42,0,1,1),fX=function(t){return function(e,n,r){return void 0===n&&(n=[]),1-t(1-e,n,r)}},fK=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}},fZ=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}},fQ={steps:fU,"step-start":function(t){return fU(t,[1,"start"])},"step-end":function(t){return fU(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":fq,ease:function(t){return fq(t,[.25,.1,.25,1])},in:fY,out:fX(fY),"in-out":fK(fY),"out-in":fZ(fY),"in-quad":fI,"out-quad":fX(fI),"in-out-quad":fK(fI),"out-in-quad":fZ(fI),"in-cubic":fR,"out-cubic":fX(fR),"in-out-cubic":fK(fR),"out-in-cubic":fZ(fR),"in-quart":fD,"out-quart":fX(fD),"in-out-quart":fK(fD),"out-in-quart":fZ(fD),"in-quint":fF,"out-quint":fX(fF),"in-out-quint":fK(fF),"out-in-quint":fZ(fF),"in-expo":fB,"out-expo":fX(fB),"in-out-expo":fK(fB),"out-in-expo":fZ(fB),"in-sine":fz,"out-sine":fX(fz),"in-out-sine":fK(fz),"out-in-sine":fZ(fz),"in-circ":fW,"out-circ":fX(fW),"in-out-circ":fK(fW),"out-in-circ":fZ(fW),"in-back":f$,"out-back":fX(f$),"in-out-back":fK(f$),"out-in-back":fZ(f$),"in-bounce":fG,"out-bounce":fX(fG),"in-out-bounce":fK(fG),"out-in-bounce":fZ(fG),"in-elastic":fH,"out-elastic":fX(fH),"in-out-elastic":fK(fH),"out-in-elastic":fZ(fH),spring:fV,"spring-in":fV,"spring-out":fX(fV),"spring-in-out":fK(fV),"spring-out-in":fZ(fV)},fJ=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()},f0=function(t){return t};function f1(t,e){return function(n){if(n>=1)return 1;var r=1/t;return(n+=e*r)-n%r}}var f2="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",f5=RegExp("cubic-bezier\\("+f2+","+f2+","+f2+","+f2+"\\)"),f3=/steps\(\s*(\d+)\s*\)/,f4=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function f6(t){var e=f5.exec(t);if(e)return fL.apply(void 0,t5([],t1(e.slice(1).map(Number)),!1));var n=f3.exec(t);if(n)return f1(Number(n[1]),0);var r=f4.exec(t);return r?f1(Number(r[1]),{start:1,middle:.5,end:0}[r[2]]):fQ[fJ(t)]||fQ.linear}function f8(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var f9=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!cj.enableCSSParsing&&fO(i)?i:n(i)}},f7=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=f0,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=f6(t),this._easing=t},enumerable:!1,configurable:!0}),t}();function pt(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(fw(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(!fw(l)&&!fw(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 pe="backwards|forwards|both|none".split("|"),pn="reverse|alternate|alternate-reverse".split("|"),pr=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 f7,"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===pe.indexOf(l[t])||("direction"!==t||-1!==pn.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=pt(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=ud[t];if(i&&i.syntax&&i.int){var o=cj.styleValueRegistry.getPropertySyntax(i.syntax);if(o){var a=void 0,l=void 0;if(cj.enableCSSParsing){var s=cj.styleValueRegistry.parseProperty(t,e,r,!1),u=cj.styleValueRegistry.parseProperty(t,n,r,!1);a=cj.styleValueRegistry.computeProperty(t,s,r,!1),l=cj.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=f9.apply(void 0,t5([],t1(f),!1));return function(t){return 0===t?e:1===t?n:p(t)}}}}return f9(!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(f8(i)){var o={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:f6(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)f8(n)&&t.setAttribute(n,null)});var g=cj.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=pt(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 pi(t,e){return Number(t.id)-Number(e.id)}var po=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(pi),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 fM(new pr(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(pi),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,t5([],t1(a),!1)),(i=this.pendingEffects).push.apply(i,t5([],t1(l),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,u]},t}();function pa(t){let{transformations:e}=t.getOptions();return e.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function pl(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"polar"===t)}function ps(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"reflect"===t)&&e.some(([t])=>t.startsWith("transpose"))}function pu(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"helix"===t)}function pc(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"parallel"===t)}function pf(t){let{transformations:e}=t.getOptions();return e.some(([t])=>"fisheye"===t)}function pp(t){return pu(t)||pl(t)}function ph(t){let{transformations:e}=t.getOptions(),[,,,n,r]=e.find(t=>"polar"===t[0]);return[+n,+r]}function pd(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]}cj.EasingFunction=f6,cj.AnimationTimeline=po;let py=(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}))},pg=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=py(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};pg.props={};let pm=(t={})=>Object.assign(Object.assign({},{startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1}),t),pv=t=>{let{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=pm(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...pg({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};function pb(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 px(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function pO(t){return t.map((t,e)=>e)}function pw(t){return t[t.length-1]}function pE(t,e){let n=[[],[]];return t.forEach(t=>{n[+!e(t)].push(t)}),n}function pk([t,e],[n,r]){return[t-n,e-r]}pv.props={};function pM([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function pS([t,e]){return Math.atan2(e,t)}function p_([t,e]){return pS([t,e])+Math.PI/2}function pP(t,e){let n=pS(t),r=pS(e);return n<r?r-n:2*Math.PI-(n-r)}function pj(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 pA([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function pT(t,e){for(let[n,r]of Object.entries(e))t.style(n,r)}function pC(t,e,n,r,i){let o=pS(pk(r,e))+Math.PI,a=pS(pk(r,n))+Math.PI;return t.arc(r[0],r[1],i,o,a,a-o<0),t}function pN(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=pO(a),[u,c]=pb(s,t=>a[t]),f=new ex({domain:[u,c],range:[0,100]}),p=t=>i0(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 pL(t){let[e,n,r,i]=t;return[i,e,n,r]}function pI(t,e,n){let[r,i,,o]=pa(t)?pL(e):e,[a,l]=n,s=t.getCenter(),u=p_(pk(r,s)),c=p_(pk(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:pM(o,s),outerRadius:pM(r,s)}}function pR(t){let{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function pD(t,e){if(!pl(t))return"";let n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function pF(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]}function pB(t){return new pz([t],null,t,t.ownerDocument)}class pz{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 pz("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 pz(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 pz([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 pz(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 pz(n,null,n[0],this._document)}maybeAppend(t,e,n){let r=this._elements[0],i=r.getElementById(t);if(i)return new pz([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 pz([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=iB(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 pz([],r,this._parent,this._document),new pz(i,null,this._parent,this._document),new pz(o,null,this._parent,this._document),new pz([],a,this._parent,this._document),new pz(l,null,this._parent,this._document)];return new pz(this._elements,null,this._parent,this._document,f)}merge(t){let e=[...this._elements,...t._elements],n=[...this._transitions,...t._transitions];return new pz(e,null,this._parent,this._document,void 0,n)}createElement(t){if(this._document)return this._document.createElement(t,{});let e=pz.registry[t];return e?new e:n1(`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 pz([],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}}pz.registry={g:cX,rect:c2,circle:cU,path:cJ,text:c5,ellipse:cY,image:cZ,line:cQ,polygon:c0,polyline:c1,html:cK};var pW=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 p$={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},pG={style:{shape:(t,e)=>{let{shape:n,radius:r}=t,i=pW(t,["shape","radius"]),o=n3(i,"pointer"),a=n3(i,"pin"),{shape:l}=o,s=pW(o,["shape"]),{shape:u}=a,c=pW(a,["shape"]),{coordinate:f,theme:p}=e;return(t,e)=>{let n=t.map(t=>f.invert(t)),[o,a,h]=function(t,e){let{transformations:n}=t.getOptions(),[,...r]=n.find(t=>t[0]===e);return r}(f,"polar"),d=f.clone(),{color:y}=e,g=pv({startAngle:o,endAngle:a,innerRadius:h,outerRadius:r});g.push(["cartesian"]),d.update({transformations:g});let v=n.map(t=>d.map(t)),[b,x]=pF(v),[O,w]=f.getCenter(),E=Object.assign(Object.assign({x1:b,y1:x,x2:O,y2:w,stroke:y},s),i),k=Object.assign(Object.assign({cx:O,cy:w,stroke:y},c),i),M=pB(new cX);return n7(l)||("function"==typeof l?M.append(()=>l(v,e,d,p)):M.append("line").call(pT,E).node()),n7(u)||("function"==typeof u?M.append(()=>u(v,e,d,p)):M.append("circle").call(pT,k).node()),M.node()}},lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},pH={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}},pV=t=>{var e;let{data:n={},scale:r={},style:i={},animate:o={},transform:a=[]}=t,l=pW(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:u,target:c,total:f,scale:p}=function(t,e){let{name:n="score",target:r,total:i,percent:o,thresholds:a=[]}=function(t){if(i0(t)){let e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}(t),l=o||r,s=o?1:i,u=Object.assign({y:{domain:[0,s]}},e);return a.length?{targetData:[{x:n,y:l,color:"target"}],totalData:a.map((t,e)=>({x:n,y:e>=1?t-a[e-1]:t,color:e})),target:l,total:s,scale:u}:{targetData:[{x:n,y:l,color:"target"}],totalData:[{x:n,y:l,color:"target"},{x:n,y:s-l,color:"total"}],target:l,total:s,scale:u}}(n,r),h=n3(i,"text"),d=(e=["pointer","pin"],Object.fromEntries(Object.entries(i).filter(([t])=>e.find(e=>t.startsWith(e)))));return[nK({},p$,Object.assign({type:"interval",transform:[{type:"stackY"}],data:u,scale:p,style:n3(i,"arc"),animate:"object"==typeof o?n3(o,"arc"):o},l)),nK({},p$,pG,Object.assign({type:"point",data:s,scale:p,style:d,animate:"object"==typeof o?n3(o,"indicator"):o},l)),nK({},pH,{style:Object.assign({text:function(t,{target:e,total:n}){let{content:r}=t;return r?r(e,n):e.toString()}(h,{target:c,total:f})},h),animate:"object"==typeof o?n3(o,"text"):o})]};pV.props={};let pU=Math.PI/180;function pq(t){return t.text}function pY(){return"serif"}function pX(){return"normal"}function pK(t){return t.value}function pZ(){return 90*~~(2*Math.random())}function pQ(){return 1}function pJ(){}function p0(t){let e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function p1(t){let e=[],n=-1;for(;++n<t;)e[n]=0;return e}function p2(t){return"function"==typeof t?t:function(){return t}}let p5={archimedean:p0,rectangular:function(t){let e=4*t[0]/t[1],n=0,r=0;return function(t){let i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}};var p3=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 p4={size:[500,500],fontSize:[14,28]};function p6(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement)return void e(t);if("string"==typeof t){let r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}let p8=t=>e=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let n=Object.assign({},p4,t),r=function(){let t=[256,256],e=pq,n=pY,r=pK,i=pX,o=pZ,a=pQ,l=p0,s=Math.random,u=pJ,c=[],f=null,p=1/0,h={};return h.start=function(){let[d,y]=t,g=function(t){t.width=t.height=1;let e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;let n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(document.createElement("canvas")),v=h.board?h.board:p1((t[0]>>5)*t[1]),b=c.length,x=[],O=c.map(function(t,l,s){return t.text=e.call(this,t,l,s),t.font=n.call(this,t,l,s),t.style=pX.call(this,t,l,s),t.weight=i.call(this,t,l,s),t.rotate=o.call(this,t,l,s),t.size=~~r.call(this,t,l,s),t.padding=a.call(this,t,l,s),t}).sort(function(t,e){return e.size-t.size}),w=-1,E=h.board?[{x:0,y:0},{x:d,y:y}]:void 0;function k(){let e=Date.now();for(;Date.now()-e<p&&++w<b;){let e=O[w];e.x=d*(s()+.5)>>1,e.y=y*(s()+.5)>>1,function(t,e,n,r){if(e.sprite)return;let i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);let a=0,l=0,s=0,u=n.length;for(--r;++r<u;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;let t=i.measureText(e.text+"m").width*o,u=e.size<<1;if(e.rotate){let n=Math.sin(e.rotate*pU),r=Math.cos(e.rotate*pU),i=t*r,o=t*n,a=u*r,l=u*n;t=Math.max(Math.abs(i+l),Math.abs(i-l))+31>>5<<5,u=~~Math.max(Math.abs(o+a),Math.abs(o-a))}else t=t+31>>5<<5;if(u>s&&(s=u),a+t>=2048&&(a=0,l+=s,s=0),l+u>=2048)break;i.translate((a+(t>>1))/o,(l+(u>>1))/o),e.rotate&&i.rotate(e.rotate*pU),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=t,e.height=u,e.xoff=a,e.yoff=l,e.x1=t>>1,e.y1=u>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=t}let c=i.getImageData(0,0,2048/o,2048/o).data,f=[];for(;--r>=0;){if(!(e=n[r]).hasText)continue;let t=e.width,i=t>>5,o=e.y1-e.y0;for(let t=0;t<o*i;t++)f[t]=0;if(null==(a=e.xoff))return;l=e.yoff;let s=0,u=-1;for(let n=0;n<o;n++){for(let e=0;e<t;e++){let t=i*n+(e>>5),r=c[(l+n)*2048+(a+e)<<2]?1<<31-e%32:0;f[t]|=r,s|=r}s?u=n:(e.y0++,o--,n--,l++)}e.y1=e.y0+u,e.sprite=f.slice(0,(e.y1-e.y0)*i)}}(g,e,O,w),e.hasText&&function(e,n,r){let i=n.x,o=n.y,a=Math.sqrt(t[0]*t[0]+t[1]*t[1]),u=l(t),c=.5>s()?1:-1,f,p=-c,h,d;for(;(f=u(p+=c))&&!(Math.min(Math.abs(h=~~f[0]),Math.abs(d=~~f[1]))>=a);){;if((n.x=i+h,n.y=o+d,!(n.x+n.x0<0)&&!(n.y+n.y0<0)&&!(n.x+n.x1>t[0])&&!(n.y+n.y1>t[1]))&&(!r||!function(t,e,n){n>>=5;let r=t.sprite,i=t.width>>5,o=t.x-(i<<4),a=127&o,l=32-a,s=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(let t=0;t<s;t++){c=0;for(let n=0;n<=i;n++)if((c<<l|(n<i?(c=r[t*i+n])>>>a:0))&e[u+n])return!0;u+=n}return!1}(n,e,t[0]))&&(!r||n.x+n.x1>r[0].x&&n.x+n.x0<r[1].x&&n.y+n.y1>r[0].y&&n.y+n.y0<r[1].y)){let r=n.sprite,i=n.width>>5,o=t[0]>>5,a=n.x-(i<<4),l=127&a,s=32-l,u=n.y1-n.y0,c,f=(n.y+n.y0)*o+(a>>5);for(let t=0;t<u;t++){c=0;for(let n=0;n<=i;n++)e[f+n]|=c<<s|(n<i?(c=r[t*i+n])>>>l:0);f+=o}return delete n.sprite,!0}}return!1}(v,e,E)&&(u.call(null,"word",{cloud:h,word:e}),x.push(e),E?h.hasImage||function(t,e){let n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}(E,e):E=[{x:e.x+e.x0,y:e.y+e.y0},{x:e.x+e.x1,y:e.y+e.y1}],e.x-=t[0]>>1,e.y-=t[1]>>1)}h._tags=x,h._bounds=E,w>=b&&(h.stop(),u.call(null,"end",{cloud:h,words:x,bounds:E}))}return f&&clearInterval(f),f=setInterval(k,0),k(),h},h.stop=function(){return f&&(clearInterval(f),f=null),h},h.createMask=e=>{let n=document.createElement("canvas"),[r,i]=t;if(!r||!i)return;let o=r>>5,a=p1((r>>5)*i);n.width=r,n.height=i;let l=n.getContext("2d");l.drawImage(e,0,0,e.width,e.height,0,0,r,i);let s=l.getImageData(0,0,r,i).data;for(let t=0;t<i;t++)for(let e=0;e<r;e++){let n=o*t+(e>>5),i=t*r+e<<2,l=s[i]>=250&&s[i+1]>=250&&s[i+2]>=250?1<<31-e%32:0;a[n]|=l}h.board=a,h.hasImage=!0},h.timeInterval=function(t){p=null==t?1/0:t},h.words=function(t){c=t},h.size=function(e=[]){t=[+e[0],+e[1]]},h.text=function(t){e=p2(t)},h.font=function(t){n=p2(t)},h.fontWeight=function(t){i=p2(t)},h.rotate=function(t){o=p2(t)},h.spiral=function(t){l=p5[t]||t},h.fontSize=function(t){r=p2(t)},h.padding=function(t){a=p2(t)},h.random=function(t){s=p2(t)},h.on=function(t){u=p2(t)},h}();yield({set(t,e,i){if(void 0===n[t])return this;let o=e?e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},setAsync(t,e,i){var o,a,l,s;return o=this,a=void 0,l=void 0,s=function*(){if(void 0===n[t])return this;let o=e?yield e.call(null,n[t]):n[t];return i?i.call(null,o):"function"==typeof r[t]?r[t](o):r[t]=o,this},new(l||(l=Promise))(function(t,e){function n(t){try{i(s.next(t))}catch(t){e(t)}}function r(t){try{i(s.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):((i=e.value)instanceof l?i:new l(function(t){t(i)})).then(n,r)}i((s=s.apply(o,a||[])).next())})}}).set("fontSize",t=>{let n=e.map(t=>t.value);var r=[iE(n),ik(n)];if("function"==typeof t)return t;if(Array.isArray(t)){let[e,n]=t;if(!r)return()=>(n+e)/2;let[i,o]=r;return o===i?()=>(n+e)/2:({value:t})=>(n-e)/(o-i)*(t-i)+e}return()=>t}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",p6,r.createMask),r.words([...e]);let i=r.start(),[o,a]=n.size,l=[{x:0,y:0},{x:o,y:a}],{_bounds:s=l,_tags:u,hasImage:c}=i,f=u.map(t=>{var{x:e,y:n}=t;return Object.assign(Object.assign({},p3(t,["x","y"])),{x:e+o/2,y:n+a/2})}),[{x:p,y:h},{x:d,y:y}]=s,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:c?0:p,y:c?0:h}),Object.assign(Object.assign({},g),{x:c?o:d,y:c?a:y})),f},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};p8.props={};var p9=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 p7=(t,e)=>({size:[t,e]}),ht=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),he=(t,e)=>{var n,r,i,o;return n=void 0,r=void 0,i=void 0,o=function*(){let{width:n,height:r}=e,{data:i,encode:o={},scale:a,style:l={},layout:s={}}=t,u=p9(t,["data","encode","scale","style","layout"]),c=function(t,e){let{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(i,o),f=yield p8(Object.assign(Object.assign({},p7(n,r)),s))(c);return nK({},ht(n,r),Object.assign(Object.assign({data:f,encode:o,scale:a,style:l},u),{axis:!1}))},new(i||(i=Promise))(function(t,e){function a(t){try{s(o.next(t))}catch(t){e(t)}}function l(t){try{s(o.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):((n=e.value)instanceof i?n:new i(function(t){t(n)})).then(a,l)}s((o=o.apply(n,r||[])).next())})};function hn(t,e,n){return Math.max(e,Math.min(t,n))}function hr(t,e=10){return"number"!=typeof t||1e-15>Math.abs(t)?t:parseFloat(t.toFixed(e))}he.props={};var hi=function(t){return"function"==typeof t};let ho={pin:function(t,e,n){let r=4*n/3,i=Math.max(r,2*n),o=r/2,a=o+e-i/2,l=Math.asin(o/((i-o)*.85)),s=Math.sin(l)*o,u=Math.cos(l)*o,c=t-u,f=a+s,p=a+o/Math.sin(l);return`
11
11
  M ${c} ${f}
12
12
  A ${o} ${o} 0 1 1 ${c+2*u} ${f}
13
13
  Q ${t} ${p} ${t} ${e+i/2}