!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).S2={})}(this,(function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var A=r.call(e,n||"default");if("object"!=t(A))return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var A=t[r];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(e,n(A.key),A)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function f(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e,t,n){return t=h(t),f(e,d()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,A,i,o,a=[],s=!0,l=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);s=!0);}catch(e){l=!0,A=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw A}}return a}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var C="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function B(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function A(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new A(r,i||e,o),s=n?n+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],a]:e._events[s].push(a):(e._events[s]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,A=[];if(0===this._eventsCount)return A;for(r in e=this._events)t.call(e,r)&&A.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?A.concat(Object.getOwnPropertySymbols(e)):A},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var A=0,i=r.length,o=new Array(i);A<i;A++)o[A]=r[A].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,A,i,o){var a=n?n+e:e;if(!this._events[a])return!1;var s,l,u=this._events[a],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,A),!0;case 5:return u.fn.call(u.context,t,r,A,i),!0;case 6:return u.fn.call(u.context,t,r,A,i,o),!0}for(l=1,s=new Array(c-1);l<c;l++)s[l-1]=arguments[l];u.fn.apply(u.context,s)}else{var h,d=u.length;for(l=0;l<d;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),c){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,A);break;default:if(!s)for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];u[l].fn.apply(u[l].context,s)}}return!0},a.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,A){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return o(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||A&&!a.once||r&&a.context!==r||o(this,i);else{for(var s=0,l=[],u=a.length;s<u;s++)(a[s].fn!==t||A&&!a[s].once||r&&a[s].context!==r)&&l.push(a[s]);l.length?this._events[i]=1===l.length?l[0]:l:o(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a}(m);var w=B(m.exports),E=1e-6,x="undefined"!=typeof Float32Array?Float32Array:Array;function S(){var e=new x(9);return x!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function T(){var e=new x(16);return x!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function F(e){var t=new x(16);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 b(e,t){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 I(e,t,n,r,A,i,o,a,s,l,u,c,h,d,f,p){var g=new x(16);return g[0]=e,g[1]=t,g[2]=n,g[3]=r,g[4]=A,g[5]=i,g[6]=o,g[7]=a,g[8]=s,g[9]=l,g[10]=u,g[11]=c,g[12]=h,g[13]=d,g[14]=f,g[15]=p,g}function L(e,t,n,r,A,i,o,a,s,l,u,c,h,d,f,p,g){return e[0]=t,e[1]=n,e[2]=r,e[3]=A,e[4]=i,e[5]=o,e[6]=a,e[7]=s,e[8]=l,e[9]=u,e[10]=c,e[11]=h,e[12]=d,e[13]=f,e[14]=p,e[15]=g,e}function Q(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function U(e,t){if(e===t){var n=t[1],r=t[2],A=t[3],i=t[6],o=t[7],a=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=i,e[11]=t[14],e[12]=A,e[13]=o,e[14]=a}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function R(e,t){var n=t[0],r=t[1],A=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15],y=n*a-r*o,C=n*s-A*o,B=n*l-i*o,m=r*s-A*a,w=r*l-i*a,E=A*l-i*s,x=u*p-c*f,S=u*g-h*f,T=u*v-d*f,F=c*g-h*p,b=c*v-d*p,I=h*v-d*g,L=y*I-C*b+B*F+m*T-w*S+E*x;return L?(L=1/L,e[0]=(a*I-s*b+l*F)*L,e[1]=(A*b-r*I-i*F)*L,e[2]=(p*E-g*w+v*m)*L,e[3]=(h*w-c*E-d*m)*L,e[4]=(s*T-o*I-l*S)*L,e[5]=(n*I-A*T+i*S)*L,e[6]=(g*B-f*E-v*C)*L,e[7]=(u*E-h*B+d*C)*L,e[8]=(o*b-a*T+l*x)*L,e[9]=(r*T-n*b-i*x)*L,e[10]=(f*w-p*B+v*y)*L,e[11]=(c*B-u*w-d*y)*L,e[12]=(a*S-o*F-s*x)*L,e[13]=(n*F-r*S+A*x)*L,e[14]=(p*C-f*m-g*y)*L,e[15]=(u*m-c*C+h*y)*L,e):null}function M(e){var t=e[0],n=e[1],r=e[2],A=e[3],i=e[4],o=e[5],a=e[6],s=e[7],l=e[8],u=e[9],c=e[10],h=e[11],d=e[12],f=e[13],p=e[14],g=e[15];return(t*o-n*i)*(c*g-h*p)-(t*a-r*i)*(u*g-h*f)+(t*s-A*i)*(u*p-c*f)+(n*a-r*o)*(l*g-h*d)-(n*s-A*o)*(l*p-c*d)+(r*s-A*a)*(l*f-u*d)}function H(e,t,n){var r=t[0],A=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],p=t[12],g=t[13],v=t[14],y=t[15],C=n[0],B=n[1],m=n[2],w=n[3];return e[0]=C*r+B*a+m*c+w*p,e[1]=C*A+B*s+m*h+w*g,e[2]=C*i+B*l+m*d+w*v,e[3]=C*o+B*u+m*f+w*y,C=n[4],B=n[5],m=n[6],w=n[7],e[4]=C*r+B*a+m*c+w*p,e[5]=C*A+B*s+m*h+w*g,e[6]=C*i+B*l+m*d+w*v,e[7]=C*o+B*u+m*f+w*y,C=n[8],B=n[9],m=n[10],w=n[11],e[8]=C*r+B*a+m*c+w*p,e[9]=C*A+B*s+m*h+w*g,e[10]=C*i+B*l+m*d+w*v,e[11]=C*o+B*u+m*f+w*y,C=n[12],B=n[13],m=n[14],w=n[15],e[12]=C*r+B*a+m*c+w*p,e[13]=C*A+B*s+m*h+w*g,e[14]=C*i+B*l+m*d+w*v,e[15]=C*o+B*u+m*f+w*y,e}function O(e,t,n){var r,A,i,o,a,s,l,u,c,h,d,f,p=n[0],g=n[1],v=n[2];return t===e?(e[12]=t[0]*p+t[4]*g+t[8]*v+t[12],e[13]=t[1]*p+t[5]*g+t[9]*v+t[13],e[14]=t[2]*p+t[6]*g+t[10]*v+t[14],e[15]=t[3]*p+t[7]*g+t[11]*v+t[15]):(r=t[0],A=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],h=t[9],d=t[10],f=t[11],e[0]=r,e[1]=A,e[2]=i,e[3]=o,e[4]=a,e[5]=s,e[6]=l,e[7]=u,e[8]=c,e[9]=h,e[10]=d,e[11]=f,e[12]=r*p+a*g+c*v+t[12],e[13]=A*p+s*g+h*v+t[13],e[14]=i*p+l*g+d*v+t[14],e[15]=o*p+u*g+f*v+t[15]),e}function k(e,t,n){var r=n[0],A=n[1],i=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*A,e[5]=t[5]*A,e[6]=t[6]*A,e[7]=t[7]*A,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function N(e,t,n){var r=Math.sin(n),A=Math.cos(n),i=t[4],o=t[5],a=t[6],s=t[7],l=t[8],u=t[9],c=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*A+l*r,e[5]=o*A+u*r,e[6]=a*A+c*r,e[7]=s*A+h*r,e[8]=l*A-i*r,e[9]=u*A-o*r,e[10]=c*A-a*r,e[11]=h*A-s*r,e}function _(e,t,n){var r=Math.sin(n),A=Math.cos(n),i=t[0],o=t[1],a=t[2],s=t[3],l=t[8],u=t[9],c=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*A-l*r,e[1]=o*A-u*r,e[2]=a*A-c*r,e[3]=s*A-h*r,e[8]=i*r+l*A,e[9]=o*r+u*A,e[10]=a*r+c*A,e[11]=s*r+h*A,e}function D(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function P(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function G(e,t,n){var r,A,i,o=n[0],a=n[1],s=n[2],l=Math.hypot(o,a,s);return l<E?null:(o*=l=1/l,a*=l,s*=l,r=Math.sin(t),i=1-(A=Math.cos(t)),e[0]=o*o*i+A,e[1]=a*o*i+s*r,e[2]=s*o*i-a*r,e[3]=0,e[4]=o*a*i-s*r,e[5]=a*a*i+A,e[6]=s*a*i+o*r,e[7]=0,e[8]=o*s*i+a*r,e[9]=a*s*i-o*r,e[10]=s*s*i+A,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}function K(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function z(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function V(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function W(e,t,n){var r=t[0],A=t[1],i=t[2],o=t[3],a=r+r,s=A+A,l=i+i,u=r*a,c=r*s,h=r*l,d=A*s,f=A*l,p=i*l,g=o*a,v=o*s,y=o*l;return e[0]=1-(d+p),e[1]=c+y,e[2]=h-v,e[3]=0,e[4]=c-y,e[5]=1-(u+p),e[6]=f+g,e[7]=0,e[8]=h+v,e[9]=f-g,e[10]=1-(u+d),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}function X(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function Y(e,t){var n=t[0],r=t[1],A=t[2],i=t[4],o=t[5],a=t[6],s=t[8],l=t[9],u=t[10];return e[0]=Math.hypot(n,r,A),e[1]=Math.hypot(i,o,a),e[2]=Math.hypot(s,l,u),e}function j(e,t){var n=new x(3);Y(n,t);var r=1/n[0],A=1/n[1],i=1/n[2],o=t[0]*r,a=t[1]*A,s=t[2]*i,l=t[4]*r,u=t[5]*A,c=t[6]*i,h=t[8]*r,d=t[9]*A,f=t[10]*i,p=o+u+f,g=0;return p>0?(g=2*Math.sqrt(p+1),e[3]=.25*g,e[0]=(c-d)/g,e[1]=(h-s)/g,e[2]=(a-l)/g):o>u&&o>f?(g=2*Math.sqrt(1+o-u-f),e[3]=(c-d)/g,e[0]=.25*g,e[1]=(a+l)/g,e[2]=(h+s)/g):u>f?(g=2*Math.sqrt(1+u-o-f),e[3]=(h-s)/g,e[0]=(a+l)/g,e[1]=.25*g,e[2]=(c+d)/g):(g=2*Math.sqrt(1+f-o-u),e[3]=(a-l)/g,e[0]=(h+s)/g,e[1]=(c+d)/g,e[2]=.25*g),e}function Z(e,t,n,r,A){var i=t[0],o=t[1],a=t[2],s=t[3],l=i+i,u=o+o,c=a+a,h=i*l,d=i*u,f=i*c,p=o*u,g=o*c,v=a*c,y=s*l,C=s*u,B=s*c,m=r[0],w=r[1],E=r[2],x=A[0],S=A[1],T=A[2],F=(1-(p+v))*m,b=(d+B)*m,I=(f-C)*m,L=(d-B)*w,Q=(1-(h+v))*w,U=(g+y)*w,R=(f+C)*E,M=(g-y)*E,H=(1-(h+p))*E;return e[0]=F,e[1]=b,e[2]=I,e[3]=0,e[4]=L,e[5]=Q,e[6]=U,e[7]=0,e[8]=R,e[9]=M,e[10]=H,e[11]=0,e[12]=n[0]+x-(F*x+L*S+R*T),e[13]=n[1]+S-(b*x+Q*S+M*T),e[14]=n[2]+T-(I*x+U*S+H*T),e[15]=1,e}function J(e,t){var n=t[0],r=t[1],A=t[2],i=t[3],o=n+n,a=r+r,s=A+A,l=n*o,u=r*o,c=r*a,h=A*o,d=A*a,f=A*s,p=i*o,g=i*a,v=i*s;return e[0]=1-c-f,e[1]=u+v,e[2]=h-g,e[3]=0,e[4]=u-v,e[5]=1-l-f,e[6]=d+p,e[7]=0,e[8]=h+g,e[9]=d-p,e[10]=1-l-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function q(e,t,n,r,A){var i,o=1/Math.tan(t/2);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=A&&A!==1/0?(i=1/(r-A),e[10]=(A+r)*i,e[14]=2*A*r*i):(e[10]=-1,e[14]=-2*r),e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var $=q;function ee(e,t,n,r,A,i,o){var a=1/(t-n),s=1/(r-A),l=1/(i-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*l,e[11]=0,e[12]=(t+n)*a,e[13]=(A+r)*s,e[14]=(o+i)*l,e[15]=1,e}var te=ee;function ne(e,t,n,r,A,i,o){var a=1/(t-n),s=1/(r-A),l=1/(i-o);return e[0]=-2*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=l,e[11]=0,e[12]=(t+n)*a,e[13]=(A+r)*s,e[14]=i*l,e[15]=1,e}function re(e,t,n,r){var A,i,o,a,s,l,u,c,h,d,f=t[0],p=t[1],g=t[2],v=r[0],y=r[1],C=r[2],B=n[0],m=n[1],w=n[2];return Math.abs(f-B)<E&&Math.abs(p-m)<E&&Math.abs(g-w)<E?Q(e):(u=f-B,c=p-m,h=g-w,A=y*(h*=d=1/Math.hypot(u,c,h))-C*(c*=d),i=C*(u*=d)-v*h,o=v*c-y*u,(d=Math.hypot(A,i,o))?(A*=d=1/d,i*=d,o*=d):(A=0,i=0,o=0),a=c*o-h*i,s=h*A-u*o,l=u*i-c*A,(d=Math.hypot(a,s,l))?(a*=d=1/d,s*=d,l*=d):(a=0,s=0,l=0),e[0]=A,e[1]=a,e[2]=u,e[3]=0,e[4]=i,e[5]=s,e[6]=c,e[7]=0,e[8]=o,e[9]=l,e[10]=h,e[11]=0,e[12]=-(A*f+i*p+o*g),e[13]=-(a*f+s*p+l*g),e[14]=-(u*f+c*p+h*g),e[15]=1,e)}function Ae(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e[4]=t[4]-n[4],e[5]=t[5]-n[5],e[6]=t[6]-n[6],e[7]=t[7]-n[7],e[8]=t[8]-n[8],e[9]=t[9]-n[9],e[10]=t[10]-n[10],e[11]=t[11]-n[11],e[12]=t[12]-n[12],e[13]=t[13]-n[13],e[14]=t[14]-n[14],e[15]=t[15]-n[15],e}function ie(e,t){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]}var oe=H,ae=Ae,se=Object.freeze({__proto__:null,add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e[4]=t[4]+n[4],e[5]=t[5]+n[5],e[6]=t[6]+n[6],e[7]=t[7]+n[7],e[8]=t[8]+n[8],e[9]=t[9]+n[9],e[10]=t[10]+n[10],e[11]=t[11]+n[11],e[12]=t[12]+n[12],e[13]=t[13]+n[13],e[14]=t[14]+n[14],e[15]=t[15]+n[15],e},adjoint:function(e,t){var n=t[0],r=t[1],A=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];return e[0]=a*(h*v-d*g)-c*(s*v-l*g)+p*(s*d-l*h),e[1]=-(r*(h*v-d*g)-c*(A*v-i*g)+p*(A*d-i*h)),e[2]=r*(s*v-l*g)-a*(A*v-i*g)+p*(A*l-i*s),e[3]=-(r*(s*d-l*h)-a*(A*d-i*h)+c*(A*l-i*s)),e[4]=-(o*(h*v-d*g)-u*(s*v-l*g)+f*(s*d-l*h)),e[5]=n*(h*v-d*g)-u*(A*v-i*g)+f*(A*d-i*h),e[6]=-(n*(s*v-l*g)-o*(A*v-i*g)+f*(A*l-i*s)),e[7]=n*(s*d-l*h)-o*(A*d-i*h)+u*(A*l-i*s),e[8]=o*(c*v-d*p)-u*(a*v-l*p)+f*(a*d-l*c),e[9]=-(n*(c*v-d*p)-u*(r*v-i*p)+f*(r*d-i*c)),e[10]=n*(a*v-l*p)-o*(r*v-i*p)+f*(r*l-i*a),e[11]=-(n*(a*d-l*c)-o*(r*d-i*c)+u*(r*l-i*a)),e[12]=-(o*(c*g-h*p)-u*(a*g-s*p)+f*(a*h-s*c)),e[13]=n*(c*g-h*p)-u*(r*g-A*p)+f*(r*h-A*c),e[14]=-(n*(a*g-s*p)-o*(r*g-A*p)+f*(r*s-A*a)),e[15]=n*(a*h-s*c)-o*(r*h-A*c)+u*(r*s-A*a),e},clone:F,copy:b,create:T,determinant:M,equals:function(e,t){var n=e[0],r=e[1],A=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],g=e[14],v=e[15],y=t[0],C=t[1],B=t[2],m=t[3],w=t[4],x=t[5],S=t[6],T=t[7],F=t[8],b=t[9],I=t[10],L=t[11],Q=t[12],U=t[13],R=t[14],M=t[15];return Math.abs(n-y)<=E*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-C)<=E*Math.max(1,Math.abs(r),Math.abs(C))&&Math.abs(A-B)<=E*Math.max(1,Math.abs(A),Math.abs(B))&&Math.abs(i-m)<=E*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(o-w)<=E*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(a-x)<=E*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(s-S)<=E*Math.max(1,Math.abs(s),Math.abs(S))&&Math.abs(l-T)<=E*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(u-F)<=E*Math.max(1,Math.abs(u),Math.abs(F))&&Math.abs(c-b)<=E*Math.max(1,Math.abs(c),Math.abs(b))&&Math.abs(h-I)<=E*Math.max(1,Math.abs(h),Math.abs(I))&&Math.abs(d-L)<=E*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(f-Q)<=E*Math.max(1,Math.abs(f),Math.abs(Q))&&Math.abs(p-U)<=E*Math.max(1,Math.abs(p),Math.abs(U))&&Math.abs(g-R)<=E*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(v-M)<=E*Math.max(1,Math.abs(v),Math.abs(M))},exactEquals:ie,frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromQuat:J,fromQuat2:function(e,t){var n=new x(3),r=-t[0],A=-t[1],i=-t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=r*r+A*A+i*i+o*o;return c>0?(n[0]=2*(a*o+u*r+s*i-l*A)/c,n[1]=2*(s*o+u*A+l*r-a*i)/c,n[2]=2*(l*o+u*i+a*A-s*r)/c):(n[0]=2*(a*o+u*r+s*i-l*A),n[1]=2*(s*o+u*A+l*r-a*i),n[2]=2*(l*o+u*i+a*A-s*r)),W(e,t,n),e},fromRotation:G,fromRotationTranslation:W,fromRotationTranslationScale:function(e,t,n,r){var A=t[0],i=t[1],o=t[2],a=t[3],s=A+A,l=i+i,u=o+o,c=A*s,h=A*l,d=A*u,f=i*l,p=i*u,g=o*u,v=a*s,y=a*l,C=a*u,B=r[0],m=r[1],w=r[2];return e[0]=(1-(f+g))*B,e[1]=(h+C)*B,e[2]=(d-y)*B,e[3]=0,e[4]=(h-C)*m,e[5]=(1-(c+g))*m,e[6]=(p+v)*m,e[7]=0,e[8]=(d+y)*w,e[9]=(p-v)*w,e[10]=(1-(c+f))*w,e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e},fromRotationTranslationScaleOrigin:Z,fromScaling:P,fromTranslation:D,fromValues:I,fromXRotation:K,fromYRotation:z,fromZRotation:V,frustum:function(e,t,n,r,A,i,o){var a=1/(n-t),s=1/(A-r),l=1/(i-o);return e[0]=2*i*a,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*i*s,e[6]=0,e[7]=0,e[8]=(n+t)*a,e[9]=(A+r)*s,e[10]=(o+i)*l,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*l,e[15]=0,e},getRotation:j,getScaling:Y,getTranslation:X,identity:Q,invert:R,lookAt:re,mul:oe,multiply:H,multiplyScalar:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12]*n,e[13]=t[13]*n,e[14]=t[14]*n,e[15]=t[15]*n,e},multiplyScalarAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e[4]=t[4]+n[4]*r,e[5]=t[5]+n[5]*r,e[6]=t[6]+n[6]*r,e[7]=t[7]+n[7]*r,e[8]=t[8]+n[8]*r,e[9]=t[9]+n[9]*r,e[10]=t[10]+n[10]*r,e[11]=t[11]+n[11]*r,e[12]=t[12]+n[12]*r,e[13]=t[13]+n[13]*r,e[14]=t[14]+n[14]*r,e[15]=t[15]+n[15]*r,e},ortho:te,orthoNO:ee,orthoZO:ne,perspective:$,perspectiveFromFieldOfView:function(e,t,n,r){var A=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),a=Math.tan(t.rightDegrees*Math.PI/180),s=2/(o+a),l=2/(A+i);return e[0]=s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=l,e[6]=0,e[7]=0,e[8]=-(o-a)*s*.5,e[9]=(A-i)*l*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e},perspectiveNO:q,perspectiveZO:function(e,t,n,r,A){var i,o=1/Math.tan(t/2);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=A&&A!==1/0?(i=1/(r-A),e[10]=A*i,e[14]=A*r*i):(e[10]=-1,e[14]=-r),e},rotate:function(e,t,n,r){var A,i,o,a,s,l,u,c,h,d,f,p,g,v,y,C,B,m,w,x,S,T,F,b,I=r[0],L=r[1],Q=r[2],U=Math.hypot(I,L,Q);return U<E?null:(I*=U=1/U,L*=U,Q*=U,A=Math.sin(n),o=1-(i=Math.cos(n)),a=t[0],s=t[1],l=t[2],u=t[3],c=t[4],h=t[5],d=t[6],f=t[7],p=t[8],g=t[9],v=t[10],y=t[11],C=I*I*o+i,B=L*I*o+Q*A,m=Q*I*o-L*A,w=I*L*o-Q*A,x=L*L*o+i,S=Q*L*o+I*A,T=I*Q*o+L*A,F=L*Q*o-I*A,b=Q*Q*o+i,e[0]=a*C+c*B+p*m,e[1]=s*C+h*B+g*m,e[2]=l*C+d*B+v*m,e[3]=u*C+f*B+y*m,e[4]=a*w+c*x+p*S,e[5]=s*w+h*x+g*S,e[6]=l*w+d*x+v*S,e[7]=u*w+f*x+y*S,e[8]=a*T+c*F+p*b,e[9]=s*T+h*F+g*b,e[10]=l*T+d*F+v*b,e[11]=u*T+f*F+y*b,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)},rotateX:N,rotateY:_,rotateZ:function(e,t,n){var r=Math.sin(n),A=Math.cos(n),i=t[0],o=t[1],a=t[2],s=t[3],l=t[4],u=t[5],c=t[6],h=t[7];return t!==e&&(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[0]=i*A+l*r,e[1]=o*A+u*r,e[2]=a*A+c*r,e[3]=s*A+h*r,e[4]=l*A-i*r,e[5]=u*A-o*r,e[6]=c*A-a*r,e[7]=h*A-s*r,e},scale:k,set:L,str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},sub:ae,subtract:Ae,targetTo:function(e,t,n,r){var A=t[0],i=t[1],o=t[2],a=r[0],s=r[1],l=r[2],u=A-n[0],c=i-n[1],h=o-n[2],d=u*u+c*c+h*h;d>0&&(u*=d=1/Math.sqrt(d),c*=d,h*=d);var f=s*h-l*c,p=l*u-a*h,g=a*c-s*u;return(d=f*f+p*p+g*g)>0&&(f*=d=1/Math.sqrt(d),p*=d,g*=d),e[0]=f,e[1]=p,e[2]=g,e[3]=0,e[4]=c*g-h*p,e[5]=h*f-u*g,e[6]=u*p-c*f,e[7]=0,e[8]=u,e[9]=c,e[10]=h,e[11]=0,e[12]=A,e[13]=i,e[14]=o,e[15]=1,e},translate:O,transpose:U});function le(){var e=new x(3);return x!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function ue(e){var t=new x(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ce(e){var t=e[0],n=e[1],r=e[2];return Math.hypot(t,n,r)}function he(e,t,n){var r=new x(3);return r[0]=e,r[1]=t,r[2]=n,r}function de(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function fe(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function pe(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function ge(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function ve(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function ye(e,t){var n=t[0],r=t[1],A=t[2],i=n*n+r*r+A*A;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function Ce(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Be(e,t,n){var r=t[0],A=t[1],i=t[2],o=n[0],a=n[1],s=n[2];return e[0]=A*s-i*a,e[1]=i*o-r*s,e[2]=r*a-A*o,e}function me(e,t,n,r){var A=t[0],i=t[1],o=t[2];return e[0]=A+r*(n[0]-A),e[1]=i+r*(n[1]-i),e[2]=o+r*(n[2]-o),e}function we(e,t,n){var r=t[0],A=t[1],i=t[2],o=n[3]*r+n[7]*A+n[11]*i+n[15];return o=o||1,e[0]=(n[0]*r+n[4]*A+n[8]*i+n[12])/o,e[1]=(n[1]*r+n[5]*A+n[9]*i+n[13])/o,e[2]=(n[2]*r+n[6]*A+n[10]*i+n[14])/o,e}function Ee(e,t){var n=e[0],r=e[1],A=e[2],i=t[0],o=t[1],a=t[2];return Math.abs(n-i)<=E*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=E*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(A-a)<=E*Math.max(1,Math.abs(A),Math.abs(a))}var xe=ge,Se=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],A=t[2]-e[2];return Math.hypot(n,r,A)},Te=ce;function Fe(){var e=new x(4);return x!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function be(e,t,n,r){var A=new x(4);return A[0]=e,A[1]=t,A[2]=n,A[3]=r,A}function Ie(e,t,n){var r=t[0],A=t[1],i=t[2],o=t[3];return e[0]=n[0]*r+n[4]*A+n[8]*i+n[12]*o,e[1]=n[1]*r+n[5]*A+n[9]*i+n[13]*o,e[2]=n[2]*r+n[6]*A+n[10]*i+n[14]*o,e[3]=n[3]*r+n[7]*A+n[11]*i+n[15]*o,e}function Le(){var e=new x(4);return x!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function Qe(e,t,n){n*=.5;var r=Math.sin(n);return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=Math.cos(n),e}function Ue(e,t,n){var r=t[0],A=t[1],i=t[2],o=t[3],a=n[0],s=n[1],l=n[2],u=n[3];return e[0]=r*u+o*a+A*l-i*s,e[1]=A*u+o*s+i*a-r*l,e[2]=i*u+o*l+r*s-A*a,e[3]=o*u-r*a-A*s-i*l,e}function Re(e,t){var n=t[0],r=t[1],A=t[2],i=t[3],o=n*n+r*r+A*A+i*i,a=o?1/o:0;return e[0]=-n*a,e[1]=-r*a,e[2]=-A*a,e[3]=i*a,e}function Me(e,t,n,r){var A=.5*Math.PI/180;t*=A,n*=A,r*=A;var i=Math.sin(t),o=Math.cos(t),a=Math.sin(n),s=Math.cos(n),l=Math.sin(r),u=Math.cos(r);return e[0]=i*s*u-o*a*l,e[1]=o*a*u+i*s*l,e[2]=o*s*l-i*a*u,e[3]=o*s*u+i*a*l,e}le(),function(){var e=Fe()}();var He=be,Oe=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},ke=function(e,t,n,r,A){return e[0]=t,e[1]=n,e[2]=r,e[3]=A,e},Ne=Ue,_e=function(e,t){var n=t[0],r=t[1],A=t[2],i=t[3],o=n*n+r*r+A*A+i*i;return o>0&&(o=1/Math.sqrt(o)),e[0]=n*o,e[1]=r*o,e[2]=A*o,e[3]=i*o,e};function De(){var e=new x(2);return x!=Float32Array&&(e[0]=0,e[1]=0),e}function Pe(e){return"function"==typeof e}function Ge(e){return null==e}function Ke(e){return Array.isArray(e)}le(),he(1,0,0),he(0,1,0),Le(),Le(),S(),function(){var e=De()}();var ze={}.toString;function Ve(e){if(!Array.isArray(e))return-1/0;var t=e.length;if(!t)return-1/0;for(var n=e[0],r=1;r<t;r++)n=Math.max(n,e[r]);return n}var We=function(e){if(Ke(e))return e.reduce((function(e,t){return Math.min(e,t)}),e[0])};function Xe(e){return"string"==typeof e}var Ye=function(e,t,n){return e<t?t:e>n?n:e};function je(e){return"number"==typeof e}var Ze=1e-5;function Je(e,t,n){return void 0===n&&(n=Ze),e===t||Math.abs(e-t)<n}var qe=function(e,t){return(e%t+t)%t},$e=function(e){return function(e,t){return ze.call(e)==="[object "+t+"]"}(e,"Boolean")},et=function(e){return void 0===e},tt=function(e,t){return tt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},tt(e,t)};function nt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}tt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rt=function(){return rt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var A in t=arguments[n])Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e},rt.apply(this,arguments)};function At(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var A=0;for(r=Object.getOwnPropertySymbols(e);A<r.length;A++)t.indexOf(r[A])<0&&Object.prototype.propertyIsEnumerable.call(e,r[A])&&(n[r[A]]=e[r[A]])}return n}function it(e,t,n,r){return new(n||(n=Promise))((function(A,i){function o(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){e.done?A(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(o,a)}s((r=r.apply(e,t||[])).next())}))}function ot(e,t){var n,r,A,i,o={label:0,sent:function(){if(1&A[0])throw A[1];return A[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(A=2&a[0]?r.return:a[0]?r.throw||((A=r.return)&&A.call(r),0):r.next)&&!(A=A.call(r,a[1])).done)return A;switch(r=0,A&&(a=[2&a[0],A.value]),a[0]){case 0:case 1:A=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(A=o.trys,(A=A.length>0&&A[A.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!A||a[1]>A[0]&&a[1]<A[3])){o.label=a[1];break}if(6===a[0]&&o.label<A[1]){o.label=A[1],A=a;break}if(A&&o.label<A[2]){o.label=A[2],o.ops.push(a);break}A[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=A=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function at(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function st(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,A,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(e){A={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(A)throw A.error}}return o}function lt(e,t,n){if(n||2===arguments.length)for(var r,A=0,i=t.length;A<i;A++)!r&&A in t||(r||(r=Array.prototype.slice.call(t,0,A)),r[A]=t[A]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var ut={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function ct(e,t,n){if(e[n].length>7){e[n].shift();for(var r=e[n],A=n;r.length;)t[n]="A",e.splice(A+=1,0,["C"].concat(r.splice(0,6)));e.splice(n,1)}}var ht={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function dt(e){return Array.isArray(e)&&e.every((function(e){var t=e[0].toLowerCase();return ht[t]===e.length-1&&"achlmqstvz".includes(t)}))}function ft(e){return dt(e)&&e.every((function(e){var t=e[0];return t===t.toUpperCase()}))}function pt(e){return ft(e)&&e.every((function(e){var t=e[0];return"ACLMQZ".includes(t)}))}function gt(e){for(var t=e.pathValue[e.segmentStart],n=t.toLowerCase(),r=e.data;r.length>=ht[n]&&("m"===n&&r.length>2?(e.segments.push([t].concat(r.splice(0,2))),n="l",t="m"===t?"l":"L"):e.segments.push([t].concat(r.splice(0,ht[n]))),ht[n]););}function vt(e){var t=e.index,n=e.pathValue,r=n.charCodeAt(t);return 48===r?(e.param=0,void(e.index+=1)):49===r?(e.param=1,void(e.index+=1)):void(e.err='[path-util]: invalid Arc flag "'.concat(n[t],'", expecting 0 or 1 at index ').concat(t))}function yt(e){return e>=48&&e<=57||43===e||45===e||46===e}function Ct(e){return e>=48&&e<=57}function Bt(e){var t,n=e.max,r=e.pathValue,A=e.index,i=A,o=!1,a=!1,s=!1,l=!1;if(i>=n)e.err="[path-util]: Invalid path value at index ".concat(i,', "pathValue" is missing param');else if(43!==(t=r.charCodeAt(i))&&45!==t||(i+=1,t=r.charCodeAt(i)),Ct(t)||46===t){if(46!==t){if(o=48===t,i+=1,t=r.charCodeAt(i),o&&i<n&&t&&Ct(t))return void(e.err="[path-util]: Invalid path value at index ".concat(A,', "').concat(r[A],'" illegal number'));for(;i<n&&Ct(r.charCodeAt(i));)i+=1,a=!0;t=r.charCodeAt(i)}if(46===t){for(l=!0,i+=1;Ct(r.charCodeAt(i));)i+=1,s=!0;t=r.charCodeAt(i)}if(101===t||69===t){if(l&&!a&&!s)return void(e.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(r[i],'" invalid float exponent'));if(i+=1,43!==(t=r.charCodeAt(i))&&45!==t||(i+=1),!(i<n&&Ct(r.charCodeAt(i))))return void(e.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(r[i],'" invalid integer exponent'));for(;i<n&&Ct(r.charCodeAt(i));)i+=1}e.index=i,e.param=+e.pathValue.slice(A,i)}else e.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(r[i],'" is not a number')}function mt(e){for(var t,n=e.pathValue,r=e.max;e.index<r&&(10===(t=n.charCodeAt(e.index))||13===t||8232===t||8233===t||32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(t));)e.index+=1}function wt(e){var t=e.max,n=e.pathValue,r=e.index,A=n.charCodeAt(r),i=ht[n[r].toLowerCase()];if(e.segmentStart=r,function(e){switch(32|e){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}}(A))if(e.index+=1,mt(e),e.data=[],i){for(;;){for(var o=i;o>0;o-=1){if(97!=(32|A)||3!==o&&4!==o?Bt(e):vt(e),e.err.length)return;e.data.push(e.param),mt(e),e.index<t&&44===n.charCodeAt(e.index)&&(e.index+=1,mt(e))}if(e.index>=e.max)break;if(!yt(n.charCodeAt(e.index)))break}gt(e)}else gt(e);else e.err='[path-util]: Invalid path value "'.concat(n[r],'" is not a path command')}var Et=function(e){this.pathValue=e,this.segments=[],this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function xt(e){if(ft(e))return[].concat(e);var t=function(e){if(dt(e))return[].concat(e);var t=new Et(e);for(mt(t);t.index<t.max&&!t.err.length;)wt(t);return t.err?t.err:t.segments}(e),n=0,r=0,A=0,i=0;return t.map((function(e){var t,o=e.slice(1).map(Number),a=e[0],s=a.toUpperCase();if("M"===a)return n=o[0],r=o[1],A=n,i=r,["M",n,r];if(a!==s)switch(s){case"A":t=[s,o[0],o[1],o[2],o[3],o[4],o[5]+n,o[6]+r];break;case"V":t=[s,o[0]+r];break;case"H":t=[s,o[0]+n];break;default:var l=o.map((function(e,t){return e+(t%2?r:n)}));t=[s].concat(l)}else t=[s].concat(o);var u=t.length;switch(s){case"Z":n=A,r=i;break;case"H":n=t[1];break;case"V":r=t[1];break;default:n=t[u-2],r=t[u-1],"M"===s&&(A=n,i=r)}return t}))}function St(e,t){var n=e[0],r=t.x1,A=t.y1,i=t.x2,o=t.y2,a=e.slice(1).map(Number),s=e;if("TQ".includes(n)||(t.qx=null,t.qy=null),"H"===n)s=["L",e[1],A];else if("V"===n)s=["L",r,e[1]];else if("S"===n){var l=2*r-i,u=2*A-o;t.x1=l,t.y1=u,s=["C",l,u].concat(a)}else if("T"===n){var c=2*r-t.qx,h=2*A-t.qy;t.qx=c,t.qy=h,s=["Q",c,h].concat(a)}else if("Q"===n){var d=a[0],f=a[1];t.qx=d,t.qy=f}return s}function Tt(e){if(pt(e))return[].concat(e);for(var t=xt(e),n=rt({},ut),r=0;r<t.length;r+=1){t[r]=St(t[r],n);var A=t[r],i=A.length;n.x1=+A[i-2],n.y1=+A[i-1],n.x2=+A[i-4]||n.x1,n.y2=+A[i-3]||n.y1}return t}function Ft(e,t,n){return{x:e*Math.cos(n)-t*Math.sin(n),y:e*Math.sin(n)+t*Math.cos(n)}}function bt(e,t,n,r,A,i,o,a,s,l){var u,c,h,d,f,p=e,g=t,v=n,y=r,C=a,B=s,m=120*Math.PI/180,w=Math.PI/180*(+A||0),E=[];if(l)c=l[0],h=l[1],d=l[2],f=l[3];else{p=(u=Ft(p,g,-w)).x,g=u.y;var x=(p-(C=(u=Ft(C,B,-w)).x))/2,S=(g-(B=u.y))/2,T=x*x/(v*v)+S*S/(y*y);T>1&&(v*=T=Math.sqrt(T),y*=T);var F=v*v,b=y*y,I=(i===o?-1:1)*Math.sqrt(Math.abs((F*b-F*S*S-b*x*x)/(F*S*S+b*x*x)));d=I*v*S/y+(p+C)/2,f=I*-y*x/v+(g+B)/2,c=Math.asin(((g-f)/y*Math.pow(10,9)|0)/Math.pow(10,9)),h=Math.asin(((B-f)/y*Math.pow(10,9)|0)/Math.pow(10,9)),c=p<d?Math.PI-c:c,h=C<d?Math.PI-h:h,c<0&&(c=2*Math.PI+c),h<0&&(h=2*Math.PI+h),o&&c>h&&(c-=2*Math.PI),!o&&h>c&&(h-=2*Math.PI)}var L=h-c;if(Math.abs(L)>m){var Q=h,U=C,R=B;h=c+m*(o&&h>c?1:-1),E=bt(C=d+v*Math.cos(h),B=f+y*Math.sin(h),v,y,A,0,o,U,R,[h,Q,d,f])}L=h-c;var M=Math.cos(c),H=Math.sin(c),O=Math.cos(h),k=Math.sin(h),N=Math.tan(L/4),_=4/3*v*N,D=4/3*y*N,P=[p,g],G=[p+_*H,g-D*M],K=[C+_*k,B-D*O],z=[C,B];if(G[0]=2*P[0]-G[0],G[1]=2*P[1]-G[1],l)return G.concat(K,z,E);for(var V=[],W=0,X=(E=G.concat(K,z,E)).length;W<X;W+=1)V[W]=W%2?Ft(E[W-1],E[W],w).y:Ft(E[W],E[W+1],w).x;return V}function It(e,t,n){var r=e[0],A=e[1];return[r+(t[0]-r)*n,A+(t[1]-A)*n]}var Lt=function(e,t,n,r){return lt(lt([],It([e,t],[n,r],.5),!0),[n,r,n,r],!1)};function Qt(e,t){var n,r,A,i,o,a,s,l,u,c=e[0],h=e.slice(1).map(Number),d=h[0],f=h[1],p=t.x1,g=t.y1,v=t.x,y=t.y;switch("TQ".includes(c)||(t.qx=null,t.qy=null),c){case"M":return t.x=d,t.y=f,e;case"A":return n=[p,g].concat(h),["C"].concat(bt(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return t.qx=d,t.qy=f,n=[p,g].concat(h),["C"].concat((r=n[0],A=n[1],i=n[2],o=n[3],a=n[4],s=n[5],[(l=1/3)*r+(u=2/3)*i,l*A+u*o,l*a+u*i,l*s+u*o,a,s]));case"L":return["C"].concat(Lt(p,g,d,f));case"Z":return p===v&&g===y?["C",p,g,v,y,v,y]:["C"].concat(Lt(p,g,v,y))}return e}function Ut(e,t){if(void 0===t&&(t=!1),function(e){return pt(e)&&e.every((function(e){var t=e[0];return"MC".includes(t)}))}(e)){var n=[].concat(e);return t?[n,[]]:n}for(var r,A,i=Tt(e),o=rt({},ut),a=[],s="",l=i.length,u=[],c=0;c<l;c+=1){i[c]&&(s=i[c][0]),a[c]=s;var h=Qt(i[c],o);i[c]=h,ct(i,a,c),l=i.length,"Z"===s&&u.push(c),A=(r=i[c]).length,o.x1=+r[A-2],o.y1=+r[A-1],o.x2=+r[A-4]||o.x1,o.y2=+r[A-3]||o.y1}return t?[i,u]:i}function Rt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function Mt(e,t,n,r,A){var i=Rt([e,t],[n,r]),o={x:0,y:0};if("number"==typeof A)if(A<=0)o={x:e,y:t};else if(A>=i)o={x:n,y:r};else{var a=It([e,t],[n,r],A/i);o={x:a[0],y:a[1]}}return{length:i,point:o,min:{x:Math.min(e,n),y:Math.min(t,r)},max:{x:Math.max(e,n),y:Math.max(t,r)}}}function Ht(e,t){var n=e.x,r=e.y,A=t.x,i=t.y,o=n*A+r*i,a=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(A,2)+Math.pow(i,2)));return(n*i-r*A<0?-1:1)*Math.acos(o/a)}function Ot(e,t,n,r,A,i,o,a,s,l){var u=Math.abs,c=Math.sin,h=Math.cos,d=Math.sqrt,f=Math.PI,p=u(n),g=u(r),v=(A%360+360)%360*(f/180);if(e===a&&t===s)return{x:e,y:t};if(0===p||0===g)return Mt(e,t,a,s,l).point;var y=(e-a)/2,C=(t-s)/2,B={x:h(v)*y+c(v)*C,y:-c(v)*y+h(v)*C},m=Math.pow(B.x,2)/Math.pow(p,2)+Math.pow(B.y,2)/Math.pow(g,2);m>1&&(p*=d(m),g*=d(m));var w=(Math.pow(p,2)*Math.pow(g,2)-Math.pow(p,2)*Math.pow(B.y,2)-Math.pow(g,2)*Math.pow(B.x,2))/(Math.pow(p,2)*Math.pow(B.y,2)+Math.pow(g,2)*Math.pow(B.x,2)),E=(i!==o?1:-1)*d(w=w<0?0:w),x=E*(p*B.y/g),S=E*(-g*B.x/p),T=h(v)*x-c(v)*S+(e+a)/2,F=c(v)*x+h(v)*S+(t+s)/2,b={x:(B.x-x)/p,y:(B.y-S)/g},I=Ht({x:1,y:0},b),L=Ht(b,{x:(-B.x-x)/p,y:(-B.y-S)/g});!o&&L>0?L-=2*f:o&&L<0&&(L+=2*f);var Q=I+(L%=2*f)*l,U=p*h(Q),R=g*c(Q);return{x:h(v)*U-c(v)*R+T,y:c(v)*U+h(v)*R+F}}function kt(e,t,n,r,A,i,o,a,s,l,u){var c,h=u.bbox,d=void 0===h||h,f=u.length,p=void 0===f||f,g=u.sampleSize,v=void 0===g?30:g,y="number"==typeof l,C=e,B=t,m=0,w=[C,B,m],E=[C,B],x={x:0,y:0},S=[{x:C,y:B}];y&&l<=0&&(x={x:C,y:B});for(var T=0;T<=v;T+=1){if(C=(c=Ot(e,t,n,r,A,i,o,a,s,T/v)).x,B=c.y,d&&S.push({x:C,y:B}),p&&(m+=Rt(E,[C,B])),E=[C,B],y&&m>=l&&l>w[2]){var F=(m-l)/(m-w[2]);x={x:E[0]*(1-F)+w[0]*F,y:E[1]*(1-F)+w[1]*F}}w=[C,B,m]}return y&&l>=m&&(x={x:a,y:s}),{length:m,point:x,min:{x:Math.min.apply(null,S.map((function(e){return e.x}))),y:Math.min.apply(null,S.map((function(e){return e.y})))},max:{x:Math.max.apply(null,S.map((function(e){return e.x}))),y:Math.max.apply(null,S.map((function(e){return e.y})))}}}function Nt(e,t,n,r,A,i,o,a,s){var l=1-s;return{x:Math.pow(l,3)*e+3*Math.pow(l,2)*s*n+3*l*Math.pow(s,2)*A+Math.pow(s,3)*o,y:Math.pow(l,3)*t+3*Math.pow(l,2)*s*r+3*l*Math.pow(s,2)*i+Math.pow(s,3)*a}}function _t(e,t,n,r,A,i,o,a,s,l){var u,c=l.bbox,h=void 0===c||c,d=l.length,f=void 0===d||d,p=l.sampleSize,g=void 0===p?10:p,v="number"==typeof s,y=e,C=t,B=0,m=[y,C,B],w=[y,C],E={x:0,y:0},x=[{x:y,y:C}];v&&s<=0&&(E={x:y,y:C});for(var S=0;S<=g;S+=1){if(y=(u=Nt(e,t,n,r,A,i,o,a,S/g)).x,C=u.y,h&&x.push({x:y,y:C}),f&&(B+=Rt(w,[y,C])),w=[y,C],v&&B>=s&&s>m[2]){var T=(B-s)/(B-m[2]);E={x:w[0]*(1-T)+m[0]*T,y:w[1]*(1-T)+m[1]*T}}m=[y,C,B]}return v&&s>=B&&(E={x:o,y:a}),{length:B,point:E,min:{x:Math.min.apply(null,x.map((function(e){return e.x}))),y:Math.min.apply(null,x.map((function(e){return e.y})))},max:{x:Math.max.apply(null,x.map((function(e){return e.x}))),y:Math.max.apply(null,x.map((function(e){return e.y})))}}}function Dt(e,t,n,r,A,i,o){var a=1-o;return{x:Math.pow(a,2)*e+2*a*o*n+Math.pow(o,2)*A,y:Math.pow(a,2)*t+2*a*o*r+Math.pow(o,2)*i}}function Pt(e,t,n,r,A,i,o,a){var s,l=a.bbox,u=void 0===l||l,c=a.length,h=void 0===c||c,d=a.sampleSize,f=void 0===d?10:d,p="number"==typeof o,g=e,v=t,y=0,C=[g,v,y],B=[g,v],m={x:0,y:0},w=[{x:g,y:v}];p&&o<=0&&(m={x:g,y:v});for(var E=0;E<=f;E+=1){if(g=(s=Dt(e,t,n,r,A,i,E/f)).x,v=s.y,u&&w.push({x:g,y:v}),h&&(y+=Rt(B,[g,v])),B=[g,v],p&&y>=o&&o>C[2]){var x=(y-o)/(y-C[2]);m={x:B[0]*(1-x)+C[0]*x,y:B[1]*(1-x)+C[1]*x}}C=[g,v,y]}return p&&o>=y&&(m={x:A,y:i}),{length:y,point:m,min:{x:Math.min.apply(null,w.map((function(e){return e.x}))),y:Math.min.apply(null,w.map((function(e){return e.y})))},max:{x:Math.max.apply(null,w.map((function(e){return e.x}))),y:Math.max.apply(null,w.map((function(e){return e.y})))}}}function Gt(e,t,n){for(var r,A,i,o,a,s,l,u,c,h=Tt(e),d="number"==typeof t,f=[],p=0,g=0,v=0,y=0,C=[],B=[],m=0,w={x:0,y:0},E=w,x=w,S=w,T=0,F=0,b=h.length;F<b;F+=1)f=(l="M"===(u=(c=h[F])[0]))?f:[p,g].concat(c.slice(1)),l?(E=w={x:v=c[1],y:y=c[2]},m=0,d&&t<.001&&(S=w)):"L"===u?(m=(r=Mt(f[0],f[1],f[2],f[3],(t||0)-T)).length,w=r.min,E=r.max,x=r.point):"A"===u?(m=(A=kt(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],(t||0)-T,n||{})).length,w=A.min,E=A.max,x=A.point):"C"===u?(m=(i=_t(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],(t||0)-T,n||{})).length,w=i.min,E=i.max,x=i.point):"Q"===u?(m=(o=Pt(f[0],f[1],f[2],f[3],f[4],f[5],(t||0)-T,n||{})).length,w=o.min,E=o.max,x=o.point):"Z"===u&&(m=(a=Mt((f=[p,g,v,y])[0],f[1],f[2],f[3],(t||0)-T)).length,w=a.min,E=a.max,x=a.point),d&&T<t&&T+m>=t&&(S=x),B.push(E),C.push(w),T+=m,p=(s="Z"!==u?c.slice(-2):[v,y])[0],g=s[1];return d&&t>=T&&(S={x:p,y:g}),{length:T,point:S,min:{x:Math.min.apply(null,C.map((function(e){return e.x}))),y:Math.min.apply(null,C.map((function(e){return e.y})))},max:{x:Math.max.apply(null,B.map((function(e){return e.x}))),y:Math.max.apply(null,B.map((function(e){return e.y})))}}}function Kt(e,t){var n=e.length-1,r=[],A=0,i=function(e){var t=e.length,n=t-1;return e.map((function(r,A){return e.map((function(r,i){var o,a=A+i;return 0===i||e[a]&&"M"===e[a][0]?(o=e[a],["M"].concat(o.slice(-2))):(a>=t&&(a-=n),e[a])}))}))}(e);return i.forEach((function(i,o){e.slice(1).forEach((function(r,i){A+=Rt(e[(o+i)%n].slice(-2),t[i%n].slice(-2))})),r[o]=A,A=0})),i[r.indexOf(Math.min.apply(null,r))]}function zt(e){return function(e){var t=0,n=0,r=0;return Ut(e).map((function(e){var A;if("M"===e[0])return t=e[1],n=e[2],0;var i=e.slice(1),o=i[0],a=i[1],s=i[2],l=i[3],u=i[4],c=i[5];return r=function(e,t,n,r,A,i,o,a){return 3*((a-t)*(n+A)-(o-e)*(r+i)+r*(e-A)-n*(t-i)+a*(A+e/3)-o*(i+t/3))/20}(t,n,o,a,s,l,u,c),A=e.slice(-2),t=A[0],n=A[1],r})).reduce((function(e,t){return e+t}),0)}(e)>=0}function Vt(e){return e.map((function(e,t,n){var r=t&&n[t-1].slice(-2).concat(e.slice(1)),A=t?_t(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0;return{s:e,ss:t?A?function(e,t){void 0===t&&(t=.5);var n=e.slice(0,2),r=e.slice(2,4),A=e.slice(4,6),i=e.slice(6,8),o=It(n,r,t),a=It(r,A,t),s=It(A,i,t),l=It(o,a,t),u=It(a,s,t),c=It(l,u,t);return[["C"].concat(o,l,c),["C"].concat(u,s,i)]}(r):[e,e]:[e],l:A}}))}function Wt(e,t,n){var r=Vt(e),A=Vt(t),i=r.length,o=A.length,a=r.filter((function(e){return e.l})).length,s=A.filter((function(e){return e.l})).length,l=r.filter((function(e){return e.l})).reduce((function(e,t){return e+t.l}),0)/a||0,u=A.filter((function(e){return e.l})).reduce((function(e,t){return e+t.l}),0)/s||0,c=n||Math.max(i,o),h=[l,u],d=[c-i,c-o],f=0,p=[r,A].map((function(e,t){return e.l===c?e.map((function(e){return e.s})):e.map((function(e,n){return f=n&&d[t]&&e.l>=h[t],d[t]-=f?1:0,f?e.ss:[e.s]})).flat()}));return p[0].length===p[1].length?p:Wt(p[0],p[1],c)}function Xt(){return Xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var A=Object.getOwnPropertyDescriptor(r,t);return A.get?A.get.call(arguments.length<3?e:n):A.value}},Xt.apply(null,arguments)}function Yt(e,t,n,r){var A=Xt(h(e.prototype),t,n);return"function"==typeof A?function(e){return A.apply(n,e)}:A}
/*!
   * @antv/g-math
   * @description Geometry util
   * @version 3.1.0
   * @date 12/22/2025, 3:02:36 AM
   * @author AntVis
   * @docs https://g.antv.antgroup.com/
   */function jt(e,t,n,r){var A=e-n,i=t-r;return Math.sqrt(A*A+i*i)}function Zt(e,t){var n=Math.min.apply(Math,c(e)),r=Math.min.apply(Math,c(t));return{x:n,y:r,width:Math.max.apply(Math,c(e))-n,height:Math.max.apply(Math,c(t))-r}}function Jt(e,t,n,r,A,i){return n*Math.cos(A)*Math.cos(i)-r*Math.sin(A)*Math.sin(i)+e}function qt(e,t,n,r,A,i){return n*Math.sin(A)*Math.cos(i)+r*Math.cos(A)*Math.sin(i)+t}function $t(e,t,n,r,A,i,o){for(var a=function(e,t,n){return Math.atan(-t/e*Math.tan(n))}(n,r,A),s=1/0,l=-1/0,u=[i,o],c=2*-Math.PI;c<=2*Math.PI;c+=Math.PI){var h=a+c;i<o?i<h&&h<o&&u.push(h):o<h&&h<i&&u.push(h)}for(var d=0;d<u.length;d++){var f=Jt(e,0,n,r,A,u[d]);f<s&&(s=f),f>l&&(l=f)}for(var p=function(e,t,n){return Math.atan(t/(e*Math.tan(n)))}(n,r,A),g=1/0,v=-1/0,y=[i,o],C=2*-Math.PI;C<=2*Math.PI;C+=Math.PI){var B=p+C;i<o?i<B&&B<o&&y.push(B):o<B&&B<i&&y.push(B)}for(var m=0;m<y.length;m++){var w=qt(0,t,n,r,A,y[m]);w<g&&(g=w),w>v&&(v=w)}return{x:s,y:g,width:l-s,height:v-g}}var en=1e-4;function tn(e,t,n,r,A,i){var o=-1,a=1/0,s=[n,r],l=20;i&&i>200&&(l=i/10);for(var u=1/l,h=u/10,d=0;d<=l;d++){var f=d*u,p=[A.apply(void 0,c(e.concat([f]))),A.apply(void 0,c(t.concat([f])))],g=jt(s[0],s[1],p[0],p[1]);g<a&&(o=f,a=g)}if(0===o)return{x:e[0],y:t[0]};if(1===o){var v=e.length;return{x:e[v-1],y:t[v-1]}}a=1/0;for(var y=0;y<32&&!(h<en);y++){var C=o-h,B=o+h,m=[A.apply(void 0,c(e.concat([C]))),A.apply(void 0,c(t.concat([C])))],w=jt(s[0],s[1],m[0],m[1]);if(C>=0&&w<a)o=C,a=w;else{var E=[A.apply(void 0,c(e.concat([B]))),A.apply(void 0,c(t.concat([B])))],x=jt(s[0],s[1],E[0],E[1]);B<=1&&x<a?(o=B,a=x):h*=.5}}return{x:A.apply(void 0,c(e.concat([o]))),y:A.apply(void 0,c(t.concat([o])))}}function nn(e,t,n,r){return jt(e,t,n,r)}function rn(e,t,n,r,A){return{x:(1-A)*e+A*n,y:(1-A)*t+A*r}}function An(e,t,n,r,A,i){var o=[n-e,r-t];if(function(e,t){return e[0]===t[0]&&e[1]===t[1]}(o,[0,0]))return Math.sqrt((A-e)*(A-e)+(i-t)*(i-t));var a=[-o[1],o[0]];!function(e,t){var n=t[0],r=t[1],A=n*n+r*r;A>0&&(A=1/Math.sqrt(A)),e[0]=t[0]*A,e[1]=t[1]*A}(a,a);var s=[A-e,i-t];return Math.abs(function(e,t){return e[0]*t[0]+e[1]*t[1]}(s,a))}function on(e,t,n,r,A){var i=1-A;return i*i*i*e+3*t*A*i*i+3*n*A*A*i+r*A*A*A}function an(e,t,n,r){var A,i,o,a=-3*e+9*t-9*n+3*r,s=6*e-12*t+6*n,l=3*t-3*e,u=[];if(Je(a,0))Je(s,0)||(A=-l/s)>=0&&A<=1&&u.push(A);else{var c=s*s-4*a*l;Je(c,0)?u.push(-s/(2*a)):c>0&&(i=(-s-(o=Math.sqrt(c)))/(2*a),(A=(-s+o)/(2*a))>=0&&A<=1&&u.push(A),i>=0&&i<=1&&u.push(i))}return u}function sn(e,t,n,r,A,i,o,a){for(var s=[e,o],l=[t,a],u=an(e,n,A,o),c=an(t,r,i,a),h=0;h<u.length;h++)s.push(on(e,n,A,o,u[h]));for(var d=0;d<c.length;d++)l.push(on(t,r,i,a,c[d]));return Zt(s,l)}function ln(e,t,n,r,A,i,o,a,s,l,u){var c=function(e,t,n,r,A,i,o,a,s,l,u){return tn([e,n,A,o],[t,r,i,a],s,l,on,u)}(e,t,n,r,A,i,o,a,s,l,u);return jt(c.x,c.y,s,l)}function un(e){return function(e){if(e.length<2)return 0;for(var t=0,n=0;n<e.length-1;n++){var r=e[n],A=e[n+1];t+=jt(r[0],r[1],A[0],A[1])}return t}(e)}function cn(e,t,n,r){var A=1-r;return A*A*e+2*r*A*t+r*r*n}function hn(e,t,n){var r=e+n-2*t;if(Je(r,0))return[.5];var A=(e-t)/r;return A<=1&&A>=0?[A]:[]}function dn(e,t,n,r,A,i){var o=hn(e,n,A)[0],a=hn(t,r,i)[0],s=[e,A],l=[t,i];return void 0!==o&&s.push(cn(e,n,A,o)),void 0!==a&&l.push(cn(t,r,i,a)),Zt(s,l)}function fn(e,t,n,r,A,i,o,a){var s=function(e,t,n,r,A,i,o,a){return tn([e,n,A],[t,r,i],o,a,cn)}(e,t,n,r,A,i,o,a);return jt(s.x,s.y,o,a)}function pn(e,t){this.v=e,this.k=t}function gn(e,t,n,r){var A=Object.defineProperty;try{A({},"",{})}catch(e){A=0}gn=function(e,t,n,r){if(t)A?A(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var i=function(t,n){gn(e,t,(function(e){return this._invoke(t,n,e)}))};i("next",0),i("throw",1),i("return",2)}},gn(e,t,n,r)}function vn(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",A=n.toStringTag||"@@toStringTag";function i(n,r,A,i){var s=r&&r.prototype instanceof a?r:a,l=Object.create(s.prototype);return gn(l,"_invoke",function(n,r,A){var i,a,s,l=0,u=A||[],c=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,a=0,s=e,h.n=n,o}};function d(n,r){for(a=n,s=r,t=0;!c&&l&&!A&&t<u.length;t++){var A,i=u[t],d=h.p,f=i[2];n>3?(A=f===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((A=n<2&&d<i[1])?(a=0,h.v=r,h.n=i[1]):d<f&&(A=n<3||i[0]>r||r>f)&&(i[4]=n,i[5]=r,h.n=f,a=0))}if(A||n>1)return o;throw c=!0,r}return function(A,u,f){if(l>1)throw TypeError("Generator is already running");for(c&&1===u&&d(u,f),a=u,s=f;(t=a<2?e:s)||!c;){i||(a?a<3?(a>1&&(h.n=-1),d(a,s)):h.n=s:h.v=s);try{if(l=2,i){if(a||(A="next"),t=i[A]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+A+"' method"),a=1);i=e}else if((t=(c=h.n<0)?s:n.call(r,h))!==o)break}catch(t){i=e,a=1,s=t}finally{l=1}}return{value:t,done:c}}}(n,A,i),!0),l}var o={};function a(){}function s(){}function l(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(gn(t={},r,(function(){return this})),t),c=l.prototype=a.prototype=Object.create(u);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,gn(e,A,"GeneratorFunction")),e.prototype=Object.create(c),e}return s.prototype=l,gn(c,"constructor",l),gn(l,"constructor",s),s.displayName="GeneratorFunction",gn(l,A,"GeneratorFunction"),gn(c),gn(c,A,"Generator"),gn(c,r,(function(){return this})),gn(c,"toString",(function(){return"[object Generator]"})),(vn=function(){return{w:i,m:h}})()}function yn(e,t){function n(r,A,i,o){try{var a=e[r](A),s=a.value;return s instanceof pn?t.resolve(s.v).then((function(e){n("next",e,i,o)}),(function(e){n("throw",e,i,o)})):t.resolve(s).then((function(e){a.value=e,i(a)}),(function(e){return n("throw",e,i,o)}))}catch(e){o(e)}}var r;this.next||(gn(yn.prototype),gn(yn.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),gn(this,"_invoke",(function(e,A,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}),!0)}function Cn(e,t,n,r,A){return new yn(vn().w(e,t,n,r),A||Promise)}function Bn(e,t,n,r,A){var i=Cn(e,t,n,r,A);return i.next().then((function(e){return e.done?e.value:i.next()}))}function mn(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}}function wn(e){if(null!=e){var n=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(t(e)+" is not iterable")}function En(){var e=vn(),t=e.m(En),n=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function r(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===n||"GeneratorFunction"===(t.displayName||t.name))}var A={throw:1,return:2,break:3,continue:3};function i(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,A[e],t)},delegateYield:function(e,A,i){return t.resultName=A,n(r.d,wn(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,A){r.p=t.prev,r.n=t.next;try{return e(n,A)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(En=function(){return{wrap:function(t,n,r,A){return e.w(i(t),n,r,A&&A.reverse())},isGeneratorFunction:r,mark:e.m,awrap:function(e,t){return new pn(e,t)},AsyncIterator:yn,async:function(e,t,n,A,o){return(r(t)?Cn:Bn)(i(e),t,n,A,o)},keys:mn,values:wn}})()}function xn(e,t,n,r,A,i,o){try{var a=e[i](o),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,A)}function Sn(e){return function(){var t=this,n=arguments;return new Promise((function(r,A){var i=e.apply(t,n);function o(e){xn(i,r,A,o,a,"next",e)}function a(e){xn(i,r,A,o,a,"throw",e)}o(void 0)}))}}function Tn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=u(e))||t){n&&(e=n);var r=0,A=function(){};return{s:A,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:A}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function Fn(e,t){if(null==e)return{};var n,r,A=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(A[n]=e[n])}return A}
/*!
   * @antv/g-lite
   * @description A core module for rendering engine implements DOM API.
   * @version 2.7.0
   * @date 12/24/2025, 11:55:20 AM
   * @author AntVis
   * @docs https://g.antv.antgroup.com/
   */var bn=function(e){return e.GROUP="g",e.FRAGMENT="fragment",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",e}({}),In=function(e){return e[e.ZERO=0]="ZERO",e[e.NEGATIVE_ONE=1]="NEGATIVE_ONE",e}({}),Ln=function(){return s((function e(){o(this,e),this.plugins=[]}),[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach((function(t){var n=e.context.renderingPlugins.indexOf(t);n>=0&&e.context.renderingPlugins.splice(n,1)}))}}])}(),Qn=function(){return s((function e(t){o(this,e),this.clipSpaceNearZ=In.NEGATIVE_ONE,this.plugins=[],this.config=i({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},t)}),[{key:"registerPlugin",value:function(e){-1===this.plugins.findIndex((function(t){return t===e}))&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var t=this.plugins.findIndex((function(t){return t===e}));t>-1&&this.plugins.splice(t,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(e){return this.plugins.find((function(t){return t.name===e}))}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(e){Object.assign(this.config,e)}}])}(),Un=pe,Rn=de,Mn=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e},Hn=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e},On=ve,kn=xe,Nn=function(){function e(){o(this,e),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return s(e,[{key:"update",value:function(e,t){Rn(this.center,e),Rn(this.halfExtents,t),kn(this.min,this.center,this.halfExtents),Un(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,t){Un(this.center,t,e),On(this.center,this.center,.5),kn(this.halfExtents,t,e),On(this.halfExtents,this.halfExtents,.5),Rn(this.min,e),Rn(this.max,t)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){if(!e.isEmpty(t))if(e.isEmpty(this))this.setMinMax(t.getMin(),t.getMax());else{var n=this.center,r=n[0],A=n[1],i=n[2],o=this.halfExtents,a=o[0],s=o[1],l=o[2],u=r-a,c=r+a,h=A-s,d=A+s,f=i-l,p=i+l,g=t.center,v=g[0],y=g[1],C=g[2],B=t.halfExtents,m=B[0],w=B[1],E=B[2],x=v-m,S=v+m,T=y-w,F=y+w,b=C-E,I=C+E;x<u&&(u=x),S>c&&(c=S),T<h&&(h=T),F>d&&(d=F),b<f&&(f=b),I>p&&(p=I),n[0]=.5*(u+c),n[1]=.5*(h+d),n[2]=.5*(f+p),o[0]=.5*(c-u),o[1]=.5*(d-h),o[2]=.5*(p-f),this.min[0]=u,this.min[1]=h,this.min[2]=f,this.max[0]=c,this.max[1]=d,this.max[2]=p}}},{key:"setFromTransformedAABB",value:function(e,t){var n=this.center,r=this.halfExtents,A=e.center,i=e.halfExtents,o=t[0],a=t[4],s=t[8],l=t[1],u=t[5],c=t[9],h=t[2],d=t[6],f=t[10],p=Math.abs(o),g=Math.abs(a),v=Math.abs(s),y=Math.abs(l),C=Math.abs(u),B=Math.abs(c),m=Math.abs(h),w=Math.abs(d),E=Math.abs(f);n[0]=t[12]+o*A[0]+a*A[1]+s*A[2],n[1]=t[13]+l*A[0]+u*A[1]+c*A[2],n[2]=t[14]+h*A[0]+d*A[1]+f*A[2],r[0]=p*i[0]+g*i[1]+v*i[2],r[1]=y*i[0]+C*i[1]+B*i[2],r[2]=m*i[0]+w*i[1]+E*i[2],kn(this.min,n,r),Un(this.max,n,r)}},{key:"intersects",value:function(e){var t=this.getMax(),n=this.getMin(),r=e.getMax(),A=e.getMin();return n[0]<=r[0]&&t[0]>=A[0]&&n[1]<=r[1]&&t[1]>=A[1]&&n[2]<=r[2]&&t[2]>=A[2]}},{key:"intersection",value:function(t){if(!this.intersects(t))return null;var n=new e,r=Mn([0,0,0],this.getMin(),t.getMin()),A=Hn([0,0,0],this.getMax(),t.getMax());return n.setMinMax(r,A),n}},{key:"getNegativeFarPoint",value:function(e){return 273===e.pnVertexFlag?Rn([0,0,0],this.min):272===e.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===e.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===e.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===e.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===e.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===e.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return 273===e.pnVertexFlag?Rn([0,0,0],this.max):272===e.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===e.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===e.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===e.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===e.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===e.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||0===e.halfExtents[0]&&0===e.halfExtents[1]&&0===e.halfExtents[2]}}])}(),_n=function(){return s((function e(t,n){o(this,e),this.distance=t||0,this.normal=n||he(0,1,0),this.updatePNVertexFlag()}),[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(this.normal[0]>=0)<<8)+(Number(this.normal[1]>=0)<<4)+Number(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return Ce(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/Te(this.normal);ve(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,t,n){var r=this.distanceToPoint(e),A=r/(r-this.distanceToPoint(t)),i=A>=0&&A<=1;return i&&n&&me(n,e,t,A),i}}])}(),Dn=function(e){return e[e.OUTSIDE=4294967295]="OUTSIDE",e[e.INSIDE=0]="INSIDE",e[e.INDETERMINATE=2147483647]="INDETERMINATE",e}({}),Pn=function(){return s((function e(t){if(o(this,e),this.planes=[],t)this.planes=t;else for(var n=0;n<6;n++)this.planes.push(new _n)}),[{key:"extractFromVPMatrix",value:function(e){var t=y(e,16),n=t[0],r=t[1],A=t[2],i=t[3],o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],f=t[12],p=t[13],g=t[14],v=t[15];fe(this.planes[0].normal,i-n,l-o,d-u),this.planes[0].distance=v-f,fe(this.planes[1].normal,i+n,l+o,d+u),this.planes[1].distance=v+f,fe(this.planes[2].normal,i+r,l+a,d+c),this.planes[2].distance=v+p,fe(this.planes[3].normal,i-r,l-a,d-c),this.planes[3].distance=v-p,fe(this.planes[4].normal,i-A,l-s,d-h),this.planes[4].distance=v-g,fe(this.planes[5].normal,i+A,l+s,d+h),this.planes[5].distance=v+g,this.planes.forEach((function(e){e.normalize(),e.updatePNVertexFlag()}))}}])}(),Gn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;o(this,e),this.x=0,this.y=0,this.x=t,this.y=n}return s(e,[{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),Kn=function(){function e(t,n,r,A){o(this,e),this.x=t,this.y=n,this.width=r,this.height=A,this.left=t,this.right=t+r,this.top=n,this.bottom=n+A}return s(e,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(t){return new e(t.x,t.y,t.width,t.height)}},{key:"applyTransform",value:function(t,n){var r=be(t.x,t.y,0,1),A=be(t.x+t.width,t.y,0,1),i=be(t.x,t.y+t.height,0,1),o=be(t.x+t.width,t.y+t.height,0,1),a=Fe(),s=Fe(),l=Fe(),u=Fe();Ie(a,r,n),Ie(s,A,n),Ie(l,i,n),Ie(u,o,n);var c=Math.min(a[0],s[0],l[0],u[0]),h=Math.min(a[1],s[1],l[1],u[1]),d=Math.max(a[0],s[0],l[0],u[0]),f=Math.max(a[1],s[1],l[1],u[1]);return e.fromRect({x:c,y:h,width:d-c,height:f-h})}}])}(),zn="Method not implemented.",Vn="Use document.documentElement instead.";function Wn(e){return void 0===e?0:e>360||e<-360?e%360:e}var Xn=le();function Yn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return Array.isArray(e)&&3===e.length?r?ue(e):de(Xn,e):je(e)?r?he(e,t,n):fe(Xn,e,t,n):r?he(e[0],e[1]||t,e[2]||n):fe(Xn,e[0],e[1]||t,e[2]||n)}var jn=Math.PI/180;function Zn(e){return e*jn}var Jn=180/Math.PI;function qn(e){return e*Jn}var $n=Math.PI/2;function er(e,t){return 16===t.length?function(e,t){var n,r,A=y(Y(le(),t),3),i=A[0],o=A[1],a=A[2],s=Math.asin(-t[2]/i);return s<$n?s>-$n?(n=Math.atan2(t[6]/o,t[10]/a),r=Math.atan2(t[1]/i,t[0]/i)):(r=0,n=-Math.atan2(t[4]/o,t[5]/o)):(r=0,n=Math.atan2(t[4]/o,t[5]/o)),e[0]=n,e[1]=s,e[2]=r,e}(e,t):function(e,t){var n=t[0],r=t[1],A=t[2],i=t[3],o=r*r,a=A*A,s=i*i,l=n*n+o+a+s,u=n*i-r*A;return u>.499995*l?(e[0]=$n,e[1]=2*Math.atan2(r,n),e[2]=0):u<-.499995*l?(e[0]=-$n,e[1]=2*Math.atan2(r,n),e[2]=0):(e[0]=Math.asin(2*(n*A-i*r)),e[1]=Math.atan2(2*(n*i+r*A),1-2*(a+s)),e[2]=Math.atan2(2*(n*r+A*i),1-2*(o+a))),e}(e,t)}function tr(e,t,n,r,A){var i,o,a,s,l,u,c,h,d,f,p=Math.cos(e),g=Math.sin(e);return i=r*p,o=A*g,a=0,s=-r*g,l=A*p,u=0,c=t,h=n,d=1,(f=new x(9))[0]=i,f[1]=o,f[2]=a,f[3]=s,f[4]=l,f[5]=u,f[6]=c,f[7]=h,f[8]=d,f}function nr(e){var t=e[0],n=e[1],r=e[3],A=e[4],i=Math.sqrt(t*t+n*n),o=Math.sqrt(r*r+A*A);if(t*A-n*r<0&&(t<A?i=-i:o=-o),i){var a=1/i;t*=a,n*=a}if(o){var s=1/o;r*=s,A*=s}var l=qn(Math.atan2(n,t));return[e[6],e[7],i,o,l]}var rr=T(),Ar=T(),ir=Fe(),or=[le(),le(),le()],ar=le();function sr(e,t,n,r,A){e[0]=t[0]*r+n[0]*A,e[1]=t[1]*r+n[1]*A,e[2]=t[2]*r+n[2]*A}var lr=function(e){return e[e.ORBITING=0]="ORBITING",e[e.EXPLORING=1]="EXPLORING",e[e.TRACKING=2]="TRACKING",e}({}),ur=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.ROTATIONAL=1]="ROTATIONAL",e[e.TRANSLATIONAL=2]="TRANSLATIONAL",e[e.CINEMATIC=3]="CINEMATIC",e}({}),cr=function(e){return e[e.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",e[e.PERSPECTIVE=1]="PERSPECTIVE",e}({}),hr="updated",dr=2e-4,fr=function(){return s((function e(){o(this,e),this.clipSpaceNearZ=In.NEGATIVE_ONE,this.eventEmitter=new w,this.matrix=T(),this.right=he(1,0,0),this.up=he(0,1,0),this.forward=he(0,0,1),this.position=he(0,0,1),this.focalPoint=he(0,0,0),this.distanceVector=he(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=T(),this.projectionMatrixInverse=T(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=lr.EXPLORING,this.trackingMode=ur.DEFAULT,this.projectionMode=cr.PERSPECTIVE,this.frustum=new Pn,this.orthoMatrix=T()}),[{key:"isOrtho",value:function(){return this.projectionMode===cr.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,t){return this.type=e,this.type===lr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===lr.TRACKING&&void 0!==t&&this.setTrackingMode(t),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==lr.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return R(T(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,t){var n=D(T(),[e,t,0]);this.jitteredProjectionMatrix=H(T(),n,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===cr.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===cr.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,t,n,r,A,i){return this.aspect=e/t,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=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=A,this.view.height=i,this.projectionMode===cr.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}},{key:"clearViewOffset",value:function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===cr.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}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===cr.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===cr.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,t){var n=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),r=n.x,A=n.y,i=this.roll;this.rotate(0,0,-i),this.setPosition(r,A),this.setFocalPoint(r,A),this.setZoom(e),this.rotate(0,0,i);var o=this.canvas.viewport2Canvas({x:t[0],y:t[1]}),a=he(o.x-r,o.y-A,0),s=Ce(a,this.right)/ce(this.right),l=Ce(a,this.up)/ce(this.up),u=y(this.getPosition(),2),c=u[0],h=u[1],d=y(this.getFocalPoint(),2),f=d[0],p=d[1];return this.setPosition(c-s,h-l),this.setFocalPoint(f-s,p-l),this}},{key:"setPerspective",value:function(e,t,n,r){var A;this.projectionMode=cr.PERSPECTIVE,this.fov=n,this.near=e,this.far=t,this.aspect=r;var i=this.near*Math.tan(Zn(.5*this.fov))/this.zoom,o=2*i,a=this.aspect*o,s=-.5*a;if(null!==(A=this.view)&&void 0!==A&&A.enabled){var l=this.view.fullWidth,u=this.view.fullHeight;s+=this.view.offsetX*a/l,i-=this.view.offsetY*o/u,a*=this.view.width/l,o*=this.view.height/u}return function(e,t,n,r,A,i,o){var a,s,l=2*i,u=n-t,c=r-A,h=l/u,d=l/c,f=(n+t)/u,p=(r+A)/c,g=o-i,v=o*i;arguments.length>7&&void 0!==arguments[7]&&arguments[7]?(a=-o/g,s=-v/g):(a=-(o+i)/g,s=-2*v/g),e[0]=h,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=d,e[6]=0,e[7]=0,e[8]=f,e[9]=p,e[10]=a,e[11]=-1,e[12]=0,e[13]=0,e[14]=s,e[15]=0}(this.projectionMatrix,s,s+a,i-o,i,e,this.far,this.clipSpaceNearZ===In.ZERO),R(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,t,n,r,A,i){var o;this.projectionMode=cr.ORTHOGRAPHIC,this.rright=t,this.left=e,this.top=n,this.bottom=r,this.near=A,this.far=i;var a=(this.rright-this.left)/(2*this.zoom),s=(this.top-this.bottom)/(2*this.zoom),l=(this.rright+this.left)/2,u=(this.top+this.bottom)/2,c=l-a,h=l+a,d=u+s,f=u-s;if(null!==(o=this.view)&&void 0!==o&&o.enabled){var p=(this.rright-this.left)/this.view.fullWidth/this.zoom,g=(this.top-this.bottom)/this.view.fullHeight/this.zoom;h=(c+=p*this.view.offsetX)+p*this.view.width,f=(d-=g*this.view.offsetY)-g*this.view.height}return this.clipSpaceNearZ===In.NEGATIVE_ONE?te(this.projectionMatrix,c,h,d,f,A,i):ne(this.projectionMatrix,c,h,d,f,A,i),R(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var t=Yn(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position[1],arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.position[2]);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.focalPoint[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.focalPoint[2],r=he(0,1,0);if(this.focalPoint=Yn(e,t,n),this.trackingMode===ur.CINEMATIC){var A=ge(le(),this.focalPoint,this.position);e=A[0],t=A[1],n=A[2];var i=ce(A),o=qn(Math.asin(t/i)),a=90+qn(Math.atan2(n,e)),s=T();_(s,s,Zn(a)),N(s,s,Zn(o)),r=we(le(),[0,1,0],s)}return R(this.matrix,re(T(),this.position,this.focalPoint,r)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<dr&&(this.distance=dr),this.dollyingStep=this.distance/100;var t=le();e=this.distance;var n=this.forward,r=this.focalPoint;return t[0]=e*n[0]+r[0],t[1]=e*n[1]+r[1],t[2]=e*n[2]+r[2],this._setPosition(t),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=Wn(e),this.computeMatrix(),this._getAxes(),this.type===lr.ORBITING||this.type===lr.EXPLORING?this._getPosition():this.type===lr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=Wn(e),this.computeMatrix(),this._getAxes(),this.type===lr.ORBITING||this.type===lr.EXPLORING?this._getPosition():this.type===lr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=Wn(e),this.computeMatrix(),this._getAxes(),this.type===lr.ORBITING||this.type===lr.EXPLORING?this._getPosition():this.type===lr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=Qe(Le(),[0,0,1],Zn(this.roll));Q(this.matrix);var t=Qe(Le(),[1,0,0],Zn((this.rotateWorld&&this.type!==lr.TRACKING||this.type===lr.TRACKING?1:-1)*this.elevation)),n=Qe(Le(),[0,1,0],Zn((this.rotateWorld&&this.type!==lr.TRACKING||this.type===lr.TRACKING?1:-1)*this.azimuth)),r=Ue(Le(),n,t);r=Ue(Le(),r,e);var A=J(T(),r);this.type===lr.ORBITING||this.type===lr.EXPLORING?(O(this.matrix,this.matrix,this.focalPoint),H(this.matrix,this.matrix,A),O(this.matrix,this.matrix,[0,0,this.distance])):this.type===lr.TRACKING&&(O(this.matrix,this.matrix,this.position),H(this.matrix,this.matrix,A))}},{key:"_setPosition",value:function(e,t,n){this.position=Yn(e,t,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()}},{key:"_getAxes",value:function(){de(this.right,Yn(Ie(Fe(),[1,0,0,0],this.matrix))),de(this.up,Yn(Ie(Fe(),[0,1,0,0],this.matrix))),de(this.forward,Yn(Ie(Fe(),[0,0,1,0],this.matrix))),ye(this.right,this.right),ye(this.up,this.up),ye(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],t=this.distanceVector[1],n=this.distanceVector[2],r=ce(this.distanceVector);if(0===r)return this.elevation=0,void(this.azimuth=0);this.type===lr.TRACKING||this.rotateWorld?(this.elevation=qn(Math.asin(t/r)),this.azimuth=qn(Math.atan2(-e,-n))):(this.elevation=-qn(Math.asin(t/r)),this.azimuth=-qn(Math.atan2(-e,-n)))}},{key:"_getPosition",value:function(){de(this.position,Yn(Ie(Fe(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){!function(e,t,n){var r=t[0],A=t[1],i=t[2];e[0]=r*n[0]+A*n[3]+i*n[6],e[1]=r*n[1]+A*n[4]+i*n[7],e[2]=r*n[2]+A*n[5]+i*n[8]}(this.distanceVector,[0,0,-this.distance],function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}(S(),this.matrix)),pe(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=ge(le(),this.focalPoint,this.position),this.distance=ce(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===cr.ORTHOGRAPHIC){var e=this.position,t=Qe(Le(),[0,0,1],-this.roll*Math.PI/180);Z(this.orthoMatrix,t,he((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),he(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),t=H(T(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(hr)}}},{key:"rotate",value:function(e,t,n){throw new Error(zn)}},{key:"pan",value:function(e,t){throw new Error(zn)}},{key:"dolly",value:function(e){throw new Error(zn)}},{key:"createLandmark",value:function(e,t){throw new Error(zn)}},{key:"gotoLandmark",value:function(e,t){throw new Error(zn)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(zn)}}])}(),pr=function(e){return e[e.Standard=0]="Standard",e}({}),gr=function(e){return e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",e}({}),vr=le(),yr=T(),Cr=Le();function Br(e){if(e.localDirtyFlag){if(0!==e.localSkew[0]||0!==e.localSkew[1]){Z(e.localTransform,e.localRotation,e.localPosition,he(1,1,1),e.origin),0===e.localSkew[0]&&0===e.localSkew[1]||(Q(yr),yr[4]=Math.tan(e.localSkew[0]),yr[1]=Math.tan(e.localSkew[1]),H(e.localTransform,e.localTransform,yr));var t=Z(yr,ke(Cr,0,0,0,1),fe(vr,1,1,1),e.localScale,e.origin);H(e.localTransform,e.localTransform,t)}else{var n=e.localTransform,r=e.localPosition,A=e.localRotation,i=e.localScale,o=e.origin,a=0!==r[0]||0!==r[1]||0!==r[2],s=1!==A[3]||0!==A[0]||0!==A[1]||0!==A[2],l=1!==i[0]||1!==i[1]||1!==i[2],u=0!==o[0]||0!==o[1]||0!==o[2];s||l||u?Z(n,A,r,i,o):a?D(n,r):Q(n)}e.localDirtyFlag=!1}}var mr={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Kn(0,0,0,0)},wr=function(e){return e.COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>",e}({});function Er(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function xr(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Sr(){}var Tr=.7,Fr=1/Tr,br="\\s*([+-]?\\d+)\\s*",Ir="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qr=/^#([0-9a-f]{3,8})$/,Ur=new RegExp(`^rgb\\(${br},${br},${br}\\)$`),Rr=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),Mr=new RegExp(`^rgba\\(${br},${br},${br},${Ir}\\)$`),Hr=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${Ir}\\)$`),Or=new RegExp(`^hsl\\(${Ir},${Lr},${Lr}\\)$`),kr=new RegExp(`^hsla\\(${Ir},${Lr},${Lr},${Ir}\\)$`),Nr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function _r(){return this.rgb().formatHex()}function Dr(){return this.rgb().formatRgb()}function Pr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Qr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Gr(t):3===n?new zr(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Kr(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Kr(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ur.exec(e))?new zr(t[1],t[2],t[3],1):(t=Rr.exec(e))?new zr(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Mr.exec(e))?Kr(t[1],t[2],t[3],t[4]):(t=Hr.exec(e))?Kr(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Or.exec(e))?Zr(t[1],t[2]/100,t[3]/100,1):(t=kr.exec(e))?Zr(t[1],t[2]/100,t[3]/100,t[4]):Nr.hasOwnProperty(e)?Gr(Nr[e]):"transparent"===e?new zr(NaN,NaN,NaN,0):null}function Gr(e){return new zr(e>>16&255,e>>8&255,255&e,1)}function Kr(e,t,n,r){return r<=0&&(e=t=n=NaN),new zr(e,t,n,r)}function zr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Vr(){return`#${jr(this.r)}${jr(this.g)}${jr(this.b)}`}function Wr(){const e=Xr(this.opacity);return`${1===e?"rgb(":"rgba("}${Yr(this.r)}, ${Yr(this.g)}, ${Yr(this.b)}${1===e?")":`, ${e})`}`}function Xr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Yr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function jr(e){return((e=Yr(e))<16?"0":"")+e.toString(16)}function Zr(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qr(e,t,n,r)}function Jr(e){if(e instanceof qr)return new qr(e.h,e.s,e.l,e.opacity);if(e instanceof Sr||(e=Pr(e)),!e)return new qr;if(e instanceof qr)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,A=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,a=i-A,s=(i+A)/2;return a?(o=t===i?(n-r)/a+6*(n<r):n===i?(r-t)/a+2:(t-n)/a+4,a/=s<.5?i+A:2-i-A,o*=60):a=s>0&&s<1?0:o,new qr(o,a,s,e.opacity)}function qr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function $r(e){return(e=(e||0)%360)<0?e+360:e}function eA(e){return Math.max(0,Math.min(1,e||0))}function tA(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function nA(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){for(var r=arguments.length,A=new Array(r),i=0;i<r;i++)A[i]=arguments[i];var o=t?t.apply(this,A):A[0],a=n.cache;if(a.has(o))return a.get(o);var s=e.apply(this,A);return n.cache=a.set(o,s)||a,s};return n.cache=new(nA.Cache||Map),nA.cacheList.push(n.cache),n}Er(Sr,Pr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_r,formatHex:_r,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Jr(this).formatHsl()},formatRgb:Dr,toString:Dr}),Er(zr,(function(e,t,n,r){return 1===arguments.length?((A=e)instanceof Sr||(A=Pr(A)),A?new zr((A=A.rgb()).r,A.g,A.b,A.opacity):new zr):new zr(e,t,n,null==r?1:r);var A}),xr(Sr,{brighter(e){return e=null==e?Fr:Math.pow(Fr,e),new zr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Tr:Math.pow(Tr,e),new zr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zr(Yr(this.r),Yr(this.g),Yr(this.b),Xr(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Vr,formatHex:Vr,formatHex8:function(){return`#${jr(this.r)}${jr(this.g)}${jr(this.b)}${jr(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Wr,toString:Wr})),Er(qr,(function(e,t,n,r){return 1===arguments.length?Jr(e):new qr(e,t,n,null==r?1:r)}),xr(Sr,{brighter(e){return e=null==e?Fr:Math.pow(Fr,e),new qr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Tr:Math.pow(Tr,e),new qr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,A=2*n-r;return new zr(tA(e>=240?e-240:e+120,A,r),tA(e,A,r),tA(e<120?e+240:e-120,A,r),this.opacity)},clamp(){return new qr($r(this.h),eA(this.s),eA(this.l),Xr(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xr(this.opacity);return`${1===e?"hsl(":"hsla("}${$r(this.h)}, ${100*eA(this.s)}%, ${100*eA(this.l)}%${1===e?")":`, ${e})`}`}})),nA.Cache=Map,nA.cacheList=[],nA.clearCache=function(){nA.cacheList.forEach((function(e){return e.clear()}))};var rA=function(e){return e[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",e}({}),AA=function(e){return e[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",e}({}),iA=function(e){return e[e.kYes=0]="kYes",e[e.kNo=1]="kNo",e}({}),oA=function(e){return e[e.kYes=0]="kYes",e[e.kNo=1]="kNo",e}({}),aA=[{name:"em",unit_type:rA.kEms},{name:"px",unit_type:rA.kPixels},{name:"deg",unit_type:rA.kDegrees},{name:"rad",unit_type:rA.kRadians},{name:"grad",unit_type:rA.kGradians},{name:"ms",unit_type:rA.kMilliseconds},{name:"s",unit_type:rA.kSeconds},{name:"rem",unit_type:rA.kRems},{name:"turn",unit_type:rA.kTurns}],sA=function(e){return e[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",e}({}),lA=function(e){return e?"number"===e?rA.kNumber:"percent"===e||"%"===e?rA.kPercentage:function(e){return aA.find((function(t){return t.name===e})).unit_type}(e):rA.kUnknown},uA=function(e){var t=1;switch(e){case rA.kPixels:case rA.kDegrees:case rA.kSeconds:break;case rA.kMilliseconds:t=.001;break;case rA.kRadians:t=180/Math.PI;break;case rA.kGradians:t=.9;break;case rA.kTurns:t=360}return t},cA=function(e){switch(e){case rA.kNumber:case rA.kInteger:return"";case rA.kPercentage:return"%";case rA.kEms:return"em";case rA.kRems:return"rem";case rA.kPixels:return"px";case rA.kDegrees:return"deg";case rA.kRadians:return"rad";case rA.kGradians:return"grad";case rA.kMilliseconds:return"ms";case rA.kSeconds:return"s";case rA.kTurns:return"turn"}return""},hA=function(){return s((function e(){o(this,e)}),[{key:"toString",value:function(){return this.buildCSSText(iA.kNo,oA.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=sA.kUnitType&&this.getType()<=sA.kClampType}}],[{key:"isAngle",value:function(e){return e===rA.kDegrees||e===rA.kRadians||e===rA.kGradians||e===rA.kTurns}},{key:"isLength",value:function(e){return e>=rA.kEms&&e<rA.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===rA.kPercentage||e===rA.kEms||e===rA.kRems}},{key:"isTime",value:function(e){return e===rA.kSeconds||e===rA.kMilliseconds}}])}(),dA=function(e){function t(e){var n;return o(this,t),(n=p(this,t)).colorSpace=e,n}return v(t,e),s(t,[{key:"getType",value:function(){return sA.kColorType}},{key:"to",value:function(e){return this}}])}(hA),fA=function(e){return e[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",e}({}),pA=function(e){function t(e,n){var r;return o(this,t),(r=p(this,t)).type=e,r.value=n,r}return v(t,e),s(t,[{key:"clone",value:function(){return new t(this.type,this.value)}},{key:"buildCSSText",value:function(e,t,n){return n}},{key:"getType",value:function(){return sA.kColorType}}])}(hA),gA=function(e){function t(e){var n;return o(this,t),(n=p(this,t)).value=e,n}return v(t,e),s(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return sA.kKeywordType}},{key:"buildCSSText",value:function(e,t,n){return n+this.value}}])}(hA),vA=function(e){return function(e){switch(e){case AA.kUNumber:return rA.kNumber;case AA.kULength:return rA.kPixels;case AA.kUPercent:return rA.kPercentage;case AA.kUTime:return rA.kSeconds;case AA.kUAngle:return rA.kDegrees;default:return rA.kUnknown}}(function(e){switch(e){case rA.kNumber:case rA.kInteger:return AA.kUNumber;case rA.kPercentage:return AA.kUPercent;case rA.kPixels:return AA.kULength;case rA.kMilliseconds:case rA.kSeconds:return AA.kUTime;case rA.kDegrees:case rA.kRadians:case rA.kGradians:case rA.kTurns:return AA.kUAngle;default:return AA.kUOther}}(e))},yA=function(e){function t(e){var n,r,A=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rA.kNumber;return o(this,t),n=p(this,t),r="string"==typeof A?lA(A):A,n.unit=r,n.value=e,n}return v(t,e),s(t,[{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"equals",value:function(e){var t=e;return this.value===t.value&&this.unit===t.unit}},{key:"getType",value:function(){return sA.kUnitType}},{key:"convertTo",value:function(e){if(this.unit===e)return new t(this.value,this.unit);var n=vA(this.unit);if(n!==vA(e)||n===rA.kUnknown)return null;var r=uA(this.unit)/uA(e);return new t(this.value*r,e)}},{key:"buildCSSText",value:function(e,t,n){var r;switch(this.unit){case rA.kUnknown:break;case rA.kInteger:r=Number(this.value).toFixed(0);break;case rA.kNumber:case rA.kPercentage:case rA.kEms:case rA.kRems:case rA.kPixels:case rA.kDegrees:case rA.kRadians:case rA.kGradians:case rA.kMilliseconds:case rA.kSeconds:case rA.kTurns:var A=this.value,i=cA(this.unit);if(A<-999999||A>999999){var o=cA(this.unit);r=!Number.isFinite(A)||Number.isNaN(A)?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(Number.isFinite(e)?"NaN":e>0?"infinity":"-infinity")+t}(A,o):A+(o||"")}else r="".concat(A).concat(i)}return n+=r}}])}(hA),CA=new yA(0,"px");new yA(1,"px");var BA=new yA(0,"deg"),mA=function(e){function t(e,n,r){var A,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return o(this,t),(A=p(this,t,["rgb"])).r=e,A.g=n,A.b=r,A.alpha=i,A.isNone=a,A}return v(t,e),s(t,[{key:"clone",value:function(){return new t(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(e,t,n){return"".concat(n,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(dA),wA=new gA("unset"),EA={"":wA,unset:wA,initial:new gA("initial"),inherit:new gA("inherit")},xA=new mA(0,0,0,0,!0),SA=new mA(0,0,0,0),TA=nA((function(e,t,n,r){return new mA(e,t,n,r)}),(function(e,t,n,r){return"rgba(".concat(e,",").concat(t,",").concat(n,",").concat(r,")")})),FA=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rA.kNumber;return new yA(e,t)};function bA(e){var t=e.type,n=e.value;return"hex"===t?"#".concat(n):"literal"===t?n:"rgb"===t?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")")}new yA(50,"%");var IA=function(){var e={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]+\.?))/},t="";function n(e){throw new Error("".concat(t,": ").concat(e))}function r(){var e=d(A);return t.length>0&&n("Invalid input not EOF"),e}function A(){return i("linear-gradient",e.linearGradient,a)||i("repeating-linear-gradient",e.repeatingLinearGradient,a)||i("radial-gradient",e.radialGradient,s)||i("repeating-radial-gradient",e.repeatingRadialGradient,s)||i("conic-gradient",e.conicGradient,s)}function i(t,r,A){return o(r,(function(r){var i=A();return i&&(C(e.comma)||n("Missing comma before color stops")),{type:t,orientation:i,colorStops:d(f)}}))}function o(t,r){var A=C(t);if(A){C(e.startCall)||n("Missing (");var i=r(A);return C(e.endCall)||n("Missing )"),i}}function a(){return y("directional",e.sideOrCorner,1)||y("angular",e.angleValue,1)}function s(){var n,r,A=l();return A&&((n=[]).push(A),r=t,C(e.comma)&&((A=l())?n.push(A):t=r)),n}function l(){var e=function(){var e=y("shape",/^(circle)/i,0);e&&(e.style=v()||u());return e}()||function(){var e=y("shape",/^(ellipse)/i,0);e&&(e.style=g()||u());return e}();if(e)e.at=c();else{var t=u();if(t){e=t;var n=c();n&&(e.at=n)}else{var r=h();r&&(e={type:"default-radial",at:r})}}return e}function u(){return y("extent-keyword",e.extentKeywords,1)}function c(){if(y("position",/^at/,0)){var e=h();return e||n("Missing positioning value"),e}}function h(){var e={x:g(),y:g()};if(e.x||e.y)return{type:"position",value:e}}function d(t){var r=t(),A=[];if(r)for(A.push(r);C(e.comma);)(r=t())?A.push(r):n("One extra comma");return A}function f(){var t=y("hex",e.hexColor,1)||o(e.rgbaColor,(function(){return{type:"rgba",value:d(p)}}))||o(e.rgbColor,(function(){return{type:"rgb",value:d(p)}}))||y("literal",e.literalColor,0);return t||n("Expected color definition"),t.length=g(),t}function p(){return C(e.number)[1]}function g(){return y("%",e.percentageValue,1)||y("position-keyword",e.positionKeywords,1)||v()}function v(){return y("px",e.pixelValue,1)||y("em",e.emValue,1)}function y(e,t,n){var r=C(t);if(r)return{type:e,value:r[n]}}function C(e){var n=/^[\n\r\t\s]+/.exec(t);n&&B(n[0].length);var r=e.exec(t);return r&&B(r[0].length),r}function B(e){t=t.substring(e)}return function(e){return t=e,r()}}();var LA=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,QA=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,UA=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,RA=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var MA={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},HA=nA((function(e){var t;return t="angular"===e.type?Number(e.value):MA[e.value]||0,FA(t,"deg")})),OA=nA((function(e){var t=50,n=50,r="%",A="%";if("position"===(null==e?void 0:e.type)){var i=e.value,o=i.x,a=i.y;"position-keyword"===(null==o?void 0:o.type)&&("left"===o.value?t=0:"center"===o.value?t=50:"right"===o.value?t=100:"top"===o.value?n=0:"bottom"===o.value&&(n=100)),"position-keyword"===(null==a?void 0:a.type)&&("left"===a.value?t=0:"center"===a.value?n=50:"right"===a.value?t=100:"top"===a.value?n=0:"bottom"===a.value&&(n=100)),"px"!==(null==o?void 0:o.type)&&"%"!==(null==o?void 0:o.type)&&"em"!==(null==o?void 0:o.type)||(r=null==o?void 0:o.type,t=Number(o.value)),"px"!==(null==a?void 0:a.type)&&"%"!==(null==a?void 0:a.type)&&"em"!==(null==a?void 0:a.type)||(A=null==a?void 0:a.type,n=Number(a.value))}return{cx:FA(t,r),cy:FA(n,A)}})),kA=nA((function(e){if(e.indexOf("linear")>-1||e.indexOf("radial")>-1)return IA(e).map((function(e){var t=e.type,n=e.orientation,r=e.colorStops;!function(e){var t,n,r=e.length;e[r-1].length=null!==(t=e[r-1].length)&&void 0!==t?t:{type:"%",value:"100"},r>1&&(e[0].length=null!==(n=e[0].length)&&void 0!==n?n:{type:"%",value:"0"});for(var A=0,i=Number(e[0].length.value),o=1;o<r;o++){var a,s=null===(a=e[o].length)||void 0===a?void 0:a.value;if(!Ge(s)&&!Ge(i)){for(var l=1;l<o-A;l++)e[A+l].length={type:"%",value:"".concat(i+(Number(s)-i)*l/(o-A))};A=o,i=Number(s)}}}(r);var A,i=r.map((function(e){return{offset:FA(Number(e.length.value),"%"),color:bA(e)}}));if("linear-gradient"===t)return new pA(fA.LinearGradient,{angle:n?HA(n):BA,steps:i});if("radial-gradient"===t&&(n||(n=[{type:"shape",value:"circle"}]),"shape"===n[0].type&&"circle"===n[0].value)){var o,a=OA(n[0].at),s=a.cx,l=a.cy;if(n[0].style){var u=n[0].style,c=u.type,h=u.value;"extent-keyword"===c?(EA[A=h]||(EA[A]=new gA(A)),o=EA[A]):o=FA(h,c)}return new pA(fA.RadialGradient,{cx:s,cy:l,size:o,steps:i})}}));var t=e[0];if("("===e[1]||"("===e[2])if("l"===t){var n=LA.exec(e);if(n){var r,A=(null===(r=n[2].match(RA))||void 0===r?void 0:r.map((function(e){return e.split(":")})))||[];return[new pA(fA.LinearGradient,{angle:FA(parseFloat(n[1]),"deg"),steps:A.map((function(e){var t=y(e,2),n=t[0],r=t[1];return{offset:FA(100*Number(n),"%"),color:r}}))})]}}else if("r"===t){var i=function(e){var t=QA.exec(e);if(t){var n,r=(null===(n=t[4].match(RA))||void 0===n?void 0:n.map((function(e){return e.split(":")})))||[];return{cx:FA(50,"%"),cy:FA(50,"%"),steps:r.map((function(e){var t=y(e,2),n=t[0],r=t[1];return{offset:FA(100*Number(n),"%"),color:r}}))}}return null}(e);if(i){if(!Xe(i))return[new pA(fA.RadialGradient,i)];e=i}}else if("p"===t)return function(e){var t=UA.exec(e);if(t){var n=t[1],r=t[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}(e)}));function NA(e){return e&&!!e.image}function _A(e){return e&&!Ge(e.r)&&!Ge(e.g)&&!Ge(e.b)}var DA=nA((function(e){if(NA(e))return i({repetition:"repeat"},e);if(Ge(e)&&(e=""),"transparent"===e)return SA;if("currentColor"===e)e="black";else if("none"===e)return xA;var t=kA(e);if(t)return t;var n=Pr(e),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),TA.apply(void 0,r)}));function PA(e,t){if(_A(e)&&_A(t))return[[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(e){var t=e.slice();if(t[3])for(var n=0;n<3;n++)t[n]=Math.round(Ye(t[n],0,255));return t[3]=Ye(t[3],0,1),"rgba(".concat(t.join(","),")")}]}function GA(e,t){if(Ge(t))return FA(0,"px");if(t="".concat(t).trim().toLowerCase(),isFinite(Number(t))){if("px".search(e)>=0)return FA(Number(t),"px");if("deg".search(e)>=0)return FA(Number(t),"deg")}var n=[];t=t.replace(e,(function(e){return n.push(e),"U".concat(e)}));var r="U(".concat(e.source,")");return n.map((function(e){return FA(Number(t.replace(new RegExp("U".concat(e),"g"),"").replace(new RegExp(r,"g"),"*0")),e)}))[0]}var KA=function(e){return GA(new RegExp("px","g"),e)},zA=nA(KA);nA((function(e){return GA(new RegExp("%","g"),e)}));var VA=function(e){return je(e)||isFinite(Number(e))?FA(Number(e)||0,"px"):GA(new RegExp("px|%|em|rem","g"),e)},WA=nA(VA),XA=function(e){return GA(new RegExp("deg|rad|grad|turn","g"),e)},YA=nA(XA);function jA(e,t,n,r){var A=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i="",o=e.value||0,a=t.value||0,s=vA(e.unit),l=e.convertTo(s),u=t.convertTo(s);return l&&u?(o=l.value,a=u.value,i=cA(e.unit)):(yA.isLength(e.unit)||yA.isLength(t.unit))&&(o=qA(e,A,n),a=qA(t,A,n),i="px"),[o,a,function(e){return e+i}]}function ZA(e){var t=0;return e.unit===rA.kDegrees?t=e.value:e.unit===rA.kRadians?t=qn(Number(e.value)):e.unit===rA.kTurns?t=360*Number(e.value):e.value&&(t=e.value),t}function JA(e,t){var n;return Array.isArray(e)?n=e.map((function(e){return Number(e)})):Xe(e)?n=e.split(" ").map((function(e){return Number(e)})):je(e)&&(n=[e]),2===t?1===n.length?[n[0],n[0]]:[n[0],n[1]]:4===t?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]]:"even"===t&&n.length%2==1?[].concat(c(n),c(n)):n}function qA(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(e.unit===rA.kPixels)return Number(e.value);if(e.unit===rA.kPercentage&&n){var A=n.nodeName===bn.GROUP?n.getLocalBounds():n.getGeometryBounds();return(r?A.min[t]:0)+e.value/100*A.halfExtents[t]*2}return 0}var $A=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ei(e){return e.toString()}var ti=function(e){return"number"==typeof e?FA(e):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e)?FA(Number(e)):FA(0)},ni=nA(ti);function ri(e,t){return[e,t,ei]}function Ai(e,t){return function(n,r){return[n,r,function(n){return ei(Ye(n,e,t))}]}}function ii(e,t){if(e.length===t.length)return[e,t,function(e){return e}]}function oi(e){var t;return 0===e.parsedStyle.d.totalLength&&(e.parsedStyle.d.totalLength=Gt(e.parsedStyle.d.absolutePath,void 0,rt(rt({},t),{bbox:!1,length:!0})).length),e.parsedStyle.d.totalLength}function ai(e,t){return e[0]===t[0]&&e[1]===t[1]}function si(e,t){var n=e.prePoint,r=e.currentPoint,A=e.nextPoint,i=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),o=Math.pow(r[0]-A[0],2)+Math.pow(r[1]-A[1],2),a=Math.pow(n[0]-A[0],2)+Math.pow(n[1]-A[1],2),s=Math.acos((i+o-a)/(2*Math.sqrt(i)*Math.sqrt(o)));if(!s||0===Math.sin(s)||Je(s,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(A[1]-r[1],A[0]-r[0])),u=Math.abs(Math.atan2(A[0]-r[0],A[1]-r[1]));return l=l>Math.PI/2?Math.PI-l:l,u=u>Math.PI/2?Math.PI-u:u,{xExtra:Math.cos(s/2-l)*(t/2*(1/Math.sin(s/2)))-t/2||0,yExtra:Math.cos(u-s/2)*(t/2*(1/Math.sin(s/2)))-t/2||0}}function li(e,t){return[t[0]+(t[0]-e[0]),t[1]+(t[1]-e[1])]}nA((function(e){return Xe(e)?e.split(" ").map(ni):e.map(ni)}));var ui=function(e,t){var n=e.x*t.x+e.y*t.y,r=Math.sqrt((Math.pow(e.x,2)+Math.pow(e.y,2))*(Math.pow(t.x,2)+Math.pow(t.y,2)));return(e.x*t.y-e.y*t.x<0?-1:1)*Math.acos(n/r)},ci=function(e,t,n,r,A,i,o,a){t=Math.abs(t),n=Math.abs(n);var s=Zn(r=qe(r,360));if(e.x===o.x&&e.y===o.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(0===t||0===n)return{x:0,y:0,ellipticalArcAngle:0};var l=(e.x-o.x)/2,u=(e.y-o.y)/2,c={x:Math.cos(s)*l+Math.sin(s)*u,y:-Math.sin(s)*l+Math.cos(s)*u},h=Math.pow(c.x,2)/Math.pow(t,2)+Math.pow(c.y,2)/Math.pow(n,2);h>1&&(t*=Math.sqrt(h),n*=Math.sqrt(h));var d=(Math.pow(t,2)*Math.pow(n,2)-Math.pow(t,2)*Math.pow(c.y,2)-Math.pow(n,2)*Math.pow(c.x,2))/(Math.pow(t,2)*Math.pow(c.y,2)+Math.pow(n,2)*Math.pow(c.x,2));d=d<0?0:d;var f=(A!==i?1:-1)*Math.sqrt(d),p=f*(t*c.y/n),g=f*(-n*c.x/t),v={x:Math.cos(s)*p-Math.sin(s)*g+(e.x+o.x)/2,y:Math.sin(s)*p+Math.cos(s)*g+(e.y+o.y)/2},y={x:(c.x-p)/t,y:(c.y-g)/n},C=ui({x:1,y:0},y),B=ui(y,{x:(-c.x-p)/t,y:(-c.y-g)/n});!i&&B>0?B-=2*Math.PI:i&&B<0&&(B+=2*Math.PI);var m=C+(B%=2*Math.PI)*a,w=t*Math.cos(m),E=n*Math.sin(m);return{x:Math.cos(s)*w-Math.sin(s)*E+v.x,y:Math.sin(s)*w+Math.cos(s)*E+v.y,ellipticalArcStartAngle:C,ellipticalArcEndAngle:C+B,ellipticalArcAngle:m,ellipticalArcCenter:v,resultantRx:t,resultantRy:n}};function hi(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e.arcParams,A=r.rx,i=void 0===A?0:A,o=r.ry,a=void 0===o?0:o,s=r.xRotation,l=r.arcFlag,u=r.sweepFlag,c=ci({x:e.prePoint[0],y:e.prePoint[1]},i,a,s,!!l,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},t),h=ci({x:e.prePoint[0],y:e.prePoint[1]},i,a,s,!!l,!!u,{x:e.currentPoint[0],y:e.currentPoint[1]},n?t+.005:t-.005),d=h.x-c.x,f=h.y-c.y,p=Math.sqrt(d*d+f*f);return{x:-d/p,y:-f/p}}function di(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function fi(e,t){return di(e)*di(t)?(e[0]*t[0]+e[1]*t[1])/(di(e)*di(t)):1}function pi(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(fi(e,t))}function gi(e,t){var n=t[1],r=t[2],A=qe(Zn(t[3]),2*Math.PI),i=t[4],o=t[5],a=e[0],s=e[1],l=t[6],u=t[7],c=Math.cos(A)*(a-l)/2+Math.sin(A)*(s-u)/2,h=-1*Math.sin(A)*(a-l)/2+Math.cos(A)*(s-u)/2,d=c*c/(n*n)+h*h/(r*r);d>1&&(n*=Math.sqrt(d),r*=Math.sqrt(d));var f=n*n*(h*h)+r*r*(c*c),p=f?Math.sqrt((n*n*(r*r)-f)/f):1;i===o&&(p*=-1),isNaN(p)&&(p=0);var g=r?p*n*h/r:0,v=n?p*-r*c/n:0,y=(a+l)/2+Math.cos(A)*g-Math.sin(A)*v,C=(s+u)/2+Math.sin(A)*g+Math.cos(A)*v,B=[(c-g)/n,(h-v)/r],m=[(-1*c-g)/n,(-1*h-v)/r],w=pi([1,0],B),E=pi(B,m);return fi(B,m)<=-1&&(E=Math.PI),fi(B,m)>=1&&(E=0),0===o&&E>0&&(E-=2*Math.PI),1===o&&E<0&&(E+=2*Math.PI),{cx:y,cy:C,rx:ai(e,[l,u])?0:n,ry:ai(e,[l,u])?0:r,startAngle:w,endAngle:w+E,xRotation:A,arcFlag:i,sweepFlag:o}}var vi=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var t;try{t=Tt(e)}catch(n){t=Tt(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}!function(e){for(var t=0;t<e.length;t++){var n=e[t-1],r=e[t];if("M"===r[0]&&n){var A=n[0],i=[r[1],r[2]],o=void 0;"L"===A||"M"===A?o=[n[1],n[2]]:"C"!==A&&"A"!==A&&"Q"!==A||(o=[n[n.length-2],n[n.length-1]]),o&&ai(i,o)&&(e.splice(t,1),t--)}}}(t);var n=function(e){for(var t=!1,n=e.length,r=0;r<n;r++){var A=e[r][0];if("C"===A||"A"===A||"Q"===A){t=!0;break}}return t}(t),r=function(e){for(var t=[],n=[],r=[],A=0;A<e.length;A++){var i=e[A],o=i[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([i[1],i[2]])):"Z"===o?r.length&&(t.push(r),r=[]):r.push([i[1],i[2]])}return r.length>0&&n.push(r),{polygons:t,polylines:n}}(t),A=r.polygons,i=r.polylines,o=function(e){for(var t=[],n=null,r=null,A=null,i=0,o=e.length,a=0;a<o;a++){var s=e[a];r=e[a+1];var l=s[0],u={command:l,prePoint:n,params:s,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":A=[s[1],s[2]],i=a;break;case"A":var c=gi(n,s);u.arcParams=c}if("Z"===l)n=A,r=e[i+1];else{var h=s.length;n=[s[h-2],s[h-1]]}r&&"Z"===r[0]&&(r=e[i],t[i]&&(t[i].prePoint=n)),u.currentPoint=n,t[i]&&ai(n,t[i].currentPoint)&&(t[i].prePoint=u.prePoint);var d=r?[r[r.length-2],r[r.length-1]]:null;u.nextPoint=d;var f=u.prePoint;if(["L","H","V"].includes(l))u.startTangent=[f[0]-n[0],f[1]-n[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]];else if("Q"===l){var p=[s[1],s[2]];u.startTangent=[f[0]-p[0],f[1]-p[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]]}else if("T"===l){var g=t[a-1],v=li(g.currentPoint,f);"Q"===g.command?(u.command="Q",u.startTangent=[f[0]-v[0],f[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]):(u.command="TL",u.startTangent=[f[0]-n[0],f[1]-n[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]])}else if("C"===l){var y=[s[1],s[2]],C=[s[3],s[4]];u.startTangent=[f[0]-y[0],f[1]-y[1]],u.endTangent=[n[0]-C[0],n[1]-C[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[y[0]-C[0],y[1]-C[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[C[0]-y[0],C[1]-y[1]])}else if("S"===l){var B=t[a-1],m=li(B.currentPoint,f),w=[s[1],s[2]];"C"===B.command?(u.command="C",u.startTangent=[f[0]-m[0],f[1]-m[1]],u.endTangent=[n[0]-w[0],n[1]-w[1]]):(u.command="SQ",u.startTangent=[f[0]-w[0],f[1]-w[1]],u.endTangent=[n[0]-w[0],n[1]-w[1]])}else if("A"===l){var E=hi(u,0),x=E.x,S=E.y,T=hi(u,1,!1),F=T.x,b=T.y;u.startTangent=[x,S],u.endTangent=[F,b]}t.push(u)}return t}(t),a=function(e,t){for(var n=[],r=[],A=[],i=0;i<e.length;i++){var o=e[i],a=o.currentPoint,s=o.params,l=o.prePoint,u=void 0;switch(o.command){case"Q":u=dn(l[0],l[1],s[1],s[2],s[3],s[4]);break;case"C":u=sn(l[0],l[1],s[1],s[2],s[3],s[4],s[5],s[6]);break;case"A":var c=o.arcParams;u=$t(c.cx,c.cy,c.rx,c.ry,c.xRotation,c.startAngle,c.endAngle);break;default:n.push(a[0]),r.push(a[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height))}n=n.filter((function(e){return!Number.isNaN(e)&&e!==1/0&&e!==-1/0})),r=r.filter((function(e){return!Number.isNaN(e)&&e!==1/0&&e!==-1/0}));var h=We(n),d=We(r),f=Ve(n),p=Ve(r);if(0===A.length)return{x:h,y:d,width:f-h,height:p-d};for(var g=0;g<A.length;g++){var v=A[g],y=v.currentPoint;y[0]===h?h-=si(v,t).xExtra:y[0]===f&&(f+=si(v,t).xExtra),y[1]===d?d-=si(v,t).yExtra:y[1]===p&&(p+=si(v,t).yExtra)}return{x:h,y:d,width:f-h,height:p-d}}(o,0),s=a.x,l=a.y,u=a.width,c=a.height;return{absolutePath:t,hasArc:n,segments:o,polygons:A,polylines:i,totalLength:0,rect:{x:Number.isFinite(s)?s:0,y:Number.isFinite(l)?l:0,width:Number.isFinite(u)?u:0,height:Number.isFinite(c)?c:0}}},yi=nA(vi);function Ci(e){return Xe(e)?yi(e):vi(e)}function Bi(e,t,n){var r=e.curve,A=t.curve;r&&0!==r.length||(r=Ut(e.absolutePath,!1),e.curve=r),A&&0!==A.length||(A=Ut(t.absolutePath,!1),t.curve=A);var i=[r,A];r.length!==A.length&&(i=Wt(r,A));var o,a,s=zt(i[0])!==zt(i[1])?(o=i[0],a=o.slice(1).map((function(e,t,n){return t?n[t-1].slice(-2).concat(e.slice(1)):o[0].slice(1).concat(e.slice(1))})).map((function(e){return e.map((function(t,n){return e[e.length-n-2*(1-n%2)]}))})).reverse(),[["M"].concat(a[0].slice(0,2))].concat(a.map((function(e){return["C"].concat(e.slice(2))})))):i[0].map((function(e){return Array.isArray(e)?[].concat(e):e}));return[s,Kt(i[1],s),function(e){return e}]}function mi(e,t){return[e.points,t.points,function(e){return e}]}var wi=null,Ei=/\s*(\w+)\(([^)]*)\)/g;function xi(e){return function(t){var n=0;return e.map((function(e){return e===wi?t[n++]:e}))}}function Si(e){return e}var Ti={matrix:["NNNNNN",[wi,wi,0,0,wi,wi,0,0,0,0,1,0,wi,wi,0,1],Si],matrix3d:["NNNNNNNNNNNNNNNN",Si],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",xi([wi,wi,new yA(1)]),Si],scaleX:["N",xi([wi,new yA(1),new yA(1)]),xi([wi,new yA(1)])],scaleY:["N",xi([new yA(1),wi,new yA(1)]),xi([new yA(1),wi])],scaleZ:["N",xi([new yA(1),new yA(1),wi])],scale3d:["NNN",Si],skew:["Aa",null,Si],skewX:["A",null,xi([wi,BA])],skewY:["A",null,xi([BA,wi])],translate:["Tt",xi([wi,wi,CA]),Si],translateX:["T",xi([wi,CA,CA]),xi([wi,CA])],translateY:["T",xi([CA,wi,CA]),xi([CA,wi])],translateZ:["L",xi([CA,CA,wi])],translate3d:["TTL",Si]};function Fi(e){for(var t=[],n=e.length,r=0;r<n;r++){var A=e[r],i=A[0],o=A.slice(1);if("translate"===i||"skew"===i?1===o.length&&o.push(0):"scale"===i&&1===o.length&&o.push(o[0]),!Ti[i])return[];var a=o.map((function(e){return FA(e)}));t.push({t:i,d:a})}return t}function bi(e){if(Array.isArray(e))return Fi(e);if("none"===(e=(e||"none").trim()))return[];var t,n=[],r=0;for(Ei.lastIndex=0;t=Ei.exec(e);){if(t.index!==r)return[];r=t.index+t[0].length;var A=t[1],i=Ti[A];if(!i)return[];var o=t[2].split(","),a=i[0];if(a.length<o.length)return[];for(var s=[],l=0;l<a.length;l++){var u=o[l],c=a[l],h=void 0;if(void 0===(h=u?{A:function(e){return"0"===e.trim()?BA:YA(e)},N:ni,T:WA,L:zA}[c.toUpperCase()](u):{a:BA,n:s[0],t:CA}[c]))return[];s.push(h)}if(n.push({t:A,d:s}),Ei.lastIndex===e.length)return n}return[]}function Ii(e){if(Array.isArray(e))return Fi(e);if("none"===(e=(e||"none").trim()))return[];var t,n=[],r=0;for(Ei.lastIndex=0;t=Ei.exec(e);){if(t.index!==r)return[];r=t.index+t[0].length;var A=t[1],i=Ti[A];if(!i)return[];var o=t[2].split(","),a=i[0];if(a.length<o.length)return[];for(var s=[],l=0;l<a.length;l++){var u=o[l],c=a[l],h=void 0;if(void 0===(h=u?{A:function(e){return"0"===e.trim()?BA:XA(e)},N:ti,T:VA,L:KA}[c.toUpperCase()](u):{a:BA,n:s[0],t:CA}[c]))return[];s.push(h)}if(n.push({t:A,d:s}),Ei.lastIndex===e.length)return n}return[]}function Li(e){var t,n,r,A;switch(e.t){case"rotateX":return A=Zn(ZA(e.d[0])),[1,0,0,0,0,Math.cos(A),Math.sin(A),0,0,-Math.sin(A),Math.cos(A),0,0,0,0,1];case"rotateY":return A=Zn(ZA(e.d[0])),[Math.cos(A),0,-Math.sin(A),0,0,1,0,0,Math.sin(A),0,Math.cos(A),0,0,0,0,1];case"rotate":case"rotateZ":return A=Zn(ZA(e.d[0])),[Math.cos(A),Math.sin(A),0,0,-Math.sin(A),Math.cos(A),0,0,0,0,1,0,0,0,0,1];case"rotate3d":t=e.d[0].value,n=e.d[1].value,r=e.d[2].value,A=Zn(ZA(e.d[3]));var i=t*t+n*n+r*r;if(0===i)t=1,n=0,r=0;else if(1!==i){var o=Math.sqrt(i);t/=o,n/=o,r/=o}var a=Math.sin(A/2),s=a*Math.cos(A/2),l=a*a;return[1-2*(n*n+r*r)*l,2*(t*n*l+r*s),2*(t*r*l-n*s),0,2*(t*n*l-r*s),1-2*(t*t+r*r)*l,2*(n*r*l+t*s),0,2*(t*r*l+n*s),2*(n*r*l-t*s),1-2*(t*t+n*n)*l,0,0,0,0,1];case"scale":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[e.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,e.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,e.d[0].value,0,0,0,0,1];case"scale3d":return[e.d[0].value,0,0,0,0,e.d[1].value,0,0,0,0,e.d[2].value,0,0,0,0,1];case"skew":var u=Zn(ZA(e.d[0])),c=Zn(ZA(e.d[1]));return[1,Math.tan(c),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return A=Zn(ZA(e.d[0])),[1,0,0,0,Math.tan(A),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return A=Zn(ZA(e.d[0])),[1,Math.tan(A),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,t=qA(e.d[0],0,null)||0,n=qA(e.d[1],0,null)||0,0,1];case"translateX":return[1,0,0,0,0,1,0,0,0,0,1,0,t=qA(e.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=qA(e.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=qA(e.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,t=qA(e.d[0],0,null)||0,n=qA(e.d[1],0,null)||0,r=qA(e.d[2],0,null)||0,1];case"perspective":var h=qA(e.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,h?-1/h:0,0,0,0,1];case"matrix":return[e.d[0].value,e.d[1].value,0,0,e.d[2].value,e.d[3].value,0,0,0,0,1,0,e.d[4].value,e.d[5].value,0,1];case"matrix3d":return e.d.map((function(e){return e.value}))}}function Qi(e,t){return[e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],e[0]*t[4]+e[4]*t[5]+e[8]*t[6]+e[12]*t[7],e[1]*t[4]+e[5]*t[5]+e[9]*t[6]+e[13]*t[7],e[2]*t[4]+e[6]*t[5]+e[10]*t[6]+e[14]*t[7],e[3]*t[4]+e[7]*t[5]+e[11]*t[6]+e[15]*t[7],e[0]*t[8]+e[4]*t[9]+e[8]*t[10]+e[12]*t[11],e[1]*t[8]+e[5]*t[9]+e[9]*t[10]+e[13]*t[11],e[2]*t[8]+e[6]*t[9]+e[10]*t[10]+e[14]*t[11],e[3]*t[8]+e[7]*t[9]+e[11]*t[10]+e[15]*t[11],e[0]*t[12]+e[4]*t[13]+e[8]*t[14]+e[12]*t[15],e[1]*t[12]+e[5]*t[13]+e[9]*t[14]+e[13]*t[15],e[2]*t[12]+e[6]*t[13]+e[10]*t[14]+e[14]*t[15],e[3]*t[12]+e[7]*t[13]+e[11]*t[14]+e[15]*t[15]]}function Ui(e){var t=[0,0,0],n=[1,1,1],r=[0,0,0],A=[0,0,0,1],i=[0,0,0,1];return function(e,t,n,r,A,i){if(!function(e,t){var n=t[15];if(0===n)return!1;for(var r=1/n,A=0;A<16;A++)e[A]=t[A]*r;return!0}(rr,e))return!1;if(b(Ar,rr),Ar[3]=0,Ar[7]=0,Ar[11]=0,Ar[15]=1,Math.abs(M(Ar))<1e-8)return!1;var o,a,s=rr[3],l=rr[7],u=rr[11],c=rr[12],h=rr[13],d=rr[14],f=rr[15];if(0!==s||0!==l||0!==u){if(ir[0]=s,ir[1]=l,ir[2]=u,ir[3]=f,!R(Ar,Ar))return!1;U(Ar,Ar),Ie(A,ir,Ar)}else A[0]=A[1]=A[2]=0,A[3]=1;if(t[0]=c,t[1]=h,t[2]=d,a=rr,(o=or)[0][0]=a[0],o[0][1]=a[1],o[0][2]=a[2],o[1][0]=a[4],o[1][1]=a[5],o[1][2]=a[6],o[2][0]=a[8],o[2][1]=a[9],o[2][2]=a[10],n[0]=ce(or[0]),ye(or[0],or[0]),r[0]=Ce(or[0],or[1]),sr(or[1],or[1],or[0],1,-r[0]),n[1]=ce(or[1]),ye(or[1],or[1]),r[0]/=n[1],r[1]=Ce(or[0],or[2]),sr(or[2],or[2],or[0],1,-r[1]),r[2]=Ce(or[1],or[2]),sr(or[2],or[2],or[1],1,-r[2]),n[2]=ce(or[2]),ye(or[2],or[2]),r[1]/=n[2],r[2]/=n[2],Be(ar,or[1],or[2]),Ce(or[0],ar)<0)for(var p=0;p<3;p++)n[p]*=-1,or[p][0]*=-1,or[p][1]*=-1,or[p][2]*=-1;i[0]=.5*Math.sqrt(Math.max(1+or[0][0]-or[1][1]-or[2][2],0)),i[1]=.5*Math.sqrt(Math.max(1-or[0][0]+or[1][1]-or[2][2],0)),i[2]=.5*Math.sqrt(Math.max(1-or[0][0]-or[1][1]+or[2][2],0)),i[3]=.5*Math.sqrt(Math.max(1+or[0][0]+or[1][1]+or[2][2],0)),or[2][1]>or[1][2]&&(i[0]=-i[0]),or[0][2]>or[2][0]&&(i[1]=-i[1]),or[1][0]>or[0][1]&&(i[2]=-i[2])}(function(e){return 0===e.length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:e.map(Li).reduce(Qi)}(e),t,n,r,A,i),[[t,n,r,i,A]]}var Ri=function(){function e(e,t){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 A=0;A<4;A++)for(var i=0;i<4;i++)n[r][A]+=t[r][i]*e[i][A];return n}return function(t,n,r,A,i){for(var o=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],a=0;a<4;a++)o[a][3]=i[a];for(var s=0;s<3;s++)for(var l=0;l<3;l++)o[3][s]+=t[l]*o[l][s];var u=A[0],c=A[1],h=A[2],d=A[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];f[0][0]=1-2*(c*c+h*h),f[0][1]=2*(u*c-h*d),f[0][2]=2*(u*h+c*d),f[1][0]=2*(u*c+h*d),f[1][1]=1-2*(u*u+h*h),f[1][2]=2*(c*h-u*d),f[2][0]=2*(u*h-c*d),f[2][1]=2*(c*h+u*d),f[2][2]=1-2*(u*u+c*c),o=e(o,f);var p,g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];r[2]&&(g[2][1]=r[2],o=e(o,g)),r[1]&&(g[2][1]=0,g[2][0]=r[0],o=e(o,g)),r[0]&&(g[2][0]=0,g[1][0]=r[0],o=e(o,g));for(var v=0;v<3;v++)for(var y=0;y<3;y++)o[v][y]*=n[v];return 0===(p=o)[0][2]&&0===p[0][3]&&0===p[1][2]&&0===p[1][3]&&0===p[2][0]&&0===p[2][1]&&1===p[2][2]&&0===p[2][3]&&0===p[3][2]&&1===p[3][3]?[o[0][0],o[0][1],o[1][0],o[1][1],o[3][0],o[3][1]]:o[0].concat(o[1],o[2],o[3])}}();function Mi(e){return e.toFixed(6).replace(".000000","")}function Hi(e,t){var n,r;return e.decompositionPair!==t&&(e.decompositionPair=t,n=Ui(e)),t.decompositionPair!==e&&(t.decompositionPair=e,r=Ui(t)),null===n[0]||null===r[0]?[[!1],[!0],function(n){return n?t[0].d:e[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(e){var t=function(e,t,n){var r=function(e,t){for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}(e,t);r=Ye(r,-1,1);var A=[];if(1===r)A=e;else for(var i=Math.acos(r),o=1*Math.sin(n*i)/Math.sqrt(1-r*r),a=0;a<4;a++)A.push(e[a]*(Math.cos(n*i)-r*o)+t[a]*o);return A}(n[0][3],r[0][3],e[5]);return Ri(e[0],e[1],e[2],t,e[4]).map(Mi).join(",")}])}function Oi(e){return e.replace(/[XY]/,"")}function ki(e){return e.replace(/(X|Y|Z|3d)?$/,"3d")}function Ni(e,t,n){var r=!1;if(!e.length||!t.length){e.length||(r=!0,e=t,t=[]);for(var A=function(){var n=e[i],r=n.t,A=n.d,o="scale"===r.substring(0,5)?1:0;t.push({t:r,d:A.map((function(e){return"number"==typeof e?FA(o):FA(o,e.unit)}))})},i=0;i<e.length;i++)A()}var o,a,s=[],l=[],u=[];if(e.length!==t.length){var c=Hi(e,t);s=[c[0]],l=[c[1]],u=[["matrix",[c[2]]]]}else for(var h=0;h<e.length;h++){var d=e[h].t,f=t[h].t,p=e[h].d,g=t[h].d,v=Ti[d],y=Ti[f],C=void 0;if(a=f,"perspective"===(o=d)&&"perspective"===a||!("matrix"!==o&&"matrix3d"!==o||"matrix"!==a&&"matrix3d"!==a)){var B=Hi([e[h]],[t[h]]);s.push(B[0]),l.push(B[1]),u.push(["matrix",[B[2]]])}else{if(d===f)C=d;else if(v[2]&&y[2]&&Oi(d)===Oi(f))C=Oi(d),p=v[2](p),g=y[2](g);else{if(!v[1]||!y[1]||ki(d)!==ki(f)){var m=Hi(e,t);s=[m[0]],l=[m[1]],u=[["matrix",[m[2]]]];break}C=ki(d),p=v[1](p),g=y[1](g)}for(var w=[],E=[],x=[],S=0;S<p.length;S++){var T=jA(p[S],g[S],n,!1,S);w[S]=T[0],E[S]=T[1],x.push(T[2])}s.push(w),l.push(E),u.push([C,x])}}if(r){var F=s;s=l,l=F}return[s,l,function(e){return e.map((function(e,t){var n=e.map((function(e,n){return u[t][1][n](e)})).join(",");return"matrix"===u[t][0]&&16===n.split(",").length&&(u[t][0]="matrix3d"),"matrix3d"===u[t][0]&&6===n.split(",").length&&(u[t][0]="matrix"),"".concat(u[t][0],"(").concat(n,")")})).join(" ")}]}var _i=nA((function(e){if(Xe(e)){if("text-anchor"===e)return[FA(0,"px"),FA(0,"px")];var t=e.split(" ");return 1===t.length&&("top"===t[0]||"bottom"===t[0]?(t[1]=t[0],t[0]="center"):t[1]="center"),2!==t.length?null:[WA(Di(t[0])),WA(Di(t[1]))]}return[FA(e[0]||0,"px"),FA(e[1]||0,"px")]}));function Di(e){return"center"===e?"50%":"left"===e||"top"===e?"0%":"right"===e||"bottom"===e?"100%":e}var Pi=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:wr.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:wr.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:wr.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:wr.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:wr.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:wr.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:wr.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:wr.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:wr.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:wr.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:wr.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:wr.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:wr.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:wr.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:wr.FILTER},{n:"clipPath",syntax:wr.DEFINED_PATH},{n:"textPath",syntax:wr.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:wr.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:wr.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:wr.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:wr.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:wr.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:wr.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:wr.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:wr.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:wr.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:wr.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:wr.COORDINATE},{n:"y1",int:!0,l:!0,syntax:wr.COORDINATE},{n:"z1",int:!0,l:!0,syntax:wr.COORDINATE},{n:"x2",int:!0,l:!0,syntax:wr.COORDINATE},{n:"y2",int:!0,l:!0,syntax:wr.COORDINATE},{n:"z2",int:!0,l:!0,syntax:wr.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:wr.PATH,p:50},{n:"points",int:!0,l:!0,syntax:wr.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:wr.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:wr.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:wr.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:wr.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:wr.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:wr.NUMBER,d:function(e){return e===bn.PATH||e===bn.POLYGON||e===bn.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:wr.MARKER},{n:"markerEnd",syntax:wr.MARKER},{n:"markerMid",syntax:wr.MARKER},{n:"markerStartOffset",syntax:wr.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:wr.LENGTH,l:!0,int:!0,d:"0"}],Gi=new Set(Pi.filter((function(e){return!!e.l})).map((function(e){return e.n}))),Ki={},zi=function(){return s((function e(t){var n=this;o(this,e),this.runtime=t,Pi.forEach((function(e){n.registerMetadata(e)}))}),[{key:"registerMetadata",value:function(e){[e.n].concat(c(e.a||[])).forEach((function(t){Ki[t]=e}))}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,t);var r=e.parsedStyle.clipPath,A=e.parsedStyle.offsetPath;!function(e,t){var n=Vi(e);for(var r in t)n.has(r)&&(e.parsedStyle[r]=t[r])}(e,t);var o=!!n.forceUpdateGeometry;if(!o)for(var a in t)if(Gi.has(a)){o=!0;break}var s,l=Vi(e);l.has("fill")&&t.fill&&(e.parsedStyle.fill=DA(t.fill)),l.has("stroke")&&t.stroke&&(e.parsedStyle.stroke=DA(t.stroke)),l.has("shadowColor")&&t.shadowColor&&(e.parsedStyle.shadowColor=DA(t.shadowColor)),l.has("filter")&&t.filter&&(e.parsedStyle.filter=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("none"===(e=e.toLowerCase().trim()))return[];for(var t,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],A=0;t=n.exec(e);){if(t.index!==A)return[];if(A=t.index+t[0].length,$A.indexOf(t[1])>-1&&r.push({name:t[1],params:t[2].split(" ").map((function(e){return GA(/deg|rad|grad|turn|px|%/g,e)||DA(e)}))}),n.lastIndex===e.length)return r}return[]}(t.filter)),l.has("radius")&&!Ge(t.radius)&&(e.parsedStyle.radius=JA(t.radius,4)),l.has("lineDash")&&!Ge(t.lineDash)&&(e.parsedStyle.lineDash=JA(t.lineDash,"even")),l.has("points")&&t.points&&(e.parsedStyle.points={points:Xe(s=t.points)?s.split(" ").map((function(e){var t=y(e.split(","),2),n=t[0],r=t[1];return[Number(n),Number(r)]})):s,totalLength:0,segments:[]}),l.has("d")&&""===t.d&&(e.parsedStyle.d=i({},mr)),l.has("d")&&t.d&&(e.parsedStyle.d=Ci(t.d)),l.has("textTransform")&&t.textTransform&&this.runtime.CSSPropertySyntaxFactory[wr.TEXT_TRANSFORM].calculator(null,null,{value:t.textTransform},e,null),l.has("clipPath")&&!et(t.clipPath)&&this.runtime.CSSPropertySyntaxFactory[wr.DEFINED_PATH].calculator("clipPath",r,t.clipPath,e,this.runtime),l.has("offsetPath")&&t.offsetPath&&this.runtime.CSSPropertySyntaxFactory[wr.DEFINED_PATH].calculator("offsetPath",A,t.offsetPath,e,this.runtime),l.has("transform")&&t.transform&&(e.parsedStyle.transform=bi(t.transform)),l.has("transformOrigin")&&t.transformOrigin&&(e.parsedStyle.transformOrigin=_i(t.transformOrigin)),l.has("markerStart")&&t.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[wr.MARKER].calculator(null,t.markerStart,t.markerStart,null,null)),l.has("markerEnd")&&t.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[wr.MARKER].calculator(null,t.markerEnd,t.markerEnd,null,null)),l.has("markerMid")&&t.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[wr.MARKER].calculator("",t.markerMid,t.markerMid,null,null)),l.has("zIndex")&&!Ge(t.zIndex)&&this.runtime.CSSPropertySyntaxFactory[wr.Z_INDEX].postProcessor(e),l.has("offsetDistance")&&!Ge(t.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[wr.OFFSET_DISTANCE].postProcessor(e),l.has("transform")&&t.transform&&this.runtime.CSSPropertySyntaxFactory[wr.TRANSFORM].postProcessor(e),l.has("transformOrigin")&&t.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[wr.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.dirty(!0,!0),n.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(e))}},{key:"updateGeometry",value:function(e){var t=e.nodeName,n=this.runtime.geometryUpdaterFactory[t];if(n){var r=e.geometry;r.contentBounds||(r.contentBounds=new Nn),r.renderBounds||(r.renderBounds=new Nn);var A=e.parsedStyle,i=n.update(A,e),o=i.cx,a=void 0===o?0:o,s=i.cy,l=void 0===s?0:s,u=i.cz,c=void 0===u?0:u,h=i.hwidth,d=void 0===h?0:h,f=i.hheight,p=void 0===f?0:f,g=i.hdepth,v=void 0===g?0:g,y=[Math.abs(d),Math.abs(p),v],C=A.stroke,B=A.lineWidth,m=void 0===B?1:B,w=A.increasedLineWidthForHitTesting,E=void 0===w?0:w,x=A.shadowType,S=void 0===x?"outer":x,T=A.shadowColor,F=A.filter,b=void 0===F?[]:F,I=A.transformOrigin,L=[a,l,c];r.contentBounds.update(L,y);var Q=t===bn.POLYLINE||t===bn.POLYGON||t===bn.PATH?Math.SQRT2:.5;if(C&&!C.isNone){var U=((m||0)+(E||0))*Q;y[0]+=U,y[1]+=U}if(r.renderBounds.update(L,y),T&&S&&"inner"!==S){var R=r.renderBounds,M=R.min,H=R.max,O=A.shadowBlur||0,k=A.shadowOffsetX||0,N=A.shadowOffsetY||0,_=M[0]-O+k,D=H[0]+O+k,P=M[1]-O+N,G=H[1]+O+N;M[0]=Math.min(M[0],_),H[0]=Math.max(H[0],D),M[1]=Math.min(M[1],P),H[1]=Math.max(H[1],G),r.renderBounds.setMinMax(M,H)}b.forEach((function(e){var t=e.name,n=e.params;if("blur"===t){var A=n[0].value;r.renderBounds.update(r.renderBounds.center,pe(r.renderBounds.halfExtents,r.renderBounds.halfExtents,[A,A,0]))}else if("drop-shadow"===t){var i=n[0].value,o=n[1].value,a=n[2].value,s=r.renderBounds,l=s.min,u=s.max,c=l[0]-a+i,h=u[0]+a+i,d=l[1]-a+o,f=u[1]+a+o;l[0]=Math.min(l[0],c),u[0]=Math.max(u[0],h),l[1]=Math.min(l[1],d),u[1]=Math.max(u[1],f),r.renderBounds.setMinMax(l,u)}})),e.geometry.dirty=!1;var K=p<0,z=(d<0?-1:1)*(I?qA(I[0],0,e,!0):0),V=(K?-1:1)*(I?qA(I[1],1,e,!0):0);(z||V)&&e.setOrigin(z,V)}}},{key:"updateSizeAttenuation",value:function(e,t){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/t,e.nodeName===bn.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/t)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===bn.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function Vi(e){return e.constructor.PARSED_STYLE_LIST}var Wi=function(){return s((function e(){o(this,e),this.mixer=ri}),[{key:"calculator",value:function(e,t,n,r){return ZA(n)}}])}(),Xi=function(){return s((function e(){o(this,e)}),[{key:"calculator",value:function(e,t,n,r,A){return n instanceof gA&&(n=null),A.sceneGraphService.updateDisplayObjectDependency(e,t,n,r),"clipPath"===e&&r.forEach((function(e){0===e.childNodes.length&&A.sceneGraphService.dirtyToRoot(e)})),n}}])}(),Yi=function(){return s((function e(){o(this,e),this.parser=DA,this.mixer=PA}),[{key:"calculator",value:function(e,t,n,r){return n instanceof gA?"none"===n.value?xA:SA:n}}])}(),ji=function(){return s((function e(){o(this,e)}),[{key:"calculator",value:function(e,t,n){return n instanceof gA?[]:n}}])}();function Zi(e){var t=e.parsedStyle.fontSize;return Ge(t)?null:t}var Ji=function(){return s((function e(){o(this,e),this.mixer=ri}),[{key:"calculator",value:function(e,t,n,r,A){if(je(n))return n;if(!yA.isRelativeUnit(n.unit))return n.value;if(n.unit===rA.kPercentage)return 0;if(n.unit===rA.kEms){if(r.parentNode){var i=Zi(r.parentNode);if(i)return i*=n.value}return 0}if(n.unit===rA.kRems){var o;if(null!=r&&null!==(o=r.ownerDocument)&&void 0!==o&&o.documentElement){var a=Zi(r.ownerDocument.documentElement);if(a)return a*=n.value}return 0}}}])}(),qi=function(){return s((function e(){o(this,e),this.mixer=ii}),[{key:"calculator",value:function(e,t,n){return n.map((function(e){return e.value}))}}])}(),$i=function(){return s((function e(){o(this,e),this.mixer=ii}),[{key:"calculator",value:function(e,t,n){return n.map((function(e){return e.value}))}}])}(),eo=function(){return s((function e(){o(this,e)}),[{key:"calculator",value:function(e,t,n,r){var A;n instanceof gA&&(n=null);var i=null===(A=n)||void 0===A?void 0:A.cloneNode(!0);return i&&(i.style.isMarker=!0),i}}])}(),to=function(){return s((function e(){o(this,e),this.mixer=ri}),[{key:"calculator",value:function(e,t,n){return n.value}}])}(),no=function(){return s((function e(){o(this,e),this.mixer=Ai(0,1)}),[{key:"calculator",value:function(e,t,n){return n.value}},{key:"postProcessor",value:function(e){var t=e.parsedStyle,n=t.offsetPath,r=t.offsetDistance;if(n){var A=n.nodeName;if(A===bn.LINE||A===bn.PATH||A===bn.POLYLINE){var i=n.getPoint(r);i&&e.setLocalPosition(i.x,i.y)}}}}])}(),ro=function(){return s((function e(){o(this,e),this.mixer=Ai(0,1)}),[{key:"calculator",value:function(e,t,n){return n.value}}])}(),Ao=function(){return s((function e(){o(this,e),this.parser=Ci,this.mixer=Bi}),[{key:"calculator",value:function(e,t,n){return n instanceof gA&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Kn(0,0,0,0)}:n}}])}(),io=s((function e(){o(this,e),this.mixer=mi})),oo=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).mixer=Ai(0,1/0),e}return v(t,e),s(t)}(Ji),ao=function(){return s((function e(){o(this,e)}),[{key:"calculator",value:function(e,t,n,r){return n instanceof gA?"unset"===n.value?"":n.value:"".concat(n)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),so=function(){return s((function e(){o(this,e)}),[{key:"calculator",value:function(e,t,n,r){var A=r.getAttribute("text");if(A){var i=A;"capitalize"===n.value?i=A.charAt(0).toUpperCase()+A.slice(1):"lowercase"===n.value?i=A.toLowerCase():"uppercase"===n.value&&(i=A.toUpperCase()),r.parsedStyle.text=i}return n.value}}])}(),lo=new WeakMap;var uo="undefined"!=typeof window&&void 0!==window.document;function co(e){return!!e.getAttribute}function ho(e,t){var n=Number(e.parsedStyle.zIndex||0),r=Number(t.parsedStyle.zIndex||0);if(n===r){var A=e.parentNode;if(A){var i=A.childNodes||[];return i.indexOf(e)-i.indexOf(t)}}return n-r}function fo(e){var t=e;do{var n;if(null===(n=t.parsedStyle)||void 0===n?void 0:n.clipPath)return t;t=t.parentElement}while(null!==t);return null}function po(e,t){if(uo)return document.defaultView.getComputedStyle(e,null).getPropertyValue(t)}var go={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},vo="object"==typeof performance&&performance.now?performance:Date;function yo(e){return e.nodeName===bn.FRAGMENT||e.getRootNode().nodeName===bn.FRAGMENT}function Co(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=!1,A=!1,i=!!t&&!t.isNone,o=!!n&&!n.isNone;return"visiblepainted"===e||"painted"===e||"auto"===e?(r=i,A=o):"visiblefill"===e||"fill"===e?r=!0:"visiblestroke"===e||"stroke"===e?A=!0:"visible"!==e&&"all"!==e||(r=!0,A=!0),[r,A]}var Bo=1,mo="object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:{},wo=Date.now(),Eo={},xo=Date.now(),So=function(e){if("function"!=typeof e)throw new TypeError("".concat(e," is not a function"));var t=Date.now(),n=t-xo,r=n>16?0:16-n,A=Bo++;return Eo[A]=e,Object.keys(Eo).length>1||setTimeout((function(){xo=t;var e=Eo;Eo={},Object.keys(e).forEach((function(t){return e[t](mo.performance&&"function"==typeof mo.performance.now?mo.performance.now():Date.now()-wo)}))}),r),A},To=function(e){delete Eo[e]},Fo=function(e){return"string"!=typeof e?So:""===e?mo.requestAnimationFrame:mo["".concat(e,"RequestAnimationFrame")]},bo=function(e,t){for(var n=0;void 0!==e[n];){if(t(e[n]))return e[n];n+=1}}(["","webkit","moz","ms","o"],(function(e){return!!Fo(e)})),Io=Fo(bo),Lo=function(e){return"string"!=typeof e?To:""===e?mo.cancelAnimationFrame:mo["".concat(e,"CancelAnimationFrame")]||mo["".concat(e,"CancelRequestAnimationFrame")]}(bo);mo.requestAnimationFrame=Io,mo.cancelAnimationFrame=Lo;var Qo=function(){return s((function e(){o(this,e),this.callbacks=[]}),[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(e,t){this.callbacks.push(t)}},{key:"promise",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Promise.all(this.callbacks.map((function(e){return e.apply(void 0,t)})))}}])}(),Uo=function(){return s((function e(){o(this,e),this.callbacks=[]}),[{key:"tapPromise",value:function(e,t){this.callbacks.push(t)}},{key:"promise",value:(e=Sn(En().mark((function e(){var t,n,r,A,i=arguments;return En().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.callbacks.length){e.next=6;break}return e.next=1,(t=this.callbacks)[0].apply(t,i);case 1:n=e.sent,r=1;case 2:if(!(r<this.callbacks.length)){e.next=5;break}return A=this.callbacks[r],e.next=3,A(n);case 3:n=e.sent;case 4:r++,e.next=2;break;case 5:return e.abrupt("return",n);case 6:return e.abrupt("return",null);case 7:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})}]);var e}(),Ro=function(){return s((function e(){o(this,e),this.callbacks=[]}),[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=arguments;this.callbacks.forEach((function(e){e.apply(void 0,r)}))}}])}(),Mo=function(){return s((function e(){o(this,e),this.callbacks=[]}),[{key:"tap",value:function(e,t){this.callbacks.push(t)}},{key:"call",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.callbacks.length){for(var r=arguments,A=this.callbacks[0].apply(void 0,r),i=1;i<this.callbacks.length;i++){A=(0,this.callbacks[i])(A)}return A}return null}}])}(),Ho=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Oo=/([\"\'])[^\'\"]+\1/;function ko(e){var t=e.fontSize,n=void 0===t?16:t,r=e.fontFamily,A=void 0===r?"sans-serif":r,i=e.fontStyle,o=void 0===i?"normal":i,a=e.fontVariant,s=void 0===a?"normal":a,l=e.fontWeight;return{fontSize:n,fontFamily:A,fontStyle:o,fontVariant:s,fontWeight:void 0===l?"normal":l}}var No=nA((function(e){for(var t=ko(e),n=t.fontSize,r=t.fontFamily,A=t.fontStyle,i=t.fontVariant,o=t.fontWeight,a=je(n)&&"".concat(n,"px")||"16px",s=r.split(","),l=s.length-1;l>=0;l--){var u=s[l].trim();!Oo.test(u)&&Ho.indexOf(u)<0&&(u='"'.concat(u,'"')),s[l]=u}return"".concat(A," ").concat(i," ").concat(o," ").concat(a," ").concat(s.join(","))}),(function(e){var t=ko(e),n=t.fontSize,r=t.fontFamily,A=t.fontStyle,i=t.fontVariant,o=t.fontWeight;return"".concat(A,"_").concat(i,"_").concat(o,"_").concat(n,"_").concat(r)})),_o=function(e){return Math.max(e,1e-6)};function Do(e,t,n){return Q(e),e[4]=Math.tan(t),e[1]=Math.tan(n),e}var Po=T(),Go=T(),Ko={scale:function(e){P(Po,[e[0].value,e[1].value,1].map((function(e){return _o(e)})))},scaleX:function(e){P(Po,[e[0].value,1,1].map((function(e){return _o(e)})))},scaleY:function(e){P(Po,[1,e[0].value,1].map((function(e){return _o(e)})))},scaleZ:function(e){P(Po,[1,1,e[0].value].map((function(e){return _o(e)})))},scale3d:function(e){P(Po,[e[0].value,e[1].value,e[2].value].map((function(e){return _o(e)})))},translate:function(e){D(Po,[e[0].value,e[1].value,0])},translateX:function(e){D(Po,[e[0].value,0,0])},translateY:function(e){D(Po,[0,e[0].value,0])},translateZ:function(e){D(Po,[0,0,e[0].value])},translate3d:function(e){D(Po,[e[0].value,e[1].value,e[2].value])},rotate:function(e){V(Po,Zn(ZA(e[0])))},rotateX:function(e){K(Po,Zn(ZA(e[0])))},rotateY:function(e){z(Po,Zn(ZA(e[0])))},rotateZ:function(e){V(Po,Zn(ZA(e[0])))},rotate3d:function(e){G(Po,Zn(ZA(e[3])),[e[0].value,e[1].value,e[2].value])},skew:function(e){Do(Po,Zn(e[0].value),Zn(e[1].value))},skewX:function(e){Do(Po,Zn(e[0].value),0)},skewY:function(e){Do(Po,0,Zn(e[0].value))},matrix:function(e){L(Po,e[0].value,e[1].value,0,0,e[2].value,e[3].value,0,0,0,0,1,0,e[4].value,e[5].value,0,1)},matrix3d:function(e){L.apply(se,[Po].concat(c(e.map((function(e){return e.value})))))}},zo=he(1,1,1),Vo=le(),Wo={translate:function(e,t){ja.sceneGraphService.setLocalScale(e,zo,!1),ja.sceneGraphService.setLocalEulerAngles(e,Vo,void 0,void 0,!1),ja.sceneGraphService.setLocalPosition(e,[t[0].value,t[1].value,0],!1),ja.sceneGraphService.dirtyLocalTransform(e,e.transformable)}};function Xo(e,t){if(e.length){if(1===e.length&&Wo[e[0].t])return void Wo[e[0].t](t,e[0].d);for(var n=Q(Go),r=0;r<e.length;r++){var A=e[r],i=A.t,o=A.d,a=Ko[i];a&&(a(o),oe(n,n,Po))}t.setLocalTransform(n)}else t.resetLocalTransform();return t.getLocalTransform()}var Yo=function(){return s((function e(){o(this,e),this.parser=Ii,this.mixer=Ni}),[{key:"calculator",value:function(e,t,n,r){return n instanceof gA?[]:n}},{key:"postProcessor",value:function(e){Xo(e.parsedStyle.transform,e)}}])}(),jo=function(){return s((function e(){o(this,e)}),[{key:"postProcessor",value:function(e){var t=e.parsedStyle.transformOrigin;t[0].unit===rA.kPixels&&t[1].unit===rA.kPixels?e.setOrigin(t[0].value,t[1].value):e.getGeometryBounds()}}])}(),Zo=function(){return s((function e(){o(this,e)}),[{key:"calculator",value:function(e,t,n,r){return n.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var t=e.parentNode,n=t.renderable,r=t.sortable;n&&t.dirty(),r&&(r.dirty=!0,r.dirtyReason=gr.Z_INDEX_CHANGED)}}}])}(),Jo=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e,t){var n=e.cx,r=void 0===n?0:n,A=e.cy,i=void 0===A?0:A,o=e.r,a=void 0===o?0:o;return{cx:r,cy:i,hwidth:a,hheight:a}}}])}(),qo=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e,t){var n=e.cx,r=void 0===n?0:n,A=e.cy,i=void 0===A?0:A,o=e.rx,a=void 0===o?0:o,s=e.ry;return{cx:r,cy:i,hwidth:a,hheight:void 0===s?0:s}}}])}(),$o=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e){var t=e.x1,n=e.y1,r=e.x2,A=e.y2,i=Math.min(t,r),o=Math.max(t,r),a=Math.min(n,A),s=(o-i)/2,l=(Math.max(n,A)-a)/2;return{cx:i+s,cy:a+l,hwidth:s,hheight:l}}}])}(),ea=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e){var t=e.d.rect,n=t.x,r=t.y,A=t.width/2,i=t.height/2;return{cx:n+A,cy:r+i,hwidth:A,hheight:i}}}])}(),ta=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e){if(e.points&&Ke(e.points.points)){var t=e.points.points,n=Math.min.apply(Math,c(t.map((function(e){return e[0]})))),r=Math.max.apply(Math,c(t.map((function(e){return e[0]})))),A=Math.min.apply(Math,c(t.map((function(e){return e[1]})))),i=(r-n)/2,o=(Math.max.apply(Math,c(t.map((function(e){return e[1]}))))-A)/2;return{cx:n+i,cy:A+o,hwidth:i,hheight:o}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),na=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e,t){var n=e.x,r=void 0===n?0:n,A=e.y,i=void 0===A?0:A,o=e.src,a=e.width,s=void 0===a?0:a,l=e.height,u=s,c=void 0===l?0:l;return o&&!Xe(o)&&(u||(u=o.width,e.width=u),c||(c=o.height,e.height=c)),{cx:r+u/2,cy:i+c/2,hwidth:u/2,hheight:c/2}}}])}(),ra=function(){return s((function e(t){o(this,e),this.globalRuntime=t}),[{key:"isReadyToMeasure",value:function(e,t){return e.text}},{key:"update",value:function(e,t){var n,r=e.text,A=e.textAlign,i=void 0===A?"start":A,o=e.lineWidth,a=void 0===o?1:o,s=e.textBaseline,l=void 0===s?"alphabetic":s,u=e.dx,c=void 0===u?0:u,h=e.dy,d=void 0===h?0:h,f=e.x,p=void 0===f?0:f,g=e.y,v=void 0===g?0:g;if(!this.isReadyToMeasure(e,t))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var y=((null==t||null===(n=t.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n?void 0:n.getConfig())||{}).offscreenCanvas,C=this.globalRuntime.textService.measureText(r,e,y);e.metrics=C;var B=C.width/2,m=C.height/2,w=p+B;"center"===i||"middle"===i?w+=a/2-B:"right"!==i&&"end"!==i||(w+=a-2*B);var E=v-m;return"middle"===l?E+=m:"top"===l||"hanging"===l?E+=2*m:"alphabetic"===l||"bottom"!==l&&"ideographic"!==l||(E+=0),c&&(w+=c),d&&(E+=d),{cx:w,cy:E,hwidth:B,hheight:m}}}])}(),Aa=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e,t){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),ia=function(){return s((function e(){o(this,e)}),[{key:"update",value:function(e,t){var n=e.x,r=void 0===n?0:n,A=e.y,i=void 0===A?0:A,o=e.width,a=void 0===o?0:o,s=e.height,l=void 0===s?0:s;return{cx:r+a/2,cy:i+l/2,hwidth:a/2,hheight:l/2}}}])}(),oa=function(){return s((function e(t){o(this,e),this.eventPhase=e.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Gn,this.page=new Gn,this.canvas=new Gn,this.viewport=new Gn,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}),[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(zn)}}])}(),aa=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).client=new Gn,e.movement=new Gn,e.offset=new Gn,e.global=new Gn,e.screen=new Gn,e}return v(t,e),s(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}},{key:"initMouseEvent",value:function(){throw new Error(zn)}}])}(oa),sa=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).width=0,e.height=0,e.isPrimary=!1,e}return v(t,e),s(t,[{key:"getCoalescedEvents",value:function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(aa),la=function(e){function t(){return o(this,t),p(this,t,arguments)}return v(t,e),s(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(aa),ua=function(e){function t(e,n){var r;return o(this,t),(r=p(this,t,[null])).type=e,r.detail=null==n?void 0:n.detail,n&&!("detail"in n)&&(r.detail=n),Object.assign(r,n),r}return v(t,e),s(t)}(oa),ca=function(){return s((function e(){o(this,e),this.emitter=new w}),[{key:"on",value:function(e,t,n){return this.addEventListener(e,t,n),this}},{key:"addEventListener",value:function(e,t,n){var r=!1,A=!1;if($e(n))r=n;else if(n){var i=n.capture;r=void 0!==i&&i;var o=n.once;A=void 0!==o&&o}r&&(e+="capture"),t=Pe(t)?t:t.handleEvent;var a=Pe(t)?void 0:t;return A?this.emitter.once(e,t,a):this.emitter.on(e,t,a),this}},{key:"off",value:function(e,t,n){return e?this.removeEventListener(e,t,n):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;null===(e=this.emitter)||void 0===e||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,t,n){var r;if(!this.emitter)return this;($e(n)?n:null==n?void 0:n.capture)&&(e+="capture"),t=Pe(t)?t:null===(r=t)||void 0===r?void 0:r.handleEvent;var A=Pe(t)?void 0:t;return this.emitter.off(e,t,A),this}},{key:"emit",value:function(e,t){this.dispatchEvent(new ua(e,t))}},{key:"dispatchEventToSelf",value:function(e){e.target||(e.target=this),e.currentTarget=this,this.emitter.emit(e.type,e)}},{key:"dispatchEvent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(arguments.length>2?arguments[2]:void 0)return this.dispatchEventToSelf(e),!0;if(this.document)t=this;else if(this.defaultView)t=this.defaultView;else{var r;t=null===(r=this.ownerDocument)||void 0===r?void 0:r.defaultView}if(t){if(e.manager=t.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],n||(e.target=this),e.manager.dispatchEvent(e,e.type,n)}else this.dispatchEventToSelf(e);return!e.defaultPrevented}}])}(),ha=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.mutations=void 0,e.parentNode=null,e.destroyed=!1,e}return v(t,e),s(t,[{key:"textContent",get:function(){var e="";this.nodeName===bn.TEXT&&(e+=this.style.text);var t,n=Tn(this.childNodes);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.nodeName===bn.TEXT?e+=r.nodeValue:e+=r.textContent}}catch(e){n.e(e)}finally{n.f()}return e},set:function(e){var t=this;this.childNodes.slice().forEach((function(e){t.removeChild(e)})),this.nodeName===bn.TEXT&&(this.style.text="".concat(e))}},{key:"getRootNode",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(e):e.composed&&this.host?this.host.getRootNode(e):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(e){throw new Error(zn)}},{key:"lookupNamespaceURI",value:function(e){throw new Error(zn)}},{key:"lookupPrefix",value:function(e){throw new Error(zn)}},{key:"normalize",value:function(){throw new Error(zn)}},{key:"isEqualNode",value:function(e){return this===e}},{key:"isSameNode",value:function(e){return this.isEqualNode(e)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(e){if(e===this)return 0;for(var n=e,r=this,A=[n],i=[r];null!==(o=n.parentNode)&&void 0!==o?o:r.parentNode;){var o;n=n.parentNode?(A.push(n.parentNode),n.parentNode):n,r=r.parentNode?(i.push(r.parentNode),r.parentNode):r}if(n!==r)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var a=A.length>i.length?A:i,s=a===A?i:A;if(a[a.length-s.length]===s[0])return a===A?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var l=a.length-s.length,u=s.length-1;u>=0;u--){var c=s[u],h=a[l+u];if(h!==c){var d=c.parentNode.childNodes;return d.indexOf(c)<d.indexOf(h)?s===A?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING:a===A?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}}return t.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(e){return this.contains(e)}},{key:"contains",value:function(e){for(var t=e;t&&this!==t;)t=t.parentNode;return!!t}},{key:"getAncestor",value:function(e){for(var t=this;e>0&&t;)t=t.parentNode,e--;return t}},{key:"forEach",value:function(e){for(var t=[this];t.length>0;){var n=t.pop();if(!1===e(n))break;for(var r=n.childNodes.length-1;r>=0;r--)t.push(n.childNodes[r])}}}],[{key:"isNode",value:function(e){return!!e.childNodes}}])}(ca);ha.DOCUMENT_POSITION_DISCONNECTED=1,ha.DOCUMENT_POSITION_PRECEDING=2,ha.DOCUMENT_POSITION_FOLLOWING=4,ha.DOCUMENT_POSITION_CONTAINS=8,ha.DOCUMENT_POSITION_CONTAINED_BY=16,ha.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var da=function(){return s((function e(t,n){var r=this;o(this,e),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=T(),this.tmpVec3=le(),this.onPointerDown=function(e){var t=r.createPointerEvent(e);if(r.dispatchEvent(t,"pointerdown"),"touch"===t.pointerType)r.dispatchEvent(t,"touchstart");else if("mouse"===t.pointerType||"pen"===t.pointerType){var n=2===t.button;r.dispatchEvent(t,n?"rightdown":"mousedown")}r.trackingData(e.pointerId).pressTargetsByButton[e.button]=t.composedPath(),r.freeEvent(t)},this.onPointerUp=function(e){var t=vo.now(),n=r.createPointerEvent(e,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(n,"pointerup"),"touch"===n.pointerType)r.dispatchEvent(n,"touchend");else if("mouse"===n.pointerType||"pen"===n.pointerType){var A=2===n.button;r.dispatchEvent(n,A?"rightup":"mouseup")}var i=r.trackingData(e.pointerId),o=r.findMountedTarget(i.pressTargetsByButton[e.button]),a=o;if(o&&!n.composedPath().includes(o)){for(var s=o;s&&!n.composedPath().includes(s);){if(n.currentTarget=s,r.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType)r.notifyTarget(n,"touchendoutside");else if("mouse"===n.pointerType||"pen"===n.pointerType){var l=2===n.button;r.notifyTarget(n,l?"rightupoutside":"mouseupoutside")}ha.isNode(s)&&(s=s.parentNode)}delete i.pressTargetsByButton[e.button],a=s}if(a){var u,c=r.clonePointerEvent(n,"click");c.target=a,c.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:c.target,timeStamp:t});var h=r.context.renderingContext.root.ownerDocument.defaultView,d=i.clicksByButton[e.button];d.target===c.target&&t-d.timeStamp<h.getConfig().dblClickSpeed?++d.clickCount:d.clickCount=1,d.target=c.target,d.timeStamp=t,c.detail=d.clickCount,null!==(u=n.detail)&&void 0!==u&&u.preventClick||(r.context.config.useNativeClickEvent||"mouse"!==c.pointerType&&"touch"!==c.pointerType||r.dispatchEvent(c,"click"),r.dispatchEvent(c,"pointertap")),r.freeEvent(c)}r.freeEvent(n)},this.onPointerMove=function(e){var t=r.createPointerEvent(e,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),n="mouse"===t.pointerType||"pen"===t.pointerType,A=r.trackingData(e.pointerId),i=r.findMountedTarget(A.overTargets);if(A.overTargets&&i!==t.target){var o="mousemove"===e.type?"mouseout":"pointerout",a=r.createPointerEvent(e,o,i||void 0);if(r.dispatchEvent(a,"pointerout"),n&&r.dispatchEvent(a,"mouseout"),!t.composedPath().includes(i)){var s=r.createPointerEvent(e,"pointerleave",i||void 0);for(s.eventPhase=s.AT_TARGET;s.target&&!t.composedPath().includes(s.target);)s.currentTarget=s.target,r.notifyTarget(s),n&&r.notifyTarget(s,"mouseleave"),ha.isNode(s.target)&&(s.target=s.target.parentNode);r.freeEvent(s)}r.freeEvent(a)}if(i!==t.target){var l="mousemove"===e.type?"mouseover":"pointerover",u=r.clonePointerEvent(t,l);r.dispatchEvent(u,"pointerover"),n&&r.dispatchEvent(u,"mouseover");for(var c=i&&ha.isNode(i)&&i.parentNode;c&&c!==(ha.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&c!==t.target;)c=c.parentNode;if(!c||c===(ha.isNode(r.rootTarget)&&r.rootTarget.parentNode)){var h=r.clonePointerEvent(t,"pointerenter");for(h.eventPhase=h.AT_TARGET;h.target&&h.target!==i&&h.target!==(ha.isNode(r.rootTarget)&&r.rootTarget.parentNode);)h.currentTarget=h.target,r.notifyTarget(h),n&&r.notifyTarget(h,"mouseenter"),ha.isNode(h.target)&&(h.target=h.target.parentNode);r.freeEvent(h)}r.freeEvent(u)}r.dispatchEvent(t,"pointermove"),"touch"===t.pointerType&&r.dispatchEvent(t,"touchmove"),n&&(r.dispatchEvent(t,"mousemove"),r.cursor=r.getCursor(t.target)),A.overTargets=t.composedPath(),r.freeEvent(t)},this.onPointerOut=function(e){var t=r.trackingData(e.pointerId);if(t.overTargets){var n="mouse"===e.pointerType||"pen"===e.pointerType,A=r.findMountedTarget(t.overTargets),i=r.createPointerEvent(e,"pointerout",A||void 0);r.dispatchEvent(i),n&&r.dispatchEvent(i,"mouseout");var o=r.createPointerEvent(e,"pointerleave",A||void 0);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==(ha.isNode(r.rootTarget)&&r.rootTarget.parentNode);)o.currentTarget=o.target,r.notifyTarget(o),n&&r.notifyTarget(o,"mouseleave"),ha.isNode(o.target)&&(o.target=o.target.parentNode);t.overTargets=null,r.freeEvent(i),r.freeEvent(o)}r.cursor=null},this.onPointerOver=function(e){var t=r.trackingData(e.pointerId),n=r.createPointerEvent(e),A="mouse"===n.pointerType||"pen"===n.pointerType;r.dispatchEvent(n,"pointerover"),A&&r.dispatchEvent(n,"mouseover"),"mouse"===n.pointerType&&(r.cursor=r.getCursor(n.target));var i=r.clonePointerEvent(n,"pointerenter");for(i.eventPhase=i.AT_TARGET;i.target&&i.target!==(ha.isNode(r.rootTarget)&&r.rootTarget.parentNode);)i.currentTarget=i.target,r.notifyTarget(i),A&&r.notifyTarget(i,"mouseenter"),ha.isNode(i.target)&&(i.target=i.target.parentNode);t.overTargets=n.composedPath(),r.freeEvent(n),r.freeEvent(i)},this.onPointerUpOutside=function(e){var t=r.trackingData(e.pointerId),n=r.findMountedTarget(t.pressTargetsByButton[e.button]),A=r.createPointerEvent(e);if(n){for(var i=n;i;)A.currentTarget=i,r.notifyTarget(A,"pointerupoutside"),"touch"===A.pointerType||"mouse"!==A.pointerType&&"pen"!==A.pointerType||r.notifyTarget(A,2===A.button?"rightupoutside":"mouseupoutside"),ha.isNode(i)&&(i=i.parentNode);delete t.pressTargetsByButton[e.button]}r.freeEvent(A)},this.onWheel=function(e){var t=r.createWheelEvent(e);r.dispatchEvent(t),r.freeEvent(t)},this.onClick=function(e){if(r.context.config.useNativeClickEvent){var t=r.createPointerEvent(e);r.dispatchEvent(t),r.freeEvent(t)}},this.onPointerCancel=function(e){var t=r.createPointerEvent(e,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(t),r.freeEvent(t)},this.globalRuntime=t,this.context=n}),[{key:"init",value: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)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var e=this.context.contextService.getBoundingClientRect(),t=1,n=1,r=this.context.contextService.getDomElement();if(r&&e){var A=r.offsetWidth,i=r.offsetHeight;A&&i&&(t=e.width/A,n=e.height/i)}return{scaleX:t,scaleY:n,bbox:e}}},{key:"client2Viewport",value:function(e){var t=this.getScale(),n=t.scaleX,r=t.scaleY,A=t.bbox;return new Gn((e.x-((null==A?void 0:A.left)||0))/n,(e.y-((null==A?void 0:A.top)||0))/r)}},{key:"viewport2Client",value:function(e){var t=this.getScale(),n=t.scaleX,r=t.scaleY,A=t.bbox;return new Gn((e.x+((null==A?void 0:A.left)||0))*n,(e.y+((null==A?void 0:A.top)||0))*r)}},{key:"viewport2Canvas",value:function(e){var t=e.x,n=e.y,r=this.rootTarget.defaultView.getCamera(),A=this.context.config,i=A.width,o=A.height,a=r.getPerspectiveInverse(),s=r.getWorldTransform(),l=H(this.tmpMatrix,s,a),u=fe(this.tmpVec3,t/i*2-1,2*(1-n/o)-1,0);return we(u,u,l),new Gn(u[0],u[1])}},{key:"canvas2Viewport",value:function(e){var t=this.rootTarget.defaultView.getCamera(),n=t.getPerspective(),r=t.getViewTransform(),A=H(this.tmpMatrix,n,r),i=fe(this.tmpVec3,e.x,e.y,0);we(this.tmpVec3,this.tmpVec3,A);var o=this.context.config,a=o.width,s=o.height;return new Gn((i[0]+1)/2*a,(1-(i[1]+1)/2)*s)}},{key:"setPickHandler",value:function(e){this.pickHandler=e}},{key:"addEventMapping",value:function(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((function(e,t){return e.priority-t.priority}))}},{key:"mapEvent",value:function(e){if(this.rootTarget){var t=this.mappingTable[e.type];if(t)for(var n=0,r=t.length;n<r;n++)t[n].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}}},{key:"dispatchEvent",value:function(e,t,n){if(n){e.eventPhase=e.AT_TARGET;var r=this.rootTarget.defaultView||null;e.currentTarget=r,this.notifyListeners(e,t)}else e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t)}},{key:"propagate",value:function(e,t){if(e.target){var n=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var r=n.length-1;r>=1;r--)if(e.currentTarget=n[r],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!e.propagationStopped&&!e.propagationImmediatelyStopped){var A=n.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var i=A+1;i<n.length;i++)if(e.currentTarget=n[i],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(e){var t=[e],n=this.rootTarget.defaultView||null;if(n&&n===e)return t.unshift(n.document),t;for(var r=0;r<2048&&e!==this.rootTarget;r++)ha.isNode(e)&&e.parentNode&&(t.push(e.parentNode),e=e.parentNode);return n&&t.push(n),t}},{key:"hitTest",value:function(e){var t=e.viewportX,n=e.viewportY,r=this.context.config,A=r.width,i=r.height,o=r.disableHitTesting;return t<0||n<0||t>A||n>i?null:!o&&this.pickHandler(e)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(e,t){var n,r=null==t?void 0:t.target;if(null!==(n=r)&&void 0!==n&&n.shadowRoot&&(r=t.composedPath()[0]),r){if(r===e)return!0;if(e&&e.contains)return e.contains(r)}return!(null==t||!t.composedPath)&&t.composedPath().indexOf(e)>-1}},{key:"getExistedHTML",value:function(e){if(e.nativeEvent.composedPath)for(var t=0,n=e.nativeEvent.composedPath();t<n.length;t++){var r=n[t],A=this.nativeHTMLMap.get(r);if(A)return A}return null}},{key:"pickTarget",value:function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})}},{key:"createPointerEvent",value:function(e,t,n,r){var A=this.allocateEvent(sa);this.copyPointerData(e,A),this.copyMouseData(e,A),this.copyData(e,A),A.nativeEvent=e.nativeEvent,A.originalEvent=e;var i=this.getExistedHTML(A),o=this.context.contextService.getDomElement();return A.target=null!=n?n:i||this.isNativeEventFromCanvas(o,A.nativeEvent)&&this.pickTarget(A)||r,"string"==typeof t&&(A.type=t),A}},{key:"createWheelEvent",value:function(e){var t=this.allocateEvent(la);this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e;var n=this.getExistedHTML(t),r=this.context.contextService.getDomElement();return t.target=n||this.isNativeEventFromCanvas(r,t.nativeEvent)&&this.pickTarget(t),t}},{key:"trackingData",value:function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}},{key:"cloneWheelEvent",value:function(e){var t=this.allocateEvent(la);return t.nativeEvent=e.nativeEvent,t.originalEvent=e.originalEvent,this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.target=e.target,t.path=e.composedPath().slice(),t.type=e.type,t}},{key:"clonePointerEvent",value:function(e,t){var n=this.allocateEvent(sa);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyPointerData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=null!=t?t:n.type,n}},{key:"copyPointerData",value:function(e,t){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}},{key:"copyMouseData",value:function(e,t){t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.client.copyFrom(e.client),t.movement.copyFrom(e.movement),t.canvas.copyFrom(e.canvas),t.screen.copyFrom(e.screen),t.global.copyFrom(e.global),t.offset.copyFrom(e.offset)}},{key:"copyWheelData",value:function(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}},{key:"copyData",value:function(e,t){t.isTrusted=e.isTrusted,t.timeStamp=vo.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.page.copyFrom(e.page),t.viewport.copyFrom(e.viewport)}},{key:"allocateEvent",value:function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t}},{key:"freeEvent",value:function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}},{key:"notifyTarget",value:function(e,t){t=null!=t?t:e.type;var n=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(t,"capture"):t;this.notifyListeners(e,n),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}},{key:"notifyListeners",value:function(e,t){var n=e.currentTarget.emitter,r=n._events[t];if(r)if("fn"in r)r.once&&n.removeListener(t,r.fn,void 0,!0),r.fn.call(e.currentTarget||r.context,e);else for(var A=0;A<r.length&&!e.propagationImmediatelyStopped;A++)r[A].once&&n.removeListener(t,r[A].fn,void 0,!0),r[A].fn.call(e.currentTarget||r[A].context,e)}},{key:"findMountedTarget",value:function(e){if(!e)return null;for(var t=e[e.length-1],n=e.length-2;n>=0;n--){var r=e[n];if(!(r===this.rootTarget||ha.isNode(r)&&r.parentNode===t))break;t=e[n]}return t}},{key:"getCursor",value:function(e){for(var t=e;t;){var n=co(t)&&t.getAttribute("cursor");if(n)return n;t=ha.isNode(t)&&t.parentNode}}}])}(),fa=function(){return s((function e(){o(this,e)}),[{key:"getOrCreateCanvas",value:function(e,t){if(this.canvas)return this.canvas;if(e||ja.offscreenCanvas)this.canvas=e||ja.offscreenCanvas,this.context=this.canvas.getContext("2d",i({willReadFrequently:!0},t));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",i({willReadFrequently:!0},t)),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(e){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",i({willReadFrequently:!0},t))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,t){return this.context||this.getOrCreateCanvas(e,t),this.context}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),pa=function(e){return e[e.CAMERA_CHANGED=0]="CAMERA_CHANGED",e[e.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",e[e.NONE=2]="NONE",e}({}),ga=function(){return s((function e(t,n){o(this,e),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new Ro,initAsync:new Qo,dirtycheck:new Mo,cull:new Mo,beginFrame:new Ro,beforeRender:new Ro,render:new Ro,afterRender:new Ro,endFrame:new Ro,destroy:new Ro,pick:new Uo,pickSync:new Mo,pointerDown:new Ro,pointerUp:new Ro,pointerMove:new Ro,pointerOut:new Ro,pointerOver:new Ro,pointerWheel:new Ro,pointerCancel:new Ro,click:new Ro},this.globalRuntime=t,this.context=n}),[{key:"init",value:function(e){var t=this,n=i(i({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach((function(e){e.apply(n,t.globalRuntime)})),this.hooks.init.call(),0===this.hooks.initAsync.getCallbacksNum()?(this.inited=!0,e()):this.hooks.initAsync.promise().then((function(){t.inited=!0,e()})).catch((function(e){}))}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(pa.CAMERA_CHANGED)}},{key:"render",value:function(e,t,n){var r=this,A=e.getConfig(),i=this.context.renderingContext;if(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.globalRuntime.sceneGraphService.syncHierarchy(i.root),this.globalRuntime.sceneGraphService.notifyMutationObservers(e),i.renderReasons.size&&this.inited){i.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=1===i.renderReasons.size&&i.renderReasons.has(pa.CAMERA_CHANGED),a=!A.disableRenderHooks||!o;a&&this.renderDisplayObject(i.root,A,i),this.hooks.beginFrame.call(t),a&&i.renderListCurrentFrame.forEach((function(e){r.hooks.beforeRender.call(e),r.hooks.render.call(e),r.hooks.afterRender.call(e)})),this.hooks.endFrame.call(t),i.renderListCurrentFrame=[],i.renderReasons.clear(),n()}}},{key:"renderDisplayObject",value:function(e,t,n){var r=this,A=t.renderer.getConfig(),i=A.enableDirtyCheck,o=A.enableCulling;function a(e){var t=e.renderable,A=e.sortable,a=i?t.dirty||n.dirtyRectangleRenderingDisabled?e:null:e,s=null;a&&(s=o?r.hooks.cull.call(a,r.context.camera):a)&&(r.stats.rendered+=1,n.renderListCurrentFrame.push(s)),e.dirty(!1),A.renderOrder=r.zIndexCounter,r.zIndexCounter+=1,r.stats.total+=1,A.dirty&&(r.sort(e,A),A.dirty=!1,A.dirtyChildren=[],A.dirtyReason=void 0)}for(var s=[e];s.length>0;){var l,u=s.pop();a(u);for(var c=(null===(l=u.sortable)||void 0===l||null===(l=l.sorted)||void 0===l?void 0:l.length)>0?u.sortable.sorted:u.childNodes,h=c.length-1;h>=0;h--)s.push(c[h])}}},{key:"sort",value:function(e,t){var n,r;(null==t||null===(n=t.sorted)||void 0===n?void 0:n.length)>0&&t.dirtyReason!==gr.Z_INDEX_CHANGED?t.dirtyChildren.forEach((function(n){var r=t.sorted.indexOf(n);if(r>-1&&t.sorted.splice(r,1),e.childNodes.indexOf(n)>-1)if(0===t.sorted.length)t.sorted.push(n);else{var A=function(e,t){for(var n=0,r=e.length;n<r;){var A=n+r>>>1;ho(e[A],t)<0?n=A+1:r=A}return n}(t.sorted,n);t.sorted.splice(A,0,n)}})):t.sorted=e.childNodes.slice().sort(ho),(null===(r=t.sorted)||void 0===r?void 0:r.length)>0&&0===e.childNodes.filter((function(e){return e.parsedStyle.zIndex})).length&&(t.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call()}},{key:"dirty",value:function(){this.context.renderingContext.renderReasons.add(pa.DISPLAY_OBJECT_CHANGED)}}])}(),va=/\[\s*(.*)=(.*)\s*\]/,ya=function(){return s((function e(){o(this,e)}),[{key:"selectOne",value:function(e,t){var n=this;if(e.startsWith("."))return t.find((function(t){return((null==t?void 0:t.classList)||[]).indexOf(n.getIdOrClassname(e))>-1}));if(e.startsWith("#"))return t.find((function(t){return t.id===n.getIdOrClassname(e)}));if(e.startsWith("[")){var r=this.getAttribute(e),A=r.name,i=r.value;return A?t.find((function(e){return t!==e&&("name"===A?e.name===i:n.attributeToString(e,A)===i)})):null}return t.find((function(n){return t!==n&&n.nodeName===e}))}},{key:"selectAll",value:function(e,t){var n=this;if(e.startsWith("."))return t.findAll((function(r){return t!==r&&((null==r?void 0:r.classList)||[]).indexOf(n.getIdOrClassname(e))>-1}));if(e.startsWith("#"))return t.findAll((function(r){return t!==r&&r.id===n.getIdOrClassname(e)}));if(e.startsWith("[")){var r=this.getAttribute(e),A=r.name,i=r.value;return A?t.findAll((function(e){return t!==e&&("name"===A?e.name===i:n.attributeToString(e,A)===i)})):[]}return t.findAll((function(n){return t!==n&&n.nodeName===e}))}},{key:"is",value:function(e,t){if(e.startsWith("."))return t.className===this.getIdOrClassname(e);if(e.startsWith("#"))return t.id===this.getIdOrClassname(e);if(e.startsWith("[")){var n=this.getAttribute(e),r=n.name,A=n.value;return"name"===r?t.name===A:this.attributeToString(t,r)===A}return t.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var t=e.match(va),n="",r="";return t&&t.length>2&&(n=t[1].replace(/"/g,""),r=t[2].replace(/"/g,"")),{name:n,value:r}}},{key:"attributeToString",value:function(e,t){if(!e.getAttribute)return"";var n=e.getAttribute(t);return Ge(n)?"":n.toString?n.toString():""}}])}(),Ca=function(e){return e.ATTR_MODIFIED="DOMAttrModified",e.INSERTED="DOMNodeInserted",e.MOUNTED="DOMNodeInsertedIntoDocument",e.REMOVED="removed",e.UNMOUNTED="DOMNodeRemovedFromDocument",e.REPARENT="reparent",e.DESTROY="destroy",e.BOUNDS_CHANGED="bounds-changed",e.CULLED="culled",e}({}),Ba=function(e){function t(e,n,r,A,i,a,s,l){var u;return o(this,t),(u=p(this,t,[null])).relatedNode=n,u.prevValue=r,u.newValue=A,u.attrName=i,u.attrChange=a,u.prevParsedValue=s,u.newParsedValue=l,u.type=e,u}return v(t,e),s(t)}(oa);Ba.ADDITION=2,Ba.MODIFICATION=1,Ba.REMOVAL=3;var ma,wa,Ea,xa=new Ba(Ca.REPARENT,null,"","","",0,"",""),Sa=De(),Ta=le(),Fa=he(1,1,1),ba=T(),Ia=De(),La=le(),Qa=T(),Ua=Le(),Ra=le(),Ma=Le(),Ha=le(),Oa=le(),ka=le(),Na=T(),_a=Le(),Da=Le(),Pa=Le(),Ga=function(){return s((function e(t){o(this,e),this.displayObjectDependencyMap=new WeakMap,this.runtime=t}),[{key:"matches",value:function(e,t){return this.runtime.sceneGraphSelector.is(e,t)}},{key:"querySelector",value:function(e,t){return this.runtime.sceneGraphSelector.selectOne(e,t)}},{key:"querySelectorAll",value:function(e,t){return this.runtime.sceneGraphSelector.selectAll(e,t)}},{key:"attach",value:function(e,t,n){var r,A=!1;e.parentNode&&(A=e.parentNode!==t,this.detach(e));var i=e.nodeName===bn.FRAGMENT,o=yo(t);e.parentNode=t;var a=i?e.childNodes:[e];je(n)?a.forEach((function(e){t.childNodes.splice(n,0,e),e.parentNode=t})):a.forEach((function(e){t.childNodes.push(e),e.parentNode=t}));var s=t.sortable;if((null!=s&&null!==(r=s.sorted)&&void 0!==r&&r.length||s.dirty||e.parsedStyle.zIndex)&&(-1===s.dirtyChildren.indexOf(e)&&s.dirtyChildren.push(e),s.dirty=!0,s.dirtyReason=gr.ADDED),!o){if(i)this.dirtyFragment(e);else{var l=e.transformable;l&&this.dirtyWorldTransform(e,l)}if(A){var u,c=!0===(null===(u=t.ownerDocument)||void 0===u||null===(u=u.defaultView)||void 0===u||null===(u=u.getConfig())||void 0===u||null===(u=u.future)||void 0===u?void 0:u.experimentalCancelEventPropagation);e.dispatchEvent(xa,c,c)}}}},{key:"detach",value:function(e){var t,n;if(e.parentNode){var r=e.transformable,A=e.parentNode.sortable;(null!=A&&null!==(t=A.sorted)&&void 0!==t&&t.length||null!==(n=e.style)&&void 0!==n&&n.zIndex)&&(-1===A.dirtyChildren.indexOf(e)&&A.dirtyChildren.push(e),A.dirty=!0,A.dirtyReason=gr.REMOVED);var i=e.parentNode.childNodes.indexOf(e);i>-1&&e.parentNode.childNodes.splice(i,1),r&&this.dirtyWorldTransform(e,r),e.parentNode=null}}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"getLocalTransform",value:function(e){var t=e.transformable;return Br(t),t.localTransform}},{key:"setLocalPosition",value:function(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],A=e.transformable;Oa[0]=t[0],Oa[1]=t[1],Oa[2]=null!==(n=t[2])&&void 0!==n?n:0,Ee(A.localPosition,Oa)||(de(A.localPosition,Oa),r&&this.dirtyLocalTransform(e,A))}},{key:"translateLocal",value:function(e,t){"number"==typeof t&&(t=he(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var n=e.transformable;Ee(t,Ta)||(!function(e,t,n){var r=n[0],A=n[1],i=n[2],o=n[3],a=t[0],s=t[1],l=t[2],u=A*l-i*s,c=i*a-r*l,h=r*s-A*a,d=A*h-i*c,f=i*u-r*h,p=r*c-A*u,g=2*o;u*=g,c*=g,h*=g,d*=2,f*=2,p*=2,e[0]=a+u+d,e[1]=s+c+f,e[2]=l+h+p}(t,t,n.localRotation),pe(n.localPosition,n.localPosition,t),this.dirtyLocalTransform(e,n))}},{key:"setLocalRotation",value:function(e,t,n,r,A){var i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];"number"==typeof t&&(t=ke(Ua,t,n,r,A));var o=e.transformable;Oe(o.localRotation,t),i&&this.dirtyLocalTransform(e,o)}},{key:"rotateLocal",value:function(e,t){"number"==typeof t&&(t=he(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var n=e.transformable;Me(Da,t[0],t[1],t[2]),Ne(n.localRotation,n.localRotation,Da),this.dirtyLocalTransform(e,n)}},{key:"setLocalScale",value:function(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],A=e.transformable;fe(La,t[0],t[1],null!==(n=t[2])&&void 0!==n?n:A.localScale[2]),Ee(La,A.localScale)||(de(A.localScale,La),r&&this.dirtyLocalTransform(e,A))}},{key:"scaleLocal",value:function(e,t){var n,r=e.transformable;!function(e,t,n){e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2]}(r.localScale,r.localScale,fe(La,t[0],t[1],null!==(n=t[2])&&void 0!==n?n:1)),this.dirtyLocalTransform(e,r)}},{key:"setLocalSkew",value:function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];"number"==typeof t&&(t=function(e,t,n){return e[0]=t,e[1]=n,e}(Ia,t,n));var A=e.transformable;!function(e,t){e[0]=t[0],e[1]=t[1]}(A.localSkew,t),r&&this.dirtyLocalTransform(e,A)}},{key:"setLocalEulerAngles",value:function(e,t){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];"number"==typeof t&&(t=he(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var r=e.transformable;Me(r.localRotation,t[0],t[1],t[2]),n&&this.dirtyLocalTransform(e,r)}},{key:"setLocalTransform",value:function(e,t){var n=X(Ra,t),r=j(Ma,t),A=Y(Ha,t);this.setLocalScale(e,A,!1),this.setLocalPosition(e,n,!1),this.setLocalRotation(e,r,void 0,void 0,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,Fa,!1),this.setLocalPosition(e,Ta,!1),this.setLocalEulerAngles(e,Ta,void 0,void 0,!1),this.setLocalSkew(e,Sa,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"getPosition",value:function(e){var t=e.transformable;return X(t.position,this.getWorldTransform(e,t))}},{key:"getRotation",value:function(e){var t=e.transformable;return j(t.rotation,this.getWorldTransform(e,t))}},{key:"getScale",value:function(e){var t=e.transformable;return Y(t.scaling,this.getWorldTransform(e,t))}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"getWorldTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.transformable;return t.localDirtyFlag||t.dirtyFlag?(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.internalUpdateTransform(e),t.worldTransform):t.worldTransform}},{key:"setPosition",value:function(e,t){var n,r=e.transformable;if(ka[0]=t[0],ka[1]=t[1],ka[2]=null!==(n=t[2])&&void 0!==n?n:0,!Ee(this.getPosition(e),ka)){if(de(r.position,ka),null!==e.parentNode&&e.parentNode.transformable){var A=e.parentNode.transformable;b(Na,A.worldTransform),R(Na,Na),we(r.localPosition,ka,Na)}else de(r.localPosition,ka);this.dirtyLocalTransform(e,r)}}},{key:"translate",value:function(e,t){"number"==typeof t&&(t=fe(La,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0)),Ee(t,Ta)||(pe(La,this.getPosition(e),t),this.setPosition(e,La))}},{key:"setRotation",value:function(e,t,n,r,A){var i=e.transformable;if("number"==typeof t&&(t=He(t,n,r,A)),null!==e.parentNode&&e.parentNode.transformable){var o=this.getRotation(e.parentNode);Oe(Ua,o),Re(Ua,Ua),Ue(i.localRotation,Ua,t),_e(i.localRotation,i.localRotation),this.dirtyLocalTransform(e,i)}else this.setLocalRotation(e,t)}},{key:"rotate",value:function(e,t){"number"==typeof t&&(t=he(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var n=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){var r=Ua;Me(r,t[0],t[1],t[2]);var A=this.getRotation(e),i=this.getRotation(e.parentNode);Oe(Pa,i),Re(Pa,Pa),Ue(r,Pa,r),Ue(n.localRotation,r,A),_e(n.localRotation,n.localRotation),this.dirtyLocalTransform(e,n)}else this.rotateLocal(e,t)}},{key:"setOrigin",value:function(e,t){"number"==typeof t&&(t=[t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0]);var n=e.transformable;if(t[0]!==n.origin[0]||t[1]!==n.origin[1]||t[2]!==n.origin[2]){var r=n.origin;r[0]=t[0],r[1]=t[1],r[2]=t[2]||0,this.dirtyLocalTransform(e,n)}}},{key:"setEulerAngles",value:function(e,t){"number"==typeof t&&(t=he(t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0));var n=e.transformable;if(null!==e.parentNode&&e.parentNode.transformable){Me(n.localRotation,t[0],t[1],t[2]);var r=this.getRotation(e.parentNode);Oe(_a,Re(Ua,r)),Ne(n.localRotation,n.localRotation,_a),this.dirtyLocalTransform(e,n)}else this.setLocalEulerAngles(e,t)}},{key:"getGeometryBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.geometry;return n.dirty&&ja.styleValueRegistry.updateGeometry(e),(t?n.renderBounds:n.contentBounds||null)||new Nn}},{key:"getTransformedGeometryBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=this.getGeometryBounds(e,t);if(!Nn.isEmpty(r)){var A=n||new Nn;return A.setFromTransformedAABB(r,this.getWorldTransform(e)),A}return null}},{key:"getBounds",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e.renderable;if(!r.boundsDirty&&!n&&r.bounds)return r.bounds;if(!r.renderBoundsDirty&&n&&r.renderBounds)return r.renderBounds;var A=n?r.renderBounds:r.bounds,i=this.getTransformedGeometryBounds(e,n,A);if(e.childNodes.forEach((function(e){var r=t.getBounds(e,n);r&&(i?i.add(r):(i=A||new Nn).update(r.center,r.halfExtents))})),i||(i=new Nn),n){var o=fo(e);if(o){var a=o.parsedStyle.clipPath.getBounds(n);i?a&&(i=a.intersection(i)):i.update(a.center,a.halfExtents)}}return n?(r.renderBounds=i,r.renderBoundsDirty=!1):(r.bounds=i,r.boundsDirty=!1),i}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var t=ba;e.parentNode.transformable&&(t=R(Qa,this.getWorldTransform(e.parentNode)));var n=this.getBounds(e);if(!Nn.isEmpty(n)){var r=new Nn;return r.setFromTransformedAABB(n,t),r}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var t,n,r=this.getGeometryBounds(e);Nn.isEmpty(r)||(n=new Nn).setFromTransformedAABB(r,this.getWorldTransform(e));var A=null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t?void 0:t.getContextService().getBoundingClientRect();if(n){var i=y(n.getMin(),2),o=i[0],a=i[1],s=y(n.getMax(),2),l=s[0],u=s[1];return new Kn(o+((null==A?void 0:A.left)||0),a+((null==A?void 0:A.top)||0),l-o,u-a)}return new Kn((null==A?void 0:A.left)||0,(null==A?void 0:A.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(e){var t,n=null===(t=e.parentNode)||void 0===t?void 0:t.transformable;Br(e.transformable),function(e,t){e.dirtyFlag&&(t?H(e.worldTransform,t.worldTransform,e.localTransform):b(e.worldTransform,e.localTransform),e.dirtyFlag=!1)}(e.transformable,n)}},{key:"internalUpdateElement",value:function(e,t){var n,r,A,i,o,a,s=!0===(null===(n=e.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n||null===(n=n.getConfig())||void 0===n||null===(n=n.future)||void 0===n?void 0:n.experimentalAttributeUpdateOptimization),l=t[t.length-1],u=(null==l?void 0:l.transformDirty)||(null===(r=e.transformable)||void 0===r?void 0:r.localDirtyFlag);e.transformable&&((o=e.transformable).dirtyFlag||(o.dirtyFlag=u));(this.internalUpdateTransform(e),u)&&(null===(a=e.dirty)||void 0===a||a.call(e,!0,!0));var c=(null===(A=e.renderable)||void 0===A?void 0:A.boundsDirty)||(null===(i=e.renderable)||void 0===i?void 0:i.renderBoundsDirty);if((u||c)&&!1===(null==l?void 0:l.shapeUpdated)&&s)for(var h=t.length-1;h>=0;){var d,f,p=t[h];if(p.shapeUpdated)break;null===(d=(f=p.node).dirty)||void 0===d||d.call(f,!0,!0),p.shapeUpdated=!0,h-=1}return u}},{key:"syncHierarchy",value:function(e){for(var t,n,r=[e],A=e.parentNode?[{node:e.parentNode,transformDirty:(null===(t=e.parentNode.transformable)||void 0===t?void 0:t.localDirtyFlag)||(null===(n=e.parentNode.transformable)||void 0===n?void 0:n.dirtyFlag),shapeUpdated:!1}]:[];r.length>0;){for(var i=r.pop(),o=A[A.length-1];A.length>0&&i.parentNode!==o.node;)o=A.pop();var a=this.internalUpdateElement(i,A);if(i.childNodes.length>0){for(var s=i.childNodes.length-1;s>=0;s--)r.push(i.childNodes[s]);A.push({node:i,transformDirty:a,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(e,t){yo(e)||t.localDirtyFlag||(t.localDirtyFlag=!0,t.dirtyFlag||this.dirtyWorldTransform(e,t))}},{key:"dirtyWorldTransform",value:function(e,t){this.dirtyWorldInternal(e,t),this.dirtyToRoot(e,!0)}},{key:"dirtyWorldInternal",value:function(e,t){var n,r=this,A=!0===(null===(n=e.ownerDocument)||void 0===n||null===(n=n.defaultView)||void 0===n||null===(n=n.getConfig())||void 0===n||null===(n=n.future)||void 0===n?void 0:n.experimentalAttributeUpdateOptimization);t.dirtyFlag||(t.dirtyFlag=!0,e.dirty(!0,!0),A||e.childNodes.forEach((function(e){var t=e.transformable;r.dirtyWorldInternal(e,t)})))}},{key:"dirtyToRoot",value:function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e,A=!0===(null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig())||void 0===t||null===(t=t.future)||void 0===t?void 0:t.experimentalAttributeUpdateOptimization);r;){var i,o;if(null===(i=(o=r).dirty)||void 0===i||i.call(o,!0,!0),A)break;r=r.parentNode}n&&e.forEach((function(e){var t;null===(t=e.dirty)||void 0===t||t.call(e,!0,!0)})),this.informDependentDisplayObjects(e);var a=e.mutations||[],s=a.find((function(e){return"attributes"===e.type&&e._boundsChangeData}));s?s._boundsChangeData={affectChildren:s._boundsChangeData.affectChildren||n}:(s={type:"attributes",target:e,_boundsChangeData:{affectChildren:n}},a.push(s)),e.mutations=a}},{key:"dirtyFragment",value:function(e){var t,n,r=e.transformable;r&&(r.dirtyFlag=!0,r.localDirtyFlag=!0),null===(t=(n=e).dirty)||void 0===t||t.call(n,!0,!0);for(var A=e.childNodes.length,i=0;i<A;i++)this.dirtyFragment(e.childNodes[i])}},{key:"notifyMutationObservers",value:function(e){var t=new Set;if(e.getRoot().forEach((function(e){(e.mutations||[]).forEach((function(n){"attributes"===n.type&&n._boundsChangeData&&(n._boundsChangeData.affectChildren?e.forEach((function(e){var r=i({},n);r.target=e,t.add(r)})):t.add(n))})),e.mutations=void 0})),t.size>0){var n=new ua(Ca.BOUNDS_CHANGED,{detail:Array.from(t)});e.dispatchEvent(n,!0,!0)}}},{key:"updateDisplayObjectDependency",value:function(e,t,n,r){if(t&&t!==n){var A=this.displayObjectDependencyMap.get(t);if(A&&A[e]){var i=A[e].indexOf(r);A[e].splice(i,1)}}if(n){var o=this.displayObjectDependencyMap.get(n);o||(this.displayObjectDependencyMap.set(n,{}),o=this.displayObjectDependencyMap.get(n)),o[e]||(o[e]=[]),o[e].push(r)}}},{key:"informDependentDisplayObjects",value:function(e){var t,n=this,r=this.displayObjectDependencyMap.get(e);if(r){var A=null===(t=e.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig())||void 0===t||null===(t=t.future)||void 0===t?void 0:t.experimentalCancelEventPropagation;Object.keys(r).forEach((function(e){r[e].forEach((function(t){n.dirtyToRoot(t,!0),t.dispatchEvent(new Ba(Ca.ATTR_MODIFIED,t,n,n,e,Ba.MODIFICATION,n,n),A,A),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)}))}))}}}])}(),Ka=function(){return s((function e(t){if(o(this,e),t<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=t,this.cache=new Map}),[{key:"get",value:function(e){if(this.cache.has(e)){var t=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,t),t}}},{key:"put",value:function(e,t){if(this.cache.has(e)&&this.cache.delete(e),this.cache.set(e,t),this.cache.size>this.capacity){var n=this.cache.keys().next().value;this.cache.delete(n)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])}(),za={MetricsString:"|ÉqÅ",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]},Va=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Wa=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜！＂％＇），．：；？！］｝～]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜！），．：；？︶︸︺︼︾﹀﹂﹗］｜｝､]/.source,"|").concat(/[)\]｝〕〉》」』】〙〗〟'"｠»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕！％），．：；？］｝]/.source)),Xa=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛＄（．［｛￡￥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛（｛︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([｛〔〈《「『【〘〖〝'"｟«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔＄（［｛｠￥￦#]/.source)),Ya=function(){return s((function e(t){var n=this;o(this,e),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(e,t){return!n.isBreakingSpace(t)&&!(!e||!Xa.exec(t)&&!Wa.exec(e))},this.trimByKinsokuShorui=function(e){var t=c(e),n=t[t.length-2];if(!n)return e;var r=n[n.length-1];return t[t.length-2]=n.slice(0,-1),t[t.length-1]=r+t[t.length-1],t},this.runtime=t,this.charWidthCache=new Ka(100)}),[{key:"measureFont",value:function(e,t){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(t),A=this.runtime.offscreenCanvasCreator.getOrCreateContext(t,{willReadFrequently:!0});A.font=e;var i=za.MetricsString+za.BaselineSymbol,o=Math.ceil(A.measureText(i).width),a=Math.ceil(A.measureText(za.BaselineSymbol).width),s=za.HeightMultiplier*a;a=a*za.BaselineMultiplier|0,r.width=o,r.height=s,A.fillStyle="#f00",A.fillRect(0,0,o,s),A.font=e,A.textBaseline="alphabetic",A.fillStyle="#000",A.fillText(i,0,a);var l=A.getImageData(0,0,o||1,s||1).data,u=l.length,c=4*o,h=0,d=0,f=!1;for(h=0;h<a;++h){for(var p=0;p<c;p+=4)if(255!==l[d+p]){f=!0;break}if(f)break;d+=c}for(n.ascent=a-h,d=u-c,f=!1,h=s;h>a;--h){for(var g=0;g<c;g+=4)if(255!==l[d+g]){f=!0;break}if(f)break;d-=c}return n.descent=h-a,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[e]=n,n}},{key:"measureText",value:function(e,t,n){var r=t.fontSize,A=void 0===r?16:r,i=t.wordWrap,o=void 0!==i&&i,a=t.lineHeight,s=t.lineWidth,l=void 0===s?1:s,u=t.textBaseline,c=void 0===u?"alphabetic":u,h=t.textAlign,d=void 0===h?"start":h,f=t.letterSpacing,p=void 0===f?0:f,g=t.textPath;t.textPathSide,t.textPathStartOffset;var v=t.leading,y=void 0===v?0:v,C=No(t),B=this.measureFont(C,n);0===B.fontSize&&(B.fontSize=A,B.ascent=A);var m=this.runtime.offscreenCanvasCreator.getOrCreateContext(n);m.font=C,t.isOverflowing=!1;var w=(o?this.wordWrap(e,t,n):e).split(/(?:\r\n|\r|\n)/),E=new Array(w.length),x=0;if(!g){for(var S=0;S<w.length;S++){var T=m.measureText(w[S]).width+(w[S].length-1)*p;E[S]=T,x=Math.max(x,T)}var F=x+l,b=a||B.fontSize+l,I=Math.max(b,B.fontSize+l)+(w.length-1)*(b+y),L=0;return"middle"===c?L=-I/2:"bottom"===c||"alphabetic"===c||"ideographic"===c?L=-I:"top"!==c&&"hanging"!==c||(L=0),{font:C,width:F,height:I,lines:w,lineWidths:E,lineHeight:b+=y,maxLineWidth:x,fontProperties:B,lineMetrics:E.map((function(e,t){var n=0;return"center"===d||"middle"===d?n-=e/2:"right"!==d&&"end"!==d||(n-=e),new Kn(n-l/2,L+t*b,e+l,b)}))}}g.getTotalLength();for(var Q=0;Q<w.length;Q++)m.measureText(w[Q]).width,w[Q].length}},{key:"wordWrap",value:function(e,t,n){var r=this,A=Array.from(e);if(0===A.length)return"";var i=this,o=t.wordWrapWidth,a=void 0===o?0:o,s=t.letterSpacing,l=void 0===s?0:s,u=t.maxLines,c=void 0===u?1/0:u,h=t.textOverflow,d=this.runtime.offscreenCanvasCreator.getOrCreateContext(n),f=a+l,p="";"ellipsis"===h?p="...":h&&"clip"!==h&&(p=h);var g=[""],v=0,y=0,C=-1,B=No(t),m=this.charWidthCache.get(B);m||(m=new Ka(500),this.charWidthCache.put(B,m));var w=function(e){return r.getFromCache(e,l,m,d)},E=w(p);function x(e,t,n,r){for(;w(e)<r&&t<A.length-1&&!i.isNewline(A[t+1]);)e+=A[t+=1];for(;w(e)>r&&t>=n;)t-=1,e=e.slice(0,-1);return{lineTxt:e,txtLastCharIndex:t}}function S(e,t){if(!(E<=0||E>f))if(g[e]){var n=x(g[e],t,C+1,f-E);g[e]=n.lineTxt+p}else g[e]=p}for(var T=0;T<A.length;T++){var F=A[T],b=A[T-1],I=A[T+1],L=w(F);if(this.isNewline(F)){if(v+1>=c){T<A.length-1&&S(v,T-1),t.isOverflowing=!0;break}C=T-1,y=0,g[v+=1]=""}else{if(L>f){S(v,T-1),t.isOverflowing=!0;break}if(y>0&&y+L>f){var Q=x(g[v],T-1,C+1,f);if(Q.txtLastCharIndex!==T-1){if(g[v]=Q.lineTxt,Q.txtLastCharIndex===A.length-1)break;T=Q.txtLastCharIndex+1,F=A[T],b=A[T-1],I=A[T+1],L=w(F)}if(v+1>=c){S(v,T-1),t.isOverflowing=!0;break}if(C=T-1,y=0,g[v+=1]="",this.isBreakingSpace(F))continue;this.canBreakInLastChar(F)||(g=this.trimToBreakable(g),y=this.sumTextWidthByCache(g[v]||"",w)),this.shouldBreakByKinsokuShorui(F,I)&&(g=this.trimByKinsokuShorui(g),y+=w(b||""))}y+=L,g[v]+=F}}return g.join("\n")}},{key:"isBreakingSpace",value:function(e){return"string"==typeof e&&za.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return"string"==typeof e&&za.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var t=c(e),n=t[t.length-2],r=this.findBreakableIndex(n);if(-1===r||!n)return t;var A=n.slice(r,r+1),i=r+1,o=r+(this.isBreakingSpace(A)?0:1);return t[t.length-1]+=n.slice(i,n.length),t[t.length-2]=n.slice(0,o),t}},{key:"canBreakInLastChar",value:function(e){return!e||!Va.test(e)}},{key:"sumTextWidthByCache",value:function(e,t){return e.split("").reduce((function(e,n){return e+t(n)}),0)}},{key:"findBreakableIndex",value:function(e){for(var t=e.length-1;t>=0;t--)if(!Va.test(e[t]))return t;return-1}},{key:"getFromCache",value:function(e,t,n,r){var A=n.get(e);if("number"!=typeof A){var i=e.length*t;A=r.measureText(e).width+i,n.put(e,A)}return A}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])}(),ja={},Za=(wa=new na,Ea=new ta,r(r(r(r(r(r(r(r(r(r(ma={},bn.FRAGMENT,null),bn.CIRCLE,new Jo),bn.ELLIPSE,new qo),bn.RECT,wa),bn.IMAGE,wa),bn.GROUP,new Aa),bn.LINE,new $o),bn.TEXT,new ra(ja)),bn.POLYLINE,Ea),bn.POLYGON,Ea),r(r(r(ma,bn.PATH,new ea),bn.HTML,new ia),bn.MESH,null)),Ja=function(e){var t=new Yi,n=new Ji;return r(r(r(r(r(r(r(r(r(r(e={},wr.PERCENTAGE,null),wr.NUMBER,new to),wr.ANGLE,new Wi),wr.DEFINED_PATH,new Xi),wr.PAINT,t),wr.COLOR,t),wr.FILTER,new ji),wr.LENGTH,n),wr.LENGTH_PERCENTAGE,n),wr.LENGTH_PERCENTAGE_12,new qi),r(r(r(r(r(r(r(r(r(r(e,wr.LENGTH_PERCENTAGE_14,new $i),wr.COORDINATE,new Ji),wr.OFFSET_DISTANCE,new no),wr.OPACITY_VALUE,new ro),wr.PATH,new Ao),wr.LIST_OF_POINTS,new io),wr.SHADOW_BLUR,new oo),wr.TEXT,new ao),wr.TEXT_TRANSFORM,new so),wr.TRANSFORM,new Yo),r(r(r(e,wr.TRANSFORM_ORIGIN,new jo),wr.Z_INDEX,new Zo),wr.MARKER,new eo)}();ja.CameraContribution=fr,ja.AnimationTimeline=null,ja.EasingFunction=null,ja.offscreenCanvasCreator=new fa,ja.sceneGraphSelector=new ya,ja.sceneGraphService=new Ga(ja),ja.textService=new Ya(ja),ja.geometryUpdaterFactory=Za,ja.CSSPropertySyntaxFactory=Ja,ja.styleValueRegistry=new zi(ja),ja.layoutRegistry=null,ja.globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},ja.enableStyleSyntax=!0,ja.enableSizeAttenuation=!1;var qa=0,$a=new Ba(Ca.INSERTED,null,"","","",0,"",""),es=new Ba(Ca.REMOVED,null,"","","",0,"",""),ts=new ua(Ca.DESTROY),ns=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).entity=qa++,e.transformable={dirtyFlag:!1,localDirtyFlag:!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.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.cullable={strategy:pr.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return v(t,e),s(t,[{key:"dirty",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;this.renderable.dirty=e,void 0!==t&&(this.renderable.boundsDirty=t,this.renderable.renderBoundsDirty=t,this.geometry.dirty=t)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(e){this.setAttribute("class",e)}},{key:"classList",get:function(){return this.className.split(" ").filter((function(e){return""!==e}))}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var e=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[e+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var e=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[e-1]||null}return null}},{key:"cloneNode",value:function(e){throw new Error(zn)}},{key:"appendChild",value:function(e,t){var n;if(e.destroyed)throw new Error("Cannot append a destroyed element.");return ja.sceneGraphService.attach(e,this,t),null!==(n=this.ownerDocument)&&void 0!==n&&n.defaultView&&(yo(this)||e.nodeName!==bn.FRAGMENT?this.ownerDocument.defaultView.mountChildren(e):this.ownerDocument.defaultView.mountFragment(e)),this.isMutationObserved&&($a.relatedNode=this,e.dispatchEvent($a)),e}},{key:"insertBefore",value:function(e,t){if(t){e.parentElement&&e.parentElement.removeChild(e);var n=this.childNodes.indexOf(t);-1===n?this.appendChild(e):this.appendChild(e,n)}else this.appendChild(e);return e}},{key:"replaceChild",value:function(e,t){var n=this.childNodes.indexOf(t);return this.removeChild(t),this.appendChild(e,n),t}},{key:"removeChild",value:function(e){var t,n,r=!0===(null===(t=this.ownerDocument)||void 0===t||null===(t=t.defaultView)||void 0===t||null===(t=t.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation);return es.relatedNode=this,e.dispatchEvent(es,r,r),null!==(n=e.ownerDocument)&&void 0!==n&&n.defaultView&&e.ownerDocument.defaultView.unmountChildren(e),ja.sceneGraphService.detach(e),e}},{key:"removeChildren",value:function(){for(var e=this.childNodes.length-1;e>=0;e--){var t=this.childNodes[e];this.removeChild(t)}}},{key:"destroyChildren",value:function(){for(var e=this.childNodes.length-1;e>=0;e--){var t=this.childNodes[e];t.childNodes.length>0&&t.destroyChildren(),t.destroy()}}},{key:"matches",value:function(e){return ja.sceneGraphService.matches(e,this)}},{key:"getElementById",value:function(e){return ja.sceneGraphService.querySelector("#".concat(e),this)}},{key:"getElementsByName",value:function(e){return ja.sceneGraphService.querySelectorAll('[name="'.concat(e,'"]'),this)}},{key:"getElementsByClassName",value:function(e){return ja.sceneGraphService.querySelectorAll(".".concat(e),this)}},{key:"getElementsByTagName",value:function(e){return ja.sceneGraphService.querySelectorAll(e,this)}},{key:"querySelector",value:function(e){return ja.sceneGraphService.querySelector(e,this)}},{key:"querySelectorAll",value:function(e){return ja.sceneGraphService.querySelectorAll(e,this)}},{key:"closest",value:function(e){var t=this;do{if(ja.sceneGraphService.matches(e,t))return t;t=t.parentElement}while(null!==t);return null}},{key:"find",value:function(e){var t=this,n=null;return this.forEach((function(r){return r===t||!e(r)||(n=r,!1)})),n}},{key:"findAll",value:function(e){var t=this,n=[];return this.forEach((function(r){r!==t&&e(r)&&n.push(r)})),n}},{key:"after",value:function(){var e=this;if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];r.forEach((function(n,r){var A;return null===(A=e.parentNode)||void 0===A?void 0:A.appendChild(n,t+r+1)}))}}},{key:"before",value:function(){if(this.parentNode){for(var e,t=this.parentNode.childNodes.indexOf(this),n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];var i=r[0],o=l(r).slice(1);this.parentNode.appendChild(i,t),(e=i).after.apply(e,c(o))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t){return e.appendChild(t)}))}},{key:"prepend",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach((function(t,n){return e.appendChild(t,n)}))}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var e,t=!0===(null===(e=this.ownerDocument)||void 0===e||null===(e=e.defaultView)||void 0===e||null===(e=e.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation);this.destroyChildren(),this.dispatchEvent(ts,t,t),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ja.sceneGraphService.getGeometryBounds(this,e)}},{key:"getTransformedGeometryBounds",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return ja.sceneGraphService.getTransformedGeometryBounds(this,e)}},{key:"getBounds",value:function(){return ja.sceneGraphService.getBounds(this)}},{key:"getRenderBounds",value:function(){return ja.sceneGraphService.getBounds(this,!0)}},{key:"getLocalBounds",value:function(){return ja.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return ja.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(e){if("symbol"!=typeof e){var t=this.attributes[e];return t}}},{key:"hasAttribute",value:function(e){return this.getAttributeNames().includes(e)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(e){this.setAttribute(e,null),delete this.attributes[e]}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"getAttributeNS",value:function(e,t){throw new Error(zn)}},{key:"getAttributeNode",value:function(e){throw new Error(zn)}},{key:"getAttributeNodeNS",value:function(e,t){throw new Error(zn)}},{key:"hasAttributeNS",value:function(e,t){throw new Error(zn)}},{key:"removeAttributeNS",value:function(e,t){throw new Error(zn)}},{key:"removeAttributeNode",value:function(e){throw new Error(zn)}},{key:"setAttributeNS",value:function(e,t,n){throw new Error(zn)}},{key:"setAttributeNode",value:function(e){throw new Error(zn)}},{key:"setAttributeNodeNS",value:function(e){throw new Error(zn)}},{key:"toggleAttribute",value:function(e,t){throw new Error(zn)}}])}(ha);function rs(e){return!(null==e||!e.nodeName)}var As=ja.globalThis.Proxy?ja.globalThis.Proxy:function(){},is=new Ba(Ca.ATTR_MODIFIED,null,null,null,null,Ba.MODIFICATION,null,null),os=le(),as=Le(),ss=function(e){function t(e){var n;return o(this,t),(n=p(this,t)).isCustomElement=!1,n.isMutationObserved=!1,n.activeAnimations=[],n.config=e,n.id=e.id||"",n.name=e.name||"",(e.className||e.class)&&(n.className=e.className||e.class),n.nodeName=e.type||bn.GROUP,e.initialParsedStyle&&Object.assign(n.parsedStyle,e.initialParsedStyle),n.initAttributes(e.style),ja.enableStyleSyntax&&(n.style=new As({setProperty:function(e,t){n.setAttribute(e,t)},getPropertyValue:function(e){return n.getAttribute(e)},removeProperty:function(e){n.removeAttribute(e)},item:function(){return""}},{get:function(e,t){return void 0!==e[t]?e[t]:n.getAttribute(t)},set:function(e,t,r){return n.setAttribute(t,r),!0}})),n}return v(t,e),s(t,[{key:"destroy",value:function(){Yt(t,"destroy",this)([]),this.getAnimations().forEach((function(e){e.cancel()}))}},{key:"cloneNode",value:function(e,t){var n=i({},this.attributes);for(var r in n){var A=n[r];rs(A)&&"clipPath"!==r&&"offsetPath"!==r&&"textPath"!==r&&(n[r]=A.cloneNode(e)),t&&(n[r]=t(r,A))}var o=new this.constructor(i(i({},this.config),{},{style:n}));return o.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach((function(t){if(!t.style.isMarker){var n=t.cloneNode(e);o.appendChild(n)}})),o}},{key:"initAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ja.styleValueRegistry.processProperties(this,e,{forceUpdateGeometry:!0}),this.dirty()}},{key:"setAttribute",value:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],A=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];et(n)||(r||n!==this.attributes[e])&&(this.internalSetAttribute(e,n,{memoize:A}),Yt(t,"setAttribute",this)([e,n]))}},{key:"setAttributes",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},A=r.skipDispatchAttrModifiedEvent,o=void 0!==A&&A;if(o||(t=i({},this.attributes),n=i({},this.parsedStyle)),ja.styleValueRegistry.processProperties(this,e,r),this.dirty(),!o)for(var a in e)this.dispatchAttrModifiedEvent(a,t[a],e[a],n[a])}},{key:"internalSetAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},A=this.attributes[e],i=this.parsedStyle[e];ja.styleValueRegistry.processProperties(this,r({},e,t),n),this.dirty(),this.dispatchAttrModifiedEvent(e,A,t,i)}},{key:"dispatchAttrModifiedEvent",value:function(e,t,n,r){var A,i=this.parsedStyle[e];if(this.isConnected)if(is.relatedNode=this,is.prevValue=t,is.newValue=n,is.attrName=e,is.prevParsedValue=r,is.newParsedValue=i,this.isMutationObserved)this.dispatchEvent(is);else{var o,a=!0===(null===(o=this.ownerDocument.defaultView.getConfig().future)||void 0===o?void 0:o.experimentalCancelEventPropagation);is.target=this,this.ownerDocument.defaultView.dispatchEvent(is,!0,a)}(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&(null===(A=this.attributeChangedCallback)||void 0===A||A.call(this,e,t,n,r,i))}},{key:"getBBox",value:function(){var e=this.getBounds(),t=y(e.getMin(),2),n=t[0],r=t[1],A=y(e.getMax(),2),i=A[0],o=A[1];return new Kn(n,r,i-n,o-r)}},{key:"setOrigin",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ja.sceneGraphService.setOrigin(this,Yn(e,t,n,!1)),this}},{key:"getOrigin",value:function(){return ja.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ja.sceneGraphService.setPosition(this,Yn(e,t,n,!1)),this}},{key:"setLocalPosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ja.sceneGraphService.setLocalPosition(this,Yn(e,t,n,!1)),this}},{key:"translate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ja.sceneGraphService.translate(this,Yn(e,t,n,!1)),this}},{key:"translateLocal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return ja.sceneGraphService.translateLocal(this,Yn(e,t,n,!1)),this}},{key:"getPosition",value:function(){return ja.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return ja.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(e,t,n){return this.scaleLocal(e,t,n)}},{key:"scaleLocal",value:function(e,t,n){return"number"==typeof e&&(e=Yn(e,t=t||e,n=n||e,!1)),ja.sceneGraphService.scaleLocal(this,e),this}},{key:"setLocalScale",value:function(e,t,n){return"number"==typeof e&&(e=Yn(e,t=t||e,n=n||e,!1)),ja.sceneGraphService.setLocalScale(this,e),this}},{key:"getLocalScale",value:function(){return ja.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return ja.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){return qn(y(er(os,ja.sceneGraphService.getWorldTransform(this)),3)[2])}},{key:"getLocalEulerAngles",value:function(){return qn(y(er(os,ja.sceneGraphService.getLocalRotation(this)),3)[2])}},{key:"setEulerAngles",value:function(e){return ja.sceneGraphService.setEulerAngles(this,0,0,e),this}},{key:"setLocalEulerAngles",value:function(e){return ja.sceneGraphService.setLocalEulerAngles(this,0,0,e),this}},{key:"rotateLocal",value:function(e,t,n){return Ge(t)&&Ge(n)?ja.sceneGraphService.rotateLocal(this,0,0,e):ja.sceneGraphService.rotateLocal(this,e,t,n),this}},{key:"rotate",value:function(e,t,n){return Ge(t)&&Ge(n)?ja.sceneGraphService.rotate(this,0,0,e):ja.sceneGraphService.rotate(this,e,t,n),this}},{key:"setRotation",value:function(e,t,n,r){return ja.sceneGraphService.setRotation(this,e,t,n,r),this}},{key:"setLocalRotation",value:function(e,t,n,r){return ja.sceneGraphService.setLocalRotation(this,e,t,n,r),this}},{key:"setLocalSkew",value:function(e,t){return ja.sceneGraphService.setLocalSkew(this,e,t),this}},{key:"getRotation",value:function(){return ja.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return ja.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return ja.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return ja.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return ja.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(e){return ja.sceneGraphService.setLocalTransform(this,e),this}},{key:"resetLocalTransform",value:function(){ja.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(e,t){var n,r=null===(n=this.ownerDocument)||void 0===n?void 0:n.timeline;return r?r.play(this,e,t):null}},{key:"isVisible",value:function(){var e;return"hidden"!==(null===(e=this.parsedStyle)||void 0===e?void 0:e.visibility)}},{key:"interactive",get:function(){return this.isInteractive()},set:function(e){this.style.pointerEvents=e?"auto":"none"}},{key:"isInteractive",value:function(){var e;return"none"!==(null===(e=this.parsedStyle)||void 0===e?void 0:e.pointerEvents)}},{key:"isCulled",value:function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,c(this.parentNode.children.map((function(e){return Number(e.style.zIndex)}))))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,c(this.parentNode.children.map((function(e){return Number(e.style.zIndex)}))))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var A=n[0],i=n[1];return A?function(e){var t=typeof e;return null!==e&&"object"===t||"function"===t}(A)?(Object.keys(A).forEach((function(t){e.setAttribute(t,A[t])})),this):2===n.length?(this.setAttribute(A,i),this):this.attributes[A]:this.attributes}},{key:"getMatrix",value:function(e){var t=e||this.getWorldTransform(),n=y(X(os,t),2),r=n[0],A=n[1],i=y(Y(os,t),2),o=i[0],a=i[1],s=j(as,t),l=y(er(os,s),3),u=l[0],c=l[2];return tr(u||c,r,A,o,a)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(e){var t=y(nr(e),5),n=t[0],r=t[1],A=t[2],i=t[3],o=t[4];this.setEulerAngles(o).setPosition(n,r).setLocalScale(A,i)}},{key:"setLocalMatrix",value:function(e){var t=y(nr(e),5),n=t[0],r=t[1],A=t[2],i=t[3],o=t[4];this.setLocalEulerAngles(o).setLocalPosition(n,r).setLocalScale(A,i)}},{key:"show",value:function(){this.forEach((function(e){e.style.visibility="visible"}))}},{key:"hide",value:function(){this.forEach((function(e){e.style.visibility="hidden"}))}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(e){return this.children[e]||null}},{key:"add",value:function(e,t){return this.appendChild(e,t)}},{key:"set",value:function(e,t){this.config[e]=t}},{key:"get",value:function(e){return this.config[e]}},{key:"moveTo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(e,t,n),this}},{key:"move",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.setPosition(e,t,n),this}},{key:"setZIndex",value:function(e){return this.style.zIndex=e,this}}])}(ns);ss.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var ls=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),p(this,t,[i({type:bn.CIRCLE},e)])}return v(t,e),s(t)}(ss);ls.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var us=["style"],cs=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,A=Fn(n,us);return o(this,t),(e=p(this,t,[i({style:r},A)])).isCustomElement=!0,e}return v(t,e),s(t)}(ss);cs.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var hs=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),p(this,t,[i({type:bn.ELLIPSE},e)])}return v(t,e),s(t)}(ss);hs.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"])),(function(e){function t(){return o(this,t),p(this,t,[{type:bn.FRAGMENT}])}return v(t,e),s(t)}(ss)).PARSED_STYLE_LIST=new Set(["class","className"]);var ds=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),p(this,t,[i({type:bn.GROUP},e)])}return v(t,e),s(t)}(ss);ds.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var fs=["style"],ps=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,A=Fn(n,fs);return o(this,t),(e=p(this,t,[i({type:bn.HTML,style:r},A)])).cullable.enable=!1,e}return v(t,e),s(t,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var e=R(T(),this.parentNode.getWorldTransform()),t=this.getBounds();if(!Nn.isEmpty(t)){var n=new Nn;return n.setFromTransformedAABB(t,e),n}}return this.getBounds()}}])}(ss);ps.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var gs=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),p(this,t,[i({type:bn.IMAGE},e)])}return v(t,e),s(t)}(ss);gs.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var vs=["style"],ys=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,A=Fn(n,vs);o(this,t),(e=p(this,t,[i({type:bn.LINE,style:i({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},r)},A)])).markerStartAngle=0,e.markerEndAngle=0;var a=e.parsedStyle,s=a.markerStart,l=a.markerEnd;return s&&rs(s)&&(e.markerStartAngle=s.getLocalEulerAngles(),e.appendChild(s)),l&&rs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return v(t,e),s(t,[{key:"attributeChangedCallback",value:function(e,t,n,r,A){"x1"===e||"y1"===e||"x2"===e||"y2"===e||"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(r&&rs(r)&&(this.markerStartAngle=0,r.remove()),A&&rs(A)&&(this.markerStartAngle=A.getLocalEulerAngles(),this.appendChild(A),this.transformMarker(!0))):"markerEnd"===e&&(r&&rs(r)&&(this.markerEndAngle=0,r.remove()),A&&rs(A)&&(this.markerEndAngle=A.getLocalEulerAngles(),this.appendChild(A),this.transformMarker(!1)))}},{key:"transformMarker",value:function(e){var t=this.parsedStyle,n=t.markerStart,r=t.markerEnd,A=t.markerStartOffset,i=t.markerEndOffset,o=t.x1,a=t.x2,s=t.y1,l=t.y2,u=e?n:r;if(u&&rs(u)){var c,h,d,f,p,g,v;e?(f=o,p=s,h=a-o,d=l-s,g=A||0,v=this.markerStartAngle):(f=a,p=l,h=o-a,d=s-l,g=i||0,v=this.markerEndAngle),c=Math.atan2(d,h),u.setLocalEulerAngles(180*c/Math.PI+v),u.setLocalPosition(f+Math.cos(c)*g,p+Math.sin(c)*g)}}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle,r=rn(n.x1,n.y1,n.x2,n.y2,e),A=r.x,i=r.y,o=we(le(),he(A,i,0),t?this.getWorldTransform():this.getLocalTransform());return new Gn(o[0],o[1])}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(e/this.getTotalLength(),t)}},{key:"getTotalLength",value:function(){var e=this.parsedStyle;return nn(e.x1,e.y1,e.x2,e.y2)}}])}(ss);ys.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var Cs=["style"],Bs=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,A=Fn(n,Cs);o(this,t),(e=p(this,t,[i({type:bn.PATH,style:r,initialParsedStyle:{miterLimit:4,d:i({},mr)}},A)])).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var a=e.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerMid;return s&&rs(s)&&(e.markerStartAngle=s.getLocalEulerAngles(),e.appendChild(s)),u&&rs(u)&&e.placeMarkerMid(u),l&&rs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return v(t,e),s(t,[{key:"attributeChangedCallback",value:function(e,t,n,r,A){"d"===e?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(r&&rs(r)&&(this.markerStartAngle=0,r.remove()),A&&rs(A)&&(this.markerStartAngle=A.getLocalEulerAngles(),this.appendChild(A),this.transformMarker(!0))):"markerEnd"===e?(r&&rs(r)&&(this.markerEndAngle=0,r.remove()),A&&rs(A)&&(this.markerEndAngle=A.getLocalEulerAngles(),this.appendChild(A),this.transformMarker(!1))):"markerMid"===e&&this.placeMarkerMid(A)}},{key:"transformMarker",value:function(e){var t=this.parsedStyle,n=t.markerStart,r=t.markerEnd,A=t.markerStartOffset,i=t.markerEndOffset,o=e?n:r;if(o&&rs(o)){var a,s,l,u,c,h,d;if(e){var f=y(this.getStartTangent(),2),p=f[0],g=f[1];u=g[0],c=g[1],s=p[0]-g[0],l=p[1]-g[1],h=A||0,d=this.markerStartAngle}else{var v=y(this.getEndTangent(),2),C=v[0],B=v[1];u=B[0],c=B[1],s=C[0]-B[0],l=C[1]-B[1],h=i||0,d=this.markerEndAngle}a=Math.atan2(l,s),o.setLocalEulerAngles(180*a/Math.PI+d),o.setLocalPosition(u+Math.cos(a)*h,c+Math.sin(a)*h)}}},{key:"placeMarkerMid",value:function(e){var t=this.parsedStyle.d.segments;if(this.markerMidList.forEach((function(e){e.remove()})),e&&rs(e))for(var n=1;n<t.length-1;n++){var r=y(t[n].currentPoint,2),A=r[0],i=r[1],o=1===n?e:e.cloneNode(!0);this.markerMidList.push(o),this.appendChild(o),o.setLocalPosition(A,i)}}},{key:"getTotalLength",value:function(){return oi(this)}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(e,t,n){return Gt(e,t,rt(rt({},n),{bbox:!1,length:!0})).point}(this.parsedStyle.d.absolutePath,e),r=n.x,A=n.y,i=we(le(),he(r,A,0),t?this.getWorldTransform():this.getLocalTransform());return new Gn(i[0],i[1])}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPointAtLength(e*oi(this),t)}},{key:"getStartTangent",value:function(){var e=this.parsedStyle.d.segments,t=[];if(e.length>1){var n=e[0].currentPoint,r=e[1].currentPoint,A=e[1].startTangent;t=[],A?(t.push([n[0]-A[0],n[1]-A[1]]),t.push([n[0],n[1]])):(t.push([r[0],r[1]]),t.push([n[0],n[1]]))}return t}},{key:"getEndTangent",value:function(){var e=this.parsedStyle.d.segments,t=e.length,n=[];if(t>1){var r=e[t-2].currentPoint,A=e[t-1].currentPoint,i=e[t-1].endTangent;n=[],i?(n.push([A[0]-i[0],A[1]-i[1]]),n.push([A[0],A[1]])):(n.push([r[0],r[1]]),n.push([A[0],A[1]]))}return n}}])}(ss);Bs.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var ms=["style"],ws=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.style,A=Fn(n,ms);o(this,t),(e=p(this,t,[i({type:bn.POLYGON,style:r,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},A)])).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var a=e.parsedStyle,s=a.markerStart,l=a.markerEnd,u=a.markerMid;return s&&rs(s)&&(e.markerStartAngle=s.getLocalEulerAngles(),e.appendChild(s)),u&&rs(u)&&e.placeMarkerMid(u),l&&rs(l)&&(e.markerEndAngle=l.getLocalEulerAngles(),e.appendChild(l)),e.transformMarker(!0),e.transformMarker(!1),e}return v(t,e),s(t,[{key:"attributeChangedCallback",value:function(e,t,n,r,A){"points"===e?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===e||"markerEndOffset"===e?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===e?(r&&rs(r)&&(this.markerStartAngle=0,r.remove()),A&&rs(A)&&(this.markerStartAngle=A.getLocalEulerAngles(),this.appendChild(A),this.transformMarker(!0))):"markerEnd"===e?(r&&rs(r)&&(this.markerEndAngle=0,r.remove()),A&&rs(A)&&(this.markerEndAngle=A.getLocalEulerAngles(),this.appendChild(A),this.transformMarker(!1))):"markerMid"===e&&this.placeMarkerMid(A)}},{key:"transformMarker",value:function(e){var t=this.parsedStyle,n=t.markerStart,r=t.markerEnd,A=t.markerStartOffset,i=t.markerEndOffset,o=(t.points||{}).points,a=e?n:r;if(a&&rs(a)&&o){var s,l,u,c,h,d,f;if(c=o[0][0],h=o[0][1],e)l=o[1][0]-o[0][0],u=o[1][1]-o[0][1],d=A||0,f=this.markerStartAngle;else{var p=o.length;this.parsedStyle.isClosed?(l=o[p-1][0]-o[0][0],u=o[p-1][1]-o[0][1]):(c=o[p-1][0],h=o[p-1][1],l=o[p-2][0]-o[p-1][0],u=o[p-2][1]-o[p-1][1]),d=i||0,f=this.markerEndAngle}s=Math.atan2(u,l),a.setLocalEulerAngles(180*s/Math.PI+f),a.setLocalPosition(c+Math.cos(s)*d,h+Math.sin(s)*d)}}},{key:"placeMarkerMid",value:function(e){var t=(this.parsedStyle.points||{}).points;if(this.markerMidList.forEach((function(e){e.remove()})),this.markerMidList=[],e&&rs(e)&&t)for(var n=1;n<(this.parsedStyle.isClosed?t.length:t.length-1);n++){var r=t[n][0],A=t[n][1],i=1===n?e:e.cloneNode(!0);this.markerMidList.push(i),this.appendChild(i),i.setLocalPosition(r,A)}}}])}(ss);ws.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Es=["style"],xs=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.style,r=Fn(e,Es);return o(this,t),p(this,t,[i({type:bn.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},r)])}return v(t,e),s(t,[{key:"getTotalLength",value:function(){return 0===(e=this).parsedStyle.points.totalLength&&(e.parsedStyle.points.totalLength=un(e.parsedStyle.points.points)),e.parsedStyle.points.totalLength;var e}},{key:"getPointAtLength",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.getPoint(e/this.getTotalLength(),t)}},{key:"getPoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle.points.points;if(0===this.parsedStyle.points.segments.length){var r,A,i=[],o=0,a=this.getTotalLength();n.forEach((function(e,t){n[t+1]&&((r=[0,0])[0]=o/a,A=nn(e[0],e[1],n[t+1][0],n[t+1][1]),o+=A,r[1]=o/a,i.push(r))})),this.parsedStyle.points.segments=i}var s=0,l=0;this.parsedStyle.points.segments.forEach((function(t,n){e>=t[0]&&e<=t[1]&&(s=(e-t[0])/(t[1]-t[0]),l=n)}));var u=rn(n[l][0],n[l][1],n[l+1][0],n[l+1][1],s),c=u.x,h=u.y,d=we(le(),he(c,h,0),t?this.getWorldTransform():this.getLocalTransform());return new Gn(d[0],d[1])}},{key:"getStartTangent",value:function(){var e=this.parsedStyle.points.points,t=[];return t.push([e[1][0],e[1][1]]),t.push([e[0][0],e[0][1]]),t}},{key:"getEndTangent",value:function(){var e=this.parsedStyle.points.points,t=e.length-1,n=[];return n.push([e[t-1][0],e[t-1][1]]),n.push([e[t][0],e[t][1]]),n}}])}(ws);xs.PARSED_STYLE_LIST=new Set([].concat(c(ws.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Ss=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),p(this,t,[i({type:bn.RECT},e)])}return v(t,e),s(t)}(ss);Ss.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var Ts=["style"],Fs=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.style,r=Fn(e,Ts);return o(this,t),p(this,t,[i({type:bn.TEXT,style:i({fill:"black"},n)},r)])}return v(t,e),s(t,[{key:"getComputedTextLength",value:function(){var e;return this.getGeometryBounds(),(null===(e=this.parsedStyle.metrics)||void 0===e?void 0:e.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var e;return this.getGeometryBounds(),(null===(e=this.parsedStyle.metrics)||void 0===e?void 0:e.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(ss);Fs.PARSED_STYLE_LIST=new Set([].concat(c(ss.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textDecorationThickness","textPathSide","textPathStartOffset","metrics","dx","dy"]));var bs=function(){return s((function e(){o(this,e),this.registry={},this.define(bn.CIRCLE,ls),this.define(bn.ELLIPSE,hs),this.define(bn.RECT,Ss),this.define(bn.IMAGE,gs),this.define(bn.LINE,ys),this.define(bn.GROUP,ds),this.define(bn.PATH,Bs),this.define(bn.POLYGON,ws),this.define(bn.POLYLINE,xs),this.define(bn.TEXT,Fs),this.define(bn.HTML,ps)}),[{key:"define",value:function(e,t){this.registry[e]=t}},{key:"get",value:function(e){return this.registry[e]}}])}(),Is=function(e){var t=e.name,n=e.inherits,r=e.interpolable,A=e.initialValue,i=e.syntax;ja.styleValueRegistry.registerMetadata({n:t,inh:n,int:r,d:A,syntax:i})},Ls=function(e){function t(){var e;o(this,t),(e=p(this,t)).defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new ja.AnimationTimeline(e)}catch(e){}var n={};return Pi.forEach((function(e){var t=e.n,r=e.inh,A=e.d;r&&A&&(n[t]=Pe(A)?A(bn.GROUP):A)})),e.documentElement=new ds({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return v(t,e),s(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(e,t){if("svg"===e)return this.documentElement;var n=this.defaultView.customElements.get(e);n||(console.warn("Unsupported tagName: ",e),n="tspan"===e?Fs:ds);var r=new n(t);return r.ownerDocument=this,r}},{key:"createElementNS",value:function(e,t,n){return this.createElement(t,n)}},{key:"cloneNode",value:function(e){throw new Error(zn)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(e){}}},{key:"elementsFromBBox",value:function(e,t,n,r){var A=[],i=function(o){if(o.isInteractive()&&!o.isCulled()){var a=o.parsedStyle.pointerEvents;if(!["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(void 0===a?"auto":a)||o.isVisible()){var s=o.getTransformedGeometryBounds(!0);s&&!Nn.isEmpty(s)&&s.max[0]>=e&&s.min[0]<=n&&s.max[1]>=t&&s.min[1]<=r&&A.push(o)}o.childNodes&&o.childNodes.forEach((function(e){e instanceof ss&&i(e)}))}};return i(this.documentElement),A.sort((function(e,t){return t.sortable.renderOrder-e.sortable.renderOrder})),A}},{key:"elementFromPointSync",value:function(e,t){var n=this.defaultView.canvas2Viewport({x:e,y:t}),r=n.x,A=n.y,i=this.defaultView.getConfig(),o=i.width,a=i.height;if(r<0||A<0||r>o||A>a)return null;var s=this.defaultView.viewport2Client({x:r,y:A}),l=s.x,u=s.y,c=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:e,y:t,viewportX:r,viewportY:A,clientX:l,clientY:u},picked:[]}).picked;return c&&c[0]||this.documentElement}},{key:"elementFromPoint",value:(r=Sn(En().mark((function e(t,n){var r,A,i,o,a,s,l,u,c,h,d;return En().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.defaultView.canvas2Viewport({x:t,y:n}),A=r.x,i=r.y,o=this.defaultView.getConfig(),a=o.width,s=o.height,!(A<0||i<0||A>a||i>s)){e.next=1;break}return e.abrupt("return",null);case 1:return l=this.defaultView.viewport2Client({x:A,y:i}),u=l.x,c=l.y,e.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:t,y:n,viewportX:A,viewportY:i,clientX:u,clientY:c},picked:[]});case 2:return h=e.sent,d=h.picked,e.abrupt("return",d&&d[0]||this.documentElement);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"elementsFromPointSync",value:function(e,t){var n=this.defaultView.canvas2Viewport({x:e,y:t}),r=n.x,A=n.y,i=this.defaultView.getConfig(),o=i.width,a=i.height;if(r<0||A<0||r>o||A>a)return[];var s=this.defaultView.viewport2Client({x:r,y:A}),l=s.x,u=s.y,c=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:e,y:t,viewportX:r,viewportY:A,clientX:l,clientY:u},picked:[]}).picked;return c[c.length-1]!==this.documentElement&&c.push(this.documentElement),c}},{key:"elementsFromPoint",value:(n=Sn(En().mark((function e(t,n){var r,A,i,o,a,s,l,u,c,h,d;return En().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.defaultView.canvas2Viewport({x:t,y:n}),A=r.x,i=r.y,o=this.defaultView.getConfig(),a=o.width,s=o.height,!(A<0||i<0||A>a||i>s)){e.next=1;break}return e.abrupt("return",[]);case 1:return l=this.defaultView.viewport2Client({x:A,y:i}),u=l.x,c=l.y,e.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:t,y:n,viewportX:A,viewportY:i,clientX:u,clientY:c},picked:[]});case 2:return h=e.sent,(d=h.picked)[d.length-1]!==this.documentElement&&d.push(this.documentElement),e.abrupt("return",d);case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"appendChild",value:function(e,t){throw new Error(Vn)}},{key:"insertBefore",value:function(e,t){throw new Error(Vn)}},{key:"removeChild",value:function(e,t){throw new Error(Vn)}},{key:"replaceChild",value:function(e,t,n){throw new Error(Vn)}},{key:"append",value:function(){throw new Error(Vn)}},{key:"prepend",value:function(){throw new Error(Vn)}},{key:"getElementById",value:function(e){return this.documentElement.getElementById(e)}},{key:"getElementsByName",value:function(e){return this.documentElement.getElementsByName(e)}},{key:"getElementsByTagName",value:function(e){return this.documentElement.getElementsByTagName(e)}},{key:"getElementsByClassName",value:function(e){return this.documentElement.getElementsByClassName(e)}},{key:"querySelector",value:function(e){return this.documentElement.querySelector(e)}},{key:"querySelectorAll",value:function(e){return this.documentElement.querySelectorAll(e)}},{key:"find",value:function(e){return this.documentElement.find(e)}},{key:"findAll",value:function(e){return this.documentElement.findAll(e)}}]);var n,r}(ha),Qs=function(){function e(t){o(this,e),this.strategies=t}return s(e,[{key:"apply",value:function(t){var n=t.config,r=t.camera,A=t.renderingService,i=t.renderingContext,o=this.strategies;A.hooks.cull.tap(e.tag,(function(e){if(e){var t,A=e.cullable;if(0===o.length?A.visible=i.unculledEntities.indexOf(e.entity)>-1:A.visible=o.every((function(t){return t.isVisible(r,e)})),!e.isCulled()&&e.isVisible())return e;var a=!0===(null===(t=n.future)||void 0===t?void 0:t.experimentalCancelEventPropagation);return e.dispatchEvent(new ua(Ca.CULLED),a,a),null}return e})),A.hooks.afterRender.tap(e.tag,(function(e){e.cullable.visibilityPlaneMask=-1}))}}])}();Qs.tag="Culling";var Us=function(){function e(){var t=this;o(this,e),this.autoPreventDefault=!1,this.rootPointerEvent=new sa(null),this.rootWheelEvent=new la(null),this.onPointerMove=function(e){var n,r=null===(n=t.context.renderingContext.root)||void 0===n||null===(n=n.ownerDocument)||void 0===n?void 0:n.defaultView;if(!r.supportsTouchEvents||"touch"!==e.pointerType){var A,i=Tn(t.normalizeToPointerEvent(e,r));try{for(i.s();!(A=i.n()).done;){var o=A.value,a=t.bootstrapEvent(t.rootPointerEvent,o,r,e);t.context.eventService.mapEvent(a)}}catch(e){i.e(e)}finally{i.f()}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,r,A=null===(n=t.context.renderingContext.root)||void 0===n||null===(n=n.ownerDocument)||void 0===n?void 0:n.defaultView,i=Tn(t.normalizeToPointerEvent(e,A));try{for(i.s();!(r=i.n()).done;){var o=r.value,a=t.bootstrapEvent(t.rootPointerEvent,o,A,e);t.context.eventService.mapEvent(a)}}catch(e){i.e(e)}finally{i.f()}t.setCursor(t.context.eventService.cursor)}}return s(e,[{key:"apply",value:function(t){var n=this;this.context=t;var r=t.renderingService,A=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler((function(e){return n.context.renderingService.hooks.pickSync.call({position:e,picked:[],topmost:!0}).picked[0]||null})),r.hooks.pointerWheel.tap(e.tag,(function(e){var t=n.normalizeWheelEvent(e);n.context.eventService.mapEvent(t)})),r.hooks.pointerDown.tap(e.tag,(function(e){if(!A.supportsTouchEvents||"touch"!==e.pointerType){var t=n.normalizeToPointerEvent(e,A);if(n.autoPreventDefault&&t[0].isNormalized)(e.cancelable||!("cancelable"in e))&&e.preventDefault();var r,i=Tn(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=n.bootstrapEvent(n.rootPointerEvent,o,A,e);n.context.eventService.mapEvent(a)}}catch(e){i.e(e)}finally{i.f()}n.setCursor(n.context.eventService.cursor)}})),r.hooks.pointerUp.tap(e.tag,(function(e){if(!A.supportsTouchEvents||"touch"!==e.pointerType){var t,r=n.context.contextService.getDomElement(),i=n.context.eventService.isNativeEventFromCanvas(r,e)?"":"outside",o=Tn(n.normalizeToPointerEvent(e,A));try{for(o.s();!(t=o.n()).done;){var a=t.value,s=n.bootstrapEvent(n.rootPointerEvent,a,A,e);s.type+=i,n.context.eventService.mapEvent(s)}}catch(e){o.e(e)}finally{o.f()}n.setCursor(n.context.eventService.cursor)}})),r.hooks.pointerMove.tap(e.tag,this.onPointerMove),r.hooks.pointerOver.tap(e.tag,this.onPointerMove),r.hooks.pointerOut.tap(e.tag,this.onPointerMove),r.hooks.click.tap(e.tag,this.onClick),r.hooks.pointerCancel.tap(e.tag,(function(e){var t,r=Tn(n.normalizeToPointerEvent(e,A));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=n.bootstrapEvent(n.rootPointerEvent,i,A,e);n.context.eventService.mapEvent(o)}}catch(e){r.e(e)}finally{r.f()}n.setCursor(n.context.eventService.cursor)}))}},{key:"bootstrapEvent",value:function(e,t,n,r){e.view=n,e.originalEvent=null,e.nativeEvent=r,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,this.transferMouseData(e,t);var A=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),i=A.x,o=A.y;e.viewport.x=i,e.viewport.y=o;var a=this.context.eventService.viewport2Canvas(e.viewport),s=a.x,l=a.y;return e.canvas.x=s,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=r.isTrusted,"pointerleave"===e.type&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=go[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var t=this.rootWheelEvent;this.transferMouseData(t,e),t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ;var n=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),r=n.x,A=n.y;t.viewport.x=r,t.viewport.y=A;var i=this.context.eventService.viewport2Canvas(t.viewport),o=i.x,a=i.y;return t.canvas.x=o,t.canvas.y=a,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.nativeEvent=e,t.type=e.type,t}},{key:"transferMouseData",value:function(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=vo.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,t){var n=[];if(t.isTouchEvent(e))for(var r=0;r<e.changedTouches.length;r++){var A=e.changedTouches[r];et(A.button)&&(A.button=0),et(A.buttons)&&(A.buttons=1),et(A.isPrimary)&&(A.isPrimary=1===e.touches.length&&"touchstart"===e.type),et(A.width)&&(A.width=A.radiusX||1),et(A.height)&&(A.height=A.radiusY||1),et(A.tiltX)&&(A.tiltX=0),et(A.tiltY)&&(A.tiltY=0),et(A.pointerType)&&(A.pointerType="touch"),et(A.pointerId)&&(A.pointerId=A.identifier||0),et(A.pressure)&&(A.pressure=A.force||.5),et(A.twist)&&(A.twist=0),et(A.tangentialPressure)&&(A.tangentialPressure=0),A.isNormalized=!0,A.type=e.type,n.push(A)}else if(t.isMouseEvent(e)){var i=e;et(i.isPrimary)&&(i.isPrimary=!0),et(i.width)&&(i.width=1),et(i.height)&&(i.height=1),et(i.tiltX)&&(i.tiltX=0),et(i.tiltY)&&(i.tiltY=0),et(i.pointerType)&&(i.pointerType="mouse"),et(i.pointerId)&&(i.pointerId=1),et(i.pressure)&&(i.pressure=.5),et(i.twist)&&(i.twist=0),et(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,n.push(i)}else n.push(e);return n}}])}();Us.tag="Event";var Rs=[bn.CIRCLE,bn.ELLIPSE,bn.IMAGE,bn.RECT,bn.LINE,bn.POLYLINE,bn.POLYGON,bn.TEXT,bn.PATH,bn.HTML],Ms=function(){return s((function e(){o(this,e)}),[{key:"isVisible",value:function(e,t){var n,r=t.cullable;if(!r.enable)return!0;var A=t.getRenderBounds();if(Nn.isEmpty(A))return!1;var i=e.getFrustum(),o=null===(n=t.parentNode)||void 0===n||null===(n=n.cullable)||void 0===n?void 0:n.visibilityPlaneMask;return r.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(t,A,o||Dn.INDETERMINATE,i.planes),r.visible=r.visibilityPlaneMask!==Dn.OUTSIDE,r.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,t,n,r){if(n===Dn.OUTSIDE||n===Dn.INSIDE)return n;for(var A=Dn.INSIDE,i=Rs.indexOf(e.nodeName)>-1,o=0,a=r.length;o<a;++o){var s=1<<o;if(n&s&&(!i||4!==o&&5!==o)){var l=r[o],u=l.normal,c=l.distance;if(Ce(u,t.getPositiveFarPoint(r[o]))+c<0)return Dn.OUTSIDE;Ce(u,t.getNegativeFarPoint(r[o]))+c<0&&(A|=s)}}return A}}])}(),Hs=function(){function e(){o(this,e),this.mutationRecords=[],this.isFirstTimeRendering=!0,this.isFirstTimeRenderingFinished=!1}return s(e,[{key:"apply",value:function(t){var n,r=this,A=t.renderingService,i=t.renderingContext.root.ownerDocument.defaultView,o=function(e){A.dirty()},a=function(e){var t,n=e.detail;(t=r.mutationRecords).push.apply(t,c(n)),A.dirty()},s=function(e){var t=e.target;ja.enableSizeAttenuation&&ja.styleValueRegistry.updateSizeAttenuation(t,i.getCamera().getZoom())},l=function(e){var t=e.target;ja.sceneGraphService.dirtyToRoot(t),A.dirty()};A.hooks.init.tap(e.tag,(function(){i.addEventListener(Ca.MOUNTED,s),i.addEventListener(Ca.UNMOUNTED,l),i.addEventListener(Ca.ATTR_MODIFIED,o),i.addEventListener(Ca.BOUNDS_CHANGED,a)})),A.hooks.destroy.tap(e.tag,(function(){i.removeEventListener(Ca.MOUNTED,s),i.removeEventListener(Ca.UNMOUNTED,l),i.removeEventListener(Ca.ATTR_MODIFIED,o),i.removeEventListener(Ca.BOUNDS_CHANGED,a),r.mutationRecords=[]}));var u=null!==(n=ja.globalThis.requestIdleCallback)&&void 0!==n?n:Io.bind(ja.globalThis);A.hooks.endFrame.tap(e.tag,(function(){r.isFirstTimeRendering&&(r.isFirstTimeRendering=!1,u((function(){r.isFirstTimeRenderingFinished=!0}))),r.mutationRecords=[]}))}}])}();Hs.tag="Prepare";var Os=function(e){return e.READY="ready",e.BEFORE_RENDER="beforerender",e.RERENDER="rerender",e.AFTER_RENDER="afterrender",e.BEFORE_DESTROY="beforedestroy",e.AFTER_DESTROY="afterdestroy",e.RESIZE="resize",e.DIRTY_RECTANGLE="dirtyrectangle",e.RENDERER_CHANGED="rendererchanged",e}({}),ks=new ua(Ca.MOUNTED),Ns=new ua(Ca.UNMOUNTED),_s=new ua(Os.BEFORE_RENDER),Ds=new ua(Os.RERENDER),Ps=new ua(Os.AFTER_RENDER),Gs=function(e){function t(e){var n;o(this,t),(n=p(this,t)).Element=ss,n.inited=!1,n.context={};var r=e.container,A=e.canvas,a=e.renderer,s=e.width,l=e.height,u=e.background,c=e.cursor,h=e.supportsMutipleCanvasesInOneContainer,d=e.cleanUpOnDestroy,f=void 0===d||d,g=e.offscreenCanvas,v=e.devicePixelRatio,y=e.requestAnimationFrame,C=e.cancelAnimationFrame,B=e.createImage,m=e.supportsTouchEvents,w=e.supportsPointerEvents,E=e.isTouchEvent,x=e.isMouseEvent,S=e.dblClickSpeed,T=s,F=l,b=v||uo&&window.devicePixelRatio||1;return b=b>=1?Math.ceil(b):1,A&&(T=s||function(e){var t=po(e,"width");return"auto"===t?e.offsetWidth:parseFloat(t)}(A)||A.width/b,F=l||function(e){var t=po(e,"height");return"auto"===t?e.offsetHeight:parseFloat(t)}(A)||A.height/b),n.customElements=new bs,n.devicePixelRatio=b,n.requestAnimationFrame=null!=y?y:Io.bind(ja.globalThis),n.cancelAnimationFrame=null!=C?C:Lo.bind(ja.globalThis),n.createImage=null!=B?B:function(){return new window.Image},n.supportsTouchEvents=null!=m?m:"ontouchstart"in ja.globalThis,n.supportsPointerEvents=null!=w?w:!!ja.globalThis.PointerEvent,n.isTouchEvent=null!=E?E:function(e){return n.supportsTouchEvents&&e instanceof ja.globalThis.TouchEvent},n.isMouseEvent=null!=x?x:function(e){return!ja.globalThis.MouseEvent||e instanceof ja.globalThis.MouseEvent&&(!n.supportsPointerEvents||!(e instanceof ja.globalThis.PointerEvent))},g&&(ja.offscreenCanvas=g),n.document=new Ls,n.document.defaultView=n,h||function(e,t,n){if(e){var r="string"==typeof e?document.getElementById(e):e;lo.has(r)&&lo.get(r).destroy(n),lo.set(r,t)}}(r,n,f),n.initRenderingContext(i(i({},e),{},{width:T,height:F,background:null!=u?u:"transparent",cursor:null!=c?c:"default",cleanUpOnDestroy:f,devicePixelRatio:b,requestAnimationFrame:n.requestAnimationFrame,cancelAnimationFrame:n.cancelAnimationFrame,createImage:n.createImage,supportsTouchEvents:n.supportsTouchEvents,supportsPointerEvents:n.supportsPointerEvents,isTouchEvent:n.isTouchEvent,isMouseEvent:n.isMouseEvent,dblClickSpeed:null!=S?S:200})),n.initDefaultCamera(T,F,a.clipSpaceNearZ),n.initRenderer(a,!0),n}return v(t,e),s(t,[{key:"initRenderingContext",value:function(e){this.context.config=e,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(e,t,n){var r=this,A=new ja.CameraContribution;A.clipSpaceNearZ=n,A.setType(lr.EXPLORING,ur.DEFAULT).setPosition(e/2,t/2,500).setFocalPoint(e/2,t/2,0).setOrthographic(e/-2,e/2,t/2,t/-2,.1,1e3),A.canvas=this,A.eventEmitter.on(hr,(function(){r.context.renderingContext.renderReasons.add(pa.CAMERA_CHANGED),ja.enableSizeAttenuation&&r.getConfig().renderer.getConfig().enableSizeAttenuation&&r.updateSizeAttenuation()})),this.context.camera=A}},{key:"updateSizeAttenuation",value:function(){var e=this.getCamera().getZoom();this.document.documentElement.forEach((function(t){ja.styleValueRegistry.updateSizeAttenuation(t,e)}))}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise((function(t){e.resolveReadyPromise=function(){t(e)}})),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=arguments.length>1?arguments[1]:void 0;nA.clearCache();var r=!0===(null===(e=this.getConfig().future)||void 0===e?void 0:e.experimentalCancelEventPropagation);n||this.dispatchEvent(new ua(Os.BEFORE_DESTROY),r,r),this.frameId&&this.cancelAnimationFrame(this.frameId);var A=this.getRoot();t&&(this.unmountChildren(A),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),n||this.dispatchEvent(new ua(Os.AFTER_DESTROY),r,r);var i=function(e){e.currentTarget=null,e.manager=null,e.target=null,e.relatedNode=null};i(ks),i(Ns),i(_s),i(Ds),i(Ps),i(is),i($a),i(es),i(ts),ja.textService.clearCache()}},{key:"changeSize",value:function(e,t){this.resize(e,t)}},{key:"resize",value:function(e,t){var n,r=this.context.config;r.width=e,r.height=t,this.getContextService().resize(e,t);var A=this.context.camera,i=A.getProjectionMode();A.setPosition(e/2,t/2,500).setFocalPoint(e/2,t/2,0),i===cr.ORTHOGRAPHIC?A.setOrthographic(e/-2,e/2,t/2,t/-2,A.getNear(),A.getFar()):A.setAspect(e/t);var o=!0===(null===(n=r.future)||void 0===n?void 0:n.experimentalCancelEventPropagation);this.dispatchEvent(new ua(Os.RESIZE,{width:e,height:t}),o,o)}},{key:"appendChild",value:function(e,t){return this.document.documentElement.appendChild(e,t)}},{key:"insertBefore",value:function(e,t){return this.document.documentElement.insertBefore(e,t)}},{key:"removeChild",value:function(e){return this.document.documentElement.removeChild(e)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(e){var t,n=this;e&&(_s.detail=e,Ps.detail=e);var r=!0===(null===(t=this.getConfig().future)||void 0===t?void 0:t.experimentalCancelEventPropagation);this.dispatchEvent(_s,r,r),this.getRenderingService().render(this,e,(function(){n.dispatchEvent(Ds,r,r)})),this.dispatchEvent(Ps,r,r)}},{key:"run",value:function(){var e=this,t=function(n,r){e.render(r),e.frameId=e.requestAnimationFrame(t)};t()}},{key:"initRenderer",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Us,new Hs,new Qs([new Ms])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(i(i({},ja),this.context)),this.context.renderingService=new ga(ja,this.context),this.context.eventService=new da(ja,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(e,n,!0)):this.context.contextService.initAsync().then((function(){t.initRenderingService(e,n)})).catch((function(e){console.error(e)}))}},{key:"initRenderingService",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.context.renderingService.init((function(){var A;t.inited=!0;var i=!0===(null===(A=t.getConfig().future)||void 0===A?void 0:A.experimentalCancelEventPropagation);n?r?t.requestAnimationFrame((function(){t.dispatchEvent(new ua(Os.READY),i,i)})):t.dispatchEvent(new ua(Os.READY),i,i):t.dispatchEvent(new ua(Os.RENDERER_CHANGED),i,i),t.readyPromise&&t.resolveReadyPromise(),n||t.getRoot().forEach((function(e){var t,n;null===(t=(n=e).dirty)||void 0===t||t.call(n,!0,!0)})),t.mountChildren(t.getRoot()),e.getConfig().enableAutoRendering&&t.run()}))}},{key:"loadRendererContainerModule",value:function(e){var t=this;e.getPlugins().forEach((function(e){e.context=t.context,e.init(ja)}))}},{key:"setRenderer",value:function(e){var t=this.getConfig();if(t.renderer!==e){var n=t.renderer;t.renderer=e,this.destroy(!1,!0),c((null==n?void 0:n.getPlugins())||[]).reverse().forEach((function(e){e.destroy(ja)})),this.initRenderer(e)}}},{key:"setCursor",value:function(e){this.getConfig().cursor=e,this.getContextService().applyCursorStyle(e)}},{key:"unmountChildren",value:function(e){var t=this;if(e.childNodes.forEach((function(e){t.unmountChildren(e)})),this.inited){if(e.isMutationObserved)e.dispatchEvent(Ns);else{var n,r=!0===(null===(n=this.getConfig().future)||void 0===n?void 0:n.experimentalCancelEventPropagation);Ns.target=e,this.dispatchEvent(Ns,!0,r)}e!==this.document.documentElement&&(e.ownerDocument=null),e.isConnected=!1}e.isCustomElement&&e.disconnectedCallback&&e.disconnectedCallback()}},{key:"mountChildren",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yo(e);if(this.inited){if(!e.isConnected&&(e.ownerDocument=this.document,e.isConnected=!0,!n))if(e.isMutationObserved)e.dispatchEvent(ks);else{var r,A=!0===(null===(r=this.getConfig().future)||void 0===r?void 0:r.experimentalCancelEventPropagation);ks.target=e,this.dispatchEvent(ks,!0,A)}}else 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: ",e.nodeName);e.childNodes.forEach((function(e){t.mountChildren(e,n)})),e.isCustomElement&&e.connectedCallback&&e.connectedCallback()}},{key:"mountFragment",value:function(e){this.mountChildren(e,!1)}},{key:"client2Viewport",value:function(e){return this.getEventService().client2Viewport(e)}},{key:"viewport2Client",value:function(e){return this.getEventService().viewport2Client(e)}},{key:"viewport2Canvas",value:function(e){return this.getEventService().viewport2Canvas(e)}},{key:"canvas2Viewport",value:function(e){return this.getEventService().canvas2Viewport(e)}},{key:"getPointByClient",value:function(e,t){return this.client2Viewport({x:e,y:t})}},{key:"getClientByPoint",value:function(e,t){return this.viewport2Client({x:e,y:t})}}])}(ca),Ks=function(){return s((function e(){o(this,e),this.cacheStore=new Map}),[{key:"onRefAdded",value:function(e){}},{key:"has",value:function(e){return this.cacheStore.has(e)}},{key:"put",value:function(e,t,n){return!this.cacheStore.has(e)&&(this.cacheStore.set(e,{value:t,counter:new Set([n.entity])}),this.onRefAdded(n),!0)}},{key:"get",value:function(e,t){var n=this.cacheStore.get(e);return n?(n.counter.has(t.entity)||(n.counter.add(t.entity),this.onRefAdded(t)),n.value):null}},{key:"update",value:function(e,t,n){var r=this.cacheStore.get(e);return!!r&&(r.value=i(i({},r.value),t),r.counter.has(n.entity)||(r.counter.add(n.entity),this.onRefAdded(n)),!0)}},{key:"release",value:function(e,t){var n=this.cacheStore.get(e);return!!n&&(n.counter.delete(t.entity),n.counter.size<=0&&this.cacheStore.delete(e),!0)}},{key:"releaseRef",value:function(e){var t=this;Array.from(this.cacheStore.keys()).forEach((function(n){t.release(n,e)}))}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),zs=[],Vs=[],Ws=function(){function e(){o(this,e)}return s(e,null,[{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.api;e.rafId&&(t.cancelAnimationFrame(e.rafId),e.rafId=null)}},{key:"executeTask",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.api;zs.length<=0&&Vs.length<=0||(Vs.forEach((function(e){return e()})),Vs=zs.splice(0,e.TASK_NUM_PER_FRAME),e.rafId=t.requestAnimationFrame((function(){e.executeTask(t)})))}},{key:"sliceImage",value:function(t,n,r,A){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e.api,a=t.naturalWidth||t.width,s=t.naturalHeight||t.height,l=n-i,u=r-i,c=Math.ceil(a/l),h=Math.ceil(s/u),d={tileSize:[n,r],gridSize:[h,c],tiles:Array(h).fill(null).map((function(){return Array(c).fill(null)}))},f=function(e){for(var i=function(i){zs.push((function(){var c=i*l,h=e*u,f=[Math.min(n,a-c),Math.min(r,s-h)],p=f[0],g=f[1],v=o.createCanvas();v.width=n,v.height=r,v.getContext("2d").drawImage(t,c,h,p,g,0,0,p,g),d.tiles[e][i]={x:c,y:h,tileX:i,tileY:e,data:v},A()}))},h=0;h<c;h++)i(h)},p=0;p<h;p++)f(p);return e.stop(),e.executeTask(),d}}])}();Ws.TASK_NUM_PER_FRAME=10;var Xs=new Ks;Xs.onRefAdded=function(e){var t=this;e.addEventListener(Ca.DESTROY,(function(){t.releaseRef(e)}),{once:!0})};var Ys=function(){return s((function e(t,n){o(this,e),this.gradientCache={},this.patternCache={},this.context=t,this.runtime=n}),[{key:"getImageSync",value:function(e,t,n){var r=Xe(e)?e:e.src;if(Xs.has(r)){var A=Xs.get(r,t);if(A.img.complete)return null==n||n(A),A}return this.getOrCreateImage(e,t).then((function(e){null==n||n(e)})).catch((function(e){console.error(e)})),null}},{key:"getOrCreateImage",value:function(e,t){var n=this,r=Xe(e)?e:e.src;if(!Xe(e)&&!Xs.has(r)){var A={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:js(e)};Xs.put(r,A,t)}if(Xs.has(r)){var i=Xs.get(r,t);return i.img.complete?Promise.resolve(i):new Promise((function(e,t){i.img.addEventListener("load",(function(){i.size=[i.img.naturalWidth||i.img.width,i.img.naturalHeight||i.img.height],i.tileSize=js(i.img),e(i)})),i.img.addEventListener("error",(function(e){t(e)}))}))}return new Promise((function(e,A){var i=n.context.config.createImage();if(i){var o={img:i,size:[0,0],tileSize:js(i)};Xs.put(r,o,t),i.onload=function(){o.size=[i.naturalWidth||i.width,i.naturalHeight||i.height],o.tileSize=js(o.img),e(o)},i.onerror=function(e){A(e)},i.crossOrigin="Anonymous",i.src=r}}))}},{key:"createDownSampledImage",value:(t=Sn(En().mark((function e(t,n){var r,A,o,a,s,l,u,c,h,d,f,p,g,v;return En().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.getOrCreateImage(t,n);case 1:if(void 0===(r=e.sent).downSamplingRate){e.next=2;break}return e.abrupt("return",r);case 2:if(A=this.context.config.enableLargeImageOptimization,a=(o="boolean"==typeof A?{}:A).maxDownSampledImageSize,s=void 0===a?2048:a,l=o.downSamplingRateThreshold,u=void 0===l?.5:l,c=this.runtime.globalThis.createImageBitmap,h=y(r.size,2),d=h[0],f=h[1],p=r.img,g=Math.min((s+s)/(d+f),Math.max(.01,Math.min(u,.5))),v=i(i({},r),{},{downSamplingRate:g}),Xs.update(r.img.src,v,n),!c){e.next=7;break}return e.prev=3,e.next=4,c(r.img,{resizeWidth:d*g,resizeHeight:f*g});case 4:p=e.sent,e.next=6;break;case 5:e.prev=5,e.catch(3),g=1;case 6:e.next=8;break;case 7:g=1;case 8:return v=i(i({},this.getImageSync(t,n)),{},{downSampled:p,downSamplingRate:g}),Xs.update(r.img.src,v,n),e.abrupt("return",v);case 9:case"end":return e.stop()}}),e,this,[[3,5]])}))),function(e,n){return t.apply(this,arguments)})},{key:"createImageTiles",value:(e=Sn(En().mark((function e(t,n,r,A){var o,a,s,l,u;return En().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,this.getOrCreateImage(t,A);case 1:return o=e.sent,a=A.ownerDocument.defaultView,s=a.requestAnimationFrame,l=a.cancelAnimationFrame,Ws.api={requestAnimationFrame:s,cancelAnimationFrame:l,createCanvas:function(){return fa.createCanvas()}},u=i(i({},o),Ws.sliceImage(o.img,o.tileSize[0],o.tileSize[0],r)),Xs.update(o.img.src,u,A),e.abrupt("return",u);case 2:case"end":return e.stop()}}),e,this)}))),function(t,n,r,A){return e.apply(this,arguments)})},{key:"releaseImage",value:function(e,t){Xs.release(Xe(e)?e:e.src,t)}},{key:"releaseImageRef",value:function(e){Xs.releaseRef(e)}},{key:"getOrCreatePatternSync",value:function(e,t,n,r,A,i,o){var a=this.generatePatternKey(t);if(a&&this.patternCache[a])return this.patternCache[a];var s,l=t.image,u=t.repetition,c=t.transform,h=!1;if(Xe(l)){var d=this.getImageSync(l,e,o);s=null==d?void 0:d.img}else r?(s=r,h=!0):s=l;var f,p=s&&n.createPattern(s,u);p&&(f=c?Xo(bi(c),new ss({})):Q(T()),h&&k(f,f,[1/A,1/A,1]),p.setTransform({a:f[0],b:f[1],c:f[4],d:f[5],e:f[12]+i[0],f:f[13]+i[1]}));return a&&p&&(this.patternCache[a]=p),p}},{key:"getOrCreateGradient",value:function(e,t){var n=this.generateGradientKey(e),r=e.type,A=e.steps,i=e.min,o=e.width,a=e.height,s=e.angle,l=e.cx,u=e.cy,c=e.size;if(this.gradientCache[n])return this.gradientCache[n];var h=null;if(r===fA.LinearGradient){var d=function(e,t,n,r){var A=Zn(r.value),i=0+t/2,o=0+n/2,a=Math.abs(t*Math.cos(A))+Math.abs(n*Math.sin(A));return{x1:e[0]+i-Math.cos(A)*a/2,y1:e[1]+o-Math.sin(A)*a/2,x2:e[0]+i+Math.cos(A)*a/2,y2:e[1]+o+Math.sin(A)*a/2}}(i,o,a,s),f=d.x1,p=d.y1,g=d.x2,v=d.y2;h=t.createLinearGradient(f,p,g,v)}else if(r===fA.RadialGradient){var y=function(e,t,n,r,A,i){var o=r.value,a=A.value;r.unit===rA.kPercentage&&(o=r.value/100*t),A.unit===rA.kPercentage&&(a=A.value/100*n);var s=Math.max(Rt([0,0],[o,a]),Rt([0,n],[o,a]),Rt([t,n],[o,a]),Rt([t,0],[o,a]));return i&&(i instanceof yA?s=i.value:i instanceof gA&&("closest-side"===i.value?s=Math.min(o,t-o,a,n-a):"farthest-side"===i.value?s=Math.max(o,t-o,a,n-a):"closest-corner"===i.value&&(s=Math.min(Rt([0,0],[o,a]),Rt([0,n],[o,a]),Rt([t,n],[o,a]),Rt([t,0],[o,a]))))),{x:o+e[0],y:a+e[1],r:s}}(i,o,a,l,u,c),C=y.x,B=y.y,m=y.r;h=t.createRadialGradient(C,B,0,C,B,m)}return h&&(A.forEach((function(e){var t,n=e.offset,r=e.color;n.unit===rA.kPercentage&&(null===(t=h)||void 0===t||t.addColorStop(n.value/100,r.toString()))})),this.gradientCache[n]=h),this.gradientCache[n]}},{key:"generateGradientKey",value:function(e){var t=e.type,n=e.min,r=e.width,A=e.height,i=e.steps,o=e.angle,a=e.cx,s=e.cy,l=e.size;return"gradient-".concat(t,"-").concat((null==o?void 0:o.toString())||0,"-").concat((null==a?void 0:a.toString())||0,"-").concat((null==s?void 0:s.toString())||0,"-").concat((null==l?void 0:l.toString())||0,"-").concat(n[0],"-").concat(n[1],"-").concat(r,"-").concat(A,"-").concat(i.map((function(e){var t=e.offset,n=e.color;return"".concat(t).concat(n)})).join("-"))}},{key:"generatePatternKey",value:function(e){var t=e.image,n=e.repetition;return Xe(t)?"pattern-".concat(t,"-").concat(n):"rect"===t.nodeName?"pattern-".concat(t.entity,"-").concat(n):void 0}}]);var e,t}();function js(e){if(!e.complete)return[0,0];var t=e.naturalWidth||e.width,n=e.naturalHeight||e.height,r=256;return[256,512].forEach((function(e){Math.ceil(n/e)*Math.ceil(t/e)<1e3&&(r=e)})),[r,r]}Ys.isSupportTile=!!fa.createCanvas();var Zs=function(){function e(){o(this,e)}return s(e,[{key:"apply",value:function(t){var n=t.renderingService,r=t.renderingContext,A=t.imagePool,i=r.root.ownerDocument.defaultView,o=function(e,t,n){var r=e.parsedStyle,A=r.width,i=r.height;A&&!i?e.setAttribute("height",n/t*A):!A&&i&&e.setAttribute("width",t/n*i)},a=function(e){var t=e.target,r=t.nodeName,i=t.attributes;if(r===bn.IMAGE){var a=i.src,s=i.keepAspectRatio;A.getImageSync(a,t,(function(e){var r=e.img,A=r.width,i=r.height;s&&o(t,A,i),t.dirty(),n.dirty()}))}},s=function(e){var t=e.target,r=e.attrName,i=e.prevValue,a=e.newValue;t.nodeName===bn.IMAGE&&"src"===r&&(i!==a&&A.releaseImage(i,t),Xe(a)&&A.getOrCreateImage(a,t).then((function(e){var r=e.img,A=r.width,i=r.height;t.attributes.keepAspectRatio&&o(t,A,i),t.dirty(),n.dirty()})).catch((function(){})))};n.hooks.init.tap(e.tag,(function(){i.addEventListener(Ca.MOUNTED,a),i.addEventListener(Ca.ATTR_MODIFIED,s)})),n.hooks.destroy.tap(e.tag,(function(){i.removeEventListener(Ca.MOUNTED,a),i.removeEventListener(Ca.ATTR_MODIFIED,s)}))}}])}();Zs.tag="LoadImage";var Js=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).name="image-loader",e}return v(t,e),s(t,[{key:"init",value:function(e){this.context.imagePool=new Ys(this.context,e),this.addRenderingPlugin(new Zs)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(Ln),qs=Object.freeze({__proto__:null,ImagePool:Ys,Plugin:Js}),$s=function(){function e(){o(this,e),this.displayObjectHTMLElementMap=new WeakMap}return s(e,[{key:"joinTransformMatrix",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,0];return"matrix(".concat([e[0],e[1],e[4],e[5],e[12]+t[0],e[13]+t[1]].join(","),")")}},{key:"apply",value:function(t,n){var r=this,A=t.camera,i=t.renderingContext,o=t.renderingService;this.context=t;var a=i.root.ownerDocument.defaultView,s=a.context.eventService.nativeHTMLMap,l=function(e,t){t.style.transform=r.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())},u=function(e){var t=e.target;if(t.nodeName===bn.HTML){r.$camera||(r.$camera=r.createCamera(A));var n=r.getOrCreateEl(t);r.$camera.appendChild(n),Object.keys(t.attributes).forEach((function(e){r.updateAttribute(e,t)})),l(t,n),s.set(n,t)}},c=function(e){var t=e.target;if(t.nodeName===bn.HTML&&r.$camera){var n=r.getOrCreateEl(t);n&&(n.remove(),s.delete(n))}},h=function(e){var t=e.target;if(t.nodeName===bn.HTML){var n=e.attrName;r.updateAttribute(n,t)}},d=function(e){for(var t=e.detail,n=0;n<t.length;n++){var A=t[n].target;(A.nodeName===bn.FRAGMENT?A.childNodes:[A]).forEach((function(e){if(e.nodeName===bn.HTML){var t=r.getOrCreateEl(e);l(e,t)}}))}},f=function(){if(r.$camera){var e=r.context.config,t=e.width,n=e.height;r.$camera.parentElement.style.width="".concat(t||0,"px"),r.$camera.parentElement.style.height="".concat(n||0,"px")}};o.hooks.init.tap(e.tag,(function(){a.addEventListener(Os.RESIZE,f),a.addEventListener(Ca.MOUNTED,u),a.addEventListener(Ca.UNMOUNTED,c),a.addEventListener(Ca.ATTR_MODIFIED,h),a.addEventListener(Ca.BOUNDS_CHANGED,d)})),o.hooks.endFrame.tap(e.tag,(function(){r.$camera&&i.renderReasons.has(pa.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(A.getOrthoMatrix()))})),o.hooks.destroy.tap(e.tag,(function(){r.$camera&&r.$camera.remove(),a.removeEventListener(Os.RESIZE,f),a.removeEventListener(Ca.MOUNTED,u),a.removeEventListener(Ca.UNMOUNTED,c),a.removeEventListener(Ca.ATTR_MODIFIED,h),a.removeEventListener(Ca.BOUNDS_CHANGED,d)}))}},{key:"createCamera",value:function(e){var t=this.context.config,n=t.document,r=t.width,A=t.height,i=this.context.contextService.getDomElement(),o=i.parentNode;if(o){var a="g-canvas-camera",s=o.querySelector("#".concat(a));if(!s){var l=(n||document).createElement("div");l.style.overflow="hidden",l.style.pointerEvents="none",l.style.position="absolute",l.style.left="0px",l.style.top="0px",l.style.width="".concat(r||0,"px"),l.style.height="".concat(A||0,"px");var u=(n||document).createElement("div");s=u,u.id=a,u.style.position="absolute",u.style.left="".concat(i.offsetLeft||0,"px"),u.style.top="".concat(i.offsetTop||0,"px"),u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),u.style.pointerEvents="none",u.style.width="100%",u.style.height="100%",l.appendChild(u),o.appendChild(l)}return s}return null}},{key:"getOrCreateEl",value:function(e){var t=this.context.config.document,n=this.displayObjectHTMLElementMap.get(e);return n||(n=(t||document).createElement("div"),e.parsedStyle.$el=n,this.displayObjectHTMLElementMap.set(e,n),e.id&&(n.id=e.id),e.name&&n.setAttribute("name",e.name),e.className&&(n.className=e.className),n.style.position="absolute",n.style["will-change"]="transform",n.style.transform=this.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())),n}},{key:"updateAttribute",value:function(e,t){var n=this.getOrCreateEl(t);switch(e){case"innerHTML":var r=t.parsedStyle.innerHTML;Xe(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"x":n.style.left="".concat(t.parsedStyle.x,"px");break;case"y":n.style.top="".concat(t.parsedStyle.y,"px");break;case"transformOrigin":var A=t.parsedStyle.transformOrigin;n.style["transform-origin"]="".concat(A[0].buildCSSText(null,null,"")," ").concat(A[1].buildCSSText(null,null,""));break;case"width":var i=t.parsedStyle.width;n.style.width=je(i)?"".concat(i,"px"):i.toString();break;case"height":var o=t.parsedStyle.height;n.style.height=je(o)?"".concat(o,"px"):o.toString();break;case"zIndex":var a=t.parsedStyle.zIndex;n.style["z-index"]="".concat(a);break;case"visibility":var s=t.parsedStyle.visibility;n.style.visibility=s;break;case"pointerEvents":var l=t.parsedStyle.pointerEvents,u=void 0===l?"auto":l;n.style.pointerEvents=u;break;case"opacity":var c=t.parsedStyle.opacity;n.style.opacity="".concat(c);break;case"fill":var h=t.parsedStyle.fill,d="";_A(h)?d=h.isNone?"transparent":t.getAttribute("fill"):Array.isArray(h)?d=t.getAttribute("fill"):NA(h),n.style.background=d;break;case"stroke":var f=t.parsedStyle.stroke,p="";_A(f)?p=f.isNone?"transparent":t.getAttribute("stroke"):Array.isArray(f)?p=t.getAttribute("stroke"):NA(f),n.style["border-color"]=p,n.style["border-style"]="solid";break;case"lineWidth":var g=t.parsedStyle.lineWidth;n.style["border-width"]="".concat(g||0,"px");break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":var v=t.style.filter;n.style.filter=v;break;default:Ge(t.style[e])||""===t.style[e]||(n.style[e]=t.style[e])}}}])}();$s.tag="HTMLRendering";var el=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).name="html-renderer",e}return v(t,e),s(t,[{key:"init",value:function(){this.addRenderingPlugin(new $s)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(Ln),tl=Object.freeze({__proto__:null,Plugin:el}),nl=function(){function e(){o(this,e)}return s(e,[{key:"apply",value:function(t,n){var r=this,A=t.renderingService,i=t.renderingContext,o=t.config;this.context=t;var a=i.root.ownerDocument.defaultView,s=function(e){A.hooks.pointerMove.call(e)},l=function(e){A.hooks.pointerUp.call(e)},u=function(e){A.hooks.pointerDown.call(e)},c=function(e){A.hooks.pointerOver.call(e)},h=function(e){A.hooks.pointerOut.call(e)},d=function(e){A.hooks.pointerCancel.call(e)},f=function(e){A.hooks.pointerWheel.call(e)},p=function(e){A.hooks.click.call(e)};A.hooks.init.tap(e.tag,(function(){var e=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="none",e.style.msTouchAction="none"):a.supportsPointerEvents&&(e.style.touchAction="none"),a.supportsPointerEvents?function(e){n.globalThis.document.addEventListener("pointermove",s,!0),e.addEventListener("pointerdown",u,!0),e.addEventListener("pointerleave",h,!0),e.addEventListener("pointerover",c,!0),n.globalThis.addEventListener("pointerup",l,!0),n.globalThis.addEventListener("pointercancel",d,!0)}(e):function(e){n.globalThis.document.addEventListener("mousemove",s,!0),e.addEventListener("mousedown",u,!0),e.addEventListener("mouseout",h,!0),e.addEventListener("mouseover",c,!0),n.globalThis.addEventListener("mouseup",l,!0)}(e),a.supportsTouchEvents&&function(e){e.addEventListener("touchstart",u,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",d,!0)}(e),o.useNativeClickEvent&&e.addEventListener("click",p,!0),e.addEventListener("wheel",f,{passive:!0,capture:!0})})),A.hooks.destroy.tap(e.tag,(function(){var e=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(e.style.msContentZooming="",e.style.msTouchAction=""):a.supportsPointerEvents&&(e.style.touchAction=""),a.supportsPointerEvents?function(e){n.globalThis.document.removeEventListener("pointermove",s,!0),e.removeEventListener("pointerdown",u,!0),e.removeEventListener("pointerleave",h,!0),e.removeEventListener("pointerover",c,!0),n.globalThis.removeEventListener("pointerup",l,!0),n.globalThis.removeEventListener("pointercancel",d,!0)}(e):function(e){n.globalThis.document.removeEventListener("mousemove",s,!0),e.removeEventListener("mousedown",u,!0),e.removeEventListener("mouseout",h,!0),e.removeEventListener("mouseover",c,!0),n.globalThis.removeEventListener("mouseup",l,!0)}(e),a.supportsTouchEvents&&function(e){e.removeEventListener("touchstart",u,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",d,!0)}(e),o.useNativeClickEvent&&e.removeEventListener("click",p,!0),e.removeEventListener("wheel",f,!0)}))}}])}();nl.tag="DOMInteraction";var rl=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).name="dom-interaction",e}return v(t,e),s(t,[{key:"init",value:function(){this.addRenderingPlugin(new nl)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(Ln),Al=Object.freeze({__proto__:null,Plugin:rl}),il=function(){function e(){o(this,e)}return s(e,[{key:"apply",value:function(t){var n=t.renderingService,r=t.contextService,A=t.config,i=r.getDomElement(),o=function(e){n.hooks.pointerDown.call(e)},a=function(e){n.hooks.pointerUp.call(e)},s=function(e){n.hooks.pointerMove.call(e)},l=function(e){n.hooks.pointerOver.call(e)},u=function(e){n.hooks.pointerOut.call(e)},c=function(e){n.hooks.click.call(e)},h=function(e){n.hooks.pointerCancel.call(e)};n.hooks.init.tap(e.tag,(function(){i.addEventListener("touchstart",o,!0),i.addEventListener("touchend",a,!0),i.addEventListener("touchmove",s,!0),i.addEventListener("touchcancel",h,!0),i.addEventListener("mouseout",u,!0),i.addEventListener("mouseover",l,!0),A.useNativeClickEvent&&i.addEventListener("click",c,!0)})),n.hooks.destroy.tap(e.tag,(function(){i.removeEventListener("touchstart",o,!0),i.removeEventListener("touchend",a,!0),i.removeEventListener("touchmove",s,!0),i.removeEventListener("touchcancel",h,!0),i.removeEventListener("mouseout",u,!0),i.removeEventListener("mouseover",l,!0),A.useNativeClickEvent&&i.removeEventListener("click",c,!0)}))}}])}();il.tag="MobileInteraction";
/*!
   * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
   * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
   * Released under MIT License
   */
/*! *****************************************************************************
  Copyright (c) Microsoft Corporation.

  Permission to use, copy, modify, and/or distribute this software for any
  purpose with or without fee is hereby granted.

  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  PERFORMANCE OF THIS SOFTWARE.
  ***************************************************************************** */
var ol=function(e,t){return ol=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ol(e,t)};function al(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ol(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function sl(e,t,n,r){return new(n||(n=Promise))((function(t,A){function i(e){try{a(r.next(e))}catch(e){A(e)}}function o(e){try{a(r.throw(e))}catch(e){A(e)}}function a(e){e.done?t(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,o)}a((r=r.apply(e,[])).next())}))}function ll(e,t){var n,r,A,i,o={label:0,sent:function(){if(1&A[0])throw A[1];return A[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(A=2&i[0]?r.return:i[0]?r.throw||((A=r.return)&&A.call(r),0):r.next)&&!(A=A.call(r,i[1])).done)return A;switch(r=0,A&&(i=[2&i[0],A.value]),i[0]){case 0:case 1:A=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(A=o.trys,(A=A.length>0&&A[A.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!A||i[1]>A[0]&&i[1]<A[3])){o.label=i[1];break}if(6===i[0]&&o.label<A[1]){o.label=A[1],A=i;break}if(A&&o.label<A[2]){o.label=A[2],o.ops.push(i);break}A[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],r=0}finally{n=A=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}for(var ul=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,A){return new e(this.left+t,this.top+n,this.width+r,this.height+A)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find((function(e){return 0!==e.width}));return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),cl=function(e,t){return ul.fromClientRect(e,t.getBoundingClientRect())},hl=function(e){for(var t=[],n=0,r=e.length;n<r;){var A=e.charCodeAt(n++);if(A>=55296&&A<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&A)<<10)+(1023&i)+65536):(t.push(A),n--)}else t.push(A)}return t},dl=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],A=-1,i="";++A<n;){var o=e[A];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(A+1===n||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},fl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),gl=0;gl<64;gl++)pl[fl.charCodeAt(gl)]=gl;for(var vl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yl="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Cl=0;Cl<64;Cl++)yl[vl.charCodeAt(Cl)]=Cl;for(var Bl=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},ml=function(){function e(e,t,n,r,A,i){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=A,this.data=i}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),wl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",El="undefined"==typeof Uint8Array?[]:new Uint8Array(256),xl=0;xl<64;xl++)El[wl.charCodeAt(xl)]=xl;var Sl=10,Tl=13,Fl=15,bl=17,Il=18,Ll=19,Ql=20,Ul=21,Rl=22,Ml=24,Hl=25,Ol=26,kl=27,Nl=28,_l=30,Dl=32,Pl=33,Gl=34,Kl=35,zl=37,Vl=38,Wl=39,Xl=40,Yl=42,jl=[9001,65288],Zl="×",Jl="÷",ql=function(e,t){var n,r,A,i=function(e){var t,n,r,A,i,o=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),u=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<a;t+=4)n=yl[e.charCodeAt(t)],r=yl[e.charCodeAt(t+1)],A=yl[e.charCodeAt(t+2)],i=yl[e.charCodeAt(t+3)],u[s++]=n<<2|r>>4,u[s++]=(15&r)<<4|A>>2,u[s++]=(3&A)<<6|63&i;return l}(e),o=Array.isArray(i)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n}(i):new Uint32Array(i),a=Array.isArray(i)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n}(i):new Uint16Array(i),s=Bl(a,12,o[4]/2),l=2===o[5]?Bl(a,(24+o[4])/2):(n=o,r=Math.ceil((24+o[4])/4),n.slice?n.slice(r,A):new Uint32Array(Array.prototype.slice.call(n,r,A)));return new ml(o[0],o[1],o[2],o[3],s,l)}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),$l=[_l,36],eu=[1,2,3,5],tu=[Sl,8],nu=[kl,Ol],ru=eu.concat(tu),Au=[Vl,Wl,Xl,Gl,Kl],iu=[Fl,Tl],ou=function(e,t,n,r){var A=r[n];if(Array.isArray(e)?-1!==e.indexOf(A):e===A)for(var i=n;i<=r.length;){if((s=r[++i])===t)return!0;if(s!==Sl)break}if(A===Sl)for(i=n;i>0;){var o=r[--i];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var a=n;a<=r.length;){var s;if((s=r[++a])===t)return!0;if(s!==Sl)break}if(o!==Sl)break}return!1},au=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r!==Sl)return r;n--}return 0},su=function(e,t,n,r,A){if(0===n[r])return Zl;var i=r-1;if(Array.isArray(A)&&!0===A[i])return Zl;var o=i-1,a=i+1,s=t[i],l=o>=0?t[o]:0,u=t[a];if(2===s&&3===u)return Zl;if(-1!==eu.indexOf(s))return"!";if(-1!==eu.indexOf(u))return Zl;if(-1!==tu.indexOf(u))return Zl;if(8===au(i,t))return Jl;if(11===ql.get(e[i]))return Zl;if((s===Dl||s===Pl)&&11===ql.get(e[a]))return Zl;if(7===s||7===u)return Zl;if(9===s)return Zl;if(-1===[Sl,Tl,Fl].indexOf(s)&&9===u)return Zl;if(-1!==[bl,Il,Ll,Ml,Nl].indexOf(u))return Zl;if(au(i,t)===Rl)return Zl;if(ou(23,Rl,i,t))return Zl;if(ou([bl,Il],Ul,i,t))return Zl;if(ou(12,12,i,t))return Zl;if(s===Sl)return Jl;if(23===s||23===u)return Zl;if(16===u||16===s)return Jl;if(-1!==[Tl,Fl,Ul].indexOf(u)||14===s)return Zl;if(36===l&&-1!==iu.indexOf(s))return Zl;if(s===Nl&&36===u)return Zl;if(u===Ql)return Zl;if(-1!==$l.indexOf(u)&&s===Hl||-1!==$l.indexOf(s)&&u===Hl)return Zl;if(s===kl&&-1!==[zl,Dl,Pl].indexOf(u)||-1!==[zl,Dl,Pl].indexOf(s)&&u===Ol)return Zl;if(-1!==$l.indexOf(s)&&-1!==nu.indexOf(u)||-1!==nu.indexOf(s)&&-1!==$l.indexOf(u))return Zl;if(-1!==[kl,Ol].indexOf(s)&&(u===Hl||-1!==[Rl,Fl].indexOf(u)&&t[a+1]===Hl)||-1!==[Rl,Fl].indexOf(s)&&u===Hl||s===Hl&&-1!==[Hl,Nl,Ml].indexOf(u))return Zl;if(-1!==[Hl,Nl,Ml,bl,Il].indexOf(u))for(var c=i;c>=0;){if((h=t[c])===Hl)return Zl;if(-1===[Nl,Ml].indexOf(h))break;c--}if(-1!==[kl,Ol].indexOf(u))for(c=-1!==[bl,Il].indexOf(s)?o:i;c>=0;){var h;if((h=t[c])===Hl)return Zl;if(-1===[Nl,Ml].indexOf(h))break;c--}if(Vl===s&&-1!==[Vl,Wl,Gl,Kl].indexOf(u)||-1!==[Wl,Gl].indexOf(s)&&-1!==[Wl,Xl].indexOf(u)||-1!==[Xl,Kl].indexOf(s)&&u===Xl)return Zl;if(-1!==Au.indexOf(s)&&-1!==[Ql,Ol].indexOf(u)||-1!==Au.indexOf(u)&&s===kl)return Zl;if(-1!==$l.indexOf(s)&&-1!==$l.indexOf(u))return Zl;if(s===Ml&&-1!==$l.indexOf(u))return Zl;if(-1!==$l.concat(Hl).indexOf(s)&&u===Rl&&-1===jl.indexOf(e[a])||-1!==$l.concat(Hl).indexOf(u)&&s===Il)return Zl;if(41===s&&41===u){for(var d=n[i],f=1;d>0&&41===t[--d];)f++;if(f%2!=0)return Zl}return s===Dl&&u===Pl?Zl:Jl},lu=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=function(e,t){void 0===t&&(t="strict");var n=[],r=[],A=[];return e.forEach((function(e,i){var o=ql.get(e);if(o>50?(A.push(!0),o-=50):A.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(i),n.push(16);if(4===o||11===o){if(0===i)return r.push(i),n.push(_l);var a=n[i-1];return-1===ru.indexOf(a)?(r.push(r[i-1]),n.push(a)):(r.push(i),n.push(_l))}return r.push(i),31===o?n.push("strict"===t?Ul:zl):o===Yl||29===o?n.push(_l):43===o?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(zl):n.push(_l):void n.push(o)})),[r,n,A]}(e,t.lineBreak),r=n[0],A=n[1],i=n[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(A=A.map((function(e){return-1!==[Hl,_l,Yl].indexOf(e)?zl:e})));var o="keep-all"===t.wordBreak?i.map((function(t,n){return t&&e[n]>=19968&&e[n]<=40959})):void 0;return[r,A,o]},uu=function(){function e(e,t,n,r){this.codePoints=e,this.required="!"===t,this.start=n,this.end=r}return e.prototype.slice=function(){return dl.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),cu=45,hu=43,du=-1,fu=function(e){return e>=48&&e<=57},pu=function(e){return fu(e)||e>=65&&e<=70||e>=97&&e<=102},gu=function(e){return 10===e||9===e||32===e},vu=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},yu=function(e){return vu(e)||fu(e)||e===cu},Cu=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},Bu=function(e,t){return 92===e&&10!==t},mu=function(e,t,n){return e===cu?vu(t)||Bu(t,n):!!vu(e)||!(92!==e||!Bu(e,t))},wu=function(e,t,n){return e===hu||e===cu?!!fu(t)||46===t&&fu(n):fu(46===e?t:e)},Eu=function(e){var t=0,n=1;e[t]!==hu&&e[t]!==cu||(e[t]===cu&&(n=-1),t++);for(var r=[];fu(e[t]);)r.push(e[t++]);var A=r.length?parseInt(dl.apply(void 0,r),10):0;46===e[t]&&t++;for(var i=[];fu(e[t]);)i.push(e[t++]);var o=i.length,a=o?parseInt(dl.apply(void 0,i),10):0;69!==e[t]&&101!==e[t]||t++;var s=1;e[t]!==hu&&e[t]!==cu||(e[t]===cu&&(s=-1),t++);for(var l=[];fu(e[t]);)l.push(e[t++]);var u=l.length?parseInt(dl.apply(void 0,l),10):0;return n*(A+a*Math.pow(10,-o))*Math.pow(10,s*u)},xu={type:2},Su={type:3},Tu={type:4},Fu={type:13},bu={type:8},Iu={type:21},Lu={type:9},Qu={type:10},Uu={type:11},Ru={type:12},Mu={type:14},Hu={type:23},Ou={type:1},ku={type:25},Nu={type:24},_u={type:26},Du={type:27},Pu={type:28},Gu={type:29},Ku={type:31},zu={type:32},Vu=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(hl(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==zu;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(yu(t)||Bu(n,r)){var A=mu(t,n,r)?2:1;return{type:5,value:this.consumeName(),flags:A}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Fu;break;case 39:return this.consumeStringToken(39);case 40:return xu;case 41:return Su;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Mu;break;case hu:if(wu(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return Tu;case cu:var i=e,o=this.peekCodePoint(0),a=this.peekCodePoint(1);if(wu(i,o,a))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(mu(i,o,a))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(o===cu&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),Nu;break;case 46:if(wu(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var s=this.consumeCodePoint();if(42===s&&47===(s=this.consumeCodePoint()))return this.consumeToken();if(s===du)return this.consumeToken()}break;case 58:return _u;case 59:return Du;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===cu&&this.peekCodePoint(2)===cu)return this.consumeCodePoint(),this.consumeCodePoint(),ku;break;case 64:var l=this.peekCodePoint(0),u=this.peekCodePoint(1),c=this.peekCodePoint(2);if(mu(l,u,c))return{type:7,value:this.consumeName()};break;case 91:return Pu;case 92:if(Bu(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Gu;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),bu;break;case 123:return Uu;case 125:return Ru;case 117:case 85:var h=this.peekCodePoint(0),d=this.peekCodePoint(1);return h!==hu||!pu(d)&&63!==d||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Lu;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Iu;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Qu;break;case du:return zu}return gu(e)?(this.consumeWhiteSpace(),Ku):fu(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):vu(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:dl(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();pu(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(dl.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(dl.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var r=parseInt(dl.apply(void 0,e),16);if(this.peekCodePoint(0)===cu&&pu(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var A=[];pu(t)&&A.length<6;)A.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(dl.apply(void 0,A),16)}}return{type:30,start:r,end:r}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===du)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===du||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),Hu)}for(;;){var r=this.consumeCodePoint();if(r===du||41===r)return{type:22,value:dl.apply(void 0,e)};if(gu(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===du||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:dl.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Hu);if(34===r||39===r||40===r||Cu(r))return this.consumeBadUrlRemnants(),Hu;if(92===r){if(!Bu(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Hu;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;gu(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===du)return;Bu(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var n=Math.min(5e4,e);t+=dl.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",n=0;;){var r=this._value[n];if(r===du||void 0===r||r===e)return{type:0,value:t+=this.consumeStringSlice(n)};if(10===r)return this._value.splice(0,n),Ou;if(92===r){var A=this._value[n+1];A!==du&&void 0!==A&&(10===A?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):Bu(r,A)&&(t+=this.consumeStringSlice(n),t+=dl(this.consumeEscapedCodePoint()),n=-1))}n++}},e.prototype.consumeNumber=function(){var e=[],t=4,n=this.peekCodePoint(0);for(n!==hu&&n!==cu||e.push(this.consumeCodePoint());fu(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===n&&fu(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;fu(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var A=this.peekCodePoint(2);if((69===n||101===n)&&((r===hu||r===cu)&&fu(A)||fu(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;fu(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Eu(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),A=this.peekCodePoint(1),i=this.peekCodePoint(2);return mu(r,A,i)?{type:15,number:t,flags:n,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(pu(e)){for(var t=dl(e);pu(this.peekCodePoint(0))&&t.length<6;)t+=dl(this.consumeCodePoint());gu(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||function(e){return e>=55296&&e<=57343}(n)||n>1114111?65533:n}return e===du?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(yu(t))e+=dl(t);else{if(!Bu(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=dl(this.consumeEscapedCodePoint())}}},e}(),Wu=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Vu;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(32===n.type||$u(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(32===n.type||3===n.type)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?zu:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Xu=function(e){return 15===e.type},Yu=function(e){return 17===e.type},ju=function(e){return 20===e.type},Zu=function(e,t){return ju(e)&&e.value===t},Ju=function(e){return 31!==e.type&&4!==e.type},qu=function(e){var t=[],n=[];return e.forEach((function(e){if(4===e.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}31!==e.type&&n.push(e)})),n.length&&t.push(n),t},$u=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},ec=function(e){return 17===e.type||15===e.type},tc=function(e){return 16===e.type||ec(e)},nc=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},rc={type:17,number:0,flags:4},Ac={type:16,number:50,flags:4},ic={type:16,number:100,flags:4},oc=function(e,t,n){var r=e[0],A=e[1];return[ac(r,t),ac(void 0!==A?A:r,n)]},ac=function(e,t){if(16===e.type)return e.number/100*t;if(Xu(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},sc="grad",lc="turn",uc=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case sc:return Math.PI/200*t.number;case"rad":return t.number;case lc:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},cc=function(e){return 15===e.type&&("deg"===e.unit||e.unit===sc||"rad"===e.unit||e.unit===lc)},hc=function(e){switch(e.filter(ju).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[rc,rc];case"to top":case"bottom":return dc(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[rc,ic];case"to right":case"left":return dc(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[ic,ic];case"to bottom":case"top":return dc(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[ic,rc];case"to left":case"right":return dc(270)}return 0},dc=function(e){return Math.PI*e/180},fc=function(e,t){if(18===t.type){var n=wc[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return n(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),A=t.value.substring(1,2),i=t.value.substring(2,3);return vc(parseInt(r+r,16),parseInt(A+A,16),parseInt(i+i,16),1)}if(4===t.value.length){r=t.value.substring(0,1),A=t.value.substring(1,2),i=t.value.substring(2,3);var o=t.value.substring(3,4);return vc(parseInt(r+r,16),parseInt(A+A,16),parseInt(i+i,16),parseInt(o+o,16)/255)}if(6===t.value.length){r=t.value.substring(0,2),A=t.value.substring(2,4),i=t.value.substring(4,6);return vc(parseInt(r,16),parseInt(A,16),parseInt(i,16),1)}if(8===t.value.length){r=t.value.substring(0,2),A=t.value.substring(2,4),i=t.value.substring(4,6),o=t.value.substring(6,8);return vc(parseInt(r,16),parseInt(A,16),parseInt(i,16),parseInt(o,16)/255)}}if(20===t.type){var a=xc[t.value.toUpperCase()];if(void 0!==a)return a}return xc.TRANSPARENT},pc=function(e){return!(255&e)},gc=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,A=255&e>>24;return t<255?"rgba("+A+","+r+","+n+","+t/255+")":"rgb("+A+","+r+","+n+")"},vc=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(255*r))>>>0},yc=function(e,t){if(17===e.type)return e.number;if(16===e.type){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},Cc=function(e,t){var n=t.filter(Ju);if(3===n.length){var r=n.map(yc),A=r[0],i=r[1],o=r[2];return vc(A,i,o,1)}if(4===n.length){var a=n.map(yc),s=(A=a[0],i=a[1],o=a[2],a[3]);return vc(A,i,o,s)}return 0};function Bc(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var mc=function(e,t){var n=t.filter(Ju),r=n[0],A=n[1],i=n[2],o=n[3],a=(17===r.type?dc(r.number):uc(e,r))/(2*Math.PI),s=tc(A)?A.number/100:0,l=tc(i)?i.number/100:0,u=void 0!==o&&tc(o)?ac(o,1):1;if(0===s)return vc(255*l,255*l,255*l,1);var c=l<=.5?l*(s+1):l+s-l*s,h=2*l-c,d=Bc(h,c,a+1/3),f=Bc(h,c,a),p=Bc(h,c,a-1/3);return vc(255*d,255*f,255*p,u)},wc={hsl:mc,hsla:mc,rgb:Cc,rgba:Cc},Ec=function(e,t){return fc(e,Wu.create(t).parseComponentValue())},xc={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Sc={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(ju(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Tc={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fc=function(e,t){var n=fc(e,t[0]),r=t[1];return r&&tc(r)?{color:n,stop:r}:{color:n,stop:null}},bc=function(e,t){var n=e[0],r=e[e.length-1];null===n.stop&&(n.stop=rc),null===r.stop&&(r.stop=ic);for(var A=[],i=0,o=0;o<e.length;o++){var a=e[o].stop;if(null!==a){var s=ac(a,t);s>i?A.push(s):A.push(i),i=s}else A.push(null)}var l=null;for(o=0;o<A.length;o++){var u=A[o];if(null===u)null===l&&(l=o);else if(null!==l){for(var c=o-l,h=(u-A[l-1])/(c+1),d=1;d<=c;d++)A[l+d-1]=h*d;l=null}}return e.map((function(e,n){return{color:e.color,stop:Math.max(Math.min(1,A[n]/t),0)}}))},Ic=function(e,t,n){var r="number"==typeof e?e:function(e,t,n){var r=t/2,A=n/2,i=ac(e[0],t)-r,o=A-ac(e[1],n);return(Math.atan2(o,i)+2*Math.PI)%(2*Math.PI)}(e,t,n),A=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),i=t/2,o=n/2,a=A/2,s=Math.sin(r-Math.PI/2)*a,l=Math.cos(r-Math.PI/2)*a;return[A,i-l,i+l,o-s,o+s]},Lc=function(e,t){return Math.sqrt(e*e+t*t)},Qc=function(e,t,n,r,A){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var i=t[0],o=t[1],a=Lc(n-i,r-o);return(A?a<e.optimumDistance:a>e.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e}),{optimumDistance:A?1/0:-1/0,optimumCorner:null}).optimumCorner},Uc=function(e,t){var n=dc(180),r=[];return qu(t).forEach((function(t,A){if(0===A){var i=t[0];if(20===i.type&&-1!==["top","left","right","bottom"].indexOf(i.value))return void(n=hc(t));if(cc(i))return void(n=(uc(e,i)+dc(270))%dc(360))}var o=Fc(e,t);r.push(o)})),{angle:n,stops:r,type:1}},Rc="closest-side",Mc="farthest-side",Hc="closest-corner",Oc="farthest-corner",kc="circle",Nc="ellipse",_c="cover",Dc="contain",Pc=function(e,t){var n=0,r=3,A=[],i=[];return qu(t).forEach((function(t,o){var a=!0;if(0===o?a=t.reduce((function(e,t){if(ju(t))switch(t.value){case"center":return i.push(Ac),!1;case"top":case"left":return i.push(rc),!1;case"right":case"bottom":return i.push(ic),!1}else if(tc(t)||ec(t))return i.push(t),!1;return e}),a):1===o&&(a=t.reduce((function(e,t){if(ju(t))switch(t.value){case kc:return n=0,!1;case Nc:return n=1,!1;case Dc:case Rc:return r=0,!1;case Mc:return r=1,!1;case Hc:return r=2,!1;case _c:case Oc:return r=3,!1}else if(ec(t)||tc(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),a)),a){var s=Fc(e,t);A.push(s)}})),{size:r,shape:n,stops:A,position:i,type:2}},Gc=function(e,t){if(22===t.type){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(18===t.type){var r=zc[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)};var Kc,zc={"linear-gradient":function(e,t){var n=dc(180),r=[];return qu(t).forEach((function(t,A){if(0===A){var i=t[0];if(20===i.type&&"to"===i.value)return void(n=hc(t));if(cc(i))return void(n=uc(e,i))}var o=Fc(e,t);r.push(o)})),{angle:n,stops:r,type:1}},"-moz-linear-gradient":Uc,"-ms-linear-gradient":Uc,"-o-linear-gradient":Uc,"-webkit-linear-gradient":Uc,"radial-gradient":function(e,t){var n=0,r=3,A=[],i=[];return qu(t).forEach((function(t,o){var a=!0;if(0===o){var s=!1;a=t.reduce((function(e,t){if(s)if(ju(t))switch(t.value){case"center":return i.push(Ac),e;case"top":case"left":return i.push(rc),e;case"right":case"bottom":return i.push(ic),e}else(tc(t)||ec(t))&&i.push(t);else if(ju(t))switch(t.value){case kc:return n=0,!1;case Nc:return n=1,!1;case"at":return s=!0,!1;case Rc:return r=0,!1;case _c:case Mc:return r=1,!1;case Dc:case Hc:return r=2,!1;case Oc:return r=3,!1}else if(ec(t)||tc(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),a)}if(a){var l=Fc(e,t);A.push(l)}})),{size:r,shape:n,stops:A,position:i,type:2}},"-moz-radial-gradient":Pc,"-ms-radial-gradient":Pc,"-o-radial-gradient":Pc,"-webkit-radial-gradient":Pc,"-webkit-gradient":function(e,t){var n=dc(180),r=[],A=1;return qu(t).forEach((function(t,n){var i=t[0];if(0===n){if(ju(i)&&"linear"===i.value)return void(A=1);if(ju(i)&&"radial"===i.value)return void(A=2)}if(18===i.type)if("from"===i.name){var o=fc(e,i.values[0]);r.push({stop:rc,color:o})}else if("to"===i.name){o=fc(e,i.values[0]);r.push({stop:ic,color:o})}else if("color-stop"===i.name){var a=i.values.filter(Ju);if(2===a.length){o=fc(e,a[1]);var s=a[0];Yu(s)&&r.push({stop:{type:16,number:100*s.number,flags:s.flags},color:o})}}})),1===A?{angle:(n+dc(180))%dc(360),stops:r,type:A}:{size:3,shape:0,stops:r,position:[],type:A}}},Vc={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t.filter((function(e){return Ju(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!zc[e.name])}(e)})).map((function(t){return Gc(e,t)}))}},Wc={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(ju(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Xc={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return qu(t).map((function(e){return e.filter(tc)})).map(nc)}},Yc={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return qu(t).map((function(e){return e.filter(ju).map((function(e){return e.value})).join(" ")})).map(jc)}},jc=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(Kc||(Kc={}));var Zc,Jc={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return qu(t).map((function(e){return e.filter(qc)}))}},qc=function(e){return ju(e)||tc(e)},$c=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},eh=$c("top"),th=$c("right"),nh=$c("bottom"),rh=$c("left"),Ah=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return nc(t.filter(tc))}}},ih=Ah("top-left"),oh=Ah("top-right"),ah=Ah("bottom-right"),sh=Ah("bottom-left"),lh=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},uh=lh("top"),ch=lh("right"),hh=lh("bottom"),dh=lh("left"),fh=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Xu(t)?t.number:0}}},ph=fh("top"),gh=fh("right"),vh=fh("bottom"),yh=fh("left"),Ch={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Bh={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},mh={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(ju).reduce((function(e,t){return e|wh(t.value)}),0)}},wh=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Eh={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},xh={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(Zc||(Zc={}));var Sh,Th={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?Zc.STRICT:Zc.NORMAL}},Fh={name:"line-height",initialValue:"normal",prefix:!1,type:4},bh=function(e,t){return ju(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:tc(e)?ac(e,t):t},Ih={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:Gc(e,t)}},Lh={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},Qh={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Uh=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Rh=Uh("top"),Mh=Uh("right"),Hh=Uh("bottom"),Oh=Uh("left"),kh={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(ju).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},Nh={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},_h=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Dh=_h("top"),Ph=_h("right"),Gh=_h("bottom"),Kh=_h("left"),zh={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},Vh={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Wh={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Zu(t[0],"none")?[]:qu(t).map((function(t){for(var n={color:xc.TRANSPARENT,offsetX:rc,offsetY:rc,blur:rc},r=0,A=0;A<t.length;A++){var i=t[A];ec(i)?(0===r?n.offsetX=i:1===r?n.offsetY=i:n.blur=i,r++):n.color=fc(e,i)}return n}))}},Xh={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Yh={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var n=jh[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return n(t.values)}return null}},jh={matrix:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),n=t[0],r=t[1];t[2],t[3];var A=t[4],i=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var o=t[12],a=t[13];return t[14],t[15],16===t.length?[n,r,A,i,o,a]:null}},Zh={type:16,number:50,flags:4},Jh=[Zh,Zh],qh={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var n=t.filter(tc);return 2!==n.length?Jh:[n[0],n[1]]}},$h={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(Sh||(Sh={}));for(var ed={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return Sh.BREAK_ALL;case"keep-all":return Sh.KEEP_ALL;default:return Sh.NORMAL}}},td={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(Yu(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},nd=function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")},rd={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return Yu(t)?t.number:1}},Ad={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},id={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(ju).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},od={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach((function(e){switch(e.type){case 20:case 0:n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(" ")),n.length=0}})),n.length&&r.push(n.join(" ")),r.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},ad={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},sd={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return Yu(t)?t.number:ju(t)&&"bold"===t.value?700:400}},ld={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(ju).map((function(e){return e.value}))}},ud={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},cd=function(e,t){return!!(e&t)},hd={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(Xu).map((function(t){return nd(e,t)}))}},dd={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Zu(t[0],"none")?[]:qu(t).map((function(t){for(var n={color:255,offsetX:rc,offsetY:rc,blur:rc,spread:rc,inset:!1},r=0,A=0;A<t.length;A++){var i=t[A];Zu(i,"inset")?n.inset=!0:ec(i)?(0===r?n.offsetX=i:1===r?n.offsetY=i:2===r?n.blur=i:n.spread=i,r++):n.color=fc(e,i)}return n}))}},fd={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var n=[];return t.filter(ju).forEach((function(e){switch(e.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2)}})),[0,1,2].forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),n}},pd={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},gd={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Xu(t)?t.number:0}},vd=function(){function e(e,t){var n,r;this.animationDuration=yd(e,hd,t.animationDuration),this.backgroundClip=yd(e,Sc,t.backgroundClip),this.backgroundColor=yd(e,Tc,t.backgroundColor),this.backgroundImage=yd(e,Vc,t.backgroundImage),this.backgroundOrigin=yd(e,Wc,t.backgroundOrigin),this.backgroundPosition=yd(e,Xc,t.backgroundPosition),this.backgroundRepeat=yd(e,Yc,t.backgroundRepeat),this.backgroundSize=yd(e,Jc,t.backgroundSize),this.borderTopColor=yd(e,eh,t.borderTopColor),this.borderRightColor=yd(e,th,t.borderRightColor),this.borderBottomColor=yd(e,nh,t.borderBottomColor),this.borderLeftColor=yd(e,rh,t.borderLeftColor),this.borderTopLeftRadius=yd(e,ih,t.borderTopLeftRadius),this.borderTopRightRadius=yd(e,oh,t.borderTopRightRadius),this.borderBottomRightRadius=yd(e,ah,t.borderBottomRightRadius),this.borderBottomLeftRadius=yd(e,sh,t.borderBottomLeftRadius),this.borderTopStyle=yd(e,uh,t.borderTopStyle),this.borderRightStyle=yd(e,ch,t.borderRightStyle),this.borderBottomStyle=yd(e,hh,t.borderBottomStyle),this.borderLeftStyle=yd(e,dh,t.borderLeftStyle),this.borderTopWidth=yd(e,ph,t.borderTopWidth),this.borderRightWidth=yd(e,gh,t.borderRightWidth),this.borderBottomWidth=yd(e,vh,t.borderBottomWidth),this.borderLeftWidth=yd(e,yh,t.borderLeftWidth),this.boxShadow=yd(e,dd,t.boxShadow),this.color=yd(e,Ch,t.color),this.direction=yd(e,Bh,t.direction),this.display=yd(e,mh,t.display),this.float=yd(e,Eh,t.cssFloat),this.fontFamily=yd(e,od,t.fontFamily),this.fontSize=yd(e,ad,t.fontSize),this.fontStyle=yd(e,ud,t.fontStyle),this.fontVariant=yd(e,ld,t.fontVariant),this.fontWeight=yd(e,sd,t.fontWeight),this.letterSpacing=yd(e,xh,t.letterSpacing),this.lineBreak=yd(e,Th,t.lineBreak),this.lineHeight=yd(e,Fh,t.lineHeight),this.listStyleImage=yd(e,Ih,t.listStyleImage),this.listStylePosition=yd(e,Lh,t.listStylePosition),this.listStyleType=yd(e,Qh,t.listStyleType),this.marginTop=yd(e,Rh,t.marginTop),this.marginRight=yd(e,Mh,t.marginRight),this.marginBottom=yd(e,Hh,t.marginBottom),this.marginLeft=yd(e,Oh,t.marginLeft),this.opacity=yd(e,rd,t.opacity);var A=yd(e,kh,t.overflow);this.overflowX=A[0],this.overflowY=A[A.length>1?1:0],this.overflowWrap=yd(e,Nh,t.overflowWrap),this.paddingTop=yd(e,Dh,t.paddingTop),this.paddingRight=yd(e,Ph,t.paddingRight),this.paddingBottom=yd(e,Gh,t.paddingBottom),this.paddingLeft=yd(e,Kh,t.paddingLeft),this.paintOrder=yd(e,fd,t.paintOrder),this.position=yd(e,Vh,t.position),this.textAlign=yd(e,zh,t.textAlign),this.textDecorationColor=yd(e,Ad,null!==(n=t.textDecorationColor)&&void 0!==n?n:t.color),this.textDecorationLine=yd(e,id,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=yd(e,Wh,t.textShadow),this.textTransform=yd(e,Xh,t.textTransform),this.transform=yd(e,Yh,t.transform),this.transformOrigin=yd(e,qh,t.transformOrigin),this.visibility=yd(e,$h,t.visibility),this.webkitTextStrokeColor=yd(e,pd,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=yd(e,gd,t.webkitTextStrokeWidth),this.wordBreak=yd(e,ed,t.wordBreak),this.zIndex=yd(e,td,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return pc(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return cd(this.display,4)||cd(this.display,33554432)||cd(this.display,268435456)||cd(this.display,536870912)||cd(this.display,67108864)||cd(this.display,134217728)},e}(),yd=function(e,t,n){var r=new Vu,A=null!=n?n.toString():t.initialValue;r.write(A);var i=new Wu(r.read());switch(t.type){case 2:var o=i.parseComponentValue();return t.parse(e,ju(o)?o.value:t.initialValue);case 0:return t.parse(e,i.parseComponentValue());case 1:return t.parse(e,i.parseComponentValues());case 4:return i.parseComponentValue();case 3:switch(t.format){case"angle":return uc(e,i.parseComponentValue());case"color":return fc(e,i.parseComponentValue());case"image":return Gc(e,i.parseComponentValue());case"length":var a=i.parseComponentValue();return ec(a)?a:rc;case"length-percentage":var s=i.parseComponentValue();return tc(s)?s:rc;case"time":return nd(e,i.parseComponentValue())}}},Cd=function(e,t){var n=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===n||t===n},Bd=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Cd(t,3),this.styles=new vd(e,window.getComputedStyle(t,null)),Sf(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=cl(this.context,t),Cd(t,4)&&(this.flags|=16)},md="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wd="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ed=0;Ed<64;Ed++)wd[md.charCodeAt(Ed)]=Ed;for(var xd=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},Sd=function(){function e(e,t,n,r,A,i){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=A,this.data=i}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Td="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fd="undefined"==typeof Uint8Array?[]:new Uint8Array(256),bd=0;bd<64;bd++)Fd[Td.charCodeAt(bd)]=bd;var Id,Ld=8,Qd=9,Ud=11,Rd=12,Md=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],A=-1,i="";++A<n;){var o=e[A];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(A+1===n||r.length>16384)&&(i+=String.fromCharCode.apply(String,r),r.length=0)}return i},Hd=function(e,t){var n,r,A,i=function(e){var t,n,r,A,i,o=.75*e.length,a=e.length,s=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),u=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<a;t+=4)n=wd[e.charCodeAt(t)],r=wd[e.charCodeAt(t+1)],A=wd[e.charCodeAt(t+2)],i=wd[e.charCodeAt(t+3)],u[s++]=n<<2|r>>4,u[s++]=(15&r)<<4|A>>2,u[s++]=(3&A)<<6|63&i;return l}(e),o=Array.isArray(i)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n}(i):new Uint32Array(i),a=Array.isArray(i)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n}(i):new Uint16Array(i),s=xd(a,12,o[4]/2),l=2===o[5]?xd(a,(24+o[4])/2):(n=o,r=Math.ceil((24+o[4])/4),n.slice?n.slice(r,A):new Uint32Array(Array.prototype.slice.call(n,r,A)));return new Sd(o[0],o[1],o[2],o[3],s,l)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),Od="×",kd=function(e){return Hd.get(e)},Nd=function(e,t,n){var r=n-2,A=t[r],i=t[n-1],o=t[n];if(2===i&&3===o)return Od;if(2===i||3===i||4===i)return"÷";if(2===o||3===o||4===o)return"÷";if(i===Ld&&-1!==[Ld,Qd,Ud,Rd].indexOf(o))return Od;if(!(i!==Ud&&i!==Qd||o!==Qd&&10!==o))return Od;if((i===Rd||10===i)&&10===o)return Od;if(13===o||5===o)return Od;if(7===o)return Od;if(1===i)return Od;if(13===i&&14===o){for(;5===A;)A=t[--r];if(14===A)return Od}if(15===i&&15===o){for(var a=0;15===A;)a++,A=t[--r];if(a%2==0)return Od}return"÷"},_d=function(e){var t=function(e){for(var t=[],n=0,r=e.length;n<r;){var A=e.charCodeAt(n++);if(A>=55296&&A<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&A)<<10)+(1023&i)+65536):(t.push(A),n--)}else t.push(A)}return t}(e),n=t.length,r=0,A=0,i=t.map(kd);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=Od;r<n&&(e=Nd(0,i,++r))===Od;);if(e!==Od||r===n){var o=Md.apply(null,t.slice(A,r));return A=r,{value:o,done:!1}}return{done:!0,value:null}}}},Dd=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},Pd=function(e,t,n,r,A){var i="http://www.w3.org/2000/svg",o=document.createElementNS(i,"svg"),a=document.createElementNS(i,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",n.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(a),a.appendChild(A),o},Gd=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Kd={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var n=e.createElement("boundtest");n.style.height="123px",n.style.display="block",e.body.appendChild(n),t.selectNode(n);var r=t.getBoundingClientRect(),A=Math.round(r.height);if(e.body.removeChild(n),123===A)return!0}}return!1}(document);return Object.defineProperty(Kd,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Kd.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var n=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var r=t.firstChild,A=hl(r.data).map((function(e){return dl(e)})),i=0,o={},a=A.every((function(e,t){n.setStart(r,i),n.setEnd(r,i+e.length);var A=n.getBoundingClientRect();i+=e.length;var a=A.x>o.x||A.y>o.y;return o=A,0===t||a}));return e.body.removeChild(t),a}(document);return Object.defineProperty(Kd,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),n.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(Kd,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),n=100;t.width=n,t.height=n;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var A=new Image,i=t.toDataURL();A.src=i;var o=Pd(n,n,0,0,A);return r.fillStyle="red",r.fillRect(0,0,n,n),Gd(o).then((function(t){r.drawImage(t,0,0);var A=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var o=e.createElement("div");return o.style.backgroundImage="url("+i+")",o.style.height=n+"px",Dd(A)?Gd(Pd(n,n,0,0,o)):Promise.reject(!1)})).then((function(e){return r.drawImage(e,0,0),Dd(r.getImageData(0,0,n,n).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Kd,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Kd,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Kd,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Kd,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Kd,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},zd=function(e,t){this.text=e,this.bounds=t},Vd=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var A=t.parentNode;if(A){A.replaceChild(r,t);var i=cl(e,r);return r.firstChild&&A.replaceChild(r.firstChild,r),i}}return ul.EMPTY},Wd=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var A=r.createRange();return A.setStart(e,t),A.setEnd(e,t+n),A},Xd=function(e){if(Kd.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,n=_d(e),r=[];!(t=n.next()).done;)t.value&&r.push(t.value.slice());return r}(e)},Yd=function(e,t){return 0!==t.letterSpacing?Xd(e):function(e,t){if(Kd.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map((function(e){return e.segment}))}return Zd(e,t)}(e,t)},jd=[32,160,4961,65792,65793,4153,4241],Zd=function(e,t){for(var n,r=function(e,t){var n=hl(e),r=lu(n,t),A=r[0],i=r[1],o=r[2],a=n.length,s=0,l=0;return{next:function(){if(l>=a)return{done:!0,value:null};for(var e=Zl;l<a&&(e=su(n,i,A,++l,o))===Zl;);if(e!==Zl||l===a){var t=new uu(n,e,s,l);return s=l,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),A=[],i=function(){if(n.value){var e=n.value.slice(),t=hl(e),r="";t.forEach((function(e){-1===jd.indexOf(e)?r+=dl(e):(r.length&&A.push(r),A.push(dl(e)),r="")})),r.length&&A.push(r)}};!(n=r.next()).done;)i();return A},Jd=function(e,t,n){this.text=qd(t.data,n.textTransform),this.textBounds=function(e,t,n,r){var A=Yd(t,n),i=[],o=0;return A.forEach((function(t){if(n.textDecorationLine.length||t.trim().length>0)if(Kd.SUPPORT_RANGE_BOUNDS){var A=Wd(r,o,t.length).getClientRects();if(A.length>1){var a=Xd(t),s=0;a.forEach((function(t){i.push(new zd(t,ul.fromDOMRectList(e,Wd(r,s+o,t.length).getClientRects()))),s+=t.length}))}else i.push(new zd(t,ul.fromDOMRectList(e,A)))}else{var l=r.splitText(t.length);i.push(new zd(t,Vd(e,r))),r=l}else Kd.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length})),i}(e,this.text,n,t)},qd=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace($d,ef);case 2:return e.toUpperCase();default:return e}},$d=/(^|\s|:|-|\(|\))([a-z])/g,ef=function(e,t,n){return e.length>0?t+n.toUpperCase():e},tf=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return al(t,e),t}(Bd),nf=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return al(t,e),t}(Bd),rf=function(e){function t(t,n){var r=e.call(this,t,n)||this,A=new XMLSerializer,i=cl(t,n);return n.setAttribute("width",i.width+"px"),n.setAttribute("height",i.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(A.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return al(t,e),t}(Bd),Af=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return al(t,e),t}(Bd),of=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed="boolean"==typeof n.reversed&&!0===n.reversed,r}return al(t,e),t}(Bd),af=[{type:15,flags:0,unit:"px",number:3}],sf=[{type:16,flags:0,number:50}],lf="checkbox",uf="radio",cf="password",hf=707406591,df=function(e){function t(t,n){var r,A=e.call(this,t,n)||this;switch(A.type=n.type.toLowerCase(),A.checked=n.checked,A.value=function(e){var t=e.type===cf?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t}(n),A.type!==lf&&A.type!==uf||(A.styles.backgroundColor=3739148031,A.styles.borderTopColor=A.styles.borderRightColor=A.styles.borderBottomColor=A.styles.borderLeftColor=2779096575,A.styles.borderTopWidth=A.styles.borderRightWidth=A.styles.borderBottomWidth=A.styles.borderLeftWidth=1,A.styles.borderTopStyle=A.styles.borderRightStyle=A.styles.borderBottomStyle=A.styles.borderLeftStyle=1,A.styles.backgroundClip=[0],A.styles.backgroundOrigin=[0],A.bounds=(r=A.bounds).width>r.height?new ul(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new ul(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r),A.type){case lf:A.styles.borderTopRightRadius=A.styles.borderTopLeftRadius=A.styles.borderBottomRightRadius=A.styles.borderBottomLeftRadius=af;break;case uf:A.styles.borderTopRightRadius=A.styles.borderTopLeftRadius=A.styles.borderBottomRightRadius=A.styles.borderBottomLeftRadius=sf}return A}return al(t,e),t}(Bd),ff=function(e){function t(t,n){var r=e.call(this,t,n)||this,A=n.options[n.selectedIndex||0];return r.value=A&&A.text||"",r}return al(t,e),t}(Bd),pf=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return al(t,e),t}(Bd),gf=function(e){function t(t,n){var r=e.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=Bf(t,n.contentWindow.document.documentElement);var A=n.contentWindow.document.documentElement?Ec(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):xc.TRANSPARENT,i=n.contentWindow.document.body?Ec(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):xc.TRANSPARENT;r.backgroundColor=pc(A)?pc(i)?r.styles.backgroundColor:i:A}}catch(e){}return r}return al(t,e),t}(Bd),vf=["OL","UL","MENU"],yf=function(e,t,n,r){for(var A=t.firstChild,i=void 0;A;A=i)if(i=A.nextSibling,Ef(A)&&A.data.trim().length>0)n.textNodes.push(new Jd(e,A,n.styles));else if(xf(A))if(kf(A)&&A.assignedNodes)A.assignedNodes().forEach((function(t){return yf(e,t,n,r)}));else{var o=Cf(e,A);o.styles.isVisible()&&(mf(A,o,r)?o.flags|=4:wf(o.styles)&&(o.flags|=2),-1!==vf.indexOf(A.tagName)&&(o.flags|=8),n.elements.push(o),A.slot,A.shadowRoot?yf(e,A.shadowRoot,o,r):Hf(A)||Lf(A)||Of(A)||yf(e,A,o,r))}},Cf=function(e,t){return Rf(t)?new tf(e,t):Uf(t)?new nf(e,t):Lf(t)?new rf(e,t):Ff(t)?new Af(e,t):bf(t)?new of(e,t):If(t)?new df(e,t):Of(t)?new ff(e,t):Hf(t)?new pf(e,t):Mf(t)?new gf(e,t):new Bd(e,t)},Bf=function(e,t){var n=Cf(e,t);return n.flags|=4,yf(e,t,n,n),n},mf=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Qf(e)&&n.styles.isTransparent()},wf=function(e){return e.isPositioned()||e.isFloating()},Ef=function(e){return e.nodeType===Node.TEXT_NODE},xf=function(e){return e.nodeType===Node.ELEMENT_NODE},Sf=function(e){return xf(e)&&void 0!==e.style&&!Tf(e)},Tf=function(e){return"object"==typeof e.className},Ff=function(e){return"LI"===e.tagName},bf=function(e){return"OL"===e.tagName},If=function(e){return"INPUT"===e.tagName},Lf=function(e){return"svg"===e.tagName},Qf=function(e){return"BODY"===e.tagName},Uf=function(e){return"CANVAS"===e.tagName},Rf=function(e){return"IMG"===e.tagName},Mf=function(e){return"IFRAME"===e.tagName},Hf=function(e){return"TEXTAREA"===e.tagName},Of=function(e){return"SELECT"===e.tagName},kf=function(e){return"SLOT"===e.tagName},Nf={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},_f={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Df={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Pf={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Gf=function(e,t,n,r,A,i){return e<t||e>n?Jf(e,A,i.length>0):r.integers.reduce((function(t,n,A){for(;e>=n;)e-=n,t+=r.values[A];return t}),"")+i},Kf=function(e,t,n,r){var A="";do{n||e--,A=r(e)+A,e/=t}while(e*t>=t);return A},zf=function(e,t,n,r,A){var i=n-t+1;return(e<0?"-":"")+(Kf(Math.abs(e),i,r,(function(e){return dl(Math.floor(e%i)+t)}))+A)},Vf=function(e,t,n){void 0===n&&(n=". ");var r=t.length;return Kf(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+n},Wf=function(e,t,n,r,A,i){if(e<-9999||e>9999)return Jf(e,4,A.length>0);var o=Math.abs(e),a=A;if(0===o)return t[0]+a;for(var s=0;o>0&&s<=4;s++){var l=o%10;0===l&&cd(i,1)&&""!==a?a=t[l]+a:l>1||1===l&&0===s||1===l&&1===s&&cd(i,2)||1===l&&1===s&&cd(i,4)&&e>100||1===l&&s>1&&cd(i,8)?a=t[l]+(s>0?n[s-1]:"")+a:1===l&&s>0&&(a=n[s-1]+a),o=Math.floor(o/10)}return(e<0?r:"")+a},Xf="十百千萬",Yf="拾佰仟萬",jf="マイナス",Zf="마이너스",Jf=function(e,t,n){var r=n?". ":"",A=n?"、":"",i=n?", ":"",o=n?" ":"";switch(t){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var a=zf(e,48,57,!0,r);return a.length<4?"0"+a:a;case 4:return Vf(e,"〇一二三四五六七八九",A);case 6:return Gf(e,1,3999,Nf,3,r).toLowerCase();case 7:return Gf(e,1,3999,Nf,3,r);case 8:return zf(e,945,969,!1,r);case 9:return zf(e,97,122,!1,r);case 10:return zf(e,65,90,!1,r);case 11:return zf(e,1632,1641,!0,r);case 12:case 49:return Gf(e,1,9999,_f,3,r);case 35:return Gf(e,1,9999,_f,3,r).toLowerCase();case 13:return zf(e,2534,2543,!0,r);case 14:case 30:return zf(e,6112,6121,!0,r);case 15:return Vf(e,"子丑寅卯辰巳午未申酉戌亥",A);case 16:return Vf(e,"甲乙丙丁戊己庚辛壬癸",A);case 17:case 48:return Wf(e,"零一二三四五六七八九",Xf,"負",A,14);case 47:return Wf(e,"零壹貳參肆伍陸柒捌玖",Yf,"負",A,15);case 42:return Wf(e,"零一二三四五六七八九",Xf,"负",A,14);case 41:return Wf(e,"零壹贰叁肆伍陆柒捌玖",Yf,"负",A,15);case 26:return Wf(e,"〇一二三四五六七八九","十百千万",jf,A,0);case 25:return Wf(e,"零壱弐参四伍六七八九","拾百千万",jf,A,7);case 31:return Wf(e,"영일이삼사오육칠팔구","십백천만",Zf,i,7);case 33:return Wf(e,"零一二三四五六七八九","十百千萬",Zf,i,0);case 32:return Wf(e,"零壹貳參四五六七八九","拾百千",Zf,i,7);case 18:return zf(e,2406,2415,!0,r);case 20:return Gf(e,1,19999,Pf,3,r);case 21:return zf(e,2790,2799,!0,r);case 22:return zf(e,2662,2671,!0,r);case 22:return Gf(e,1,10999,Df,3,r);case 23:return Vf(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Vf(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return zf(e,3302,3311,!0,r);case 28:return Vf(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",A);case 29:return Vf(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",A);case 34:return zf(e,3792,3801,!0,r);case 37:return zf(e,6160,6169,!0,r);case 38:return zf(e,4160,4169,!0,r);case 39:return zf(e,2918,2927,!0,r);case 40:return zf(e,1776,1785,!0,r);case 43:return zf(e,3046,3055,!0,r);case 44:return zf(e,3174,3183,!0,r);case 45:return zf(e,3664,3673,!0,r);case 46:return zf(e,3872,3881,!0,r);default:return zf(e,48,57,!0,r)}};!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(Id||(Id={}));var qf,$f=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),ep=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),tp=function(e,t,n){return new ep(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},np=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=tp(this.start,this.startControl,t),A=tp(this.startControl,this.endControl,t),i=tp(this.endControl,this.end,t),o=tp(r,A,t),a=tp(A,i,t),s=tp(o,a,t);return n?new e(this.start,r,o,s):new e(s,a,i,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),rp=function(e){return 1===e.type},Ap=function(e){var t=e.styles,n=e.bounds,r=oc(t.borderTopLeftRadius,n.width,n.height),A=r[0],i=r[1],o=oc(t.borderTopRightRadius,n.width,n.height),a=o[0],s=o[1],l=oc(t.borderBottomRightRadius,n.width,n.height),u=l[0],c=l[1],h=oc(t.borderBottomLeftRadius,n.width,n.height),d=h[0],f=h[1],p=[];p.push((A+a)/n.width),p.push((d+u)/n.width),p.push((i+f)/n.height),p.push((s+c)/n.height);var g=Math.max.apply(Math,p);g>1&&(A/=g,i/=g,a/=g,s/=g,u/=g,c/=g,d/=g,f/=g);var v=n.width-a,y=n.height-c,C=n.width-u,B=n.height-f,m=t.borderTopWidth,w=t.borderRightWidth,E=t.borderBottomWidth,x=t.borderLeftWidth,S=ac(t.paddingTop,e.bounds.width),T=ac(t.paddingRight,e.bounds.width),F=ac(t.paddingBottom,e.bounds.width),b=ac(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=A>0||i>0?ip(n.left+x/3,n.top+m/3,A-x/3,i-m/3,qf.TOP_LEFT):new ep(n.left+x/3,n.top+m/3),this.topRightBorderDoubleOuterBox=A>0||i>0?ip(n.left+v,n.top+m/3,a-w/3,s-m/3,qf.TOP_RIGHT):new ep(n.left+n.width-w/3,n.top+m/3),this.bottomRightBorderDoubleOuterBox=u>0||c>0?ip(n.left+C,n.top+y,u-w/3,c-E/3,qf.BOTTOM_RIGHT):new ep(n.left+n.width-w/3,n.top+n.height-E/3),this.bottomLeftBorderDoubleOuterBox=d>0||f>0?ip(n.left+x/3,n.top+B,d-x/3,f-E/3,qf.BOTTOM_LEFT):new ep(n.left+x/3,n.top+n.height-E/3),this.topLeftBorderDoubleInnerBox=A>0||i>0?ip(n.left+2*x/3,n.top+2*m/3,A-2*x/3,i-2*m/3,qf.TOP_LEFT):new ep(n.left+2*x/3,n.top+2*m/3),this.topRightBorderDoubleInnerBox=A>0||i>0?ip(n.left+v,n.top+2*m/3,a-2*w/3,s-2*m/3,qf.TOP_RIGHT):new ep(n.left+n.width-2*w/3,n.top+2*m/3),this.bottomRightBorderDoubleInnerBox=u>0||c>0?ip(n.left+C,n.top+y,u-2*w/3,c-2*E/3,qf.BOTTOM_RIGHT):new ep(n.left+n.width-2*w/3,n.top+n.height-2*E/3),this.bottomLeftBorderDoubleInnerBox=d>0||f>0?ip(n.left+2*x/3,n.top+B,d-2*x/3,f-2*E/3,qf.BOTTOM_LEFT):new ep(n.left+2*x/3,n.top+n.height-2*E/3),this.topLeftBorderStroke=A>0||i>0?ip(n.left+x/2,n.top+m/2,A-x/2,i-m/2,qf.TOP_LEFT):new ep(n.left+x/2,n.top+m/2),this.topRightBorderStroke=A>0||i>0?ip(n.left+v,n.top+m/2,a-w/2,s-m/2,qf.TOP_RIGHT):new ep(n.left+n.width-w/2,n.top+m/2),this.bottomRightBorderStroke=u>0||c>0?ip(n.left+C,n.top+y,u-w/2,c-E/2,qf.BOTTOM_RIGHT):new ep(n.left+n.width-w/2,n.top+n.height-E/2),this.bottomLeftBorderStroke=d>0||f>0?ip(n.left+x/2,n.top+B,d-x/2,f-E/2,qf.BOTTOM_LEFT):new ep(n.left+x/2,n.top+n.height-E/2),this.topLeftBorderBox=A>0||i>0?ip(n.left,n.top,A,i,qf.TOP_LEFT):new ep(n.left,n.top),this.topRightBorderBox=a>0||s>0?ip(n.left+v,n.top,a,s,qf.TOP_RIGHT):new ep(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||c>0?ip(n.left+C,n.top+y,u,c,qf.BOTTOM_RIGHT):new ep(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=d>0||f>0?ip(n.left,n.top+B,d,f,qf.BOTTOM_LEFT):new ep(n.left,n.top+n.height),this.topLeftPaddingBox=A>0||i>0?ip(n.left+x,n.top+m,Math.max(0,A-x),Math.max(0,i-m),qf.TOP_LEFT):new ep(n.left+x,n.top+m),this.topRightPaddingBox=a>0||s>0?ip(n.left+Math.min(v,n.width-w),n.top+m,v>n.width+w?0:Math.max(0,a-w),Math.max(0,s-m),qf.TOP_RIGHT):new ep(n.left+n.width-w,n.top+m),this.bottomRightPaddingBox=u>0||c>0?ip(n.left+Math.min(C,n.width-x),n.top+Math.min(y,n.height-E),Math.max(0,u-w),Math.max(0,c-E),qf.BOTTOM_RIGHT):new ep(n.left+n.width-w,n.top+n.height-E),this.bottomLeftPaddingBox=d>0||f>0?ip(n.left+x,n.top+Math.min(B,n.height-E),Math.max(0,d-x),Math.max(0,f-E),qf.BOTTOM_LEFT):new ep(n.left+x,n.top+n.height-E),this.topLeftContentBox=A>0||i>0?ip(n.left+x+b,n.top+m+S,Math.max(0,A-(x+b)),Math.max(0,i-(m+S)),qf.TOP_LEFT):new ep(n.left+x+b,n.top+m+S),this.topRightContentBox=a>0||s>0?ip(n.left+Math.min(v,n.width+x+b),n.top+m+S,v>n.width+x+b?0:a-x+b,s-(m+S),qf.TOP_RIGHT):new ep(n.left+n.width-(w+T),n.top+m+S),this.bottomRightContentBox=u>0||c>0?ip(n.left+Math.min(C,n.width-(x+b)),n.top+Math.min(y,n.height+m+S),Math.max(0,u-(w+T)),c-(E+F),qf.BOTTOM_RIGHT):new ep(n.left+n.width-(w+T),n.top+n.height-(E+F)),this.bottomLeftContentBox=d>0||f>0?ip(n.left+x+b,n.top+B,Math.max(0,d-(x+b)),f-(E+F),qf.BOTTOM_LEFT):new ep(n.left+x+b,n.top+n.height-(E+F))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(qf||(qf={}));var ip=function(e,t,n,r,A){var i=(Math.sqrt(2)-1)/3*4,o=n*i,a=r*i,s=e+n,l=t+r;switch(A){case qf.TOP_LEFT:return new np(new ep(e,l),new ep(e,l-a),new ep(s-o,t),new ep(s,t));case qf.TOP_RIGHT:return new np(new ep(e,t),new ep(e+o,t),new ep(s,l-a),new ep(s,l));case qf.BOTTOM_RIGHT:return new np(new ep(s,t),new ep(s,t+a),new ep(e+o,l),new ep(e,l));case qf.BOTTOM_LEFT:default:return new np(new ep(s,l),new ep(s-o,l),new ep(e,t+a),new ep(e,t))}},op=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},ap=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},sp=function(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6},lp=function(e,t){this.path=e,this.target=t,this.type=1},up=function(e){this.opacity=e,this.type=2,this.target=6},cp=function(e){return 1===e.type},hp=function(e,t){return e.length===t.length&&e.some((function(e,n){return e===t[n]}))},dp=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},fp=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Ap(this.container),this.container.styles.opacity<1&&this.effects.push(new up(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,A=this.container.styles.transform;this.effects.push(new sp(n,r,A))}if(0!==this.container.styles.overflowX){var i=op(this.curves),o=ap(this.curves);hp(i,o)?this.effects.push(new lp(i,6)):(this.effects.push(new lp(i,2)),this.effects.push(new lp(o,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);n;){var A=n.effects.filter((function(e){return!cp(e)}));if(t||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,A),t=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var i=op(n.curves),o=ap(n.curves);hp(i,o)||r.unshift(new lp(o,6))}}else r.unshift.apply(r,A);n=n.parent}return r.filter((function(t){return cd(t.target,e)}))},e}(),pp=function(e,t,n,r){e.container.elements.forEach((function(A){var i=cd(A.flags,4),o=cd(A.flags,2),a=new fp(A,e);cd(A.styles.display,2048)&&r.push(a);var s=cd(A.flags,8)?[]:r;if(i||o){var l=i||A.styles.isPositioned()?n:t,u=new dp(a);if(A.styles.isPositioned()||A.styles.opacity<1||A.styles.isTransformed()){var c=A.styles.zIndex.order;if(c<0){var h=0;l.negativeZIndex.some((function(e,t){return c>e.element.container.styles.zIndex.order?(h=t,!1):h>0})),l.negativeZIndex.splice(h,0,u)}else if(c>0){var d=0;l.positiveZIndex.some((function(e,t){return c>=e.element.container.styles.zIndex.order?(d=t+1,!1):d>0})),l.positiveZIndex.splice(d,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else A.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);pp(a,u,i?u:n,s)}else A.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),pp(a,t,n,s);cd(A.flags,8)&&gp(A,s)}))},gp=function(e,t){for(var n=e instanceof of?e.start:1,r=e instanceof of&&e.reversed,A=0;A<t.length;A++){var i=t[A];i.container instanceof Af&&"number"==typeof i.container.value&&0!==i.container.value&&(n=i.container.value),i.listValue=Jf(n,i.container.styles.listStyleType,!0),n+=r?-1:1}},vp=function(e,t){switch(t){case 0:return Cp(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Cp(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Cp(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return Cp(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},yp=function(e,t){var n=[];return rp(e)?n.push(e.subdivide(.5,!1)):n.push(e),rp(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},Cp=function(e,t,n,r){var A=[];return rp(e)?A.push(e.subdivide(.5,!1)):A.push(e),rp(n)?A.push(n.subdivide(.5,!0)):A.push(n),rp(r)?A.push(r.subdivide(.5,!0).reverse()):A.push(r),rp(t)?A.push(t.subdivide(.5,!1).reverse()):A.push(t),A},Bp=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},mp=function(e){var t=e.styles,n=e.bounds,r=ac(t.paddingLeft,n.width),A=ac(t.paddingRight,n.width),i=ac(t.paddingTop,n.width),o=ac(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,i+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+A),-(t.borderTopWidth+t.borderBottomWidth+i+o))},wp=function(e,t,n){var r=function(e,t){return 0===e?t.bounds:2===e?mp(t):Bp(t)}(Tp(e.styles.backgroundOrigin,t),e),A=function(e,t){return 0===e?t.bounds:2===e?mp(t):Bp(t)}(Tp(e.styles.backgroundClip,t),e),i=Sp(Tp(e.styles.backgroundSize,t),n,r),o=i[0],a=i[1],s=oc(Tp(e.styles.backgroundPosition,t),r.width-o,r.height-a);return[Fp(Tp(e.styles.backgroundRepeat,t),s,i,r,A),Math.round(r.left+s[0]),Math.round(r.top+s[1]),o,a]},Ep=function(e){return ju(e)&&e.value===Kc.AUTO},xp=function(e){return"number"==typeof e},Sp=function(e,t,n){var r=t[0],A=t[1],i=t[2],o=e[0],a=e[1];if(!o)return[0,0];if(tc(o)&&a&&tc(a))return[ac(o,n.width),ac(a,n.height)];var s=xp(i);if(ju(o)&&(o.value===Kc.CONTAIN||o.value===Kc.COVER))return xp(i)?n.width/n.height<i!=(o.value===Kc.COVER)?[n.width,n.width/i]:[n.height*i,n.height]:[n.width,n.height];var l=xp(r),u=xp(A),c=l||u;if(Ep(o)&&(!a||Ep(a)))return l&&u?[r,A]:s||c?c&&s?[l?r:A*i,u?A:r/i]:[l?r:n.width,u?A:n.height]:[n.width,n.height];if(s){var h=0,d=0;return tc(o)?h=ac(o,n.width):tc(a)&&(d=ac(a,n.height)),Ep(o)?h=d*i:a&&!Ep(a)||(d=h/i),[h,d]}var f=null,p=null;if(tc(o)?f=ac(o,n.width):a&&tc(a)&&(p=ac(a,n.height)),null===f||a&&!Ep(a)||(p=l&&u?f/r*A:n.height),null!==p&&Ep(o)&&(f=l&&u?p/A*r:n.width),null!==f&&null!==p)return[f,p];throw new Error("Unable to calculate background-size for element")},Tp=function(e,t){var n=e[t];return void 0===n?e[0]:n},Fp=function(e,t,n,r,A){var i=t[0],o=t[1],a=n[0],s=n[1];switch(e){case 2:return[new ep(Math.round(r.left),Math.round(r.top+o)),new ep(Math.round(r.left+r.width),Math.round(r.top+o)),new ep(Math.round(r.left+r.width),Math.round(s+r.top+o)),new ep(Math.round(r.left),Math.round(s+r.top+o))];case 3:return[new ep(Math.round(r.left+i),Math.round(r.top)),new ep(Math.round(r.left+i+a),Math.round(r.top)),new ep(Math.round(r.left+i+a),Math.round(r.height+r.top)),new ep(Math.round(r.left+i),Math.round(r.height+r.top))];case 1:return[new ep(Math.round(r.left+i),Math.round(r.top+o)),new ep(Math.round(r.left+i+a),Math.round(r.top+o)),new ep(Math.round(r.left+i+a),Math.round(r.top+o+s)),new ep(Math.round(r.left+i),Math.round(r.top+o+s))];default:return[new ep(Math.round(A.left),Math.round(A.top)),new ep(Math.round(A.left+A.width),Math.round(A.top)),new ep(Math.round(A.left+A.width),Math.round(A.height+A.top)),new ep(Math.round(A.left),Math.round(A.height+A.top))]}},bp="Hidden Text",Ip=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),A=this._document.createElement("span"),i=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",i.appendChild(n),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",A.style.fontFamily=e,A.style.fontSize=t,A.style.margin="0",A.style.padding="0",A.appendChild(this._document.createTextNode(bp)),n.appendChild(A),n.appendChild(r);var o=r.offsetTop-A.offsetTop+2;n.removeChild(A),n.appendChild(this._document.createTextNode(bp)),n.style.lineHeight="normal",r.style.verticalAlign="super";var a=r.offsetTop-n.offsetTop+2;return i.removeChild(n),{baseline:o,middle:a}},e.prototype.getMetrics=function(e,t){var n=e+" "+t;return void 0===this._data[n]&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),Lp=function(e,t){this.context=e,this.options=t};!function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new Ip(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}al(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),cp(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return sl(this,0,void 0,(function(){return ll(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.renderNode=function(e){return sl(this,0,void 0,(function(){return ll(this,(function(t){switch(t.label){case 0:return cd(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):Xd(e.text).reduce((function(t,A){return r.ctx.fillText(A,t,e.bounds.top+n),t+r.ctx.measureText(A).width}),e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),n=Hp(e.fontFamily).join(", "),r=Xu(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,n].join(" "),n,r]},t.prototype.renderTextNode=function(e,t){return sl(this,0,void 0,(function(){var n,r,A,i,o,a,s,l,u=this;return ll(this,(function(c){return n=this.createFontStyle(t),r=n[0],A=n[1],i=n[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(A,i),a=o.baseline,s=o.middle,l=t.paintOrder,e.textBounds.forEach((function(e){l.forEach((function(n){switch(n){case 0:u.ctx.fillStyle=gc(t.color),u.renderTextWithLetterSpacing(e,t.letterSpacing,a);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach((function(n){u.ctx.shadowColor=gc(n.color),u.ctx.shadowOffsetX=n.offsetX.number*u.options.scale,u.ctx.shadowOffsetY=n.offsetY.number*u.options.scale,u.ctx.shadowBlur=n.blur.number,u.renderTextWithLetterSpacing(e,t.letterSpacing,a)})),u.ctx.shadowColor="",u.ctx.shadowOffsetX=0,u.ctx.shadowOffsetY=0,u.ctx.shadowBlur=0),t.textDecorationLine.length&&(u.ctx.fillStyle=gc(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+a),e.bounds.width,1);break;case 2:u.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:u.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+s),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(u.ctx.strokeStyle=gc(t.webkitTextStrokeColor),u.ctx.lineWidth=t.webkitTextStrokeWidth,u.ctx.lineJoin=window.chrome?"miter":"round",u.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+a)),u.ctx.strokeStyle="",u.ctx.lineWidth=0,u.ctx.lineJoin="miter"}}))})),[2]}))}))},t.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=mp(e),A=ap(t);this.path(A),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return sl(this,0,void 0,(function(){var n,r,A,i,o,a,s,l,u,c,h,d,f,p,g,v,y,C;return ll(this,(function(B){switch(B.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,A=n.styles,i=0,o=n.textNodes,B.label=1;case 1:return i<o.length?(a=o[i],[4,this.renderTextNode(a,A)]):[3,4];case 2:B.sent(),B.label=3;case 3:return i++,[3,1];case 4:if(!(n instanceof tf))return[3,8];B.label=5;case 5:return B.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return g=B.sent(),this.renderReplacedElement(n,r,g),[3,8];case 7:return B.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof nf&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof rf))return[3,12];B.label=9;case 9:return B.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return g=B.sent(),this.renderReplacedElement(n,r,g),[3,12];case 11:return B.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof gf&&n.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}).render(n.tree)]:[3,14];case 13:s=B.sent(),n.width&&n.height&&this.ctx.drawImage(s,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),B.label=14;case 14:if(n instanceof df&&(l=Math.min(n.bounds.width,n.bounds.height),n.type===lf?n.checked&&(this.ctx.save(),this.path([new ep(n.bounds.left+.39363*l,n.bounds.top+.79*l),new ep(n.bounds.left+.16*l,n.bounds.top+.5549*l),new ep(n.bounds.left+.27347*l,n.bounds.top+.44071*l),new ep(n.bounds.left+.39694*l,n.bounds.top+.5649*l),new ep(n.bounds.left+.72983*l,n.bounds.top+.23*l),new ep(n.bounds.left+.84*l,n.bounds.top+.34085*l),new ep(n.bounds.left+.39363*l,n.bounds.top+.79*l)]),this.ctx.fillStyle=gc(hf),this.ctx.fill(),this.ctx.restore()):n.type===uf&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+l/2,n.bounds.top+l/2,l/4,0,2*Math.PI,!0),this.ctx.fillStyle=gc(hf),this.ctx.fill(),this.ctx.restore())),Qp(n)&&n.value.length){switch(u=this.createFontStyle(A),y=u[0],c=u[1],h=this.fontMetrics.getMetrics(y,c).baseline,this.ctx.font=y,this.ctx.fillStyle=gc(A.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Rp(n.styles.textAlign),C=mp(n),d=0,n.styles.textAlign){case 1:d+=C.width/2;break;case 2:d+=C.width}f=C.add(d,0,0,-C.height/2+1),this.ctx.save(),this.path([new ep(C.left,C.top),new ep(C.left+C.width,C.top),new ep(C.left+C.width,C.top+C.height),new ep(C.left,C.top+C.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new zd(n.value,f),A.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!cd(n.styles.display,2048))return[3,20];if(null===n.styles.listStyleImage)return[3,19];if(0!==(p=n.styles.listStyleImage).type)return[3,18];g=void 0,v=p.url,B.label=15;case 15:return B.trys.push([15,17,,18]),[4,this.context.cache.match(v)];case 16:return g=B.sent(),this.ctx.drawImage(g,n.bounds.left-(g.width+10),n.bounds.top),[3,18];case 17:return B.sent(),this.context.logger.error("Error loading list-style-image "+v),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==n.styles.listStyleType&&(y=this.createFontStyle(A)[0],this.ctx.font=y,this.ctx.fillStyle=gc(A.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",C=new ul(n.bounds.left,n.bounds.top+ac(n.styles.paddingTop,n.bounds.width),n.bounds.width,bh(A.lineHeight,A.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new zd(e.listValue,C),A.letterSpacing,bh(A.lineHeight,A.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),B.label=20;case 20:return[2]}}))}))},t.prototype.renderStackContent=function(e){return sl(this,0,void 0,(function(){var t,n,r,A,i,o,a,s,l,u,c,h,d,f,p;return ll(this,(function(g){switch(g.label){case 0:return cd(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:g.sent(),t=0,n=e.negativeZIndex,g.label=2;case 2:return t<n.length?(p=n[t],[4,this.renderStack(p)]):[3,5];case 3:g.sent(),g.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:g.sent(),r=0,A=e.nonInlineLevel,g.label=7;case 7:return r<A.length?(p=A[r],[4,this.renderNode(p)]):[3,10];case 8:g.sent(),g.label=9;case 9:return r++,[3,7];case 10:i=0,o=e.nonPositionedFloats,g.label=11;case 11:return i<o.length?(p=o[i],[4,this.renderStack(p)]):[3,14];case 12:g.sent(),g.label=13;case 13:return i++,[3,11];case 14:a=0,s=e.nonPositionedInlineLevel,g.label=15;case 15:return a<s.length?(p=s[a],[4,this.renderStack(p)]):[3,18];case 16:g.sent(),g.label=17;case 17:return a++,[3,15];case 18:l=0,u=e.inlineLevel,g.label=19;case 19:return l<u.length?(p=u[l],[4,this.renderNode(p)]):[3,22];case 20:g.sent(),g.label=21;case 21:return l++,[3,19];case 22:c=0,h=e.zeroOrAutoZIndexOrTransformedOrOpacity,g.label=23;case 23:return c<h.length?(p=h[c],[4,this.renderStack(p)]):[3,26];case 24:g.sent(),g.label=25;case 25:return c++,[3,23];case 26:d=0,f=e.positiveZIndex,g.label=27;case 27:return d<f.length?(p=f[d],[4,this.renderStack(p)]):[3,30];case 28:g.sent(),g.label=29;case 29:return d++,[3,27];case 30:return[2]}}))}))},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach((function(e,n){var r=rp(e)?e.start:e;0===n?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),rp(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},t.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},t.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var A=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return A.width=Math.max(1,t),A.height=Math.max(1,n),A.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,n),A},t.prototype.renderBackgroundImage=function(e){return sl(this,0,void 0,(function(){var t,n,r,A,i,o;return ll(this,(function(a){switch(a.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var A,i,o,a,s,l,u,c,h,d,f,p,g,v,y,C,B,m,w,E,x,S,T,F,b,I,L,Q,U,R,M;return ll(this,(function(H){switch(H.label){case 0:if(0!==n.type)return[3,5];A=void 0,i=n.url,H.label=1;case 1:return H.trys.push([1,3,,4]),[4,r.context.cache.match(i)];case 2:return A=H.sent(),[3,4];case 3:return H.sent(),r.context.logger.error("Error loading background-image "+i),[3,4];case 4:return A&&(o=wp(e,t,[A.width,A.height,A.width/A.height]),C=o[0],S=o[1],T=o[2],w=o[3],E=o[4],v=r.ctx.createPattern(r.resizeImage(A,w,E),"repeat"),r.renderRepeat(C,v,S,T)),[3,6];case 5:1===n.type?(a=wp(e,t,[null,null,null]),C=a[0],S=a[1],T=a[2],w=a[3],E=a[4],s=Ic(n.angle,w,E),l=s[0],u=s[1],c=s[2],h=s[3],d=s[4],(f=document.createElement("canvas")).width=w,f.height=E,p=f.getContext("2d"),g=p.createLinearGradient(u,h,c,d),bc(n.stops,l).forEach((function(e){return g.addColorStop(e.stop,gc(e.color))})),p.fillStyle=g,p.fillRect(0,0,w,E),w>0&&E>0&&(v=r.ctx.createPattern(f,"repeat"),r.renderRepeat(C,v,S,T))):function(e){return 2===e.type}(n)&&(y=wp(e,t,[null,null,null]),C=y[0],B=y[1],m=y[2],w=y[3],E=y[4],x=0===n.position.length?[Ac]:n.position,S=ac(x[0],w),T=ac(x[x.length-1],E),F=function(e,t,n,r,A){var i=0,o=0;switch(e.size){case 0:0===e.shape?i=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-A)):1===e.shape&&(i=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-A)));break;case 2:if(0===e.shape)i=o=Math.min(Lc(t,n),Lc(t,n-A),Lc(t-r,n),Lc(t-r,n-A));else if(1===e.shape){var a=Math.min(Math.abs(n),Math.abs(n-A))/Math.min(Math.abs(t),Math.abs(t-r)),s=Qc(r,A,t,n,!0),l=s[0],u=s[1];o=a*(i=Lc(l-t,(u-n)/a))}break;case 1:0===e.shape?i=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-A)):1===e.shape&&(i=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-A)));break;case 3:if(0===e.shape)i=o=Math.max(Lc(t,n),Lc(t,n-A),Lc(t-r,n),Lc(t-r,n-A));else if(1===e.shape){a=Math.max(Math.abs(n),Math.abs(n-A))/Math.max(Math.abs(t),Math.abs(t-r));var c=Qc(r,A,t,n,!1);l=c[0],u=c[1],o=a*(i=Lc(l-t,(u-n)/a))}}return Array.isArray(e.size)&&(i=ac(e.size[0],r),o=2===e.size.length?ac(e.size[1],A):i),[i,o]}(n,S,T,w,E),b=F[0],I=F[1],b>0&&I>0&&(L=r.ctx.createRadialGradient(B+S,m+T,0,B+S,m+T,b),bc(n.stops,2*b).forEach((function(e){return L.addColorStop(e.stop,gc(e.color))})),r.path(C),r.ctx.fillStyle=L,b!==I?(Q=e.bounds.left+.5*e.bounds.width,U=e.bounds.top+.5*e.bounds.height,M=1/(R=I/b),r.ctx.save(),r.ctx.translate(Q,U),r.ctx.transform(1,0,0,R,0,0),r.ctx.translate(-Q,-U),r.ctx.fillRect(B,M*(m-U)+U,w,E*M),r.ctx.restore()):r.ctx.fill())),H.label=6;case 6:return t--,[2]}}))},r=this,A=0,i=e.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return A<i.length?(o=i[A],[5,n(o)]):[3,4];case 2:a.sent(),a.label=3;case 3:return A++,[3,1];case 4:return[2]}}))}))},t.prototype.renderSolidBorder=function(e,t,n){return sl(this,0,void 0,(function(){return ll(this,(function(r){return this.path(vp(n,t)),this.ctx.fillStyle=gc(e),this.ctx.fill(),[2]}))}))},t.prototype.renderDoubleBorder=function(e,t,n,r){return sl(this,0,void 0,(function(){var A,i;return ll(this,(function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,r)]:[3,2];case 1:return o.sent(),[2];case 2:return A=function(e,t){switch(t){case 0:return Cp(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Cp(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Cp(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return Cp(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(r,n),this.path(A),this.ctx.fillStyle=gc(e),this.ctx.fill(),i=function(e,t){switch(t){case 0:return Cp(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Cp(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Cp(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return Cp(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(r,n),this.path(i),this.ctx.fill(),[2]}}))}))},t.prototype.renderNodeBackgroundAndBorders=function(e){return sl(this,0,void 0,(function(){var t,n,r,A,i,o,a,s,l=this;return ll(this,(function(u){switch(u.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!pc(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],A=Up(Tp(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(A),this.ctx.clip(),pc(t.backgroundColor)||(this.ctx.fillStyle=gc(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:u.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){l.ctx.save();var n,r,A,i,o,a=op(e.curves),s=t.inset?0:1e4,u=(n=a,r=-s+(t.inset?1:-1)*t.spread.number,A=(t.inset?1:-1)*t.spread.number,i=t.spread.number*(t.inset?-2:2),o=t.spread.number*(t.inset?-2:2),n.map((function(e,t){switch(t){case 0:return e.add(r,A);case 1:return e.add(r+i,A);case 2:return e.add(r+i,A+o);case 3:return e.add(r,A+o)}return e})));t.inset?(l.path(a),l.ctx.clip(),l.mask(u)):(l.mask(a),l.ctx.clip(),l.path(u)),l.ctx.shadowOffsetX=t.offsetX.number+s,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=gc(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?gc(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()})),u.label=2;case 2:i=0,o=0,a=r,u.label=3;case 3:return o<a.length?0!==(s=a[o]).style&&!pc(s.color)&&s.width>0?2!==s.style?[3,5]:[4,this.renderDashedDottedBorder(s.color,s.width,i,e.curves,2)]:[3,11]:[3,13];case 4:return u.sent(),[3,11];case 5:return 3!==s.style?[3,7]:[4,this.renderDashedDottedBorder(s.color,s.width,i,e.curves,3)];case 6:return u.sent(),[3,11];case 7:return 4!==s.style?[3,9]:[4,this.renderDoubleBorder(s.color,s.width,i,e.curves)];case 8:return u.sent(),[3,11];case 9:return[4,this.renderSolidBorder(s.color,i,e.curves)];case 10:u.sent(),u.label=11;case 11:i++,u.label=12;case 12:return o++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,n,r,A){return sl(this,0,void 0,(function(){var i,o,a,s,l,u,c,h,d,f,p,g,v,y,C,B;return ll(this,(function(m){return this.ctx.save(),i=function(e,t){switch(t){case 0:return yp(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return yp(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return yp(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return yp(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(r,n),o=vp(r,n),2===A&&(this.path(o),this.ctx.clip()),rp(o[0])?(a=o[0].start.x,s=o[0].start.y):(a=o[0].x,s=o[0].y),rp(o[1])?(l=o[1].end.x,u=o[1].end.y):(l=o[1].x,u=o[1].y),c=0===n||2===n?Math.abs(a-l):Math.abs(s-u),this.ctx.beginPath(),3===A?this.formatPath(i):this.formatPath(o.slice(0,2)),h=t<3?3*t:2*t,d=t<3?2*t:t,3===A&&(h=t,d=t),f=!0,c<=2*h?f=!1:c<=2*h+d?(h*=p=c/(2*h+d),d*=p):(g=Math.floor((c+d)/(h+d)),v=(c-g*h)/(g-1),d=(y=(c-(g+1)*h)/g)<=0||Math.abs(d-v)<Math.abs(d-y)?v:y),f&&(3===A?this.ctx.setLineDash([0,h+d]):this.ctx.setLineDash([h,d])),3===A?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=gc(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===A&&(rp(o[0])&&(C=o[3],B=o[0],this.ctx.beginPath(),this.formatPath([new ep(C.end.x,C.end.y),new ep(B.start.x,B.start.y)]),this.ctx.stroke()),rp(o[1])&&(C=o[1],B=o[2],this.ctx.beginPath(),this.formatPath([new ep(C.end.x,C.end.y),new ep(B.start.x,B.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},t.prototype.render=function(e){return sl(this,0,void 0,(function(){var t;return ll(this,(function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=gc(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=function(e){var t=new fp(e,null),n=new dp(t),r=[];return pp(t,n,n,r),gp(t.container,r),n}(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}}))}))}}(Lp);var Qp=function(e){return e instanceof pf||(e instanceof ff||e instanceof df&&e.type!==uf&&e.type!==lf)},Up=function(e,t){switch(e){case 0:return op(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return ap(t)}},Rp=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},Mp=["-apple-system","system-ui"],Hp=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===Mp.indexOf(e)})):e};!function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}al(t,e),t.prototype.render=function(e){return sl(this,0,void 0,(function(){var t,n;return ll(this,(function(r){switch(r.label){case 0:return t=Pd(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Op(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=gc(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))}}(Lp);var Op=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))};"undefined"!=typeof window&&$f.setContext(window);
/*!
   * @antv/g
   * @description A core module for rendering engine implements DOM API.
   * @version 6.3.1
   * @date 12/24/2025, 11:55:39 AM
   * @author AntVis
   * @docs https://g.antv.antgroup.com/
   */var kp=function(e){function t(e,n,r,A){var i;return o(this,t),(i=p(this,t,[e])).currentTime=r,i.timelineTime=A,i.target=n,i.type="finish",i.bubbles=!1,i.currentTarget=n,i.defaultPrevented=!1,i.eventPhase=i.AT_TARGET,i.timeStamp=Date.now(),i.currentTime=r,i.timelineTime=A,i}return v(t,e),s(t)}(oa),Np=0,_p=function(){return s((function e(t,n){var r;o(this,e),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=n,this.id="".concat(Np++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null===(r=this.effect)||void 0===r?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}),[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise((function(t,n){e.resolveReadyPromise=function(){t(e)},e.rejectReadyPromise=function(){n(new Error)}})),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise((function(t,n){e.resolveFinishedPromise=function(){t(e)},e.rejectFinishedPromise=function(){n(new Error)}})),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){if(e=Number(e),!isNaN(e)){var t;if(this.timeline.restart(),!this._paused&&null!==this._startTime)this._startTime=Number(null===(t=this.timeline)||void 0===t?void 0:t.currentTime)-e/this.playbackRate;this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(null!==e){if(this.updatePromises(),e=Number(e),isNaN(e))return;if(this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var t=this.currentTime;this._playbackRate=e,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==t&&(this.currentTime=t),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}},{key:"updatePromises",value:function(){var e;if(null!==(e=this.effect.target)&&void 0!==e&&e.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var t=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==t&&("idle"===n?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===n&&(this.readyPromise=void 0)),this.finishedPromise&&n!==t&&("idle"===n?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===n?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=n,this.readyPromise||this.finishedPromise}},{key:"play",value: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()}},{key:"pause",value: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()}},{key:"finish",value: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())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=null,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var t=new kp(null,this,this.currentTime,null);setTimeout((function(){e.oncancel(t)}))}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),null!==e&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e;return(null===(e=this.effect)||void 0===e?void 0:e.target).getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();-1===e.indexOf(this)&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),t=e.indexOf(this);-1!==t&&e.splice(t,1)}},{key:"tick",value:function(e,t){this._idle||this._paused||(null===this._startTime?t&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),t&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}}},{key:"persist",value:function(){throw new Error(zn)}},{key:"addEventListener",value:function(e,t,n){throw new Error(zn)}},{key:"removeEventListener",value:function(e,t,n){throw new Error(zn)}},{key:"dispatchEvent",value:function(e){throw new Error(zn)}},{key:"commitStyles",value:function(){throw new Error(zn)}},{key:"ensureAlive",value:function(){var e,t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null===(e=this.effect)||void 0===e||!e.update(-1)):this._inEffect=!(null===(t=this.effect)||void 0===t||!t.update(this.currentTime));this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,t){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!t&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var t=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var n=new kp(null,this,this.currentTime,e);setTimeout((function(){t.onfinish&&t.onfinish(n)}))}this._finishedFlag=!0}}else{if(this.onframe&&"running"===this.playState){var r=new kp(null,this,this.currentTime,e);this.onframe(r)}this._finishedFlag=!1}}}])}(),Dp=.1,Pp="function"==typeof Float32Array,Gp=function(e,t){return 1-3*t+3*e},Kp=function(e,t){return 3*t-6*e},zp=function(e){return 3*e},Vp=function(e,t,n){return((Gp(t,n)*e+Kp(t,n))*e+zp(t))*e},Wp=function(e,t,n){return 3*Gp(t,n)*e*e+2*Kp(t,n)*e+zp(t)},Xp=function(e,t,n,r){if(!(e>=0&&e<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&n===r)return function(e){return e};for(var A=Pp?new Float32Array(11):new Array(11),i=0;i<11;++i)A[i]=Vp(i*Dp,e,n);var o=function(t){for(var r=0,i=1;10!==i&&A[i]<=t;++i)r+=Dp;--i;var o=r+(t-A[i])/(A[i+1]-A[i])*Dp,a=Wp(o,e,n);return a>=.001?function(e,t,n,r){for(var A=0;A<4;++A){var i=Wp(t,n,r);if(0===i)return t;t-=(Vp(t,n,r)-e)/i}return t}(t,o,e,n):0===a?o:function(e,t,n,r,A){var i,o,a=0;do{(i=Vp(o=t+(n-t)/2,r,A)-e)>0?n=o:t=o}while(Math.abs(i)>1e-7&&++a<10);return o}(t,r,r+Dp,e,n)};return function(e){return 0===e||1===e?e:Vp(o(e),t,r)}},Yp=function(e){return Math.pow(e,2)},jp=function(e){return Math.pow(e,3)},Zp=function(e){return Math.pow(e,4)},Jp=function(e){return Math.pow(e,5)},qp=function(e){return Math.pow(e,6)},$p=function(e){return 1-Math.cos(e*Math.PI/2)},eg=function(e){return 1-Math.sqrt(1-e*e)},tg=function(e){return e*e*(3*e-2)},ng=function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)},rg=function(e){var t=y(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),n=t[0],r=void 0===n?1:n,A=t[1],i=void 0===A?.5:A,o=Ye(Number(r),1,10),a=Ye(Number(i),.1,2);return 0===e||1===e?e:-o*Math.pow(2,10*(e-1))*Math.sin((e-1-a/(2*Math.PI)*Math.asin(1/o))*(2*Math.PI)/a)},Ag=function(e){var t=arguments.length>2?arguments[2]:void 0,n=y(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],4),r=n[0],A=void 0===r?1:r,i=n[1],o=void 0===i?100:i,a=n[2],s=void 0===a?10:a,l=n[3],u=void 0===l?0:l;A=Ye(A,.1,1e3),o=Ye(o,.1,1e3),s=Ye(s,.1,1e3),u=Ye(u,.1,1e3);var c=Math.sqrt(o/A),h=s/(2*Math.sqrt(o*A)),d=h<1?c*Math.sqrt(1-h*h):0,f=h<1?(h*c-u)/d:-u+c,p=t?t*e/1e3:e;return p=h<1?Math.exp(-p*h*c)*(1*Math.cos(d*p)+f*Math.sin(d*p)):(1+f*p)*Math.exp(-p*c),0===e||1===e?e:1-p},ig=function(e){var t=y(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],2),n=t[0],r=void 0===n?10:n;return("start"===t[1]?Math.ceil:Math.floor)(Ye(e,0,1)*r)/r},og=function(e){var t=y(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],4),n=t[0],r=t[1],A=t[2],i=t[3];return Xp(n,r,A,i)(e)},ag=Xp(.42,0,1,1),sg=function(e){return function(t){return 1-e(1-t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],arguments.length>2?arguments[2]:void 0)}},lg=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return t<.5?e(2*t,n,r)/2:1-e(-2*t+2,n,r)/2}},ug=function(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return t<.5?(1-e(1-2*t,n,r))/2:(e(2*t-1,n,r)+1)/2}},cg={steps:ig,"step-start":function(e){return ig(e,[1,"start"])},"step-end":function(e){return ig(e,[1,"end"])},linear:function(e){return e},"cubic-bezier":og,ease:function(e){return og(e,[.25,.1,.25,1])},in:ag,out:sg(ag),"in-out":lg(ag),"out-in":ug(ag),"in-quad":Yp,"out-quad":sg(Yp),"in-out-quad":lg(Yp),"out-in-quad":ug(Yp),"in-cubic":jp,"out-cubic":sg(jp),"in-out-cubic":lg(jp),"out-in-cubic":ug(jp),"in-quart":Zp,"out-quart":sg(Zp),"in-out-quart":lg(Zp),"out-in-quart":ug(Zp),"in-quint":Jp,"out-quint":sg(Jp),"in-out-quint":lg(Jp),"out-in-quint":ug(Jp),"in-expo":qp,"out-expo":sg(qp),"in-out-expo":lg(qp),"out-in-expo":ug(qp),"in-sine":$p,"out-sine":sg($p),"in-out-sine":lg($p),"out-in-sine":ug($p),"in-circ":eg,"out-circ":sg(eg),"in-out-circ":lg(eg),"out-in-circ":ug(eg),"in-back":tg,"out-back":sg(tg),"in-out-back":lg(tg),"out-in-back":ug(tg),"in-bounce":ng,"out-bounce":sg(ng),"in-out-bounce":lg(ng),"out-in-bounce":ug(ng),"in-elastic":rg,"out-elastic":sg(rg),"in-out-elastic":lg(rg),"out-in-elastic":ug(rg),spring:Ag,"spring-in":Ag,"spring-out":sg(Ag),"spring-in-out":lg(Ag),"spring-out-in":ug(Ag)},hg=function(e){return cg[function(e){return function(e){return"-"===(e=e.replace(/([A-Z])/g,(function(e){return"-".concat(e.toLowerCase())}))).charAt(0)?e.substring(1):e}(e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()}(e)]||cg.linear},dg=function(e){return e},fg=1,pg=.5,gg=0;function vg(e,t){return function(n){if(n>=1)return 1;var r=1/e;return(n+=t*r)-n%r}}var yg="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Cg=new RegExp("cubic-bezier\\(".concat(yg,",").concat(yg,",").concat(yg,",").concat(yg,"\\)")),Bg=/steps\(\s*(\d+)\s*\)/,mg=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function wg(e){var t=Cg.exec(e);if(t)return Xp.apply(void 0,c(t.slice(1).map(Number)));var n=Bg.exec(e);if(n)return vg(Number(n[1]),gg);var r=mg.exec(e);return r?vg(Number(r[1]),{start:fg,middle:pg,end:gg}[r[2]]):hg(e)}function Eg(e){return Math.abs(function(e){var t;if(0===e.duration||0===e.iterations)return 0;return("auto"===e.duration?0:Number(e.duration))*(null!==(t=e.iterations)&&void 0!==t?t:1)}(e)/(e.playbackRate||1))}var xg=0,Sg=1,Tg=2,Fg=3;function bg(e,t,n){var r=function(e,t,n){if(null===t)return xg;var r=n.endTime;return t<Math.min(n.delay,r)?Sg:t>=Math.min(n.delay+e+n.endDelay,r)?Tg:Fg}(e,t,n),A=function(e,t,n,r,A){switch(r){case Sg:return"backwards"===t||"both"===t?0:null;case Fg:return n-A;case Tg:return"forwards"===t||"both"===t?e:null;case xg:return null}}(e,n.fill,t,r,n.delay);if(null===A)return null;var i="auto"===n.duration?0:n.duration,o=function(e,t,n,r,A){var i=A;return 0===e?t!==Sg&&(i+=n):i+=r/e,i}(i,r,n.iterations,A,n.iterationStart),a=function(e,t,n,r,A,i){var o=e===1/0?t%1:e%1;return 0!==o||n!==Tg||0===r||0===A&&0!==i||(o=1),o}(o,n.iterationStart,r,n.iterations,A,i),s=function(e,t,n,r){return e===Tg&&t===1/0?1/0:1===n?Math.floor(r)-1:Math.floor(r)}(r,n.iterations,a,o),l=function(e,t,n){var r=e;if("normal"!==e&&"reverse"!==e){var A=t;"alternate-reverse"===e&&(A+=1),r="normal",A!==1/0&&A%2!=0&&(r="reverse")}return"normal"===r?n:1-n}(n.direction,s,a);return n.currentIteration=s,n.progress=l,n.easingFunction(l)}function Ig(e,t,n){var r=function(e,t){for(var n={},r=0;r<e.length;r++)for(var A in e[r])if(Lg(A)){var i={offset:e[r].offset,computedOffset:e[r].computedOffset,easing:e[r].easing,easingFunction:wg(e[r].easing)||t.easingFunction,value:e[r][A]};n[A]=n[A]||[],n[A].push(i)}return n}(e,t),A=function(e,t){var n=[];for(var r in e)for(var A=e[r],i=0;i<A.length-1;i++){var o=i,a=i+1,s=A[o].computedOffset,l=A[a].computedOffset,u=s,c=l;0===i&&(u=-1/0,0===l&&(a=o)),i===A.length-2&&(c=1/0,1===s&&(o=a)),n.push({applyFrom:u,applyTo:c,startOffset:A[o].computedOffset,endOffset:A[a].computedOffset,easingFunction:A[o].easingFunction,property:r,interpolation:Ug(r,A[o].value,A[a].value,t)})}return n.sort((function(e,t){return e.startOffset-t.startOffset})),n}(r,n);return function(e,t){if(null!==t)A.filter((function(e){return t>=e.applyFrom&&t<e.applyTo})).forEach((function(n){var r=t-n.startOffset,A=n.endOffset-n.startOffset,i=0===A?0:r/A;e.setAttribute(n.property,n.interpolation(i),!1,!1)}));else for(var n in r)Lg(n)&&e.setAttribute(n,null)}}function Lg(e){return"offset"!==e&&"easing"!==e&&"composite"!==e&&"computedOffset"!==e}var Qg=function(e,t,n){return function(r){var A=Rg(e,t,r);return je(A)?A:n(A)}};function Ug(e,t,n,r){var A=Ki[e];if(A&&A.syntax&&A.int){var i=ja.styleValueRegistry.getPropertySyntax(A.syntax);if(i){var o=i.parser,a=o?o(t,r):t,s=o?o(n,r):n,l=i.mixer(a,s,r);if(l){var u=Qg.apply(void 0,c(l));return function(e){return 0===e?t:1===e?n:u(e)}}}}return Qg(!1,!0,(function(e){return e?n:t}))}function Rg(e,t,n){if("number"==typeof e&&"number"==typeof t)return e*(1-n)+t*n;if("boolean"==typeof e&&"boolean"==typeof t||"string"==typeof e&&"string"==typeof t)return n<.5?e:t;if(Array.isArray(e)&&Array.isArray(t)){for(var r=e.length,A=t.length,i=Math.max(r,A),o=[],a=0;a<i;a++)o.push(Rg(e[a<r?a:r-1],t[a<A?a:A-1],n));return o}throw new Error("Mismatched interpolation arguments ".concat(e,":").concat(t))}var Mg=function(){return s((function e(){o(this,e),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=dg,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}),[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=wg(e),this._easing=e}}])}();function Hg(e,t){if(null===e)return[];Array.isArray(e)||(e=function(e){var t=[];for(var n in e)if(!(n in["easing","offset","composite"])){var r=e[n];Array.isArray(r)||(r=[r]);for(var A=r.length,i=0;i<A;i++){if(!t[i]){var o={};"offset"in e&&(o.offset=Number(e.offset)),"easing"in e&&(o.easing=e.easing),"composite"in e&&(o.composite=e.composite),t[i]=o}void 0!==r[i]&&null!==r[i]&&(t[i][n]=r[i])}}return t.sort((function(e,t){return(e.computedOffset||0)-(t.computedOffset||0)})),t}(e));for(var n=e.map((function(e){var n={};for(var r in null!=t&&t.composite&&(n.composite="auto"),e){var A=e[r];if("offset"===r){if(null!==A){if(A=Number(A),!isFinite(A))throw new Error("Keyframe offsets must be numbers.");if(A<0||A>1)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=A}}else if("composite"===r&&-1===["replace","add","accumulate","auto"].indexOf(A))throw new Error("".concat(A," compositing is not supported"));n[r]=A}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==t?void 0:t.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n})),r=!0,A=-1/0,i=0;i<n.length;i++){var o=n[i].offset;if(Ge(o))r=!1;else{if(o<A)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");A=o}}return n=n.filter((function(e){return Number(e.offset)>=0&&Number(e.offset)<=1})),r||function(){var e,t,r=n.length;n[r-1].computedOffset=Number(null!==(e=n[r-1].offset)&&void 0!==e?e:1),r>1&&(n[0].computedOffset=Number(null!==(t=n[0].offset)&&void 0!==t?t:0));for(var A=0,i=Number(n[0].computedOffset),o=1;o<r;o++){var a=n[o].computedOffset;if(!Ge(a)&&!Ge(i)){for(var s=1;s<o-A;s++)n[A+s].computedOffset=i+(Number(a)-i)*s/(o-A);A=o,i=Number(a)}}}(),n}var Og="backwards|forwards|both|none".split("|"),kg="reverse|alternate|alternate-reverse".split("|");function Ng(e,t){return function(e,t){var n=new Mg;return"number"!=typeof e||isNaN(e)?void 0!==e&&Object.keys(e).forEach((function(t){if(void 0!==e[t]&&null!==e[t]&&"auto"!==e[t]){if(("number"==typeof n[t]||"duration"===t)&&("number"!=typeof e[t]||isNaN(e[t])))return;if("fill"===t&&-1===Og.indexOf(e[t]))return;if("direction"===t&&-1===kg.indexOf(e[t]))return;n[t]=e[t]}})):n.duration=e,n}(e=function(e){"number"==typeof e&&(e=isNaN(e)?{duration:"auto"}:{duration:e});return e}(null!=e?e:{duration:"auto"}))}var _g=function(){return s((function e(t,n,r){var A=this;o(this,e),this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=Ng(r),this.timing.effect=this,this.timing.activeDuration=Eg(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Hg(n,this.timing),this.interpolations=Ig(this.normalizedKeyframes,this.timing,this.target);var i=ja.globalThis.Proxy;this.computedTiming=i?new i(this.timing,{get:function(e,t){return"duration"===t?"auto"===e.duration?0:e.duration:"fill"===t?"auto"===e.fill?"none":e.fill:"localTime"===t?A.animation&&A.animation.currentTime||null:"currentIteration"===t?A.animation&&"running"===A.animation.playState?e.currentIteration||0:null:"progress"===t?A.animation&&"running"===A.animation.playState?e.progress||0:null:e[t]},set:function(){return!0}}):this.timing}),[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return null!==e&&(this.timeFraction=bg(this.timing.activeDuration,e,this.timing),null!==this.timeFraction)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=Hg(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var t=this;Object.keys(e||{}).forEach((function(n){t.timing[n]=e[n]}))}}])}();function Dg(e,t){return Number(e.id)-Number(t.id)}var Pg=function(){return s((function e(t){var n=this;o(this,e),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(e){n.currentTime=e,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(Dg),n.animations=n.tick(e,!0,n.animations)[0],t.forEach((function(t){t[1](e)})),n.applyPendingEffects()},this.document=t}),[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,t,n){var r=new _g(e,t,n),A=new _p(r,this);return this.animations.push(A),this.restartWebAnimationsNextTick(),A.updatePromises(),A.play(),A.updatePromises(),A}},{key:"applyDirtiedAnimation",value:function(e){var t=this;if(!this.inTick){e.markTarget();var n=e.targetAnimations();n.sort(Dg),this.tick(Number(this.currentTime),!1,n.slice())[1].forEach((function(e){var n=t.animations.indexOf(e);-1!==n&&t.animations.splice(n,1)})),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame((function(){})),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach((function(e){null==e||e.applyInterpolations()})),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter((function(e){return e.updatePromises()}))}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter((function(e){return"finished"!==e.playState&&"idle"!==e.playState}))}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var t=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([t,e]),t}},{key:"requestAnimationFrame",value:function(e){var t=this;return this.rAF((function(n){t.updateAnimationsPromises(),e(n),t.updateAnimationsPromises()}))}},{key:"tick",value:function(e,t,n){var r,A,i=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var o=[],a=[],s=[],l=[];return n.forEach((function(n){n.tick(e,t),n._inEffect?(a.push(n.effect),n.markTarget()):(o.push(n.effect),n.unmarkTarget()),n._needsTick&&(i.ticking=!0);var r=n._inEffect||n._needsTick;n._inTimeline=r,r?s.push(n):l.push(n)})),(r=this.pendingEffects).push.apply(r,o),(A=this.pendingEffects).push.apply(A,a),this.ticking&&this.requestAnimationFrame((function(){})),this.inTick=!1,[s,l]}}])}();ja.EasingFunction=wg,ja.AnimationTimeline=Pg;var Gg=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).landmarks=[],e}return v(t,e),s(t,[{key:"rotate",value:function(e,t,n){if(this.relElevation=Wn(t),this.relAzimuth=Wn(e),this.relRoll=Wn(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===lr.EXPLORING){var r=Qe(Le(),[1,0,0],Zn((this.rotateWorld?1:-1)*this.relElevation)),A=Qe(Le(),[0,1,0],Zn((this.rotateWorld?1:-1)*this.relAzimuth)),i=Qe(Le(),[0,0,1],Zn(this.relRoll)),o=Ue(Le(),A,r);o=Ue(Le(),o,i);var a=J(T(),o);O(this.matrix,this.matrix,[0,0,-this.distance]),H(this.matrix,this.matrix,a),O(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===lr.ORBITING||this.type===lr.EXPLORING?this._getPosition():this.type===lr.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(e,t){var n=Yn(e,t,0),r=ue(this.position);return pe(r,r,ve(le(),this.right,n[0])),pe(r,r,ve(le(),this.up,n[1])),this._setPosition(r),this.triggerUpdate(),this}},{key:"dolly",value:function(e){var t=this.forward,n=ue(this.position),r=this.dollyingStep,A=this.distance+e*this.dollyingStep;return r=Math.max(Math.min(A,this.maxDistance),this.minDistance)-this.distance,n[0]+=r*t[0],n[1]+=r*t[1],n[2]+=r*t[2],this._setPosition(n),this.type===lr.ORBITING||this.type===lr.EXPLORING?this._getDistance():this.type===lr.TRACKING&&pe(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(e){var t,n,r,A,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.position,a=void 0===o?this.position:o,s=i.focalPoint,l=void 0===s?this.focalPoint:s,u=i.roll,c=i.zoom,h=new ja.CameraContribution;h.setType(this.type,void 0),h.setPosition(a[0],null!==(t=a[1])&&void 0!==t?t:this.position[1],null!==(n=a[2])&&void 0!==n?n:this.position[2]),h.setFocalPoint(l[0],null!==(r=l[1])&&void 0!==r?r:this.focalPoint[1],null!==(A=l[2])&&void 0!==A?A:this.focalPoint[2]),h.setRoll(null!=u?u:this.roll),h.setZoom(null!=c?c:this.zoom);var d={name:e,matrix:F(h.getWorldTransform()),right:ue(h.right),up:ue(h.up),forward:ue(h.forward),position:ue(h.getPosition()),focalPoint:ue(h.getFocalPoint()),distanceVector:ue(h.getDistanceVector()),distance:h.getDistance(),dollyingStep:h.getDollyingStep(),azimuth:h.getAzimuth(),elevation:h.getElevation(),roll:h.getRoll(),relAzimuth:h.relAzimuth,relElevation:h.relElevation,relRoll:h.relRoll,zoom:h.getZoom()};return this.landmarks.push(d),d}},{key:"gotoLandmark",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Xe(e)?this.landmarks.find((function(t){return t.name===e})):e;if(r){var A=je(n)?{duration:n}:n,i=A.easing,o=void 0===i?"linear":i,a=A.duration,s=void 0===a?100:a,l=A.easingFunction,u=void 0===l?void 0:l,c=A.onfinish,h=void 0===c?void 0:c,d=A.onframe,f=void 0===d?void 0:d;this.cancelLandmarkAnimation();var p,g=r.position,v=r.focalPoint,y=r.zoom,C=r.roll,B=u||ja.EasingFunction(o),m=function(){t.setFocalPoint(v),t.setPosition(g),t.setRoll(C),t.setZoom(y),t.computeMatrix(),t.triggerUpdate(),null==h||h()};if(0===s)return m();var w=function(e){void 0===p&&(p=e);var n=e-p;if(n>=s)m();else{var r,A,i=B(n/s),o=le(),a=le();if(me(o,t.focalPoint,v,i),me(a,t.position,g,i),A=t.roll*(1-i)+C*i,r=t.zoom*(1-i)+y*i,t.setFocalPoint(o),t.setPosition(a),t.setRoll(A),t.setZoom(r),Se(o,v)+Se(a,g)<=.01&&void 0===y&&void 0===C)return m();t.computeMatrix(),t.triggerUpdate(),n<s&&(null==f||f(i),t.landmarkAnimationID=t.canvas.requestAnimationFrame(w))}};this.canvas.requestAnimationFrame(w)}}}])}(fr);ja.CameraContribution=Gg;var Kg=["body","startHead","endHead","startHeadOffset","endHeadOffset"],zg=["body","startHead","endHead","startHeadOffset","endHeadOffset"],Vg=["body","startHead","endHead","startHeadOffset","endHeadOffset"],Wg=function(e){function t(e){var n;o(this,t);var r=(n=p(this,t,[i(i({},e),{},{type:t.tag})])).attributes,A=r.body,a=r.startHead,s=r.endHead;r.startHeadOffset,r.endHeadOffset;var l=Fn(r,Kg);if(!A)throw new Error("Arrow's body is required");return n.body=A,n.appendChild(n.body),n.handleBodyAttributeChanged(n.body),a&&n.appendArrowHead(n.getArrowHeadType(a),!0),s&&n.appendArrowHead(n.getArrowHeadType(s),!1),n.applyArrowStyle(l,[n.body,n.startHead,n.endHead]),n}return v(t,e),s(t,[{key:"handleBodyAttributeChanged",value:function(e){var t=this;e.addEventListener(Ca.ATTR_MODIFIED,(function(e){var n=e.attrName;"x1"===n||"y1"===n?t.startHead&&t.transformArrowHead(t.startHead,!0):"x2"!==n&&"y2"!==n||t.endHead&&t.transformArrowHead(t.endHead,!1)}))}},{key:"getBody",value:function(){return this.body}},{key:"getStartHead",value:function(){return this.startHead}},{key:"getEndHead",value:function(){return this.endHead}},{key:"attributeChangedCallback",value:function(e,t,n){if("opacity"===e||"strokeOpacity"===e||"stroke"===e||"lineWidth"===e||"increasedLineWidthForHitTesting"===e)this.applyArrowStyle(r({},e,n),[this.body,this.startHead,this.endHead]);else if("startHead"===e||"endHead"===e){var A="startHead"===e;if(this.destroyArrowHead(A),n){var i=this.attributes;i.body,i.startHead,i.endHead,i.startHeadOffset,i.endHeadOffset;var o=Fn(i,zg);this.appendArrowHead(this.getArrowHeadType(n),A),this.applyArrowStyle(o,[A?this.startHead:this.endHead])}}else if("body"===e){var a=this.attributes;a.body,a.startHead,a.endHead,a.startHeadOffset,a.endHeadOffset;var s=Fn(a,Vg);this.body.destroy(),this.body=n,this.appendChild(this.body),this.applyArrowStyle(s,[this.body])}else"startHeadOffset"===e?this.moveArrowHeadAlongTangent(n,!0):"endHeadOffset"===e&&this.moveArrowHeadAlongTangent(n,!1)}},{key:"getArrowHeadType",value:function(e){return"boolean"==typeof e?"default":"custom"}},{key:"appendArrowHead",value:function(e,t){var n;n="default"===e?this.createDefaultArrowHead():t?this.attributes.startHead:this.attributes.endHead,this.transformArrowHead(n,t),n.setAttribute("zIndex",1),t?this.startHead=n:this.endHead=n,this.appendChild(n);var r=t?this.attributes.startHeadOffset:this.attributes.endHeadOffset;r&&this.moveArrowHeadAlongTangent(r,t)}},{key:"transformArrowHead",value:function(e,t){var n,r=le(),A=0,i=0,o=0,a=0,s=this.body&&this.body.nodeName;if(s===bn.LINE){var l=this.body.attributes,u=l.x1,c=l.x2,h=l.y1,d=l.y2;A=t?c:u,i=t?u:c,o=t?d:h,a=t?h:d}else if(s===bn.POLYLINE){var f=this.body.attributes.points,p=f.length;A=t?f[1][0]:f[p-2][0],o=t?f[1][1]:f[p-2][1],i=t?f[0][0]:f[p-1][0],a=t?f[0][1]:f[p-1][1]}else if(s===bn.PATH){var g=y(this.getTangent(this.body,t),2),v=g[0],C=g[1];A=v[0],o=v[1],i=C[0],a=C[1]}var B=A-i,m=o-a;n=Math.atan2(m,B),r=he(i,a,0),t?(this.startHeadPosition=r,this.startHeadRad=n):(this.endHeadPosition=r,this.endHeadRad=n),e.setLocalPosition(r),e.setLocalEulerAngles(180*n/Math.PI+e.getLocalEulerAngles())}},{key:"moveArrowHeadAlongTangent",value:function(e,t){var n=t?this.startHead:this.endHead;n&&n.setLocalPosition(xe(le(),t?this.startHeadPosition:this.endHeadPosition,he(Math.cos(t?this.startHeadRad:this.endHeadRad)*e,Math.sin(t?this.startHeadRad:this.endHeadRad)*e,0))),this.body}},{key:"destroyArrowHead",value:function(e){e&&this.startHead&&(this.startHead.destroy(),this.startHead=void 0),!e&&this.endHead&&(this.endHead.destroy(),this.endHead=void 0)}},{key:"getTangent",value:function(e,t){return t?e.getStartTangent():e.getEndTangent()}},{key:"createDefaultArrowHead",value:function(){var e=this.attributes,t=e.stroke,n=e.lineWidth,r=Math.sin,A=Math.cos,i=Math.PI,o=10*A(i/6);return new Bs({style:{d:"M".concat(o/2,",").concat(10*r(i/6)," L-").concat(o/2,",0 L").concat(o/2,",-").concat(10*r(i/6)),stroke:t,lineWidth:n,transformOrigin:"center"}})}},{key:"applyArrowStyle",value:function(e,t){var n=e.opacity,r=e.stroke,A=e.strokeOpacity,i=e.lineWidth,o=e.increasedLineWidthForHitTesting;t.forEach((function(e){e&&(Ge(n)||(e.style.opacity=n),Ge(r)||(e.style.stroke=r),Ge(A)||(e.style.strokeOpacity=A),Ge(i)||(e.style.lineWidth=i),Ge(o)||(e.style.increasedLineWidthForHitTesting=o))}))}}])}(cs);Wg.tag="arrow",Wg.PARSED_STYLE_LIST=new Set([].concat(c(cs.PARSED_STYLE_LIST),["body","startHead","endHead","startHeadOffset","endHeadOffset","stroke","lineWidth","opacity","strokeOpacity"]));var Xg=Math.PI,Yg=2*Xg,jg=Math.sin,Zg=Math.cos,Jg=Math.acos,qg=Math.atan2,$g=Math.sqrt,ev=Math.max,tv=Math.min,nv=1e-4;[{name:"sr",inherits:!1,interpolable:!0,syntax:wr.LENGTH_PERCENTAGE},{name:"sr0",inherits:!1,interpolable:!0,syntax:wr.LENGTH_PERCENTAGE},{name:"startAngle",inherits:!1,interpolable:!0,syntax:wr.ANGLE},{name:"endAngle",inherits:!1,interpolable:!0,syntax:wr.ANGLE}].forEach((function(e){Is(e)}));var rv=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}};function Av(e,t,n,r,A,i,o){var a=e-n,s=t-r,l=i/$g(a*a+s*s),u=l*s,c=-l*a,h=e+u,d=t+c,f=n+u,p=r+c,g=(h+f)/2,v=(d+p)/2,y=f-h,C=p-d,B=y*y+C*C,m=A-i,w=h*p-f*d,E=(C<0?-1:1)*$g(ev(0,m*m*B-w*w)),x=(w*C-y*E)/B,S=(-w*y-C*E)/B,T=(w*C+y*E)/B,F=(-w*y+C*E)/B,b=x-g,I=S-v,L=T-g,Q=F-v;return b*b+I*I>L*L+Q*Q&&(x=T,S=F),{cx:x,cy:S,x0:-u,y0:-c,x1:x*(A/m-1),y1:S*(A/m-1)}}function iv(e,t){return(t=t<0&&e>=0?t+Yg:t)-e<=Xg?0:1}var ov=function(e){function t(e){var n;return o(this,t),(n=p(this,t,[e])).updatePath(),n}return v(t,e),s(t,[{key:"setAttribute",value:function(e,n,r){Yt(t,"setAttribute",this)([e,n,r]),["startAngle","endAngle","sr","sr0","radius"].indexOf(e)>-1&&this.updatePath()}},{key:"updatePath",value:function(){var e=this.parsedStyle,n=e.x,r=e.y,A=e.startAngle,i=e.endAngle,o=e.sr,a=e.sr0,s=e.radius,l=this.createPath(n,r,A?Zn(A):0,i?Zn(i):2*Math.PI,o||0,a||0,s||[0,0,0,0]);Yt(t,"setAttribute",this)(["d",l])}},{key:"createPath",value:function(e,t,n,r,A,i,o){if(!(A<=0)){var a=rv(e,t,A,n),s=rv(e,t,A,r),l=rv(e,t,i,n),u=rv(e,t,i,r);if(Je(r-n,2*Math.PI)){var c=rv(e,t,A,n+Math.PI),h=rv(e,t,i,n+Math.PI),d=[["M",a.x,a.y],["A",A,A,0,1,1,c.x,c.y],["A",A,A,0,1,1,s.x,s.y],["M",l.x,l.y]];return i&&(d.push(["A",i,i,0,1,0,h.x,h.y]),d.push(["A",i,i,0,1,0,u.x,u.y])),d.push(["M",a.x,a.y]),d.push(["Z"]),d}var f=r-n,p=A*Zg(n),g=A*jg(n),v=i*Zg(r),C=i*jg(r),B=A*Zg(r),m=A*jg(r),w=i*Zg(n),E=i*jg(n),x=y(o,4),S=x[0],T=x[1],F=x[2],b=x[3],I=(A-i)/2,L=tv(I,S),Q=tv(I,T),U=tv(I,F),R=tv(I,b),M=ev(L,Q),H=ev(U,R),O=M,k=H;if((M>nv||H>nv)&&f<Xg){var N=function(e,t,n,r,A,i,o,a){var s=n-e,l=r-t,u=o-A,c=a-i,h=c*s-u*l;if(!(h*h<nv))return[e+(h=(u*(t-i)-c*(e-A))/h)*s,t+h*l]}(p,g,w,E,B,m,v,C);if(N){var _=p-N[0],D=g-N[1],P=B-N[0],G=m-N[1],K=1/jg(Jg((_*P+D*G)/($g(_*_+D*D)*$g(P*P+G*G)))/2),z=$g(N[0]*N[0]+N[1]*N[1]);O=tv(M,(A-z)/(K+1)),k=tv(H,(i-z)/(K-1))}}var V=iv(n,r),W=[];if(O>nv){var X=tv(S,O),Y=tv(T,O),j=Av(w,E,p,g,A,X),Z=Av(B,m,v,C,A,Y);if(W.push(["M",e+j.cx+j.x0,t+j.cy+j.y0]),O<M&&X===Y){var J=qg(j.y0,j.x0),q=qg(Z.y0,Z.x0);W.push(["A",O,O,0,iv(J,q),1,e+Z.cx+Z.x0,t+Z.cy+Z.y0])}else{if(X>0){var $=qg(j.y0,j.x0),ee=qg(j.y1,j.x1),te=rv(e,t,A,ee);W.push(["A",X,X,0,iv($,ee),1,te.x,te.y])}var ne=qg(j.cy+j.y1,j.cx+j.x1),re=qg(Z.cy+Z.y1,Z.cx+Z.x1),Ae=rv(e,t,A,re);if(W.push(["A",A,A,0,iv(ne,re),1,Ae.x,Ae.y]),Y>0){var ie=qg(Z.y1,Z.x1),oe=qg(Z.y0,Z.x0);W.push(["A",Y,Y,0,iv(ie,oe),1,e+Z.cx+Z.x0,t+Z.cy+Z.y0])}}}else W.push(["M",a.x,a.y]),W.push(["A",A,A,0,V,1,s.x,s.y]);if(i<nv)W.push(["L",u.x,u.y]);else if(k>nv){var ae=tv(b,k),se=tv(F,k),le=Av(v,C,0,0,i-A,se),ue=Av(0,0,w,E,i-A,ae);if(W.push(["L",e+le.cx+le.x0,t+le.cy+le.y0]),k<H&&ae===se){var ce=qg(le.y0,le.x0),he=qg(ue.y0,ue.x0),de=rv(e,t,i,he);W.push(["A",O,O,0,iv(ce,he),1,de.x,de.y])}else{if(se>0){var fe=qg(le.y0,le.x0),pe=qg(le.y1,le.x1),ge=rv(e,t,i-A,pe);W.push(["A",se,se,0,iv(fe,pe),1,ge.x,ge.y])}var ve=qg(le.cy+le.y1,le.cx+le.x1),ye=qg(ue.cy+ue.y1,ue.cx+ue.x1),Ce=rv(e,t,i,ye);if(W.push(["A",i,i,0,iv(ye,ve),0,Ce.x,Ce.y]),W.push(["L",Ce.x,Ce.y]),ae>0){var Be=qg(ue.y1,ue.x1),me=qg(ue.y0,ue.x0);W.push(["A",ae,ae,0,iv(Be,me),1,e+ue.cx+ue.x0,t+ue.cy+ue.y0])}}}else W.push(["L",u.x,u.y]),W.push(["A",i,i,0,V,0,l.x,l.y]);return W.push(["Z"]),W}}}])}(Bs);ov.PARSED_STYLE_LIST=new Set([].concat(c(Bs.PARSED_STYLE_LIST),["x","y","sr","sr0","radius","startAngle","endAngle"]));var av={exports:{}};
/**
   * @license
   * Lodash <https://lodash.com/>
   * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
   * Released under MIT license <https://lodash.com/license>
   * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
   * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
   */!function(e,t){(function(){var n,r="Expected a function",A="__lodash_hash_undefined__",i="__lodash_placeholder__",o=16,a=32,s=64,l=128,u=256,c=1/0,h=9007199254740991,d=NaN,f=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",a],["partialRight",s],["rearg",u]],g="[object Arguments]",v="[object Array]",y="[object Boolean]",B="[object Date]",m="[object Error]",w="[object Function]",E="[object GeneratorFunction]",x="[object Map]",S="[object Number]",T="[object Object]",F="[object Promise]",b="[object RegExp]",I="[object Set]",L="[object String]",Q="[object Symbol]",U="[object WeakMap]",R="[object ArrayBuffer]",M="[object DataView]",H="[object Float32Array]",O="[object Float64Array]",k="[object Int8Array]",N="[object Int16Array]",_="[object Int32Array]",D="[object Uint8Array]",P="[object Uint8ClampedArray]",G="[object Uint16Array]",K="[object Uint32Array]",z=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,j=RegExp(X.source),Z=RegExp(Y.source),J=/<%-([\s\S]+?)%>/g,q=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/[\\^$.*+?()[\]{}|]/g,Ae=RegExp(re.source),ie=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,pe=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,Ce=/^(?:0|[1-9]\d*)$/,Be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,me=/($^)/,we=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",Fe="A-Z\\xc0-\\xd6\\xd8-\\xde",be="\\ufe0e\\ufe0f",Ie="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Le="['’]",Qe="["+Ee+"]",Ue="["+Ie+"]",Re="["+xe+"]",Me="\\d+",He="["+Se+"]",Oe="["+Te+"]",ke="[^"+Ee+Ie+Me+Se+Te+Fe+"]",Ne="\\ud83c[\\udffb-\\udfff]",_e="[^"+Ee+"]",De="(?:\\ud83c[\\udde6-\\uddff]){2}",Pe="[\\ud800-\\udbff][\\udc00-\\udfff]",Ge="["+Fe+"]",Ke="\\u200d",ze="(?:"+Oe+"|"+ke+")",Ve="(?:"+Ge+"|"+ke+")",We="(?:['’](?:d|ll|m|re|s|t|ve))?",Xe="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+Re+"|"+Ne+")"+"?",je="["+be+"]?",Ze=je+Ye+("(?:"+Ke+"(?:"+[_e,De,Pe].join("|")+")"+je+Ye+")*"),Je="(?:"+[He,De,Pe].join("|")+")"+Ze,qe="(?:"+[_e+Re+"?",Re,De,Pe,Qe].join("|")+")",$e=RegExp(Le,"g"),et=RegExp(Re,"g"),tt=RegExp(Ne+"(?="+Ne+")|"+qe+Ze,"g"),nt=RegExp([Ge+"?"+Oe+"+"+We+"(?="+[Ue,Ge,"$"].join("|")+")",Ve+"+"+Xe+"(?="+[Ue,Ge+ze,"$"].join("|")+")",Ge+"?"+ze+"+"+We,Ge+"+"+Xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Je].join("|"),"g"),rt=RegExp("["+Ke+Ee+xe+be+"]"),At=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,it=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,at={};at[H]=at[O]=at[k]=at[N]=at[_]=at[D]=at[P]=at[G]=at[K]=!0,at[g]=at[v]=at[R]=at[y]=at[M]=at[B]=at[m]=at[w]=at[x]=at[S]=at[T]=at[b]=at[I]=at[L]=at[U]=!1;var st={};st[g]=st[v]=st[R]=st[M]=st[y]=st[B]=st[H]=st[O]=st[k]=st[N]=st[_]=st[x]=st[S]=st[T]=st[b]=st[I]=st[L]=st[Q]=st[D]=st[P]=st[G]=st[K]=!0,st[m]=st[w]=st[U]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,ct=parseInt,ht="object"==typeof C&&C&&C.Object===Object&&C,dt="object"==typeof self&&self&&self.Object===Object&&self,ft=ht||dt||Function("return this")(),pt=t&&!t.nodeType&&t,gt=pt&&e&&!e.nodeType&&e,vt=gt&&gt.exports===pt,yt=vt&&ht.process,Ct=function(){try{var e=gt&&gt.require&&gt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),Bt=Ct&&Ct.isArrayBuffer,mt=Ct&&Ct.isDate,wt=Ct&&Ct.isMap,Et=Ct&&Ct.isRegExp,xt=Ct&&Ct.isSet,St=Ct&&Ct.isTypedArray;function Tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ft(e,t,n,r){for(var A=-1,i=null==e?0:e.length;++A<i;){var o=e[A];t(r,o,n(o),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function It(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Qt(e,t){for(var n=-1,r=null==e?0:e.length,A=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[A++]=o)}return i}function Ut(e,t){return!!(null==e?0:e.length)&&Gt(e,t,0)>-1}function Rt(e,t,n){for(var r=-1,A=null==e?0:e.length;++r<A;)if(n(t,e[r]))return!0;return!1}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,A=Array(r);++n<r;)A[n]=t(e[n],n,e);return A}function Ht(e,t){for(var n=-1,r=t.length,A=e.length;++n<r;)e[A+n]=t[n];return e}function Ot(e,t,n,r){var A=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++A]);++A<i;)n=t(n,e[A],A,e);return n}function kt(e,t,n,r){var A=null==e?0:e.length;for(r&&A&&(n=e[--A]);A--;)n=t(n,e[A],A,e);return n}function Nt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var _t=Wt("length");function Dt(e,t,n){var r;return n(e,(function(e,n,A){if(t(e,n,A))return r=n,!1})),r}function Pt(e,t,n,r){for(var A=e.length,i=n+(r?1:-1);r?i--:++i<A;)if(t(e[i],i,e))return i;return-1}function Gt(e,t,n){return t==t?function(e,t,n){var r=n-1,A=e.length;for(;++r<A;)if(e[r]===t)return r;return-1}(e,t,n):Pt(e,zt,n)}function Kt(e,t,n,r){for(var A=n-1,i=e.length;++A<i;)if(r(e[A],t))return A;return-1}function zt(e){return e!=e}function Vt(e,t){var n=null==e?0:e.length;return n?jt(e,t)/n:d}function Wt(e){return function(t){return null==t?n:t[e]}}function Xt(e){return function(t){return null==e?n:e[t]}}function Yt(e,t,n,r,A){return A(e,(function(e,A,i){n=r?(r=!1,e):t(n,e,A,i)})),n}function jt(e,t){for(var r,A=-1,i=e.length;++A<i;){var o=t(e[A]);o!==n&&(r=r===n?o:r+o)}return r}function Zt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Jt(e){return e?e.slice(0,pn(e)+1).replace(ie,""):e}function qt(e){return function(t){return e(t)}}function $t(e,t){return Mt(t,(function(t){return e[t]}))}function en(e,t){return e.has(t)}function tn(e,t){for(var n=-1,r=e.length;++n<r&&Gt(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length;n--&&Gt(t,e[n],0)>-1;);return n}var rn=Xt({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),An=Xt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function on(e){return"\\"+lt[e]}function an(e){return rt.test(e)}function sn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,r=e.length,A=0,o=[];++n<r;){var a=e[n];a!==t&&a!==i||(e[n]=i,o[A++]=n)}return o}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function dn(e){return an(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):_t(e)}function fn(e){return an(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function pn(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var gn=Xt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var vn=function e(t){var C,oe=(t=null==t?ft:vn.defaults(ft.Object(),t,vn.pick(ft,it))).Array,Ee=t.Date,xe=t.Error,Se=t.Function,Te=t.Math,Fe=t.Object,be=t.RegExp,Ie=t.String,Le=t.TypeError,Qe=oe.prototype,Ue=Se.prototype,Re=Fe.prototype,Me=t["__core-js_shared__"],He=Ue.toString,Oe=Re.hasOwnProperty,ke=0,Ne=(C=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||""))?"Symbol(src)_1."+C:"",_e=Re.toString,De=He.call(Fe),Pe=ft._,Ge=be("^"+He.call(Oe).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ke=vt?t.Buffer:n,ze=t.Symbol,Ve=t.Uint8Array,We=Ke?Ke.allocUnsafe:n,Xe=ln(Fe.getPrototypeOf,Fe),Ye=Fe.create,je=Re.propertyIsEnumerable,Ze=Qe.splice,Je=ze?ze.isConcatSpreadable:n,qe=ze?ze.iterator:n,tt=ze?ze.toStringTag:n,rt=function(){try{var e=hi(Fe,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ht=Ee&&Ee.now!==ft.Date.now&&Ee.now,dt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Te.ceil,gt=Te.floor,yt=Fe.getOwnPropertySymbols,Ct=Ke?Ke.isBuffer:n,_t=t.isFinite,Xt=Qe.join,yn=ln(Fe.keys,Fe),Cn=Te.max,Bn=Te.min,mn=Ee.now,wn=t.parseInt,En=Te.random,xn=Qe.reverse,Sn=hi(t,"DataView"),Tn=hi(t,"Map"),Fn=hi(t,"Promise"),bn=hi(t,"Set"),In=hi(t,"WeakMap"),Ln=hi(Fe,"create"),Qn=In&&new In,Un={},Rn=Ni(Sn),Mn=Ni(Tn),Hn=Ni(Fn),On=Ni(bn),kn=Ni(In),Nn=ze?ze.prototype:n,_n=Nn?Nn.valueOf:n,Dn=Nn?Nn.toString:n;function Pn(e){if(na(e)&&!Vo(e)&&!(e instanceof Vn)){if(e instanceof zn)return e;if(Oe.call(e,"__wrapped__"))return _i(e)}return new zn(e)}var Gn=function(){function e(){}return function(t){if(!ta(t))return{};if(Ye)return Ye(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Kn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function Vn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Xn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Yn;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new Xn(e);this.size=t.size}function Jn(e,t){var n=Vo(e),r=!n&&zo(e),A=!n&&!r&&jo(e),i=!n&&!r&&!A&&ua(e),o=n||r||A||i,a=o?Zt(e.length,Ie):[],s=a.length;for(var l in e)!t&&!Oe.call(e,l)||o&&("length"==l||A&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ci(l,s))||a.push(l);return a}function qn(e){var t=e.length;return t?e[jr(0,t-1)]:n}function $n(e,t){return Hi(LA(e),sr(t,0,e.length))}function er(e){return Hi(LA(e))}function tr(e,t,r){(r!==n&&!Po(e[t],r)||r===n&&!(t in e))&&or(e,t,r)}function nr(e,t,r){var A=e[t];Oe.call(e,t)&&Po(A,r)&&(r!==n||t in e)||or(e,t,r)}function rr(e,t){for(var n=e.length;n--;)if(Po(e[n][0],t))return n;return-1}function Ar(e,t,n,r){return dr(e,(function(e,A,i){t(r,e,n(e),i)})),r}function ir(e,t){return e&&QA(t,Ua(t),e)}function or(e,t,n){"__proto__"==t&&rt?rt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,A=t.length,i=oe(A),o=null==e;++r<A;)i[r]=o?n:Fa(e,t[r]);return i}function sr(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function lr(e,t,r,A,i,o){var a,s=1&t,l=2&t,u=4&t;if(r&&(a=i?r(e,A,i,o):r(e)),a!==n)return a;if(!ta(e))return e;var c=Vo(e);if(c){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!s)return LA(e,a)}else{var h=pi(e),d=h==w||h==E;if(jo(e))return xA(e,s);if(h==T||h==g||d&&!i){if(a=l||d?{}:vi(e),!s)return l?function(e,t){return QA(e,fi(e),t)}(e,function(e,t){return e&&QA(t,Ra(t),e)}(a,e)):function(e,t){return QA(e,di(e),t)}(e,ir(a,e))}else{if(!st[h])return i?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case R:return SA(e);case y:case B:return new r(+e);case M:return function(e,t){var n=t?SA(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case H:case O:case k:case N:case _:case D:case P:case G:case K:return TA(e,n);case x:return new r;case S:case L:return new r(e);case b:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return new r;case Q:return A=e,_n?Fe(_n.call(A)):{}}var A}(e,h,s)}}o||(o=new Zn);var f=o.get(e);if(f)return f;o.set(e,a),aa(e)?e.forEach((function(n){a.add(lr(n,t,r,n,e,o))})):ra(e)&&e.forEach((function(n,A){a.set(A,lr(n,t,r,A,e,o))}));var p=c?n:(u?l?ii:Ai:l?Ra:Ua)(e);return bt(p||e,(function(n,A){p&&(n=e[A=n]),nr(a,A,lr(n,t,r,A,e,o))})),a}function ur(e,t,r){var A=r.length;if(null==e)return!A;for(e=Fe(e);A--;){var i=r[A],o=t[i],a=e[i];if(a===n&&!(i in e)||!o(a))return!1}return!0}function cr(e,t,A){if("function"!=typeof e)throw new Le(r);return Qi((function(){e.apply(n,A)}),t)}function hr(e,t,n,r){var A=-1,i=Ut,o=!0,a=e.length,s=[],l=t.length;if(!a)return s;n&&(t=Mt(t,qt(n))),r?(i=Rt,o=!1):t.length>=200&&(i=en,o=!1,t=new jn(t));e:for(;++A<a;){var u=e[A],c=null==n?u:n(u);if(u=r||0!==u?u:0,o&&c==c){for(var h=l;h--;)if(t[h]===c)continue e;s.push(u)}else i(t,c,r)||s.push(u)}return s}Pn.templateSettings={escape:J,evaluate:q,interpolate:$,variable:"",imports:{_:Pn}},Pn.prototype=Kn.prototype,Pn.prototype.constructor=Pn,zn.prototype=Gn(Kn.prototype),zn.prototype.constructor=zn,Vn.prototype=Gn(Kn.prototype),Vn.prototype.constructor=Vn,Wn.prototype.clear=function(){this.__data__=Ln?Ln(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Ln){var r=t[e];return r===A?n:r}return Oe.call(t,e)?t[e]:n},Wn.prototype.has=function(e){var t=this.__data__;return Ln?t[e]!==n:Oe.call(t,e)},Wn.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ln&&t===n?A:t,this},Xn.prototype.clear=function(){this.__data__=[],this.size=0},Xn.prototype.delete=function(e){var t=this.__data__,n=rr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},Xn.prototype.get=function(e){var t=this.__data__,r=rr(t,e);return r<0?n:t[r][1]},Xn.prototype.has=function(e){return rr(this.__data__,e)>-1},Xn.prototype.set=function(e,t){var n=this.__data__,r=rr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Tn||Xn),string:new Wn}},Yn.prototype.delete=function(e){var t=ui(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return ui(this,e).get(e)},Yn.prototype.has=function(e){return ui(this,e).has(e)},Yn.prototype.set=function(e,t){var n=ui(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},jn.prototype.add=jn.prototype.push=function(e){return this.__data__.set(e,A),this},jn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Xn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Xn){var r=n.__data__;if(!Tn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(e,t),this.size=n.size,this};var dr=MA(mr),fr=MA(wr,!0);function pr(e,t){var n=!0;return dr(e,(function(e,r,A){return n=!!t(e,r,A)})),n}function gr(e,t,r){for(var A=-1,i=e.length;++A<i;){var o=e[A],a=t(o);if(null!=a&&(s===n?a==a&&!la(a):r(a,s)))var s=a,l=o}return l}function vr(e,t){var n=[];return dr(e,(function(e,r,A){t(e,r,A)&&n.push(e)})),n}function yr(e,t,n,r,A){var i=-1,o=e.length;for(n||(n=yi),A||(A=[]);++i<o;){var a=e[i];t>0&&n(a)?t>1?yr(a,t-1,n,r,A):Ht(A,a):r||(A[A.length]=a)}return A}var Cr=HA(),Br=HA(!0);function mr(e,t){return e&&Cr(e,t,Ua)}function wr(e,t){return e&&Br(e,t,Ua)}function Er(e,t){return Qt(t,(function(t){return qo(e[t])}))}function xr(e,t){for(var r=0,A=(t=BA(t,e)).length;null!=e&&r<A;)e=e[ki(t[r++])];return r&&r==A?e:n}function Sr(e,t,n){var r=t(e);return Vo(e)?r:Ht(r,n(e))}function Tr(e){return null==e?e===n?"[object Undefined]":"[object Null]":tt&&tt in Fe(e)?function(e){var t=Oe.call(e,tt),r=e[tt];try{e[tt]=n;var A=!0}catch(e){}var i=_e.call(e);A&&(t?e[tt]=r:delete e[tt]);return i}(e):function(e){return _e.call(e)}(e)}function Fr(e,t){return e>t}function br(e,t){return null!=e&&Oe.call(e,t)}function Ir(e,t){return null!=e&&t in Fe(e)}function Lr(e,t,r){for(var A=r?Rt:Ut,i=e[0].length,o=e.length,a=o,s=oe(o),l=1/0,u=[];a--;){var c=e[a];a&&t&&(c=Mt(c,qt(t))),l=Bn(c.length,l),s[a]=!r&&(t||i>=120&&c.length>=120)?new jn(a&&c):n}c=e[0];var h=-1,d=s[0];e:for(;++h<i&&u.length<l;){var f=c[h],p=t?t(f):f;if(f=r||0!==f?f:0,!(d?en(d,p):A(u,p,r))){for(a=o;--a;){var g=s[a];if(!(g?en(g,p):A(e[a],p,r)))continue e}d&&d.push(p),u.push(f)}}return u}function Qr(e,t,r){var A=null==(e=bi(e,t=BA(t,e)))?e:e[ki(Zi(t))];return null==A?n:Tt(A,e,r)}function Ur(e){return na(e)&&Tr(e)==g}function Rr(e,t,r,A,i){return e===t||(null==e||null==t||!na(e)&&!na(t)?e!=e&&t!=t:function(e,t,r,A,i,o){var a=Vo(e),s=Vo(t),l=a?v:pi(e),u=s?v:pi(t),c=(l=l==g?T:l)==T,h=(u=u==g?T:u)==T,d=l==u;if(d&&jo(e)){if(!jo(t))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new Zn),a||ua(e)?ni(e,t,r,A,i,o):function(e,t,n,r,A,i,o){switch(n){case M:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!i(new Ve(e),new Ve(t)));case y:case B:case S:return Po(+e,+t);case m:return e.name==t.name&&e.message==t.message;case b:case L:return e==t+"";case x:var a=sn;case I:var s=1&r;if(a||(a=cn),e.size!=t.size&&!s)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=ni(a(e),a(t),r,A,i,o);return o.delete(e),u;case Q:if(_n)return _n.call(e)==_n.call(t)}return!1}(e,t,l,r,A,i,o);if(!(1&r)){var f=c&&Oe.call(e,"__wrapped__"),p=h&&Oe.call(t,"__wrapped__");if(f||p){var C=f?e.value():e,w=p?t.value():t;return o||(o=new Zn),i(C,w,r,A,o)}}if(!d)return!1;return o||(o=new Zn),function(e,t,r,A,i,o){var a=1&r,s=Ai(e),l=s.length,u=Ai(t),c=u.length;if(l!=c&&!a)return!1;var h=l;for(;h--;){var d=s[h];if(!(a?d in t:Oe.call(t,d)))return!1}var f=o.get(e),p=o.get(t);if(f&&p)return f==t&&p==e;var g=!0;o.set(e,t),o.set(t,e);var v=a;for(;++h<l;){var y=e[d=s[h]],C=t[d];if(A)var B=a?A(C,y,d,t,e,o):A(y,C,d,e,t,o);if(!(B===n?y===C||i(y,C,r,A,o):B)){g=!1;break}v||(v="constructor"==d)}if(g&&!v){var m=e.constructor,w=t.constructor;m==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof w&&w instanceof w||(g=!1)}return o.delete(e),o.delete(t),g}(e,t,r,A,i,o)}(e,t,r,A,Rr,i))}function Mr(e,t,r,A){var i=r.length,o=i,a=!A;if(null==e)return!o;for(e=Fe(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var l=(s=r[i])[0],u=e[l],c=s[1];if(a&&s[2]){if(u===n&&!(l in e))return!1}else{var h=new Zn;if(A)var d=A(u,c,l,e,t,h);if(!(d===n?Rr(c,u,3,A,h):d))return!1}}return!0}function Hr(e){return!(!ta(e)||(t=e,Ne&&Ne in t))&&(qo(e)?Ge:ve).test(Ni(e));var t}function Or(e){return"function"==typeof e?e:null==e?As:"object"==typeof e?Vo(e)?Gr(e[0],e[1]):Pr(e):ds(e)}function kr(e){if(!xi(e))return yn(e);var t=[];for(var n in Fe(e))Oe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Nr(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var n in Fe(e))t.push(n);return t}(e);var t=xi(e),n=[];for(var r in e)("constructor"!=r||!t&&Oe.call(e,r))&&n.push(r);return n}function _r(e,t){return e<t}function Dr(e,t){var n=-1,r=Xo(e)?oe(e.length):[];return dr(e,(function(e,A,i){r[++n]=t(e,A,i)})),r}function Pr(e){var t=ci(e);return 1==t.length&&t[0][2]?Ti(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function Gr(e,t){return mi(e)&&Si(t)?Ti(ki(e),t):function(r){var A=Fa(r,e);return A===n&&A===t?ba(r,e):Rr(t,A,3)}}function Kr(e,t,r,A,i){e!==t&&Cr(t,(function(o,a){if(i||(i=new Zn),ta(o))!function(e,t,r,A,i,o,a){var s=Ii(e,r),l=Ii(t,r),u=a.get(l);if(u)return void tr(e,r,u);var c=o?o(s,l,r+"",e,t,a):n,h=c===n;if(h){var d=Vo(l),f=!d&&jo(l),p=!d&&!f&&ua(l);c=l,d||f||p?Vo(s)?c=s:Yo(s)?c=LA(s):f?(h=!1,c=xA(l,!0)):p?(h=!1,c=TA(l,!0)):c=[]:ia(l)||zo(l)?(c=s,zo(s)?c=ya(s):ta(s)&&!qo(s)||(c=vi(l))):h=!1}h&&(a.set(l,c),i(c,l,A,o,a),a.delete(l));tr(e,r,c)}(e,t,a,r,Kr,A,i);else{var s=A?A(Ii(e,a),o,a+"",e,t,i):n;s===n&&(s=o),tr(e,a,s)}}),Ra)}function zr(e,t){var r=e.length;if(r)return Ci(t+=t<0?r:0,r)?e[t]:n}function Vr(e,t,n){t=t.length?Mt(t,(function(e){return Vo(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[As];var r=-1;t=Mt(t,qt(li()));var A=Dr(e,(function(e,n,A){var i=Mt(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(A,(function(e,t){return function(e,t,n){var r=-1,A=e.criteria,i=t.criteria,o=A.length,a=n.length;for(;++r<o;){var s=FA(A[r],i[r]);if(s)return r>=a?s:s*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function Wr(e,t,n){for(var r=-1,A=t.length,i={};++r<A;){var o=t[r],a=xr(e,o);n(a,o)&&eA(i,BA(o,e),a)}return i}function Xr(e,t,n,r){var A=r?Kt:Gt,i=-1,o=t.length,a=e;for(e===t&&(t=LA(t)),n&&(a=Mt(e,qt(n)));++i<o;)for(var s=0,l=t[i],u=n?n(l):l;(s=A(a,u,s,r))>-1;)a!==e&&Ze.call(a,s,1),Ze.call(e,s,1);return e}function Yr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var A=t[n];if(n==r||A!==i){var i=A;Ci(A)?Ze.call(e,A,1):hA(e,A)}}return e}function jr(e,t){return e+gt(En()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=gt(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return Ui(Fi(e,t,As),e+"")}function qr(e){return qn(Pa(e))}function $r(e,t){var n=Pa(e);return Hi(n,sr(t,0,n.length))}function eA(e,t,r,A){if(!ta(e))return e;for(var i=-1,o=(t=BA(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var l=ki(t[i]),u=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=a){var c=s[l];(u=A?A(c,l,s):n)===n&&(u=ta(c)?c:Ci(t[i+1])?[]:{})}nr(s,l,u),s=s[l]}return e}var tA=Qn?function(e,t){return Qn.set(e,t),e}:As,nA=rt?function(e,t){return rt(e,"toString",{configurable:!0,enumerable:!1,value:ts(t),writable:!0})}:As;function rA(e){return Hi(Pa(e))}function AA(e,t,n){var r=-1,A=e.length;t<0&&(t=-t>A?0:A+t),(n=n>A?A:n)<0&&(n+=A),A=t>n?0:n-t>>>0,t>>>=0;for(var i=oe(A);++r<A;)i[r]=e[r+t];return i}function iA(e,t){var n;return dr(e,(function(e,r,A){return!(n=t(e,r,A))})),!!n}function oA(e,t,n){var r=0,A=null==e?r:e.length;if("number"==typeof t&&t==t&&A<=2147483647){for(;r<A;){var i=r+A>>>1,o=e[i];null!==o&&!la(o)&&(n?o<=t:o<t)?r=i+1:A=i}return A}return aA(e,t,As,n)}function aA(e,t,r,A){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=r(t))!=t,s=null===t,l=la(t),u=t===n;i<o;){var c=gt((i+o)/2),h=r(e[c]),d=h!==n,f=null===h,p=h==h,g=la(h);if(a)var v=A||p;else v=u?p&&(A||d):s?p&&d&&(A||!f):l?p&&d&&!f&&(A||!g):!f&&!g&&(A?h<=t:h<t);v?i=c+1:o=c}return Bn(o,4294967294)}function sA(e,t){for(var n=-1,r=e.length,A=0,i=[];++n<r;){var o=e[n],a=t?t(o):o;if(!n||!Po(a,s)){var s=a;i[A++]=0===o?0:o}}return i}function lA(e){return"number"==typeof e?e:la(e)?d:+e}function uA(e){if("string"==typeof e)return e;if(Vo(e))return Mt(e,uA)+"";if(la(e))return Dn?Dn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function cA(e,t,n){var r=-1,A=Ut,i=e.length,o=!0,a=[],s=a;if(n)o=!1,A=Rt;else if(i>=200){var l=t?null:ZA(e);if(l)return cn(l);o=!1,A=en,s=new jn}else s=t?[]:a;e:for(;++r<i;){var u=e[r],c=t?t(u):u;if(u=n||0!==u?u:0,o&&c==c){for(var h=s.length;h--;)if(s[h]===c)continue e;t&&s.push(c),a.push(u)}else A(s,c,n)||(s!==a&&s.push(c),a.push(u))}return a}function hA(e,t){return null==(e=bi(e,t=BA(t,e)))||delete e[ki(Zi(t))]}function dA(e,t,n,r){return eA(e,t,n(xr(e,t)),r)}function fA(e,t,n,r){for(var A=e.length,i=r?A:-1;(r?i--:++i<A)&&t(e[i],i,e););return n?AA(e,r?0:i,r?i+1:A):AA(e,r?i+1:0,r?A:i)}function pA(e,t){var n=e;return n instanceof Vn&&(n=n.value()),Ot(t,(function(e,t){return t.func.apply(t.thisArg,Ht([e],t.args))}),n)}function gA(e,t,n){var r=e.length;if(r<2)return r?cA(e[0]):[];for(var A=-1,i=oe(r);++A<r;)for(var o=e[A],a=-1;++a<r;)a!=A&&(i[A]=hr(i[A]||o,e[a],t,n));return cA(yr(i,1),t,n)}function vA(e,t,r){for(var A=-1,i=e.length,o=t.length,a={};++A<i;){var s=A<o?t[A]:n;r(a,e[A],s)}return a}function yA(e){return Yo(e)?e:[]}function CA(e){return"function"==typeof e?e:As}function BA(e,t){return Vo(e)?e:mi(e,t)?[e]:Oi(Ca(e))}var mA=Jr;function wA(e,t,r){var A=e.length;return r=r===n?A:r,!t&&r>=A?e:AA(e,t,r)}var EA=lt||function(e){return ft.clearTimeout(e)};function xA(e,t){if(t)return e.slice();var n=e.length,r=We?We(n):new e.constructor(n);return e.copy(r),r}function SA(e){var t=new e.constructor(e.byteLength);return new Ve(t).set(new Ve(e)),t}function TA(e,t){var n=t?SA(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function FA(e,t){if(e!==t){var r=e!==n,A=null===e,i=e==e,o=la(e),a=t!==n,s=null===t,l=t==t,u=la(t);if(!s&&!u&&!o&&e>t||o&&a&&l&&!s&&!u||A&&a&&l||!r&&l||!i)return 1;if(!A&&!o&&!u&&e<t||u&&r&&i&&!A&&!o||s&&r&&i||!a&&i||!l)return-1}return 0}function bA(e,t,n,r){for(var A=-1,i=e.length,o=n.length,a=-1,s=t.length,l=Cn(i-o,0),u=oe(s+l),c=!r;++a<s;)u[a]=t[a];for(;++A<o;)(c||A<i)&&(u[n[A]]=e[A]);for(;l--;)u[a++]=e[A++];return u}function IA(e,t,n,r){for(var A=-1,i=e.length,o=-1,a=n.length,s=-1,l=t.length,u=Cn(i-a,0),c=oe(u+l),h=!r;++A<u;)c[A]=e[A];for(var d=A;++s<l;)c[d+s]=t[s];for(;++o<a;)(h||A<i)&&(c[d+n[o]]=e[A++]);return c}function LA(e,t){var n=-1,r=e.length;for(t||(t=oe(r));++n<r;)t[n]=e[n];return t}function QA(e,t,r,A){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=A?A(r[s],e[s],s,r,e):n;l===n&&(l=e[s]),i?or(r,s,l):nr(r,s,l)}return r}function UA(e,t){return function(n,r){var A=Vo(n)?Ft:Ar,i=t?t():{};return A(n,e,li(r,2),i)}}function RA(e){return Jr((function(t,r){var A=-1,i=r.length,o=i>1?r[i-1]:n,a=i>2?r[2]:n;for(o=e.length>3&&"function"==typeof o?(i--,o):n,a&&Bi(r[0],r[1],a)&&(o=i<3?n:o,i=1),t=Fe(t);++A<i;){var s=r[A];s&&e(t,s,A,o)}return t}))}function MA(e,t){return function(n,r){if(null==n)return n;if(!Xo(n))return e(n,r);for(var A=n.length,i=t?A:-1,o=Fe(n);(t?i--:++i<A)&&!1!==r(o[i],i,o););return n}}function HA(e){return function(t,n,r){for(var A=-1,i=Fe(t),o=r(t),a=o.length;a--;){var s=o[e?a:++A];if(!1===n(i[s],s,i))break}return t}}function OA(e){return function(t){var r=an(t=Ca(t))?fn(t):n,A=r?r[0]:t.charAt(0),i=r?wA(r,1).join(""):t.slice(1);return A[e]()+i}}function kA(e){return function(t){return Ot(qa(za(t).replace($e,"")),e,"")}}function NA(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Gn(e.prototype),r=e.apply(n,t);return ta(r)?r:n}}function _A(e){return function(t,r,A){var i=Fe(t);if(!Xo(t)){var o=li(r,3);t=Ua(t),r=function(e){return o(i[e],e,i)}}var a=e(t,r,A);return a>-1?i[o?t[a]:a]:n}}function DA(e){return ri((function(t){var A=t.length,i=A,o=zn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Le(r);if(o&&!s&&"wrapper"==ai(a))var s=new zn([],!0)}for(i=s?i:A;++i<A;){var l=ai(a=t[i]),u="wrapper"==l?oi(a):n;s=u&&wi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?s[ai(u[0])].apply(s,u[3]):1==a.length&&wi(a)?s[l]():s.thru(a)}return function(){var e=arguments,n=e[0];if(s&&1==e.length&&Vo(n))return s.plant(n).value();for(var r=0,i=A?t[r].apply(this,e):n;++r<A;)i=t[r].call(this,i);return i}}))}function PA(e,t,r,A,i,o,a,s,u,c){var h=t&l,d=1&t,f=2&t,p=24&t,g=512&t,v=f?n:NA(e);return function l(){for(var y=arguments.length,C=oe(y),B=y;B--;)C[B]=arguments[B];if(p)var m=si(l),w=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(C,m);if(A&&(C=bA(C,A,i,p)),o&&(C=IA(C,o,a,p)),y-=w,p&&y<c){var E=un(C,m);return YA(e,t,PA,l.placeholder,r,C,E,s,u,c-y)}var x=d?r:this,S=f?x[e]:e;return y=C.length,s?C=function(e,t){var r=e.length,A=Bn(t.length,r),i=LA(e);for(;A--;){var o=t[A];e[A]=Ci(o,r)?i[o]:n}return e}(C,s):g&&y>1&&C.reverse(),h&&u<y&&(C.length=u),this&&this!==ft&&this instanceof l&&(S=v||NA(S)),S.apply(x,C)}}function GA(e,t){return function(n,r){return function(e,t,n,r){return mr(e,(function(e,A,i){t(r,n(e),A,i)})),r}(n,e,t(r),{})}}function KA(e,t){return function(r,A){var i;if(r===n&&A===n)return t;if(r!==n&&(i=r),A!==n){if(i===n)return A;"string"==typeof r||"string"==typeof A?(r=uA(r),A=uA(A)):(r=lA(r),A=lA(A)),i=e(r,A)}return i}}function zA(e){return ri((function(t){return t=Mt(t,qt(li())),Jr((function(n){var r=this;return e(t,(function(e){return Tt(e,r,n)}))}))}))}function VA(e,t){var r=(t=t===n?" ":uA(t)).length;if(r<2)return r?Zr(t,e):t;var A=Zr(t,pt(e/dn(t)));return an(t)?wA(fn(A),0,e).join(""):A.slice(0,e)}function WA(e){return function(t,r,A){return A&&"number"!=typeof A&&Bi(t,r,A)&&(r=A=n),t=fa(t),r===n?(r=t,t=0):r=fa(r),function(e,t,n,r){for(var A=-1,i=Cn(pt((t-e)/(n||1)),0),o=oe(i);i--;)o[r?i:++A]=e,e+=n;return o}(t,r,A=A===n?t<r?1:-1:fa(A),e)}}function XA(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=va(t),n=va(n)),e(t,n)}}function YA(e,t,r,A,i,o,l,u,c,h){var d=8&t;t|=d?a:s,4&(t&=~(d?s:a))||(t&=-4);var f=[e,t,i,d?o:n,d?l:n,d?n:o,d?n:l,u,c,h],p=r.apply(n,f);return wi(e)&&Li(p,f),p.placeholder=A,Ri(p,e,t)}function jA(e){var t=Te[e];return function(e,n){if(e=va(e),(n=null==n?0:Bn(pa(n),292))&&_t(e)){var r=(Ca(e)+"e").split("e");return+((r=(Ca(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var ZA=bn&&1/cn(new bn([,-0]))[1]==c?function(e){return new bn(e)}:ls;function JA(e){return function(t){var n=pi(t);return n==x?sn(t):n==I?hn(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function qA(e,t,A,c,h,d,f,p){var g=2&t;if(!g&&"function"!=typeof e)throw new Le(r);var v=c?c.length:0;if(v||(t&=-97,c=h=n),f=f===n?f:Cn(pa(f),0),p=p===n?p:pa(p),v-=h?h.length:0,t&s){var y=c,C=h;c=h=n}var B=g?n:oi(e),m=[e,t,A,c,h,y,C,d,f,p];if(B&&function(e,t){var n=e[1],r=t[1],A=n|r,o=A<131,a=r==l&&8==n||r==l&&n==u&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],A|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?bA(c,s,t[4]):s,e[4]=c?un(e[3],i):t[4]}s=t[5],s&&(c=e[5],e[5]=c?IA(c,s,t[6]):s,e[6]=c?un(e[5],i):t[6]);s=t[7],s&&(e[7]=s);r&l&&(e[8]=null==e[8]?t[8]:Bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=A}(m,B),e=m[0],t=m[1],A=m[2],c=m[3],h=m[4],!(p=m[9]=m[9]===n?g?0:e.length:Cn(m[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||t==o?function(e,t,r){var A=NA(e);return function i(){for(var o=arguments.length,a=oe(o),s=o,l=si(i);s--;)a[s]=arguments[s];var u=o<3&&a[0]!==l&&a[o-1]!==l?[]:un(a,l);return(o-=u.length)<r?YA(e,t,PA,i.placeholder,n,a,u,n,n,r-o):Tt(this&&this!==ft&&this instanceof i?A:e,this,a)}}(e,t,p):t!=a&&33!=t||h.length?PA.apply(n,m):function(e,t,n,r){var A=1&t,i=NA(e);return function t(){for(var o=-1,a=arguments.length,s=-1,l=r.length,u=oe(l+a),c=this&&this!==ft&&this instanceof t?i:e;++s<l;)u[s]=r[s];for(;a--;)u[s++]=arguments[++o];return Tt(c,A?n:this,u)}}(e,t,A,c);else var w=function(e,t,n){var r=1&t,A=NA(e);return function t(){return(this&&this!==ft&&this instanceof t?A:e).apply(r?n:this,arguments)}}(e,t,A);return Ri((B?tA:Li)(w,m),e,t)}function $A(e,t,r,A){return e===n||Po(e,Re[r])&&!Oe.call(A,r)?t:e}function ei(e,t,r,A,i,o){return ta(e)&&ta(t)&&(o.set(t,e),Kr(e,t,n,ei,o),o.delete(t)),e}function ti(e){return ia(e)?n:e}function ni(e,t,r,A,i,o){var a=1&r,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var h=-1,d=!0,f=2&r?new jn:n;for(o.set(e,t),o.set(t,e);++h<s;){var p=e[h],g=t[h];if(A)var v=a?A(g,p,h,t,e,o):A(p,g,h,e,t,o);if(v!==n){if(v)continue;d=!1;break}if(f){if(!Nt(t,(function(e,t){if(!en(f,t)&&(p===e||i(p,e,r,A,o)))return f.push(t)}))){d=!1;break}}else if(p!==g&&!i(p,g,r,A,o)){d=!1;break}}return o.delete(e),o.delete(t),d}function ri(e){return Ui(Fi(e,n,Vi),e+"")}function Ai(e){return Sr(e,Ua,di)}function ii(e){return Sr(e,Ra,fi)}var oi=Qn?function(e){return Qn.get(e)}:ls;function ai(e){for(var t=e.name+"",n=Un[t],r=Oe.call(Un,t)?n.length:0;r--;){var A=n[r],i=A.func;if(null==i||i==e)return A.name}return t}function si(e){return(Oe.call(Pn,"placeholder")?Pn:e).placeholder}function li(){var e=Pn.iteratee||is;return e=e===is?Or:e,arguments.length?e(arguments[0],arguments[1]):e}function ui(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ci(e){for(var t=Ua(e),n=t.length;n--;){var r=t[n],A=e[r];t[n]=[r,A,Si(A)]}return t}function hi(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Hr(r)?r:n}var di=yt?function(e){return null==e?[]:(e=Fe(e),Qt(yt(e),(function(t){return je.call(e,t)})))}:gs,fi=yt?function(e){for(var t=[];e;)Ht(t,di(e)),e=Xe(e);return t}:gs,pi=Tr;function gi(e,t,n){for(var r=-1,A=(t=BA(t,e)).length,i=!1;++r<A;){var o=ki(t[r]);if(!(i=null!=e&&n(e,o)))break;e=e[o]}return i||++r!=A?i:!!(A=null==e?0:e.length)&&ea(A)&&Ci(o,A)&&(Vo(e)||zo(e))}function vi(e){return"function"!=typeof e.constructor||xi(e)?{}:Gn(Xe(e))}function yi(e){return Vo(e)||zo(e)||!!(Je&&e&&e[Je])}function Ci(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&Ce.test(e))&&e>-1&&e%1==0&&e<t}function Bi(e,t,n){if(!ta(n))return!1;var r=typeof t;return!!("number"==r?Xo(n)&&Ci(t,n.length):"string"==r&&t in n)&&Po(n[t],e)}function mi(e,t){if(Vo(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!la(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Fe(t))}function wi(e){var t=ai(e),n=Pn[t];if("function"!=typeof n||!(t in Vn.prototype))return!1;if(e===n)return!0;var r=oi(n);return!!r&&e===r[0]}(Sn&&pi(new Sn(new ArrayBuffer(1)))!=M||Tn&&pi(new Tn)!=x||Fn&&pi(Fn.resolve())!=F||bn&&pi(new bn)!=I||In&&pi(new In)!=U)&&(pi=function(e){var t=Tr(e),r=t==T?e.constructor:n,A=r?Ni(r):"";if(A)switch(A){case Rn:return M;case Mn:return x;case Hn:return F;case On:return I;case kn:return U}return t});var Ei=Me?qo:vs;function xi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Si(e){return e==e&&!ta(e)}function Ti(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==n||e in Fe(r)))}}function Fi(e,t,r){return t=Cn(t===n?e.length-1:t,0),function(){for(var n=arguments,A=-1,i=Cn(n.length-t,0),o=oe(i);++A<i;)o[A]=n[t+A];A=-1;for(var a=oe(t+1);++A<t;)a[A]=n[A];return a[t]=r(o),Tt(e,this,a)}}function bi(e,t){return t.length<2?e:xr(e,AA(t,0,-1))}function Ii(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Li=Mi(tA),Qi=dt||function(e,t){return ft.setTimeout(e,t)},Ui=Mi(nA);function Ri(e,t,n){var r=t+"";return Ui(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(p,(function(n){var r="_."+n[0];t&n[1]&&!Ut(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(le):[]}(r),n)))}function Mi(e){var t=0,r=0;return function(){var A=mn(),i=16-(A-r);if(r=A,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Hi(e,t){var r=-1,A=e.length,i=A-1;for(t=t===n?A:t;++r<t;){var o=jr(r,i),a=e[o];e[o]=e[r],e[r]=a}return e.length=t,e}var Oi=function(e){var t=Ho(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,r,A){t.push(r?A.replace(he,"$1"):n||e)})),t}));function ki(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ni(e){if(null!=e){try{return He.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function _i(e){if(e instanceof Vn)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=LA(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Di=Jr((function(e,t){return Yo(e)?hr(e,yr(t,1,Yo,!0)):[]})),Pi=Jr((function(e,t){var r=Zi(t);return Yo(r)&&(r=n),Yo(e)?hr(e,yr(t,1,Yo,!0),li(r,2)):[]})),Gi=Jr((function(e,t){var r=Zi(t);return Yo(r)&&(r=n),Yo(e)?hr(e,yr(t,1,Yo,!0),n,r):[]}));function Ki(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var A=null==n?0:pa(n);return A<0&&(A=Cn(r+A,0)),Pt(e,li(t,3),A)}function zi(e,t,r){var A=null==e?0:e.length;if(!A)return-1;var i=A-1;return r!==n&&(i=pa(r),i=r<0?Cn(A+i,0):Bn(i,A-1)),Pt(e,li(t,3),i,!0)}function Vi(e){return(null==e?0:e.length)?yr(e,1):[]}function Wi(e){return e&&e.length?e[0]:n}var Xi=Jr((function(e){var t=Mt(e,yA);return t.length&&t[0]===e[0]?Lr(t):[]})),Yi=Jr((function(e){var t=Zi(e),r=Mt(e,yA);return t===Zi(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Lr(r,li(t,2)):[]})),ji=Jr((function(e){var t=Zi(e),r=Mt(e,yA);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Lr(r,n,t):[]}));function Zi(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Ji=Jr(qi);function qi(e,t){return e&&e.length&&t&&t.length?Xr(e,t):e}var $i=ri((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Yr(e,Mt(t,(function(e){return Ci(e,n)?+e:e})).sort(FA)),r}));function eo(e){return null==e?e:xn.call(e)}var to=Jr((function(e){return cA(yr(e,1,Yo,!0))})),no=Jr((function(e){var t=Zi(e);return Yo(t)&&(t=n),cA(yr(e,1,Yo,!0),li(t,2))})),ro=Jr((function(e){var t=Zi(e);return t="function"==typeof t?t:n,cA(yr(e,1,Yo,!0),n,t)}));function Ao(e){if(!e||!e.length)return[];var t=0;return e=Qt(e,(function(e){if(Yo(e))return t=Cn(e.length,t),!0})),Zt(t,(function(t){return Mt(e,Wt(t))}))}function io(e,t){if(!e||!e.length)return[];var r=Ao(e);return null==t?r:Mt(r,(function(e){return Tt(t,n,e)}))}var oo=Jr((function(e,t){return Yo(e)?hr(e,t):[]})),ao=Jr((function(e){return gA(Qt(e,Yo))})),so=Jr((function(e){var t=Zi(e);return Yo(t)&&(t=n),gA(Qt(e,Yo),li(t,2))})),lo=Jr((function(e){var t=Zi(e);return t="function"==typeof t?t:n,gA(Qt(e,Yo),n,t)})),uo=Jr(Ao);var co=Jr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,io(e,r)}));function ho(e){var t=Pn(e);return t.__chain__=!0,t}function fo(e,t){return t(e)}var po=ri((function(e){var t=e.length,r=t?e[0]:0,A=this.__wrapped__,i=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&A instanceof Vn&&Ci(r)?((A=A.slice(r,+r+(t?1:0))).__actions__.push({func:fo,args:[i],thisArg:n}),new zn(A,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)}));var go=UA((function(e,t,n){Oe.call(e,n)?++e[n]:or(e,n,1)}));var vo=_A(Ki),yo=_A(zi);function Co(e,t){return(Vo(e)?bt:dr)(e,li(t,3))}function Bo(e,t){return(Vo(e)?It:fr)(e,li(t,3))}var mo=UA((function(e,t,n){Oe.call(e,n)?e[n].push(t):or(e,n,[t])}));var wo=Jr((function(e,t,n){var r=-1,A="function"==typeof t,i=Xo(e)?oe(e.length):[];return dr(e,(function(e){i[++r]=A?Tt(t,e,n):Qr(e,t,n)})),i})),Eo=UA((function(e,t,n){or(e,n,t)}));function xo(e,t){return(Vo(e)?Mt:Dr)(e,li(t,3))}var So=UA((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var To=Jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Bi(e,t[0],t[1])?t=[]:n>2&&Bi(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,yr(t,1),[])})),Fo=ht||function(){return ft.Date.now()};function bo(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,qA(e,l,n,n,n,n,t)}function Io(e,t){var A;if("function"!=typeof t)throw new Le(r);return e=pa(e),function(){return--e>0&&(A=t.apply(this,arguments)),e<=1&&(t=n),A}}var Lo=Jr((function(e,t,n){var r=1;if(n.length){var A=un(n,si(Lo));r|=a}return qA(e,r,t,n,A)})),Qo=Jr((function(e,t,n){var r=3;if(n.length){var A=un(n,si(Qo));r|=a}return qA(t,r,e,n,A)}));function Uo(e,t,A){var i,o,a,s,l,u,c=0,h=!1,d=!1,f=!0;if("function"!=typeof e)throw new Le(r);function p(t){var r=i,A=o;return i=o=n,c=t,s=e.apply(A,r)}function g(e){var r=e-u;return u===n||r>=t||r<0||d&&e-c>=a}function v(){var e=Fo();if(g(e))return y(e);l=Qi(v,function(e){var n=t-(e-u);return d?Bn(n,a-(e-c)):n}(e))}function y(e){return l=n,f&&i?p(e):(i=o=n,s)}function C(){var e=Fo(),r=g(e);if(i=arguments,o=this,u=e,r){if(l===n)return function(e){return c=e,l=Qi(v,t),h?p(e):s}(u);if(d)return EA(l),l=Qi(v,t),p(u)}return l===n&&(l=Qi(v,t)),s}return t=va(t)||0,ta(A)&&(h=!!A.leading,a=(d="maxWait"in A)?Cn(va(A.maxWait)||0,t):a,f="trailing"in A?!!A.trailing:f),C.cancel=function(){l!==n&&EA(l),c=0,i=u=o=l=n},C.flush=function(){return l===n?s:y(Fo())},C}var Ro=Jr((function(e,t){return cr(e,1,t)})),Mo=Jr((function(e,t,n){return cr(e,va(t)||0,n)}));function Ho(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Le(r);var n=function(){var r=arguments,A=t?t.apply(this,r):r[0],i=n.cache;if(i.has(A))return i.get(A);var o=e.apply(this,r);return n.cache=i.set(A,o)||i,o};return n.cache=new(Ho.Cache||Yn),n}function Oo(e){if("function"!=typeof e)throw new Le(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ho.Cache=Yn;var ko=mA((function(e,t){var n=(t=1==t.length&&Vo(t[0])?Mt(t[0],qt(li())):Mt(yr(t,1),qt(li()))).length;return Jr((function(r){for(var A=-1,i=Bn(r.length,n);++A<i;)r[A]=t[A].call(this,r[A]);return Tt(e,this,r)}))})),No=Jr((function(e,t){var r=un(t,si(No));return qA(e,a,n,t,r)})),_o=Jr((function(e,t){var r=un(t,si(_o));return qA(e,s,n,t,r)})),Do=ri((function(e,t){return qA(e,u,n,n,n,t)}));function Po(e,t){return e===t||e!=e&&t!=t}var Go=XA(Fr),Ko=XA((function(e,t){return e>=t})),zo=Ur(function(){return arguments}())?Ur:function(e){return na(e)&&Oe.call(e,"callee")&&!je.call(e,"callee")},Vo=oe.isArray,Wo=Bt?qt(Bt):function(e){return na(e)&&Tr(e)==R};function Xo(e){return null!=e&&ea(e.length)&&!qo(e)}function Yo(e){return na(e)&&Xo(e)}var jo=Ct||vs,Zo=mt?qt(mt):function(e){return na(e)&&Tr(e)==B};function Jo(e){if(!na(e))return!1;var t=Tr(e);return t==m||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ia(e)}function qo(e){if(!ta(e))return!1;var t=Tr(e);return t==w||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function $o(e){return"number"==typeof e&&e==pa(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function na(e){return null!=e&&"object"==typeof e}var ra=wt?qt(wt):function(e){return na(e)&&pi(e)==x};function Aa(e){return"number"==typeof e||na(e)&&Tr(e)==S}function ia(e){if(!na(e)||Tr(e)!=T)return!1;var t=Xe(e);if(null===t)return!0;var n=Oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&He.call(n)==De}var oa=Et?qt(Et):function(e){return na(e)&&Tr(e)==b};var aa=xt?qt(xt):function(e){return na(e)&&pi(e)==I};function sa(e){return"string"==typeof e||!Vo(e)&&na(e)&&Tr(e)==L}function la(e){return"symbol"==typeof e||na(e)&&Tr(e)==Q}var ua=St?qt(St):function(e){return na(e)&&ea(e.length)&&!!at[Tr(e)]};var ca=XA(_r),ha=XA((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Xo(e))return sa(e)?fn(e):LA(e);if(qe&&e[qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[qe]());var t=pi(e);return(t==x?sn:t==I?cn:Pa)(e)}function fa(e){return e?(e=va(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function pa(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ga(e){return e?sr(pa(e),0,f):0}function va(e){if("number"==typeof e)return e;if(la(e))return d;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ge.test(e);return n||ye.test(e)?ct(e.slice(2),n?2:8):pe.test(e)?d:+e}function ya(e){return QA(e,Ra(e))}function Ca(e){return null==e?"":uA(e)}var Ba=RA((function(e,t){if(xi(t)||Xo(t))QA(t,Ua(t),e);else for(var n in t)Oe.call(t,n)&&nr(e,n,t[n])})),ma=RA((function(e,t){QA(t,Ra(t),e)})),wa=RA((function(e,t,n,r){QA(t,Ra(t),e,r)})),Ea=RA((function(e,t,n,r){QA(t,Ua(t),e,r)})),xa=ri(ar);var Sa=Jr((function(e,t){e=Fe(e);var r=-1,A=t.length,i=A>2?t[2]:n;for(i&&Bi(t[0],t[1],i)&&(A=1);++r<A;)for(var o=t[r],a=Ra(o),s=-1,l=a.length;++s<l;){var u=a[s],c=e[u];(c===n||Po(c,Re[u])&&!Oe.call(e,u))&&(e[u]=o[u])}return e})),Ta=Jr((function(e){return e.push(n,ei),Tt(Ha,n,e)}));function Fa(e,t,r){var A=null==e?n:xr(e,t);return A===n?r:A}function ba(e,t){return null!=e&&gi(e,t,Ir)}var Ia=GA((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=_e.call(t)),e[t]=n}),ts(As)),La=GA((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=_e.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]}),li),Qa=Jr(Qr);function Ua(e){return Xo(e)?Jn(e):kr(e)}function Ra(e){return Xo(e)?Jn(e,!0):Nr(e)}var Ma=RA((function(e,t,n){Kr(e,t,n)})),Ha=RA((function(e,t,n,r){Kr(e,t,n,r)})),Oa=ri((function(e,t){var n={};if(null==e)return n;var r=!1;t=Mt(t,(function(t){return t=BA(t,e),r||(r=t.length>1),t})),QA(e,ii(e),n),r&&(n=lr(n,7,ti));for(var A=t.length;A--;)hA(n,t[A]);return n}));var ka=ri((function(e,t){return null==e?{}:function(e,t){return Wr(e,t,(function(t,n){return ba(e,n)}))}(e,t)}));function Na(e,t){if(null==e)return{};var n=Mt(ii(e),(function(e){return[e]}));return t=li(t),Wr(e,n,(function(e,n){return t(e,n[0])}))}var _a=JA(Ua),Da=JA(Ra);function Pa(e){return null==e?[]:$t(e,Ua(e))}var Ga=kA((function(e,t,n){return t=t.toLowerCase(),e+(n?Ka(t):t)}));function Ka(e){return Ja(Ca(e).toLowerCase())}function za(e){return(e=Ca(e))&&e.replace(Be,rn).replace(et,"")}var Va=kA((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Wa=kA((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Xa=OA("toLowerCase");var Ya=kA((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var ja=kA((function(e,t,n){return e+(n?" ":"")+Ja(t)}));var Za=kA((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=OA("toUpperCase");function qa(e,t,r){return e=Ca(e),(t=r?n:t)===n?function(e){return At.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var $a=Jr((function(e,t){try{return Tt(e,n,t)}catch(e){return Jo(e)?e:new xe(e)}})),es=ri((function(e,t){return bt(t,(function(t){t=ki(t),or(e,t,Lo(e[t],e))})),e}));function ts(e){return function(){return e}}var ns=DA(),rs=DA(!0);function As(e){return e}function is(e){return Or("function"==typeof e?e:lr(e,1))}var os=Jr((function(e,t){return function(n){return Qr(n,e,t)}})),as=Jr((function(e,t){return function(n){return Qr(e,n,t)}}));function ss(e,t,n){var r=Ua(t),A=Er(t,r);null!=n||ta(t)&&(A.length||!r.length)||(n=t,t=e,e=this,A=Er(t,Ua(t)));var i=!(ta(n)&&"chain"in n&&!n.chain),o=qo(e);return bt(A,(function(n){var r=t[n];e[n]=r,o&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=LA(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ht([this.value()],arguments))})})),e}function ls(){}var us=zA(Mt),cs=zA(Lt),hs=zA(Nt);function ds(e){return mi(e)?Wt(ki(e)):function(e){return function(t){return xr(t,e)}}(e)}var fs=WA(),ps=WA(!0);function gs(){return[]}function vs(){return!1}var ys=KA((function(e,t){return e+t}),0),Cs=jA("ceil"),Bs=KA((function(e,t){return e/t}),1),ms=jA("floor");var ws,Es=KA((function(e,t){return e*t}),1),xs=jA("round"),Ss=KA((function(e,t){return e-t}),0);return Pn.after=function(e,t){if("function"!=typeof t)throw new Le(r);return e=pa(e),function(){if(--e<1)return t.apply(this,arguments)}},Pn.ary=bo,Pn.assign=Ba,Pn.assignIn=ma,Pn.assignInWith=wa,Pn.assignWith=Ea,Pn.at=xa,Pn.before=Io,Pn.bind=Lo,Pn.bindAll=es,Pn.bindKey=Qo,Pn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vo(e)?e:[e]},Pn.chain=ho,Pn.chunk=function(e,t,r){t=(r?Bi(e,t,r):t===n)?1:Cn(pa(t),0);var A=null==e?0:e.length;if(!A||t<1)return[];for(var i=0,o=0,a=oe(pt(A/t));i<A;)a[o++]=AA(e,i,i+=t);return a},Pn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,A=[];++t<n;){var i=e[t];i&&(A[r++]=i)}return A},Pn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=oe(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Ht(Vo(n)?LA(n):[n],yr(t,1))},Pn.cond=function(e){var t=null==e?0:e.length,n=li();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Le(r);return[n(e[0]),e[1]]})):[],Jr((function(n){for(var r=-1;++r<t;){var A=e[r];if(Tt(A[0],this,n))return Tt(A[1],this,n)}}))},Pn.conforms=function(e){return function(e){var t=Ua(e);return function(n){return ur(n,e,t)}}(lr(e,1))},Pn.constant=ts,Pn.countBy=go,Pn.create=function(e,t){var n=Gn(e);return null==t?n:ir(n,t)},Pn.curry=function e(t,r,A){var i=qA(t,8,n,n,n,n,n,r=A?n:r);return i.placeholder=e.placeholder,i},Pn.curryRight=function e(t,r,A){var i=qA(t,o,n,n,n,n,n,r=A?n:r);return i.placeholder=e.placeholder,i},Pn.debounce=Uo,Pn.defaults=Sa,Pn.defaultsDeep=Ta,Pn.defer=Ro,Pn.delay=Mo,Pn.difference=Di,Pn.differenceBy=Pi,Pn.differenceWith=Gi,Pn.drop=function(e,t,r){var A=null==e?0:e.length;return A?AA(e,(t=r||t===n?1:pa(t))<0?0:t,A):[]},Pn.dropRight=function(e,t,r){var A=null==e?0:e.length;return A?AA(e,0,(t=A-(t=r||t===n?1:pa(t)))<0?0:t):[]},Pn.dropRightWhile=function(e,t){return e&&e.length?fA(e,li(t,3),!0,!0):[]},Pn.dropWhile=function(e,t){return e&&e.length?fA(e,li(t,3),!0):[]},Pn.fill=function(e,t,r,A){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&Bi(e,t,r)&&(r=0,A=i),function(e,t,r,A){var i=e.length;for((r=pa(r))<0&&(r=-r>i?0:i+r),(A=A===n||A>i?i:pa(A))<0&&(A+=i),A=r>A?0:ga(A);r<A;)e[r++]=t;return e}(e,t,r,A)):[]},Pn.filter=function(e,t){return(Vo(e)?Qt:vr)(e,li(t,3))},Pn.flatMap=function(e,t){return yr(xo(e,t),1)},Pn.flatMapDeep=function(e,t){return yr(xo(e,t),c)},Pn.flatMapDepth=function(e,t,r){return r=r===n?1:pa(r),yr(xo(e,t),r)},Pn.flatten=Vi,Pn.flattenDeep=function(e){return(null==e?0:e.length)?yr(e,c):[]},Pn.flattenDepth=function(e,t){return(null==e?0:e.length)?yr(e,t=t===n?1:pa(t)):[]},Pn.flip=function(e){return qA(e,512)},Pn.flow=ns,Pn.flowRight=rs,Pn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var A=e[t];r[A[0]]=A[1]}return r},Pn.functions=function(e){return null==e?[]:Er(e,Ua(e))},Pn.functionsIn=function(e){return null==e?[]:Er(e,Ra(e))},Pn.groupBy=mo,Pn.initial=function(e){return(null==e?0:e.length)?AA(e,0,-1):[]},Pn.intersection=Xi,Pn.intersectionBy=Yi,Pn.intersectionWith=ji,Pn.invert=Ia,Pn.invertBy=La,Pn.invokeMap=wo,Pn.iteratee=is,Pn.keyBy=Eo,Pn.keys=Ua,Pn.keysIn=Ra,Pn.map=xo,Pn.mapKeys=function(e,t){var n={};return t=li(t,3),mr(e,(function(e,r,A){or(n,t(e,r,A),e)})),n},Pn.mapValues=function(e,t){var n={};return t=li(t,3),mr(e,(function(e,r,A){or(n,r,t(e,r,A))})),n},Pn.matches=function(e){return Pr(lr(e,1))},Pn.matchesProperty=function(e,t){return Gr(e,lr(t,1))},Pn.memoize=Ho,Pn.merge=Ma,Pn.mergeWith=Ha,Pn.method=os,Pn.methodOf=as,Pn.mixin=ss,Pn.negate=Oo,Pn.nthArg=function(e){return e=pa(e),Jr((function(t){return zr(t,e)}))},Pn.omit=Oa,Pn.omitBy=function(e,t){return Na(e,Oo(li(t)))},Pn.once=function(e){return Io(2,e)},Pn.orderBy=function(e,t,r,A){return null==e?[]:(Vo(t)||(t=null==t?[]:[t]),Vo(r=A?n:r)||(r=null==r?[]:[r]),Vr(e,t,r))},Pn.over=us,Pn.overArgs=ko,Pn.overEvery=cs,Pn.overSome=hs,Pn.partial=No,Pn.partialRight=_o,Pn.partition=So,Pn.pick=ka,Pn.pickBy=Na,Pn.property=ds,Pn.propertyOf=function(e){return function(t){return null==e?n:xr(e,t)}},Pn.pull=Ji,Pn.pullAll=qi,Pn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Xr(e,t,li(n,2)):e},Pn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Xr(e,t,n,r):e},Pn.pullAt=$i,Pn.range=fs,Pn.rangeRight=ps,Pn.rearg=Do,Pn.reject=function(e,t){return(Vo(e)?Qt:vr)(e,Oo(li(t,3)))},Pn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,A=[],i=e.length;for(t=li(t,3);++r<i;){var o=e[r];t(o,r,e)&&(n.push(o),A.push(r))}return Yr(e,A),n},Pn.rest=function(e,t){if("function"!=typeof e)throw new Le(r);return Jr(e,t=t===n?t:pa(t))},Pn.reverse=eo,Pn.sampleSize=function(e,t,r){return t=(r?Bi(e,t,r):t===n)?1:pa(t),(Vo(e)?$n:$r)(e,t)},Pn.set=function(e,t,n){return null==e?e:eA(e,t,n)},Pn.setWith=function(e,t,r,A){return A="function"==typeof A?A:n,null==e?e:eA(e,t,r,A)},Pn.shuffle=function(e){return(Vo(e)?er:rA)(e)},Pn.slice=function(e,t,r){var A=null==e?0:e.length;return A?(r&&"number"!=typeof r&&Bi(e,t,r)?(t=0,r=A):(t=null==t?0:pa(t),r=r===n?A:pa(r)),AA(e,t,r)):[]},Pn.sortBy=To,Pn.sortedUniq=function(e){return e&&e.length?sA(e):[]},Pn.sortedUniqBy=function(e,t){return e&&e.length?sA(e,li(t,2)):[]},Pn.split=function(e,t,r){return r&&"number"!=typeof r&&Bi(e,t,r)&&(t=r=n),(r=r===n?f:r>>>0)?(e=Ca(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=uA(t))&&an(e)?wA(fn(e),0,r):e.split(t,r):[]},Pn.spread=function(e,t){if("function"!=typeof e)throw new Le(r);return t=null==t?0:Cn(pa(t),0),Jr((function(n){var r=n[t],A=wA(n,0,t);return r&&Ht(A,r),Tt(e,this,A)}))},Pn.tail=function(e){var t=null==e?0:e.length;return t?AA(e,1,t):[]},Pn.take=function(e,t,r){return e&&e.length?AA(e,0,(t=r||t===n?1:pa(t))<0?0:t):[]},Pn.takeRight=function(e,t,r){var A=null==e?0:e.length;return A?AA(e,(t=A-(t=r||t===n?1:pa(t)))<0?0:t,A):[]},Pn.takeRightWhile=function(e,t){return e&&e.length?fA(e,li(t,3),!1,!0):[]},Pn.takeWhile=function(e,t){return e&&e.length?fA(e,li(t,3)):[]},Pn.tap=function(e,t){return t(e),e},Pn.throttle=function(e,t,n){var A=!0,i=!0;if("function"!=typeof e)throw new Le(r);return ta(n)&&(A="leading"in n?!!n.leading:A,i="trailing"in n?!!n.trailing:i),Uo(e,t,{leading:A,maxWait:t,trailing:i})},Pn.thru=fo,Pn.toArray=da,Pn.toPairs=_a,Pn.toPairsIn=Da,Pn.toPath=function(e){return Vo(e)?Mt(e,ki):la(e)?[e]:LA(Oi(Ca(e)))},Pn.toPlainObject=ya,Pn.transform=function(e,t,n){var r=Vo(e),A=r||jo(e)||ua(e);if(t=li(t,4),null==n){var i=e&&e.constructor;n=A?r?new i:[]:ta(e)&&qo(i)?Gn(Xe(e)):{}}return(A?bt:mr)(e,(function(e,r,A){return t(n,e,r,A)})),n},Pn.unary=function(e){return bo(e,1)},Pn.union=to,Pn.unionBy=no,Pn.unionWith=ro,Pn.uniq=function(e){return e&&e.length?cA(e):[]},Pn.uniqBy=function(e,t){return e&&e.length?cA(e,li(t,2)):[]},Pn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?cA(e,n,t):[]},Pn.unset=function(e,t){return null==e||hA(e,t)},Pn.unzip=Ao,Pn.unzipWith=io,Pn.update=function(e,t,n){return null==e?e:dA(e,t,CA(n))},Pn.updateWith=function(e,t,r,A){return A="function"==typeof A?A:n,null==e?e:dA(e,t,CA(r),A)},Pn.values=Pa,Pn.valuesIn=function(e){return null==e?[]:$t(e,Ra(e))},Pn.without=oo,Pn.words=qa,Pn.wrap=function(e,t){return No(CA(t),e)},Pn.xor=ao,Pn.xorBy=so,Pn.xorWith=lo,Pn.zip=uo,Pn.zipObject=function(e,t){return vA(e||[],t||[],nr)},Pn.zipObjectDeep=function(e,t){return vA(e||[],t||[],eA)},Pn.zipWith=co,Pn.entries=_a,Pn.entriesIn=Da,Pn.extend=ma,Pn.extendWith=wa,ss(Pn,Pn),Pn.add=ys,Pn.attempt=$a,Pn.camelCase=Ga,Pn.capitalize=Ka,Pn.ceil=Cs,Pn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=va(r))==r?r:0),t!==n&&(t=(t=va(t))==t?t:0),sr(va(e),t,r)},Pn.clone=function(e){return lr(e,4)},Pn.cloneDeep=function(e){return lr(e,5)},Pn.cloneDeepWith=function(e,t){return lr(e,5,t="function"==typeof t?t:n)},Pn.cloneWith=function(e,t){return lr(e,4,t="function"==typeof t?t:n)},Pn.conformsTo=function(e,t){return null==t||ur(e,t,Ua(t))},Pn.deburr=za,Pn.defaultTo=function(e,t){return null==e||e!=e?t:e},Pn.divide=Bs,Pn.endsWith=function(e,t,r){e=Ca(e),t=uA(t);var A=e.length,i=r=r===n?A:sr(pa(r),0,A);return(r-=t.length)>=0&&e.slice(r,i)==t},Pn.eq=Po,Pn.escape=function(e){return(e=Ca(e))&&Z.test(e)?e.replace(Y,An):e},Pn.escapeRegExp=function(e){return(e=Ca(e))&&Ae.test(e)?e.replace(re,"\\$&"):e},Pn.every=function(e,t,r){var A=Vo(e)?Lt:pr;return r&&Bi(e,t,r)&&(t=n),A(e,li(t,3))},Pn.find=vo,Pn.findIndex=Ki,Pn.findKey=function(e,t){return Dt(e,li(t,3),mr)},Pn.findLast=yo,Pn.findLastIndex=zi,Pn.findLastKey=function(e,t){return Dt(e,li(t,3),wr)},Pn.floor=ms,Pn.forEach=Co,Pn.forEachRight=Bo,Pn.forIn=function(e,t){return null==e?e:Cr(e,li(t,3),Ra)},Pn.forInRight=function(e,t){return null==e?e:Br(e,li(t,3),Ra)},Pn.forOwn=function(e,t){return e&&mr(e,li(t,3))},Pn.forOwnRight=function(e,t){return e&&wr(e,li(t,3))},Pn.get=Fa,Pn.gt=Go,Pn.gte=Ko,Pn.has=function(e,t){return null!=e&&gi(e,t,br)},Pn.hasIn=ba,Pn.head=Wi,Pn.identity=As,Pn.includes=function(e,t,n,r){e=Xo(e)?e:Pa(e),n=n&&!r?pa(n):0;var A=e.length;return n<0&&(n=Cn(A+n,0)),sa(e)?n<=A&&e.indexOf(t,n)>-1:!!A&&Gt(e,t,n)>-1},Pn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var A=null==n?0:pa(n);return A<0&&(A=Cn(r+A,0)),Gt(e,t,A)},Pn.inRange=function(e,t,r){return t=fa(t),r===n?(r=t,t=0):r=fa(r),function(e,t,n){return e>=Bn(t,n)&&e<Cn(t,n)}(e=va(e),t,r)},Pn.invoke=Qa,Pn.isArguments=zo,Pn.isArray=Vo,Pn.isArrayBuffer=Wo,Pn.isArrayLike=Xo,Pn.isArrayLikeObject=Yo,Pn.isBoolean=function(e){return!0===e||!1===e||na(e)&&Tr(e)==y},Pn.isBuffer=jo,Pn.isDate=Zo,Pn.isElement=function(e){return na(e)&&1===e.nodeType&&!ia(e)},Pn.isEmpty=function(e){if(null==e)return!0;if(Xo(e)&&(Vo(e)||"string"==typeof e||"function"==typeof e.splice||jo(e)||ua(e)||zo(e)))return!e.length;var t=pi(e);if(t==x||t==I)return!e.size;if(xi(e))return!kr(e).length;for(var n in e)if(Oe.call(e,n))return!1;return!0},Pn.isEqual=function(e,t){return Rr(e,t)},Pn.isEqualWith=function(e,t,r){var A=(r="function"==typeof r?r:n)?r(e,t):n;return A===n?Rr(e,t,n,r):!!A},Pn.isError=Jo,Pn.isFinite=function(e){return"number"==typeof e&&_t(e)},Pn.isFunction=qo,Pn.isInteger=$o,Pn.isLength=ea,Pn.isMap=ra,Pn.isMatch=function(e,t){return e===t||Mr(e,t,ci(t))},Pn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Mr(e,t,ci(t),r)},Pn.isNaN=function(e){return Aa(e)&&e!=+e},Pn.isNative=function(e){if(Ei(e))throw new xe("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Hr(e)},Pn.isNil=function(e){return null==e},Pn.isNull=function(e){return null===e},Pn.isNumber=Aa,Pn.isObject=ta,Pn.isObjectLike=na,Pn.isPlainObject=ia,Pn.isRegExp=oa,Pn.isSafeInteger=function(e){return $o(e)&&e>=-9007199254740991&&e<=h},Pn.isSet=aa,Pn.isString=sa,Pn.isSymbol=la,Pn.isTypedArray=ua,Pn.isUndefined=function(e){return e===n},Pn.isWeakMap=function(e){return na(e)&&pi(e)==U},Pn.isWeakSet=function(e){return na(e)&&"[object WeakSet]"==Tr(e)},Pn.join=function(e,t){return null==e?"":Xt.call(e,t)},Pn.kebabCase=Va,Pn.last=Zi,Pn.lastIndexOf=function(e,t,r){var A=null==e?0:e.length;if(!A)return-1;var i=A;return r!==n&&(i=(i=pa(r))<0?Cn(A+i,0):Bn(i,A-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Pt(e,zt,i,!0)},Pn.lowerCase=Wa,Pn.lowerFirst=Xa,Pn.lt=ca,Pn.lte=ha,Pn.max=function(e){return e&&e.length?gr(e,As,Fr):n},Pn.maxBy=function(e,t){return e&&e.length?gr(e,li(t,2),Fr):n},Pn.mean=function(e){return Vt(e,As)},Pn.meanBy=function(e,t){return Vt(e,li(t,2))},Pn.min=function(e){return e&&e.length?gr(e,As,_r):n},Pn.minBy=function(e,t){return e&&e.length?gr(e,li(t,2),_r):n},Pn.stubArray=gs,Pn.stubFalse=vs,Pn.stubObject=function(){return{}},Pn.stubString=function(){return""},Pn.stubTrue=function(){return!0},Pn.multiply=Es,Pn.nth=function(e,t){return e&&e.length?zr(e,pa(t)):n},Pn.noConflict=function(){return ft._===this&&(ft._=Pe),this},Pn.noop=ls,Pn.now=Fo,Pn.pad=function(e,t,n){e=Ca(e);var r=(t=pa(t))?dn(e):0;if(!t||r>=t)return e;var A=(t-r)/2;return VA(gt(A),n)+e+VA(pt(A),n)},Pn.padEnd=function(e,t,n){e=Ca(e);var r=(t=pa(t))?dn(e):0;return t&&r<t?e+VA(t-r,n):e},Pn.padStart=function(e,t,n){e=Ca(e);var r=(t=pa(t))?dn(e):0;return t&&r<t?VA(t-r,n)+e:e},Pn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(Ca(e).replace(ie,""),t||0)},Pn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&Bi(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=fa(e),t===n?(t=e,e=0):t=fa(t)),e>t){var A=e;e=t,t=A}if(r||e%1||t%1){var i=En();return Bn(e+i*(t-e+ut("1e-"+((i+"").length-1))),t)}return jr(e,t)},Pn.reduce=function(e,t,n){var r=Vo(e)?Ot:Yt,A=arguments.length<3;return r(e,li(t,4),n,A,dr)},Pn.reduceRight=function(e,t,n){var r=Vo(e)?kt:Yt,A=arguments.length<3;return r(e,li(t,4),n,A,fr)},Pn.repeat=function(e,t,r){return t=(r?Bi(e,t,r):t===n)?1:pa(t),Zr(Ca(e),t)},Pn.replace=function(){var e=arguments,t=Ca(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Pn.result=function(e,t,r){var A=-1,i=(t=BA(t,e)).length;for(i||(i=1,e=n);++A<i;){var o=null==e?n:e[ki(t[A])];o===n&&(A=i,o=r),e=qo(o)?o.call(e):o}return e},Pn.round=xs,Pn.runInContext=e,Pn.sample=function(e){return(Vo(e)?qn:qr)(e)},Pn.size=function(e){if(null==e)return 0;if(Xo(e))return sa(e)?dn(e):e.length;var t=pi(e);return t==x||t==I?e.size:kr(e).length},Pn.snakeCase=Ya,Pn.some=function(e,t,r){var A=Vo(e)?Nt:iA;return r&&Bi(e,t,r)&&(t=n),A(e,li(t,3))},Pn.sortedIndex=function(e,t){return oA(e,t)},Pn.sortedIndexBy=function(e,t,n){return aA(e,t,li(n,2))},Pn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oA(e,t);if(r<n&&Po(e[r],t))return r}return-1},Pn.sortedLastIndex=function(e,t){return oA(e,t,!0)},Pn.sortedLastIndexBy=function(e,t,n){return aA(e,t,li(n,2),!0)},Pn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oA(e,t,!0)-1;if(Po(e[n],t))return n}return-1},Pn.startCase=ja,Pn.startsWith=function(e,t,n){return e=Ca(e),n=null==n?0:sr(pa(n),0,e.length),t=uA(t),e.slice(n,n+t.length)==t},Pn.subtract=Ss,Pn.sum=function(e){return e&&e.length?jt(e,As):0},Pn.sumBy=function(e,t){return e&&e.length?jt(e,li(t,2)):0},Pn.template=function(e,t,r){var A=Pn.templateSettings;r&&Bi(e,t,r)&&(t=n),e=Ca(e),t=wa({},t,A,$A);var i,o,a=wa({},t.imports,A.imports,$A),s=Ua(a),l=$t(a,s),u=0,c=t.interpolate||me,h="__p += '",d=be((t.escape||me).source+"|"+c.source+"|"+(c===$?de:me).source+"|"+(t.evaluate||me).source+"|$","g"),f="//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(d,(function(t,n,r,A,a,s){return r||(r=A),h+=e.slice(u,s).replace(we,on),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=s+t.length,t})),h+="';\n";var p=Oe.call(t,"variable")&&t.variable;if(p){if(ce.test(p))throw new xe("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(z,""):h).replace(V,"$1").replace(W,"$1;"),h="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=$a((function(){return Se(s,f+"return "+h).apply(n,l)}));if(g.source=h,Jo(g))throw g;return g},Pn.times=function(e,t){if((e=pa(e))<1||e>h)return[];var n=f,r=Bn(e,f);t=li(t),e-=f;for(var A=Zt(r,t);++n<e;)t(n);return A},Pn.toFinite=fa,Pn.toInteger=pa,Pn.toLength=ga,Pn.toLower=function(e){return Ca(e).toLowerCase()},Pn.toNumber=va,Pn.toSafeInteger=function(e){return e?sr(pa(e),-9007199254740991,h):0===e?e:0},Pn.toString=Ca,Pn.toUpper=function(e){return Ca(e).toUpperCase()},Pn.trim=function(e,t,r){if((e=Ca(e))&&(r||t===n))return Jt(e);if(!e||!(t=uA(t)))return e;var A=fn(e),i=fn(t);return wA(A,tn(A,i),nn(A,i)+1).join("")},Pn.trimEnd=function(e,t,r){if((e=Ca(e))&&(r||t===n))return e.slice(0,pn(e)+1);if(!e||!(t=uA(t)))return e;var A=fn(e);return wA(A,0,nn(A,fn(t))+1).join("")},Pn.trimStart=function(e,t,r){if((e=Ca(e))&&(r||t===n))return e.replace(ie,"");if(!e||!(t=uA(t)))return e;var A=fn(e);return wA(A,tn(A,fn(t))).join("")},Pn.truncate=function(e,t){var r=30,A="...";if(ta(t)){var i="separator"in t?t.separator:i;r="length"in t?pa(t.length):r,A="omission"in t?uA(t.omission):A}var o=(e=Ca(e)).length;if(an(e)){var a=fn(e);o=a.length}if(r>=o)return e;var s=r-dn(A);if(s<1)return A;var l=a?wA(a,0,s).join(""):e.slice(0,s);if(i===n)return l+A;if(a&&(s+=l.length-s),oa(i)){if(e.slice(s).search(i)){var u,c=l;for(i.global||(i=be(i.source,Ca(fe.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var h=u.index;l=l.slice(0,h===n?s:h)}}else if(e.indexOf(uA(i),s)!=s){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+A},Pn.unescape=function(e){return(e=Ca(e))&&j.test(e)?e.replace(X,gn):e},Pn.uniqueId=function(e){var t=++ke;return Ca(e)+t},Pn.upperCase=Za,Pn.upperFirst=Ja,Pn.each=Co,Pn.eachRight=Bo,Pn.first=Wi,ss(Pn,(ws={},mr(Pn,(function(e,t){Oe.call(Pn.prototype,t)||(ws[t]=e)})),ws),{chain:!1}),Pn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Pn[e].placeholder=Pn})),bt(["drop","take"],(function(e,t){Vn.prototype[e]=function(r){r=r===n?1:Cn(pa(r),0);var A=this.__filtered__&&!t?new Vn(this):this.clone();return A.__filtered__?A.__takeCount__=Bn(r,A.__takeCount__):A.__views__.push({size:Bn(r,f),type:e+(A.__dir__<0?"Right":"")}),A},Vn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Vn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:li(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Vn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Vn.prototype[e]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(As)},Vn.prototype.find=function(e){return this.filter(e).head()},Vn.prototype.findLast=function(e){return this.reverse().find(e)},Vn.prototype.invokeMap=Jr((function(e,t){return"function"==typeof e?new Vn(this):this.map((function(n){return Qr(n,e,t)}))})),Vn.prototype.reject=function(e){return this.filter(Oo(li(e)))},Vn.prototype.slice=function(e,t){e=pa(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Vn(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=pa(t))<0?r.dropRight(-t):r.take(t-e)),r)},Vn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Vn.prototype.toArray=function(){return this.take(f)},mr(Vn.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),A=/^(?:head|last)$/.test(t),i=Pn[A?"take"+("last"==t?"Right":""):t],o=A||/^find/.test(t);i&&(Pn.prototype[t]=function(){var t=this.__wrapped__,a=A?[1]:arguments,s=t instanceof Vn,l=a[0],u=s||Vo(t),c=function(e){var t=i.apply(Pn,Ht([e],a));return A&&h?t[0]:t};u&&r&&"function"==typeof l&&1!=l.length&&(s=u=!1);var h=this.__chain__,d=!!this.__actions__.length,f=o&&!h,p=s&&!d;if(!o&&u){t=p?t:new Vn(this);var g=e.apply(t,a);return g.__actions__.push({func:fo,args:[c],thisArg:n}),new zn(g,h)}return f&&p?e.apply(this,a):(g=this.thru(c),f?A?g.value()[0]:g.value():g)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Qe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Pn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var A=this.value();return t.apply(Vo(A)?A:[],e)}return this[n]((function(n){return t.apply(Vo(n)?n:[],e)}))}})),mr(Vn.prototype,(function(e,t){var n=Pn[t];if(n){var r=n.name+"";Oe.call(Un,r)||(Un[r]=[]),Un[r].push({name:t,func:n})}})),Un[PA(n,2).name]=[{name:"wrapper",func:n}],Vn.prototype.clone=function(){var e=new Vn(this.__wrapped__);return e.__actions__=LA(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=LA(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=LA(this.__views__),e},Vn.prototype.reverse=function(){if(this.__filtered__){var e=new Vn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Vn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Vo(e),r=t<0,A=n?e.length:0,i=function(e,t,n){var r=-1,A=n.length;for(;++r<A;){var i=n[r],o=i.size;switch(i.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=Bn(t,e+o);break;case"takeRight":e=Cn(e,t-o)}}return{start:e,end:t}}(0,A,this.__views__),o=i.start,a=i.end,s=a-o,l=r?a:o-1,u=this.__iteratees__,c=u.length,h=0,d=Bn(s,this.__takeCount__);if(!n||!r&&A==s&&d==s)return pA(e,this.__actions__);var f=[];e:for(;s--&&h<d;){for(var p=-1,g=e[l+=t];++p<c;){var v=u[p],y=v.iteratee,C=v.type,B=y(g);if(2==C)g=B;else if(!B){if(1==C)continue e;break e}}f[h++]=g}return f},Pn.prototype.at=po,Pn.prototype.chain=function(){return ho(this)},Pn.prototype.commit=function(){return new zn(this.value(),this.__chain__)},Pn.prototype.next=function(){this.__values__===n&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Pn.prototype.plant=function(e){for(var t,r=this;r instanceof Kn;){var A=_i(r);A.__index__=0,A.__values__=n,t?i.__wrapped__=A:t=A;var i=A;r=r.__wrapped__}return i.__wrapped__=e,t},Pn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Vn){var t=e;return this.__actions__.length&&(t=new Vn(this)),(t=t.reverse()).__actions__.push({func:fo,args:[eo],thisArg:n}),new zn(t,this.__chain__)}return this.thru(eo)},Pn.prototype.toJSON=Pn.prototype.valueOf=Pn.prototype.value=function(){return pA(this.__wrapped__,this.__actions__)},Pn.prototype.first=Pn.prototype.head,qe&&(Pn.prototype[qe]=function(){return this}),Pn}();gt?((gt.exports=vn)._=vn,pt._=vn):ft._=vn}).call(C)}(av,av.exports);var sv,lv=av.exports,uv="zh_CN",cv=uv,hv={zh_CN:{"小计":"小计","总计":"总计","总和":"（总和）","项":"项","已选择":"已选择","序号":"序号","度量":"度量","数值":"数值","共计":"共计","条":"条","趋势":"趋势","隐藏":"隐藏","组内升序":"组内升序","升序":"升序","降序":"降序","组内降序":"组内降序","不排序":"不排序","暂无数据":"暂无数据","，":"，"},en_US:{"小计":"Total","总计":"Total","总和":"(SUM)","项":"items","已选择":"selected","序号":"Index","度量":"Measure","数值":"Measure","共计":"Total","条":"","隐藏":"Hide","组内升序":"Group ASC","组内降序":"Group DESC","升序":"ASC","降序":"DESC","不排序":"No order","暂无数据":"No Data","，":", "},ru_RU:{"小计":"Промежуточный итог","总计":"Общий итог","总和":"(СУММА)","项":"элемент(-а/-ов)","已选择":"выбрано","序号":"Индекс","度量":"Мера","数值":"Численная величина","共计":"Общее количество","条":"","隐藏":"Скрыть","趋势":"Курс","组内升序":"Группировать по возрастанию","组内降序":"Группировать по убыванию","升序":"По возрастанию","降序":"По убыванию","不排序":"Не отсортировано","，":", "}},dv=function(){return cv},fv=function(e,t){return void 0===t&&(t=e),lv.get(hv,[cv,e],t)},pv="backGroundGroup",gv="foreGroundGroup",vv="panelGroup",yv="gridGroup",Cv="panelScrollGroup",Bv="mergedCellsGroup",mv="rowIndexScrollGroup",wv="rowIndexFrozenGroup",Ev="rowIndexFrozenTrailingGroup",xv="rowIndexResizeAreaGroup",Sv="rowScrollGroup",Tv="rowHeaderFrozenGroup",Fv="rowHeaderFrozenTrailingGroup",bv="rowResizeAreaGroup",Iv="colScrollGroup",Lv="colFrozenGroup",Qv="colFrozenTrailingGroup",Uv="colResizeAreaGroup",Rv="cornerScrollGroup",Mv="cornerResizeAreaGroup",Hv="frozenSplitLine",Ov="emptyPlaceholderGroup",kv="horizontal-resize-area-",Nv="-";e.MiniChartType=void 0,(sv=e.MiniChartType||(e.MiniChartType={})).Line="line",sv.Bar="bar",sv.Bullet="bullet";var _v,Dv=function(){return fv("序号")},Pv=function(){return fv("指标")},Gv="antv-s2",Kv="valueRanges",zv={},Vv="#000000",Wv="#FFFFFF";e.CopyType=void 0,(_v=e.CopyType||(e.CopyType={}))[_v.ALL=0]="ALL",_v[_v.COL=1]="COL",_v[_v.ROW=2]="ROW";var Xv,Yv,jv,Zv="\t",Jv=5e3,qv={data:[],fields:{rows:[],columns:[],values:[],valueInCols:!0},meta:[],sortParams:[],filterParams:[]};e.S2Event=void 0,(Xv=e.S2Event||(e.S2Event={})).ROW_CELL_HOVER="row-cell:hover",Xv.ROW_CELL_CLICK="row-cell:click",Xv.ROW_CELL_DOUBLE_CLICK="row-cell:double-click",Xv.ROW_CELL_CONTEXT_MENU="row-cell:context-menu",Xv.ROW_CELL_MOUSE_DOWN="row-cell:mouse-down",Xv.ROW_CELL_MOUSE_UP="row-cell:mouse-up",Xv.ROW_CELL_MOUSE_MOVE="row-cell:mouse-move",Xv.ROW_CELL_SCROLL="row-cell:scroll",Xv.ROW_CELL_BRUSH_SELECTION="row-cell:brush-selection",Xv.ROW_CELL_COLLAPSED="row-cell:collapsed",Xv.ROW_CELL_ALL_COLLAPSED="row-cell:all-collapsed",Xv.ROW_CELL_RENDER="row-cell:render",Xv.ROW_CELL_SELECTED="row-cell:selected",Xv.ROW_CELL_COLLAPSED__PRIVATE="row-cell:collapsed__private",Xv.ROW_CELL_ALL_COLLAPSED__PRIVATE="row-cell:all-collapsed__private",Xv.DATA_CELL_HOVER_TRIGGERED_PRIVATE="data-cell:hover-trigger__private",Xv.DATA_CELL_CLICK_TRIGGERED_PRIVATE="data-cell:click-trigger__private",Xv.COL_CELL_HOVER="col-cell:hover",Xv.COL_CELL_CLICK="col-cell:click",Xv.COL_CELL_DOUBLE_CLICK="col-cell:double-click",Xv.COL_CELL_CONTEXT_MENU="col-cell:context-menu",Xv.COL_CELL_MOUSE_DOWN="col-cell:mouse-down",Xv.COL_CELL_MOUSE_UP="col-cell:mouse-up",Xv.COL_CELL_MOUSE_MOVE="col-cell:mouse-move",Xv.COL_CELL_BRUSH_SELECTION="col-cell:brush-selection",Xv.COL_CELL_EXPANDED="col-cell:expanded",Xv.COL_CELL_EXPAND_ICON_HOVER="col-cell:expand-icon-hover",Xv.COL_CELL_HIDDEN="col-cell:hidden",Xv.COL_CELL_RENDER="col-cell:render",Xv.COL_CELL_SELECTED="col-cell:selected",Xv.DATA_CELL_HOVER="data-cell:hover",Xv.DATA_CELL_CLICK="data-cell:click",Xv.DATA_CELL_DOUBLE_CLICK="data-cell:double-click",Xv.DATA_CELL_CONTEXT_MENU="data-cell:context-menu",Xv.DATA_CELL_MOUSE_UP="data-cell:mouse-up",Xv.DATA_CELL_MOUSE_DOWN="data-cell:mouse-down",Xv.DATA_CELL_MOUSE_MOVE="data-cell:mouse-move",Xv.DATA_CELL_BRUSH_SELECTION="data-cell:brush-selection",Xv.DATA_CELL_SELECT_MOVE="data-cell:select-move",Xv.DATA_CELL_RENDER="data-cell:render",Xv.DATA_CELL_SELECTED="data-cell:selected",Xv.CORNER_CELL_HOVER="corner-cell:hover",Xv.CORNER_CELL_CLICK="corner-cell:click",Xv.CORNER_CELL_DOUBLE_CLICK="corner-cell:double-click",Xv.CORNER_CELL_CONTEXT_MENU="corner-cell:context-menu",Xv.CORNER_CELL_MOUSE_DOWN="corner-cell:mouse-down",Xv.CORNER_CELL_MOUSE_UP="corner-cell:mouse-up",Xv.CORNER_CELL_MOUSE_MOVE="corner-cell:mouse-move",Xv.CORNER_CELL_RENDER="corner-cell:render",Xv.CORNER_CELL_SELECTED="corner-cell:selected",Xv.MERGED_CELLS_HOVER="merged-cells:hover",Xv.MERGED_CELLS_CLICK="merged-cells:click",Xv.MERGED_CELLS_DOUBLE_CLICK="merged-cells:double-click",Xv.MERGED_CELLS_CONTEXT_MENU="merged-cells:context-menu",Xv.MERGED_CELLS_MOUSE_DOWN="merged-cells:mouse-down",Xv.MERGED_CELLS_MOUSE_UP="merged-cells:mouse-up",Xv.MERGED_CELLS_MOUSE_MOVE="merged-cells:mouse-move",Xv.MERGED_CELLS_RENDER="merged-cells:render",Xv.SERIES_NUMBER_CELL_RENDER="series-number-cell:render",Xv.RANGE_SORT="sort:range-sort",Xv.RANGE_SORTED="sort:range-sorted",Xv.RANGE_FILTER="filter:range-filter",Xv.RANGE_FILTERED="filter:range-filtered",Xv.LAYOUT_AFTER_HEADER_LAYOUT="layout:after-header-layout",Xv.LAYOUT_CELL_RENDER="layout:cell-render",Xv.LAYOUT_PAGINATION="layout:pagination",Xv.LAYOUT_AFTER_REAL_DATA_CELL_RENDER="layout:after-real-data-cell-render",Xv.LAYOUT_AFTER_RENDER="layout:after-render",Xv.LAYOUT_BEFORE_RENDER="layout:before-render",Xv.LAYOUT_DESTROY="layout:destroy",Xv.LAYOUT_RESIZE="layout:resize",Xv.LAYOUT_RESIZE_SERIES_WIDTH="layout:resize-series-width",Xv.LAYOUT_RESIZE_ROW_WIDTH="layout:resize-row-width",Xv.LAYOUT_RESIZE_ROW_HEIGHT="layout:resize-row-height",Xv.LAYOUT_RESIZE_COL_WIDTH="layout:resize-column-width",Xv.LAYOUT_RESIZE_COL_HEIGHT="layout:resize-column-height",Xv.LAYOUT_RESIZE_TREE_WIDTH="layout:resize-tree-width",Xv.LAYOUT_RESIZE_MOUSE_DOWN="layout:resize:mouse-down",Xv.LAYOUT_RESIZE_MOUSE_MOVE="layout:resize:mouse-move",Xv.LAYOUT_RESIZE_MOUSE_UP="layout:resize-mouse-up",Xv.GLOBAL_KEYBOARD_DOWN="global:keyboard-down",Xv.GLOBAL_KEYBOARD_UP="global:keyboard-up",Xv.GLOBAL_COPIED="global:copied",Xv.GLOBAL_MOUSE_UP="global:mouse-up",Xv.GLOBAL_MOUSE_MOVE="global:mouse-move",Xv.GLOBAL_ACTION_ICON_CLICK="global:action-icon-click",Xv.GLOBAL_ACTION_ICON_HOVER="global:action-icon-hover",Xv.GLOBAL_ACTION_ICON_HOVER_OFF="global:action-icon-hover-off",Xv.GLOBAL_CONTEXT_MENU="global:context-menu",Xv.GLOBAL_CLICK="global:click",Xv.GLOBAL_PREVIEW_CLICK="global:preview-click",Xv.GLOBAL_DOUBLE_CLICK="global:double-click",Xv.GLOBAL_SELECTED="global:selected",Xv.GLOBAL_HOVER="global:hover",Xv.GLOBAL_RESET="global:reset",Xv.GLOBAL_LINK_FIELD_JUMP="global:link-field-jump",Xv.GLOBAL_SCROLL="global:scroll",e.InteractionEvent=void 0,(Yv=e.InteractionEvent||(e.InteractionEvent={})).DATA_CELL_CLICK_EVENT="interaction:data-cell-click",Yv.MERGED_CELLS_CLICK_EVENT="interaction:merged-cells-click",Yv.CORNER_TEXT_CLICK_EVENT="interaction:corner-cell-text-click",Yv.ROW_COLUMN_CLICK_EVENT="interaction:row-column-click",Yv.ROW_TEXT_CLICK_EVENT="interaction:row-text-click",Yv.HOVER_EVENT="interaction:hover",e.OriginEventType=void 0,(jv=e.OriginEventType||(e.OriginEventType={})).MOUSE_DOWN="mousedown",jv.MOUSE_MOVE="mousemove",jv.MOUSE_UP="mouseup",jv.MOUSE_OUT="mouseout",jv.MOUSE_LEAVE="mouseleave",jv.TOUCH_START="touchstart",jv.TOUCH_END="touchend",jv.KEY_DOWN="keydown",jv.KEY_UP="keyup",jv.CLICK="click",jv.HOVER="hover",jv.CONTEXT_MENU="contextmenu",jv.POINTER_DOWN="pointerdown",jv.POINTER_MOVE="pointermove",jv.POINTER_OUT="pointerout",jv.POINTER_LEAVE="pointerleave",jv.POINTER_UP="pointerup",jv.POINTER_CANCEL="pointercancel",jv.POINTER_ENTER="pointerenter",jv.POINTER_OVER="pointerover",jv.RIGHT_DOWN="rightdown",jv.RIGHT_UP="rightup",jv.SCROLL="scroll";var $v,ey,ty,ny="$$value$$",ry="$$extra$$",Ay="$$origin$$",iy="$$extra_column$$",oy="$$total$$",ay="$$multi$$",sy="$$series_number$$",ly="$$empty_field_value$$",uy="$$empty_extra_placeholder$$",cy="$$null$$",hy="$$undefined$$";e.FrozenGroupArea=void 0,(ey=e.FrozenGroupArea||(e.FrozenGroupArea={})).Row="frozenRow",ey.Col="frozenCol",ey.TrailingRow="frozenTrailingRow",ey.TrailingCol="frozenTrailingCol",e.FrozenGroupType=void 0,(ty=e.FrozenGroupType||(e.FrozenGroupType={})).Row="frozenRowGroup",ty.Col="frozenColGroup",ty.TrailingCol="frozenTrailingColGroup",ty.TrailingRow="frozenTrailingRowGroup",ty.TopLeft="frozenTopLeftGroup",ty.TopRight="frozenTopRightGroup",ty.BottomLeft="frozenBottomLeftGroup",ty.BottomRight="frozenBottomRightGroup",ty.Scroll="scrollGroup";var dy,fy,py,gy=(($v={})[e.FrozenGroupArea.Row]=e.FrozenGroupType.Row,$v[e.FrozenGroupArea.Col]=e.FrozenGroupType.Col,$v[e.FrozenGroupArea.TrailingRow]=e.FrozenGroupType.TrailingRow,$v[e.FrozenGroupArea.TrailingCol]=e.FrozenGroupType.TrailingCol,$v);e.InteractionName=void 0,(dy=e.InteractionName||(e.InteractionName={})).CORNER_CELL_CLICK="cornerCellClick",dy.DATA_CELL_CLICK="dataCellClick",dy.ROW_CELL_CLICK="rowCellClick",dy.COL_CELL_CLICK="colCellClick",dy.MERGED_CELLS_CLICK="mergedCellsClick",dy.ROW_COLUMN_CLICK="rowColumnClick",dy.HEADER_CELL_LINK_CLICK="headerCellLinkClick",dy.PREVIEW_CLICK="previewClick",dy.HOVER="hover",dy.DATA_CELL_BRUSH_SELECTION="dataCellBrushSelection",dy.ROW_CELL_BRUSH_SELECTION="rowCellBrushSelection",dy.COL_CELL_BRUSH_SELECTION="colCellBrushSelection",dy.COL_ROW_RESIZE="rowColResize",dy.DATA_CELL_MULTI_SELECTION="dataCellMultiSelection",dy.ROW_CELL_MULTI_SELECTION="rowCellMultiSelection",dy.COL_CELL_MULTI_SELECTION="colCellMultiSelection",dy.RANGE_SELECTION="rangeSelection",dy.SELECTED_CELL_MOVE="selectedCellMove",dy.GLOBAL_RESET="globalReset",e.InteractionStateName=void 0,(fy=e.InteractionStateName||(e.InteractionStateName={})).ALL_SELECTED="allSelected",fy.SELECTED="selected",fy.ROW_CELL_BRUSH_SELECTED="rowCellBrushSelected",fy.COL_CELL_BRUSH_SELECTED="colCellBrushSelected",fy.DATA_CELL_BRUSH_SELECTED="dataCellBrushSelected",fy.UNSELECTED="unselected",fy.HOVER="hover",fy.HOVER_FOCUS="hoverFocus",fy.HIGHLIGHT="highlight",fy.SEARCH_RESULT="searchResult",fy.PREPARE_SELECT="prepareSelect",e.CellType=void 0,(py=e.CellType||(e.CellType={})).DATA_CELL="dataCell",py.ROW_CELL="rowCell",py.COL_CELL="colCell",py.SERIES_NUMBER_CELL="seriesNumberCell",py.CORNER_CELL="cornerCell",py.MERGED_CELL="mergedCell";var vy,yy,Cy,By,my=800,wy={textOpacity:"fillOpacity",backgroundOpacity:"fillOpacity",backgroundColor:"fill",borderOpacity:"strokeOpacity",borderColor:"stroke",borderWidth:"lineWidth",opacity:"opacity"},Ey={textShape:["textOpacity"],textShapes:["textOpacity"],linkFieldShape:["opacity"],interactiveBgShape:["backgroundColor","backgroundOpacity"],interactiveBorderShape:["borderColor","borderOpacity","borderWidth"]},xy="interactionStateInfo";e.InteractionBrushSelectionStage=void 0,(vy=e.InteractionBrushSelectionStage||(e.InteractionBrushSelectionStage={})).CLICK="click",vy.UN_DRAGGED="unDragged",vy.DRAGGED="dragged",e.InteractionKeyboardKey=void 0,(yy=e.InteractionKeyboardKey||(e.InteractionKeyboardKey={})).SHIFT="Shift",yy.COPY="c",yy.ESC="Escape",yy.META="Meta",yy.CONTROL="Control",yy.ARROW_UP="ArrowUp",yy.ARROW_DOWN="ArrowDown",yy.ARROW_LEFT="ArrowLeft",yy.ARROW_RIGHT="ArrowRight",e.SortMethodType=void 0,(Cy=e.SortMethodType||(e.SortMethodType={})).ASC="ASC",Cy.DESC="DESC",e.InterceptType=void 0,(By=e.InterceptType||(e.InterceptType={})).HOVER="hover",By.CLICK="click",By.DATA_CELL_BRUSH_SELECTION="dataCellBrushSelection",By.ROW_CELL_BRUSH_SELECTION="rowCellBrushSelection",By.COL_CELL_BRUSH_SELECTION="colCellBrushSelection",By.MULTI_SELECTION="multiSelection",By.RESIZE="resize";var Sy,Ty,Fy,by={x:{value:0,scroll:!1},y:{value:0,scroll:!1}};e.ScrollbarPositionType=void 0,(Sy=e.ScrollbarPositionType||(e.ScrollbarPositionType={})).CONTENT="content",Sy.CANVAS="canvas",e.ScrollDirection=void 0,(Ty=e.ScrollDirection||(e.ScrollDirection={})).SCROLL_UP="scrollUp",Ty.SCROLL_DOWN="scrollDown",Ty.SCROLL_LEFT="scrollLeft",Ty.SCROLL_RIGHT="scrollRight",e.ScrollDirectionRowIndexDiff=void 0,(Fy=e.ScrollDirectionRowIndexDiff||(e.ScrollDirectionRowIndexDiff={}))[Fy.SCROLL_UP=-1]="SCROLL_UP",Fy[Fy.SCROLL_DOWN=1]="SCROLL_DOWN";var Iy,Ly,Qy,Uy,Ry="root",My="[&]",Hy="-",Oy="RESIZE_START_GUIDE_LINE",ky="RESIZE_END_GUIDE_LINE",Ny="RESIZE_MASK";e.ResizeDirectionType=void 0,(Iy=e.ResizeDirectionType||(e.ResizeDirectionType={})).Horizontal="col",Iy.Vertical="row",e.ResizeAreaEffect=void 0,(Ly=e.ResizeAreaEffect||(e.ResizeAreaEffect={})).Field="field",Ly.Cell="cell",Ly.Tree="tree",Ly.Series="series",e.ResizeType=void 0,(Qy=e.ResizeType||(e.ResizeType={})).ALL="all",Qy.CURRENT="current",Qy.SELECTED="selected",e.DeviceType=void 0,(Uy=e.DeviceType||(e.DeviceType={})).PC="pc",Uy.MOBILE="mobile";var _y;e.LayoutWidthType=void 0,(_y=e.LayoutWidthType||(e.LayoutWidthType={})).Adaptive="adaptive",_y.ColAdaptive="colAdaptive",_y.Compact="compact";var Dy,Py={wordWrap:!0,maxLines:1,textOverflow:"ellipsis"},Gy={layoutWidthType:e.LayoutWidthType.Adaptive,seriesNumberCell:Py,cornerCell:Py,rowCell:rt(rt({},Py),{showTreeLeafNodeAlignDot:!1}),colCell:rt(rt({},Py),{height:30}),dataCell:rt(rt({},Py),{width:96,height:30})},Ky={rowCount:0,colCount:0,trailingRowCount:0,trailingColCount:0},zy={width:600,height:480,debug:!1,hierarchyType:"grid",device:e.DeviceType.PC,conditions:{},totals:{},tooltip:{enable:!1,autoAdjustBoundary:"body",operation:{hiddenColumns:!1,sort:!1,menu:{items:[]}}},interaction:{copy:{enable:!0,withFormat:!0,withHeader:!1},linkFields:[],hiddenColumnFields:[],selectedCellsSpotlight:!1,hoverHighlight:!0,hoverFocus:{duration:my},scrollSpeedRatio:{horizontal:1,vertical:1},autoResetSheetStyle:!0,brushSelection:{dataCell:!0,rowCell:!0,colCell:!0},multiSelection:!0,rangeSelection:!0,scrollbarPosition:e.ScrollbarPositionType.CONTENT,resize:{rowCellVertical:!0,cornerCellHorizontal:!0,colCellHorizontal:!0,colCellVertical:!0,rowResizeType:e.ResizeType.CURRENT,colResizeType:e.ResizeType.CURRENT,minCellWidth:40,minCellHeight:20},eventListenerOptions:!1,selectedCellHighlight:!1,overscrollBehavior:"auto"},seriesNumber:{enable:!1},customSVGIcons:[],showDefaultHeaderActionIcon:!1,headerActionIcons:[],style:Gy,frozen:rt({rowHeader:!0},Ky),hd:!0,cornerText:"",cornerExtraFieldText:"",placeholder:{cell:Nv,empty:{icon:"Empty"}}};function Vy(e){return Vy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vy(e)}e.QueryDataType=void 0,(Dy=e.QueryDataType||(e.QueryDataType={})).All="all",Dy.DetailOnly="detailOnly";var Wy=/^\s+/,Xy=/\s+$/;function Yy(e,t){if(t=t||{},(e=e||"")instanceof Yy)return e;if(!(this instanceof Yy))return new Yy(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,A=null,i=null,o=!1,a=!1;"string"==typeof e&&(e=function(e){e=e.replace(Wy,"").replace(Xy,"").toLowerCase();var t,n=!1;if(cC[e])e=cC[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=xC.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=xC.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=xC.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=xC.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=xC.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=xC.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=xC.hex8.exec(e))return{r:gC(t[1]),g:gC(t[2]),b:gC(t[3]),a:BC(t[4]),format:n?"name":"hex8"};if(t=xC.hex6.exec(e))return{r:gC(t[1]),g:gC(t[2]),b:gC(t[3]),format:n?"name":"hex"};if(t=xC.hex4.exec(e))return{r:gC(t[1]+""+t[1]),g:gC(t[2]+""+t[2]),b:gC(t[3]+""+t[3]),a:BC(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=xC.hex3.exec(e))return{r:gC(t[1]+""+t[1]),g:gC(t[2]+""+t[2]),b:gC(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==Vy(e)&&(SC(e.r)&&SC(e.g)&&SC(e.b)?(s=e.r,l=e.g,u=e.b,t={r:255*fC(s,255),g:255*fC(l,255),b:255*fC(u,255)},o=!0,a="%"===String(e.r).substr(-1)?"prgb":"rgb"):SC(e.h)&&SC(e.s)&&SC(e.v)?(r=yC(e.s),A=yC(e.v),t=function(e,t,n){e=6*fC(e,360),t=fC(t,100),n=fC(n,100);var r=Math.floor(e),A=e-r,i=n*(1-t),o=n*(1-A*t),a=n*(1-(1-A)*t),s=r%6,l=[n,o,i,i,a,n][s],u=[a,n,n,o,i,i][s],c=[i,i,a,n,n,o][s];return{r:255*l,g:255*u,b:255*c}}(e.h,r,A),o=!0,a="hsv"):SC(e.h)&&SC(e.s)&&SC(e.l)&&(r=yC(e.s),i=yC(e.l),t=function(e,t,n){var r,A,i;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=fC(e,360),t=fC(t,100),n=fC(n,100),0===t)r=A=i=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=o(s,a,e+1/3),A=o(s,a,e),i=o(s,a,e-1/3)}return{r:255*r,g:255*A,b:255*i}}(e.h,r,i),o=!0,a="hsl"),e.hasOwnProperty("a")&&(n=e.a));var s,l,u;return n=dC(n),{ok:o,format:e.format||a,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function jy(e,t,n){e=fC(e,255),t=fC(t,255),n=fC(n,255);var r,A,i=Math.max(e,t,n),o=Math.min(e,t,n),a=(i+o)/2;if(i==o)r=A=0;else{var s=i-o;switch(A=a>.5?s/(2-i-o):s/(i+o),i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:A,l:a}}function Zy(e,t,n){e=fC(e,255),t=fC(t,255),n=fC(n,255);var r,A,i=Math.max(e,t,n),o=Math.min(e,t,n),a=i,s=i-o;if(A=0===i?0:s/i,i==o)r=0;else{switch(i){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:A,v:a}}function Jy(e,t,n,r){var A=[vC(Math.round(e).toString(16)),vC(Math.round(t).toString(16)),vC(Math.round(n).toString(16))];return r&&A[0].charAt(0)==A[0].charAt(1)&&A[1].charAt(0)==A[1].charAt(1)&&A[2].charAt(0)==A[2].charAt(1)?A[0].charAt(0)+A[1].charAt(0)+A[2].charAt(0):A.join("")}function qy(e,t,n,r){return[vC(CC(r)),vC(Math.round(e).toString(16)),vC(Math.round(t).toString(16)),vC(Math.round(n).toString(16))].join("")}function $y(e,t){t=0===t?0:t||10;var n=Yy(e).toHsl();return n.s-=t/100,n.s=pC(n.s),Yy(n)}function eC(e,t){t=0===t?0:t||10;var n=Yy(e).toHsl();return n.s+=t/100,n.s=pC(n.s),Yy(n)}function tC(e){return Yy(e).desaturate(100)}function nC(e,t){t=0===t?0:t||10;var n=Yy(e).toHsl();return n.l+=t/100,n.l=pC(n.l),Yy(n)}function rC(e,t){t=0===t?0:t||10;var n=Yy(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),Yy(n)}function AC(e,t){t=0===t?0:t||10;var n=Yy(e).toHsl();return n.l-=t/100,n.l=pC(n.l),Yy(n)}function iC(e,t){var n=Yy(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Yy(n)}function oC(e){var t=Yy(e).toHsl();return t.h=(t.h+180)%360,Yy(t)}function aC(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Yy(e).toHsl(),r=[Yy(e)],A=360/t,i=1;i<t;i++)r.push(Yy({h:(n.h+i*A)%360,s:n.s,l:n.l}));return r}function sC(e){var t=Yy(e).toHsl(),n=t.h;return[Yy(e),Yy({h:(n+72)%360,s:t.s,l:t.l}),Yy({h:(n+216)%360,s:t.s,l:t.l})]}function lC(e,t,n){t=t||6,n=n||30;var r=Yy(e).toHsl(),A=360/n,i=[Yy(e)];for(r.h=(r.h-(A*t>>1)+720)%360;--t;)r.h=(r.h+A)%360,i.push(Yy(r));return i}function uC(e,t){t=t||6;for(var n=Yy(e).toHsv(),r=n.h,A=n.s,i=n.v,o=[],a=1/t;t--;)o.push(Yy({h:r,s:A,v:i})),i=(i+a)%1;return o}Yy.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=dC(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Zy(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Zy(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=jy(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=jy(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Jy(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,A){var i=[vC(Math.round(e).toString(16)),vC(Math.round(t).toString(16)),vC(Math.round(n).toString(16)),vC(CC(r))];if(A&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*fC(this._r,255))+"%",g:Math.round(100*fC(this._g,255))+"%",b:Math.round(100*fC(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*fC(this._r,255))+"%, "+Math.round(100*fC(this._g,255))+"%, "+Math.round(100*fC(this._b,255))+"%)":"rgba("+Math.round(100*fC(this._r,255))+"%, "+Math.round(100*fC(this._g,255))+"%, "+Math.round(100*fC(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(hC[Jy(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+qy(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var A=Yy(e);n="#"+qy(A._r,A._g,A._b,A._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Yy(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(nC,arguments)},brighten:function(){return this._applyModification(rC,arguments)},darken:function(){return this._applyModification(AC,arguments)},desaturate:function(){return this._applyModification($y,arguments)},saturate:function(){return this._applyModification(eC,arguments)},greyscale:function(){return this._applyModification(tC,arguments)},spin:function(){return this._applyModification(iC,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(lC,arguments)},complement:function(){return this._applyCombination(oC,arguments)},monochromatic:function(){return this._applyCombination(uC,arguments)},splitcomplement:function(){return this._applyCombination(sC,arguments)},triad:function(){return this._applyCombination(aC,[3])},tetrad:function(){return this._applyCombination(aC,[4])}},Yy.fromRatio=function(e,t){if("object"==Vy(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:yC(e[r]));e=n}return Yy(e,t)},Yy.equals=function(e,t){return!(!e||!t)&&Yy(e).toRgbString()==Yy(t).toRgbString()},Yy.random=function(){return Yy.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Yy.mix=function(e,t,n){n=0===n?0:n||50;var r=Yy(e).toRgb(),A=Yy(t).toRgb(),i=n/100;return Yy({r:(A.r-r.r)*i+r.r,g:(A.g-r.g)*i+r.g,b:(A.b-r.b)*i+r.b,a:(A.a-r.a)*i+r.a})},Yy.readability=function(e,t){var n=Yy(e),r=Yy(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Yy.isReadable=function(e,t,n){var r,A,i=Yy.readability(e,t);switch(A=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":A=i>=4.5;break;case"AAlarge":A=i>=3;break;case"AAAsmall":A=i>=7}return A},Yy.mostReadable=function(e,t,n){var r,A,i,o,a=null,s=0;A=(n=n||{}).includeFallbackColors,i=n.level,o=n.size;for(var l=0;l<t.length;l++)(r=Yy.readability(e,t[l]))>s&&(s=r,a=Yy(t[l]));return Yy.isReadable(e,a,{level:i,size:o})||!A?a:(n.includeFallbackColors=!1,Yy.mostReadable(e,["#fff","#000"],n))};var cC=Yy.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hC=Yy.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(cC);function dC(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fC(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function pC(e){return Math.min(1,Math.max(0,e))}function gC(e){return parseInt(e,16)}function vC(e){return 1==e.length?"0"+e:""+e}function yC(e){return e<=1&&(e=100*e+"%"),e}function CC(e){return Math.round(255*parseFloat(e)).toString(16)}function BC(e){return gC(e)/255}var mC,wC,EC,xC=(wC="[\\s|\\(]+("+(mC="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+mC+")[,|\\s]+("+mC+")\\s*\\)?",EC="[\\s|\\(]+("+mC+")[,|\\s]+("+mC+")[,|\\s]+("+mC+")[,|\\s]+("+mC+")\\s*\\)?",{CSS_UNIT:new RegExp(mC),rgb:new RegExp("rgb"+wC),rgba:new RegExp("rgba"+EC),hsl:new RegExp("hsl"+wC),hsla:new RegExp("hsla"+EC),hsv:new RegExp("hsv"+wC),hsva:new RegExp("hsva"+EC),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function SC(e){return!!xC.CSS_UNIT.exec(e)}var TC=[95,85,75,30,15,0,15,30,45,60,80],FC=function(e){return Yy(e).getLuminance()<=.5},bC=function(e,t){return Yy.isReadable(e,t,{level:"AA",size:"small"})},IC=[{fontColorIndex:0,bgColorIndex:3},{fontColorIndex:13,bgColorIndex:8},{fontColorIndex:14,bgColorIndex:1}],LC=function(e){for(var t=[],n=0;n<11;n++){var r=TC[n];t.push(0===r?lv.toUpper(e):lv.toUpper(Yy.mix(e,n<5?"#FFFFFF":"#000000",r).toHexString()))}return t},QC=function(e){void 0===e&&(e={});var t=Array.from(Array(15)).fill(Wv),n=e.basicColorRelations,r=void 0===n?[]:n,A=e.brandColor,i=LC(A);return r.forEach((function(e){t[e.basicColorIndex]=i[e.standardColorIndex]})),IC.forEach((function(e){var n=e.fontColorIndex,r=e.bgColorIndex;t[n]=FC(t[r])?Wv:Vv})),rt(rt({},e),{basicColors:t})},UC=QC({brandColor:"#3471F9",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:5},{basicColorIndex:4,standardColorIndex:6},{basicColorIndex:5,standardColorIndex:6},{basicColorIndex:6,standardColorIndex:6},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:4},{basicColorIndex:11,standardColorIndex:4},{basicColorIndex:12,standardColorIndex:5}]}),RC={default:QC({brandColor:"#326EF4",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:5},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:5},{basicColorIndex:12,standardColorIndex:5}]}),colorful:UC,gray:QC({brandColor:"#9DA7B6",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},others:{highlight:"#87B5FF",results:"#F0F7FF"},basicColorRelations:[{basicColorIndex:1,standardColorIndex:0},{basicColorIndex:2,standardColorIndex:1},{basicColorIndex:3,standardColorIndex:1},{basicColorIndex:4,standardColorIndex:2},{basicColorIndex:5,standardColorIndex:7},{basicColorIndex:6,standardColorIndex:8},{basicColorIndex:7,standardColorIndex:5},{basicColorIndex:9,standardColorIndex:1},{basicColorIndex:10,standardColorIndex:2},{basicColorIndex:11,standardColorIndex:3},{basicColorIndex:12,standardColorIndex:3}]}),dark:{brandColor:"#255dff",semanticColors:{red:"#FF4D4F",green:"#29A294",yellow:"#FAAD14"},basicColors:["#ffffff","#151a27","#213f94","#133aad","#213f94","#255dff","#4b91ff","#4b91ff","#191919","#1e2436","#0647b1","#7899ff","#7899ff","#f0f0f0","#dcdcdc"],basicColorRelations:[]}},MC="Roboto, PingFangSC, Microsoft YaHei, Arial, sans-serif",HC="".concat(Gv,"-dark-theme"),OC="".concat(Gv,"-tooltip"),kC="".concat(OC,"-mobile"),NC="".concat(OC,"-container"),_C="".concat(NC,"-show"),DC="".concat(NC,"-hide"),PC="".concat(OC,"-operation"),GC={x:15,y:10},KC=function(){return{key:"hiddenColumns",label:fv("隐藏"),icon:"EyeOutlined"}},zC=function(){return[{key:"asc",icon:"groupAsc",label:fv("组内升序")},{key:"desc",icon:"groupDesc",label:fv("组内降序")},{key:"none",label:fv("不排序")}]},VC=function(){return[{key:"asc",icon:"groupAsc",label:fv("升序")},{key:"desc",icon:"groupDesc",label:fv("降序")},{key:"none",label:fv("不排序")}]},WC=function(e,t,n,r){return e.options.layoutArrange?e.options.layoutArrange(e,n,r,t):t},XC=function(e,t,n,r){var A,i,o,a;if((null===(A=null==e?void 0:e.facet)||void 0===A?void 0:A.getHiddenColumnsInfo(n))&&(null===(a=null===(o=null===(i=null==e?void 0:e.dataSet)||void 0===i?void 0:i.fields)||void 0===o?void 0:o.columns)||void 0===a?void 0:a.find((function(e){return e===(null==n?void 0:n.field)}))))return!1;var s=!0,l=function(e,n,A){void 0===n&&(n=-1),void 0===A&&(A=-1),-1===n?(t.children.push(e),r.pushNode(e)):(t.children.splice(n,0,e),r.pushNode(e,A))};if(e.options.layoutHierarchy){var u=e.options.layoutHierarchy(e,n);if(u){var c=!!lv.isBoolean(null==u?void 0:u.delete)&&(null==u?void 0:u.delete);s=!c;var h=u.push,d=u.unshift,f=t.children.length,p=r.getNodes().length;lv.isEmpty(d)||(lv.each(d,(function(e){l(e)})),f=t.children.length,p=r.getNodes().length),lv.isEmpty(h)||lv.each(h,(function(e){l(e)})),c||l(n,f,p)}else l(n)}else l(n);return s},YC=function(e,t,n){var r,A;(null===(r=e.options)||void 0===r?void 0:r.layoutCoordinate)&&((null==t?void 0:t.isLeaf)||(null==n?void 0:n.isLeaf))&&(null===(A=e.options)||void 0===A||A.layoutCoordinate(e,t,n))},jC="Transform Data",ZC="Header Layout",JC="Data Cell Render",qC=function(){function e(){var e=this;this.debug=!1,this.debugCallback=function(t,n){if(e.debug){var r=performance.now();n();var A=performance.now();console.log(t,"".concat(A-r," ms"))}else n()},this.logger=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.debug&&console.log.apply(console,lt([t],st(n),!1))}}return e.getInstance=function(){return e.instance||(e.instance=new e),e.instance},e.prototype.setDebug=function(e){this.debug=e},e}(),$C=Object.freeze({__proto__:null,ArrowDown:'\n<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-family="Roboto, PingFangSC, Microsoft YaHei, Arial, sans-serif" font-size="12" font-weight="bold">\n    <text id="↓" fill="none">\n        <tspan x="-0.225097656" y="8.5">↓</tspan>\n    </text>\n</g>\n</svg>',ArrowUp:'<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" font-family="Roboto, PingFangSC, Microsoft YaHei, Arial, sans-serif" font-size="12" font-weight="bold">\n    <text id="↑" fill="none">\n        <tspan x="-0.225097656" y="8.5">↑</tspan>\n    </text>\n</g>\n</svg>\n',CellDown:'<?xml version="1.0" encoding="UTF-8"?>\n<svg width="7px" height="9px" viewBox="0 0 7 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n    <title>down</title>\n    <desc>Created with Sketch.</desc>\n    <g id="一期开发" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <polygon id="down" fill="none" transform="translate(3.500000, 4.500000) scale(1, -1) translate(-3.500000, -4.500000) " points="3.5 0 7 9 0 9"></polygon>\n    </g>\n</svg>',CellUp:'<?xml version="1.0" encoding="UTF-8"?>\n<svg width="7px" height="9px" viewBox="0 0 7 9" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    \x3c!-- Generator: Sketch 58 (84663) - https://sketch.com --\x3e\n    <title>up</title>\n    <desc>Created with Sketch.</desc>\n    <g id="一期开发" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <polygon id="up" fill="none" points="3.5 0 7 9 0 9"></polygon>\n    </g>\n</svg> ',DrillDownIcon:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1608030723688" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21482" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M547.648 696a32 32 0 0 1 31.488 26.24l0.512 5.76v151.68l145.216-144.512a32 32 0 0 1 40.832-3.648l4.416 3.712a32 32 0 0 1 3.584 40.832l-3.712 4.48-203.072 202.24a32 32 0 0 1-40.768 3.648l-4.416-3.712-202.24-202.24a32 32 0 0 1 40.832-48.96l4.416 3.712 150.912 150.912v-158.144a32 32 0 0 1 32-32z m194.56-529.28l4.928 3.072 233.792 180.224a32 32 0 0 1 1.728 49.28l-4.864 3.52-409.792 245.568a32 32 0 0 1-27.328 2.624l-5.184-2.432-422.4-245.568a32 32 0 0 1-7.552-49.28l4.544-4.032 242.816-180.288a32 32 0 0 1 42.432 47.552l-4.288 3.84-203.84 151.296 364.16 211.648 353.28-211.712-196.608-151.552a32 32 0 0 1-8.896-40l3.136-4.864a32 32 0 0 1 40-8.96zM547.712 28.672a32 32 0 0 1 31.488 26.24l0.512 5.76v396.992a32 32 0 0 1-63.488 5.76l-0.512-5.76V60.736a32 32 0 0 1 32-32z" p-id="21483" fill="currentColor"></path></svg>\n',Empty:'<svg width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse fill="#f5f5f5" cx="32" cy="33" rx="32" ry="7"></ellipse><g fill-rule="nonzero" stroke="#d9d9d9"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" fill="#fafafa"></path></g></g></svg>',ExpandColIcon:'<?xml version="1.0" encoding="UTF-8"?>\n<svg width="23px" height="12px" viewBox="0 0 23 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n    <title>编组 8备份 3</title>\n    <g id="----隐藏列标注！" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n        <g id="隐藏列标注" transform="translate(-275.000000, -824.000000)">\n            <rect fill="#FFFFFF" x="0" y="0" width="1333" height="1167"></rect>\n            <g id="编组-8备份-3" transform="translate(275.000000, 824.000000)">\n                <rect id="矩形" stroke-opacity="0.25" stroke="#000000" fill="#F7F7F7" x="0.5" y="0.5" width="11" height="11"></rect>\n                <rect id="矩形备份-9" stroke-opacity="0.25" stroke="#000000" fill="#F7F7F7" x="11.5" y="0.5" width="11" height="11"></rect>\n                <g id="7.Icon/arrow/15.down/fill" transform="translate(6.000000, 6.000000) rotate(90.000000) translate(-6.000000, -6.000000) " fill="#000000" fill-rule="nonzero" opacity="0.65">\n                    <path d="M7.25020811,6.37218077 L4.91348936,8.20968077 C4.82677061,8.27764952 4.69903624,8.21671202 4.69903624,8.10655577 L4.69903624,4.43272764 C4.69903624,4.32257139 4.82677061,4.26046202 4.91348936,4.32960264 L7.25020811,6.16593077 C7.31700499,6.21866514 7.31700499,6.31944639 7.25020811,6.37218077 Z" id="fill" transform="translate(5.999671, 6.269385) rotate(90.000000) translate(-5.999671, -6.269385) "></path>\n                </g>\n                <g id="7.Icon/arrow/15.down/fill" transform="translate(17.000000, 6.000000) rotate(270.000000) translate(-17.000000, -6.000000) translate(11.000000, 0.000000)" fill="#000000" fill-rule="nonzero" opacity="0.65">\n                    <path d="M7.25020811,6.37218077 L4.91348936,8.20968077 C4.82677061,8.27764952 4.69903624,8.21671202 4.69903624,8.10655577 L4.69903624,4.43272764 C4.69903624,4.32257139 4.82677061,4.26046202 4.91348936,4.32960264 L7.25020811,6.16593077 C7.31700499,6.21866514 7.31700499,6.31944639 7.25020811,6.37218077 Z" id="fill" transform="translate(5.999671, 6.269385) rotate(90.000000) translate(-5.999671, -6.269385) "></path>\n                </g>\n            </g>\n            <line x1="286.5" y1="813" x2="286.5" y2="864.5" id="路径-2备份-3" stroke="#000000" opacity="0.25"></line>\n        </g>\n    </g>\n</svg>',EyeOutlined:'<svg viewBox="64 64 896 896" focusable="false" data-icon="eye" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"></path></svg>',GlobalAsc:'<svg t="1557124621626" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17452" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n<defs>\n  <style type="text/css"></style>\n</defs>\n<path d="M182.272 167.04a8 8 0 0 0-12.544 0L57.728 309.056A8 8 0 0 0 64 321.984h76.032v530.048c0 4.352 3.584 7.936 7.936 7.936h56.064a8 8 0 0 0 7.936-7.936V321.92H288a8 8 0 0 0 6.272-12.992l-112-141.888z m209.728 626.944h176c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8h-176A8 8 0 0 1 384 857.984v-56c0-4.416 3.584-8 8-8z m0-424h368c4.416 0 8 3.648 8 8v56a8 8 0 0 1-8 8h-368A8 8 0 0 1 384 433.984v-56c0-4.352 3.584-8 8-8z m528-139.968h-528A8 8 0 0 1 384 222.016v-56c0-4.416 3.584-8 8-8h528c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8z m-256 424h-272A8 8 0 0 1 384 646.016v-56c0-4.416 3.584-8 8-8h272c4.416 0 8 3.584 8 8v56a8 8 0 0 1-8 8z" p-id="17453"></path>\n</svg>',GlobalDesc:'<svg t="1557124685600" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17561" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n  <defs>\n    <style type="text/css"></style>\n  </defs>\n  <path d="M182.272 856.96a8 8 0 0 1-12.544 0l-112-141.952A8 8 0 0 1 64 702.08h76.032V172.032c0-4.416 3.584-8 7.936-8h56.064c4.352 0 7.936 3.584 7.936 8v529.984H288c6.72 0 10.496 7.808 6.272 12.992l-112 141.888z m209.728-626.944h176A8 8 0 0 0 576 222.016v-56a8 8 0 0 0-8-8h-176A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h368a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-368A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m-256-424h-272A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h272a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17562"></path>\n</svg>',GroupAsc:'<svg t="1557124695786" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17670" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n  <defs>\n    <style type="text/css"></style>\n  </defs>\n  <path d="M182.272 167.04a8 8 0 0 0-12.544 0L57.728 309.056A8 8 0 0 0 64 321.984h76.032v530.048c0 4.352 3.584 7.936 7.936 7.936h56.064a8 8 0 0 0 7.936-7.936V321.92H288a8 8 0 0 0 6.272-12.992l-112-141.888z m209.728 62.976h304A8 8 0 0 0 704 222.016v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h304a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m0-424h-528A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17671"></path>\n</svg>',GroupDesc:'<svg t="1557124710652" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17779" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="14">\n  <defs>\n    <style type="text/css"></style>\n  </defs>\n  <path d="M182.272 856.96a8 8 0 0 1-12.544 0l-112-141.952A8 8 0 0 1 64 702.08h76.032V172.032c0-4.416 3.584-8 7.936-8h56.064c4.352 0 7.936 3.584 7.936 8v529.984H288c6.72 0 10.496 7.808 6.272 12.992l-112 141.888z m209.728-626.944h304A8 8 0 0 0 704 222.016v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 166.016v56c0 4.416 3.584 8 8 8z m0 424h304a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8h-304A8 8 0 0 0 384 590.016v56c0 4.416 3.584 8 8 8z m528 139.968h-528a8 8 0 0 0-8 8v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z m0-424h-528A8 8 0 0 0 384 377.984v56c0 4.416 3.584 8 8 8h528a8 8 0 0 0 8-8v-56a8 8 0 0 0-8-8z" p-id="17780"></path>\n</svg>',GroupNone:'<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n<g id="设计输出" stroke="none" stroke-width="1" fill-opacity="0.25" fill-rule="evenodd">\n    <g id="设计输出-移动端指标详情页-阅读端" transform="translate(-3275.000000, -724.000000)" fill-rule="nonzero">\n        <g id="编组-39" transform="translate(3064.500000, 667.000000)">\n            <g id="编组-36" transform="translate(80.500000, 44.000000)">\n                <g id="不排序" transform="translate(130.000000, 13.000000)">\n                    <path d="M12.0009375,12.40625 C12.0696875,12.40625 12.1259375,12.4625 12.1259375,12.53125 L12.1259375,12.53125 L12.1259375,13.40625 C12.1259375,13.475 12.0696875,13.53125 12.0009375,13.53125 L12.0009375,13.53125 L6.25093747,13.53125 C6.18218747,13.53125 6.12593747,13.475 6.12593747,13.40625 L6.12593747,13.40625 L6.12593747,12.53125 C6.12593747,12.4625 6.18218747,12.40625 6.25093747,12.40625 L6.25093747,12.40625 Z M2.93949997,2.5801875 L2.97437497,2.6109375 L4.72437497,4.828125 C4.78062497,4.89776786 4.74503823,4.99725765 4.66779698,5.02426203 L4.62593747,5.03125 L3.438,5.03089062 L3.43843747,10.9691406 L4.62593747,10.9691406 C4.73062497,10.9691406 4.78999997,11.0910156 4.72437497,11.1722656 L2.97437497,13.3894531 C2.92437497,13.4535156 2.82749997,13.4535156 2.77749997,13.3894531 L1.02749997,11.1722656 C0.961874969,11.0894531 1.02124997,10.9691406 1.12593747,10.9691406 L2.31343747,10.9691406 L2.313,5.03089062 L1.12593747,5.03125 C1.03620533,5.03125 0.979764,4.94285714 1.00679571,4.8654519 L1.02749997,4.828125 L2.77749997,2.6109375 C2.81749997,2.5596875 2.88749997,2.5494375 2.93949997,2.5801875 Z M10.5009375,9.09375 C10.5696875,9.09375 10.6259375,9.15 10.6259375,9.21875 L10.6259375,9.21875 L10.6259375,10.09375 C10.6259375,10.1625 10.5696875,10.21875 10.5009375,10.21875 L10.5009375,10.21875 L6.25093747,10.21875 C6.18218747,10.21875 6.12593747,10.1625 6.12593747,10.09375 L6.12593747,10.09375 L6.12593747,9.21875 C6.12593747,9.15 6.18218747,9.09375 6.25093747,9.09375 L6.25093747,9.09375 Z M14.5009375,5.78125 C14.5696875,5.78125 14.6259375,5.8375 14.6259375,5.90625 L14.6259375,5.90625 L14.6259375,6.78125 C14.6259375,6.85 14.5696875,6.90625 14.5009375,6.90625 L14.5009375,6.90625 L6.25093747,6.90625 C6.18218747,6.90625 6.12593747,6.85 6.12593747,6.78125 L6.12593747,6.78125 L6.12593747,5.90625 C6.12593747,5.8375 6.18218747,5.78125 6.25093747,5.78125 L6.25093747,5.78125 Z M9.00093747,2.46875 C9.06968747,2.46875 9.12593747,2.525 9.12593747,2.59375 L9.12593747,2.59375 L9.12593747,3.46875 C9.12593747,3.5375 9.06968747,3.59375 9.00093747,3.59375 L9.00093747,3.59375 L6.25093747,3.59375 C6.18218747,3.59375 6.12593747,3.5375 6.12593747,3.46875 L6.12593747,3.46875 L6.12593747,2.59375 C6.12593747,2.525 6.18218747,2.46875 6.25093747,2.46875 L6.25093747,2.46875 Z" id="形状结合"></path>\n                </g>\n            </g>\n        </g>\n    </g>q\n</g>\n</svg>',InfoCircle:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1590389330617" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19656" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 64c-247.4 0-448 200.6-448 448s200.6 448 448 448 448-200.6 448-448-200.6-448-448-448z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" fill="" p-id="19657"></path><path d="M464 336c0 26.5 21.5 48 48 48s48-21.5 48-48-21.5-48-48-48-48 21.5-48 48zM536 448h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-272c0-4.4-3.6-8-8-8z" fill="" p-id="19658"></path></svg>',Minus:'<svg t="1557140120188" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16909" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n\t<defs>\n\t\t<style type="text/css">\n\t\t</style>\n\t</defs>\n\t<path d="M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"\n\tp-id="16910">\n\t</path>\n\t<path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32z m-40 728H184V184h656v656z"\n\tp-id="16911">\n\t</path>\n</svg>',Play:'<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M0 0h1024v1024H0z" fill="#000000" opacity=".01" p-id="5072"></path><path d="M520 128C736.496 128 912 303.504 912 520S736.496 912 520 912C303.6 911.76 128.24 736.4 128 520 128 303.504 303.504 128 520 128z m0 60.288c-183.12 0.192-331.52 148.592-331.712 331.712 0 183.2 148.496 331.712 331.712 331.712 183.2 0 331.712-148.512 331.712-331.712S703.2 188.288 520 188.288z m-84.528 176.576l233.776 155.264-233.76 155.024V364.864z" fill="#A8ADBB" p-id="5073"></path></svg>',Plus:'<svg t="1557140186692" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17025" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n\t<defs>\n\t\t<style type="text/css">\n\t\t</style>\n\t</defs>\n\t<path d="M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"\n\tp-id="17026">\n\t</path>\n\t<path d="M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32z m-40 728H184V184h656v656z"\n\tp-id="17027">\n\t</path>\n</svg>',SortDown:'<svg t="1565940955886" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n  <defs>\n    <style type="text/css"></style>\n  </defs>\n  <path\n    fill-opacity="0.45"\n    d="M948 392.992l-403.008 488.99200001Q532 896 512.992 896t-32-14.016L76 392.992q-18.016-20.992-7.008-46.016T108 321.98400001L916 321.98400001q28 0 39.008 24.99199999T948 392.992z"\n    p-id="17473" data-spm-anchor-id="a313x.7781069.0.i2" class="selected"></path>\n</svg>\n',SortDownSelected:'<svg t="1565940955886" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17472" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n  <defs>\n    <style type="text/css"></style>\n  </defs>\n  <path\n    d="M948 392.992l-403.008 488.99200001Q532 896 512.992 896t-32-14.016L76 392.992q-18.016-20.992-7.008-46.016T108 321.98400001L916 321.98400001q28 0 39.008 24.99199999T948 392.992z"\n    p-id="17473" data-spm-anchor-id="a313x.7781069.0.i2" class="selected"></path>\n</svg>\n',SortUp:'<svg t="1565940979768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17620" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n  <defs>\n    <style type="text/css"></style>\n  </defs>\n  <path\n    fill-opacity="0.45"\n    d="M76 631.008l403.008-488.99200001Q492 128 511.008 128t32 14.016L948 631.008q18.016 20.992 7.008 46.016T916 702.01599999L108 702.01599999q-28 0-39.008-24.99199999T76 631.008z"\n    p-id="17621"></path>\n</svg>\n',SortUpSelected:'<svg t="1565940979768" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17620" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">\n<defs>\n<style type="text/css"></style>\n</defs>\n<path\nd="M76 631.008l403.008-488.99200001Q492 128 511.008 128t32 14.016L948 631.008q18.016 20.992 7.008 46.016T916 702.01599999L108 702.01599999q-28 0-39.008-24.99199999T76 631.008z"\np-id="17621"></path>\n</svg>\n',Trend:'<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1596433821690" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20229" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css"></style></defs><path d="M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM305.8 637.7c3.1 3.1 8.1 3.1 11.3 0l138.3-137.6L583 628.5c3.1 3.1 8.2 3.1 11.3 0l275.4-275.3c3.1-3.1 3.1-8.2 0-11.3l-39.6-39.6c-3.1-3.1-8.2-3.1-11.3 0l-230 229.9L461.4 404c-3.1-3.1-8.2-3.1-11.3 0L266.3 586.7c-3.1 3.1-3.1 8.2 0 11.3l39.5 39.7z" p-id="20230"></path></svg>'}),eB={},tB=function(e,t){eB[lv.lowerCase(e)]=t},nB=function(e){return eB[lv.lowerCase(e)]};lv.keys($C).forEach((function(e){var t=lv.get($C,e);tB(e,t)}));var rB=function(e){function t(t,n){var r=e.call(this,n)||this;return r.imgType=t,r}return nt(t,e),t}(gs),AB=function(e){function t(t,n){var r=e.call(this,t)||this;return r.appendInfo=n,r}return nt(t,e),t}(Ss);function iB(e,t){e.setAttributes(t,{skipDispatchAttrModifiedEvent:!0})}function oB(e,t){var n=lv.get(this,e);n?iB(n,t):lv.set(this,e,new Ss({style:t}))}var aB="<svg",sB="data:image/svg+xml",lB={},uB={};var cB,hB,dB,fB,pB,gB=function(e){function t(t){var n=e.call(this,{name:t.name})||this;return n.iconPathShapes=[],n.usePathMode=!1,n.isOnlineLink=function(e){return/^(?:https?:)?(?:\/\/)/.test(e)},n.cfg=t,n.render(),n}return nt(t,e),t.prototype.getCfg=function(){return this.cfg},t.prototype.tryRenderAsPath=function(e,t){var n,r,A=this,i=nB(e);if(!i)return!1;if(i.includes(sB)||this.isOnlineLink(i))return!1;var o=e,a=uB[o];if(!a){var s=function(e){if(/transform|translate|scale|rotate|<g|<rect|<circle|<ellipse|<line|<polyline|<polygon|<text|<tspan/i.test(e))return null;var t=e.match(/viewBox=["']([^"']+)["']/);if(!t)return null;var n=t[1].split(/\s+/).map(Number);if(n.length<4)return null;var r={width:n[2],height:n[3]},A=e.replace(/[\r\n]+/g," "),i=[],o=A.match(/\bd="[^"]+"/g);if(o&&(i=o.map((function(e){return e.slice(3,-1)}))),0===i.length){var a=A.match(/\bd='[^']+'/g);a&&(i=a.map((function(e){return e.slice(3,-1)})))}return 0===i.length?null:{viewBox:r,paths:i}}(i);s&&(a=s,uB[o]=s)}if(!a)return!1;var l=this.cfg,u=l.x,c=void 0===u?0:u,h=l.y,d=void 0===h?0:h,f=l.width,p=l.height,g=l.cursor,v="number"==typeof f?f:0,y="number"==typeof p?p:0,C=v/a.viewBox.width,B=y/a.viewBox.height;this.iconPathShapes.forEach((function(e){A.removeChild(e),e.destroy()})),this.iconPathShapes=[];var m=new Ss({style:{x:"number"==typeof c?c:0,y:"number"==typeof d?d:0,width:v,height:y,fill:"transparent",cursor:g||"default"}});this.appendChild(m),this.iconPathShapes.push(m);try{for(var w=at(a.paths),E=w.next();!E.done;E=w.next()){var x=E.value,S=new Bs({style:{d:x,fill:t||"#000",transformOrigin:"0 0",transform:"translate(".concat(c,", ").concat(d,") scale(").concat(C,", ").concat(B,")"),cursor:g||"default",pointerEvents:"none"}});this.appendChild(S),this.iconPathShapes.push(S)}}catch(e){n={error:e}}finally{try{E&&!E.done&&(r=w.return)&&r.call(w)}finally{if(n)throw n.error}}return!0},t.prototype.getImage=function(e,t,n){var r=this;return new Promise((function(A,i){var o=nB(e);if(o){var a=new Image;if(a.onload=function(){lB[t]=a,A(a)},a.onerror=i,o&&(o.includes(sB)||r.isOnlineLink(o)))a.src=o,a.crossOrigin="anonymous";else{n&&(o=(o=o.replace(/fill=[\'\"]\#?\w+[\'\"]/g,"")).replace(/fill>/g,">")),o=o.replace(aB,"".concat(aB,' fill="').concat(n,'"'));var s=new Blob([o],{type:"image/svg+xml"}),l=URL.createObjectURL(s),u=a.onload;a.onload=function(e){URL.revokeObjectURL(l),null==u||u.call(a,e)};var c=a.onerror;a.onerror=function(e){URL.revokeObjectURL(l),"function"==typeof c&&c.call(a,e)},a.src=l}}}))},t.prototype.render=function(){var e=this.cfg,n=e.name,r=e.fill;if("path"===e.iconStrategy&&this.tryRenderAsPath(n,r))this.usePathMode=!0;else{this.usePathMode=!1;var A=lv.clone(this.cfg),i=new rB(t.type,{style:lv.omit(A,["fill","iconStrategy"])});this.iconImageShape=i,this.setImageAttrs({name:n,fill:r})}},t.prototype.reRender=function(e){var n=this;this.name=e.name,this.cfg=e;var r=this.cfg,A=r.name,i=r.fill,o=r.iconStrategy;if(this.usePathMode&&(this.iconPathShapes.forEach((function(e){n.removeChild(e),e.destroy()})),this.iconPathShapes=[]),"path"===o&&this.tryRenderAsPath(A,i))this.usePathMode=!0;else{this.usePathMode=!1;var a=lv.clone(this.cfg);this.iconImageShape?(this.iconImageShape.imgType=t.type,iB(this.iconImageShape,lv.omit(a,["fill","iconStrategy"]))):this.iconImageShape=new rB(t.type,{style:lv.omit(a,["fill","iconStrategy"])}),this.setImageAttrs({name:A,fill:i})}},t.prototype.updatePosition=function(e){if(this.usePathMode){var t=this.cfg,n=t.width,r=t.height,A=uB[this.cfg.name];if(A){var i="number"==typeof r?r:0,o=("number"==typeof n?n:0)/A.viewBox.width,a=i/A.viewBox.height;this.iconPathShapes.forEach((function(t){t.style.transform="translate(".concat(e.x,", ").concat(e.y,") scale(").concat(o,", ").concat(a,")")}))}}else this.iconImageShape&&iB(this.iconImageShape,e)},t.prototype.setImageAttrs=function(e){var t=this;if(this.usePathMode){var n=e.fill||this.cfg.fill||"#000";this.iconPathShapes.slice(1).forEach((function(e){e.style.fill=n}))}else{var r=e.name,A=e.fill,i=this.iconImageShape;if(i){r=r||this.cfg.name,A=A||this.cfg.fill;var o="".concat(r,"-").concat(A),a=lB[o];a?(i.attr("src",a),this.appendChild(i)):this.getImage(r,o,A).then((function(e){t.destroyed?qC.getInstance().logger("GuiIcon ".concat(r," destroyed.")):(i.attr("src",e),t.appendChild(i))})).catch((function(e){e instanceof TypeError?console.warn("GuiIcon ".concat(r," destroyed:"),e):console.error("GuiIcon ".concat(r," load failed:"),e)}))}}},t.prototype.toggleVisibility=function(e){var t=e?"visible":"hidden";this.setAttribute("visibility",t),this.usePathMode?this.iconPathShapes.forEach((function(e){e.style.visibility=t})):this.iconImageShape&&this.iconImageShape.setAttribute("visibility",t)},t.type="__GUI_ICON__",t}(ds);e.CellBorderPosition=void 0,(cB=e.CellBorderPosition||(e.CellBorderPosition={})).TOP="TOP",cB.BOTTOM="BOTTOM",cB.LEFT="LEFT",cB.RIGHT="RIGHT",e.CellClipBox=void 0,(hB=e.CellClipBox||(e.CellClipBox={})).BORDER_BOX="borderBox",hB.PADDING_BOX="paddingBox",hB.CONTENT_BOX="contentBox",e.Aggregation=void 0,(dB=e.Aggregation||(e.Aggregation={})).SUM="SUM",dB.MIN="MIN",dB.MAX="MAX",dB.AVG="AVG",dB.COUNT="COUNT",e.CopyMIMEType=void 0,(fB=e.CopyMIMEType||(e.CopyMIMEType={})).PLAIN="text/plain",fB.HTML="text/html",e.CornerNodeType=void 0,(pB=e.CornerNodeType||(e.CornerNodeType={})).Row="row",pB.Col="col",pB.Series="series";var vB=function(){function e(){this.store=new Map}return e.prototype.set=function(e,t){return this.store.set(e,t)},e.prototype.get=function(e,t){var n;return null!==(n=this.store.get(e))&&void 0!==n?n:t},e.prototype.clear=function(){this.store.clear()},e.prototype.size=function(){return this.store.size},e}(),yB=function(){function e(e){this.x=0,this.y=0,this.width=0,this.height=0,this.colIndex=-1,this.level=0,this.isLeaf=!1,this.children=[],this.padding=0,this.extra={},lv.assign(this,e)}return e.getFieldPath=function(e,t){if(e&&!e.isTotals||e&&t){for(var n=e.parent,r=[e.field];n&&n.id!==Ry;)r.push(n.field),n=n.parent;return r.reverse()}return[]},e.getAllLeaveNodes=function(e){var t=[];if(e.isLeaf)return[e];for(var n=lt([],st(e.children||[]),!1),r=n.shift();r;)r.isLeaf?t.push(r):n.unshift.apply(n,lt([],st(r.children),!1)),r=n.shift();return t},e.getAllChildrenNodes=function(e,t){void 0===t&&(t=function(e){return[e]});var n=[];if(e.isLeaf)return n.push.apply(n,lt([],st(t(e)),!1)),n;for(var r=lt([],st(e.children||[]),!1),A=r.shift();A;)n.push.apply(n,lt([],st(t(A)),!1)),r.unshift.apply(r,lt([],st(A.children),!1)),A=r.shift();return n},e.getBranchNodes=function(e){if(e&&!e.isTotals){for(var t=e.parent,n=[e];t&&t.id!==Ry;)n.push(t),t=t.parent;return n.reverse()}return[]},e.blankNode=function(){return new e({id:"",field:"",value:""})},e.rootNode=function(){return new e({id:Ry,field:"",value:""})},e.prototype.getHeadLeafChild=function(){for(var e=this;!lv.isEmpty(null==e?void 0:e.children);)e=lv.head(null==e?void 0:e.children);return e},e.prototype.getTotalHeightForTreeHierarchy=function(){return 0===this.height||lv.isEmpty(this.children)?this.height:this.children.reduce((function(e,t){return e+t.getTotalHeightForTreeHierarchy()}),this.height)},e.prototype.isSeriesNumberNode=function(){return this.field===sy},e.prototype.clone=function(){return new e(rt({},this))},Object.defineProperty(e.prototype,"isFrozen",{get:function(){return this.isFrozenHead||this.isFrozenTrailing},enumerable:!1,configurable:!0}),e}(),CB=function(){function e(e){var t=e.label,n=e.isSubTotals,r=e.isGrandTotals,A=e.isTotalRoot,i=void 0!==A&&A;this.label=t,this.isSubTotals=n,this.isGrandTotals=r,this.isTotalRoot=i}return e.isTotalClassInstance=function(t){return t instanceof e},e}(),BB=function(){function e(e){this.label=e}return e.isTotalMeasureInstance=function(t){return t instanceof e},e}(),mB=function(e){return lv.isUndefined(e)?hy:lv.isNull(e)?cy:String(e)},wB=function(e){return e===cy?null:e!==hy?e:void 0},EB=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.map(mB).join(My)},xB=function(e){var t,n,r,A,i=e.spreadsheet,o=e.level,a=e.fields,s=i.options,l=i.dataSet.moreThanOneValue(),u=null===(n=null===(t=i.dataCfg.fields)||void 0===t?void 0:t.valueInCols)||void 0===n||n,c=(null===(A=null===(r=null==s?void 0:s.style)||void 0===r?void 0:r.colCell)||void 0===A?void 0:A.hideValue)&&u&&!l&&lv.includes(a,ry)?2:1;return o===a.length-c},SB=function(e){var t,n,r,A,i,o,a,s,l=e.currentField,u=e.fields,c=e.fieldValues,h=e.hierarchy,d=e.parentNode,f=e.level,p=e.query,g=e.addMeasureInTotalQuery,v=e.addTotalMeasureInTotal,y=e.spreadsheet,C=e.handler,B=y.isTableMode();try{for(var m=at(c.entries()),w=m.next();!w.done;w=m.next()){var E=st(w.value,2),x=E[0],S=E[1],T=wB(S),F=CB.isTotalClassInstance(T),b=BB.isTotalMeasureInstance(T),I=void 0,L=void 0,Q=!1,U=!1,R=!1,M=!1,H=l;F?(U=T.isGrandTotals,R=T.isSubTotals,M=T.isTotalRoot,I=fv(T.label),L=M?rt({},p):rt(rt({},p),((r={})[l]=I,r)),g&&(L[ry]=null===(a=null==y?void 0:y.dataSet)||void 0===a?void 0:a.fields.values[0]),Q=xB({spreadsheet:y,level:f,fields:u})):b?(I=fv(T.label),L=rt(rt({},p),((A={})[ry]=I,A)),H=ry,U=d.isGrandTotals,R=d.isSubTotals,Q=xB({spreadsheet:y,level:f,fields:u})):B?(I=T,H=u[x],L=rt(rt({},p),((i={})[H]=I,i)),Q=!0):(L=(I=T)===ly?rt({},p):rt(rt({},p),((o={})[l]=I,o)),Q=xB({spreadsheet:y,level:f,fields:u}));var O=B?H:I,k=EB(d.id,O);if(!k)return;var N=!1,_=new yB({id:k,value:I,level:f,field:H,parent:d,isTotals:F||b,isGrandTotals:U,isSubTotals:R,isTotalMeasure:b,isCollapsed:N,isTotalRoot:M,hierarchy:h,query:L,spreadsheet:y,isLeaf:Q||N}),D=XC(y,d,_,h),P=null===(s=null==y?void 0:y.facet)||void 0===s?void 0:s.getHiddenColumnsInfo(_);!(f>h.maxLevel)||U||d.isGrandTotals||d.isSubTotals||_.isSubTotals||P||(h.sampleNodesForAllLevels.push(_),h.maxLevel=f,h.sampleNodeForLastLevel=_),Q||!D?(_.isLeaf=!0,h.pushIndexNode(_),_.rowIndex=h.getIndexNodes().length-1):null==C||C({addTotalMeasureInTotal:v,addMeasureInTotalQuery:g,parentNode:_,currentField:u[f+1],fields:u,hierarchy:h,spreadsheet:y})}}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}},TB=function(e){return void 0===e&&(e=[]),e.filter((function(e){return e!==oy&&e!==uy}))};var FB=function(e){var t,n,r,A=e.isFirstField,i=e.currentField,o=e.fieldValues,a=e.spreadsheet,s=e.lastField,l=a.getTotalsConfig(A?i:s);A?(null==l?void 0:l.showGrandTotals)&&(n=l.reverseGrandTotalsLayout?"unshift":"push",r=new CB({label:l.grandTotalsLabel,isSubTotals:!1,isGrandTotals:!0,isTotalRoot:!0})):(null==l?void 0:l.showSubTotals)&&(lv.size(o)>1||!1!==lv.get(l,"showSubTotals.always"))&&i!==ry&&(n=l.reverseSubTotalsLayout?"unshift":"push",r=new CB({label:l.subTotalsLabel,isSubTotals:!0,isGrandTotals:!1,isTotalRoot:!0})),n&&(null===(t=o[n])||void 0===t||t.call(o,r))};function bB(e,t){for(var n={},r=e;r&&r.field;)r.isTotalRoot&&!t||r.value===ly||(n[r.field]=r.value),r=r.parent;return n}var IB=function(e){var t=e.addTotalMeasureInTotal,n=e.parentNode,r=e.currentField,A=e.fields,i=e.hierarchy,o=e.spreadsheet,a=A.indexOf(r),s=o.dataSet,l=s.fields.values,u=void 0===l?[]:l,c=[],h={},d=o.getTotalsConfig(r),f=n.isGrandTotals?d.grandTotalsGroupDimensions||[]:d.subTotalsGroupDimensions||[],p=s.isEmpty()?[]:f;if(null==p?void 0:p.includes(r)){h=bB(n);var g=s.getDimensionValues(r,h);c.push.apply(c,lt([],st((g||[]).map((function(e){return new CB({label:e,isSubTotals:n.isSubTotals,isGrandTotals:n.isGrandTotals,isTotalRoot:!1})}))),!1)),lv.isEmpty(c)&&r&&c.push(ly)}else{if(!t||r!==ry)return xB({spreadsheet:o,level:a,fields:A})?(n.isLeaf=!0,i.pushIndexNode(n),void(n.rowIndex=i.getIndexNodes().length-1)):void IB(rt(rt({},e),{currentField:A[a+1]}));h=bB(n),c.push.apply(c,lt([],st(u.map((function(e){return new BB(e)}))),!1))}var v=TB(c);SB(rt(rt({},e),{fieldValues:v,level:a,parentNode:n,query:h,handler:QB}))},LB=function(e){var t,n=e.parentNode,r=e.currentField,A=e.fields,i=e.spreadsheet,o=i.dataSet,a=o.fields.values,s=void 0===a?[]:a,l=A.indexOf(r),u=[];t=bB(n,!0);var c=o.getDimensionValues(r,t),h=WC(i,c,n,r);u.push.apply(u,lt([],st(h||[]),!1)),lv.isEmpty(u)&&r&&(r===ry?u.push.apply(u,lt([],st(s),!1)):u.push(ly)),FB({currentField:r,lastField:A[l-1],isFirstField:0===l,fieldValues:u,spreadsheet:i});var d=TB(u);SB(rt(rt({},e),{fieldValues:d,level:l,parentNode:n,query:t,handler:QB}))};function QB(e){e.parentNode.isTotals?IB(e):LB(e)}var UB,RB=function(e){var t,n=e.spreadsheet,r=e.rootNode,A=e.fields,i=e.hierarchy,o=n.dataSet.fields.columns,a=void 0===o?[]:o,s=(null!==(t=n.options.seriesNumber)&&void 0!==t?t:{}).enable,l=n.getSeriesNumberText(),u=a.map((function(e){return e===sy?l:n.dataSet.getFieldName(e)}));s&&!A.includes(sy)&&(A.unshift(sy),u.unshift(l)),SB({spreadsheet:n,currentField:A[0],fields:A,fieldValues:u,hierarchy:i,parentNode:r,level:0,query:{},addMeasureInTotalQuery:!1,addTotalMeasureInTotal:!1,handler:QB})},MB=function(){function e(){this.width=0,this.height=0,this.maxLevel=-1,this.sampleNodesForAllLevels=[],this.sampleNodeForLastLevel=null,this.allNodesWithoutRoot=[],this.indexNode=[],this.isPlaceholder=!1,this.rootNode=yB.rootNode()}return e.prototype.getLeaves=function(){return this.allNodesWithoutRoot.filter((function(e){return e.isLeaf}))},e.prototype.getNodes=function(e){return void 0!==e?this.allNodesWithoutRoot.filter((function(t){return t.level===e})):this.allNodesWithoutRoot},e.prototype.getNodesLessThanLevel=function(e){return this.allNodesWithoutRoot.filter((function(t){return t.level<=e}))},e.prototype.pushNode=function(e,t){void 0===t&&(t=-1),-1===t?this.allNodesWithoutRoot.push(e):this.allNodesWithoutRoot.splice(t,0,e)},e.prototype.pushIndexNode=function(e){this.indexNode.push(e)},e.prototype.getIndexNodes=function(){return this.indexNode},e}();!function(e){e.VIDEO="VIDEO",e.IMAGE="IMAGE"}(UB||(UB={}));var HB=new Error("Failed to load image and fallback");function OB(e){var t=e.src,n=e.fallback,r=e.timeout,A=void 0===r?1e4:r,i=e.mediaCache,o=e.crossOrigin,a=void 0===o?"Anonymous":o;return new Promise((function(e,r){if(null==i?void 0:i.has(t)){i.get(t)?e(i.get(t)):r(HB)}else{var o=function(n){null==i||i.set(t,n),e(n)},s=function(e){null==i||i.set(t,null),r(e)},l=function(){n?OB({src:n,timeout:A,mediaCache:i}).then(o).catch(s):s(HB)},u=function(){a?OB({src:t,timeout:A,mediaCache:i,crossOrigin:null}).then(o).catch(l):l()},c=new Image;c.src=t,c.crossOrigin=a;var h=setTimeout(u,A);c.onload=function(){clearTimeout(h),o(c)},c.onerror=function(){clearTimeout(h),u()},c.onabort=function(){clearTimeout(h),u()}}}))}function kB(e){return it(this,arguments,void 0,(function(e,t){var n;return void 0===t&&(t=""),ot(this,(function(r){switch(r.label){case 0:return r.trys.push([0,3,,4]),e?[4,e(t)]:[3,2];case 1:t=r.sent()||t,r.label=2;case 2:return[3,4];case 3:return n=r.sent(),console.warn("fail to prepareText",n),[3,4];case 4:return[2,t]}}))}))}function NB(e){var t,n,r,A=e||1;function i(e,i){++t>A&&(r=n,o(1),++t),n[e]=i}function o(e){t=0,n=Object.create(null),e||(r=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==n[e]||void 0!==r[e]},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(i(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:i(e,t)}}}var _B=function(){function t(){}return t.prototype.getLoading=function(e){var t,n=this.getCellInfo(e),r=n.x,A=n.y,i=n.height,o=n.width,a=.25*Math.min(i,o),s=r+o/2,l=A+i/2,u=new Bs({style:{d:"M".concat(s," ").concat(l-a,"\n           A").concat(a," ").concat(a," 0 0 1 ").concat(s+a," ").concat(l),stroke:null===(t=e.getIconStyle())||void 0===t?void 0:t.fill,transformOrigin:"".concat(s," ").concat(l)}});return e.appendChild(u),setTimeout((function(){u.animate([{transform:"rotate(0)"},{transform:"rotate(360deg)"}],{duration:1e3,iterations:1/0})})),u},t.prototype.process=function(e,t){return it(this,void 0,void 0,(function(){var n,r,A;return ot(this,(function(i){switch(i.label){case 0:return n=this.getLoading(t),[4,this.prepare(e,t)];case 1:return r=i.sent(),A=this.generateConfig(e,t,r),t.removeChild(n),n.destroy(),this.render(t,A),[2]}}))}))},t.prototype.destroy=function(){},t.prototype.getCellInfo=function(t){var n,r=t.getFieldValue(),A=null!==(n=null==r?void 0:r.toString())&&void 0!==n?n:"";return rt({text:A},t.getBBoxByType(e.CellClipBox.CONTENT_BOX))},t.prototype.prepareText=function(e,t){var n=this.getCellInfo(t).text;return kB(e.prepareText,n)},t.mediaCache=NB(200),t}(),DB=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.prepare=function(e,t){return it(this,void 0,void 0,(function(){return ot(this,(function(n){switch(n.label){case 0:return[4,this.prepareText(e,t)];case 1:return[2,OB({src:n.sent(),fallback:e.fallback,timeout:e.timeout,mediaCache:_B.mediaCache})]}}))}))},n.prototype.generateConfig=function(t,n,r){var A=n.getBBoxByType(e.CellClipBox.CONTENT_BOX),i=A.y,o=A.height,a=function(e,t,n,r){if(e<=0||t<=0)return{width:0,height:0};if(n<=0||r<=0)return{width:e,height:t};var A=e/n,i=t/r,o=Math.min(A,i);return{width:Math.floor(n*o),height:Math.floor(r*o)}}(A.width,o,r.naturalWidth,r.naturalHeight),s=a.width,l=a.height,u=n.getContentPosition({contentWidth:s}).x;return{style:rt({x:u,y:i,src:r,width:s,height:l},t.config)}},n.prototype.render=function(e,t){e.appendChild(new gs(t))},n.prototype.destroy=function(){},n}(_B),PB={loop:!0,autoplay:!0,crossOrigin:!0,controls:!1,muted:!0},GB=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.prepare=function(e,t){return it(this,void 0,void 0,(function(){var n,r=this;return ot(this,(function(A){switch(A.label){case 0:return[4,this.prepareText(e,t)];case 1:return n=A.sent(),[2,new Promise((function(A){var i=r.getCellInfo(t),o=i.height,a=i.width,s=e.timeout,l=void 0===s?1e4:s,u=e.fallback,c=void 0===u?"":u;if(_B.mediaCache.has(n)){var h=_B.mediaCache.get(n);A(h)}else{var d=document.createElement("video"),f=setTimeout((function(){A(c)}),l),p=rt(rt({height:o,width:a,src:n},PB),e.videoConfig);Object.assign(d,p),d.onloadeddata=function(){clearTimeout(f),_B.mediaCache.set(n,d),A(d)};var g=function(){clearTimeout(f),A(c)};["error","abort","stalled"].forEach((function(e){d.addEventListener(e,g)}))}}))]}}))}))},t.prototype.generateConfig=function(e,t,n){var r=this.getCellInfo(t),A=r.x,i=r.y,o=r.width,a=r.height,s="";if(n instanceof HTMLVideoElement){var l=o/n.videoWidth,u=a/n.videoHeight;s="scale(".concat(l,", ").concat(u,")")}return{style:rt({x:A,y:i,width:o,height:a,fill:{image:n,repetition:"no-repeat",transform:s}},e.config)}},t.prototype.render=function(e,t){var n=new Ss(t),r=this.getCellInfo(e),A=r.x,i=r.y,o=r.width,a=r.height,s=.25*Math.min(o,a);n.appendChild(new gB({name:"Play",width:s,height:s,x:A+o/2-s/2,y:i+a/2-s/2,pointerEvents:"none",cursor:"pointer"})),e.appendChild(n)},t}(_B),KB=function(){function e(){}return e.getInstance=function(t){if(!e.instances.has(t)){var n=void 0;switch(t){case UB.IMAGE:n=new DB;break;case UB.VIDEO:n=new GB;break;default:n=null}n&&e.instances.set(t,n)}return e.instances.get(t)},e.render=function(t,n){return e.getInstance(t.type).process(t,n)},e.instances=new Map,e}(),zB=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t="right"),e.map((function(e){return"string"==typeof e?{name:e,position:t}:e}))},VB=function(e,t,n){void 0===e&&(e=[]);var r,A=(void 0===(r=e)&&(r=[]),r.map((function(e){return rt(rt({},e),{icons:zB(e.icons)})}))),i=lv.find(A,(function(e){return function(e,t,n){if(!e)return!1;var r=e.icons,A=e.displayCondition,i=e.belongsCell;return!lv.isEmpty(r)&&i===n&&r.some((function(e){var n,r,i;return null===(i=null!==(r=null===(n=e.displayCondition)||void 0===n?void 0:n.call(e,t,e.name))&&void 0!==r?r:null==A?void 0:A(t,e.name))||void 0===i||i}))}(e,t,n)}));if(i){var o=i.icons.filter((function(e){var n,r,A,o;return null===(o=null!==(r=null===(n=e.displayCondition)||void 0===n?void 0:n.call(e,t,e.name))&&void 0!==r?r:null===(A=i.displayCondition)||void 0===A?void 0:A.call(i,t,e.name))||void 0===o||o}));return rt(rt({},i),{icons:o})}},WB=function(e,t){if(void 0===e&&(e=[]),lv.isEmpty(e))return 0;var n=t.margin,r=t.size;return e.reduce((function(e,t){var A=t.position;return e+r+("left"===A?n.right:n.left)}),0)},XB=function(e,t){void 0===e&&(e=[]);var n=lv.merge({left:[],right:[]},lv.groupBy(e,"position"));return t&&("left"===t.position?n.left.push(t):n.right.unshift(t)),n},YB=function(e,t){var n=e.value,r=e.field;return lv.isEqual(r,ry)?{formattedValue:t||n,value:n}:{formattedValue:n,value:n}},jB=function(e,t){var n=e.y,r=e.height;switch(t){case"top":return n;case"middle":return n+r/2;default:return n+r}},ZB=function(e,t,n,r){var A=(n-e)/2;switch(r){case"top":return t+A;case"middle":return t-e/2;default:return t-A-e}},JB=function(e){var t,n,r,A=e.bbox,i=e.textWidth,o=e.textAlign,a=e.groupedIcons,s=e.iconStyle,l=e.isCustomRenderer,u=void 0!==l&&l,c=A.x,h=A.width,d=WB(a.left,s),f=WB(a.right,s);switch(o){case"left":n=c,r=(t=c+d)+i+(f&&s.margin.left);break;case"right":n=(t=c+h-f-(u?i:0))-(u?0:i)-d,r=c+h-f+(f&&s.margin.left);break;default:t=(n=c+h/2-(d+i+f)/2)+d+(u?0:i/2),r=n+d+i+(f&&s.margin.left)}return{textX:t,leftIconX:n,rightIconX:r}},qB=function(t,n,r,A){if(A===e.CellClipBox.BORDER_BOX)return t;var i=t.x,o=t.y,a=t.width,s=t.height,l=r.padding,u=r.horizontalBorderWidth,c=void 0===u?0:u,h=r.verticalBorderWidth,d=void 0===h?0:h;return n.forEach((function(t){var n=[e.CellBorderPosition.BOTTOM,e.CellBorderPosition.TOP].includes(t)?c:d;switch(t){case e.CellBorderPosition.TOP:o+=n,s-=n;break;case e.CellBorderPosition.BOTTOM:s-=n;break;case e.CellBorderPosition.LEFT:i+=n,a-=n;break;default:a-=n}})),A===e.CellClipBox.CONTENT_BOX&&(i+=null==l?void 0:l.left,o+=null==l?void 0:l.top,a-=(null==l?void 0:l.left)+(null==l?void 0:l.right),s-=(null==l?void 0:l.top)+(null==l?void 0:l.bottom)),{x:i,y:o,width:a,height:s}},$B=function(t,n,r){var A=n||{},i=A.x,o=A.y,a=A.width,s=A.height,l=r||{},u=l.horizontalBorderWidth,c=void 0===u?0:u,h=l.horizontalBorderColorOpacity,d=l.horizontalBorderColor,f=l.verticalBorderWidth,p=void 0===f?0:f,g=l.verticalBorderColor,v=l.verticalBorderColorOpacity,y=l.borderDash,C=lv.isEmpty(y)?"":y,B=[e.CellBorderPosition.TOP,e.CellBorderPosition.BOTTOM].includes(t)?{lineWidth:c,stroke:d,strokeOpacity:h,lineDash:C}:{lineWidth:p,stroke:g,strokeOpacity:v,lineDash:C},m=0,w=0,E=0,x=0;if(t===e.CellBorderPosition.TOP||t===e.CellBorderPosition.BOTTOM){var S=o;w=S=t===e.CellBorderPosition.TOP?o+c/2:o+s-c/2,x=S,m=i,E=i+a}if(t===e.CellBorderPosition.LEFT||t===e.CellBorderPosition.RIGHT){var T=i;m=T=t===e.CellBorderPosition.LEFT?i+p/2:i+a-p/2,E=T,w=o,x=o+s}return{position:{x1:m,x2:E,y1:w,y2:x},style:B}},em={en_US:["KMBTP".split(""),[1e3,1e3,1e3,1e3,1e3]],ru_RU:[["тысяча","миллион","миллиард","триллион","квадриллион"],[1e3,1e3,1e3,1e3,1e3]],zh_CN:[["万","亿"],[1e4,1e4]]},tm=function(e){return Number.parseFloat((lv.toNumber(e)||0).toPrecision(16))},nm=function(e){var t;return null!==(t=null==e?void 0:e.position)&&void 0!==t?t:"right"},rm=function(e,t){return void 0===e&&(e=[]),lv.findLast(lv.compact(e),(function(e){return e.field instanceof RegExp?e.field.test(t):e.field===t}))},Am=function(e){function t(t,n){var r=e.call(this,t)||this;return r.appendInfo=n,r}return nt(t,e),t}(Fs);function im(e,t){return null==e?void 0:e.appendChild(new Ss({style:t}))}function om(e,t){return null==e?void 0:e.appendChild(new ws({style:t}))}function am(e,t){return null==e?void 0:e.appendChild(new xs({style:t}))}function sm(e,t){return null==e?void 0:e.appendChild(new ls({style:t}))}function lm(e){var t=e.group,n=e.textShape,r=e.style,A=e.appendInfo;return n&&t&&t.contains(n)&&t.removeChild(n),null==t?void 0:t.appendChild(new Am({style:rt({fontVariant:"normal",fontStyle:"normal",lineWidth:1},r)},A||{}))}function um(e,t){return null==e?void 0:e.appendChild(new ys({style:rt({zIndex:100},t)}))}function cm(e,t,n){lv.isEmpty(e)||(lv.isArray(e)?e:[e]).forEach((function(e){var r;null===(r=null==e?void 0:e.style)||void 0===r||r.setProperty(t,n)}))}function hm(e,t){var n=new gB(t);return null==e||e.appendChild(n),n}function dm(e){var t=e.group,n=e.iconCfg,r=e.isCollapsed,A=e.onClick,i=hm(t,rt(rt({},n),{name:r?"Plus":"Minus",cursor:"pointer"}));return lv.isFunction(A)&&i.addEventListener("click",A),i}function fm(e,t){for(var n in t)e.style[n]=t[n]}function pm(e,t){var n=lv.get(this,e);n?fm(n,t):lv.set(this,e,new Ss({style:t}))}var gm=function(e,t){return lv.isFunction(e)?e(t):e.some((function(e){return e===t.field||e===t.id||e===t.valueField}))};function vm(){return"undefined"==typeof window}function ym(){return"undefined"!=typeof document}function Cm(){return"undefined"!=typeof navigator}function Bm(t){return t===e.DeviceType.MOBILE||!(vm()||!Cm())&&/(?:iPhone|iPad|SymbianOS|Windows Phone|iPod|iOS|Android|Mobile|Phone|Tablet)/i.test(navigator.userAgent)}function mm(){return!vm()&&/windows/i.test(navigator.userAgent)}var wm=function(t,n){var r,A,i=t.data,o=t.encode,a=t.type,s=n.getMeta(),l=s.x,u=s.y,c=s.height,h=s.width,d=n.getStyle(e.CellType.DATA_CELL),f=d.cell,p=d.miniChart,g=[],v=lv.map(i,(function(e){return g.push(null==e?void 0:e[o.y]),{x:e[o.x],y:e[o.y]}})),y=lv.max(g)||0,C=lv.min(g)||0,B=y-C,m=f.padding,w=m.left,E=void 0===w?0:w,x=m.right,S=void 0===x?0:x,T=m.top,F=void 0===T?0:T,b=m.bottom,I=l+E,L=l+h-S,Q=u+F,U=u+c-(void 0===b?0:b),R=U-Q,M=null===(r=null==p?void 0:p.bar)||void 0===r?void 0:r.intervalPadding;A=a===e.MiniChartType.Bar?(L-I-(g.length-1)*M)/g.length+M:g.length>1?(L-I)/(g.length-1):0;var H=[];return{points:lv.map(v,(function(t,n){var r,i=I+n*A;if(r=0!==B?U-((null==t?void 0:t.y)-C)/B*R:C>0?Q:U,a===e.MiniChartType.Bar){var o=void 0,s=void 0;C<0&&y>0&&0!==B?(o=U-(0-C)/B*R,s=Math.abs(r-o),(null==t?void 0:t.y)<0&&(r=o)):(s=0===(B=lv.max([Math.abs(y),Math.abs(C)]))&&0===C&&0===y?0:0===B?R:Math.abs((null==t?void 0:t.y)-0)/B*R,r=C<0?Q:U-s);var l=A-M;H.push([l,s])}return[i,r]})),box:H}},Em=function(e){var t=e.data,n=e.encode,r=t.filter((function(e){var t=null==e?void 0:e[n.y];return"number"==typeof t&&!Number.isNaN(t)}));return rt(rt({},e),{data:r})},xm=function(t,n){if(!lv.isEmpty(null==t?void 0:t.data)&&!lv.isEmpty(n)){var r=Em(t);if(!lv.isEmpty(r.data)){var A=n.getStyle(e.CellType.DATA_CELL).miniChart,i=null==A?void 0:A.line,o=i.point,a=i.linkLine,s=wm(r,n).points;s.length>1&&am(n,{points:s,stroke:null==a?void 0:a.fill,lineWidth:null==a?void 0:a.size,opacity:null==a?void 0:a.opacity});for(var l=0;l<s.length;l++)sm(n,{cx:s[l][0],cy:s[l][1],r:o.size,fill:o.fill,fillOpacity:null==o?void 0:o.opacity})}}},Sm=function(t,n){if(!lv.isEmpty(null==t?void 0:t.data)&&!lv.isEmpty(n))for(var r=n.getStyle(e.CellType.DATA_CELL).miniChart.bar,A=wm(t,n),i=A.points,o=A.box,a=0;a<i.length;a++)im(n,{x:i[a][0],y:i[a][1],width:o[a][0],height:o[a][1],fill:r.fill,fillOpacity:r.opacity})},Tm=function(e,t,n){var r=Number(t)-Number(e);return Number.isNaN(r)||Number(e)<0?n.bad:r<=.1?n.good:r>.1&&r<=.2?n.satisfactory:n.bad},Fm=function(e,t){var n,r;void 0===t&&(t={min:0,max:0});var A=Number(e);if(Number.isNaN(A))return e;var i=null!==(n=null==t?void 0:t.min)&&void 0!==n?n:t,o=null!==(r=null==t?void 0:t.max)&&void 0!==r?r:t;return new Intl.NumberFormat("en-US",{minimumFractionDigits:i,maximumFractionDigits:o,useGrouping:!1,style:"percent"}).format(A)},bm=function(t){var n,r,A,i,o,a,s,l;if(!lv.isEmpty(t)){var u=t.getBBoxByType(e.CellClipBox.PADDING_BOX),c=u.x,h=u.y,d=u.height,f=u.width,p=t.findFieldCondition(null===(n=t.cellConditions)||void 0===n?void 0:n.interval);if(null==p?void 0:p.mapping){var g=t.mappingValue(p);if(!g)return;var v=t.getValueRange(),y=g.isCompare?g:v,C=tm(null!==(r=y.minValue)&&void 0!==r?r:v.minValue),B=tm(null!==(A=y.maxValue)&&void 0!==A?A:v.maxValue),m=lv.isNil(null==g?void 0:g.fieldValue)?tm(t.getMeta().fieldValue):tm(null==g?void 0:g.fieldValue);if(m<C||m>B)return;var w=t.getStyle(),E=null===(o=null===(i=null==w?void 0:w.miniChart)||void 0===i?void 0:i.interval)||void 0===o?void 0:o.height,x=null===(s=null===(a=null==w?void 0:w.miniChart)||void 0===a?void 0:a.interval)||void 0===s?void 0:s.fill,S=function(e,t){if(void 0===e&&(e=0),void 0===t&&(t=0),e=tm(e),t=tm(t),e===t)return function(){return{zeroScale:0,scale:0}};var n=e>=0,r=t>=0&&e<=0,A=r?0:n?e:t,i=t-e;return function(t){var o=n?0:1;return{zeroScale:r?lv.clamp(Math.abs(0-e)/i,0,1):o,scale:lv.clamp((t-A)/i,-1,1)}}}(C,B),T=S(m),F={x:c+f*T.zeroScale,y:h+d/2-E/2,width:f*T.scale,height:E,fill:null!==(l=g.fill)&&void 0!==l?l:x},b=t.getConditionIntervalShape();return b?(iB(b,F),b):im(t,F)}}},Im=function(t,n){var r=n.getStyle(e.CellType.DATA_CELL),A=n.getMeta(),i=A.x,o=A.y,a=A.height,s=A.width;if(lv.isEmpty(t))n.renderTextShape(rt(rt({},r.text),{x:i+s-r.cell.padding.right,y:o+a/2,text:""}));else{var l=r.miniChart.bullet,u=l.progressBar,c=l.comparativeMeasure,h=l.rangeColors,d=l.backgroundColor,f=t.measure,p=t.target,g=Math.max(Number(f),0),v=Math.max(Number(p),0),y=Fm(f,2),C=(null==u?void 0:u.widthPercent)>1?(null==u?void 0:u.widthPercent)/100:null==u?void 0:u.widthPercent,B=r.cell.padding,m=s-B.left-B.right,w=C*m,E=m-w,x=i+s-B.right-w,S=o+a/2-u.height/2;im(n,{x:x,y:S,width:w,height:u.height,fill:d});var T=Math.max(Math.min(w*g,w),0);im(n,{x:x,y:S+(u.height-u.innerHeight)/2,width:T,height:u.innerHeight,fill:Tm(g,v,h)});var F=x+w*v;um(n,{x1:F,y1:o+(a-c.height)/2,x2:F,y2:o+(a-c.height)/2+c.height,stroke:null==c?void 0:c.fill,lineWidth:c.width,opacity:null==c?void 0:c.opacity});var b=E-B.right;n.renderTextShape(rt(rt({},r.text),{x:x-B.right,y:o+a/2,text:y,wordWrapWidth:b}))}},Lm=function(t,n){switch(null==n?void 0:n.type){case e.MiniChartType.Line:xm(n,t);break;case e.MiniChartType.Bar:Sm(n,t);break;default:Im(n,t)}},Qm=function(e,t,n){void 0===e&&(e={}),void 0===n&&(n=0);var r=rt(rt({},Ky),e);r.colCount>=t&&(r.colCount=t);var A=t-r.colCount;r.trailingColCount>A&&(r.trailingColCount=A),r.rowCount>=n&&(r.rowCount=n);var i=n-r.rowCount;return r.trailingRowCount>i&&(r.trailingRowCount=i),r},Um=function(e,t){var n=t.seriesNumber,r=t.layoutSeriesNumberNodes;return(null==n?void 0:n.enable)&&r?rt(rt({},e),{rowCount:0,trailingRowCount:0}):e},Rm=function(e,t){var n=wB(e),r=null!=t?t:Nv,A=lv.isNumber(n)&&Number.isNaN(n),i=""===n||n===ly;return lv.isNil(n)||A||i?r:wB(n)},Mm=function(e){return e===ly?Nv:e},Hm=function(e){return lv.isNil(e)||""===e||0===Number(String(e).replace(/[^0-9.]+/g,""))},Om=function(e,t,n,r){var A=t.right;return e+(void 0===A?0:A)/2+(n||0)},km=function(e){var t,n=e.rowIndex,r=e.colIndex,A=e.meta,i=e.data,o=e.textStyle,a=e.textCondition,s=e.cell,l=null===(t=null==a?void 0:a.mapping)||void 0===t?void 0:t.call(a,i,{rowIndex:n,colIndex:r,meta:A},s);return rt(rt({},o),l)},Nm=function(e,t){return lv.isFunction(null==t?void 0:t.cell)?null==t?void 0:t.cell(e):null==t?void 0:t.cell},_m=function(e,t,n){for(var r,A,i,o=e.x,a=e.y,s=e.width,l=e.height/lv.size(t),u=[],c=0,h=lv.map(n,(function(e){return e>1?e/100:e})),d=0;d<lv.size(t);d++){A=a+l*d;var f=[];r=o,c=0;for(var p=0;p<lv.size(t[d]);p++)i=lv.isEmpty(h)?s/lv.size(t[0]):s*h[p],r=Om(o,{left:0,right:0},c),c+=i,f.push({x:r,y:A,width:i,height:l});u.push(f)}return u},Dm=function(t,n,r){var A,i,o,a,s,l,u,c,h,d;void 0===r&&(r=!0);var f=t.getBBoxByType(e.CellClipBox.CONTENT_BOX),p=f.x,g=f.y,v=f.height,y=f.width,C=t.getMeta(),B=n||C.fieldValue,m=B.values,w=C.spreadsheet.options,E=null===(i=null===(A=null==w?void 0:w.conditions)||void 0===A?void 0:A.text)||void 0===i?void 0:i[0],x=null===(a=null===(o=null==w?void 0:w.conditions)||void 0===o?void 0:o.icon)||void 0===a?void 0:a[0];if(lv.isArray(m)){var S=null===(u=null===(l=null===(s=w.style)||void 0===s?void 0:s.dataCell)||void 0===l?void 0:l.valuesCfg)||void 0===u?void 0:u.widthPercent,T=0;if(null==B?void 0:B.label){var F=t.getStyle(e.CellType.DATA_CELL).bolderText;T=v/(m.length+1),t.renderTextShape(rt(rt({},F),{x:p,y:g+T/2,text:B.label,maxLines:1,wordWrapWidth:y,wordWrap:!0,textOverflow:"ellipsis"}),{shallowRender:!0})}for(var b,I=function(t){var n,r,A=t.getMeta().isTotals,i=null===(r=(n=t).isMeasureField)||void 0===r?void 0:r.call(n),o=t.getStyle(t.cellType||e.CellType.DATA_CELL);return{cellStyle:o,textStyle:i?null==o?void 0:o.measureText:A?null==o?void 0:o.bolderText:null==o?void 0:o.text}}(t),L=I.cellStyle,Q=I.textStyle,U=null==L?void 0:L.icon,R=x&&x.mapping&&{name:"",size:null==U?void 0:U.size,margin:null==U?void 0:U.margin,position:nm(x)},M=_m({x:p,y:g+T,height:v-T,width:y},m,S),H=0;H<m.length;H++)for(var O=lv.clone(m[H]),k=0;k<O.length;k++){b=O[k];var N=r?km({rowIndex:H,colIndex:k,meta:C,data:b,textStyle:Q,textCondition:E,cell:t}):Q,_=M[H][k].width-(null==U?void 0:U.size)-("left"===(null==R?void 0:R.position)?null===(c=null==U?void 0:U.margin)||void 0===c?void 0:c.right:null===(h=null==U?void 0:U.margin)||void 0===h?void 0:h.left),D={left:[],right:[]};R&&D[R.position].push(R),t.renderTextShape(rt(rt({},N),{x:0,y:0,maxLines:1,text:b,wordWrapWidth:_}),{shallowRender:!0});var P=t.getActualTextWidth(),G=JB({bbox:M[H][k],textAlign:N.textAlign,textWidth:P,iconStyle:U,groupedIcons:D}),K=G.textX,z=G.leftIconX,V=G.rightIconX,W=jB(M[H][k],N.textBaseline);if(t.updateTextPosition({x:K,y:W}),x&&r){var X=null===(d=null==x?void 0:x.mapping)||void 0===d?void 0:d.call(x,b,{rowIndex:H,colIndex:k,meta:null==t?void 0:t.getMeta()},t),Y="left"===(null==R?void 0:R.position)?z:V,j=ZB(U.size,W,N.fontSize,N.textBaseline);if(X){var Z=hm(t,{x:Y,y:j,name:X.icon,width:null==U?void 0:U.size,height:null==U?void 0:U.size,fill:X.fill});t.addConditionIconShape(Z)}}}}else Lm(t,m)},Pm=function(e,t){return void 0===t&&(t=1),(null==e?void 0:e.width)*t},Gm=function(t){function n(e,n){for(var r=[],A=2;A<arguments.length;A++)r[A-2]=arguments[A];var i=t.call(this,{})||this;return i.textShapes=[],i.conditionIconShapes=[],i.stateShapes=new Map,i.borders=new Map,i.meta=e,i.spreadsheet=n,i.theme=n.theme,i.conditions=i.spreadsheet.options.conditions,i.groupedIcons={left:[],right:[]},i.handleRestOptions.apply(i,lt([],st(r),!1)),i.shouldInit()&&i.initCell(),i}return nt(n,t),Object.defineProperty(n.prototype,"actualText",{get:function(){return this.getMultiLineActualTexts().join("")},enumerable:!1,configurable:!0}),n.prototype.handleRestOptions=function(){},n.prototype.getResizedTextMaxLines=function(){},n.prototype.getMeta=function(){return this.meta},n.prototype.setMeta=function(e){this.meta=e},n.prototype.getIconStyle=function(){var e;return null===(e=this.theme[this.cellType])||void 0===e?void 0:e.icon},n.prototype.isShallowRender=function(){return!1},n.prototype.getCellTextWordWrapStyle=function(e){var t,n,r=(null===(n=null===(t=this.spreadsheet.options)||void 0===t?void 0:t.style)||void 0===n?void 0:n[e||this.cellType])||{};return{wordWrap:r.wordWrap,maxLines:r.maxLines,textOverflow:r.textOverflow}},n.prototype.getActualText=function(){return this.getMultiLineActualTexts().join("")},n.prototype.getActualTextWidth=function(){var e;return(null===(e=this.textShape)||void 0===e?void 0:e.getComputedTextLength())||0},n.prototype.getActualTextHeight=function(){return this.getMultiLineActualTextHeight()},n.prototype.getMultiLineActualTexts=function(){var e,t,n;return null===(e=this.textShape)||void 0===e||e.getGeometryBounds(),(null===(n=null===(t=this.textShape)||void 0===t?void 0:t.parsedStyle.metrics)||void 0===n?void 0:n.lines)||[]},n.prototype.getMultiLineActualTextWidth=function(){return lv.sumBy(this.getTextLineBoundingRects(),"width")||0},n.prototype.getMultiLineActualTextHeight=function(){return lv.sumBy(this.getTextLineBoundingRects(),"height")||0},n.prototype.getOriginalText=function(){return this.originalText},n.prototype.isTextOverflowing=function(){var e;return null===(e=this.textShape)||void 0===e?void 0:e.isOverflowing()},n.prototype.isMultiLineText=function(){var e=this.getTextShape().parsedStyle;return(null==e?void 0:e.maxLines)>1&&this.getTextLineBoundingRects().length>1},n.prototype.getTextLineBoundingRects=function(){var e;return(null===(e=this.textShape)||void 0===e?void 0:e.getLineBoundingRects())||[]},n.prototype.getTextLineHeight=function(){var e,t,n;return(null===(n=null===(t=null===(e=this.textShape)||void 0===e?void 0:e.parsedStyle)||void 0===t?void 0:t.metrics)||void 0===n?void 0:n.lineHeight)||16},n.prototype.getEmptyPlaceholder=function(){var e=this.spreadsheet.options.placeholder;return Nm(this,e)},n.prototype.getFieldValue=function(){return this.getFormattedFieldValue().formattedValue},n.prototype.shouldInit=function(){var e=this.meta,t=e.width,n=e.height;return t>0&&n>0},n.prototype.getStyle=function(e){return lv.get(this.theme,e||this.cellType)},n.prototype.getLinkFieldShape=function(){return this.linkFieldShape},n.prototype.getBackgroundShape=function(){return this.backgroundShape},n.prototype.getStateShapes=function(){return this.stateShapes},n.prototype.getResizeAreaStyle=function(){return this.getStyle("resizeArea")},n.prototype.shouldDrawResizeAreaByType=function(e,t){var n=this.spreadsheet.options.interaction.resize;return lv.isBoolean(n)?n:lv.isFunction(null==n?void 0:n.visible)?null==n?void 0:n.visible(t):null==n?void 0:n[e]},n.prototype.getBBoxByType=function(t){void 0===t&&(t=e.CellClipBox.BORDER_BOX);var n={x:this.meta.x,y:this.meta.y,height:this.meta.height,width:this.meta.width},r=this.getStyle()||this.theme.dataCell;return qB(n,this.getBorderPositions(),null==r?void 0:r.cell,t)},n.prototype.drawBorders=function(){var e=this;this.getBorderPositions().forEach((function(t){var n,r=$B(t,e.getBBoxByType(),null===(n=e.getStyle())||void 0===n?void 0:n.cell),A=r.position,i=r.style,o=rt(rt({},A),i);e.borders.has(t)?iB(e.borders.get(t),o):e.borders.set(t,um(e,o))}))},n.prototype.drawInteractiveBorderShape=function(){var t=rt(rt({},this.getBBoxByType(e.CellClipBox.PADDING_BOX)),{visibility:"hidden",pointerEvents:"none"}),n=this.stateShapes.get("interactiveBorderShape");n?iB(n,t):this.stateShapes.set("interactiveBorderShape",im(this,t))},n.prototype.drawInteractiveBgShape=function(){var e=rt(rt({},this.getBBoxByType()),{visibility:"hidden",pointerEvents:"none"}),t=this.stateShapes.get("interactiveBgShape");t?iB(t,e):this.stateShapes.set("interactiveBgShape",im(this,e))},n.prototype.drawBackgroundShape=function(){var e=this.getBackgroundColor(),t=e.backgroundColor,n=e.backgroundColorOpacity,r=rt(rt({},this.getBBoxByType()),{fill:t,fillOpacity:n});this.backgroundShape?iB(this.backgroundShape,r):this.backgroundShape=im(this,r)},n.prototype.renderTextShape=function(e,t){var n=Rm(e.text,this.getEmptyPlaceholder()),r=(null==t?void 0:t.shallowRender)||this.isShallowRender();return this.textShape&&!r?iB(this.textShape,rt(rt({},e),{text:"".concat(n)})):this.textShape=lm({group:this,textShape:r?void 0:this.textShape,style:rt(rt({},e),{text:"".concat(n)})}),this.addTextShape(this.textShape),r||(this.originalText=n),this.textShape},n.prototype.updateTextPosition=function(e){var t,n,r,A,i=this.getTextPosition();null===(t=this.textShape)||void 0===t||t.attr("x",null!==(n=null==e?void 0:e.x)&&void 0!==n?n:null==i?void 0:i.x),null===(r=this.textShape)||void 0===r||r.attr("y",null!==(A=null==e?void 0:e.y)&&void 0!==A?A:null==i?void 0:i.y)},n.prototype.drawTextOrCustomRenderer=function(){var e=this,t=this.getRenderer();t?KB.render(t,this).then((function(){e.afterDrawText()})):(this.drawTextShape(),this.afterDrawText())},n.prototype.drawTextShape=function(){var e=Math.max(this.getMaxTextWidth(),0)+1,t=this.getTextStyle(),n=this.getResizedTextMaxLines()||(null==t?void 0:t.maxLines),r=this.getFieldValue();this.renderTextShape(rt(rt({},t),{x:0,y:0,text:r,wordWrapWidth:e,maxLines:n})),this.isShallowRender()||(this.updateTextPosition(),this.drawLinkField(this.meta))},n.prototype.drawLinkFieldShape=function(e,t){if(e){if(!Bm(this.spreadsheet.options.device)){var n=this.getTextStyle(),r=this.getTextPosition(),A=this.getActualTextWidth(),i=r.x;"center"===n.textAlign?i-=A/2:"right"===n.textAlign&&(i-=A);var o=this.textShape.getBBox().bottom,a={x1:i,y1:o+1,x2:i+A,y2:o+1,stroke:t,lineWidth:1};this.linkFieldShape?iB(this.linkFieldShape,a):this.linkFieldShape=um(this,a)}this.textShape.style.fill=t,this.textShape.style.cursor="pointer",this.textShape.appendInfo={isLinkFieldText:!0,meta:this.meta}}},n.prototype.getLinkFieldStyle=function(){return this.getTextStyle().linkTextFill},n.prototype.drawLinkField=function(e){var t=this.spreadsheet.options.interaction.linkFields,n=void 0===t?[]:t,r=this.getLinkFieldStyle(),A=gm(n,e);this.drawLinkFieldShape(A,r)},n.prototype.updateByState=function(e,t){var n=this;this.spreadsheet.interaction.setInteractedCells(t);var r=lv.get(this.theme,"".concat(this.cellType,".cell.interactionState.").concat(e));lv.each(r,(function(e,t){lv.keys(lv.pickBy(Ey,(function(e){return lv.includes(e,t)}))).forEach((function(r){var A=n.stateShapes.has(r),i=A?n.stateShapes.get(r):n[r],o=lv.isArray(i)?i:[i];if(A&&o.forEach((function(e){e.setAttribute("visibility","visible")})),"interactiveBorderShape"===r&&"borderWidth"===t&&lv.isNumber(e)){var a=n.getInteractiveBorderShapeStyle(e);lv.each(a,(function(e,t){cm(o,t,e)}))}cm(o,wy[t],e)}))}))},n.prototype.getInteractiveBorderShapeStyle=function(t){var n=this.getBBoxByType(e.CellClipBox.PADDING_BOX),r=n.x,A=n.y,i=n.height,o=t/2;return{x:r+o,y:A+o,width:n.width-t,height:i-t}},n.prototype.hideInteractionShape=function(){this.stateShapes.forEach((function(e){cm(e,wy.backgroundOpacity,0),cm(e,wy.backgroundColor,"transparent"),cm(e,wy.borderOpacity,0),cm(e,wy.borderWidth,1),cm(e,wy.borderColor,"transparent")}))},n.prototype.clearUnselectedState=function(){cm(this.backgroundShape,wy.backgroundOpacity,1),cm(this.textShapes,wy.textOpacity,1),cm(this.linkFieldShape,wy.opacity,1)},n.prototype.getTextShape=function(){return this.textShape},n.prototype.getTextShapes=function(){return this.textShapes||[this.textShape]},n.prototype.addTextShape=function(e){e&&this.textShapes.push(e)},n.prototype.getConditionIconShape=function(){return this.conditionIconShape},n.prototype.getConditionIconShapes=function(){return this.conditionIconShapes||[this.conditionIconShape]},n.prototype.addConditionIconShape=function(e){e&&this.conditionIconShapes.push(e)},n.prototype.resetTextAndConditionIconShapes=function(){this.textShapes=[],this.conditionIconShapes=[]},Object.defineProperty(n.prototype,"cellConditions",{get:function(){return this.conditions},enumerable:!1,configurable:!0}),n.prototype.drawConditionIconShapes=function(){var e,t=this.getIconConditionResult();if(t){var n=this.getIconPosition(),r=this.getStyle().icon.size,A=rt(rt({},n),{name:null==t?void 0:t.name,width:r,height:r,fill:null==t?void 0:t.fill,iconStrategy:null===(e=this.spreadsheet.options.csp)||void 0===e?void 0:e.iconStrategy});this.conditionIconShape?this.conditionIconShape.reRender(A):this.conditionIconShape=hm(this,A),this.addConditionIconShape(this.conditionIconShape)}},n.prototype.getTextConditionMappingResult=function(){var e,t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.text);return(null==t?void 0:t.mapping)?this.mappingValue(t):null},n.prototype.getContainConditionMappingResultTextStyle=function(e){var t=this.getDefaultTextFill(e.fill),n=this.getTextConditionMappingResult();return rt(rt(rt({},e),n),{fill:(null==n?void 0:n.fill)||t})},n.prototype.getDefaultTextFill=function(e){var t=this.getBackgroundColor(),n=t.backgroundColor,r=t.intelligentReverseTextColor;return!FC(n)||e!==Vv&&bC(n,e)||!r||(e=Wv),e||""},n.prototype.getBackgroundConditionFill=function(){var e,t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.background);if(null==t?void 0:t.mapping){var n=this.mappingValue(t);if(n)return{backgroundColor:n.fill,backgroundColorOpacity:1,intelligentReverseTextColor:n.intelligentReverseTextColor||!1}}return{intelligentReverseTextColor:!1}},n.prototype.getIconConditionResult=function(){var e,t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.icon);if(null==t?void 0:t.mapping){var n=this.mappingValue(t);if(n&&n.icon)return{name:n.icon,position:nm(t),fill:n.fill,isConditionIcon:!0}}},n.prototype.getActionAndConditionIconWidth=function(e){var t=this.groupedIcons,n=t.left,r=t.right,A=this.getStyle().icon;return e?WB(this.groupedIcons[e],A):WB(n,A)+WB(r,A)},n.prototype.getCrossBackgroundColor=function(e){var t=this.getStyle().cell,n=t.crossBackgroundColor,r=t.backgroundColorOpacity;return n&&e%2==0?{backgroundColorOpacity:r,backgroundColor:n}:{backgroundColorOpacity:r,backgroundColor:this.getStyle().cell.backgroundColor}},n.prototype.getMaxLinesByCustomHeight=function(e){var t,n=e.targetCell,r=void 0===n?this:n,A=e.displayHeight,i=void 0===A?this.meta.height:A,o=e.isCustomHeight,a=void 0!==o&&o,s=r||this,l=null===(t=this.spreadsheet.options.style)||void 0===t?void 0:t[s.cellType];if((null==l?void 0:l.maxLines)>1&&(null==l?void 0:l.wordWrap)&&a){var u=(null==s?void 0:s.getStyle()).cell,c=u.padding.top+u.padding.bottom,h=null==s?void 0:s.getTextLineHeight();return Math.max(1,Math.round((i-c)/h))}},n.prototype.getRenderer=function(){var e,t,n=this;return null===(t=null===(e=this.spreadsheet.dataCfg.meta)||void 0===e?void 0:e.find((function(e){return e.field===n.getMetaField()})))||void 0===t?void 0:t.renderer},n.prototype.getConditionIntervalShape=function(){return this.conditionIntervalShape},n}(ds);function Km(e,t){return void 0===t&&(t=2),lv.floor(e,t)}function zm(e){return lv.isNumber(e)?Km(e,0):e}var Vm,Wm=function(e,t){return t>0&&e<t},Xm=function(e,t,n){return t>0&&e>=n-t},Ym=function(e,t,n){return n>0&&e<t+n},jm=function(e,t,n){return n>0&&e>=t+1-n},Zm=function(e){var t=e.scrollX,n=e.scrollY,r=e.widths,A=e.heights,i=e.viewport,o=e.rowRemainWidth,a=lv.findIndex(r,(function(e,n){var A=t-(lv.isNil(o)?0:o)+i.x;return A>=e&&A<r[n+1]}),0);a=Math.max(a,0);var s=lv.findIndex(r,(function(e,n){var A=i.width+t+i.x;return A>=e&&A<r[n+1]}),a);s=Math.min(-1===s?1/0:s,r.length-2);var l=A.getIndexRange(n+i.y,i.height+n+i.y);return[a,s,l.start,l.end]},Jm=function(e,t,n){var r=Math.abs(e/t),A=r>2?0:t;return[(r<=.5?0:e)*n.horizontal,A*n.vertical]},qm=function(e,t,n){if(e){var r=st(e.getPosition(),2),A=r[0],i=r[1];e.translate(t-A,n-i)}},$m=function(t,n,r,A){var i=n.colCount,o=void 0===i?0:i,a=n.rowCount,s=void 0===a?0:a,l=n.trailingColCount,u=void 0===l?0:l,c=n.trailingRowCount,h=void 0===c?0:c,d=t.colIndex,f=t.rowIndex;return Ym(f,A.start,s)?e.FrozenGroupType.Row:jm(f,A.end,h)?e.FrozenGroupType.TrailingRow:Wm(d,o)?e.FrozenGroupType.Col:Xm(d,u,r)?e.FrozenGroupType.TrailingCol:e.FrozenGroupType.Scroll},ew=function(t,n,r){for(var A,i=t.colCount,o=void 0===i?0:i,a=t.rowCount,s=void 0===a?0:a,l=t.trailingColCount,u=void 0===l?0:l,c=t.trailingRowCount,h=void 0===c?0:c,d=((A={})[e.FrozenGroupType.TopLeft]=[],A[e.FrozenGroupType.TopRight]=[],A[e.FrozenGroupType.BottomLeft]=[],A[e.FrozenGroupType.BottomRight]=[],A),f=0;f<o;f++){for(var p=r.start;p<r.start+s;p++)d[e.FrozenGroupType.TopLeft].push({x:f,y:p});if(h>0)for(p=0;p<h;p++){var g=r.end-p;d[e.FrozenGroupType.BottomLeft].push({x:f,y:g})}}for(f=0;f<u;f++){var v=n-1-f;for(p=r.start;p<r.start+s;p++)d[e.FrozenGroupType.TopRight].push({x:v,y:p});if(h>0)for(p=0;p<h;p++){g=r.end-p;d[e.FrozenGroupType.BottomRight].push({x:v,y:g})}}return d},tw=function(e,t,n,r){var A=t.colCount,i=void 0===A?0:A,o=t.rowCount,a=void 0===o?0:o,s=t.trailingColCount,l=void 0===s?0:s,u=t.trailingRowCount,c=void 0===u?0:u,h=lt([],st(e),!1);Wm(h[0],i)&&(h[0]=i),Xm(h[1],l,n)&&(h[1]=n-l-1),Ym(h[2],r.start,a)&&(h[2]=r.start+a),jm(h[3],r.end,c)&&(h[3]=r.end-c);var d=lt([],st(h),!1);d[2]=r.start,d[3]=r.start+a-1;var f=lt([],st(h),!1);f[0]=0,f[1]=i-1;var p=lt([],st(h),!1);p[2]=r.end+1-c,p[3]=r.end;var g=lt([],st(h),!1);return g[0]=n-l,g[1]=n-1,{center:h,frozenRow:d,frozenCol:f,frozenTrailingCol:g,frozenTrailingRow:p}},nw=function(e,t){var n=e,r=0,A=n.getTotalLength()-1;if(t){var i=t.current,o=void 0===i?1:i,a=t.pageSize;r=Math.max((o-1)*a,0),A=Math.min(o*a-1,n.getTotalLength()-1)}return{start:r,end:A}},rw=function(e){var t=[],n=function(e){e.forEach((function(e){"string"!=typeof e&&e.children?n(e.children):t.push(e)}))};return n(e),t},Aw=function(e){return void 0===e&&(e=[]),rw(e).map((function(e){return"string"==typeof e?e:e.field}))},iw=function(e){var t=e.children[0];return t?t.isLeaf?t:iw(t):e},ow=function(e){return lv.isEmpty(e.rows)&&lv.isEmpty(e.columns)&&lv.isEmpty(e.values)},aw=function(e){function t(t){var n=e.call(this)||this;return n.cfg=t,n.render(),n}return nt(t,e),t.prototype.layout=function(){this.addCornerBottomBorder(),this.addCornerRightBorder(),this.addSplitLineShadow()},t.prototype.render=function(){this.removeChildren(),this.layout()},t.getHorizontalBorderWidth=function(e){var t;return(null===(t=e.theme)||void 0===t?void 0:t.splitLine).horizontalBorderWidth},t.getVerticalBorderWidth=function(e){var t,n=e.theme,r=n.splitLine,A=n.cornerCell,i=n.colCell,o=n.dataCell;return e.isPivotMode()?null==r?void 0:r.verticalBorderWidth:Math.max(o.cell.verticalBorderWidth,(null===(t=e.options.seriesNumber)||void 0===t?void 0:t.enable)?A.cell.verticalBorderWidth:i.cell.verticalBorderWidth)},t.prototype.onBorderScroll=function(e){if(e!==this.cfg.scrollX){this.cfg.scrollX=e;var t=this.cfg.position;qm(this,t.x-e,0),this.render()}},t.prototype.onChangeShadowVisibility=function(e,t){var n=this.cfg.spreadsheet.facet.getFrozenOptions(),r=0===n.colCount&&e>0,A=0===n.trailingColCount&&Km(e)<Km(t);this.cfg.showViewportLeftShadow===r&&this.cfg.showViewportRightShadow===A||(this.cfg.showViewportLeftShadow=r,this.cfg.showViewportRightShadow=A,this.render())},t.prototype.getCornerRightBorderSizeForPivotMode=function(){var e,t=this.cfg,n=t.cornerHeight,r=t.viewportHeight,A=t.position,i=(null===(e=t.spreadsheet.theme)||void 0===e?void 0:e.splitLine).horizontalBorderWidth;return{y:A.y,height:n+i+r}},t.prototype.addCornerRightHeadBorder=function(){var e,n,r=this,A=this.cfg,i=A.cornerWidth,o=A.cornerHeight,a=A.position,s=A.spreadsheet,l=null===(e=s.theme)||void 0===e?void 0:e.splitLine,u=l.verticalBorderColor,c=l.verticalBorderColorOpacity,h=t.getVerticalBorderWidth(s),d=t.getHorizontalBorderWidth(s),f=a.x+i+h/2,p=(null===(n=s.options.seriesNumber)||void 0===n?void 0:n.enable)||s.isPivotMode()?s.theme.cornerCell.cell:s.theme.colCell.cell,g=p.verticalBorderColor,v=p.verticalBorderColorOpacity;[{stroke:p.backgroundColor,strokeOpacity:p.backgroundColorOpacity},{stroke:u||g,strokeOpacity:c||v}].forEach((function(e){var t=e.stroke,n=e.strokeOpacity;um(r,{x1:f,y1:a.y,x2:f,y2:a.y+o+d,lineWidth:h,stroke:t,strokeOpacity:n})}))},t.prototype.addCornerRightBorder=function(){var e,n=this,r=this.cfg,A=r.cornerWidth,i=r.cornerHeight,o=r.viewportHeight,a=r.position,s=r.spreadsheet,l=null===(e=s.theme)||void 0===e?void 0:e.splitLine,u=l.verticalBorderColor,c=l.verticalBorderColorOpacity,h=t.getVerticalBorderWidth(s),d=t.getHorizontalBorderWidth(s),f=a.x+A+h/2;this.addCornerRightHeadBorder();var p=s.theme.dataCell.cell,g=p.verticalBorderColor,v=p.verticalBorderColorOpacity;[{stroke:p.backgroundColor,strokeOpacity:p.backgroundColorOpacity},{stroke:u||g,strokeOpacity:c||v}].forEach((function(e){var t=e.stroke,r=e.strokeOpacity;um(n,{x1:f,y1:a.y+i+d,x2:f,y2:a.y+i+d+o,lineWidth:h,stroke:t,strokeOpacity:r})}))},t.prototype.addCornerBottomBorder=function(){var e,n,r=this.cfg,A=r.cornerWidth,i=r.cornerHeight,o=r.viewportWidth,a=r.position,s=r.scrollX,l=void 0===s?0:s,u=r.spreadsheet,c=null===(e=u.theme)||void 0===e?void 0:e.splitLine,h=c.horizontalBorderColor,d=c.horizontalBorderWidth,f=c.horizontalBorderColorOpacity,p=(null===(n=u.options.seriesNumber)||void 0===n?void 0:n.enable)||u.isPivotMode()?u.theme.cornerCell.cell:u.theme.colCell.cell,g=p.horizontalBorderColor,v=p.horizontalBorderColorOpacity,y=a.x,C=y+A+t.getVerticalBorderWidth(u)+o+(u.isFrozenRowHeader()?0:l),B=a.y+i+d/2;this.cornerBottomBorder=um(this,{x1:y,y1:B,x2:C,y2:B,stroke:h||g,lineWidth:d,opacity:f||v})},t.prototype.addSplitLineShadow=function(){var e,t=this.cfg.spreadsheet,n=null===(e=t.theme)||void 0===e?void 0:e.splitLine;t.isPivotMode()&&(null==n?void 0:n.showShadow)&&t.isFrozenRowHeader()&&(this.addSplitLineLeftShadow(),this.addSplitLineRightShadow())},t.prototype.addSplitLineLeftShadow=function(){var e;if(this.cfg.showViewportLeftShadow){var n=this.cfg,r=n.cornerWidth,A=n.cornerHeight,i=n.viewportHeight,o=n.position,a=n.spreadsheet,s=null===(e=a.theme)||void 0===e?void 0:e.splitLine,l=s.shadowColors,u=s.shadowWidth,c=s.horizontalBorderWidth,h=o.x+r+t.getVerticalBorderWidth(a),d=o.y;this.appendChild(new Ss({style:{x:h,y:d,width:u,height:A+c+i,fill:"l (0) 0:".concat(null==l?void 0:l.left," 1:").concat(null==l?void 0:l.right)}}))}},t.prototype.addSplitLineRightShadow=function(){var e;if(this.cfg.showViewportRightShadow){var n=this.cfg,r=n.cornerWidth,A=n.viewportWidth,i=n.position,o=n.spreadsheet,a=null===(e=o.theme)||void 0===e?void 0:e.splitLine,s=a.shadowColors,l=a.shadowWidth,u=i.x+r+t.getVerticalBorderWidth(o)+A-l,c=this.getCornerRightBorderSizeForPivotMode(),h=c.y,d=c.height;this.appendChild(new Ss({style:{x:u,y:h,width:l,height:d,fill:"l (0) 0:".concat(null==s?void 0:s.right," 1:").concat(null==s?void 0:s.left)}}))}},t}(ds);!function(e){e[e.Start=0]="Start",e[e.Center=1]="Center",e[e.End=2]="End"}(Vm||(Vm={}));var sw=function(e){return["left","top"].includes(e)?Vm.Start:["center","middle"].includes(e)?Vm.Center:Vm.End},lw=function(e,t,n,r){var A=(r||{}).isCustomRenderer,i=void 0!==A&&A,o=n.align,a=n.size,s=n.padding,l=a.textSize,u=a.iconStartSize,c=void 0===u?0:u,h=a.iconEndSize,d=void 0===h?0:h,f=s.betweenTextAndEndIcon,p=void 0===f?0:f;p=d?p:0;var g=l+c+d,v=t.start-s.start,y=v+(t.size+s.start+s.end),C=t.start+t.size,B=e.start+e.size;function m(e){switch(o){case Vm.Start:return{iconStart:e.start,textStart:e.start+c,iconEnd:e.start+c+l+p};case Vm.Center:var t=e.start+e.size/2-g/2;return{iconStart:t,textStart:t+c+(i?0:l/2),iconEnd:t+c+l+p};default:var n=e.start+e.size;return{iconStart:n-d-l-c,textStart:n-d-(i?l:0),iconEnd:n-d+p}}}if(v>=e.start&&y<=B)return m(t);if(v<e.start&&y<=B){var w={start:e.start+(o!==Vm.End?s.start:0),size:t.size-(e.start-t.start)-(o!==Vm.End?s.start:0)};return w.size<g&&(w.size=g,w.start=C-g),m(w)}if(v>=e.start&&y>B){var E={start:t.start,size:t.size-(C-B)-(o!==Vm.Start?s.end:0)};return E.size<g&&(E.size=g,E.start=t.start),m(E)}var x={start:e.start+s.start,size:e.size-s.start-s.end};if(x.size<g){var S=t.start+t.size/2-g/2,T=S+g;S>x.start||(T>x.start+x.size?x.start=S:x.start-=g-x.size),x.size=g}return m(x)},uw=function(e){return e.includes(My)?"id":"field"},cw=function(e,t){void 0===t&&(t=[]);var n=e.facet.getInitColIndexLeafNodes();return lv.compact(t.map((function(e){var t=uw(e);return n.find((function(n){return n[t]===e}))})))},hw=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return it(void 0,lt([t],st(n),!1),void 0,(function(t,n,r){var A,i,o,a,s,l,u,c,h,d;return void 0===n&&(n=[]),void 0===r&&(r=!1),ot(this,(function(f){switch(f.label){case 0:return A=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return it(void 0,lt([],st(e),!1),void 0,(function(e,n){return void 0===e&&(e=[]),void 0===n&&(n=[]),ot(this,(function(r){switch(r.label){case 0:return t.setOptions({interaction:{hiddenColumnFields:e}}),t.interaction.reset(),t.store.set("hiddenColumnsDetail",n),[4,t.render({reloadData:!1,rebuildHiddenColumnsDetail:!1})];case 1:return r.sent(),[2]}}))}))},lv.isEmpty(n)&&r?[4,A()]:[3,2];case 1:case 3:return f.sent(),[2];case 2:return i=t.store.get("hiddenColumnsDetail",[]),o=t.options.interaction.hiddenColumnFields,a=void 0===o?[]:o,lv.isEqual(n,a)&&!r?[2]:(s=lv.uniq(lt(lt([],st(n),!1),st(a),!1)),l=cw(t,s).every((function(e,t,n){var r=n[t+1];return!r||1===Math.abs(e.colIndex-r.colIndex)})),u=function(e,t){if(void 0===t&&(t=[]),lv.isEmpty(t))return{prev:null,next:null};var n=e.facet.getInitColIndexLeafNodes(),r=cw(e,t).map((function(e){return n.findIndex((function(t){return t.id===e.id}))})),A=Math.max.apply(Math,lt([],st(r),!1)),i=Math.min.apply(Math,lt([],st(r),!1)),o=n.find((function(e,t){return t===A+1}));return{prev:n.find((function(e,t){return t===i-1}))||null,next:o||null}}(t,l?s:n),c={hideColumnNodes:cw(t,n),displaySiblingNode:u},h=function(e,t){return t.findIndex((function(t){return e.hideColumnNodes.some((function(e){var n;return null===(n=t.hideColumnNodes)||void 0===n?void 0:n.find((function(t){return t.id===e.id}))}))}))}(c,i),d=[],d=-1!==h?i.map((function(e,t){return t===h?c:e})):lt(lt([],st(i),!1),[c],!1),t.emit(e.S2Event.COL_CELL_HIDDEN,c,d),[4,A(s,d)])}}))}))},dw=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return it(void 0,lt([e],st(t),!1),void 0,(function(e,t,n){var r,A,i;return void 0===t&&(t=[]),void 0===n&&(n=!1),ot(this,(function(o){switch(o.label){case 0:return lv.isEmpty(t)&&n?[4,hw(e,t,!0)]:[3,2];case 1:o.sent(),o.label=2;case 2:return r=function(e){var t=e.dataCfg.fields.columns,n=void 0===t?[]:t;return e.isTableMode()&&!e.isCustomColumnFields()?n:e.facet.getInitColIndexLeafNodes().map((function(e){return e.id}))}(e),A=Aw(r),i=function(e,t){if(lv.isEmpty(t))return[];var n=Number.NEGATIVE_INFINITY;return e.reduce((function(e,r,A){if(!t.includes(r))return e;if(A===n+1){var i=lv.last(e);null==i||i.push(r)}else{var o=[r];e.push(o)}return n=A,e}),[])}(A,t),[4,Promise.all(i.map((function(t){return it(void 0,void 0,void 0,(function(){return ot(this,(function(r){switch(r.label){case 0:return[4,hw(e,t,n)];case 1:return r.sent(),[2]}}))}))})))];case 3:return o.sent(),[2]}}))}))},fw=function(e,t,n){return function(e,t){var n=function(e,t){return t?null==e?void 0:e[t]:(null==e?void 0:e.next)||(null==e?void 0:e.prev)}(e,t);return null==n?void 0:n.id}(e,n)===t},pw=function(e,t,n){for(var r,A=[],i=(null===(r=e.options.interaction)||void 0===r?void 0:r.hiddenColumnFields)||[],o=cw(e,i),a=new Map(o.map((function(e){return[e.id,e]}))),s=e.facet.getInitColIndexLeafNodes(),l="prev"===n?1:-1,u=s.findIndex((function(e){return e.id===t}))+l;u<s.length;u+=l){var c=s[u];if(!c)break;if(!a.has(null==c?void 0:c.id))break;A.push(c)}return lv.sortBy(A,"colIndex")},gw=function(t){var n=t.type,r=t.theme,A=t.width,i=t.height,o=At(t,["type","theme","width","height"]),a=n===e.ResizeDirectionType.Horizontal?r.size:void 0,s=n===e.ResizeDirectionType.Vertical?r.size:void 0;return{style:{fill:r.background,fillOpacity:r.backgroundOpacity,cursor:"".concat(n,"-resize"),width:a,height:s},appendInfo:rt(rt({},o),{isResizeArea:!0,type:n,width:A,height:i,size:r.size})}},vw=function(e,t){var n;if(null===(n=e.facet)||void 0===n?void 0:n.foregroundGroup)return e.facet.foregroundGroup.getElementById(t)||e.facet.foregroundGroup.appendChild(new ds({id:t,style:{zIndex:5}}))},yw=function(e,t,n){var r=null!=n?n:{},A=r.scrollX,i=void 0===A?0:A,o=r.scrollY,a=void 0===o?0:o,s=!(e.x-i>t.x+t.width||e.x+e.width-i<t.x),l=!(e.y-a>t.y+t.height||e.y+e.height-a<t.y);return s&&l},Cw=function(e,t){var n=t.getMeta().id;return e.some((function(e){return lv.isEqual(e.id,n)}))},Bw=function(e,t){return"".concat(e).concat(Hy).concat(t)},mw=function(e){var t=e.interaction.getSelectedCellHighlight(),n=t.currentRow,r=t.currentCol,A=t.rowHeader,i=t.colHeader;return n||r||A||i},ww=function(t){return t.type===e.CellType.DATA_CELL},Ew=function(t,n){lv.forEach(t,(function(t){ww(t)&&t.rowIndex===n.getMeta().rowIndex&&n.updateByState(e.InteractionStateName.SELECTED)}))},xw=function(t,n){lv.forEach(t,(function(t){ww(t)&&t.colIndex===n.getMeta().colIndex&&n.updateByState(e.InteractionStateName.SELECTED)}))},Sw=function(t,n){lv.forEach(t,(function(t){ww(t)&&t.rowIndex===n.getMeta().rowIndex&&t.colIndex===n.getMeta().colIndex&&n.updateByState(e.InteractionStateName.SELECTED)}))},Tw=function(t,n,r){var A,i=r.interaction.getSelectedCellHighlight(),o=i.rowHeader,a=i.colHeader,s=i.currentRow,l=i.currentCol,u=n.cellType===e.CellType.ROW_CELL,c=r.isTableMode()&&(null===(A=r.options.seriesNumber)||void 0===A?void 0:A.enable)&&o&&u;(s||c)&&Ew(t,n),l&&xw(t,n),(o||a)&&Sw(t,n)};function Fw(e){return void 0===e&&(e=[]),e.filter((function(e){return e!==ry}))}function bw(e){return e===ay}function Iw(e,t,n){return void 0===e&&(e={}),void 0===t&&(t=[]),void 0===n&&(n=oy),t.reduce((function(t,r){var A=e[r];return r in e?t.push(mB(A)):t.push(n),t}),[])}function Lw(e,t){var n=t.filter((function(t){return t in e}));return lv.isEmpty(n)&&n.push(uy),n}function Qw(e,t,n){void 0===e&&(e={}),void 0===t&&(t=[]);var r=[];function A(e,t,n){return t.reduce((function(t,r){var A=e[r];return r in e?t.push(mB(A)):r===ry&&n?t.push(n):t.push(oy),t}),[])}return n?n.forEach((function(n){r.push(A(e,t,n))})):r.push(A(e,t)),r}function Uw(e,t,n){var r;void 0===t&&(t=[]);var A=t.slice(0,t.indexOf(e)+1);return null===(r=n.map((function(e){return A.map((function(t){return e.getValueByField(t)})).join("".concat(My))})))||void 0===r?void 0:r.filter(Boolean)}function Rw(e,t){return e.concat(t).filter((function(e){return e!==ry})).join(My)}function Mw(e){var t=e.rowDimensionValues,n=e.colDimensionValues,r=e.isFirstCreate,A=e.onFirstCreate,i=e.rowFields,o=e.colFields,a=e.rowPivotMeta,s=e.colPivotMeta,l=e.prefix,u=void 0===l?"":l,c=function(e,t,n,i){for(var o=n,a=[],s=0;s<t.length;s++){var l=t[s];if(r&&o&&!(null==o?void 0:o.has(l))){var u=t.slice(0,s+1).map((function(e){return mB(e)})),c=u.join(My),h=void 0;h=l===oy?0:o.has(oy)?o.size:o.size+1,o.set(l,{id:c,dimensions:u,value:l,level:h,children:new Map}),null==A||A({dimension:null==e?void 0:e[s],dimensionPath:c,careRepeated:i})}var d=null==o?void 0:o.get(l);if(a.push(bw(l)?l:null==d?void 0:d.level),d){var f=null==e?void 0:e[s+1];r&&d.childField!==f&&(d.childField=f),o=null==d?void 0:d.children}}return a},h=c(i,t,a,!1),d=c(o,n,s,!0);return lt(lt([u],st(h),!1),st(d),!1)}function Hw(e){return void 0===e&&(e=[]),e.filter(lv.isString)}function Ow(e){var t=e.rows,n=void 0===t?[]:t,r=e.columns,A=void 0===r?[]:r,i=e.values,o=e.valueInCols,a=e.data,s=void 0===a?[]:a,l=e.indexesData,u=void 0===l?{}:l,c=e.sortedDimensionValues,h=e.rowPivotMeta,d=e.colPivotMeta,f=e.getExistValuesByDataItem,p=[],g=new Set(lv.intersection(n,A)),v=function(e){var t=e.dimension,n=e.dimensionPath,r=e.careRepeated;(void 0===r||r)&&g.has(t)||(c[t]||(c[t]=[])).push(n)},y=Rw(n,A);return s.forEach((function(e){var t,r,a,s;if(e&&!lv.isEmpty(e)){var l=f?f(e,i):Lw(e,i),c=Qw(e,n,o?null:l),g=Qw(e,A,o?l:null);try{for(var C=at(c),B=C.next();!B.done;B=C.next()){var m=B.value;try{for(var w=(a=void 0,at(g)),E=w.next();!E.done;E=w.next()){var x=Mw({rowDimensionValues:m,colDimensionValues:E.value,rowPivotMeta:h,colPivotMeta:d,rowFields:n,colFields:A,isFirstCreate:!0,onFirstCreate:v,prefix:y});p.push(x),lv.set(u,x,e)}}catch(e){a={error:e}}finally{try{E&&!E.done&&(s=w.return)&&s.call(w)}finally{if(a)throw a.error}}}}catch(e){t={error:e}}finally{try{B&&!B.done&&(r=C.return)&&r.call(C)}finally{if(t)throw t.error}}}})),{paths:p,indexesData:u,rowPivotMeta:h,colPivotMeta:d,sortedDimensionValues:c}}function kw(e,t){if(e&&t){var n=t.split(My),r=lv.last(n),A=e;lv.forEach(n,(function(e,t){var n=A.get(e);return n?(e===r?(n.children=new Map,n.childField=void 0):A=n.children,!0):0===t&&e===Ry}))}}function Nw(e,t,n){var r={field:ry,name:t||n,formatter:function(t){return function(t){var n=lv.find(e,(function(e){return e.field===t}));return lv.get(n,"name",t)}(t)}};return r}function _w(e,t){return{isRowGrandTotal:e.isGrandTotals,isRowSubTotal:e.isSubTotals,isColGrandTotal:t.isGrandTotals,isColSubTotal:t.isSubTotals}}function Dw(e){for(var t=null,n=0;n<e.length;n++){if(bw(e[n]))t=n;else if(!lv.isNull(t)&&t<n)return!0}return!1}function Pw(t){var n=t.pivotMeta,r=t.dimensionValues,A=t.fieldIdx,i=t.queryType,o=t.fields,a=t.sortedDimensionValues,s=[{children:n}];for(var l=function(t){var n=r[t],A=o[t];s=bw(n)?function(t,n){var r,A=lv.flatMap(t,(function(t){var n,r,A=[];try{for(var o=at(t.children.values()),a=o.next();!a.done;a=o.next()){var s=a.value;s.value===uy||i!==e.QueryDataType.All&&s.value===oy||A.push(s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return A}));if(t.length>1){var o=null!==(r=a[n])&&void 0!==r?r:[],s=new Map(o.map((function(e,t){return[e,t]})));return A.sort((function(e,t){var n,r;return(null!==(n=s.get(e.id))&&void 0!==n?n:0)-(null!==(r=s.get(t.id))&&void 0!==r?r:0)})),A}return A}(s,A):s.map((function(e){return e.children.get(n)})).filter(Boolean)},u=0;u<=A;u++)l(u);return s}function Gw(t){var n=t.dimensionValues,r=t.pivotMeta,A=t.fields,i=t.sortedDimensionValues,o=t.queryType,a=void 0===o?e.QueryDataType.All:o;return Dw(n)?Pw({pivotMeta:r,dimensionValues:n,fieldIdx:n.length-1,queryType:a,fields:A,sortedDimensionValues:i}).map((function(e){return e.dimensions})):[n]}function Kw(e){var t=e.rowFields,n=e.rowDimensionValues,r=e.rowPivotMeta,A=e.colFields,i=e.colDimensionValues,o=e.colPivotMeta,a=e.queryType,s=e.sortedDimensionValues;return{rowQueries:Gw({dimensionValues:n,pivotMeta:r,fields:t,sortedDimensionValues:s,queryType:a}),colQueries:Gw({dimensionValues:i,pivotMeta:o,fields:A,sortedDimensionValues:s,queryType:a})}}function zw(t,n){return t?lv.isArray(t)?lv.flatMap(t,(function(t){if(!lv.isArray(t))return lv.compact([t]);var r=n===e.QueryDataType.DetailOnly?1:0;return lv.compact(t.slice(r))})):lv.compact([t]):[]}
/*!
   *  decimal.js v10.5.0
   *  An arbitrary-precision Decimal type for JavaScript.
   *  https://github.com/MikeMcl/decimal.js
   *  Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
   *  MIT Licence
   */
var Vw,Ww,Xw=9e15,Yw=1e9,jw="0123456789abcdef",Zw="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Jw="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qw={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Xw,maxE:Xw,crypto:!1},$w=!0,eE="[DecimalError] ",tE=eE+"Invalid argument: ",nE=eE+"Precision limit exceeded",rE=eE+"crypto unavailable",AE="[object Decimal]",iE=Math.floor,oE=Math.pow,aE=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,sE=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,lE=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,uE=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,cE=1e7,hE=7,dE=Zw.length-1,fE=Jw.length-1,pE={toStringTag:AE};function gE(e){var t,n,r,A=e.length-1,i="",o=e[0];if(A>0){for(i+=o,t=1;t<A;t++)r=e[t]+"",(n=hE-r.length)&&(i+=FE(n)),i+=r;o=e[t],(n=hE-(r=o+"").length)&&(i+=FE(n))}else if(0===o)return"0";for(;o%10==0;)o/=10;return i+o}function vE(e,t,n){if(e!==~~e||e<t||e>n)throw Error(tE+e)}function yE(e,t,n,r){var A,i,o,a;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=hE,A=0):(A=Math.ceil((t+1)/hE),t%=hE),i=oE(10,hE-t),a=e[A]%i|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),o=n<4&&99999==a||n>3&&49999==a||5e4==a||0==a):o=(n<4&&a+1==i||n>3&&a+1==i/2)&&(e[A+1]/i/100|0)==oE(10,t-2)-1||(a==i/2||0==a)&&!(e[A+1]/i/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),o=(r||n<4)&&9999==a||!r&&n>3&&4999==a):o=((r||n<4)&&a+1==i||!r&&n>3&&a+1==i/2)&&(e[A+1]/i/1e3|0)==oE(10,t-3)-1,o}function CE(e,t,n){for(var r,A,i=[0],o=0,a=e.length;o<a;){for(A=i.length;A--;)i[A]*=t;for(i[0]+=jw.indexOf(e.charAt(o++)),r=0;r<i.length;r++)i[r]>n-1&&(void 0===i[r+1]&&(i[r+1]=0),i[r+1]+=i[r]/n|0,i[r]%=n)}return i.reverse()}pE.absoluteValue=pE.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),mE(e)},pE.ceil=function(){return mE(new this.constructor(this),this.e+1,2)},pE.clampedTo=pE.clamp=function(e,t){var n=this,r=n.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(tE+t);return n.cmp(e)<0?e:n.cmp(t)>0?t:new r(n)},pE.comparedTo=pE.cmp=function(e){var t,n,r,A,i=this,o=i.d,a=(e=new i.constructor(e)).d,s=i.s,l=e.s;if(!o||!a)return s&&l?s!==l?s:o===a?0:!o^s<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?s:a[0]?-l:0;if(s!==l)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(t=0,n=(r=o.length)<(A=a.length)?r:A;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^s<0?1:-1;return r===A?0:r>A^s<0?1:-1},pE.cosine=pE.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+hE,r.rounding=1,n=function(e,t){var n,r,A;if(t.isZero())return t;r=t.d.length,r<32?A=(1/kE(4,n=Math.ceil(r/3))).toString():(n=16,A="2.3283064365386962890625e-10");e.precision+=n,t=OE(e,1,t.times(A),new e(1));for(var i=n;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}(r,NE(r,n)),r.precision=e,r.rounding=t,mE(2==Ww||3==Ww?n.neg():n,e,t,!0)):new r(1):new r(NaN)},pE.cubeRoot=pE.cbrt=function(){var e,t,n,r,A,i,o,a,s,l,u=this,c=u.constructor;if(!u.isFinite()||u.isZero())return new c(u);for($w=!1,(i=u.s*oE(u.s*u,1/3))&&Math.abs(i)!=1/0?r=new c(i.toString()):(n=gE(u.d),(i=((e=u.e)-n.length+1)%3)&&(n+=1==i||-2==i?"0":"00"),i=oE(n,1/3),e=iE((e+1)/3)-(e%3==(e<0?-1:2)),(r=new c(n=i==1/0?"5e"+e:(n=i.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=u.s),o=(e=c.precision)+3;;)if(l=(s=(a=r).times(a).times(a)).plus(u),r=BE(l.plus(u).times(a),l.plus(s),o+2,1),gE(a.d).slice(0,o)===(n=gE(r.d)).slice(0,o)){if("9999"!=(n=n.slice(o-3,o+1))&&(A||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(mE(r,e+1,1),t=!r.times(r).times(r).eq(u));break}if(!A&&(mE(a,e+1,0),a.times(a).times(a).eq(u))){r=a;break}o+=4,A=1}return $w=!0,mE(r,e,c.rounding,t)},pE.decimalPlaces=pE.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=((e=t.length-1)-iE(this.e/hE))*hE,e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},pE.dividedBy=pE.div=function(e){return BE(this,new this.constructor(e))},pE.dividedToIntegerBy=pE.divToInt=function(e){var t=this.constructor;return mE(BE(this,new t(e),0,1,1),t.precision,t.rounding)},pE.equals=pE.eq=function(e){return 0===this.cmp(e)},pE.floor=function(){return mE(new this.constructor(this),this.e+1,3)},pE.greaterThan=pE.gt=function(e){return this.cmp(e)>0},pE.greaterThanOrEqualTo=pE.gte=function(e){var t=this.cmp(e);return 1==t||0===t},pE.hyperbolicCosine=pE.cosh=function(){var e,t,n,r,A,i=this,o=i.constructor,a=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return a;n=o.precision,r=o.rounding,o.precision=n+Math.max(i.e,i.sd())+4,o.rounding=1,(A=i.d.length)<32?t=(1/kE(4,e=Math.ceil(A/3))).toString():(e=16,t="2.3283064365386962890625e-10"),i=OE(o,1,i.times(t),new o(1),!0);for(var s,l=e,u=new o(8);l--;)s=i.times(i),i=a.minus(s.times(u.minus(s.times(u))));return mE(i,o.precision=n,o.rounding=r,!0)},pE.hyperbolicSine=pE.sinh=function(){var e,t,n,r,A=this,i=A.constructor;if(!A.isFinite()||A.isZero())return new i(A);if(t=i.precision,n=i.rounding,i.precision=t+Math.max(A.e,A.sd())+4,i.rounding=1,(r=A.d.length)<3)A=OE(i,2,A,A,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,A=OE(i,2,A=A.times(1/kE(5,e)),A,!0);for(var o,a=new i(5),s=new i(16),l=new i(20);e--;)o=A.times(A),A=A.times(a.plus(o.times(s.times(o).plus(l))))}return i.precision=t,i.rounding=n,mE(A,t,n,!0)},pE.hyperbolicTangent=pE.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,BE(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},pE.inverseCosine=pE.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,A=t.rounding;return-1!==n?0===n?e.isNeg()?SE(t,r,A):new t(0):new t(NaN):e.isZero()?SE(t,r+4,A).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=A,e.times(2))},pE.inverseHyperbolicCosine=pE.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,$w=!1,n=n.times(n).minus(1).sqrt().plus(n),$w=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},pE.inverseHyperbolicSine=pE.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,$w=!1,n=n.times(n).plus(1).sqrt().plus(n),$w=!0,r.precision=e,r.rounding=t,n.ln())},pE.inverseHyperbolicTangent=pE.atanh=function(){var e,t,n,r,A=this,i=A.constructor;return A.isFinite()?A.e>=0?new i(A.abs().eq(1)?A.s/0:A.isZero()?A:NaN):(e=i.precision,t=i.rounding,r=A.sd(),Math.max(r,e)<2*-A.e-1?mE(new i(A),e,t,!0):(i.precision=n=r-A.e,A=BE(A.plus(1),new i(1).minus(A),n+e,1),i.precision=e+4,i.rounding=1,A=A.ln(),i.precision=e,i.rounding=t,A.times(.5))):new i(NaN)},pE.inverseSine=pE.asin=function(){var e,t,n,r,A=this,i=A.constructor;return A.isZero()?new i(A):(t=A.abs().cmp(1),n=i.precision,r=i.rounding,-1!==t?0===t?((e=SE(i,n+4,r).times(.5)).s=A.s,e):new i(NaN):(i.precision=n+6,i.rounding=1,A=A.div(new i(1).minus(A.times(A)).sqrt().plus(1)).atan(),i.precision=n,i.rounding=r,A.times(2)))},pE.inverseTangent=pE.atan=function(){var e,t,n,r,A,i,o,a,s,l=this,u=l.constructor,c=u.precision,h=u.rounding;if(l.isFinite()){if(l.isZero())return new u(l);if(l.abs().eq(1)&&c+4<=fE)return(o=SE(u,c+4,h).times(.25)).s=l.s,o}else{if(!l.s)return new u(NaN);if(c+4<=fE)return(o=SE(u,c+4,h).times(.5)).s=l.s,o}for(u.precision=a=c+10,u.rounding=1,e=n=Math.min(28,a/hE+2|0);e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for($w=!1,t=Math.ceil(a/hE),r=1,s=l.times(l),o=new u(l),A=l;-1!==e;)if(A=A.times(s),i=o.minus(A.div(r+=2)),A=A.times(s),void 0!==(o=i.plus(A.div(r+=2))).d[t])for(e=t;o.d[e]===i.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),$w=!0,mE(o,u.precision=c,u.rounding=h,!0)},pE.isFinite=function(){return!!this.d},pE.isInteger=pE.isInt=function(){return!!this.d&&iE(this.e/hE)>this.d.length-2},pE.isNaN=function(){return!this.s},pE.isNegative=pE.isNeg=function(){return this.s<0},pE.isPositive=pE.isPos=function(){return this.s>0},pE.isZero=function(){return!!this.d&&0===this.d[0]},pE.lessThan=pE.lt=function(e){return this.cmp(e)<0},pE.lessThanOrEqualTo=pE.lte=function(e){return this.cmp(e)<1},pE.logarithm=pE.log=function(e){var t,n,r,A,i,o,a,s,l=this,u=l.constructor,c=u.precision,h=u.rounding;if(null==e)e=new u(10),t=!0;else{if(n=(e=new u(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new u(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new u(n&&!n[0]?-1/0:1!=l.s?NaN:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(A=n[0];A%10==0;)A/=10;i=1!==A}if($w=!1,o=UE(l,a=c+5),r=t?xE(u,a+10):UE(e,a),yE((s=BE(o,r,a,1)).d,A=c,h))do{if(o=UE(l,a+=10),r=t?xE(u,a+10):UE(e,a),s=BE(o,r,a,1),!i){+gE(s.d).slice(A+1,A+15)+1==1e14&&(s=mE(s,c+1,0));break}}while(yE(s.d,A+=10,h));return $w=!0,mE(s,c,h)},pE.minus=pE.sub=function(e){var t,n,r,A,i,o,a,s,l,u,c,h,d=this,f=d.constructor;if(e=new f(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new f(e.d||d.s!==e.s?d:NaN):e=new f(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,h=e.d,a=f.precision,s=f.rounding,!l[0]||!h[0]){if(h[0])e.s=-e.s;else{if(!l[0])return new f(3===s?-0:0);e=new f(d)}return $w?mE(e,a,s):e}if(n=iE(e.e/hE),u=iE(d.e/hE),l=l.slice(),i=u-n){for((c=i<0)?(t=l,i=-i,o=h.length):(t=h,n=u,o=l.length),i>(r=Math.max(Math.ceil(a/hE),o)+2)&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for((c=(r=l.length)<(o=h.length))&&(o=r),r=0;r<o;r++)if(l[r]!=h[r]){c=l[r]<h[r];break}i=0}for(c&&(t=l,l=h,h=t,e.s=-e.s),o=l.length,r=h.length-o;r>0;--r)l[o++]=0;for(r=h.length;r>i;){if(l[--r]<h[r]){for(A=r;A&&0===l[--A];)l[A]=cE-1;--l[A],l[r]+=cE}l[r]-=h[r]}for(;0===l[--o];)l.pop();for(;0===l[0];l.shift())--n;return l[0]?(e.d=l,e.e=EE(l,n),$w?mE(e,a,s):e):new f(3===s?-0:0)},pE.modulo=pE.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?mE(new r(n),r.precision,r.rounding):($w=!1,9==r.modulo?(t=BE(n,e.abs(),0,3,1)).s*=e.s:t=BE(n,e,0,r.modulo,1),t=t.times(e),$w=!0,n.minus(t))},pE.naturalExponential=pE.exp=function(){return QE(this)},pE.naturalLogarithm=pE.ln=function(){return UE(this)},pE.negated=pE.neg=function(){var e=new this.constructor(this);return e.s=-e.s,mE(e)},pE.plus=pE.add=function(e){var t,n,r,A,i,o,a,s,l,u,c=this,h=c.constructor;if(e=new h(e),!c.d||!e.d)return c.s&&e.s?c.d||(e=new h(e.d||c.s===e.s?c:NaN)):e=new h(NaN),e;if(c.s!=e.s)return e.s=-e.s,c.minus(e);if(l=c.d,u=e.d,a=h.precision,s=h.rounding,!l[0]||!u[0])return u[0]||(e=new h(c)),$w?mE(e,a,s):e;if(i=iE(c.e/hE),r=iE(e.e/hE),l=l.slice(),A=i-r){for(A<0?(n=l,A=-A,o=u.length):(n=u,r=i,o=l.length),A>(o=(i=Math.ceil(a/hE))>o?i+1:o+1)&&(A=o,n.length=1),n.reverse();A--;)n.push(0);n.reverse()}for((o=l.length)-(A=u.length)<0&&(A=o,n=u,u=l,l=n),t=0;A;)t=(l[--A]=l[A]+u[A]+t)/cE|0,l[A]%=cE;for(t&&(l.unshift(t),++r),o=l.length;0==l[--o];)l.pop();return e.d=l,e.e=EE(l,r),$w?mE(e,a,s):e},pE.precision=pE.sd=function(e){var t,n=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(tE+e);return n.d?(t=TE(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},pE.round=function(){var e=this,t=e.constructor;return mE(new t(e),e.e+1,t.rounding)},pE.sine=pE.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+hE,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:OE(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:0|n,t=t.times(1/kE(5,n)),t=OE(e,2,t,t);for(var A,i=new e(5),o=new e(16),a=new e(20);n--;)A=t.times(t),t=t.times(i.plus(A.times(o.times(A).minus(a))));return t}(r,NE(r,n)),r.precision=e,r.rounding=t,mE(Ww>2?n.neg():n,e,t,!0)):new r(NaN)},pE.squareRoot=pE.sqrt=function(){var e,t,n,r,A,i,o=this,a=o.d,s=o.e,l=o.s,u=o.constructor;if(1!==l||!a||!a[0])return new u(!l||l<0&&(!a||a[0])?NaN:a?o:1/0);for($w=!1,0==(l=Math.sqrt(+o))||l==1/0?(((t=gE(a)).length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=iE((s+1)/2)-(s<0||s%2),r=new u(t=l==1/0?"5e"+s:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+s)):r=new u(l.toString()),n=(s=u.precision)+3;;)if(r=(i=r).plus(BE(o,i,n+2,1)).times(.5),gE(i.d).slice(0,n)===(t=gE(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(A||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(mE(r,s+1,1),e=!r.times(r).eq(o));break}if(!A&&(mE(i,s+1,0),i.times(i).eq(o))){r=i;break}n+=4,A=1}return $w=!0,mE(r,s,u.rounding,e)},pE.tangent=pE.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=BE(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,mE(2==Ww||4==Ww?n.neg():n,e,t,!0)):new r(NaN)},pE.times=pE.mul=function(e){var t,n,r,A,i,o,a,s,l,u=this,c=u.constructor,h=u.d,d=(e=new c(e)).d;if(e.s*=u.s,!(h&&h[0]&&d&&d[0]))return new c(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:h&&d?0*e.s:e.s/0);for(n=iE(u.e/hE)+iE(e.e/hE),(s=h.length)<(l=d.length)&&(i=h,h=d,d=i,o=s,s=l,l=o),i=[],r=o=s+l;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,A=s+r;A>r;)a=i[A]+d[r]*h[A-r-1]+t,i[A--]=a%cE|0,t=a/cE|0;i[A]=(i[A]+t)%cE|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=EE(i,n),$w?mE(e,c.precision,c.rounding):e},pE.toBinary=function(e,t){return _E(this,2,e,t)},pE.toDecimalPlaces=pE.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(vE(e,0,Yw),void 0===t?t=r.rounding:vE(t,0,8),mE(n,e+n.e+1,t))},pE.toExponential=function(e,t){var n,r=this,A=r.constructor;return void 0===e?n=wE(r,!0):(vE(e,0,Yw),void 0===t?t=A.rounding:vE(t,0,8),n=wE(r=mE(new A(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},pE.toFixed=function(e,t){var n,r,A=this,i=A.constructor;return void 0===e?n=wE(A):(vE(e,0,Yw),void 0===t?t=i.rounding:vE(t,0,8),n=wE(r=mE(new i(A),e+A.e+1,t),!1,e+r.e+1)),A.isNeg()&&!A.isZero()?"-"+n:n},pE.toFraction=function(e){var t,n,r,A,i,o,a,s,l,u,c,h,d=this,f=d.d,p=d.constructor;if(!f)return new p(d);if(l=n=new p(1),r=s=new p(0),o=(i=(t=new p(r)).e=TE(f)-d.e-1)%hE,t.d[0]=oE(10,o<0?hE+o:o),null==e)e=i>0?t:l;else{if(!(a=new p(e)).isInt()||a.lt(l))throw Error(tE+a);e=a.gt(t)?i>0?t:l:a}for($w=!1,a=new p(gE(f)),u=p.precision,p.precision=i=f.length*hE*2;c=BE(a,t,0,1,1),1!=(A=n.plus(c.times(r))).cmp(e);)n=r,r=A,A=l,l=s.plus(c.times(A)),s=A,A=t,t=a.minus(c.times(A)),a=A;return A=BE(e.minus(n),r,0,1,1),s=s.plus(A.times(l)),n=n.plus(A.times(r)),s.s=l.s=d.s,h=BE(l,r,i,1).minus(d).abs().cmp(BE(s,n,i,1).minus(d).abs())<1?[l,r]:[s,n],p.precision=u,$w=!0,h},pE.toHexadecimal=pE.toHex=function(e,t){return _E(this,16,e,t)},pE.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),null==e){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:vE(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?($w=!1,n=BE(n,e,0,t,1).times(e),$w=!0,mE(n)):(e.s=n.s,n=e),n},pE.toNumber=function(){return+this},pE.toOctal=function(e,t){return _E(this,8,e,t)},pE.toPower=pE.pow=function(e){var t,n,r,A,i,o,a=this,s=a.constructor,l=+(e=new s(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new s(oE(+a,l));if((a=new s(a)).eq(1))return a;if(r=s.precision,i=s.rounding,e.eq(1))return mE(a,r,i);if((t=iE(e.e/hE))>=e.d.length-1&&(n=l<0?-l:l)<=9007199254740991)return A=bE(s,a,n,r),e.s<0?new s(1).div(A):mE(A,r,i);if((o=a.s)<0){if(t<e.d.length-1)return new s(NaN);if(1&e.d[t]||(o=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=o,a}return(t=0!=(n=oE(+a,l))&&isFinite(n)?new s(n+"").e:iE(l*(Math.log("0."+gE(a.d))/Math.LN10+a.e+1)))>s.maxE+1||t<s.minE-1?new s(t>0?o/0:0):($w=!1,s.rounding=a.s=1,n=Math.min(12,(t+"").length),(A=QE(e.times(UE(a,r+n)),r)).d&&yE((A=mE(A,r+5,1)).d,r,i)&&(t=r+10,+gE((A=mE(QE(e.times(UE(a,t+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(A=mE(A,r+1,0))),A.s=o,$w=!0,s.rounding=i,mE(A,r,i))},pE.toPrecision=function(e,t){var n,r=this,A=r.constructor;return void 0===e?n=wE(r,r.e<=A.toExpNeg||r.e>=A.toExpPos):(vE(e,1,Yw),void 0===t?t=A.rounding:vE(t,0,8),n=wE(r=mE(new A(r),e,t),e<=r.e||r.e<=A.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},pE.toSignificantDigits=pE.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(vE(e,1,Yw),void 0===t?t=n.rounding:vE(t,0,8)),mE(new n(this),e,t)},pE.toString=function(){var e=this,t=e.constructor,n=wE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},pE.truncated=pE.trunc=function(){return mE(new this.constructor(this),this.e+1,1)},pE.valueOf=pE.toJSON=function(){var e=this,t=e.constructor,n=wE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};var BE=function(){function e(e,t,n){var r,A=0,i=e.length;for(e=e.slice();i--;)r=e[i]*t+A,e[i]=r%n|0,A=r/n|0;return A&&e.unshift(A),e}function t(e,t,n,r){var A,i;if(n!=r)i=n>r?1:-1;else for(A=i=0;A<n;A++)if(e[A]!=t[A]){i=e[A]>t[A]?1:-1;break}return i}function n(e,t,n,r){for(var A=0;n--;)e[n]-=A,A=e[n]<t[n]?1:0,e[n]=A*r+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,A,i,o,a,s){var l,u,c,h,d,f,p,g,v,y,C,B,m,w,E,x,S,T,F,b,I=r.constructor,L=r.s==A.s?1:-1,Q=r.d,U=A.d;if(!(Q&&Q[0]&&U&&U[0]))return new I(r.s&&A.s&&(Q?!U||Q[0]!=U[0]:U)?Q&&0==Q[0]||!U?0*L:L/0:NaN);for(s?(d=1,u=r.e-A.e):(s=cE,d=hE,u=iE(r.e/d)-iE(A.e/d)),F=U.length,S=Q.length,y=(v=new I(L)).d=[],c=0;U[c]==(Q[c]||0);c++);if(U[c]>(Q[c]||0)&&u--,null==i?(w=i=I.precision,o=I.rounding):w=a?i+(r.e-A.e)+1:i,w<0)y.push(1),f=!0;else{if(w=w/d+2|0,c=0,1==F){for(h=0,U=U[0],w++;(c<S||h)&&w--;c++)E=h*s+(Q[c]||0),y[c]=E/U|0,h=E%U|0;f=h||c<S}else{for((h=s/(U[0]+1)|0)>1&&(U=e(U,h,s),Q=e(Q,h,s),F=U.length,S=Q.length),x=F,B=(C=Q.slice(0,F)).length;B<F;)C[B++]=0;(b=U.slice()).unshift(0),T=U[0],U[1]>=s/2&&++T;do{h=0,(l=t(U,C,F,B))<0?(m=C[0],F!=B&&(m=m*s+(C[1]||0)),(h=m/T|0)>1?(h>=s&&(h=s-1),1==(l=t(p=e(U,h,s),C,g=p.length,B=C.length))&&(h--,n(p,F<g?b:U,g,s))):(0==h&&(l=h=1),p=U.slice()),(g=p.length)<B&&p.unshift(0),n(C,p,B,s),-1==l&&(l=t(U,C,F,B=C.length))<1&&(h++,n(C,F<B?b:U,B,s)),B=C.length):0===l&&(h++,C=[0]),y[c++]=h,l&&C[0]?C[B++]=Q[x]||0:(C=[Q[x]],B=1)}while((x++<S||void 0!==C[0])&&w--);f=void 0!==C[0]}y[0]||y.shift()}if(1==d)v.e=u,Vw=f;else{for(c=1,h=y[0];h>=10;h/=10)c++;v.e=c+u*d-1,mE(v,a?i+v.e+1:i,o,f)}return v}}();function mE(e,t,n,r){var A,i,o,a,s,l,u,c,h,d=e.constructor;e:if(null!=t){if(!(c=e.d))return e;for(A=1,a=c[0];a>=10;a/=10)A++;if((i=t-A)<0)i+=hE,o=t,s=(u=c[h=0])/oE(10,A-o-1)%10|0;else if((h=Math.ceil((i+1)/hE))>=(a=c.length)){if(!r)break e;for(;a++<=h;)c.push(0);u=s=0,A=1,o=(i%=hE)-hE+1}else{for(u=a=c[h],A=1;a>=10;a/=10)A++;s=(o=(i%=hE)-hE+A)<0?0:u/oE(10,A-o-1)%10|0}if(r=r||t<0||void 0!==c[h+1]||(o<0?u:u%oE(10,A-o-1)),l=n<4?(s||r)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||r||6==n&&(i>0?o>0?u/oE(10,A-o):0:c[h-1])%10&1||n==(e.s<0?8:7)),t<1||!c[0])return c.length=0,l?(t-=e.e+1,c[0]=oE(10,(hE-t%hE)%hE),e.e=-t||0):c[0]=e.e=0,e;if(0==i?(c.length=h,a=1,h--):(c.length=h+1,a=oE(10,hE-i),c[h]=o>0?(u/oE(10,A-o)%oE(10,o)|0)*a:0),l)for(;;){if(0==h){for(i=1,o=c[0];o>=10;o/=10)i++;for(o=c[0]+=a,a=1;o>=10;o/=10)a++;i!=a&&(e.e++,c[0]==cE&&(c[0]=1));break}if(c[h]+=a,c[h]!=cE)break;c[h--]=0,a=1}for(i=c.length;0===c[--i];)c.pop()}return $w&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function wE(e,t,n){if(!e.isFinite())return RE(e);var r,A=e.e,i=gE(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+FE(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):A<0?(i="0."+FE(-A-1)+i,n&&(r=n-o)>0&&(i+=FE(r))):A>=o?(i+=FE(A+1-o),n&&(r=n-A-1)>0&&(i=i+"."+FE(r))):((r=A+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(A+1===o&&(i+="."),i+=FE(r))),i}function EE(e,t){var n=e[0];for(t*=hE;n>=10;n/=10)t++;return t}function xE(e,t,n){if(t>dE)throw $w=!0,n&&(e.precision=n),Error(nE);return mE(new e(Zw),t,1,!0)}function SE(e,t,n){if(t>fE)throw Error(nE);return mE(new e(Jw),t,n,!0)}function TE(e){var t=e.length-1,n=t*hE+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function FE(e){for(var t="";e--;)t+="0";return t}function bE(e,t,n,r){var A,i=new e(1),o=Math.ceil(r/hE+4);for($w=!1;;){if(n%2&&DE((i=i.times(t)).d,o)&&(A=!0),0===(n=iE(n/2))){n=i.d.length-1,A&&0===i.d[n]&&++i.d[n];break}DE((t=t.times(t)).d,o)}return $w=!0,i}function IE(e){return 1&e.d[e.d.length-1]}function LE(e,t,n){for(var r,A,i=new e(t[0]),o=0;++o<t.length;){if(!(A=new e(t[o])).s){i=A;break}((r=i.cmp(A))===n||0===r&&i.s===n)&&(i=A)}return i}function QE(e,t){var n,r,A,i,o,a,s,l=0,u=0,c=0,h=e.constructor,d=h.rounding,f=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?($w=!1,s=f):s=t,a=new h(.03125);e.e>-2;)e=e.times(a),c+=5;for(s+=r=Math.log(oE(2,c))/Math.LN10*2+5|0,n=i=o=new h(1),h.precision=s;;){if(i=mE(i.times(e),s,1),n=n.times(++u),gE((a=o.plus(BE(i,n,s,1))).d).slice(0,s)===gE(o.d).slice(0,s)){for(A=c;A--;)o=mE(o.times(o),s,1);if(null!=t)return h.precision=f,o;if(!(l<3&&yE(o.d,s-r,d,l)))return mE(o,h.precision=f,d,$w=!0);h.precision=s+=10,n=i=a=new h(1),u=0,l++}o=a}}function UE(e,t){var n,r,A,i,o,a,s,l,u,c,h,d=1,f=e,p=f.d,g=f.constructor,v=g.rounding,y=g.precision;if(f.s<0||!p||!p[0]||!f.e&&1==p[0]&&1==p.length)return new g(p&&!p[0]?-1/0:1!=f.s?NaN:p?0:f);if(null==t?($w=!1,u=y):u=t,g.precision=u+=10,r=(n=gE(p)).charAt(0),!(Math.abs(i=f.e)<15e14))return l=xE(g,u+2,y).times(i+""),f=UE(new g(r+"."+n.slice(1)),u-10).plus(l),g.precision=y,null==t?mE(f,y,v,$w=!0):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=gE((f=f.times(e)).d)).charAt(0),d++;for(i=f.e,r>1?(f=new g("0."+n),i++):f=new g(r+"."+n.slice(1)),c=f,s=o=f=BE(f.minus(1),f.plus(1),u,1),h=mE(f.times(f),u,1),A=3;;){if(o=mE(o.times(h),u,1),gE((l=s.plus(BE(o,new g(A),u,1))).d).slice(0,u)===gE(s.d).slice(0,u)){if(s=s.times(2),0!==i&&(s=s.plus(xE(g,u+2,y).times(i+""))),s=BE(s,new g(d),u,1),null!=t)return g.precision=y,s;if(!yE(s.d,u-10,v,a))return mE(s,g.precision=y,v,$w=!0);g.precision=u+=10,l=o=f=BE(c.minus(1),c.plus(1),u,1),h=mE(f.times(f),u,1),A=a=1}s=l,A+=2}}function RE(e){return String(e.s*e.s/0)}function ME(e,t){var n,r,A;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(A=t.length;48===t.charCodeAt(A-1);--A);if(t=t.slice(r,A)){if(A-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%hE,n<0&&(r+=hE),r<A){for(r&&e.d.push(+t.slice(0,r)),A-=hE;r<A;)e.d.push(+t.slice(r,r+=hE));t=t.slice(r),r=hE-t.length}else r-=A;for(;r--;)t+="0";e.d.push(+t),$w&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function HE(e,t){var n,r,A,i,o,a,s,l,u;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),uE.test(t))return ME(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(sE.test(t))n=16,t=t.toLowerCase();else if(aE.test(t))n=2;else{if(!lE.test(t))throw Error(tE+t);n=8}for((i=t.search(/p/i))>0?(s=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),o=(i=t.indexOf("."))>=0,r=e.constructor,o&&(i=(a=(t=t.replace(".","")).length)-i,A=bE(r,new r(n),i,2*i)),i=u=(l=CE(t,n,cE)).length-1;0===l[i];--i)l.pop();return i<0?new r(0*e.s):(e.e=EE(l,u),e.d=l,$w=!1,o&&(e=BE(e,A,4*a)),s&&(e=e.times(Math.abs(s)<54?oE(2,s):Fx.pow(2,s))),$w=!0,e)}function OE(e,t,n,r,A){var i,o,a,s,l=e.precision,u=Math.ceil(l/hE);for($w=!1,s=n.times(n),a=new e(r);;){if(o=BE(a.times(s),new e(t++*t++),l,1),a=A?r.plus(o):r.minus(o),r=BE(o.times(s),new e(t++*t++),l,1),void 0!==(o=a.plus(r)).d[u]){for(i=u;o.d[i]===a.d[i]&&i--;);if(-1==i)break}i=a,a=r,r=o,o=i}return $w=!0,o.d.length=u+1,o}function kE(e,t){for(var n=e;--t;)n*=e;return n}function NE(e,t){var n,r=t.s<0,A=SE(e,e.precision,1),i=A.times(.5);if((t=t.abs()).lte(i))return Ww=r?4:1,t;if((n=t.divToInt(A)).isZero())Ww=r?3:2;else{if((t=t.minus(n.times(A))).lte(i))return Ww=IE(n)?r?2:3:r?4:1,t;Ww=IE(n)?r?1:4:r?3:2}return t.minus(A).abs()}function _E(e,t,n,r){var A,i,o,a,s,l,u,c,h,d=e.constructor,f=void 0!==n;if(f?(vE(n,1,Yw),void 0===r?r=d.rounding:vE(r,0,8)):(n=d.precision,r=d.rounding),e.isFinite()){for(f?(A=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):A=t,(o=(u=wE(e)).indexOf("."))>=0&&(u=u.replace(".",""),(h=new d(1)).e=u.length-o,h.d=CE(wE(h),10,A),h.e=h.d.length),i=s=(c=CE(u,10,A)).length;0==c[--s];)c.pop();if(c[0]){if(o<0?i--:((e=new d(e)).d=c,e.e=i,c=(e=BE(e,h,n,r,0,A)).d,i=e.e,l=Vw),o=c[n],a=A/2,l=l||void 0!==c[n+1],l=r<4?(void 0!==o||l)&&(0===r||r===(e.s<0?3:2)):o>a||o===a&&(4===r||l||6===r&&1&c[n-1]||r===(e.s<0?8:7)),c.length=n,l)for(;++c[--n]>A-1;)c[n]=0,n||(++i,c.unshift(1));for(s=c.length;!c[s-1];--s);for(o=0,u="";o<s;o++)u+=jw.charAt(c[o]);if(f){if(s>1)if(16==t||8==t){for(o=16==t?4:3,--s;s%o;s++)u+="0";for(s=(c=CE(u,A,t)).length;!c[s-1];--s);for(o=1,u="1.";o<s;o++)u+=jw.charAt(c[o])}else u=u.charAt(0)+"."+u.slice(1);u=u+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)u="0"+u;u="0."+u}else if(++i>s)for(i-=s;i--;)u+="0";else i<s&&(u=u.slice(0,i)+"."+u.slice(i))}else u=f?"0p+0":"0";u=(16==t?"0x":2==t?"0b":8==t?"0o":"")+u}else u=RE(e);return e.s<0?"-"+u:u}function DE(e,t){if(e.length>t)return e.length=t,!0}function PE(e){return new this(e).abs()}function GE(e){return new this(e).acos()}function KE(e){return new this(e).acosh()}function zE(e,t){return new this(e).plus(t)}function VE(e){return new this(e).asin()}function WE(e){return new this(e).asinh()}function XE(e){return new this(e).atan()}function YE(e){return new this(e).atanh()}function jE(e,t){e=new this(e),t=new this(t);var n,r=this.precision,A=this.rounding,i=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?SE(this,r,A):new this(0)).s=e.s:!e.d||t.isZero()?(n=SE(this,i,1).times(.5)).s=e.s:t.s<0?(this.precision=i,this.rounding=1,n=this.atan(BE(e,t,i,1)),t=SE(this,i,1),this.precision=r,this.rounding=A,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(BE(e,t,i,1)):(n=SE(this,i,1).times(t.s>0?.25:.75)).s=e.s:n=new this(NaN),n}function ZE(e){return new this(e).cbrt()}function JE(e){return mE(e=new this(e),e.e+1,2)}function qE(e,t,n){return new this(e).clamp(t,n)}function $E(e){if(!e||"object"!=typeof e)throw Error(eE+"Object expected");var t,n,r,A=!0===e.defaults,i=["precision",1,Yw,"rounding",0,8,"toExpNeg",-Xw,0,"toExpPos",0,Xw,"maxE",0,Xw,"minE",-Xw,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],A&&(this[n]=qw[n]),void 0!==(r=e[n])){if(!(iE(r)===r&&r>=i[t+1]&&r<=i[t+2]))throw Error(tE+n+": "+r);this[n]=r}if(n="crypto",A&&(this[n]=qw[n]),void 0!==(r=e[n])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(tE+n+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(rE);this[n]=!0}else this[n]=!1}return this}function ex(e){return new this(e).cos()}function tx(e){return new this(e).cosh()}function nx(e,t){return new this(e).div(t)}function rx(e){return new this(e).exp()}function Ax(e){return mE(e=new this(e),e.e+1,3)}function ix(){var e,t,n=new this(0);for($w=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return $w=!0,new this(1/0);n=t}return $w=!0,n.sqrt()}function ox(e){return e instanceof Fx||e&&e.toStringTag===AE||!1}function ax(e){return new this(e).ln()}function sx(e,t){return new this(e).log(t)}function lx(e){return new this(e).log(2)}function ux(e){return new this(e).log(10)}function cx(){return LE(this,arguments,-1)}function hx(){return LE(this,arguments,1)}function dx(e,t){return new this(e).mod(t)}function fx(e,t){return new this(e).mul(t)}function px(e,t){return new this(e).pow(t)}function gx(e){var t,n,r,A,i=0,o=new this(1),a=[];if(void 0===e?e=this.precision:vE(e,1,Yw),r=Math.ceil(e/hE),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));i<r;)(A=t[i])>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:a[i++]=A%1e7;else{if(!crypto.randomBytes)throw Error(rE);for(t=crypto.randomBytes(r*=4);i<r;)(A=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((127&t[i+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,i):(a.push(A%1e7),i+=4);i=r/4}else for(;i<r;)a[i++]=1e7*Math.random()|0;for(r=a[--i],e%=hE,r&&e&&(A=oE(10,hE-e),a[i]=(r/A|0)*A);0===a[i];i--)a.pop();if(i<0)n=0,a=[0];else{for(n=-1;0===a[0];n-=hE)a.shift();for(r=1,A=a[0];A>=10;A/=10)r++;r<hE&&(n-=hE-r)}return o.e=n,o.d=a,o}function vx(e){return mE(e=new this(e),e.e+1,this.rounding)}function yx(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Cx(e){return new this(e).sin()}function Bx(e){return new this(e).sinh()}function mx(e){return new this(e).sqrt()}function wx(e,t){return new this(e).sub(t)}function Ex(){var e=0,t=arguments,n=new this(t[e]);for($w=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return $w=!0,mE(n,this.precision,this.rounding)}function xx(e){return new this(e).tan()}function Sx(e){return new this(e).tanh()}function Tx(e){return mE(e=new this(e),e.e+1,1)}pE[Symbol.for("nodejs.util.inspect.custom")]=pE.toString,pE[Symbol.toStringTag]="Decimal";var Fx=pE.constructor=function e(t){var n,r,A;function i(e){var t,n,r,A=this;if(!(A instanceof i))return new i(e);if(A.constructor=i,ox(e))return A.s=e.s,void($w?!e.d||e.e>i.maxE?(A.e=NaN,A.d=null):e.e<i.minE?(A.e=0,A.d=[0]):(A.e=e.e,A.d=e.d.slice()):(A.e=e.e,A.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return A.s=1/e<0?-1:1,A.e=0,void(A.d=[0]);if(e<0?(e=-e,A.s=-1):A.s=1,e===~~e&&e<1e7){for(t=0,n=e;n>=10;n/=10)t++;return void($w?t>i.maxE?(A.e=NaN,A.d=null):t<i.minE?(A.e=0,A.d=[0]):(A.e=t,A.d=[e]):(A.e=t,A.d=[e]))}return 0*e!=0?(e||(A.s=NaN),A.e=NaN,void(A.d=null)):ME(A,e.toString())}if("string"===r)return 45===(n=e.charCodeAt(0))?(e=e.slice(1),A.s=-1):(43===n&&(e=e.slice(1)),A.s=1),uE.test(e)?ME(A,e):HE(A,e);if("bigint"===r)return e<0?(e=-e,A.s=-1):A.s=1,ME(A,e.toString());throw Error(tE+e)}if(i.prototype=pE,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=$E,i.clone=e,i.isDecimal=ox,i.abs=PE,i.acos=GE,i.acosh=KE,i.add=zE,i.asin=VE,i.asinh=WE,i.atan=XE,i.atanh=YE,i.atan2=jE,i.cbrt=ZE,i.ceil=JE,i.clamp=qE,i.cos=ex,i.cosh=tx,i.div=nx,i.exp=rx,i.floor=Ax,i.hypot=ix,i.ln=ax,i.log=sx,i.log10=ux,i.log2=lx,i.max=cx,i.min=hx,i.mod=dx,i.mul=fx,i.pow=px,i.random=gx,i.round=vx,i.sign=yx,i.sin=Cx,i.sinh=Bx,i.sqrt=mx,i.sub=wx,i.sum=Ex,i.tan=xx,i.tanh=Sx,i.trunc=Tx,void 0===t&&(t={}),t&&!0!==t.defaults)for(A=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<A.length;)t.hasOwnProperty(r=A[n++])||(t[r]=this[r]);return i.config(t),i}(qw);Zw=new Fx(Zw),Jw=new Fx(Jw);var bx,Ix,Lx=function(){function e(e,t){this.raw=e,this.extraField=t}return e.getCellData=function(t,n){return new e(t,n)},e.getCellDataList=function(t,n){return n.map((function(n){return e.getCellData(t,n)}))},e.getFieldValue=function(t,n){return void 0===n&&(n=""),t instanceof e?n?t.getValueByField(n):t[Ay]:null==t?void 0:t[n]},Object.defineProperty(e.prototype,Ay,{get:function(){return this.raw},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,ry,{get:function(){return this.extraField},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,ny,{get:function(){return this.raw[this.extraField]},enumerable:!1,configurable:!0}),e.prototype.getValueByField=function(e){return e===ny||e===ry?this[e]:this.raw[e]},e}(),Qx=function(e){return"number"==typeof e?Number.isNaN(e):!e||("string"!=typeof e||Number.isNaN(Number(e)))},Ux=function(e){return!Qx(e)},Rx=function(e,t,n){return void 0===n&&(n=!1),(null==e?void 0:e.length)?e.reduce((function(e,r){var A=Lx.getFieldValue(r,t),i=Qx(A);if(n&&i)return e;var o=i?0:A;return e.push(new Fx(o)),e}),[]):[]},Mx=function(e,t){var n=Rx(e,t);return n.length?Fx.sum.apply(Fx,lt([],st(n),!1)).toNumber():0},Hx=function(e,t,n){var r=Rx(t,n,!0);if(null==r?void 0:r.length)return Fx[e].apply(Fx,lt([],st(r),!1)).toNumber()},Ox=((bx={})[e.Aggregation.SUM]=Mx,bx[e.Aggregation.MIN]=function(e,t){return Hx("min",e,t)},bx[e.Aggregation.MAX]=function(e,t){return Hx("max",e,t)},bx[e.Aggregation.AVG]=function(e,t){var n=Rx(e,t);return(null==n?void 0:n.length)?Fx.sum.apply(Fx,lt([],st(n),!1)).dividedBy(n.length).toNumber():0},bx[e.Aggregation.COUNT]=function(e){return(null==e?void 0:e.length)||0},bx),kx=function(e){return"ASC"===lv.toUpper(e)},Nx=function(e){return"DESC"===lv.toUpper(e)},_x=function(e,t,n,r){void 0===r&&(r="last");var A=kx(t)?1:-1,i=kx(t),o="first"===r||"auto"===r&&i?-1:1;return null==e?void 0:e.sort((function(e,t){var r=e,i=t;if(n){r=e.getValueByField(n),i=t.getValueByField(n);var a=lv.isNil(r)||"-"===r||""===r,s=lv.isNil(i)||"-"===i||""===i;if(a&&s)return 0;if(a)return o;if(s)return-o;if(Ux(r)&&Ux(i))return(Number(r)-Number(i))*A}return lv.isNil(r)||lv.isNil(i)?r?-o:o:r.toString().localeCompare(i.toString(),"zh")*A}))},Dx=function(e,t,n){return n?function(e,t){var n;return null===(n=null==e?void 0:e.filter((function(e){return!(null==t?void 0:t.includes(e))})))||void 0===n?void 0:n.concat(t)}(t,lv.uniq(e)):lt([],st(new Set(lt(lt([],st(e),!1),st(t),!1))),!1)},Px=function(e){var t=e.sortByValues,n=void 0===t?[]:t,r=e.originValues,A=void 0===r?[]:r,i=A.filter((function(e){return n.find((function(t){return lv.last(lv.split(e,My))===t}))})),o=i.map((function(e){var t=e.split(My);return t.length>1?[t.slice(0,t.length-1).join(My),t[t.length-1]]:t})),a=Array.from(new Set(o.map((function(e){return e[0]}))));o.sort((function(e,t){var r=e.slice(0,e.length-1),A=t.slice(0,t.length-1);return r.join()!==A.join()?a.indexOf(r[0])-a.indexOf(A[0]):n.indexOf(e[e.length-1])-n.indexOf(t[t.length-1])}));var s,l=o.map((function(e){return e.join(My)}));return s=l,A.sort((function(e,t){var n=s.indexOf(e),r=s.indexOf(t);return-1===n&&-1===r?0:-1===n?1:-1===r?-1:n-r}))},Gx=function(e){var t=e.originValues,n=void 0===t?[]:t,r=e.measureValues,A=e.sortParam,i=e.dataSet,o=A,a=o.sortFunc,s=o.sortFieldId,l=o.sortMethod,u=null==a?void 0:a(rt({data:r},A));return(null==u?void 0:u.length)?(i.fields.rows.indexOf(s)>0||i.fields.columns.indexOf(s)>0)&&!lv.includes(u[0],My)?Px({sortByValues:u,originValues:n}):Dx(u,n,kx(l)):n},Kx=function(e){var t=e.sortParam,n=e.originValues,r=void 0===n?[]:n,A=e.measureValues,i=e.dataSet,o=t,a=o.sortFunc,s=o.sortMethod,l=o.sortBy,u=r,c={originValues:r,measureValues:A,sortParam:t,dataSet:i};return a?u=Gx(c):l?u=Px({sortByValues:l,originValues:r}):(kx(s)||Nx(s))&&(u=function(e){var t,n=e.sortParam,r=e.measureValues,A=e.originValues,i=e.dataSet,o=n,a=o.sortByMeasure,s=o.query,l=o.sortFieldId,u=o.sortMethod,c=o.nullsPlacement,h=void 0===c?"last":c,d=i.fields,f=d.rows,p=void 0===f?[]:f,g=d.columns,v=void 0===g?[]:g,y=null==p?void 0:p.includes(l);if(a){var C=_x(r,u,a===oy?null==s?void 0:s[ry]:a,h);t=Uw(l,y?p:Aw(v),C)}else t=_x(r,u,void 0,h);return Dx(t,A,kx(u))}(c)),u},zx=function(t){var n=t.dataSet,r=t.sortParam,A=t.originValues,i=n.fields,o=r,a=o.sortByMeasure,s=o.query,l=o.sortFieldId;if(a!==oy)return n.getCellMultiData({query:s,queryType:e.QueryDataType.DetailOnly});var u=n.getCellMultiData({query:s,queryType:e.QueryDataType.All}),c=Aw(i.columns),h=lv.includes(i.rows,l),d=Fw(h?i.rows:c),f=Fw(h?c:i.rows),p=d[d.indexOf(l)+1],g=lv.keys(s),v=f.filter((function(e){return!g.includes(e)})),y=u.filter((function(e){var t=new Set(lv.keys(e[Ay]));return!!t.has(l)&&(!t.has(p)&&v.every((function(e){return!t.has(e)})))}));return lv.isEmpty(y)?lv.compact(lv.map(A,(function(e){var t=function(e,t,n){var r,A={};if(lv.includes(e,My))for(var i=lv.split(e,My),o=(null===(r=null==t?void 0:t.rows)||void 0===r?void 0:r.includes(n))?t.rows:Aw(t.columns),a=0;a<=lv.indexOf(o,n);a++)A[o[a]]=i[a];else A[n]=e;return A}(e,i,l);return n.getTotalValue(rt(rt({},s),t))}))):y},Vx=function(e){var t,n=e.dataSet,r=e.sortParam,A=e.originValues;return t=e.isSortByMeasure?zx(e):A,Kx({sortParam:r,originValues:A,measureValues:t,dataSet:n})},Wx=function(e,t){if(null==e?void 0:e.sortMethod){if(kx(null==e?void 0:e.sortMethod))return"groupAsc";if(Nx(null==e?void 0:e.sortMethod))return"groupDesc"}if(t)return"SortDown"},Xx=function(e){var t,n,r=e.pivotMeta,A=e.dimensions,i=e.sortedDimensionValues,o=e.sortFieldId,a={children:r},s=[a];try{for(var l=at(A),u=l.next();!u.done;u=l.next()){if(u.value===o){s.forEach((function(e){var t=lt([],st(e.children.values()),!1),n=lv.sortBy(t,(function(e){return lv.indexOf(i,e.id)})).map((function(e){return[e.value,e]}));e.children=new Map(n)}));break}s=lv.flatMap(s,(function(e){return lt([],st(e.children.values()),!1)}))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a.children},Yx=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.hasMobileTouchListeners=!1,e}return nt(n,t),n.prototype.getHeaderConfig=function(){return this.headerConfig||{}},n.prototype.isShallowRender=function(){return t.prototype.isShallowRender.call(this)||this.headerConfig.shallowRender},n.prototype.shouldInit=function(){return t.prototype.shouldInit.call(this)&&!this.isShallowRender()},n.prototype.handleRestOptions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=st(e,1)[0];this.headerConfig=rt({},n);var r=this.meta,A=r.value,i=r.query,o=this.spreadsheet.dataCfg.sortParams||[],a=this.isSortCell(),s=lv.find(lt([],st(o),!1).reverse(),(function(e){return a&&(null==e?void 0:e.sortByMeasure)===A&&lv.isEqual(lv.get(e,"query"),i)})),l=Wx(s,a);this.headerConfig.sortParam=rt(rt(rt({},this.headerConfig.sortParam),s||{query:i}),{type:l})},n.prototype.initCell=function(){this.resetTextAndConditionIconShapes(),this.actionIcons=[],this.hasDefaultHiddenIcon=!1,this.generateIconConfig()},n.prototype.generateIconConfig=function(){var e,t;this.conditionIconMappingResult=this.getIconConditionResult();var n=this.getHeaderConfig().sortParam;this.showSortIcon()?this.actionIconConfig={icons:[{name:(null==n?void 0:n.type)||"none",position:"right"}],belongsCell:this.cellType,isSortIcon:!0}:this.actionIconConfig=VB(this.spreadsheet.options.headerActionIcons,this.meta,this.cellType),this.groupedIcons=XB(null!==(t=null===(e=this.actionIconConfig)||void 0===e?void 0:e.icons)&&void 0!==t?t:[],this.conditionIconMappingResult)},n.prototype.getFormattedFieldValue=function(){var e=this.meta,t=e.isTotalRoot,n=e.isGrandTotals,r=e.value,A=this.spreadsheet.dataSet.getFieldFormatter(this.meta.field);return{formattedValue:!this.spreadsheet.isTableMode()&&(this.spreadsheet.isHierarchyTreeType()?!(n&&t):!t)&&A?A(r,void 0,this.meta):r,value:r}},n.prototype.shouldShowDefaultHeaderActionIcon=function(){return this.spreadsheet.options.showDefaultHeaderActionIcon},n.prototype.showSortIcon=function(){var e=this.spreadsheet.dataCfg,t=lv.isEmpty(e.fields.values);if(this.shouldShowDefaultHeaderActionIcon()&&!t){var n=this.getHeaderConfig().sortParam,r=this.meta.query;return this.isShallowRender()?r:r&&lv.isEqual(null==n?void 0:n.query,r)&&(null==n?void 0:n.type)&&"none"!==(null==n?void 0:n.type)}return!1},n.prototype.getActionIconStyle=function(e){var t=this.getStyle().icon,n=this.getTextConditionMappingResult(),r=(null==n?void 0:n.fill)||this.getTextStyle().fill;return{width:null==t?void 0:t.size,height:null==t?void 0:t.size,fill:null===e.fill?void 0:(null==e?void 0:e.fill)||(null==t?void 0:t.fill)||r,cursor:"pointer"}},n.prototype.hasDefaultHideActionIcon=function(){return this.hasDefaultHiddenIcon},n.prototype.addActionIcon=function(t){var n,r=this,A=t.x,i=t.y,o=t.name,a=t.defaultHide,s=t.onClick,l=t.onHover,u=t.isSortIcon,c=new gB(rt(rt({},this.getActionIconStyle(t)),{name:o,x:A,y:i,iconStrategy:null===(n=this.spreadsheet.options.csp)||void 0===n?void 0:n.iconStrategy}));c.toggleVisibility(!a),c.addEventListener("mouseover",(function(t){r.spreadsheet.emit(e.S2Event.GLOBAL_ACTION_ICON_HOVER,t),null==l||l({hovering:!0,name:o,meta:r.meta,event:t})})),c.addEventListener("mouseleave",(function(t){r.spreadsheet.emit(e.S2Event.GLOBAL_ACTION_ICON_HOVER_OFF,t),null==l||l({hovering:!1,name:o,meta:r.meta,event:t})})),c.addEventListener("click",(function(t){r.spreadsheet.emit(e.S2Event.GLOBAL_ACTION_ICON_CLICK,t),u?r.spreadsheet.handleGroupSort(t,r.meta):null==s||s({name:o,meta:r.meta,event:t})})),this.actionIcons.push(c),this.appendChild(c)},n.prototype.drawActionAndConditionIcons=function(e){var t=this,n=(void 0===e?{}:e).updatePositionOnly,r=void 0!==n&&n;if((!lv.isEmpty(this.groupedIcons.left)||!lv.isEmpty(this.groupedIcons.right))&&this.leftIconPosition&&this.rightIconPosition){var A=0;lv.forEach(this.groupedIcons,(function(e,n){var i=t.getStyle().icon,o=i.size,a=i.margin,s=a.right,l="left"===n?t.leftIconPosition:t.rightIconPosition;lv.forEach(e,(function(e,n){var i,a,u,c,h,d=l.x+(o+s)*n,f=l.y;if(e.isConditionIcon){var p={x:d,y:f,name:e.name,width:o,height:o,fill:e.fill,iconStrategy:null===(i=t.spreadsheet.options.csp)||void 0===i?void 0:i.iconStrategy};if(t.conditionIconShape){if(r)return void t.conditionIconShape.updatePosition({x:d,y:f});t.conditionIconShape.reRender(p)}else t.conditionIconShape=hm(t,p);t.addConditionIconShape(t.conditionIconShape)}else if(r)null===(a=t.actionIcons[A++])||void 0===a||a.updatePosition({x:d,y:f});else{var g=t.actionIconConfig,v=g.onClick,y=g.onHover,C=g.defaultHide,B=g.isSortIcon,m=null!==(u=e.defaultHide)&&void 0!==u?u:C,w="function"==typeof m?m(t.meta,e.name):m;w&&(t.hasDefaultHiddenIcon=!0),t.addActionIcon({name:e.name,fill:e.fill,x:d,y:f,defaultHide:w,onClick:null!==(c=e.onClick)&&void 0!==c?c:v,onHover:null!==(h=e.onHover)&&void 0!==h?h:y,isSortIcon:B})}}))}))}},n.prototype.isSortCell=function(){var t,n,r,A=null===(n=null===(t=this.spreadsheet)||void 0===t?void 0:t.isValueInCols)||void 0===n?void 0:n.call(t),i=this.meta.level===(null===(r=this.meta.hierarchy)||void 0===r?void 0:r.maxLevel);return A?i&&this.cellType===e.CellType.COL_CELL:i&&this.cellType===e.CellType.ROW_CELL},n.prototype.handleByStateName=function(e,t){Cw(e,this)&&this.updateByState(t)},n.prototype.handleSearchResult=function(t){Cw(t,this)&&(lv.find(t,(function(e){return null==e?void 0:e.isTarget})).id===this.getMeta().id?this.updateByState(e.InteractionStateName.HIGHLIGHT):this.updateByState(e.InteractionStateName.SEARCH_RESULT))},n.prototype.handleHover=function(t){var n;Cw(t,this)&&(this.updateByState(e.InteractionStateName.HOVER),this.hasDefaultHideActionIcon()&&this.toggleActionIcon(null===(n=null==t?void 0:t[0])||void 0===n?void 0:n.id))},n.prototype.handleSelect=function(t,n){void 0===n&&(n=[]),Cw(t,this)&&this.updateByState(e.InteractionStateName.SELECTED);var r=lv.map(n,"id");lv.includes(r,this.meta.id)&&this.updateByState(e.InteractionStateName.SELECTED)},n.prototype.getTextStyle=function(){var e,t=this.getCellTextWordWrapStyle(),n=this.getStyle(),r=n.text,A=n.bolderText,i=n.measureText;return e=this.isMeasureField()?i||r:this.isBolderText()?A:r,this.getContainConditionMappingResultTextStyle(rt(rt({},t),e))},n.prototype.getBackgroundColor=function(){var e,t=(null===(e=this.getStyle())||void 0===e?void 0:e.cell)||{},n=t.backgroundColor,r=t.backgroundColorOpacity;return lv.merge({backgroundColor:n,backgroundColorOpacity:r},this.getBackgroundConditionFill())},n.prototype.toggleActionIcon=function(e){if(this.getMeta().id===e){var t=[];lv.forEach(this.actionIcons,(function(e){"visible"!==e.parsedStyle.visibility&&(e.toggleVisibility(!0),t.push(e))})),this.spreadsheet.store.set("visibleActionIcons",t)}},n.prototype.getIconPosition=function(){return this.leftIconPosition||this.rightIconPosition},n.prototype.getInteractedCells=function(){var t;return null===(t=this.spreadsheet.interaction)||void 0===t?void 0:t.getCells([e.CellType.CORNER_CELL,e.CellType.COL_CELL,e.CellType.ROW_CELL,e.CellType.SERIES_NUMBER_CELL])},n.prototype.update=function(){var t=this.spreadsheet.interaction,n=null==t?void 0:t.getState();if((null==n?void 0:n.stateName)!==e.InteractionStateName.ALL_SELECTED){var r=this.getInteractedCells();if(lv.first(r))switch(null==n?void 0:n.stateName){case e.InteractionStateName.SELECTED:case e.InteractionStateName.ROW_CELL_BRUSH_SELECTED:case e.InteractionStateName.COL_CELL_BRUSH_SELECTED:this.handleSelect(r,null==n?void 0:n.nodes);break;case e.InteractionStateName.HOVER_FOCUS:case e.InteractionStateName.HOVER:this.handleHover(r);break;case e.InteractionStateName.SEARCH_RESULT:this.handleSearchResult(r);break;default:this.handleByStateName(r,null==n?void 0:n.stateName)}}else this.updateByState(e.InteractionStateName.SELECTED)},n.prototype.updateByState=function(e){t.prototype.updateByState.call(this,e,this)},n.prototype.hideInteractionShape=function(){t.prototype.hideInteractionShape.call(this)},n.prototype.isMeasureField=function(){return[ry,iy].includes(this.meta.field)},n.prototype.mappingValue=function(e){var t,n=this.getMeta().value;return null===(t=e.mapping)||void 0===t?void 0:t.call(e,n,this.meta,this)},n.prototype.findFieldCondition=function(e){return void 0===e&&(e=[]),rm(e,this.meta.field)},n.prototype.getTreeIcon=function(){return this.treeIcon},n.prototype.getActionIcons=function(){return this.actionIcons||[]},n.prototype.getMetaField=function(){return this.meta.field},n.prototype.addMobileTouchListener=function(e){if(!this.hasMobileTouchListeners){this.hasMobileTouchListeners=!0;var t=null,n=function(e){var n,r,A=e.nativeEvent,i=(null===(n=A.touches)||void 0===n?void 0:n[0])||(null===(r=A.changedTouches)||void 0===r?void 0:r[0]);i&&(t={x:i.clientX,y:i.clientY})},r=function(n){var r,A=null===(r=n.nativeEvent.changedTouches)||void 0===r?void 0:r[0];if(A&&t){var i=Math.abs(A.clientX-t.x),o=Math.abs(A.clientY-t.y);i<10&&o<10&&e(),t=null}},A=function(){t=null};this.mobileTouchHandlers={onTouchStart:n,onTouchEnd:r,onTouchCancel:A},this.addEventListener("touchstart",n),this.addEventListener("touchend",r),this.addEventListener("touchcancel",A)}},n.prototype.destroy=function(){this.mobileTouchHandlers&&(this.removeEventListener("touchstart",this.mobileTouchHandlers.onTouchStart),this.removeEventListener("touchend",this.mobileTouchHandlers.onTouchEnd),this.removeEventListener("touchcancel",this.mobileTouchHandlers.onTouchCancel),this.mobileTouchHandlers=void 0),this.meta.belongsCell=null,t.prototype.destroy.call(this)},n.prototype.reInitCell=function(e,t){this.setMeta(e),this.handleRestOptions(t,void 0),this.initCell()},n.prototype.setHeaderConfig=function(e){this.handleRestOptions(e,void 0),this.updateTextPosition(),this.drawActionAndConditionIcons({updatePositionOnly:!0})},n}(Gm),jx=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),Object.defineProperty(n.prototype,"cellType",{get:function(){return e.CellType.COL_CELL},enumerable:!1,configurable:!0}),n.prototype.getBorderPositions=function(){return[e.CellBorderPosition.TOP,e.CellBorderPosition.RIGHT]},n.prototype.initCell=function(){t.prototype.initCell.call(this),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextOrCustomRenderer()},n.prototype.afterDrawText=function(){this.drawActionAndConditionIcons(),this.drawBorders(),this.drawResizeArea(),this.addExpandColumnIconShapes(),this.update()},n.prototype.getFormattedFieldValue=function(){var e,n=this.meta,r=n.extra,A=n.value,i=n.field,o=this.spreadsheet.dataSet.fields;return(null==r?void 0:r.isCustomNode)&&(null===(e=null==o?void 0:o.values)||void 0===e?void 0:e.includes(i))?{formattedValue:A,value:A}:t.prototype.getFormattedFieldValue.call(this)},n.prototype.getMaxTextWidth=function(){return this.getBBoxByType(e.CellClipBox.CONTENT_BOX).width-this.getActionAndConditionIconWidth()},n.prototype.isBolderText=function(){var e=this.meta,t=e.isLeaf;return!(!e.isTotals&&t)},n.prototype.handleViewport=function(){if(this.meta.isFrozen)return{start:0,size:Number.POSITIVE_INFINITY};var t=this.getHeaderConfig(),n=t.viewportWidth,r=t.cornerWidth,A=void 0===r?0:r,i=t.scrollX,o=void 0===i?0:i,a=this.spreadsheet.facet.frozenGroupAreas,s=a[e.FrozenGroupArea.Col].width,l=a[e.FrozenGroupArea.TrailingCol].width;return this.spreadsheet.isFrozenRowHeader()?{start:o+s,size:n-s-l}:{start:s+Math.max(0,o-A),size:n-s-l+Math.min(o,A)}},n.prototype.getContentPosition=function(t){var n,r,A,i=(void 0===t?{}:t).contentWidth,o=void 0===i?this.getActualTextWidth():i,a=this.meta.isLeaf,s=this.getTextStyle(),l=this.getBBoxByType(e.CellClipBox.CONTENT_BOX),u=this.getIconStyle(),c=jB(l,s.textBaseline),h=ZB(u.size,c,s.fontSize,s.textBaseline);if(a){var d=JB({bbox:l,textWidth:o,textAlign:s.textAlign,groupedIcons:this.groupedIcons,iconStyle:u,isCustomRenderer:!!this.getRenderer()}),f=d.textX,p=d.leftIconX,g=d.rightIconX;return this.leftIconPosition={x:p,y:h},this.rightIconPosition={x:g,y:h},{x:f,y:c}}var v=this.handleViewport(),y=this.getStyle(),C=y.cell,B=y.icon,m=this.getTextStyle(),w=m.textAlign,E=m.textBaseline,x=lw(v,{start:l.x,size:l.width},{align:sw(w),size:{textSize:o,iconStartSize:this.getActionAndConditionIconWidth("left"),iconEndSize:this.getActionAndConditionIconWidth("right")},padding:{start:null===(n=null==C?void 0:C.padding)||void 0===n?void 0:n.left,end:null===(r=null==C?void 0:C.padding)||void 0===r?void 0:r.right,betweenTextAndEndIcon:null===(A=null==B?void 0:B.margin)||void 0===A?void 0:A.left}},{isCustomRenderer:!!this.getRenderer()}),S=x.textStart,T=x.iconStart,F=x.iconEnd,b=jB(l,E);return this.leftIconPosition={x:T,y:h},this.rightIconPosition={x:F,y:h},{x:S,y:b}},n.prototype.getTextPosition=function(){return this.getContentPosition()},n.prototype.getColResizeArea=function(){return vw(this.spreadsheet,Uv)},n.prototype.getHorizontalResizeAreaName=function(){return"".concat(kv).concat(this.meta.field)},n.prototype.isCrossColumnLeafNode=function(){var e,t=this.spreadsheet.facet.getLayoutResult().colsHierarchy,n=this.meta,r=n.level,A=n.isLeaf;return(null===(e=null==t?void 0:t.sampleNodeForLastLevel)||void 0===e?void 0:e.level)!==r&&A},n.prototype.drawHorizontalResizeArea=function(){var t,n;if(!(0===(null===(n=null===(t=this.spreadsheet.options.style)||void 0===t?void 0:t.colCell)||void 0===n?void 0:n.height))&&this.shouldDrawResizeAreaByType("colCellVertical",this)){var r=this.meta,A=r.y,i=r.height,o=this.getHeaderConfig().position,a=this.getResizeAreaStyle(),s=this.getColResizeArea();if(s&&!this.isCrossColumnLeafNode()){var l=this.getHorizontalResizeAreaName();if(!(null==s?void 0:s.find((function(e){return e.name===l})))){var u=o.y+A,c=this.getResizeAreaWidth(),h=gw({theme:a,type:e.ResizeDirectionType.Vertical,effect:e.ResizeAreaEffect.Field,offsetX:0,offsetY:u,width:c,height:i,meta:this.meta,cell:this}),d=rt(rt({},h.style),{x:0,y:u+i-a.size,width:c});this.horizontalResizeArea?(this.horizontalResizeArea.name=l,this.horizontalResizeArea.appendInfo=h.appendInfo,iB(this.horizontalResizeArea,d)):this.horizontalResizeArea=s.appendChild(new AB({name:l,style:d},h.appendInfo))}}}},n.prototype.getResizeAreaWidth=function(){var e=this.getHeaderConfig(),t=e.cornerWidth,n=void 0===t?0:t,r=e.viewportWidth;return aw.getVerticalBorderWidth(this.spreadsheet)+n+r},n.prototype.shouldAddVerticalResizeArea=function(){if(this.getMeta().isFrozen)return!0;var t,n=this.meta,r=n.x,A=n.y,i=n.width,o=n.height,a=this.getHeaderConfig(),s=a.scrollX,l=void 0===s?0:s,u=a.scrollY,c=a.cornerWidth,h=void 0===c?0:c,d=a.height,f=a.width,p=this.getResizeAreaStyle(),g={x:r+i-p.size,y:A,width:p.size,height:o},v=this.spreadsheet.facet.frozenGroupAreas,y=v[e.FrozenGroupArea.Col].width,C=v[e.FrozenGroupArea.TrailingCol].width;return t=this.spreadsheet.isFrozenRowHeader()?{x:y,y:0,width:f-y-C,height:d}:{x:y-h,y:0,width:f-y-C+h,height:d},yw(g,t,{scrollX:l,scrollY:u})},n.prototype.getVerticalResizeAreaOffset=function(){var t=this.meta,n=t.x,r=t.y,A=this.getHeaderConfig(),i=A.scrollX,o=void 0===i?0:i,a=A.position,s=A.cornerWidth,l=void 0===s?0:s,u=A.viewportWidth,c=this.spreadsheet.isFrozenRowHeader(),h=this.spreadsheet.facet.frozenGroupAreas,d=h[e.FrozenGroupArea.Col],f=h[e.FrozenGroupArea.TrailingCol],p=null==a?void 0:a.x;return this.getMeta().isFrozenHead?p+=n-d.x-(c?0:Math.min(o,l)):this.getMeta().isFrozenTrailing?p+=n-f.x+u-f.width:p+=n-o,{x:p,y:(null==a?void 0:a.y)+r}},n.prototype.drawVerticalResizeArea=function(){if(this.meta.isLeaf&&!this.meta.hideColCellHorizontalResize&&this.shouldDrawResizeAreaByType("colCellHorizontal",this)){var t=this.meta,n=t.width,r=t.height,A=this.getResizeAreaStyle(),i=this.getColResizeArea();if(i)if(this.shouldAddVerticalResizeArea()){var o=this.getVerticalResizeAreaOffset(),a=o.x,s=o.y,l=gw({theme:A,type:e.ResizeDirectionType.Horizontal,effect:e.ResizeAreaEffect.Cell,offsetX:a,offsetY:s,width:n,height:r,meta:this.meta,cell:this}),u=rt(rt({},l.style),{x:a+n-A.size,y:s,height:r,visibility:"visible"});this.verticalResizeArea?(this.verticalResizeArea.appendInfo=l.appendInfo,iB(this.verticalResizeArea,u)):this.verticalResizeArea=i.appendChild(new AB({style:u},l.appendInfo))}else this.verticalResizeArea&&(this.verticalResizeArea.style.visibility="hidden")}},n.prototype.drawResizeArea=function(){this.drawHorizontalResizeArea(),this.drawVerticalResizeArea()},n.prototype.hasHiddenColumnCell=function(){var e=this,t=this.spreadsheet.options.interaction,n=this.spreadsheet.store.get("hiddenColumnsDetail",[]);return!lv.isEmpty(n)&&!lv.isEmpty(null==t?void 0:t.hiddenColumnFields)&&!!n.find((function(t){return fw(null==t?void 0:t.displaySiblingNode,e.meta.id,e.isLastColumn()?"prev":"next")}))},n.prototype.getExpandIconTheme=function(){return this.getStyle().icon},n.prototype.addExpandColumnSplitLine=function(){var e=this.getBBoxByType(),t=e.x,n=e.y,r=e.width,A=e.height,i=this.theme.splitLine,o=i.horizontalBorderColor,a=i.horizontalBorderColorOpacity,s=this.isLastColumn()?t+r:t;um(this,{x1:s,y1:n,x2:s,y2:n+A,stroke:o,lineWidth:1,strokeOpacity:a})},n.prototype.addExpandColumnIconShapes=function(){this.hasHiddenColumnCell()&&(this.addExpandColumnSplitLine(),this.addExpandColumnIcons())},n.prototype.addExpandColumnIcons=function(){var e=this.isLastColumn();this.addExpandColumnIcon(e),this.isAllDisplaySiblingNodeHidden()&&e&&this.addExpandColumnIcon(!1)},n.prototype.addExpandColumnIcon=function(t){var n,r=this,A=this.getExpandColumnIconConfig(t),i=hm(this,rt(rt({},A),{name:"ExpandColIcon",cursor:"pointer",iconStrategy:null===(n=this.spreadsheet.options.csp)||void 0===n?void 0:n.iconStrategy}));i.addEventListener("click",(function(){r.spreadsheet.emit(e.S2Event.COL_CELL_EXPANDED,r.meta,t?"prev":"next")})),i.addEventListener("mouseenter",(function(n){r.spreadsheet.emit(e.S2Event.COL_CELL_EXPAND_ICON_HOVER,{event:n,meta:r.meta,hiddenColumns:pw(r.spreadsheet,r.meta.id,t?"prev":"next")})}))},n.prototype.getExpandColumnIconConfig=function(e){var t=this.getExpandIconTheme().size,n=void 0===t?0:t,r=this.getBBoxByType(),A=r.x,i=r.y,o=r.width,a=A-n;return{x:e?a+o:a,y:i+r.height/2-n/2,width:2*n,height:n}},n.prototype.isLastColumn=function(){return e=this.spreadsheet,t=this.meta.id,n=e.facet.getColLeafNodes(),r=e.facet.getInitColIndexLeafNodes(),A=uw(t),lv.get(lv.last(n),A)===t&&lv.get(lv.last(r),A)!==t;var e,t,n,r,A},n.prototype.isAllDisplaySiblingNodeHidden=function(){var e=this.meta.id,t=this.spreadsheet.store.get("hiddenColumnsDetail",[]),n=t.find((function(t){var n,r=t.displaySiblingNode;return(null===(n=null==r?void 0:r.next)||void 0===n?void 0:n.id)===e})),r=t.find((function(t){var n,r=t.displaySiblingNode;return(null===(n=null==r?void 0:r.prev)||void 0===n?void 0:n.id)===e}));return r&&n},n.prototype.getResizedTextMaxLines=function(){var e,t,n,r,A,i=this.spreadsheet.options.style.colCell;return null!==(r=null!==(t=null===(e=null==i?void 0:i.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(n=null==i?void 0:i.maxLinesByField)||void 0===n?void 0:n[this.meta.field])&&void 0!==r?r:this.getMaxLinesByCustomHeight({isCustomHeight:null===(A=this.meta.extra)||void 0===A?void 0:A.isCustomHeight})},n.prototype.shouldShowDefaultHeaderActionIcon=function(){return this.spreadsheet.options.showDefaultHeaderActionIcon&&this.spreadsheet.isValueInCols()},n.prototype.setHeaderConfig=function(e){t.prototype.setHeaderConfig.call(this,e),this.drawResizeArea()},n}(Yx),Zx=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),Object.defineProperty(n.prototype,"cellType",{get:function(){return e.CellType.CORNER_CELL},enumerable:!1,configurable:!0}),n.prototype.isBolderText=function(){return this.meta.cornerType===e.CornerNodeType.Col},n.prototype.getBorderPositions=function(){return[e.CellBorderPosition.TOP,e.CellBorderPosition.LEFT]},n.prototype.initCell=function(){t.prototype.initCell.call(this),this.resetTextAndConditionIconShapes(),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextShape(),this.drawTreeIcon(),this.drawActionAndConditionIcons(),this.drawBorders(),this.drawResizeArea(),this.update()},n.prototype.afterDrawText=function(){},n.prototype.onTreeIconClick=function(e){Bm(this.spreadsheet.options.device)||this.emitCollapseEvent(e)},n.prototype.emitCollapseEvent=function(t){this.spreadsheet.facet.resetScrollY(),this.spreadsheet.emit(e.S2Event.ROW_CELL_ALL_COLLAPSED__PRIVATE,t)},n.prototype.drawTreeIcon=function(){var t,n,r=this;if(this.showTreeIcon()){var A=(null===(t=this.spreadsheet.options.style)||void 0===t?void 0:t.rowCell).collapseFields,i=void 0===A?{}:A,o=this.getStyle().icon.size,a=void 0===o?0:o,s=this.getTextStyle().fill,l=this.getBBoxByType(e.CellClipBox.CONTENT_BOX),u=this.spreadsheet.facet.getRowNodes(0),c=lv.values(i).filter(Boolean).length===u.length||u.every((function(e){return e.isCollapsed}));this.treeIcon=dm({group:this,iconCfg:{x:l.x,y:this.getIconPosition().y,width:a,height:a,fill:s,iconStrategy:null===(n=this.spreadsheet.options.csp)||void 0===n?void 0:n.iconStrategy},isCollapsed:c,onClick:function(){r.onTreeIconClick(c)}}),Bm(this.spreadsheet.options.device)&&this.addMobileTouchListener((function(){r.emitCollapseEvent(c)}))}},n.prototype.isLastRowCornerCell=function(){var t=this.meta,n=t.cornerType,r=t.field,A=this.spreadsheet.dataSet.fields.rows;return n===e.CornerNodeType.Row&&(this.spreadsheet.isHierarchyTreeType()||lv.last(A)===r)},n.prototype.getResizeAreaEffect=function(){return this.meta.cornerType===e.CornerNodeType.Series?e.ResizeAreaEffect.Series:this.isLastRowCornerCell()&&this.spreadsheet.isHierarchyTreeType()?e.ResizeAreaEffect.Tree:e.ResizeAreaEffect.Field},n.prototype.drawResizeArea=function(){if(this.shouldDrawResizeAreaByType("cornerCellHorizontal",this)){var t=this.getResizeAreaStyle(),n=vw(this.spreadsheet,Mv);if(n){var r=this.getHeaderConfig(),A=r.position,i=r.scrollX,o=void 0===i?0:i,a=r.scrollY,s=void 0===a?0:a,l=r.width,u=r.height,c=this.getBBoxByType(),h=c.x,d=c.y,f=c.width,p=c.height,g=this.meta.cornerType,v={x:h+f-t.size,y:d,width:t.size,height:p},y={x:0,y:0,width:l,height:u};if(g!==e.CornerNodeType.Col&&yw(v,y,{scrollX:o,scrollY:s})){var C=A.x+h-o,B=A.y+(this.isLastRowCornerCell()?0:d),m=gw({theme:t,type:e.ResizeDirectionType.Horizontal,effect:this.getResizeAreaEffect(),offsetX:C,offsetY:B,width:f,height:p,meta:this.meta,cell:this});n.appendChild(new AB({style:rt(rt({},m.style),{x:C+f-t.size,y:B,height:this.isLastRowCornerCell()?u:p})},m.appendInfo))}}}},n.prototype.showTreeIcon=function(){return this.spreadsheet.isHierarchyTreeType()&&this.meta.cornerType===e.CornerNodeType.Row},n.prototype.getTreeIconWidth=function(){var e=this.getStyle().icon,t=e.size,n=e.margin;return this.spreadsheet.isHierarchyTreeType()?t+n.right:0},n.prototype.getMaxTextWidth=function(){return this.getBBoxByType(e.CellClipBox.CONTENT_BOX).width-this.getTreeIconWidth()-this.getActionAndConditionIconWidth()},n.prototype.getContentPosition=function(t){var n=(void 0===t?{}:t).contentWidth,r=void 0===n?this.getActualTextWidth():n,A=this.getBBoxByType(e.CellClipBox.CONTENT_BOX),i=A.x,o=A.y,a=A.height,s=A.width,l=this.getTextStyle(),u=JB({bbox:{x:i+this.getTreeIconWidth(),y:o,width:s-this.getTreeIconWidth(),height:a},textAlign:l.textAlign,textWidth:r,groupedIcons:this.groupedIcons,iconStyle:this.getIconStyle()}),c=u.textX,h=u.leftIconX,d=u.rightIconX,f=jB(A,l.textBaseline),p=this.getStyle().icon.size,g=ZB(void 0===p?0:p,f,l.fontSize,l.textBaseline);return this.leftIconPosition={x:h,y:g},this.rightIconPosition={x:d,y:g},{x:c,y:f}},n.prototype.getTextPosition=function(){return this.getContentPosition()},n.prototype.getFormattedFieldValue=function(){return YB(this.meta,this.spreadsheet.dataSet.getFieldName(this.meta.field))},n.prototype.getResizedTextMaxLines=function(){var e,t,n,r,A,i=this.spreadsheet.options.style.colCell;return null!==(r=null!==(t=null===(e=null==i?void 0:i.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(n=null==i?void 0:i.maxLinesByField)||void 0===n?void 0:n[this.meta.field])&&void 0!==r?r:this.getMaxLinesByCustomHeight({isCustomHeight:null===(A=this.meta.extra)||void 0===A?void 0:A.isCustomHeight})},n}(Yx),Jx=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),Object.defineProperty(n.prototype,"cellType",{get:function(){return e.CellType.DATA_CELL},enumerable:!1,configurable:!0}),n.prototype.isShallowRender=function(){return t.prototype.isShallowRender.call(this)||this.meta.shallowRender||!1},n.prototype.isMultiData=function(){var e=this.getFieldValue();return lv.isObject(e)},n.prototype.getBorderPositions=function(){return[e.CellBorderPosition.BOTTOM,e.CellBorderPosition.RIGHT]},n.prototype.getValueRange=function(){return this.spreadsheet.dataSet.getValueRangeByField(this.meta.valueField)},n.prototype.handleByStateName=function(e,t){Cw(e,this)&&this.updateByState(t)},n.prototype.handleSearchResult=function(t){Cw(t,this)&&(lv.find(t,(function(e){return null==e?void 0:e.isTarget})).id===this.getMeta().id?this.updateByState(e.InteractionStateName.HIGHLIGHT):this.updateByState(e.InteractionStateName.SEARCH_RESULT))},n.prototype.handleSelect=function(t){var n,r;switch(null===(n=null==t?void 0:t[0])||void 0===n?void 0:n.type){case e.CellType.COL_CELL:this.changeRowColSelectState("colIndex");break;case e.CellType.ROW_CELL:this.changeRowColSelectState("rowIndex");break;case e.CellType.DATA_CELL:mw(this.spreadsheet)?Tw(t,this,this.spreadsheet):Cw(t,this)?this.updateByState(e.InteractionStateName.SELECTED):(null===(r=this.spreadsheet.options.interaction)||void 0===r?void 0:r.selectedCellsSpotlight)&&this.updateByState(e.InteractionStateName.UNSELECTED)}},n.prototype.isDisableHover=function(t){return t.type!==e.CellType.DATA_CELL},n.prototype.handleHover=function(t){var n=lv.first(t);if(this.isDisableHover(n))this.hideInteractionShape();else{var r=this.spreadsheet.interaction.getHoverHighlight(),A=r.currentRow,i=r.currentCol;if(A||i){var o=this.meta.colIndex,a=this.meta.rowIndex;i&&o===(null==n?void 0:n.colIndex)||A&&a===(null==n?void 0:n.rowIndex)?this.updateByState(e.InteractionStateName.HOVER):this.hideInteractionShape()}var s=this.getMeta(),l=s.id,u=s.rowIndex,c=s.colIndex;lv.isEqual(n.id,l)&&lv.isEqual(n.rowIndex,u)&&lv.isEqual(n.colIndex,c)&&this.updateByState(e.InteractionStateName.HOVER_FOCUS)}},n.prototype.update=function(){var t=this.spreadsheet.interaction.getCurrentStateName();if(t!==e.InteractionStateName.ALL_SELECTED){var n=this.spreadsheet.interaction.getCells();if(!lv.isEmpty(n)&&t)switch(t){case e.InteractionStateName.SELECTED:case e.InteractionStateName.DATA_CELL_BRUSH_SELECTED:this.handleSelect(n);break;case e.InteractionStateName.HOVER_FOCUS:case e.InteractionStateName.HOVER:this.handleHover(n);break;case e.InteractionStateName.SEARCH_RESULT:this.handleSearchResult(n);break;default:this.handleByStateName(n,t)}}else this.updateByState(e.InteractionStateName.SELECTED)},n.prototype.setMeta=function(e){t.prototype.setMeta.call(this,e),this.isShallowRender()||this.initCell()},n.prototype.drawTextShape=function(){t.prototype.drawTextShape.call(this),this.isShallowRender()||this.drawLinkField(this.meta)},n.prototype.initCell=function(){this.resetTextAndConditionIconShapes(),this.generateIconConfig(),this.shouldHideData=!!this.shouldHideRowSubtotalData(),this.conditionFill=this.getBackgroundConditionFill(),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.shouldHideData||this.drawConditionIntervalShape(),this.shouldHideData?this.afterDrawText():this.drawTextOrCustomRenderer()},n.prototype.afterDrawText=function(){this.shouldHideData||this.drawConditionIconShapes(),this.drawBorders(),this.drawInteractiveBorderShape(),this.update()},n.prototype.generateIconConfig=function(){var e,t=this.findFieldCondition(null===(e=this.conditions)||void 0===e?void 0:e.icon),n=t&&t.mapping&&{name:"",position:nm(t)};this.groupedIcons=XB([],n)},n.prototype.getTextStyle=function(){var e=this.getCellTextWordWrapStyle(),t=this.meta.isTotals,n=this.theme.dataCell,r=t?null==n?void 0:n.bolderText:null==n?void 0:n.text;return this.getContainConditionMappingResultTextStyle(rt(rt({},e),r))},n.prototype.drawConditionIntervalShape=function(){this.conditionIntervalShape=bm(this)},n.prototype.shouldHideRowSubtotalData=function(){var e,t;if(!this.spreadsheet.isHierarchyTreeType())return!1;var n=this.meta,r=n.rowId,A=n.rowIndex,i=this.spreadsheet.store.get("drillDownIdPathMap");if(null==i?void 0:i.has(r))return!1;var o=(null!==(e=this.spreadsheet.options.totals)&&void 0!==e?e:{}).row,a=void 0===o?{}:o,s=null===(t=this.spreadsheet.facet)||void 0===t?void 0:t.getRowLeafNodeByIndex(A),l=!(null==s?void 0:s.isGrandTotals)&&(null==s?void 0:s.isTotals);return!a.showSubTotals&&l},n.prototype.getFormattedFieldValue=function(){var e;if(this.shouldHideData)return{value:null,formattedValue:Nv};var t=this.meta,n=t.rowId,r=t.valueField,A=t.fieldValue,i=t.data,o=t.id,a=null===(e=this.spreadsheet.dataSet.displayFormattedValueMap)||void 0===e?void 0:e.get(o),s=this.spreadsheet.dataSet.getFieldMeta(n)?n:r,l=this.spreadsheet.dataSet.getFieldFormatter(s);return{value:A,formattedValue:null!=a?a:l(A,i,this.meta)}},n.prototype.getMaxTextWidth=function(){return this.getBBoxByType(e.CellClipBox.CONTENT_BOX).width-this.getActionAndConditionIconWidth()},n.prototype.getContentPosition=function(t){var n=(void 0===t?{}:t).contentWidth,r=void 0===n?this.getActualTextWidth():n,A=this.getBBoxByType(e.CellClipBox.CONTENT_BOX),i=this.getTextStyle(),o=this.getIconStyle(),a=JB({bbox:A,iconStyle:o,textWidth:r,textAlign:i.textAlign,groupedIcons:this.groupedIcons,isCustomRenderer:!!this.getRenderer()}),s=a.textX,l=a.leftIconX,u=a.rightIconX,c=jB(A,i.textBaseline),h=ZB(o.size,c,i.fontSize,i.textBaseline);return this.iconPosition={x:lv.isEmpty(this.groupedIcons.left)?u:l,y:h},{x:s,y:c}},n.prototype.getTextPosition=function(){return this.getContentPosition()},n.prototype.getIconPosition=function(){return this.iconPosition},n.prototype.getBackgroundColor=function(){var e=this.getCrossBackgroundColor(this.meta.rowIndex),t=e.backgroundColor,n=e.backgroundColorOpacity;return this.shouldHideData?{backgroundColor:t,backgroundColorOpacity:n,intelligentReverseTextColor:!1}:lv.merge({backgroundColor:t,backgroundColorOpacity:n},this.conditionFill)},n.prototype.changeRowColSelectState=function(t){var n,r,A,i=this.spreadsheet.interaction,o=lv.get(this.meta,t),a=i.getState(),s=a.nodes,l=void 0===s?[]:s,u=a.cells,c=void 0===u?[]:u,h=!1;this.spreadsheet.isTableMode()&&l.length?h=((null===(r=null===(n=l[0])||void 0===n?void 0:n.hierarchy)||void 0===r?void 0:r.getLeaves())||[]).some((function(e,t){return!!l.some((function(t){return t===e}))&&t===o})):h=lt(lt([],st(l),!1),st(c),!1).some((function(e){return lv.get(e,t)===o}));h?this.updateByState(e.InteractionStateName.SELECTED):(null===(A=this.spreadsheet.options.interaction)||void 0===A?void 0:A.selectedCellsSpotlight)?this.updateByState(e.InteractionStateName.UNSELECTED):this.hideInteractionShape()},n.prototype.drawBorders=function(){this.meta.isFrozenCorner&&Gm.prototype.drawBorders.call(this)},n.prototype.findFieldCondition=function(e){return void 0===e&&(e=[]),rm(e,this.meta.valueField)},n.prototype.mappingValue=function(e){var t,n=this.meta.fieldValue,r=this.spreadsheet.isTableMode()?this.spreadsheet.dataSet.getCellData({query:{rowIndex:this.meta.rowIndex}}):Lx.getFieldValue(this.meta.data);return null===(t=e.mapping)||void 0===t?void 0:t.call(e,n,r,this)},n.prototype.updateByState=function(n){if(t.prototype.updateByState.call(this,n,this),n===e.InteractionStateName.UNSELECTED){var r=lv.get(this.theme,"".concat(this.cellType,".cell.interactionState.").concat(n));r&&this.toggleConditionIntervalShapeOpacity(r.opacity)}},n.prototype.clearUnselectedState=function(){t.prototype.clearUnselectedState.call(this),this.toggleConditionIntervalShapeOpacity(1)},n.prototype.toggleConditionIntervalShapeOpacity=function(e){cm(this.conditionIntervalShape,wy.backgroundOpacity,e),cm(this.conditionIconShapes,wy.opacity,e)},n.prototype.getResizedTextMaxLines=function(){var e,t,n,r,A,i=this.spreadsheet.options.style.rowCell;return null!==(r=null!==(t=null===(e=null==i?void 0:i.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(n=null==i?void 0:i.maxLinesByField)||void 0===n?void 0:n[this.meta.rowId])&&void 0!==r?r:this.getMaxLinesByCustomHeight({isCustomHeight:this.meta.height!==(null===(A=Gy.dataCell)||void 0===A?void 0:A.height)})},n.prototype.getMetaField=function(){return this.meta.valueField},n}(Gm),qx=function(e,t,n,r){var A=[e,t],i=[e+n,t],o=[e+n,t+r],a=[e,t+r];return[[A,i],[i,o],[o,a],[a,A]]},$x=function(e){var t=[];return lv.forEach(e,(function(n){var r=[n[1],n[0]];JSON.stringify(e).includes(JSON.stringify(r))||t.push(n)})),t},eS=function(e,t){return lv.find(t,(function(t){return lv.isEqual(t[0],e[1])}))},tS=function(e){var t=[];e.forEach((function(e){var n=e.getMeta(),r=n.x,A=n.y,i=n.width,o=n.height;t=t.concat(qx(r,A,i,o))}));for(var n=[],r=(t=$x(t))[0],A=r,i=[];!lv.isEqual(r,i);)n=n.concat(A),A=i=eS(A,t);return n},nS=function(e){var t=[],n=[],r=[];return e.forEach((function(r){var A=st(r.position||[],2),i=A[0],o=A[1];lv.find(e,(function(e){var t,n;return(null===(t=e.position)||void 0===t?void 0:t[0])===i+1&&(null===(n=e.position)||void 0===n?void 0:n[1])===o}))||n.push(r),lv.find(e,(function(e){var t,n;return(null===(t=e.position)||void 0===t?void 0:t[1])===o+1&&(null===(n=e.position)||void 0===n?void 0:n[0])===i}))||t.push(r)})),t.forEach((function(n){var A=st(n.position||[],2),i=A[0],o=A[1],a=lv.find(e,(function(e){var t,n;return(null===(t=e.position)||void 0===t?void 0:t[0])===i-1&&(null===(n=e.position)||void 0===n?void 0:n[1])===o}));a&&!lv.includes(t,a)&&r.push(a)})),{bottom:n,right:t,bottomRightCornerCell:r}},rS=function(t){function n(e,n,r){return t.call(this,r,e,n)||this}return nt(n,t),Object.defineProperty(n.prototype,"cellType",{get:function(){return e.CellType.MERGED_CELL},enumerable:!1,configurable:!0}),n.prototype.handleRestOptions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=st(e,1)[0];this.cells=n},n.prototype.update=function(){},n.prototype.initCell=function(){this.resetTextAndConditionIconShapes(),this.drawBackgroundShape(),this.drawTextOrCustomRenderer()},n.prototype.afterDrawText=function(){this.drawBorders()},n.prototype.drawBackgroundShape=function(){var e=tS(this.cells),t=this.theme.dataCell.cell;this.backgroundShape=om(this,{points:e,fill:t.backgroundColor})},n.prototype.drawTextShape=function(){if(!lv.isEmpty(this.meta))return this.isMultiData()?Dm(this):void t.prototype.drawTextShape.call(this)},n.prototype.drawBorders=function(){var t=this,n=nS(this.cells),r=n.right,A=n.bottom,i=n.bottomRightCornerCell;r.forEach((function(n){var r,A=$B(e.CellBorderPosition.RIGHT,n.getBBoxByType(),null===(r=n.getStyle())||void 0===r?void 0:r.cell),i=A.position,o=A.style;um(t,rt(rt({},i),o))})),A.forEach((function(n){var r,A=$B(e.CellBorderPosition.BOTTOM,n.getBBoxByType(),null===(r=n.getStyle())||void 0===r?void 0:r.cell),i=A.position,o=A.style;um(t,rt(rt({},i),o))})),i.forEach((function(e){var n,r=e.getBBoxByType(),A=r.x,i=r.y,o=r.width,a=r.height,s=null===(n=e.getStyle())||void 0===n?void 0:n.cell,l=s.horizontalBorderWidth,u=void 0===l?0:l,c=s.verticalBorderWidth,h=void 0===c?0:c,d=s.verticalBorderColor,f=A+o-h/2;um(t,{x1:f,x2:f,y1:i+a-u,y2:i+a,lineWidth:h,stroke:d,strokeOpacity:h})}))},n}(Jx),AS=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),Object.defineProperty(n.prototype,"cellType",{get:function(){return e.CellType.ROW_CELL},enumerable:!1,configurable:!0}),n.prototype.getBorderPositions=function(){return[e.CellBorderPosition.BOTTOM,e.CellBorderPosition.LEFT]},n.prototype.initCell=function(){t.prototype.initCell.call(this),this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawTextOrCustomRenderer()},n.prototype.afterDrawText=function(){this.drawActionAndConditionIcons(),this.drawTreeIcon(),this.drawTreeLeafNodeAlignDot(),this.drawBorders(),this.drawResizeAreaInLeaf(),this.update()},n.prototype.getBackgroundColor=function(){var e=this.getCrossBackgroundColor(this.meta.rowIndex),t=e.backgroundColor,n=e.backgroundColorOpacity;return lv.merge({backgroundColor:t,backgroundColorOpacity:n},this.getBackgroundConditionFill())},n.prototype.getBBoxByType=function(n){var r,A,i,o;void 0===n&&(n=e.CellClipBox.BORDER_BOX);var a=t.prototype.getBBoxByType.call(this,n);if(!this.spreadsheet.isHierarchyGridTreeType()||!this.meta.isCollapsed)return a;for(var s=this.meta.hierarchy,l=(null==s?void 0:s.sampleNodesForAllLevels)||[],u=0,c=this.meta.level;c<=(null!==(r=null==s?void 0:s.maxLevel)&&void 0!==r?r:0);c++){var h=l[c];u+=null!==(A=null==h?void 0:h.width)&&void 0!==A?A:0}if(n===e.CellClipBox.CONTENT_BOX){var d=this.getStyle().cell.padding;u-=(null!==(i=null==d?void 0:d.left)&&void 0!==i?i:0)+(null!==(o=null==d?void 0:d.right)&&void 0!==o?o:0)}return rt(rt({},a),{width:u||a.width})},n.prototype.showTreeIcon=function(){return!(!this.spreadsheet.isHierarchyTreeType()&&!this.spreadsheet.isHierarchyGridTreeType())&&(!!this.meta.isCollapsed||!this.meta.isLeaf)},n.prototype.showTreeLeafNodeAlignDot=function(){var e,t;return(null===(t=null===(e=this.spreadsheet.options.style)||void 0===e?void 0:e.rowCell)||void 0===t?void 0:t.showTreeLeafNodeAlignDot)&&this.spreadsheet.isHierarchyTreeType()&&!this.spreadsheet.isHierarchyGridTreeType()},n.prototype.getParentTreeIconCfg=function(){var e,t;if(this.showTreeLeafNodeAlignDot()&&this.spreadsheet.isHierarchyTreeType()&&this.meta.isLeaf){var n=null===(t=null===(e=this.meta.parent)||void 0===e?void 0:e.belongsCell)||void 0===t?void 0:t.getTreeIcon();return null==n?void 0:n.style}},n.prototype.onTreeIconClick=function(){var e=this.meta,t=e.isCollapsed,n=e.hierarchy;if(!Bm(this.spreadsheet.options.device)){if(!t){var r=this.spreadsheet.facet.getScrollOffset().scrollY,A=this.spreadsheet.facet.panelBBox.viewportHeight||0,i=(s=this.meta,l=0,null==(u=s.children)||u.forEach((function(e){l+=e.height||0})),l),o=n.height-i;if(r>0&&r+A>o){var a=o-A;this.spreadsheet.facet.setScrollOffset({scrollY:a>0?a:0})}}var s,l,u;this.emitCollapseEvent()}},n.prototype.emitCollapseEvent=function(){this.spreadsheet.emit(e.S2Event.ROW_CELL_COLLAPSED__PRIVATE,{isCollapsed:!this.meta.isCollapsed,node:this.meta})},n.prototype.drawTreeIcon=function(){var t,n=this;if(this.showTreeIcon()){var r=this.meta.isCollapsed,A=this.getBBoxByType(e.CellClipBox.CONTENT_BOX).x,i=this.getTextStyle().fill,o=this.getStyle().icon.size,a=A+this.getContentIndent(),s=this.getIconPosition().y;this.treeIcon=dm({group:this,iconCfg:{x:a,y:s,width:o,height:o,fill:i,iconStrategy:null===(t=this.spreadsheet.options.csp)||void 0===t?void 0:t.iconStrategy},isCollapsed:r,onClick:function(){n.onTreeIconClick()}}),Bm(this.spreadsheet.options.device)&&this.addMobileTouchListener((function(){n.emitCollapseEvent()}))}},n.prototype.drawTreeLeafNodeAlignDot=function(){var e=this.getParentTreeIconCfg();if(e){var t=this.getStyle().icon,n=t.size,r=t.margin,A=e.x+n+r.right,i=this.getTextPosition().y,o=this.getTextStyle(),a=o.fill,s=o.fontSize,l=n/5;this.treeLeafNodeAlignDot=sm(this,{cx:A+n/2,cy:i+(s-l)/2,r:l,fill:a,fillOpacity:.3})}},n.prototype.isBolderText=function(){var e=this.meta,t=e.isLeaf,n=e.isTotals,r=e.level;return!t&&0===r||n},n.prototype.getResizesArea=function(){return vw(this.spreadsheet,bv)},n.prototype.drawResizeAreaInLeaf=function(){if(this.meta.isLeaf&&!this.meta.hideRowCellVerticalResize&&this.shouldDrawResizeAreaByType("rowCellVertical",this)){var t=this.getBBoxByType(),n=t.x,r=t.y,A=t.width,i=t.height,o=this.getResizeAreaStyle(),a=this.getResizesArea();if(a){var s=this.getHeaderConfig(),l=s.position,u=s.width,c=s.viewportHeight,h=s.scrollX,d=void 0===h?0:h,f=s.scrollY,p=void 0===f?0:f,g={x:n,y:r+i-o.size,width:A,height:o.size},v=this.meta.isFrozen,y=this.spreadsheet.facet.frozenGroupAreas,C=y[e.FrozenGroupArea.Row],B=y[e.FrozenGroupArea.TrailingRow],m={x:0,y:v?0:C.height,width:u,height:v?Number.POSITIVE_INFINITY:c-C.height-B.height};if(yw(g,m,{scrollX:d,scrollY:v?0:p})){var w=this.getHorizontalResizeAreaOffset(),E=w.offsetX,x=w.offsetY,S=this.spreadsheet.isFrozenRowHeader()?u-l.x-(n-d):A,T=gw({theme:o,type:e.ResizeDirectionType.Vertical,effect:e.ResizeAreaEffect.Cell,offsetX:E,offsetY:x,width:A,height:i,meta:this.meta,cell:this});a.appendChild(new AB({style:rt(rt({},T.style),{x:E,y:x+i-o.size,width:S})},T.appendInfo))}}}},n.prototype.getHorizontalResizeAreaOffset=function(){var t=this.getHeaderConfig(),n=t.position,r=t.viewportHeight,A=t.scrollX,i=void 0===A?0:A,o=t.scrollY,a=void 0===o?0:o,s=this.getBBoxByType(),l=s.x,u=s.y,c=this.spreadsheet.facet.frozenGroupAreas,h=c[e.FrozenGroupArea.Row],d=c[e.FrozenGroupArea.TrailingRow],f=n.x+l-i,p=n.y;return this.meta.isFrozenHead?p+=u-h.y:this.meta.isFrozenTrailing?p+=r-d.height+u-d.y:p+=u-a,{offsetX:f,offsetY:p}},n.prototype.getContentIndent=function(){if(!this.spreadsheet.isHierarchyTreeType()||this.spreadsheet.isHierarchyGridTreeType())return 0;for(var e=this.getStyle(),t=e.icon,n=e.cell,r=t.size+t.margin.right,A=this.meta.parent,i=0;A;)0!==A.height&&(i+=r),A=A.parent;return this.showTreeLeafNodeAlignDot()&&(i+=this.isTreeLevel()?0:n.padding.right+t.margin.right),i},n.prototype.getTextIndent=function(){var e=this.getStyle().icon,t=e.size,n=e.margin;return this.getContentIndent()+(this.showTreeIcon()||this.isTreeLevel()&&this.showTreeLeafNodeAlignDot()?t+n.right:0)},n.prototype.isTreeLevel=function(){return lv.find(lv.get(this.meta,"parent.children"),(function(e){return!e.isLeaf}))},n.prototype.getMaxTextWidth=function(){return this.getBBoxByType(e.CellClipBox.CONTENT_BOX).width-this.getTextIndent()-this.getActionAndConditionIconWidth()},n.prototype.getTextArea=function(){var t=this.getBBoxByType(e.CellClipBox.CONTENT_BOX),n=this.getTextIndent();return rt(rt({},t),{x:t.x+n,width:t.width-n})},n.prototype.handleViewport=function(){if(this.meta.isFrozen)return{start:0,size:Number.POSITIVE_INFINITY};var t=this.getHeaderConfig(),n=t.scrollY,r=t.viewportHeight,A=this.spreadsheet.facet.frozenGroupAreas,i=A[e.FrozenGroupArea.Row].height;return{start:n+i,size:r-i-A[e.FrozenGroupArea.TrailingRow].height}},n.prototype.getContentPosition=function(e){var t=(void 0===e?{}:e).contentWidth,n=void 0===t?this.getActualTextWidth():t,r=this.getTextArea(),A=this.getTextStyle(),i=this.getStyle(),o=i.cell,a=i.icon,s=this.handleViewport(),l=this.getActualTextHeight(),u=lw(s,{start:r.y,size:r.height},{align:sw(A.textBaseline),size:{textSize:l},padding:{start:o.padding.top,end:o.padding.bottom}}).textStart,c=JB({bbox:r,textWidth:n,textAlign:A.textAlign,groupedIcons:this.groupedIcons,iconStyle:a,isCustomRenderer:!!this.getRenderer()}),h=c.textX,d=c.leftIconX,f=c.rightIconX,p=ZB(null==a?void 0:a.size,u,l,A.textBaseline);return this.leftIconPosition={x:d,y:p},this.rightIconPosition={x:f,y:p},{x:h,y:u}},n.prototype.getTextPosition=function(){return this.getContentPosition()},n.prototype.getResizedTextMaxLines=function(){var e,t,n,r,A,i=this.spreadsheet.options.style.rowCell;return null!==(r=null!==(t=null===(e=null==i?void 0:i.maxLinesByField)||void 0===e?void 0:e[this.meta.id])&&void 0!==t?t:null===(n=null==i?void 0:i.maxLinesByField)||void 0===n?void 0:n[this.meta.field])&&void 0!==r?r:this.getMaxLinesByCustomHeight({isCustomHeight:null===(A=this.meta.extra)||void 0===A?void 0:A.isCustomHeight})},n.prototype.shouldShowDefaultHeaderActionIcon=function(){return this.spreadsheet.options.showDefaultHeaderActionIcon&&!this.spreadsheet.isValueInCols()},n.prototype.setHeaderConfig=function(e){t.prototype.setHeaderConfig.call(this,e)},n}(Yx),iS=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),Object.defineProperty(n.prototype,"cellType",{get:function(){return e.CellType.ROW_CELL},enumerable:!1,configurable:!0}),n.prototype.getBorderPositions=function(){return[e.CellBorderPosition.LEFT,e.CellBorderPosition.BOTTOM]},n.prototype.initCell=function(){this.drawBackgroundShape(),this.drawInteractiveBgShape(),this.drawInteractiveBorderShape(),this.drawBorders(),this.drawTextShape(),this.update()},n.prototype.getBackgroundColor=function(){var e=this.getCrossBackgroundColor(this.meta.rowIndex);return{backgroundColor:e.backgroundColor,backgroundColorOpacity:e.backgroundColorOpacity,intelligentReverseTextColor:!1}},n.prototype.getTextStyle=function(){var t,n=this.getCellTextWordWrapStyle(e.CellType.SERIES_NUMBER_CELL),r=null===(t=this.getStyle())||void 0===t?void 0:t.seriesText;return rt(rt({},n),r)},n.prototype.getFormattedFieldValue=function(){var e,t=this.meta,n=t.value,r=t.field,A=this.spreadsheet.dataSet.getFieldFormatter(r);return{value:n,formattedValue:null!==(e=null==A?void 0:A(n,void 0,this.meta))&&void 0!==e?e:n}},n.prototype.getMaxTextWidth=function(){return this.getBBoxByType(e.CellClipBox.CONTENT_BOX).width},n.prototype.isBolderText=function(){return!1},n.prototype.findFieldCondition=function(){},n.prototype.mappingValue=function(){},n.prototype.getIconPosition=function(){return{x:0,y:0}},n}(AS),oS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.handleRestOptions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=st(e,1)[0];this.headerConfig=rt({},n);var r=this.meta.field,A=this.spreadsheet.dataCfg.sortParams,i=lv.find(A,(function(e){return(null==e?void 0:e.sortFieldId)===r})),o=Wx(i,!0);this.headerConfig.sortParam=rt(rt(rt({},this.headerConfig.sortParam),i||{}),{type:o})},t.prototype.getFormattedFieldValue=function(){return YB(this.meta,this.spreadsheet.dataSet.getFieldName(this.meta.field))},t.prototype.isSortCell=function(){return!0},t.prototype.showSortIcon=function(){var e=this.meta.extra,t=this.spreadsheet.options.showDefaultHeaderActionIcon;return(null==e?void 0:e.isCustomNode)?t&&this.meta.isLeaf:t},t.prototype.getTextStyle=function(){var e,t=this.getCellTextWordWrapStyle(),n=null===(e=this.getStyle())||void 0===e?void 0:e.bolderText;return rt(rt({},t),n)},t.prototype.getHorizontalResizeAreaName=function(){return"".concat(kv).concat(this.meta.id)},t.prototype.drawBackgroundShape=function(){var e=this.getStyle().cell||{},t=e.backgroundColor,n=e.backgroundColorOpacity;this.backgroundShape=im(this,rt(rt({},this.getBBoxByType()),{fill:t,fillOpacity:n}))},t.prototype.drawTextOrCustomRenderer=function(){this.drawTextShape(),this.afterDrawText()},t}(jx),aS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.getStyle=function(e){var t;return e?lv.get(this.theme,e):null===(t=this.theme)||void 0===t?void 0:t.cornerCell},t.prototype.showSortIcon=function(){return!1},t}(oS),sS=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.getLinkFieldStyle=function(){return this.theme.rowCell.text.linkTextFill},n.prototype.getTextStyle=function(){if(this.meta.valueField===sy){var n=this.getCellTextWordWrapStyle(e.CellType.SERIES_NUMBER_CELL),r=this.theme.rowCell.seriesText;return rt(rt({},n),r)}return t.prototype.getTextStyle.call(this)},n.prototype.shouldDrawResizeArea=function(){var e="".concat(this.meta.rowIndex),t=vw(this.spreadsheet,bv);return!(null==t?void 0:t.getElementById(e))},n.prototype.drawResizeArea=function(){if(this.shouldDrawResizeArea()){var t=vw(this.spreadsheet,bv);if(t){var n=this.getMeta().rowIndex,r=this.spreadsheet.facet.getCellRange(),A=this.spreadsheet.facet.getFrozenOptions(),i=A.rowCount,o=A.trailingRowCount,a=Ym(n,r.start,i),s=jm(n,r.end,o),l=a||s,u=this.getBBoxByType(),c=u.y,h=u.height,d=this.spreadsheet.facet.panelBBox,f=d.x,p=d.y,g=d.viewportWidth,v=d.viewportHeight,y=this.spreadsheet.facet.getScrollOffset().scrollY,C=this.spreadsheet.facet.getPaginationScrollY(),B=this.spreadsheet.facet.frozenGroupAreas,m=B[e.FrozenGroupArea.Row],w=B[e.FrozenGroupArea.TrailingRow],E=this.getResizeAreaStyle(),x=f+g,S={x:0,y:l?0:m.height,width:x,height:l?Number.POSITIVE_INFINITY:v-m.height-w.height},T={x:0,y:c+h-E.size,width:x,height:E.size};if(yw(T,S,{scrollX:0,scrollY:l?0:C+y})){var F=p;F+=a?c-m.y:s?v-w.height+c-w.y:c-C-y;var b=gw({theme:E,type:e.ResizeDirectionType.Vertical,effect:e.ResizeAreaEffect.Cell,offsetX:0,offsetY:F,width:x,height:h,meta:this.meta,cell:this});t.appendChild(new AB({style:rt(rt({},b.style),{x:0,y:F+h-E.size,width:x})},b.appendInfo))}}}},n.prototype.isDisableHover=function(t){return(null==t?void 0:t.type)===e.CellType.COL_CELL},n.prototype.getResizedTextMaxLines=function(){var e,t,n,r,A,i=this.spreadsheet,o=i.facet,a=i.options.style.rowCell,s=this.meta,l=s.id,u=s.rowId,c=s.rowIndex;return null!==(r=null!==(t=null===(e=null==a?void 0:a.maxLinesByField)||void 0===e?void 0:e[l])&&void 0!==t?t:null===(n=null==a?void 0:a.maxLinesByField)||void 0===n?void 0:n[u])&&void 0!==r?r:this.getMaxLinesByCustomHeight({isCustomHeight:null===(A=null==o?void 0:o.customRowHeightStatusMap)||void 0===A?void 0:A[c]})},n}(Jx),lS=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),Object.defineProperty(n.prototype,"cellType",{get:function(){return e.CellType.DATA_CELL},enumerable:!1,configurable:!0}),n}(sS),uS=function(){function t(t){var n=this;this.displayFormattedValueMap=new Map,this.getField=function(e){return(lv.isString(e)?e:null==e?void 0:e.field)||e},this.getFieldMeta=lv.memoize((function(e,t){var r=n.getField(e);return lv.find(n.meta||t,(function(e){var t=e.field;return t instanceof RegExp?t.test(r):lv.isArray(t)?t.includes(r):t===r}))})),this.getCustomFieldDescription=function(t){var r,A;if(t){var i=null===(r=t.getMeta)||void 0===r?void 0:r.call(t);if(!(null==i?void 0:i.isTotals)){if(t.cellType===e.CellType.DATA_CELL){var o=lv.find(null==i?void 0:i.spreadsheet.dataCfg.meta,{field:(null==i?void 0:i.field)||(null==i?void 0:i.value)||(null==i?void 0:i.valueField)});return n.getFieldDescription(null==o?void 0:o.field)}return(null===(A=null==i?void 0:i.extra)||void 0===A?void 0:A.description)||n.getFieldDescription(null==i?void 0:i.field)}}},this.spreadsheet=t}return t.prototype.getFieldName=function(e,t){var n,r,A,i;if(e===sy)return null===(n=this.spreadsheet)||void 0===n?void 0:n.getSeriesNumberText();var o,a=this.getField(e);(null===(r=this.spreadsheet)||void 0===r?void 0:r.isCustomHeaderFields())&&(o=null===(i=null===(A=this.spreadsheet)||void 0===A?void 0:A.facet)||void 0===i?void 0:i.getHeaderNodes().find((function(e){var t;return e.field===a&&(null===(t=null==e?void 0:e.extra)||void 0===t?void 0:t.isCustomNode)})));var s=(null==o?void 0:o.value)||(lv.isString(e)?e:null==e?void 0:e.title)||e;return lv.get(this.getFieldMeta(a,this.meta),"name",Mm(null!=t?t:s))},t.prototype.getCustomRowFieldName=function(t){var n;if(t){var r=null===(n=t.getMeta)||void 0===n?void 0:n.call(t);if(t.cellType===e.CellType.DATA_CELL){var A=this.spreadsheet.facet.getRowNodeByIndex(null==r?void 0:r.rowIndex);return(null==A?void 0:A.value)||this.getFieldName(null==A?void 0:A.field)}return(null==r?void 0:r.value)||this.getFieldName(null==r?void 0:r.field)}},t.prototype.getFieldFormatter=function(e){var t=this,n=this.getField(e),r=lv.get(this.getFieldMeta(n,this.meta),"formatter",lv.identity);return function(e,n,A){var i,o,a=Nm(A,null===(o=null===(i=t.spreadsheet)||void 0===i?void 0:i.options)||void 0===o?void 0:o.placeholder);return Rm(null==r?void 0:r(e,n,A),a)}},t.prototype.getFieldDescription=function(e){var t=this.getField(e);return lv.get(this.getFieldMeta(t,this.meta),"description")},t.prototype.setDataCfg=function(e){var t,n,r;null===(r=null===(n=null===(t=this.getFieldMeta)||void 0===t?void 0:t.cache)||void 0===n?void 0:n.clear)||void 0===r||r.call(n);var A=this.processDataCfg(e),i=A.fields,o=A.meta,a=A.data,s=A.sortParams,l=A.filterParams;this.fields=i,this.meta=o,this.originData=a,this.sortParams=s,this.filterParams=l,this.displayData=this.originData,this.indexesData={}},t.prototype.processMeta=function(e,t){var n,r;return void 0===e&&(e=[]),lt(lt([],st(e),!1),[Nw(e,null===(r=null===(n=this.spreadsheet)||void 0===n?void 0:n.options)||void 0===r?void 0:r.cornerExtraFieldText,t)],!1)},t.prototype.getDisplayDataSet=function(){return this.displayData||[]},t.prototype.isEmpty=function(){return lv.isEmpty(this.getDisplayDataSet())},t.prototype.getEmptyViewIndexes=function(){return[]},t.prototype.getValueRangeByField=function(e){var t,n,r,A=(n=this.spreadsheet,r=e,n.store.get(Kv,zv)[r]);if(A)return A;var i=lv.compact(lv.map(this.originData,(function(t){var n=t[e];return lv.isNil(n)?null:Number.parseFloat(n)}))),o={maxValue:lv.max(i),minValue:lv.min(i)};return function(e,t){var n=e.store.get(Kv,zv);e.store.set(Kv,rt(rt({},n),t))}(this.spreadsheet,((t={})[e]=o,t)),o},t.prototype.moreThanOneValue=function(){var e,t;return(null===(t=null===(e=this.fields)||void 0===e?void 0:e.values)||void 0===t?void 0:t.length)>1},t}(),cS="".concat(Gv,"-offscreen-canvas"),hS=function(){if(!ym())return null;var e=document.getElementById(cS);return e||((e=document.createElement("canvas")).id=cS,e.style.display="none",document.body.appendChild(e),e)},dS=function(){var e;ym()&&(null===(e=document.getElementById(cS))||void 0===e||e.remove())},fS=function(e,t,n,r){var A,i,o=null==r?void 0:r.size,a=null==r?void 0:r.margin,s=0;return(s=e.options.showDefaultHeaderActionIcon?1:null!==(i=null===(A=VB(e.options.headerActionIcons,t,n))||void 0===A?void 0:A.icons.length)&&void 0!==i?i:0)*(o+a.left)+(s>0?a.right:0)},pS=function(e,t,n){var r,A,i,o,a=(null===(A=null===(r=n.icon)||void 0===r?void 0:r.margin)||void 0===A?void 0:A.left)||0,s=(null===(o=null===(i=n.icon)||void 0===i?void 0:i.margin)||void 0===o?void 0:o.right)||0,l=e.store.get("hiddenColumnsDetail",[]),u=!1,c=!1;l.forEach((function(e){var n,r,A,i;(null===(r=null===(n=null==e?void 0:e.displaySiblingNode)||void 0===n?void 0:n.prev)||void 0===r?void 0:r.field)===t&&(u=!0),(null===(i=null===(A=null==e?void 0:e.displaySiblingNode)||void 0===A?void 0:A.next)||void 0===i?void 0:i.field)===t&&(c=!0)}));var h=lv.get(n,"icon.size");return{left:c?h+s:0,right:u?h+a:0}},gS=function(t,n,r){var A,i,o=lv.get(r,"cell.padding"),a=null!==(i=null===(A=null==r?void 0:r.cell)||void 0===A?void 0:A.horizontalBorderWidth)&&void 0!==i?i:1,s=pS(t,n.field,r),l=fS(t,n,e.CellType.COL_CELL,null==r?void 0:r.icon);return o.left+o.right+l+s.left+s.right+a},vS=function(e){try{return JSON.parse(e)}catch(e){return null}},yS=function(t,n){return void 0===n&&(n=Zv),{type:e.CopyMIMEType.PLAIN,content:lv.map(t,(function(e){return e.join(n)})).join("\r\n")}},CS=function(t){var n=function(e,t){return e.map((function(e){return"<".concat(t,">").concat(function(e,t){return e.map((function(e){return"<".concat(t,">").concat(lv.escape(e),"</").concat(t,">")})).join("")}(e,"td"),"</").concat(t,">")})).join("")}(t,"tr");return{type:e.CopyMIMEType.HTML,content:'<meta charset="utf-8"><table><tbody>'.concat(n,"</tbody></table>")}},BS=((Ix={})[e.CopyMIMEType.PLAIN]=yS,Ix[e.CopyMIMEType.HTML]=CS,Ix),mS=function(e){var t,n,r,A,i,o,a=e.rowMatrix,s=e.colMatrix,l=e.dataMatrix,u=e.cornerMatrix,c=null!==(n=null===(t=null==a?void 0:a[0])||void 0===t?void 0:t.length)&&void 0!==n?n:0,h=null!==(r=null==s?void 0:s.length)&&void 0!==r?r:0,d=null!==(i=null===(A=l[0])||void 0===A?void 0:A.length)&&void 0!==i?i:0,f=null!==(o=l.length)&&void 0!==o?o:0,p=c+d,g=h||(c>0?1:0),v=g+f,y=Array.from(Array(v),(function(){return new Array(p)}));return y=lv.map(y,(function(e,t){return lv.map(e,(function(e,n){var r,A;return n>=0&&n<c&&t>=0&&t<g?null!==(A=null===(r=null==u?void 0:u[t])||void 0===r?void 0:r[n])&&void 0!==A?A:"":n>=c&&n<=p&&t>=0&&t<h?s[t][n-c]:n>=0&&n<c&&t>=g&&t<v?null==a?void 0:a[t-g][n]:n>=c&&n<=p&&t>=g&&t<v?l[t-g][n-c]:void 0}))})),y};function wS(e){var t;return null!==(t=lv.max(lv.map(e,(function(e){return e.length}))))&&void 0!==t?t:0}function ES(t){var n,r,A=t.spreadsheet.options.interaction,i=t.config,o=i.formatOptions,a=void 0!==o&&o,s=i.separator,l=void 0===s?Zv:s,u=i.selectedCells,c=void 0===u?[]:u,h=i.customTransformer,d=i.async,f=void 0!==d&&d,p=t.isExport,g=A.copy,v=p?function(e){var t,n;return"object"==typeof e?{formatHeader:null!==(t=e.formatHeader)&&void 0!==t&&t,formatData:null!==(n=e.formatData)&&void 0!==n&&n}:{formatHeader:null!=e&&e,formatData:null!=e&&e}}(a):{formatData:null!==(n=null==g?void 0:g.withFormat)&&void 0!==n&&n,formatHeader:null!==(r=null==g?void 0:g.withFormat)&&void 0!==r&&r},y=v.formatData,C=v.formatHeader,B=function(t){var n;if(!t)return BS;var r=t(BS);return(n={})[e.CopyMIMEType.PLAIN]=r[e.CopyMIMEType.PLAIN]||BS[e.CopyMIMEType.PLAIN],n[e.CopyMIMEType.HTML]=r[e.CopyMIMEType.HTML]||BS[e.CopyMIMEType.HTML],n}(p?h:null==g?void 0:g.customTransformer);return{separator:l,selectedCells:c,transformers:B,formatData:y,formatHeader:C,async:f}}var xS=function(e){var t=[],n=function(e){var r,A,i;if(e.id!==Ry){var o=null===(i=null===(A=null===(r=e.spreadsheet)||void 0===r?void 0:r.dataSet)||void 0===A?void 0:A.getFieldFormatter)||void 0===i?void 0:i.call(A,e.field),a=e.isTotalRoot||!o?e.value:o(e.value);return t.unshift(a),(null==e?void 0:e.parent)?n(e.parent):void 0}};return n(e),t},SS=function(e,t){var n=e.rowIndex,r=e.colIndex,A=t.facet;return[A.getRowNodeByIndex(n),A.getColNodeByIndex(r)]},TS={timeout:3e3};function FS(e,t){return!(!e||!t)&&String(e).toLowerCase()===String(t).toLowerCase()}var bS=function(e){if("string"!=typeof e)return e;if(/[",\r\n\t]/.test(e)){var t=e.replace(/"/g,'""').replace(/\r\n/g,"\n").replace(/\n/g,"\r\n");return'"'.concat(t,'"')}return e},IS=function(e,t,n){return void 0===n&&(n=!0),lv.map(e,(function(e){return e===sy?t.getSeriesNumberText():n?t.dataSet.getFieldName(e):lv.flow(wB,Mm)(e)}))},LS=function(e,t){var n=e.split(My);return t?n.slice(n.length-t):(n.shift(),n)},QS=function(e,t){return e()?null==t?void 0:t.value:null==t?void 0:t.field},US=function(t){return t.filter((function(t){return t.type===e.CellType.COL_CELL}))},RS=function(t){return t.filter((function(t){return t.type===e.CellType.ROW_CELL}))},MS=function(t){return new Promise((function(n,r){var A;A=Array.isArray(t)?lv.get(t.filter((function(t){return t.type===e.CopyMIMEType.PLAIN})),"[0].content",""):t.content||"";var i=document.createElement("textarea");i.value=A,document.body.appendChild(i),i.focus({preventScroll:!0}),i.select();var o=document.execCommand("copy");document.body.removeChild(i),o?n():r()}))},HS=function(e){return navigator.clipboard.write([new ClipboardItem(lv.concat(e).reduce((function(e,t){var n,r=t.type,A=t.content.replace(/\x00/g,"");return rt(rt({},e),((n={})[r]=new Blob([A],{type:r}),n))}),{}))]).catch((function(){return MS(e)}))},OS=function(t,n){var r;return void 0===n&&(n=!0),r="string"==typeof t?{content:t,type:e.CopyMIMEType.PLAIN}:t,vm()?Promise.resolve():Cm()&&navigator.clipboard&&window.ClipboardItem&&n?HS(r):MS(r)},kS=function(){function t(t){var n=this;this.matrixHtmlTransformer=function(t){return n.config.transformers[e.CopyMIMEType.HTML](t)};var r=t.spreadsheet,A=t.isExport,i=void 0!==A&&A,o=t.config;this.spreadsheet=r,this.config=ES({config:o,spreadsheet:r,isExport:i})}return t.prototype.initIdleCallbackCount=function(e){this.idleCallbackCount=e>=Jv?Jv:e},t.prototype.getHeaderNodeMatrix=function(e){var t=this.config.formatHeader;return IS(LS(e.id),e.spreadsheet,t)},t.prototype.matrixPlainTextTransformer=function(t,n){var r=lv.map(t,(function(e){return lv.map(e,bS)}));return this.config.transformers[e.CopyMIMEType.PLAIN](r,n)},t.prototype.matrixTransformer=function(e,t){return void 0===t&&(t=Zv),[this.matrixPlainTextTransformer(e,t),this.matrixHtmlTransformer(e)]},t.prototype.getFormatter=function(e){var t=this,n=e.field,r=e.rowIndex,A=e.colIndex;if(this.config.formatData){var i=this.spreadsheet.facet.getCellMeta(r,A);return function(e){var r=t.spreadsheet.dataSet.getFieldFormatter(n);return null==r?void 0:r(e,null==i?void 0:i.data,i)}}return function(e){return e}},t.prototype.isEnableASync=function(){return!vm()&&this.config.async&&!!window.requestIdleCallback},t}(),NS=function(t){function n(n){var r=t.call(this,n)||this;return r.leafRowNodes=[],r.leafColNodes=[],r.compatibleHideMeasureColumn=function(){var e,t,n,A,i;return(null===(A=null===(n=null===(t=r.spreadsheet.options)||void 0===t?void 0:t.style)||void 0===n?void 0:n.colCell)||void 0===A?void 0:A.hideValue)&&r.spreadsheet.isValueInCols()?((e={})[ry]=null===(i=r.spreadsheet.dataCfg.fields.values)||void 0===i?void 0:i[0],e):{}},r.getDataMatrixByHeaderNode=function(){var e=r.compatibleHideMeasureColumn();return lv.map(r.leafRowNodes,(function(t){return r.leafColNodes.map((function(n){return r.getDataCellValue({rowNode:t,colNode:n,config:{measureQuery:e}})}))}))},r.getDataMatrixByHeaderNodeRIC=function(){var e=[],t=0,n=r.compatibleHideMeasureColumn();return new Promise((function(A,i){try{var o=function(i){var a=r.leafRowNodes.length;for(r.initIdleCallbackCount(a);(i.timeRemaining()>0||i.didTimeout)&&t<=a-1&&r.idleCallbackCount>0;)for(var s=t;s<a&&r.idleCallbackCount>0;s++){for(var l=[],u=r.leafRowNodes[s],c=0;c<r.leafColNodes.length;c++){var h=r.leafColNodes[c],d=r.getDataCellValue({rowNode:u,colNode:h,config:{measureQuery:n}});l.push(d)}t++,e.push(l),r.idleCallbackCount--}t===a?A(e):(r.initIdleCallbackCount(a),requestIdleCallback(o,TS))};requestIdleCallback(o,TS)}catch(e){i(e)}}))},r.getDataCellValue=function(e){var t,n=e.rowNode,A=e.colNode,i=e.config.measureQuery,o=rt(rt(rt({},n.query),A.query),i),a=n.isTotals||n.isTotalMeasure||A.isTotals||A.isTotalMeasure,s=r.spreadsheet.dataSet.getCellData({query:o,rowNode:n,isTotals:a,totalStatus:_w(n,A)}),l=r.spreadsheet.isValueInCols()?A:n,u=null!==(t=QS(r.spreadsheet.isPivotMode,l))&&void 0!==t?t:"",c=r.spreadsheet.dataCfg.fields.values;u=(null==c?void 0:c.includes(u))?u:null==c?void 0:c[0];var h=r.getFormatter({field:null!=u?u:A.field,rowIndex:n.rowIndex,colIndex:A.colIndex}),d=null==s?void 0:s[ny],f=lv.isPlainObject(null==d?void 0:d.values)?"":d;return h(null!=f?f:"")},r.getCustomRowCornerMatrix=function(t){var n=wS(null!=t?t:[]),A=r.spreadsheet.facet.getCornerNodes(),i=lv.sortBy(A,(function(t){return t.cornerType===e.CornerNodeType.Col?0:1}));return r.spreadsheet.isHierarchyTreeType()?lv.map(i,(function(e){var t=new Array(n).fill("");return t[n-1]=e.value,t})):Object.values(lv.groupBy(i,"y")).map((function(e){var t=new Array(n-e.length).fill(""),r=e.map((function(e){return e.value}));return lt(lt([],st(t),!1),st(r),!1)}))},r.getFieldName=function(e){return r.config.formatHeader?r.spreadsheet.dataSet.getFieldName(e):r.spreadsheet.dataSet.getField(e)},r.getCornerMatrix=function(e){if(r.spreadsheet.isCustomRowFields())return r.getCustomRowCornerMatrix(e);var t=r.spreadsheet.facet.getLayoutResult().colsHierarchy,n=r.spreadsheet.dataCfg.fields,A=n.columns,i=void 0===A?[]:A,o=n.rows,a=void 0===o?[]:o,s=r.spreadsheet.isCustomColumnFields()?t.getNodes().slice(0,t.sampleNodesForAllLevels.length).map((function(e){return e.field})):lt(lt([],st(i),!1),[""],!1),l=r.spreadsheet.isHierarchyTreeType()?wS(null!=e?e:[]):a.length,u=lv.slice(a,0,l);return lv.map(s,(function(e,t){return lv.map(u,(function(n,A){return t===s.length-1?r.getFieldName(n):A===l-1?r.getFieldName(e):""}))}))},r.getDataMatrixByDataCell=function(e){var t=r.spreadsheet.options.interaction.copy,n=r.compatibleHideMeasureColumn(),A=lv.map(e,(function(e){return lv.map(e,(function(e){var t=st(SS(e,r.spreadsheet),2),A=t[0],i=t[1];return r.getDataCellValue({rowNode:A,colNode:i,config:{measureQuery:n}})}))}));if(!(null==t?void 0:t.withHeader))return r.matrixTransformer(A,r.config.separator);var i=r.getRowMatrix(),o=r.getColMatrix();return r.matrixTransformer(mS({rowMatrix:i,colMatrix:o,dataMatrix:A}),r.config.separator)},r.getAsyncAllPivotCopyData=function(){return it(r,void 0,void 0,(function(){var e,t,n,r;return ot(this,(function(A){switch(A.label){case 0:return e=this.getRowMatrix(),t=this.getColMatrix(),n=this.getCornerMatrix(e),r=[],this.isEnableASync()?[4,this.getDataMatrixByHeaderNodeRIC()]:[3,2];case 1:return r=A.sent(),[3,4];case 2:return[4,Promise.resolve(this.getDataMatrixByHeaderNode())];case 3:r=A.sent(),A.label=4;case 4:return[2,this.matrixTransformer(mS({rowMatrix:e,colMatrix:t,dataMatrix:r,cornerMatrix:n}),this.config.separator)]}}))}))},r.getPivotAllCopyData=function(){var e=r.getRowMatrix(),t=r.getColMatrix(),n=r.getCornerMatrix(e),A=r.getDataMatrixByHeaderNode();return r.matrixTransformer(mS({rowMatrix:e,colMatrix:t,dataMatrix:A,cornerMatrix:n}),r.config.separator)},r.leafRowNodes=r.getLeafRowNodes(),r.leafColNodes=r.getLeafColNodes(),r}return nt(n,t),n.prototype.getHeaderNodeMatrix=function(e){return this.config.formatHeader?xS(e):t.prototype.getHeaderNodeMatrix.call(this,e)},n.prototype.getLeafRowNodes=function(){var e=this.spreadsheet.facet.getRowLeafNodes(),t=RS(this.config.selectedCells),n=this.spreadsheet.isHierarchyTreeType();return lv.isEmpty(t)?e:this.getSelectedNode(t,e,n)},n.prototype.getLeafColNodes=function(){var e=this.spreadsheet.facet.getColLeafNodes(),t=US(this.config.selectedCells);return lv.isEmpty(t)?e:this.getSelectedNode(t,e)},n.prototype.getSelectedNode=function(e,t,n){if(void 0===n&&(n=!1),n){var r=new Set(e.map((function(e){return e.id})));return t.filter((function(e){return r.has(e.id)}))}return e.reduce((function(e,n){var r=n.id,A=t.filter((function(e){return e.id===r||e.id.startsWith(r+My)}));return e.push.apply(e,lt([],st(A),!1)),e}),[])},n.prototype.getColMatrix=function(){var e=this;return lv.zip.apply(void 0,lt([],st(lv.map(this.leafColNodes,(function(t){return e.getHeaderNodeMatrix(t)}))),!1))},n.prototype.getRowMatrix=function(){var e=this;return function(e){var t=wS(e);return lv.map(e,(function(e){var n=t-e.length;return n?lt(lt([],st(e),!1),st(new Array(n).fill("")),!1):e}))}(lv.map(this.leafRowNodes,(function(t){return e.getHeaderNodeMatrix(t)})))},n.prototype.getPivotCopyData=function(){var e=this.spreadsheet.options.interaction.copy,t=this.getDataMatrixByHeaderNode();if(!(null==e?void 0:e.withHeader))return this.matrixTransformer(t,this.config.separator);var n=this.getRowMatrix(),r=this.getColMatrix();return this.matrixTransformer(mS({rowMatrix:n,colMatrix:r,dataMatrix:t}),this.config.separator)},n}(kS);var _S=function(e){var t=e.spreadsheet,n=e.selectedCells,r=e.headerSelectedCells;return new NS({spreadsheet:t,config:{selectedCells:r,formatOptions:!0}}).getDataMatrixByDataCell(n)};function DS(t){var n,r,A,i,o=function(e){var t=new Set;return lv.forEach(e,(function(e){var n=e.getMeta().level;t.has(n)||t.add(n)})),t}(t),a=null!==(n=lv.max(Array.from(o)))&&void 0!==n?n:0,s=function(e,t){return lv.filter(e,(function(e){var n=e.getMeta(),r=n.level===t,A=n.isTotals&&lv.isEmpty(n.children);return r||A}))}(t,a),l=t[0].cellType===e.CellType.COL_CELL,u=function(e,t,n,r){return lv.map(e,(function(e){var A,i=e.getMeta();if(r){var o=xS(i),a=null!==(A=lv.min(Array.from(n)))&&void 0!==A?A:0;return o.slice(a,t+1)}var s=i.id,l=i.value,u=i.isTotals,c=i.level,h=i.spreadsheet,d=s;return u&&c!==t&&(d=s+My+lv.repeat(l,t-c)),IS(LS(d,n.size),h,!1)}))}(s,a,o,null!==(i=null===(A=null===(r=t[0].getMeta().spreadsheet.options.interaction)||void 0===r?void 0:r.copy)||void 0===A?void 0:A.withFormat)&&void 0!==i&&i),c=l?lv.zip.apply(void 0,lt([],st(u),!1)):u;return[yS(c),CS(c)]}var PS=function(e){function t(t){var n=e.call(this,t)||this;return n.getValueFromMeta=function(e){var t,r=st(SS(e,n.spreadsheet),2)[1],A=QS(n.spreadsheet.isPivotMode,r),i=n.isSeriesNumberField(A)?e.rowIndex+1:null===(t=n.displayData[e.rowIndex])||void 0===t?void 0:t[A];return n.getFormatter({field:A,rowIndex:e.rowIndex,colIndex:e.colIndex})(i)},n.displayData=n.getSelectedDisplayData(),n.columnNodes=n.getSelectedColNodes(),n}return nt(t,e),t.prototype.getHeaderNodeMatrix=function(t){return e.prototype.getHeaderNodeMatrix.call(this,t)},t.prototype.getSelectedColNodes=function(){var e=US(this.config.selectedCells),t=this.spreadsheet.facet.getColLeafNodes();return 0===e.length?t:lv.map(e,(function(e){return t[e.colIndex]}))},t.prototype.getSelectedDisplayData=function(){var e=RS(this.config.selectedCells),t=this.spreadsheet.dataSet.getDisplayDataSet();return 0===e.length?t:lv.map(e,(function(e){return t[e.rowIndex]}))},t.prototype.getDataMatrix=function(){var e=this,t=this.spreadsheet.options.seriesNumber;return this.displayData.map((function(n,r){return e.columnNodes.map((function(A,i){var o=null==A?void 0:A.field;if(sy===o&&(null==t?void 0:t.enable)){var a=r+1;return e.getFormatter({field:o,rowIndex:r,colIndex:i})(a)}return e.getFormatter({field:o,rowIndex:r,colIndex:i})(null==n?void 0:n[o])}))}))},t.prototype.getDataMatrixRIC=function(){var e=this,t=this.spreadsheet.options.seriesNumber,n=[],r=0;return new Promise((function(A,i){try{var o=function(i){var a=e.displayData.length;for(e.initIdleCallbackCount(a);(i.timeRemaining()>0||i.didTimeout||"test"===process.env.NODE_ENV)&&r<=a-1&&e.idleCallbackCount>0;)for(var s=r;s<a&&e.idleCallbackCount>0;s++){for(var l=e.displayData[s],u=[],c=0;c<e.columnNodes.length;c++){var h=e.columnNodes[c].field;if(sy===h&&(null==t?void 0:t.enable)){var d=s+1,f=e.getFormatter({field:h,rowIndex:s,colIndex:c});u.push(f(d))}else{var p=e.getFormatter({field:h,rowIndex:r,colIndex:c})(l[h]);u.push(p)}}r++,n.push(u),e.idleCallbackCount--}r===a?A(n):(e.initIdleCallbackCount(a),requestIdleCallback(o,TS))};requestIdleCallback(o,TS)}catch(e){i(e)}}))},t.prototype.isSeriesNumberField=function(e){var t=this.spreadsheet.options.seriesNumber;return sy===e&&(null==t?void 0:t.enable)},t.prototype.getColMatrix=function(){var e=this;return lv.zip.apply(void 0,lt([],st(this.columnNodes.map((function(t){return e.getHeaderNodeMatrix(t)}))),!1))},t.prototype.getDataMatrixByDataCell=function(e){var t=this,n=this.spreadsheet.options.interaction.copy,r=lv.map(e,(function(e){return lv.map(e,(function(e){return t.getValueFromMeta(e)}))}));if(!(null==n?void 0:n.withHeader))return this.matrixTransformer(r,this.config.separator);var A=this.getColMatrix();return this.matrixTransformer(mS({colMatrix:A,dataMatrix:r}),this.config.separator)},t.prototype.processSelectedTable=function(e){void 0===e&&(e=!1);var t=this.getDataMatrix();if(!e)return this.matrixTransformer(t,this.config.separator);var n=this.getColMatrix();return this.matrixTransformer(mS({colMatrix:n,dataMatrix:t}),this.config.separator)},t.prototype.asyncProcessSelectedTable=function(){return it(this,arguments,void 0,(function(e){var t,n,r;return void 0===e&&(e=!1),ot(this,(function(A){switch(A.label){case 0:return this.isEnableASync()?[4,this.getDataMatrixRIC()]:[3,2];case 1:return n=A.sent(),[3,4];case 2:return[4,Promise.resolve(this.getDataMatrix())];case 3:n=A.sent(),A.label=4;case 4:return t=n,e?(r=this.getColMatrix(),[2,this.matrixTransformer(mS({colMatrix:r,dataMatrix:t}),this.config.separator)]):[2,this.matrixTransformer(t,this.config.separator)]}}))}))},t}(kS),GS=function(e){var t=e.spreadsheet,n=e.selectedCells,r=e.headerSelectedCells;return new PS({spreadsheet:t,config:{selectedCells:r,formatOptions:!0}}).getDataMatrixByDataCell(n)},KS=function(e,t){return e.isPivotMode()?function(e,t){return new NS({spreadsheet:e,config:{selectedCells:t}}).getPivotCopyData()}(e,t):function(e,t){return new PS({spreadsheet:e,config:{selectedCells:t}}).processSelectedTable()}(e,t)};function zS(t,n){var r,A=US(n),i=RS(n);if(t.interaction.getCurrentStateName()===e.InteractionStateName.ALL_SELECTED)r=KS(t,[]);else if(A.length)r=KS(t,A);else if(i.length)r=KS(t,i);else{if(!n.length)return[{type:e.CopyMIMEType.PLAIN,content:""},{type:e.CopyMIMEType.HTML,content:""}];var o=function(e){if(!(null==e?void 0:e.length))return[];var t=st([{row:1/0,col:1/0},{row:0,col:0}],2),n=t[0],r=t[1];e.forEach((function(e){var t=e.rowIndex,A=e.colIndex;n.col=Math.min(A,n.col),n.row=Math.min(t,n.row),r.col=Math.max(A,r.col),r.row=Math.max(t,r.row)}));var A=st([r.row-n.row+1,r.col-n.col+1],2),i=A[0],o=A[1],a=new Array(i).fill("").map((function(){return new Array(o).fill("")}));return e.forEach((function(e){var t=e.rowIndex,r=e.colIndex,A=st([t-n.row,r-n.col],2),i=A[0],o=A[1];a[i][o]=e})),a}(n),a=o[0].map((function(t){var n;return rt(rt({},t),{id:(null==t?void 0:t.colId)||lv.last(null===(n=null==t?void 0:t.id)||void 0===n?void 0:n.split(Hy))||"",type:e.CellType.COL_CELL})})),s=o.map((function(t){var n,r,A;return rt(rt({},t[0]),{id:(null===(n=t[0])||void 0===n?void 0:n.rowId)||lv.first(null===(A=null===(r=t[0])||void 0===r?void 0:r.id)||void 0===A?void 0:A.split(Hy))||"",type:e.CellType.ROW_CELL})}));r=function(e,t,n,r){return r.isPivotMode()?_S({spreadsheet:r,selectedCells:e,headerSelectedCells:lv.concat(t,n)}):GS({spreadsheet:r,selectedCells:e,headerSelectedCells:t})}(o,a,s,t)}return r}var VS=function(t){var n,r=t.interaction,A=r.getState().cells||[],i=null!==(n=r.getInteractedCells())&&void 0!==n?n:[],o=function(t){return!lv.isEmpty(t)&&lv.every(t,(function(t){return t.cellType===e.CellType.ROW_CELL||t.cellType===e.CellType.COL_CELL}))}(i),a=o?DS(i):zS(t,A);return a&&OS(a),a},WS=function(e){var t=e.sheetInstance,n=t.enableAsyncExport();if(n instanceof Error)throw console.warn(n),n;return t.isPivotMode()?function(e){var t=e.sheetInstance,n=e.split,r=e.formatOptions,A=e.customTransformer,i=e.async;return new NS({spreadsheet:t,isExport:!0,config:{separator:n,formatOptions:r,customTransformer:A,async:null==i||i}}).getAsyncAllPivotCopyData()}(e):function(e){var t=e.sheetInstance,n=e.split,r=e.formatOptions,A=e.customTransformer,i=e.async;return new PS({spreadsheet:t,config:{selectedCells:[],separator:n,formatOptions:r,customTransformer:A,async:null==i||i},isExport:!0}).asyncProcessSelectedTable(!0)}(e)},XS=function(e){function t(t){var n=e.call(this,t)||this;return n.getPlaceholder=function(e,t){var r=function(e){var t=vS(e);return lv.isArray(t)?t:e}(t.value),A=lv.isArray(r)?r.length:1,i=n.spreadsheet.options.placeholder,o=Nm(e,i);return Array(A).fill(o)},n.processValueInRow=function(e,t){var r,A,i=[],o=null!=t?t:[""];if(!e)return o;var a=e.fieldValue,s=e.valueField,l=e.data;if(lv.isObject(a))return i=function(e,t){var n;return void 0===t&&(t=!1),t?lv.get(e,["values",0]):null!==(n=lv.get(e,["originalValues",0]))&&void 0!==n?n:lv.get(e,["values",0])}(a,n.config.formatHeader),null!=i?i:t;if(lv.isNil(a)&&t.length>1)return o;if(n.config.formatHeader){var u=null!==(A=n.spreadsheet.dataSet.getFieldFormatter(s)(a,l))&&void 0!==A?A:"";i.push(u)}else i.push(null!==(r=a)&&void 0!==r?r:"");return null!=i?i:t},n.getCornerMatrix=function(e){return n.getCustomRowCornerMatrix(e)},n.getDataMatrixByHeaderNode=function(){return lv.map(n.leafRowNodes,(function(e){var t=n.leafColNodes.map((function(t){var r,A,i=null===(A=(r=n.spreadsheet.facet).getCellMeta)||void 0===A?void 0:A.call(r,e.rowIndex,t.colIndex),o=n.getPlaceholder(i,t);return n.processValueInRow(i,o)}));return lv.flatten(t)}))},n.getPivotAllCopyData=function(){var e=n.getRowMatrix(),t=n.getColMatrix(),r=n.getCornerMatrix(e),A=n.getDataMatrixByHeaderNode();return n.matrixTransformer(mS({colMatrix:t,dataMatrix:A,rowMatrix:e,cornerMatrix:r}),n.config.separator)},n}return nt(t,e),t.prototype.getColMatrix=function(){var e=this,t=[];return lv.forEach(this.leafColNodes,(function(n){for(var r=e.config.formatHeader?xS(n):LS(n.id),A=0,i=r.length-1;i>=0;i--){var o=r[i],a=[];o.startsWith("[")&&o.endsWith("]")?A=(a=JSON.parse(o)).length>A?a.length:A:(a=A>0?new Array(A).fill(""):[])[0]=o,t[i]=t[i]?t[i].concat(a):a}})),t},t}(NS),YS=function(e,t,n){if(n<=0)return{start:0,end:0};var r=lv.findIndex(e,(function(n,r){return t>=n&&t<e[r+1]}),0);r=Math.max(r,0);var A=n===t?r:lv.findIndex(e,(function(t,r){return n>t&&n<=e[r+1]}),r);return{start:r,end:A=Math.min(-1===A?1/0:A,e.length-2)}},jS=function(e,t){var n=t.width,r=t.originalWidth,A=Math.min(r-n,e);return A<0?0:A},ZS=function(e,t,n){var r=Math.min(t-n,e);return r<0?0:r},JS=function(e,t){if(void 0===e&&(e=[]),lv.isEmpty(e))return[];var n=[];return e.forEach((function(e){(e instanceof t&&n.push(e),e instanceof ds)&&e.children.forEach((function(e){e instanceof t&&n.push(e)}))})),n},qS=function(e){return e&&"appendInfo"in e?e.appendInfo:{}},$S=function(e,t,n){var r,A=e.split(My);if(n)r=[e];else{r=[EB(A[0],A[1])];for(var i=2;i<A.length;i+=1)r.push(EB(r[i-2],A[i]))}var o=lv.filter(t,(function(e){var t;return r.includes(null===(t=e.getMeta())||void 0===t?void 0:t.id)}));return o},eT=function(e,t,n){if(e){var r=$S(e,t);lv.forEach(r,(function(e){e.updateByState(n)}))}},tT=function(e,t){var n,r=[];return lv.forEach(e,(function(e){var A,i,o=null===(A=null==t?void 0:t.facet)||void 0===A?void 0:A.getCellMeta(e.rowIndex,e.colIndex),a=null===(i=null==t?void 0:t.facet)||void 0===i?void 0:i.createDataCell(o);a&&(r.push(a),n=(null==e?void 0:e.showText)?o:n)})),{cells:r,cellsMeta:n}},nT=function(e,t){var n,r=[],A=[];return lv.forEach(e,(function(e){var i=lv.find(t,(function(t){var n,r=null===(n=null==t?void 0:t.getMeta)||void 0===n?void 0:n.call(t);if((null==r?void 0:r.colIndex)===(null==e?void 0:e.colIndex)&&(null==r?void 0:r.rowIndex)===(null==e?void 0:e.rowIndex))return t}));i?(r.push(i),n=(null==e?void 0:e.showText)?null==i?void 0:i.getMeta():n):A.push(e)})),{cells:r,invisibleCellInfo:A,cellsMeta:n}},rT=function(e,t,n){var r;void 0===n&&(n=[]);var A=nT(n,e),i=A.cellsMeta,o=A.cells,a=A.invisibleCellInfo,s=i,l=o;if((null==a?void 0:a.length)>0&&a.length<n.length){var u=tT(a,t),c=u.cells,h=u.cellsMeta;s=s||h,l=o.concat(c)}return lv.isEmpty(o)||s||(s=null===(r=l[0])||void 0===r?void 0:r.getMeta()),{cells:l,viewMeta:s}},AT=function(e){var t=e.interaction.getActiveCells(),n=[];return lv.forEach(t,(function(e,t){var r=e.getMeta(),A=0===t?{showText:!0}:{};n.push(rt(rt({},A),{colIndex:null==r?void 0:r.colIndex,rowIndex:null==r?void 0:r.rowIndex}))})),n},iT=function(e,t,n){var r;return(null===(r=e.options)||void 0===r?void 0:r.mergedCell)?e.options.mergedCell(e,t,n):new rS(e,t,n)},oT=function(e,t,n){var r,A=t||AT(e);if((null==A?void 0:A.length)<=1)console.error("[mergeCell]: The merged cells must be more than one!");else{var i=e.facet.getDataCells(),o=rT(i,e,A),a=o.cells,s=o.viewMeta;if(!lv.isEmpty(a)){var l=(null===(r=e.options)||void 0===r?void 0:r.mergedCellsInfo)||[];l.push(A),e.setOptions({mergedCellsInfo:l});var u=n?void 0:s;e.facet.panelScrollGroup.addMergeCell(iT(e,a,u))}}},aT=function(e,t){var n=lv.map(e.cells,(function(e){return{colIndex:e.getMeta().colIndex,rowIndex:e.getMeta().rowIndex}}));return lv.filter(t,(function(e){var t=e.map((function(e){return e.showText?{colIndex:e.colIndex,rowIndex:e.rowIndex}:e}));return!lv.isEqual(t,n)}))},sT=function(t,n){var r,A,i;if(n&&n.cellType===e.CellType.MERGED_CELL){var o=aT(n,(null===(r=t.options)||void 0===r?void 0:r.mergedCellsInfo)||[]);(null==o?void 0:o.length)!==(null===(i=null===(A=t.options)||void 0===A?void 0:A.mergedCellsInfo)||void 0===i?void 0:i.length)&&(t.setOptions({mergedCellsInfo:o}),n.remove())}else console.error("[unmergeCell]: The ".concat(n," is not a MergedCell"))},lT=function(e){return lv.map(e,(function(e){return{cells:e.cells,viewMeta:e.getMeta()}}))},uT=function(e,t){return lv.differenceWith(e,t,(function(e,t){return lv.isEqual(e.viewMeta.id,t.viewMeta.id)}))},cT=function(e,t){var n,r=null===(n=e.options)||void 0===n?void 0:n.mergedCellsInfo;if(!lv.isEmpty(r)){var A=e.facet.getDataCells();if(!lv.isEmpty(A)){var i=[];r.forEach((function(t){var n=rT(A,e,t);n.cells.length>0&&i.push(n)}));var o=t.children,a=lT(o),s=uT(a,i),l=uT(i,a);lv.forEach(s,(function(e){var t=lv.find(o,(function(t){return lv.isEqual(t.getMeta().id,e.viewMeta.id)}));null==t||t.remove()})),lv.forEach(l,(function(n){var r=n.cells,A=n.viewMeta;t.appendChild(iT(e,r,A))}))}}},hT=function(t,n,r){var A=r.facet,i=A.panelBBox.viewportWidth,o=null==A?void 0:A.frozenGroupAreas,a=o[e.FrozenGroupArea.Col].width,s=o[e.FrozenGroupArea.TrailingCol].width,l=A.getColLeafNodes()[t];return n===e.ScrollDirection.SCROLL_UP?l.x-a:l.x+l.width-(i-s)},dT=function(t,n,r){var A=r.facet,i=A.viewCellHeights.getCellOffsetY,o=A.panelBBox.viewportHeight,a=i(t+1);if(lv.isNil(a))return 0;var s=null==A?void 0:A.frozenGroupAreas,l=s[e.FrozenGroupArea.Row].height,u=s[e.FrozenGroupArea.TrailingRow].height;return n===e.ScrollDirection.SCROLL_UP?i(t)-l:a-(o-u)},fT=function(t){return[e.InteractionKeyboardKey.META,e.InteractionKeyboardKey.CONTROL].includes(t.key)},pT=function(e){return e.ctrlKey||e.metaKey},gT=function(t){var n=t.getMeta()||{};return{id:n.id,colIndex:n.colIndex,rowIndex:n.rowIndex,rowQuery:n.rowQuery,type:t instanceof lS?e.CellType.ROW_CELL:t.cellType}};function vT(e,t){var n=Math.min(e.rowIndex,t.rowIndex),r=Math.max(e.rowIndex,t.rowIndex);return{start:{rowIndex:n,colIndex:Math.min(e.colIndex,t.colIndex)},end:{rowIndex:r,colIndex:Math.max(e.colIndex,t.colIndex)}}}function yT(e,t){var n,r=t.facet,A=t.options;if(t.isTableMode()){if(!(null===(n=A.seriesNumber)||void 0===n?void 0:n.enable))return[];var i=r.getColLeafNodes()[0].id,o=Bw(String(e.rowIndex),i),a=[],s=r.getCellById(o);return s&&s instanceof lS&&a.push(s),a}return $S(e.rowId,r.getRowCells(),t.isHierarchyTreeType())}var CT=function(e,t){return t.facet.getRowNodes().filter((function(t){return e.includes(t.id)}))},BT=function(e,t){return t.facet.getColNodes().filter((function(t){return e.includes(t.id)}))},mT=function(e,t){var n=t.interaction.getSelectedCellHighlight(),r=n.colHeader,A=[{shouldGet:n.rowHeader,getter:CT},{shouldGet:r,getter:BT}].filter((function(e){return e.shouldGet})).reduce((function(n,r){return lt(lt([],st(n),!1),st(r.getter(e.id,t)),!1)}),[]).filter((function(e){return!!e.belongsCell})).map((function(e){return gT(e.belongsCell)}));return lt([e],st(A),!1)},wT=function(e,t){var n=e.spreadsheet.facet,r=e.getSelectedCellHighlight(),A=r.colHeader,i=r.rowHeader;A&&e.updateCells(n.getColCells()),i&&e.updateCells(n.getRowCells()),t()},ET=function(e){return lv.mapValues(lv.groupBy(e,"type"),(function(e){return lv.map(e,"id")}))},xT=function(e){var t,n=e.store.get("visibleActionIcons"),r=e.interaction.getInteractedCells(),A=e.interaction.getState().cells;if(lv.isEmpty(r)&&lv.isEmpty(A)&&lv.isEmpty(n))return!1;if(lv.forEach(n,(function(e){e.toggleVisibility(!1)})),e.store.set("visibleActionIcons",[]),lv.forEach(r,(function(e){e.hideInteractionShape()})),e.interaction.resetState(),null===(t=e.options.interaction)||void 0===t?void 0:t.selectedCellsSpotlight){var i=e.interaction.getUnSelectedDataCells()||[];lv.forEach(i,(function(e){e.clearUnselectedState()}))}return!0},ST=function(e,t){var n=null==t?void 0:t.stateName;e.interaction.isEqualStateName(n)||(xT(e),e.hideTooltip(),e.store.set(xy,t))},TT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=lt(lt([],st(e),!1),[function(e,t){if(lv.isArray(e)&&lv.isArray(t))return t}],!1);return lv.mergeWith.apply(void 0,lt([{}],st(n),!1))},FT=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,A,i=TT.apply(void 0,lt([qv],st(t),!1));i.fields=(r=i.fields,A=["rows","columns","values"].reduce((function(e,t){var n=r[t],A=lv.uniq(n);return lv.isEqual(A,n)||console.warn("fields.".concat(t,":[").concat(n,"] should be unique")),e[t]=A,e}),{}),rt(rt({},r),A));var o=null===(e=i.fields.rows)||void 0===e?void 0:e.some((function(e){return!lv.isString(e)})),a=lv.isEmpty(i.fields.values);return(o||a)&&(i.fields.valueInCols=!1),i},bT=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return TT.apply(void 0,lt([zy],st(e),!1))};function IT(e){Promise.resolve().then((function(){e()}))}var LT=function(e){return RC[e]||RC.default},QT=function(e){var t=e.spreadsheet,n=e.position,r=e.tooltipContainer,A=e.autoAdjustBoundary,i=t.getCanvasElement(),o=n.x+GC.x,a=n.y+GC.y;if(!A||!i)return{x:o,y:a};var s="body"===A,l=t.facet.panelBBox,u=l.maxX,c=l.maxY,h=t.options,d=h.width,f=h.height,p=i.getBoundingClientRect(),g=p.top,v=p.left,y=r.getBoundingClientRect(),C=y.width,B=y.height,m=document.body.getBoundingClientRect(),w=m.width,E=m.height,x=s?w:Math.min(d,u)+v,S=s?E:Math.min(f,c)+g;return o+C>=x&&(o=x-C),a+B>=S&&(a=S-B),{x:o,y:a}},UT=function(e){return rt(rt({},null==e?void 0:e.colQuery),null==e?void 0:e.rowQuery)},RT=function(e,t){var n;if(e){var r=t.style,A=t.className,i=void 0===A?[]:A,o=t.visible,a=t.dark,s=void 0!==a&&a;if(r&&Object.assign(e.style,r),i.length){var l=i.filter(Boolean);(n=e.classList).add.apply(n,lt([],st(l),!1))}e.classList.toggle(_C,o),e.classList.toggle(DC,!o),e.classList.toggle(HC,s)}},MT=function(e,t){var n,r,A=t.data,i=t.field,o=t.valueField,a=t.useCompleteDataForFormatter,s=void 0===a||a,l=t.targetCell,u=null===(n=null==e?void 0:e.dataSet)||void 0===n?void 0:n.getFieldName(i),c=e.isCustomRowFields()&&(null==e?void 0:e.dataSet.getCustomRowFieldName(l))||u,h=null===(r=null==e?void 0:e.dataSet)||void 0===r?void 0:r.getFieldFormatter(i),d=Lx.getFieldValue(A,i),f=lv.isObject(d)?null:d;return{name:c,value:h(o||f,s?A:void 0)}},HT=function(e,t,n){var r=lv.filter(lv.concat([],t),(function(e){return e!==ry&&Lx.getFieldValue(n,e)}));return lv.map(r,(function(t){return MT(e,{data:n,field:t,useCompleteDataForFormatter:!1})}))},OT=function(e,t,n){var r,A,i,o,a=(n||{}).isTotals,s=[],l=[];if(t){var u=null===(A=null===(r=null==e?void 0:e.dataSet)||void 0===r?void 0:r.fields)||void 0===A?void 0:A.columns,c=null===(o=null===(i=null==e?void 0:e.dataSet)||void 0===i?void 0:i.fields)||void 0===o?void 0:o.rows;s=HT(e,Aw(u||[]),t),l=HT(e,c,t)}return lv.isEmpty(s)&&lv.isEmpty(l)&&a&&(s=[{value:fv("总计")}]),{cols:s,rows:l}},kT=function(e,t,n,r){if(!t)return[];var A=n.isTotals,i=t[ry],o=[];return A?o.push(MT(e,{data:t,field:i,targetCell:r,valueField:t[ny]})):o.push(MT(e,{data:t,field:i,targetCell:r})),o},NT=function(e,t,n){var r;if(n)return fv("总计");var A=null===(r=null==e?void 0:e.dataSet)||void 0===r?void 0:r.getFieldName(t);return A&&"undefined"!==A?A:""},_T=function(e,t,n){void 0===n&&(n=!0);var r=[];return lv.forEach(t,(function(t,A){lv.forEach(e,(function(e){n||-1===e.colIndex?n&&-1!==e.rowIndex&&r.push([e.rowIndex,A]):r.push([A,e.colIndex])}))})),r},DT=function(t){var n,r=t.facet.getRowLeafNodes(),A=t.facet.getColLeafNodes(),i=t.interaction.getState(),o=i.nodes,a=void 0===o?[]:o,s=i.cells,l=void 0===s?[]:s,u=null===(n=null==l?void 0:l[0])||void 0===n?void 0:n.type,c=t.isHierarchyTreeType()?a:a.filter((function(e){return null==e?void 0:e.isLeaf}));return u===e.CellType.COL_CELL?_T(c,r,!1):u===e.CellType.ROW_CELL?_T(c,A):[]},PT=function(t,n,r){var A=t.facet,i=function(t){if(!t)return!1;var r=null==n?void 0:n.getMeta(),i=null==r?void 0:r.isTotals,o=(null==n?void 0:n.cellType)===e.CellType.COL_CELL,a=(null==n?void 0:n.cellType)===e.CellType.ROW_CELL;if(!o&&!a)return!1;var s=A.getColNodeByIndex(t.colIndex),l=A.getRowNodeByIndex(t.rowIndex),u=o?null==l?void 0:l.isTotals:null==s?void 0:s.isTotals;return!i&&(null==t?void 0:t.isTotals)||i&&u};if(r){var o=DT(t);return lv.compact(lv.map(o,(function(e){var t=st(e,2),n=t[0],r=t[1],o=A.getCellMeta(n,r);if(!i(o))return(null==o?void 0:o.data)||UT(o)})))}return t.interaction.getCells().filter((function(e){var t=A.getCellMeta(e.rowIndex,e.colIndex);return!i(t)})).map((function(e){var t=A.getCellMeta(e.rowIndex,e.colIndex);return(null==t?void 0:t.data)||UT(t)}))},GT=function(e){var t=lv.groupBy(e,"name");return Object.keys(t||{}).map((function(e){var n=t[e],r=lv.flatMap(n,(function(e){return e.selectedData})),A=n.filter((function(e){return lv.isNumber(e.value)}));return{name:e,selectedData:r,value:lv.isEmpty(A)?null:lv.sumBy(A,"value")}}))},KT=function(e){var t=e.spreadsheet,n=e.targetCell,r=e.options,A=void 0===r?{}:r,i=[],o={};if(t.isTableMode()&&(null==A?void 0:A.onlyShowCellText)){var a=null==n?void 0:n.getMeta();return[{selectedData:(null==a?void 0:a.field)?t.dataSet.getCellMultiData({query:{field:a.field}}):[t.dataSet.getRowData(a)],name:"",value:""}]}var s=PT(t,n,A.onlyShowCellText);return lv.forEach(s,(function(e){var t,n=null==e?void 0:e[ry];o[n]?null===(t=o[n])||void 0===t||t.push(e):o[n]=[e]})),lv.mapKeys(o,(function(e,r){var a,s,l=t.isCustomHeaderFields()?null==t?void 0:t.dataSet.getCustomRowFieldName(n):NT(t,r,null==A?void 0:A.isTotals),u="",c="";if(lv.every(e,(function(e){return Qx(lv.get(e,ny))}))){var h=t.options.placeholder,d=Nm(o,h);u=d,c=d}else{var f=null===(a=null==t?void 0:t.dataSet)||void 0===a?void 0:a.getFieldFormatter(r),p=Mx(e,ny);c=p,u=null!==(s=null==f?void 0:f(p,e))&&void 0!==s?s:parseFloat(p.toPrecision(16))}i.push({selectedData:e,name:l||"",value:u,originValue:c})})),t.isCustomHeaderFields()?GT(i):i},zT=function(e){var t,n=e.spreadsheet,r=e.cellInfos,A=void 0===r?[]:r,i=e.options,o=void 0===i?{}:i,a=e.targetCell,s=null,l=[],u=null,c=null,h=n.dataSet.getCustomFieldDescription(a),d=A[0]||{};if(null==o?void 0:o.hideSummary)if(o.onlyShowCellText){var f=Lx.getFieldValue(d,"value"),p=Lx.getFieldValue(d,"valueField"),g=null===(t=null==n?void 0:n.dataSet)||void 0===t?void 0:t.getFieldFormatter(p),v=null==g?void 0:g(f),y=o.enableFormat?n.dataSet.getFieldName(f)||v:n.dataSet.getFieldName(p);s=lv.isString(y)?y:""}else u=OT(n,d,o),c=kT(n,d,o,a);else l=KT({spreadsheet:n,options:o,targetCell:a});var C=d||{};return{name:s,summaries:l,interpretation:C.interpretation,infos:C.infos,tips:C.tips,headInfo:u,details:c,description:h}},VT=function(e){return lv.map(e,(function(e){var t=e.getMeta();return lv.assign({},t.query||{},lv.pick(t,["colIndex","rowIndex"]))}))},WT=function(e){if(!e.interaction.isSelectedState())return[];var t=e.dataCfg.fields.valueInCols;return e.interaction.getCells().reduce((function(n,r){var A=e.facet.getCellMeta(null==r?void 0:r.rowIndex,null==r?void 0:r.colIndex),i=UT(A);if(lv.isEmpty(A)||lv.isEmpty(i))return[];var o=rt(rt({},i),{colIndex:t?null==A?void 0:A.colIndex:null,rowIndex:t?null:null==A?void 0:A.rowIndex});return n.find((function(e){return lv.isEqual(o,e)}))||n.push(o),n}),[])},XT=function(t,n){void 0===t&&(t={});var r=function(e){return TT(t,e)},A=t.colCell,i=t.rowCell,o=t.dataCell,a=t.cornerCell;return n===e.CellType.COL_CELL?r(A):n===e.CellType.ROW_CELL?r(i):n===e.CellType.DATA_CELL?r(o):n===e.CellType.CORNER_CELL?r(a):rt({},t)},YT=function(e,t){var n;if(!t||!e)return null;var r=e.options,A=e.interaction,i=null===(n=e.getCellType)||void 0===n?void 0:n.call(e,null==t?void 0:t.target),o=lv.last(A.getInteractedCells());return XT(r.tooltip,i||(null==o?void 0:o.cellType))},jT=function(e,t){var n,r=t.defaultMenus,A=void 0===r?[]:r,i=t.cell,o=function(e){return void 0===e&&(e=[]),e.filter((function(e){var t;return lv.isFunction(e.visible)?e.visible(i):null===(t=e.visible)||void 0===t||t})).map((function(e){return e.children&&(e.children=o(e.children)),e}))},a=o(null===(n=null==e?void 0:e.menu)||void 0===n?void 0:n.items);return{menu:rt(rt({},null==e?void 0:e.menu),{items:lv.compact(lt(lt([],st(A),!1),st(a),!1))})}},ZT=function(e,t){for(var n=!1,r=t;r&&r!==document.body;){if(e===r){n=!0;break}r=r.parentElement}return n},JT=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.handleDimensionValuesSort=function(){lv.each(e.sortParams,(function(t){var n=t.sortFieldId,r=t.sortByMeasure;if(n){var A=lt([],st(e.sortedDimensionValues[n]||[]),!1),i=Vx({dataSet:e,sortParam:t,originValues:A,isSortByMeasure:!lv.isEmpty(r)});e.sortedDimensionValues[n]=i,e.handlePivotMetaSort(n,i)}}))},e.getTotalStatus=function(t){var n=e.fields,r=n.columns,A=n.rows,i=function(e,n){if(n){var r=lv.find(e,(function(e){return!lv.has(t,e)}));return!(!r||r===lv.first(e))}return lv.every(e,(function(e){return!lv.has(t,e)}))};return{isRowGrandTotal:i(Fw(A)),isRowSubTotal:i(A,!0),isColGrandTotal:i(Fw(r)),isColSubTotal:i(r,!0)}},e}return nt(n,t),n.prototype.getExistValuesByDataItem=function(e,t){return Lw(e,t)},n.prototype.setDataCfg=function(e){t.prototype.setDataCfg.call(this,e);var n=this.fields.rows;this.sortedDimensionValues={},this.rowPivotMeta=new Map,this.colPivotMeta=new Map,this.dimensionValuesCache=new Map,this.transformIndexesData(this.originData,n),this.handleDimensionValuesSort()},n.prototype.transformIndexesData=function(e,t){var n,r=this,A=this.fields,i=A.columns,o=A.values,a=A.valueInCols;return qC.getInstance().debugCallback(jC,(function(){n=Ow({rows:Hw(t),columns:Hw(i),values:o,valueInCols:a,data:e,indexesData:r.indexesData,sortedDimensionValues:r.sortedDimensionValues,rowPivotMeta:r.rowPivotMeta,colPivotMeta:r.colPivotMeta,getExistValuesByDataItem:r.getExistValuesByDataItem}),r.indexesData=n.indexesData,r.rowPivotMeta=n.rowPivotMeta,r.colPivotMeta=n.colPivotMeta,r.sortedDimensionValues=n.sortedDimensionValues})),n},n.prototype.transformDrillDownData=function(e,t,n){var r,A=this,i=lt(lt([],st(yB.getFieldPath(n,!0)),!1),[e],!1),o=this.spreadsheet.store,a=null==n?void 0:n.id,s=null!==(r=o.get("drillDownIdPathMap"))&&void 0!==r?r:new Map;s.has(a)&&(lv.forEach(s.get(a),(function(e){lv.unset(A.indexesData,e)})),kw(this.rowPivotMeta,a));var l=this.transformIndexesData(t,i).paths;s.set(a,l),o.set("drillDownIdPathMap",s)},n.prototype.clearDrillDownData=function(e){var t=this,n=this.spreadsheet.store,r=n.get("drillDownIdPathMap");if(!r)return!1;var A=n.get("drillDownDataCache",[]);if(e){var i=r.get(e);i&&lv.forEach(i,(function(e){lv.unset(t.indexesData,e)})),kw(this.rowPivotMeta,e),r.delete(e);var o=lv.filter(A,(function(e){return r.has(null==e?void 0:e.rowId)}));n.set("drillDownDataCache",o);var a=o.map((function(e){return null==e?void 0:e.drillLevel})),s=n.get("drillDownFieldInLevel",[]).filter((function(e){return lv.includes(a,null==e?void 0:e.drillLevel)}));n.set("drillDownFieldInLevel",s)}else{r.clear();var l=this.spreadsheet.store.get("originalDataCfg");lv.isEmpty(l)||this.spreadsheet.setDataCfg(l),this.spreadsheet.store.set("drillItemsNum",-1),this.spreadsheet.store.set("drillDownDataCache",[]),this.spreadsheet.store.set("drillDownFieldInLevel",[])}return n.set("drillDownIdPathMap",r),!0},n.prototype.handlePivotMetaSort=function(e,t){var n=this.fields,r=n.rows,A=n.columns;lv.includes(r,e)?this.rowPivotMeta=Xx({pivotMeta:this.rowPivotMeta,dimensions:r,sortFieldId:e,sortedDimensionValues:t}):lv.includes(A,e)&&(this.colPivotMeta=Xx({pivotMeta:this.colPivotMeta,dimensions:A,sortFieldId:e,sortedDimensionValues:t}))},n.prototype.processDataCfg=function(e){var t=e.data,n=e.meta,r=void 0===n?[]:n,A=e.fields,i=e.sortParams,o=void 0===i?[]:i,a=A.columns,s=void 0===a?[]:a,l=A.rows,u=void 0===l?[]:l,c=A.values,h=A.valueInCols,d=A.customValueOrder,f=s,p=u;return h?f=this.isCustomMeasuresPosition(d)?this.handleCustomMeasuresOrder(d,f):lv.uniq(lt(lt([],st(s),!1),[ry],!1)):p=this.isCustomMeasuresPosition(d)?this.handleCustomMeasuresOrder(d,p):lv.uniq(lt(lt([],st(u),!1),[ry],!1)),{data:t,meta:this.processMeta(r,fv("数值")),fields:rt(rt({},A),{rows:p,columns:f,values:c}),sortParams:o}},n.prototype.getFieldsAndPivotMetaByField=function(e){var t=this.fields||{},n=t.rows,r=void 0===n?[]:n,A=t.columns,i=void 0===A?[]:A;return r.includes(e)?{dimensions:Hw(r),pivotMeta:this.rowPivotMeta}:i.includes(e)?{dimensions:Hw(i),pivotMeta:this.colPivotMeta}:{}},n.prototype.getDimensionValues=function(t,n){var r;void 0===n&&(n={});var A=this.getFieldsAndPivotMetaByField(t),i=A.pivotMeta,o=A.dimensions;if(!i||!o)return[];var a=lv.isEmpty(n);if(this.dimensionValuesCache.has(t)&&a)return null!==(r=this.dimensionValuesCache.get(t))&&void 0!==r?r:[];var s=Pw({pivotMeta:i,dimensionValues:Iw(n,o,ay),fields:o,fieldIdx:lv.indexOf(o,t),queryType:e.QueryDataType.DetailOnly,sortedDimensionValues:this.sortedDimensionValues}),l=lv.uniq(s.map((function(e){return wB(e.value)})));return a&&this.dimensionValuesCache.set(t,l),l},n.prototype.getTotalValue=function(t,n){var r,A=this.spreadsheet.options,i=function(e,t){var n=e.isRowGrandTotal,r=e.isRowSubTotal,A=e.isColGrandTotal,i=e.isColSubTotal,o=t||{},a=o.row,s=o.col,l=a||{},u=l.calcGrandTotals,c=void 0===u?{}:u,h=l.calcSubTotals,d=void 0===h?{}:h,f=s||{},p=f.calcGrandTotals,g=void 0===p?{}:p,v=f.calcSubTotals,y=void 0===v?{}:v,C=function(e,t){if((e.aggregation||e.calcFunc)&&t)return{aggregation:e.aggregation,calcFunc:e.calcFunc}};return C(g,A)||C(y,i)||C(c,n)||C(d,r)}(lv.some(n)?n:this.getTotalStatus(t),null==A?void 0:A.totals)||{},o=i.aggregation,a=i.calcFunc,s=!lv.isEmpty(null==A?void 0:A.totals)||this.spreadsheet.isHierarchyTreeType()||this.spreadsheet.isHierarchyGridTreeType()?"":e.Aggregation.SUM,l=Ox[o||s];if(l||a){var u=this.getCellMultiData({query:t,queryType:e.QueryDataType.DetailOnly}),c=null;return a?c=a(t,u,this.spreadsheet):l&&(c=l(u,ny)),Lx.getCellData(rt(rt({},lv.omit(t,[ry])),((r={})[t[ry]]=c,r)),t[ry])}},n.prototype.getCellData=function(e){var t,n,r,A,i=e||{},o=i.query,a=void 0===o?{}:o,s=i.rowNode,l=i.isTotals,u=void 0!==l&&l,c=i.totalStatus,h=this.fields,d=h.rows,f=h.columns,p=d,g=null===(t=this.spreadsheet)||void 0===t?void 0:t.store.get("drillDownIdPathMap"),v=Array.from(null!==(n=null==g?void 0:g.keys())&&void 0!==n?n:[]).some((function(e){return null==s?void 0:s.id.startsWith(e)}));s&&v&&(p=null!==(r=yB.getFieldPath(s,v))&&void 0!==r?r:d);var y=Hw(p),C=Hw(f),B=Mw({rowDimensionValues:Iw(a,y),colDimensionValues:Iw(a,C),rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,rowFields:y,colFields:C,prefix:Rw(y,C)}),m=lv.get(this.indexesData,B);return m?Lx.getCellData(m,a[ry]):u||(null===(A=this.spreadsheet)||void 0===A?void 0:A.isHierarchyGridTreeType())&&(null==s?void 0:s.isCollapsed)?this.getTotalValue(a,c):void 0},n.prototype.getQueryExtraFields=function(e){var t=this.fields.values,n=void 0===t?[]:t,r=e[ry];return r?lv.includes(n,r)?[r]:[]:n},n.prototype.getCellMultiData=function(t){var n,r,A,i,o=t||{},a=o.query,s=void 0===a?{}:a,l=o.queryType,u=void 0===l?e.QueryDataType.All:l,c=o.drillDownFields,h=void 0===c?[]:c;lv.isEmpty(s)&&console.warn("query: ".concat(s," shouldn't be empty, you can get all data from dataCfg if you're intended.\n you should use { EXTRA_FIELD: xxx} as least if you want query all specific value data"));var d=this.fields,f=d.rows,p=d.columns,g=Hw(lv.isEmpty(h)?f:f.concat(h)),v=Hw(p),y=Kw({rowDimensionValues:Iw(s,g,ay),colDimensionValues:Iw(s,v,ay),rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,rowFields:g,colFields:v,sortedDimensionValues:this.sortedDimensionValues,queryType:u}),C=y.rowQueries,B=y.colQueries,m=Rw(g,v),w=[];try{for(var E=at(C),x=E.next();!x.done;x=E.next()){var S=x.value;try{for(var T=(A=void 0,at(B)),F=T.next();!F.done;F=T.next()){for(var b,I=Mw({rowDimensionValues:S,colDimensionValues:F.value,rowPivotMeta:this.rowPivotMeta,colPivotMeta:this.colPivotMeta,rowFields:g,colFields:v,prefix:m}),L=!1,Q=this.indexesData,U=function(e){var t=I[e];L?Q=bw(t)?zw(Q,u):lv.compact(lv.map(Q,(function(e){return null==e?void 0:e[t]}))):bw(t)?(L=!0,Q=lv.compact([Q]),e--):Q=null==Q?void 0:Q[t],b=e},R=0;R<I.length;R++)U(R),R=b;lv.isArray(Q)?w.push.apply(w,lt([],st(Q),!1)):Q&&w.push(Q)}}catch(e){A={error:e}}finally{try{F&&!F.done&&(i=T.return)&&i.call(T)}finally{if(A)throw A.error}}}}catch(e){n={error:e}}finally{try{x&&!x.done&&(r=E.return)&&r.call(E)}finally{if(n)throw n.error}}var M=this.getQueryExtraFields(s);return lv.flatMap(lv.uniq(w),(function(e){return e?Lx.getCellDataList(e,M):[]}))},n.prototype.getFieldFormatter=function(e,n){return e===oy?this.getFieldFormatterForTotalValue(n):t.prototype.getFieldFormatter.call(this,e)},n.prototype.getFieldFormatterForTotalValue=function(e){var n="";return!this.spreadsheet.isValueInCols()&&e&&(n=lv.get(e.rowQuery,ry)),n=null!=n?n:lv.get(this.fields.values,0),t.prototype.getFieldFormatter.call(this,n)},n.prototype.handleCustomMeasuresOrder=function(e,t){var n=lv.uniq(lt([],st(t),!1));return t.length>=e?(n.splice(e,0,ry),n):lt(lt([],st(n),!1),[ry],!1)},n.prototype.isCustomMeasuresPosition=function(e){return lv.isNumber(e)},n.prototype.getRowData=function(e){return this.getCellMultiData({query:e.rowQuery})},n}(uS),qT=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.processDataCfg=function(e){var t=!this.spreadsheet.isCustomRowFields(),n=e.fields.rows||[],r=t?n:lt(lt([],st(n),!1),[ry],!1),A=this.processMeta(e.meta,fv("数值"));return rt(rt({},e),{meta:A,fields:rt(rt({},e.fields),{rows:r,valueInCols:t})})},t}(JT),$T=function(e){function t(){var t=e.apply(this,lt([],st(arguments),!1))||this;return t.handleDimensionValueFilter=function(){lv.each(t.filterParams,(function(e){var n=e.filterKey,r=e.filteredValues,A=e.customFilter,i=new Set(r),o=function(e){return!i.has(e[n])},a=lv.filter(t.displayData,(function(e){return A?A(e)&&o(e):o(e)}));t.displayData=t.getDisplayData(a)}))},t.handleDimensionValuesSort=function(){lv.each(t.sortParams,(function(e){var n,r=e.sortFieldId,A=e.sortBy,i=e.sortFunc,o=e.sortMethod,a=e.query;if(r){var s=t.displayData,l=[];if(a){var u=[];s.forEach((function(e){for(var t=Object.keys(a),n=!0,r=0;r<t.length;r++){var A=t[r];if(e[A]!==a[A]){n=!1,l.push(e);break}}n&&u.push(e)})),s=u}var c=s;if(i)c=i(rt(rt({},e),{data:s}));else if(A&&!lv.isFunction(A)){var h=lt([],st(A),!1).reverse();c=s.sort((function(e,t){var n=h.indexOf(e[r]);return h.indexOf(t[r])-n}))}else if(kx(o)||Nx(o)){var d=o.toLocaleLowerCase(),f=Nm(t.spreadsheet,null===(n=t.spreadsheet.options)||void 0===n?void 0:n.placeholder),p=(lv.isFunction(A)?A:null)||function(e){return e[r]===f?Number.MIN_VALUE:e[r]};c=lt([],st(s),!1).sort((function(e,n){return t.compareSortValues(p(e),p(n),d)}))}l.length&&(c=lt(lt([],st(c),!1),st(l),!1)),t.displayData=t.getDisplayData(c)}}))},t}return nt(t,e),t.prototype.compareSortValues=function(e,t,n){var r=kx(n)?1:-1;return lv.isNil(e)&&lv.isNil(t)?0:lv.isNil(e)?1:lv.isNil(t)?-1:Ux(e)&&Ux(t)?(Number(e)-Number(t))*r:e.toString().localeCompare(t.toString(),"zh")*r},t.prototype.processDataCfg=function(e){return e},t.prototype.setDataCfg=function(t){e.prototype.setDataCfg.call(this,t),this.handleDimensionValueFilter(),this.handleDimensionValuesSort()},t.prototype.getStartFrozenRows=function(e){var t=(this.spreadsheet.options.frozen||{}).rowCount;return t?e.slice(0,t):[]},t.prototype.getEndFrozenRows=function(e){var t=(this.spreadsheet.options.frozen||{}).trailingRowCount;return t?e.slice(-t):[]},t.prototype.getDisplayData=function(e){var t=this.getStartFrozenRows(e),n=this.getEndFrozenRows(e),r=e.slice(t.length||0,-n.length||void 0);return lt(lt(lt([],st(t),!1),st(r),!1),st(n),!1)},t.prototype.getDimensionValues=function(){return[]},t.prototype.getCellData=function(e){var t=(void 0===e?{}:e).query,n=void 0===t?{}:t;if(0!==this.displayData.length||0!==n.rowIndex){var r=this.displayData[n.rowIndex];return lv.hasIn(n,"field")&&lv.isObject(r)?r[n.field]:r}},t.prototype.getCellMultiData=function(e){var t=(void 0===e?{}:e).query,n=void 0===t?{}:t;if(!n)return this.displayData;var r=this.displayData[n.rowIndex]?[this.displayData[n.rowIndex]]:this.displayData;return lv.hasIn(n,"field")?r.map((function(e){return e[n.field]})):r},t.prototype.getRowData=function(e){return this.getCellData({query:{rowIndex:e.rowIndex}})},t}(uS);function eF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function tF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function nF(){}var rF=.7,AF=1/rF,iF="\\s*([+-]?\\d+)\\s*",oF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",aF="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",sF=/^#([0-9a-f]{3,8})$/,lF=new RegExp(`^rgb\\(${iF},${iF},${iF}\\)$`),uF=new RegExp(`^rgb\\(${aF},${aF},${aF}\\)$`),cF=new RegExp(`^rgba\\(${iF},${iF},${iF},${oF}\\)$`),hF=new RegExp(`^rgba\\(${aF},${aF},${aF},${oF}\\)$`),dF=new RegExp(`^hsl\\(${oF},${aF},${aF}\\)$`),fF=new RegExp(`^hsla\\(${oF},${aF},${aF},${oF}\\)$`),pF={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function gF(){return this.rgb().formatHex()}function vF(){return this.rgb().formatRgb()}function yF(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=sF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?CF(t):3===n?new wF(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?BF(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?BF(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=lF.exec(e))?new wF(t[1],t[2],t[3],1):(t=uF.exec(e))?new wF(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=cF.exec(e))?BF(t[1],t[2],t[3],t[4]):(t=hF.exec(e))?BF(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=dF.exec(e))?bF(t[1],t[2]/100,t[3]/100,1):(t=fF.exec(e))?bF(t[1],t[2]/100,t[3]/100,t[4]):pF.hasOwnProperty(e)?CF(pF[e]):"transparent"===e?new wF(NaN,NaN,NaN,0):null}function CF(e){return new wF(e>>16&255,e>>8&255,255&e,1)}function BF(e,t,n,r){return r<=0&&(e=t=n=NaN),new wF(e,t,n,r)}function mF(e,t,n,r){return 1===arguments.length?((A=e)instanceof nF||(A=yF(A)),A?new wF((A=A.rgb()).r,A.g,A.b,A.opacity):new wF):new wF(e,t,n,null==r?1:r);var A}function wF(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function EF(){return`#${FF(this.r)}${FF(this.g)}${FF(this.b)}`}function xF(){const e=SF(this.opacity);return`${1===e?"rgb(":"rgba("}${TF(this.r)}, ${TF(this.g)}, ${TF(this.b)}${1===e?")":`, ${e})`}`}function SF(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function TF(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function FF(e){return((e=TF(e))<16?"0":"")+e.toString(16)}function bF(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new LF(e,t,n,r)}function IF(e){if(e instanceof LF)return new LF(e.h,e.s,e.l,e.opacity);if(e instanceof nF||(e=yF(e)),!e)return new LF;if(e instanceof LF)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,A=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,a=i-A,s=(i+A)/2;return a?(o=t===i?(n-r)/a+6*(n<r):n===i?(r-t)/a+2:(t-n)/a+4,a/=s<.5?i+A:2-i-A,o*=60):a=s>0&&s<1?0:o,new LF(o,a,s,e.opacity)}function LF(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function QF(e){return(e=(e||0)%360)<0?e+360:e}function UF(e){return Math.max(0,Math.min(1,e||0))}function RF(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}eF(nF,yF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gF,formatHex:gF,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return IF(this).formatHsl()},formatRgb:vF,toString:vF}),eF(wF,mF,tF(nF,{brighter(e){return e=null==e?AF:Math.pow(AF,e),new wF(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?rF:Math.pow(rF,e),new wF(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wF(TF(this.r),TF(this.g),TF(this.b),SF(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:EF,formatHex:EF,formatHex8:function(){return`#${FF(this.r)}${FF(this.g)}${FF(this.b)}${FF(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:xF,toString:xF})),eF(LF,(function(e,t,n,r){return 1===arguments.length?IF(e):new LF(e,t,n,null==r?1:r)}),tF(nF,{brighter(e){return e=null==e?AF:Math.pow(AF,e),new LF(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?rF:Math.pow(rF,e),new LF(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,A=2*n-r;return new wF(RF(e>=240?e-240:e+120,A,r),RF(e,A,r),RF(e<120?e+240:e-120,A,r),this.opacity)},clamp(){return new LF(QF(this.h),UF(this.s),UF(this.l),SF(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=SF(this.opacity);return`${1===e?"hsl(":"hsla("}${QF(this.h)}, ${100*UF(this.s)}%, ${100*UF(this.l)}%${1===e?")":`, ${e})`}`}}));var MF=e=>()=>e;function HF(e){return 1==(e=+e)?OF:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):MF(isNaN(t)?n:t)}}function OF(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):MF(isNaN(e)?t:e)}var kF=function e(t){var n=HF(t);function r(e,t){var r=n((e=mF(e)).r,(t=mF(t)).r),A=n(e.g,t.g),i=n(e.b,t.b),o=OF(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=A(t),e.b=i(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function NF(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,A=t.slice();return function(i){for(n=0;n<r;++n)A[n]=e[n]*(1-i)+t[n]*i;return A}}function _F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function DF(e,t){var n,r=t?t.length:0,A=e?Math.min(r,e.length):0,i=new Array(A),o=new Array(r);for(n=0;n<A;++n)i[n]=XF(e[n],t[n]);for(;n<r;++n)o[n]=t[n];return function(e){for(n=0;n<A;++n)o[n]=i[n](e);return o}}function PF(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function GF(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function KF(e,t){var n,r={},A={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=XF(e[n],t[n]):A[n]=t[n];return function(e){for(n in r)A[n]=r[n](e);return A}}var zF=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,VF=new RegExp(zF.source,"g");function WF(e,t){var n,r,A,i=zF.lastIndex=VF.lastIndex=0,o=-1,a=[],s=[];for(e+="",t+="";(n=zF.exec(e))&&(r=VF.exec(t));)(A=r.index)>i&&(A=t.slice(i,A),a[o]?a[o]+=A:a[++o]=A),(n=n[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,s.push({i:o,x:GF(n,r)})),i=VF.lastIndex;return i<t.length&&(A=t.slice(i),a[o]?a[o]+=A:a[++o]=A),a.length<2?s[0]?function(e){return function(t){return e(t)+""}}(s[0].x):function(e){return function(){return e}}(t):(t=s.length,function(e){for(var n,r=0;r<t;++r)a[(n=s[r]).i]=n.x(e);return a.join("")})}function XF(e,t){var n,r=typeof t;return null==t||"boolean"===r?MF(t):("number"===r?GF:"string"===r?(n=yF(t))?(t=n,kF):WF:t instanceof yF?kF:t instanceof Date?PF:_F(t)?NF:Array.isArray(t)?DF:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?KF:GF)(e,t)}var YF,jF,ZF=0,JF=0,qF=0,$F=1e3,eb=0,tb=0,nb=0,rb="object"==typeof performance&&performance.now?performance:Date,Ab="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ib(){return tb||(Ab(ob),tb=rb.now()+nb)}function ob(){tb=0}function ab(){this._call=this._time=this._next=null}function sb(e,t,n){var r=new ab;return r.restart(e,t,n),r}function lb(){tb=(eb=rb.now())+nb,ZF=JF=0;try{!function(){ib(),++ZF;for(var e,t=YF;t;)(e=tb-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ZF}()}finally{ZF=0,function(){var e,t,n=YF,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:YF=t);jF=e,cb(r)}(),tb=0}}function ub(){var e=rb.now(),t=e-eb;t>$F&&(nb-=t,eb=e)}function cb(e){ZF||(JF&&(JF=clearTimeout(JF)),e-tb>24?(e<1/0&&(JF=setTimeout(lb,e-rb.now()-nb)),qF&&(qF=clearInterval(qF))):(qF||(eb=rb.now(),qF=setInterval(ub,$F)),ZF=1,Ab(lb)))}ab.prototype=sb.prototype={constructor:ab,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?ib():+n)+(null==t?0:+t),this._next||jF===this||(jF?jF._next=this:YF=this,jF=this),this._call=e,this._time=n,cb()},stop:function(){this._call&&(this._call=null,this._time=1/0,cb())}};var hb,db=function(){function e(){this.pool=[]}return e.prototype.acquire=function(){return this.pool.pop()},e.prototype.release=function(e){this.pool.push(e)},e}(),fb=function(e){function t(){var t=e.apply(this,lt([],st(arguments),!1))||this;return t.cellIdPool=new Set,t}return nt(t,e),t.prototype.acquire=function(){var t=e.prototype.acquire.call(this);return t&&this.cellIdPool.delete(t.getMeta().id),t},t.prototype.release=function(t){if(t.getRenderer())t.destroy();else{var n=t.getMeta().id;this.cellIdPool.has(n)||(e.prototype.release.call(this,t),this.cellIdPool.add(n))}},t}(db),pb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.release=function(e){e.getRenderer()?e.destroy():this.pool.push(e)},t}(db),gb=function(e){function t(){var t=e.apply(this,lt([],st(arguments),!1))||this;return t.cellIdPool=new Set,t}return nt(t,e),t.prototype.acquire=function(){var t=e.prototype.acquire.call(this);return t&&this.cellIdPool.delete(t.getMeta().id),t},t.prototype.release=function(t){if(t.getRenderer())t.destroy();else{var n=t.getMeta().id;this.cellIdPool.has(n)||(e.prototype.release.call(this,t),this.cellIdPool.add(n))}},t}(db),vb=function(e){function t(t){var n=this,r=t.name,A=t.s2,i=At(t,["name","s2"]);return(n=e.call(this,{name:r,style:i})||this).gridInfo={cols:[],rows:[]},n.updateGrid=function(e,t){var r,A,i,o;void 0===t&&(t=yv),n.gridGroup&&n.getElementById(t)||(n.gridGroup=n.appendChild(new ds({id:t,style:{zIndex:2}})));var a=null!==(r=lv.last(e.cols))&&void 0!==r?r:0,s=null!==(A=lv.last(e.rows))&&void 0!==A?A:0,l=n.s2.theme.dataCell.cell,u=null!==(i=null==l?void 0:l.verticalBorderWidth)&&void 0!==i?i:1,c=u/2,h={stroke:l.verticalBorderColor,strokeOpacity:l.verticalBorderColorOpacity,lineWidth:u},d=null!==(o=null==l?void 0:l.horizontalBorderWidth)&&void 0!==o?o:1,f=d/2,p={stroke:l.horizontalBorderColor,strokeOpacity:l.horizontalBorderColorOpacity,lineWidth:d},g=n.gridGroup.children,v=0;e.cols.forEach((function(e){var t=rt({x1:e-c,x2:e-c,y1:0,y2:s},h);v<g.length?fm(g[v],t):um(n.gridGroup,t),v++})),e.rows.forEach((function(e){var t=rt({x1:0,x2:a,y1:-f,y2:-f,transform:"translate(0, ".concat(e,")")},p);v<g.length?fm(g[v],t):um(n.gridGroup,t),v++}));var y=v,C=g.length;if(y<C)for(var B=C-1;B>=y;B--)g[B].destroy();n.gridInfo=e},n.s2=A,n}return nt(t,e),t}(ds),yb=function(t){function n(e){var n=t.call(this,e)||this;return n.initMergedCellsGroup(),n}return nt(n,t),n.prototype.getMergedCellsGroup=function(){return this.mergedCellsGroup},n.prototype.initMergedCellsGroup=function(){this.mergedCellsGroup&&this.getElementById(Bv)||(this.mergedCellsGroup=this.appendChild(new ds({id:Bv,style:{zIndex:3}})))},n.prototype.updateMergedCells=function(){this.initMergedCellsGroup(),cT(this.s2,this.mergedCellsGroup)},n.prototype.addMergeCell=function(t){var n;null===(n=this.mergedCellsGroup)||void 0===n||n.appendChild(t),this.s2.emit(e.S2Event.MERGED_CELLS_RENDER,t),this.s2.emit(e.S2Event.LAYOUT_CELL_RENDER,t)},n.prototype.update=function(e){this.updateGrid(e),this.updateMergedCells()},n}(vb),Cb=12,Bb=function(e,t){var n,r,A=e.basicColors,i=e.others,o=null==t?void 0:t.isTableMode(),a=mm()?"bold":700;return{text:{fontFamily:MC,fontSize:Cb,fontWeight:a,fill:A[0],opacity:1,textAlign:o?"center":"left",textBaseline:"middle"},bolderText:{fontFamily:MC,fontSize:Cb,fontWeight:a,fill:A[0],opacity:1,textAlign:o?"center":"right",textBaseline:"middle"},measureText:{fontFamily:MC,fontSize:Cb,fontWeight:a,fill:A[0],opacity:1,textAlign:"left",textBaseline:"middle"},cell:{backgroundColor:A[3],backgroundColorOpacity:1,horizontalBorderColor:A[10],horizontalBorderColorOpacity:1,verticalBorderColor:A[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,borderDash:[],padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:A[4],backgroundOpacity:.6},selected:{backgroundColor:A[4],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:A[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(n=null==i?void 0:i.results)&&void 0!==n?n:A[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(r=null==i?void 0:i.highlight)&&void 0!==r?r:A[6],backgroundOpacity:1}}},icon:{fill:A[0],size:10,margin:{right:4,left:4}}}},mb=function(e,t){var n,r,A=e.basicColors,i=e.others,o=null==t?void 0:t.isTableMode(),a=mm()?"bold":700;return{seriesText:{fontFamily:MC,fontSize:Cb,fontWeight:"normal",fill:A[14],linkTextFill:A[6],opacity:1,textBaseline:"middle",textAlign:"center"},measureText:{fontFamily:MC,fontSize:Cb,fontWeight:"normal",fill:A[14],linkTextFill:A[6],opacity:1,textAlign:o?"center":"left",textBaseline:"middle"},bolderText:{fontFamily:MC,fontSize:Cb,fontWeight:a,fill:A[14],linkTextFill:A[6],opacity:1,textAlign:o?"center":"left",textBaseline:"middle"},text:{fontFamily:MC,fontSize:Cb,fontWeight:"normal",fill:A[14],linkTextFill:A[6],opacity:1,textBaseline:"middle",textAlign:o?"center":"left"},cell:{backgroundColor:A[1],backgroundColorOpacity:1,horizontalBorderColor:A[9],horizontalBorderColorOpacity:1,verticalBorderColor:A[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,borderDash:[],padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:A[2],backgroundOpacity:.6},selected:{backgroundColor:A[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:A[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(n=null==i?void 0:i.results)&&void 0!==n?n:A[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(r=null==i?void 0:i.highlight)&&void 0!==r?r:A[6],backgroundOpacity:1}}},icon:{fill:A[14],size:10,margin:{right:4,left:4}},seriesNumberWidth:80}},wb=function(e){var t,n,r=e.basicColors,A=e.others,i=mm()?"bold":700;return{measureText:{fontFamily:MC,fontSize:Cb,fontWeight:"normal",fill:r[0],opacity:1,textAlign:"right",textBaseline:"middle",linkTextFill:r[6]},bolderText:{fontFamily:MC,fontSize:Cb,fontWeight:i,fill:r[0],opacity:1,textAlign:"center",textBaseline:"middle",linkTextFill:r[6]},text:{fontFamily:MC,fontSize:Cb,fontWeight:"normal",fill:r[0],opacity:1,textAlign:"center",textBaseline:"middle",linkTextFill:r[6]},cell:{backgroundColor:r[3],backgroundColorOpacity:1,horizontalBorderColor:r[10],horizontalBorderColorOpacity:1,verticalBorderColor:r[10],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,borderDash:[],padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:r[4],backgroundOpacity:.6},selected:{backgroundColor:r[4],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},prepareSelect:{borderColor:r[14],borderOpacity:1,borderWidth:1},searchResult:{backgroundColor:null!==(t=null==A?void 0:A.results)&&void 0!==t?t:r[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(n=null==A?void 0:A.highlight)&&void 0!==n?n:r[6],backgroundOpacity:1}}},icon:{fill:r[0],size:10,margin:{top:6,right:4,bottom:6,left:4}}}},Eb=function(e){var t,n,r=e.basicColors,A=e.others,i=e.semanticColors,o=mm()?"bold":700;return{bolderText:{fontFamily:MC,fontSize:Cb,fontWeight:o,fill:r[13],opacity:1,textAlign:"right",textBaseline:"middle",linkTextFill:r[6]},text:{fontFamily:MC,fontSize:Cb,fontWeight:"normal",fill:r[13],opacity:1,textAlign:"right",textBaseline:"middle",linkTextFill:r[6]},cell:{crossBackgroundColor:r[1],backgroundColor:r[8],backgroundColorOpacity:1,horizontalBorderColor:r[9],horizontalBorderColorOpacity:1,verticalBorderColor:r[9],verticalBorderColorOpacity:1,horizontalBorderWidth:1,verticalBorderWidth:1,padding:{top:8,right:8,bottom:8,left:8},interactionState:{hover:{backgroundColor:r[2],backgroundOpacity:.6},hoverFocus:{backgroundColor:r[2],backgroundOpacity:.6,borderColor:r[14],borderWidth:1,borderOpacity:1},selected:{backgroundColor:r[2],backgroundOpacity:.6},unselected:{backgroundOpacity:.3,textOpacity:.3,opacity:.3},searchResult:{backgroundColor:null!==(t=null==A?void 0:A.results)&&void 0!==t?t:r[2],backgroundOpacity:1},highlight:{backgroundColor:null!==(n=null==A?void 0:A.highlight)&&void 0!==n?n:r[6],backgroundOpacity:1},prepareSelect:{borderColor:r[14],borderOpacity:1,borderWidth:1}}},miniChart:{line:{point:{size:2.2,fill:r[6],opacity:1},linkLine:{size:1.5,fill:r[6],opacity:.6}},bar:{intervalPadding:4,fill:r[6],opacity:1},bullet:{progressBar:{widthPercent:.6,height:10,innerHeight:6},comparativeMeasure:{width:1,height:12,fill:r[13],opacity:.25},rangeColors:{good:null==i?void 0:i.green,satisfactory:i.yellow,bad:i.red},backgroundColor:"#E9E9E9"},interval:{height:12,fill:r[7]}},icon:{fill:r[13],size:10,margin:{right:4,left:4}}}},xb=function(e){var t,n=(null==e?void 0:e.palette)||LT(null==e?void 0:e.name),r=n.basicColors,A=null==e?void 0:e.spreadsheet,i=null===(t=null==e?void 0:e.getCustomTheme)||void 0===t?void 0:t.call(e,n,A);return lv.merge({cornerCell:Bb(n,A),rowCell:mb(n,A),colCell:wb(n),dataCell:Eb(n),mergedCell:Eb(n),resizeArea:{size:3,background:r[7],backgroundOpacity:0,guideLineColor:r[7],guideLineDisableColor:"rgba(0,0,0,0.25)",guideLineDash:[3,3],interactionState:{hover:{backgroundColor:r[7],backgroundOpacity:1}}},scrollBar:{trackColor:"rgba(0,0,0,0.01)",thumbHoverColor:"rgba(0,0,0,0.25)",thumbColor:"rgba(0,0,0,0.15)",thumbHorizontalMinSize:32,thumbVerticalMinSize:32,size:Bm()?3:6,hoverSize:Bm()?4:8,lineCap:"round"},splitLine:{horizontalBorderColor:r[12],horizontalBorderColorOpacity:.2,horizontalBorderWidth:2,verticalBorderColor:r[11],verticalBorderColorOpacity:.25,verticalBorderWidth:2,showShadow:!0,shadowWidth:8,shadowColors:{left:"rgba(0,0,0,0.1)",right:"rgba(0,0,0,0)"},borderDash:[]},prepareSelectMask:{backgroundColor:r[5],backgroundOpacity:.3},background:{color:r[8],opacity:1},empty:{icon:{fill:"",width:64,height:41,margin:{top:0,right:0,bottom:24,left:0}},description:{fontFamily:MC,fontSize:Cb,fontWeight:"normal",fill:r[14],opacity:1}}},i)};e.ScrollType=void 0,(hb=e.ScrollType||(e.ScrollType={})).ScrollChange="scroll-change",hb.ScrollEnd="scroll-end";var Sb=function(t){function n(n){var r=t.call(this)||this;r.eventHandlers=[],r.scrollFrameId=null,r.getCoordinatesName=function(){return{from:r.isHorizontal?"x1":"y1",to:r.isHorizontal?"x2":"y2"}},r.getCoordinatesWithBBoxExtraPadding=function(){var e=r.theme,t=e.lineCap,n=void 0===t?"butt":t,A=e.size,i=void 0===A?0:A;if("butt"===n)return{start:r.thumbOffset,end:r.thumbOffset+r.thumbLen};var o=r.isHorizontal?0:i/2,a=r.isHorizontal?i:i/2;return{start:r.thumbOffset+o,end:r.thumbOffset+r.thumbLen-a}},r.current=function(){var e=r.thumbLen/r.trackLen;return r.thumbOffset/r.trackLen/(1-e)},r.updateThumbLen=function(e){if(r.thumbLen!==e){r.thumbLen=e;var t=r.getCoordinatesName();r.thumbShape.attr(t.to,r.thumbOffset+e),r.emitScrollChange(r.thumbOffset/(r.trackLen-r.thumbLen)*r.scrollTargetMaxOffset,!1)}},r.updateThumbOffset=function(e,t){var n;void 0===t&&(t=!0);var A=r.validateRange(e);if(!(r.thumbOffset===A&&0!==A)){r.thumbOffset=A;var i=r.getCoordinatesName(),o=i.from,a=i.to,s=r.getCoordinatesWithBBoxExtraPadding(),l=s.start,u=s.end;r.thumbShape.attr(((n={})[o]=l,n[a]=u,n)),t&&r.emitScrollChange(A/(r.trackLen-r.thumbLen)*r.scrollTargetMaxOffset,!1)}},r.onlyUpdateThumbOffset=function(e){r.updateThumbOffset(e,!1)},r.emitScrollChange=function(t,n){void 0===n&&(n=!0),cancelAnimationFrame(r.scrollFrameId),r.scrollFrameId=requestAnimationFrame((function(){r.dispatchEvent(new ua(e.ScrollType.ScrollChange,{offset:t,updateThumbOffset:n}))}))},r.bindEventListener=function(e,t,n){return null==e||e.addEventListener(t,n,!1),{remove:function(){null==e||e.removeEventListener(t,n,!1)}}},r.addEvent=function(e,t,n){e.addEventListener(t,n),r.eventHandlers.push({target:e,type:t,handler:n})},r.initScrollBar=function(){r.scrollBarGroup=r.createScrollBarGroup(),r.scrollBarGroup.setPosition(r.position.x,r.position.y),r.bindEvents()},r.createScrollBarGroup=function(){var e=r.appendChild(new ds({className:r.isHorizontal?"horizontalBar":"verticalBar"}));return r.trackShape=r.createTrackShape(e),r.thumbShape=r.createThumbShape(e),e},r.createTrackShape=function(e){var t=r.theme,n=t.lineCap,A=void 0===n?"round":n,i=t.trackColor,o=t.size,a=void 0===o?0:o,s={lineWidth:a,stroke:i,lineCap:A};return r.isHorizontal?e.appendChild(new ys({style:rt(rt({},s),{x1:0,y1:a/2,x2:r.trackLen,y2:a/2})})):e.appendChild(new ys({style:rt(rt({},s),{x1:a/2,y1:0,x2:a/2,y2:r.trackLen})}))},r.createThumbShape=function(e){var t=r.theme,n=t.size,A=void 0===n?0:n,i=t.lineCap,o=void 0===i?"round":i,a={lineWidth:A,stroke:t.thumbColor,lineCap:o,cursor:"default"},s=r.getCoordinatesWithBBoxExtraPadding(),l=s.start,u=s.end;return r.isHorizontal?e.appendChild(new ys({style:rt(rt({},a),{x1:l,y1:A/2,x2:u,y2:A/2})})):e.appendChild(new ys({style:rt(rt({},a),{x1:A/2,y1:l,x2:A/2,y2:u})}))},r.bindEvents=function(){r.addEventListener(e.OriginEventType.POINTER_DOWN,r.onStartEvent),r.addEventListener(e.OriginEventType.POINTER_UP,r.onPointerUp),r.trackShape.addEventListener("click",r.onTrackClick),r.thumbShape.addEventListener(e.OriginEventType.POINTER_OVER,r.onTrackPointerOver),r.thumbShape.addEventListener(e.OriginEventType.POINTER_OUT,r.onTrackPointerOut)},r.onStartEvent=function(e){e.preventDefault();var t=e.clientX,n=e.clientY;r.startPos=r.isHorizontal?t:n,r.bindLaterEvent()},r.bindLaterEvent=function(){var t=r.ownerDocument.defaultView,n=document.body,A=[r.bindEventListener(n,e.OriginEventType.POINTER_MOVE,r.onPointerMove),r.bindEventListener(n,e.OriginEventType.POINTER_UP,r.onPointerUp),r.bindEventListener(n,e.OriginEventType.POINTER_LEAVE,r.onPointerUp)];r.addEvent(t,e.OriginEventType.POINTER_UP,r.onPointerUp),r.clearEvents=function(){A.forEach((function(e){null==e||e.remove()})),lv.each(r.eventHandlers,(function(e){var t;null===(t=e.target)||void 0===t||t.removeEventListener(e.type,e.handler)})),r.eventHandlers.length=0}},r.onTrackClick=function(e){var t=r.isHorizontal?e.x-r.position.x-r.thumbLen/2:e.y-r.position.y-r.thumbLen/2,n=r.validateRange(t);r.updateThumbOffset(n)},r.onPointerMove=function(e){e.preventDefault();var t=e.clientX,n=e.clientY,A=r.isHorizontal?t:n,i=A-r.startPos;r.startPos=A,r.updateThumbOffset(r.thumbOffset+i)},r.onPointerUp=function(t){var n;r.dispatchEvent(new ua(e.ScrollType.ScrollEnd,{})),t.preventDefault(),null===(n=r.clearEvents)||void 0===n||n.call(r)},r.onTrackPointerOver=function(){var e=r.theme,t=e.thumbHoverColor,n=e.hoverSize;r.thumbShape.attr("stroke",t),r.thumbShape.attr("lineWidth",n)},r.onTrackPointerOut=function(){var e=r.theme,t=e.thumbColor,n=e.size;r.thumbShape.attr("stroke",t),r.thumbShape.attr("lineWidth",n)},r.validateRange=function(e){var t=e;return e+r.thumbLen>r.trackLen?t=r.trackLen-r.thumbLen:e+r.thumbLen<r.thumbLen&&(t=0),t};var A=n.isHorizontal,i=void 0!==A&&A,o=n.trackLen,a=n.thumbLen,s=n.position,l=n.thumbOffset,u=void 0===l?0:l,c=n.theme,h=n.scrollTargetMaxOffset;return r.isHorizontal=i,r.thumbOffset=u,r.trackLen=o,r.thumbLen=a,r.position=s,r.theme=c,r.scrollTargetMaxOffset=h,r.initScrollBar(),r}return nt(n,t),n}(ds),Tb=function(e,t,n){return n.slice(e,t+1).map((function(e){return e.x+e.width}))},Fb=function(e,t,n){for(var r=[],A=e;A<t+1;A++)r.push(n.getCellOffsetY(A+1));return r},bb=function(e,t,n){var r=st(n,4),A=r[0],i=r[1],o=r[2],a=r[3];return e>=A&&e<=i&&t>=o&&t<=a},Ib=function(e){for(var t=st(e,4),n=t[0],r=t[1],A=t[2],i=t[3],o=[],a=n;a<=r;a+=1)for(var s=A;s<=i;s+=1)o.push([a,s]);return o},Lb=function(e,t){var n=[],r=[];return Object.keys(t||{}).forEach((function(A){var i=function(e,t){var n=[],r=[];if(lv.isEmpty(e))return lv.isEmpty(t)?{add:n,remove:r}:{add:Ib(t),remove:r};if(lv.isEmpty(t))return{add:n,remove:Ib(e)};for(var A=st(e,4),i=A[0],o=A[1],a=A[2],s=A[3],l=st(t,4),u=l[0],c=l[1],h=l[2],d=l[3],f=i;f<=o;f++)for(var p=a;p<=s;p++)bb(f,p,t)||r.push([f,p]);for(f=u;f<=c;f+=1)for(p=h;p<=d;p+=1)bb(f,p,e)||n.push([f,p]);return{add:n,remove:r}}((null==e?void 0:e[A])||[],t[A]),o=i.add,a=i.remove;n.push.apply(n,lt([],st(o),!1)),r.push.apply(r,lt([],st(a),!1))})),{add:n,remove:r}},Qb=function(e,t){void 0===t&&(t=!1),this.x=0,this.y=0,this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.width=0,this.height=0,this.originalWidth=0,this.originalHeight=0,this.viewportHeight=0,this.viewportWidth=0,this.facet=e,this.spreadsheet=e.spreadsheet,this.layoutResult=e.getLayoutResult(),t&&this.calculateBBox()},Ub=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.calculateBBox=function(){var e=this.getWidth(),t=this.getHeight();this.width=e,this.height=t,this.maxX=e,this.maxY=t},t.prototype.calculateOriginalHeight=function(){var e,t=this.layoutResult.colsHierarchy,n=this.spreadsheet.options.style.colCell;t.sampleNodeForLastLevel?this.originalHeight=Km(t.height):this.originalHeight=null!==(e=this.facet.getCellCustomSize(null,null==n?void 0:n.height))&&void 0!==e?e:0},t.prototype.calculateOriginWidth=function(){var e=this.layoutResult.rowsHierarchy;this.originalWidth=Km(e.width+this.facet.getSeriesNumberWidth())},t.prototype.getHeight=function(){return this.calculateOriginalHeight(),this.originalHeight},t.prototype.getWidth=function(){return this.calculateOriginWidth(),this.spreadsheet.isFrozenRowHeader()?this.adjustWidth():this.originalWidth},t.prototype.adjustWidth=function(){var e=this.layoutResult.colsHierarchy,t=this.spreadsheet.options,n=t.width,r=t.frozen,A=null==r?void 0:r.rowHeader,i=n*(lv.isBoolean(A)?.5:lv.clamp(A,0,1)),o=null==e?void 0:e.width,a=n-this.originalWidth;if(this.originalWidth<=i||o<=a)return this.originalWidth;return Km(o<=n-i?this.originalWidth-(o-a):i)},t}(Qb),Rb=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.calculateBBox=function(){this.calculateOriginWidth(),this.calculateOriginalHeight();var e=this.facet.cornerBBox,t=Km(e.maxX),n=Km(e.maxY);this.x=t+aw.getVerticalBorderWidth(this.spreadsheet),this.y=n+aw.getHorizontalBorderWidth(this.spreadsheet),this.minX=this.x,this.minY=this.y,this.width=this.getPanelWidth(),this.height=this.getPanelHeight(),this.viewportHeight=Math.abs(Km(Math.min(this.height,this.originalHeight))),this.viewportWidth=Math.abs(Km(Math.min(this.width,this.originalWidth))),this.maxX=this.x+this.viewportWidth,this.maxY=this.y+this.viewportHeight},t.prototype.calculateOriginalHeight=function(){this.originalHeight=this.facet.getRealHeight()},t.prototype.calculateOriginWidth=function(){this.originalWidth=this.facet.getRealWidth()},t.prototype.getPanelWidth=function(){var e=this.spreadsheet.options.width;return Math.max(0,e-this.x)},t.prototype.getPanelHeight=function(){var e=this.spreadsheet.options.height;return Math.max(0,e-this.y)},t}(Qb),Mb=function(e){function t(t){var n=e.call(this)||this;return n.isHeaderCellInViewport=function(e){var t=e.cellPosition,n=e.cellSize,r=e.viewportPosition,A=e.viewportSize;return t+n>=r&&r+A>=t},n.headerConfig=t,n.initGroups(),n}return nt(t,e),t.prototype.getHeaderConfig=function(){return this.headerConfig||{}},t.prototype.render=function(e){this.clearResizeAreaGroup(e),this.clear(),this.layout(),this.offset(),this.clip()},t.prototype.onScrollXY=function(e,t,n){this.headerConfig.scrollX===e&&this.headerConfig.scrollY===t||(this.headerConfig.scrollX=e,this.headerConfig.scrollY=t,this.render(n))},t.prototype.onRowScrollX=function(e,t){this.headerConfig.scrollX!==e&&(this.headerConfig.scrollX=e,this.render(t))},t.prototype.clearResizeAreaGroup=function(e){if(e){var t=this.parentNode,n=null==t?void 0:t.getElementById(e);null==n||n.destroyChildren()}},t.prototype.clear=function(){var e,t,n;null===(e=this.scrollGroup)||void 0===e||e.destroyChildren(),null===(t=this.frozenGroup)||void 0===t||t.destroyChildren(),null===(n=this.frozenTrailingGroup)||void 0===n||n.destroyChildren()},t.prototype.getNodes=function(){return this.getHeaderConfig().nodes||[]},t.prototype.createOrUpdate=function(e,t){oB.call(this,e,t)},t}(ds),Hb=function(e,t,n){var r=n.isHierarchyTreeType();return e.getNodes(0).map((function(e,A){var i="".concat(A+1),o=new yB({id:i,field:"",rowIndex:A,value:i});return o.x=e.x,o.y=e.y,o.width=t,o.height=r?e.getTotalHeightForTreeHierarchy():e.height,o.isLeaf=!0,o.relatedNode=e,o.spreadsheet=n,o}))},Ob=function(e){return e.reduce((function(e,t){for(var n=t.parent;n&&n.id!==Ry;)e.find((function(e){return e.id===n.id}))||e.push(n),n=n.parent;return e}),[])},kb=function(e,t){var n=t.y,r=void 0===n?0:n,A=t.height,i=void 0===A?0:A;e.y<r&&(e.height-=r-e.y,e.y=r),e.y+e.height>r+i&&(e.height-=e.y+e.height-r-i)},Nb=function(e,t){var n=t.y,r=void 0===n?0:n,A=t.height,i=void 0===A?0:A;e.y+e.height>r+i&&(e.height-=e.y+e.height-r-i),e.y<r&&(e.height-=r-e.y,e.y=r)},_b=function(t){var n,r=[],A=t.getCellRange(),i=A.start,o=A.end,a=t.getFrozenOptions(),s=a.rowCount,l=a.trailingRowCount;s&&((n=t.getRowLeafNodesByRange(i,i+s-1)).forEach((function(e){var t=e.clone();t.isFrozenHead=!0,r.push(t)})),Ob(n).forEach((function(n){var A=n.clone();A.isFrozenHead=!0,kb(A,t.frozenGroupAreas[e.FrozenGroupArea.Row]),r.push(A)})));l&&((n=t.getRowLeafNodesByRange(o-l+1,o)).forEach((function(e){var t=e.clone();t.isFrozenTrailing=!0,r.push(t)})),Ob(n).forEach((function(n){var A=n.clone();A.isFrozenTrailing=!0,Nb(A,t.frozenGroupAreas[e.FrozenGroupArea.TrailingRow]),r.push(A)})));return r},Db=function(t,n){var r=[],A=t.getCellRange(),i=A.start,o=A.end,a=t.getFrozenOptions(),s=a.rowCount,l=a.trailingRowCount,u=function(e,t){var n,r=e.rowIndex;if(lv.isNumber(r)&&r>=t[0]&&r<=t[1])return!0;for(var A=null!==(n=e.children)&&void 0!==n?n:[],i=0;i<A.length;i++)if(u(A[i],t))return!0;return!1};if(s){var c=[i,i+s-1];n.forEach((function(n){if(!n.relatedNode||u(n.relatedNode,c)){var A=n.clone();A.isFrozenHead=!0,kb(A,t.frozenGroupAreas[e.FrozenGroupArea.Row]),r.push(A)}}))}if(l){var h=[o-l+1,o];n.forEach((function(n){if(!n.relatedNode||u(n.relatedNode,h)){var A=n.clone();A.isFrozenTrailing=!0,Nb(A,t.frozenGroupAreas[e.FrozenGroupArea.TrailingRow]),r.push(A)}}))}return r},Pb=function(t){var n=[],r=t.getFrozenOptions(),A=r.colCount,i=r.trailingColCount;if(A){var o=t.frozenGroupAreas[e.FrozenGroupArea.Col],a=o.x,s=o.width;(l=t.getColLeafNodesByRange(0,A-1)).forEach((function(e){var t=e.clone();t.isFrozenHead=!0,n.push(t)})),Ob(l).forEach((function(e){var t=e.clone();t.isFrozenHead=!0,t.x<a&&(t.width-=a-t.x,t.x=a),t.x+t.width>a+s&&(t.width-=t.x+t.width-a-s),n.push(t)}))}if(i){var l,u=t.frozenGroupAreas[e.FrozenGroupArea.TrailingCol],c=u.x,h=u.width,d=t.getColLeafNodes().length;(l=t.getColLeafNodesByRange(d-i,d-1)).forEach((function(e){var t=e.clone();t.isFrozenTrailing=!0,n.push(t)})),Ob(l).forEach((function(e){var t=e.clone();t.isFrozenTrailing=!0,t.x+t.width>c+h&&(t.width-=t.x+t.width-c-h),t.x<c&&(t.width-=c-t.x,t.x=c),n.push(t)}))}return n},Gb=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=0),e.spreadsheet.isFrozenRowHeader()?0:n<=t?n:t},Kb=function(t,n){var r=t.frozenGroupAreas[e.FrozenGroupArea.TrailingCol],A=r.x+r.width;return n>A?0:A-n},zb=function(t,n,r){var A=t.frozenGroupAreas[e.FrozenGroupArea.TrailingRow],i=A.y+A.height-r;return n>i?r:r+i-n},Vb=function(t,n){var r,A=t.spreadsheet.isFrozenRowHeader(),i=t.frozenGroupAreas,o=i[e.FrozenGroupArea.Col].width,a=i[e.FrozenGroupArea.TrailingCol].width;r=A?n.x+o:o?aw.getVerticalBorderWidth(t.spreadsheet)+o:0;var s=t.panelBBox.viewportWidth;return{x:r,width:(A?s:n.x+s)-o-a}},Wb=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.colCellPool=new fb,e}return nt(n,t),n.prototype.initGroups=function(){this.scrollGroup=this.appendChild(new ds({name:Iv,style:{zIndex:3}})),this.frozenGroup=this.appendChild(new ds({name:Lv,style:{zIndex:4}})),this.frozenTrailingGroup=this.appendChild(new ds({name:Qv,style:{zIndex:4}})),this.extraFrozenNodes=Pb(this.headerConfig.spreadsheet.facet)},n.prototype.getCellGroup=function(e){return e.isFrozenHead?this.frozenGroup:e.isFrozenTrailing?this.frozenTrailingGroup:this.scrollGroup},n.prototype.getCellInstance=function(e){var t;if(this.colCellPool.pool.length>0&&(null===(t=this.headerConfig.spreadsheet.options.future)||void 0===t?void 0:t.experimentalReuseCell)){var n=this.colCellPool.acquire();return n.reInitCell(e,this.getHeaderConfig()),n}var r=this.getHeaderConfig(),A=this.getHeaderConfig().spreadsheet,i=A.options.colCell;return(null==i?void 0:i(e,A,r))||new jx(e,A,r)},n.prototype.appendNode=function(t){var n,r,A=this.getHeaderConfig().spreadsheet,i=this.getCellGroup(t);(null===(n=t.belongsCell)||void 0===n?void 0:n.parentNode)===i&&t.belongsCell.getMeta()===t?(r=t.belongsCell).setHeaderConfig(this.headerConfig):(r=this.getCellInstance(t),t.belongsCell=r,r.parentElement!==i&&(null==i||i.appendChild(r))),A.emit(e.S2Event.COL_CELL_RENDER,r),A.emit(e.S2Event.LAYOUT_CELL_RENDER,r)},n.prototype.layout=function(){var e=this,t=this.getHeaderConfig().nodes;lv.each(t,(function(t){e.isColCellInRect(t)&&e.appendNode(t)})),lv.each(this.extraFrozenNodes,(function(t){e.appendNode(t)}))},n.prototype.onColScroll=function(e,t){this.headerConfig.scrollX!==e&&(this.headerConfig.scrollX=e,this.render(t))},n.prototype.clip=function(){var t=this.getHeaderConfig(),n=t.height,r=t.spreadsheet,A=t.position,i=t.viewportWidth,o=t.cornerWidth,a=void 0===o?0:o,s=t.scrollX,l=void 0===s?0:s,u=r.facet,c=u.frozenGroupAreas,h=c[e.FrozenGroupArea.Col].width,d=c[e.FrozenGroupArea.TrailingCol].width,f=Vb(u,A),p=f.x,g=f.width;this.createOrUpdate("scrollGroup.style.clipPath",{x:p,y:A.y,width:g,height:n}),this.createOrUpdate("frozenGroup.style.clipPath",{x:A.x-Gb(u,a,l),y:A.y,width:h,height:n}),this.createOrUpdate("frozenTrailingGroup.style.clipPath",{x:A.x+i-d,y:A.y,width:d,height:n})},n.prototype.isColCellInRect=function(t){var n,r=this.getHeaderConfig(),A=r.spreadsheet,i=r.cornerWidth,o=void 0===i?0:i,a=r.viewportWidth,s=r.scrollX,l=void 0===s?0:s,u=r.position,c=A.facet.frozenGroupAreas,h=c[e.FrozenGroupArea.Col].width,d=c[e.FrozenGroupArea.TrailingCol].width;return n=A.isFrozenRowHeader()?h:h?h-o:-u.x,a-d>=t.x-l&&n<=t.x+t.width-l},n.prototype.offset=function(){var e=this.getHeaderConfig(),t=e.viewportWidth,n=e.scrollX,r=void 0===n?0:n,A=e.position,i=e.spreadsheet,o=e.cornerWidth;qm(this.scrollGroup,A.x-r,A.y);var a=i.facet,s=Gb(a,o,r),l=Kb(a,t);qm(this.frozenGroup,A.x-s,A.y),qm(this.frozenTrailingGroup,A.x-l,A.y)},n.prototype.clear=function(){var e,n=this;(null===(e=this.headerConfig.spreadsheet.options.future)||void 0===e?void 0:e.experimentalReuseCell)?this.scrollGroup.childNodes.forEach((function(e){n.isColCellInRect(e.getMeta())||(e.getMeta().belongsCell=null,n.colCellPool.release(e))})):t.prototype.clear.call(this)},n.prototype.clearResizeAreaGroup=function(e){var n;(null===(n=this.headerConfig.spreadsheet.options.future)||void 0===n?void 0:n.experimentalReuseCell)||t.prototype.clearResizeAreaGroup.call(this,e)},n}(Mb),Xb=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.initGroups=function(){this.scrollGroup=this.appendChild(new ds({name:Rv,style:{zIndex:3}}))},n.prototype.getCellInstance=function(e){var t=this.getHeaderConfig(),n=t.spreadsheet,r=n.options.cornerCell;return(null==r?void 0:r(e,n,t))||new Zx(e,n,t)},n.getCornerHeader=function(e){var t=e.panelBBox,r=e.cornerBBox,A=e.seriesNumberWidth,i=e.layoutResult,o=e.spreadsheet,a=t.width,s=t.height,l=r.originalWidth,u=r.originalHeight,c=r.width,h=r.height;return new n({nodes:this.getCornerNodes({position:{x:r.x,y:r.y},width:l,height:u,layoutResult:i,seriesNumberWidth:A,spreadsheet:o}),position:{x:r.x,y:r.y},width:c,height:h,originalHeight:u,originalWidth:l,viewportWidth:a,viewportHeight:s,seriesNumberWidth:A,spreadsheet:o})},n.getTreeCornerText=function(e){var t=e.dataSet.fields.rows,n=void 0===t?[]:t,r=e.options.cornerText;if(r)return r;var A=e.store.get("drillDownFieldInLevel",[]).map((function(e){return e.drillField})),i=n.filter((function(e){return!lv.includes(A,e)})).map((function(t){return e.dataSet.getFieldName(t)})).join("/");return i||Pv()},n.getCornerNodes=function(t){var n,r,A,i,o,a=t.position,s=t.width,l=t.layoutResult,u=t.seriesNumberWidth,c=t.spreadsheet,h=l.rowsHierarchy,d=l.colsHierarchy,f=(null===(n=null==c?void 0:c.dataSet)||void 0===n?void 0:n.fields)||{},p=f.rows,g=void 0===p?[]:p,v=f.columns,y=void 0===v?[]:v,C=c.options.style.colCell,B=[],m=null==d?void 0:d.sampleNodeForLastLevel;if(u){var w=new yB({id:"",field:"",value:c.getSeriesNumberText()});w.x=null==a?void 0:a.x,w.y=null!==(r=null==m?void 0:m.y)&&void 0!==r?r:0,w.width=u,w.height=null!==(A=null==m?void 0:m.height)&&void 0!==A?A:null==C?void 0:C.height,w.isPivotMode=!0,w.spreadsheet=c,w.cornerType=e.CornerNodeType.Series,B.push(w)}if(c.isHierarchyTreeType()){var E=this.getTreeCornerText(c),x=new yB({id:E,field:"",value:E});x.x=a.x+u,x.y=null!==(i=null==m?void 0:m.y)&&void 0!==i?i:0,x.width=s-u,x.height=null!==(o=null==m?void 0:m.height)&&void 0!==o?o:null==C?void 0:C.height,x.seriesNumberWidth=u,x.isPivotMode=!0,x.spreadsheet=c,x.cornerType=e.CornerNodeType.Row,B.push(x)}else{var S=h.sampleNodesForAllLevels||[],T=c.isCustomRowFields();S.forEach((function(t){var n,r,A,i=T?t.field:g[t.level],o=c.dataSet.getFieldName(i),a=new yB({id:i,field:i,value:o});a.x=t.x+u,a.y=null!==(n=null==m?void 0:m.y)&&void 0!==n?n:0,a.width=t.width,a.height=null!==(r=null==m?void 0:m.height)&&void 0!==r?r:null===(A=c.facet)||void 0===A?void 0:A.getCellCustomSize(null,null==C?void 0:C.height),a.isPivotMode=!0,a.cornerType=e.CornerNodeType.Row,a.spreadsheet=c,B.push(a)}))}var F=d.sampleNodesForAllLevels||[],b=c.isCustomColumnFields();return F.forEach((function(t){if(t.level<d.maxLevel){var n=b?t.field:y[t.level],r=c.dataSet.getFieldName(n),A=new yB({id:n,field:n,value:r});A.x=a.x,A.y=t.y,A.width=s,A.height=t.height,A.isPivotMode=!0,A.cornerType=e.CornerNodeType.Col,A.spreadsheet=c,B.push(A)}})),B},n.prototype.onCorScroll=function(e,t){this.headerConfig.scrollX!==e&&(this.headerConfig.scrollX=e,this.render(t))},n.prototype.layout=function(){var t,n,r=this,A=this.getHeaderConfig(),i=A.nodes,o=A.spreadsheet,a=null===(t=o.options)||void 0===t?void 0:t.cornerHeader;if(a)a(this,o,this.headerConfig);else{var s=(null===(n=o.facet)||void 0===n?void 0:n.getColNodes())||[];i.forEach((function(t){var n,A=null==s?void 0:s.find((function(e){return(null==t?void 0:t.y)===(null==e?void 0:e.y)&&(null==t?void 0:t.height)===(null==e?void 0:e.height)}));t.extra.isCustomHeight=null===(n=null==A?void 0:A.extra)||void 0===n?void 0:n.isCustomHeight;var i=r.getCellInstance(t);r.scrollGroup.appendChild(i),o.emit(e.S2Event.CORNER_CELL_RENDER,i),o.emit(e.S2Event.LAYOUT_CELL_RENDER,i)}))}},n.prototype.offset=function(){var e=this.getHeaderConfig(),t=e.position,n=e.scrollX,r=void 0===n?0:n;qm(this.scrollGroup,t.x-r,t.y)},n.prototype.clip=function(){var e=this.getHeaderConfig(),t=e.width,n=e.height,r=e.position;this.createOrUpdate("scrollGroup.style.clipPath",{x:r.x,y:r.y,width:t,height:n})},n}(Mb),Yb=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.rowCellPool=new gb,e}return nt(n,t),n.prototype.initGroups=function(){this.scrollGroup=this.appendChild(new ds({name:Sv,style:{zIndex:3}})),this.frozenGroup=this.appendChild(new ds({name:Tv,style:{zIndex:4}})),this.frozenTrailingGroup=this.appendChild(new ds({name:Fv,style:{zIndex:4}}));var e=this.getHeaderConfig().spreadsheet;this.extraFrozenNodes=_b(e.facet)},n.prototype.getCellInstance=function(e){var t;if(this.rowCellPool.pool.length>0&&(null===(t=this.headerConfig.spreadsheet.options.future)||void 0===t?void 0:t.experimentalReuseCell)){var n=this.rowCellPool.acquire();return n.reInitCell(e,this.headerConfig),n}var r=this.getHeaderConfig(),A=r.spreadsheet,i=A.options.rowCell;return(null==i?void 0:i(e,A,r))||new AS(e,A,r)},n.prototype.isCellInRect=function(t){var n=this.getHeaderConfig(),r=n.width,A=n.viewportHeight,i=n.position,o=n.scrollY,a=void 0===o?0:o,s=n.scrollX,l=void 0===s?0:s,u=n.spreadsheet.facet.frozenGroupAreas;return A+a-u[e.FrozenGroupArea.TrailingRow].height>t.y&&a+u[e.FrozenGroupArea.Row].height<t.y+t.height&&r+l-i.x>t.x&&l-i.x<t.x+t.width},n.prototype.getCellGroup=function(e){return e.isFrozenHead?this.frozenGroup:e.isFrozenTrailing?this.frozenTrailingGroup:this.scrollGroup},n.prototype.layout=function(){var e=this,t=this.getHeaderConfig().nodes,n=function(t){var n,r,A=e.getCellGroup(t);(null===(n=t.belongsCell)||void 0===n?void 0:n.parentNode)===A&&t.belongsCell.getMeta()===t?((r=t.belongsCell).setHeaderConfig(e.headerConfig),r.updateTextPosition()):(r=e.getCellInstance(t),t.belongsCell=r,r.parentElement!==A&&(null==A||A.appendChild(r))),e.emitRenderEvent(r)};lv.each(t,(function(t){e.isCellInRect(t)&&0!==t.height&&n(t)})),lv.each(this.extraFrozenNodes,(function(e){0!==e.height&&n(e)}))},n.prototype.emitRenderEvent=function(t){var n=this.getHeaderConfig().spreadsheet;n.emit(e.S2Event.ROW_CELL_RENDER,t),n.emit(e.S2Event.LAYOUT_CELL_RENDER,t)},n.prototype.offset=function(){var e=this.getHeaderConfig(),t=e.scrollX,n=void 0===t?0:t,r=e.scrollY,A=void 0===r?0:r,i=e.position,o=e.spreadsheet,a=e.viewportHeight,s=i.x-n,l=o.facet.getPaginationScrollY(),u=o.facet,c=zb(u,a,l);qm(this.scrollGroup,s,i.y-A),qm(this.frozenGroup,s,i.y-l),qm(this.frozenTrailingGroup,s,i.y-c)},n.prototype.clip=function(){var t=this.getHeaderConfig(),n=t.width,r=t.viewportHeight,A=t.position,i=t.spreadsheet,o=i.facet.frozenGroupAreas,a=o[e.FrozenGroupArea.Row].height,s=o[e.FrozenGroupArea.TrailingRow].height;this.createOrUpdate("scrollGroup.style.clipPath",{x:i.facet.cornerBBox.x,y:A.y+a,width:n,height:r-a-s}),this.createOrUpdate("frozenGroup.style.clipPath",{x:i.facet.cornerBBox.x,y:A.y,width:n,height:a}),this.createOrUpdate("frozenTrailingGroup.style.clipPath",{x:i.facet.cornerBBox.x,y:A.y+r-s,width:n,height:s})},n.prototype.clear=function(){var e,n=this;(null===(e=this.headerConfig.spreadsheet.options.future)||void 0===e?void 0:e.experimentalReuseCell)?this.scrollGroup.childNodes.forEach((function(e){n.isCellInRect(e.getMeta())||(e.getMeta().belongsCell=null,n.rowCellPool.release(e))})):t.prototype.clear.call(this)},n}(Mb),jb=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.getSeriesNumberHeader=function(e){var t,r,A=e.panelBBox,i=e.seriesNumberWidth,o=e.rowsHierarchy,a=e.spreadsheet,s=e.cornerWidth,l=A.height,u=A.viewportHeight,c=null!==(r=null===(t=a.options)||void 0===t?void 0:t.layoutSeriesNumberNodes)&&void 0!==r?r:Hb;return new n({width:s,height:l,viewportWidth:s,viewportHeight:u,position:{x:0,y:A.y},nodes:c(o,i,a),spreadsheet:a})},n.prototype.initGroups=function(){this.scrollGroup=this.appendChild(new ds({name:mv,style:{zIndex:3}})),this.frozenGroup=this.appendChild(new ds({name:wv,style:{zIndex:4}})),this.frozenTrailingGroup=this.appendChild(new ds({name:Ev,style:{zIndex:4}}));var e=this.getHeaderConfig(),t=e.spreadsheet,n=e.nodes;this.extraFrozenNodes=Db(t.facet,n)},n.prototype.getCellInstance=function(e){var t=this.getHeaderConfig(),n=t.spreadsheet,r=n.options.seriesNumberCell;return(null==r?void 0:r(e,n,t))||new iS(e,n,t)},n.prototype.emitRenderEvent=function(t){var n=this.getHeaderConfig().spreadsheet;n.emit(e.S2Event.SERIES_NUMBER_CELL_RENDER,t),n.emit(e.S2Event.LAYOUT_CELL_RENDER,t)},n}(Yb),Zb=function(){function e(){this._events={}}return e.prototype.on=function(e,t,n){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:t,once:!!n}),this},e.prototype.once=function(e,t){return this.on(e,t,!0)},e.prototype.emit=function(e){for(var t=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var A=this._events[e]||[],i=this._events["*"]||[],o=function(r){for(var A=r.length,i=0;i<A;i++)if(r[i]){var o=r[i],a=o.callback;o.once&&(r.splice(i,1),0===r.length&&delete t._events[e],A--,i--),a.apply(t,n)}};o(A),o(i)},e.prototype.off=function(e,t){if(e)if(t){for(var n=this._events[e]||[],r=n.length,A=0;A<r;A++)n[A].callback===t&&(n.splice(A,1),r--,A--);0===n.length&&delete this._events[e]}else delete this._events[e];else this._events={};return this},e.prototype.getEvents=function(){return this._events},e}();var Jb=function(){var e;return null!==(e=null===performance||void 0===performance?void 0:performance.now())&&void 0!==e?e:Date.now()},qb=function(e){var t,n=e.nativeEvent;return(null===(t=null==n?void 0:n.touches)||void 0===t?void 0:t.length)>=2},$b=function(t){function n(e,n){var r=t.call(this)||this;return r.bindPointerDown=function(e){qb(e)||(window.cancelAnimationFrame(r.raf),r.panning=!0,r.preX=e.x,r.preY=e.y,r.speedX=0,r.speedY=0,r.lastMoveMS=Jb())},r.bindPointerMove=function(e){var t,n,A,i;if(qb(e))return r.panning=!1,void window.cancelAnimationFrame(r.raf);if(r.panning){var o=e.nativeEvent,a=Jb(),s=a-r.lastMoveMS,l=r.preX-e.x,u=r.preY-e.y;if(null==o?void 0:o.cancelable)(null===(n=null===(t=r.shouldPreventDefault)||void 0===t?void 0:t.call(r,l,u,e.x,e.y))||void 0===n||n)&&(null===(i=(A=o).preventDefault)||void 0===i||i.call(A));r.speedX=l/s,r.speedY=u/s,r.preX=e.x,r.preY=e.y,r.lastMoveMS=a,r.emit("wheel",rt(rt({},e.clone()),{x:e.x,y:e.y,deltaX:l,deltaY:u,nativeEvent:o}))}},r.bindPointerUp=function(e){r.panning=!1;var t=Jb();if(r.speedX&&r.speedY&&!(t-r.lastMoveMS>=100)){var n=function(){var A=Jb();r.raf=window.requestAnimationFrame((function(){var i=Jb(),o=(i-t)/800;if(o<1){var a=function(e){return e*e*e}(1-o),s=i-A;r.emit("wheel",rt(rt({},e.clone()),{x:e.x,y:e.y,deltaX:r.speedX*a*s,deltaY:r.speedY*a*s})),n()}}))};n()}},r.canvas=e,r.panning=!1,r.shouldPreventDefault=n,r.init(),r}return nt(n,t),n.prototype.init=function(){this.canvas.addEventListener(e.OriginEventType.POINTER_DOWN,this.bindPointerDown),this.canvas.addEventListener(e.OriginEventType.POINTER_MOVE,this.bindPointerMove),this.canvas.addEventListener(e.OriginEventType.POINTER_UP,this.bindPointerUp)},n.prototype.destroy=function(){this.canvas.removeEventListener(e.OriginEventType.POINTER_DOWN,this.bindPointerDown),this.canvas.removeEventListener(e.OriginEventType.POINTER_MOVE,this.bindPointerMove),this.canvas.removeEventListener(e.OriginEventType.POINTER_UP,this.bindPointerUp)},n}(Zb),eI=function(){function t(t){var n=this;this.scrollFrameId=null,this.getLayoutResult=function(){return rt(rt({},n.layoutResult),{cornerNodes:n.getCornerNodes(),seriesNumberNodes:n.getSeriesNumberNodes()})},this.hideScrollBar=function(){var e,t,r;null===(e=n.hRowScrollBar)||void 0===e||e.setAttribute("visibility","hidden"),null===(t=n.hScrollBar)||void 0===t||t.setAttribute("visibility","hidden"),null===(r=n.vScrollBar)||void 0===r||r.setAttribute("visibility","hidden")},this.delayHideScrollBar=lv.debounce(this.hideScrollBar,1e3),this.delayHideScrollbarOnMobile=function(){Bm()&&n.delayHideScrollBar()},this.showVerticalScrollBar=function(){var e;null===(e=n.vScrollBar)||void 0===e||e.setAttribute("visibility","visible")},this.showHorizontalScrollBar=function(){var e,t;null===(e=n.hRowScrollBar)||void 0===e||e.setAttribute("visibility","visible"),null===(t=n.hScrollBar)||void 0===t||t.setAttribute("visibility","visible")},this.onContainerWheelForMobileCompatibility=function(){var t,r,A=n.spreadsheet.getCanvasElement();A.addEventListener("touchstart",(function(e){t=e.touches[0].clientY,n.scrollDirection=void 0})),A.addEventListener("touchend",(function(A){(r=A.changedTouches[0].clientY)<t?n.scrollDirection=e.ScrollDirection.SCROLL_UP:r>t&&(n.scrollDirection=e.ScrollDirection.SCROLL_DOWN)}))},this.onContainerWheel=function(){Bm()?n.onContainerWheelForMobile():n.onContainerWheelForPc()},this.getMobileWheelDeltaY=function(t){return n.scrollDirection===e.ScrollDirection.SCROLL_UP?Math.max(0,t):n.scrollDirection===e.ScrollDirection.SCROLL_DOWN?Math.min(0,t):t},this.onContainerWheelForPc=function(){var e=n.spreadsheet.getCanvasElement();null==e||e.addEventListener("wheel",n.onWheel)},this.onContainerWheelForMobile=function(){n.mobileWheel=new $b(n.spreadsheet.container,(function(e,t,r,A){var i=n.spreadsheet.options.interaction;return"auto"!==(null==i?void 0:i.overscrollBehavior)||n.isScrollOverTheViewport({deltaX:e,deltaY:t,offsetX:r,offsetY:A})})),n.mobileWheel.on("wheel",(function(e){n.spreadsheet.hideTooltip();var t=e.originalEvent,r=e.deltaX,A=e.deltaY,i=e.x,o=e.y,a=e.nativeEvent,s=n.getMobileWheelDeltaY(A);n.onWheel(rt(rt({},t),{deltaX:r,deltaY:s,offsetX:i,offsetY:o,__nativeEvent__:a}))})),n.onContainerWheelForMobileCompatibility()},this.bindEvents=function(){n.onContainerWheel(),n.emitPaginationEvent()},this.setScrollOffset=function(e){Object.keys(e||{}).forEach((function(t){var r=lv.get(e,t);lv.isUndefined(r)||n.spreadsheet.store.set(t,Km(r))}))},this.getScrollOffset=function(){var e=n.spreadsheet.store;return{scrollX:e.get("scrollX",0),scrollY:e.get("scrollY",0),rowHeaderScrollX:e.get("rowHeaderScrollX",0)}},this.resetScrollX=function(){n.setScrollOffset({scrollX:0})},this.resetRowScrollX=function(){n.setScrollOffset({rowHeaderScrollX:0})},this.resetScrollY=function(){n.setScrollOffset({scrollY:0})},this.resetScrollOffset=function(){n.setScrollOffset({scrollX:0,scrollY:0,rowHeaderScrollX:0})},this.emitPaginationEvent=function(){var t=n.spreadsheet.options.pagination;if(t){var r=t.current,A=void 0===r?1:r,i=t.pageSize,o=n.viewCellHeights.getTotalLength(),a=Km((o-1)/i)+1;n.spreadsheet.emit(e.S2Event.LAYOUT_PAGINATION,{pageSize:i,pageCount:a,total:o,current:A})}},this.unbindEvents=function(){var e,t=n.spreadsheet.getCanvasElement();null==t||t.removeEventListener("wheel",n.onWheel),null===(e=n.mobileWheel)||void 0===e||e.destroy()},this.calculateCellWidthHeight=function(){var e=n.layoutResult.colLeafNodes,t=lv.reduce(e,(function(e,t){var n=lv.last(e)||0;return e.push(n+t.width),e}),[0]);n.viewCellWidths=t,n.viewCellHeights=n.getViewCellHeights()},this.getRealScrollX=function(e,t){return void 0===t&&(t=0),n.spreadsheet.isFrozenRowHeader()?t:e},this.getRealWidth=function(){return lv.last(n.viewCellWidths)||0},this.getRealHeight=function(){var e=n.spreadsheet.options.pagination,t=n.viewCellHeights;if(e){var r=n.getCellRange(),A=r.start,i=r.end;return t.getCellOffsetY(i+1)-t.getCellOffsetY(A)}return t.getTotalHeight()},this.scrollWithAnimation=function(e,t,r){var A,i,o,a;void 0===e&&(e={}),void 0===t&&(t=200);var s=n.getAdjustedScrollOffset({scrollX:(null===(A=e.offsetX)||void 0===A?void 0:A.value)||0,scrollY:(null===(i=e.offsetY)||void 0===i?void 0:i.value)||0,rowHeaderScrollX:(null===(o=e.rowHeaderOffsetX)||void 0===o?void 0:o.value)||0}),l=s.scrollX,u=s.scrollY,c=s.rowHeaderScrollX;null===(a=n.timer)||void 0===a||a.stop();var h=n.getScrollOffset(),d=[null!=l?l:h.scrollX,null!=u?u:h.scrollY,null!=c?c:h.rowHeaderScrollX],f=function(e,t){return(_F(t)?NF:DF)(e,t)}(Object.values(h),d);n.timer=sb((function(A){try{var i=Math.min(A/t,1),o=st(f(i),3),a=o[0],s=o[1],l=o[2];n.setScrollOffset({rowHeaderScrollX:l,scrollX:a,scrollY:s}),n.startScroll(null==e?void 0:e.skipScrollEvent),A>t&&(n.timer.stop(),null==r||r())}catch(e){console.error(e),n.timer.stop()}}))},this.scrollImmediately=function(e){var t,r,A;void 0===e&&(e={});var i=n.getAdjustedScrollOffset({scrollX:(null===(t=e.offsetX)||void 0===t?void 0:t.value)||0,scrollY:(null===(r=e.offsetY)||void 0===r?void 0:r.value)||0,rowHeaderScrollX:(null===(A=e.rowHeaderOffsetX)||void 0===A?void 0:A.value)||0}),o=i.scrollX,a=i.scrollY,s=i.rowHeaderScrollX;n.setScrollOffset({scrollX:o,scrollY:a,rowHeaderScrollX:s}),n.startScroll(null==e?void 0:e.skipScrollEvent)},this.startScroll=function(e){var t,r,A;void 0===e&&(e=!1);var i=n.getScrollOffset(),o=i.rowHeaderScrollX,a=i.scrollX,s=i.scrollY;null===(t=n.hRowScrollBar)||void 0===t||t.onlyUpdateThumbOffset(n.getScrollBarOffset(o,n.hRowScrollBar)),null===(r=n.hScrollBar)||void 0===r||r.onlyUpdateThumbOffset(n.getScrollBarOffset(a,n.hScrollBar)),null===(A=n.vScrollBar)||void 0===A||A.onlyUpdateThumbOffset(n.getScrollBarOffset(s,n.vScrollBar)),n.dynamicRenderCell(e)},this.getRendererHeight=function(){var e=n.getCellRange(),t=e.start,r=e.end;return n.viewCellHeights.getCellOffsetY(r+1)-n.viewCellHeights.getCellOffsetY(t)},this.getAdjustedScrollOffset=function(e){var t=e.scrollX,r=e.scrollY,A=e.rowHeaderScrollX;return{scrollX:ZS(t,n.layoutResult.colsHierarchy.width,n.panelBBox.width),scrollY:ZS(r,n.getRendererHeight(),n.panelBBox.height),rowHeaderScrollX:jS(A,n.cornerBBox)}},this.getScrollBarOffset=function(e,t){return e*(t.trackLen-t.thumbLen)/t.scrollTargetMaxOffset},this.isScrollOverThePanelArea=function(e){var t=e.offsetX,r=e.offsetY;return t>n.panelBBox.minX&&t<n.panelBBox.maxX&&r>n.panelBBox.minY&&r<n.panelBBox.maxY},this.isScrollOverTheCornerArea=function(e){var t=e.offsetX,r=e.offsetY;return t>n.cornerBBox.minX&&t<n.cornerBBox.maxX&&r>n.cornerBBox.minY&&r<n.cornerBBox.maxY+n.panelBBox.height},this.updateHorizontalRowScrollOffset=function(e){var t,r=e.offset,A=e.offsetX,i=e.offsetY;n.isScrollOverTheCornerArea({offsetX:A,offsetY:i})&&(null===(t=n.hRowScrollBar)||void 0===t||t.emitScrollChange(r))},this.updateHorizontalScrollOffset=function(e){var t,r=e.offset,A=e.offsetX,i=e.offsetY;n.hRowScrollBar&&!n.isScrollOverThePanelArea({offsetX:A,offsetY:i})||null===(t=n.hScrollBar)||void 0===t||t.emitScrollChange(r)},this.isScrollToLeft=function(e){var t=e.deltaX,r=e.offsetX,A=e.offsetY;if(!n.hScrollBar&&!n.hRowScrollBar)return!0;var i=!n.hRowScrollBar||n.isScrollOverThePanelArea({offsetY:A,offsetX:r})||n.hRowScrollBar.thumbOffset<=0,o=!n.hScrollBar||n.hScrollBar.thumbOffset<=0;return t<=0&&o&&i},this.isScrollToRight=function(e){var t,r,A,i,o,a,s=e.deltaX,l=e.offsetX,u=e.offsetY;if(!n.hScrollBar&&!n.hRowScrollBar)return!0;var c=n.spreadsheet.isFrozenRowHeader()?null===(t=n.panelBBox)||void 0===t?void 0:t.width:null===(r=n.panelBBox)||void 0===r?void 0:r.maxX,h=!n.hRowScrollBar||n.isScrollOverThePanelArea({offsetY:u,offsetX:l})||(null===(A=n.hRowScrollBar)||void 0===A?void 0:A.thumbOffset)+(null===(i=n.hRowScrollBar)||void 0===i?void 0:i.thumbLen)>=n.cornerBBox.width,d=n.hRowScrollBar&&n.isScrollOverTheCornerArea({offsetX:l,offsetY:u})||(null===(o=n.hScrollBar)||void 0===o?void 0:o.thumbOffset)+(null===(a=n.hScrollBar)||void 0===a?void 0:a.thumbLen)>=c;return s>=0&&d&&h},this.isScrollToTop=function(e){var t;return!n.vScrollBar||e<=0&&(null===(t=n.vScrollBar)||void 0===t?void 0:t.thumbOffset)<=0},this.isScrollToBottom=function(e){var t,r,A;return!n.vScrollBar||e>=0&&(null===(t=n.vScrollBar)||void 0===t?void 0:t.thumbOffset)+(null===(r=n.vScrollBar)||void 0===r?void 0:r.thumbLen)>=(null===(A=n.panelBBox)||void 0===A?void 0:A.height)},this.isVerticalScrollOverTheViewport=function(e){return!n.isScrollToTop(e)&&!n.isScrollToBottom(e)},this.isHorizontalScrollOverTheViewport=function(e){return!n.isScrollToLeft(e)&&!n.isScrollToRight(e)},this.isScrollOverTheViewport=function(e){var t=e.deltaY,r=e.deltaX;return!(e.offsetY<=n.cornerBBox.maxY)&&(0!==t?n.isVerticalScrollOverTheViewport(t):0!==r&&n.isHorizontalScrollOverTheViewport(e))},this.cancelScrollFrame=function(){return(!Bm()||!n.scrollFrameId)&&(cancelAnimationFrame(n.scrollFrameId),!0)},this.clearScrollFrameIdOnMobile=function(){Bm()&&(n.scrollFrameId=null)},this.stopScrollChainingIfNeeded=function(e){var t=n.spreadsheet.options.interaction;"auto"!==(null==t?void 0:t.overscrollBehavior)&&(n.cancelScrollFrame(),n.stopScrollChaining(e))},this.stopScrollChaining=function(e){var t,n,r=(null==e?void 0:e.__nativeEvent__)||(null==e?void 0:e.nativeEvent);(null==r?void 0:r.cancelable)&&(null===(t=null==r?void 0:r.preventDefault)||void 0===t||t.call(r)),(null==e?void 0:e.cancelable)&&(null===(n=null==e?void 0:e.preventDefault)||void 0===n||n.call(e))},this.onWheel=function(t){var r=n.spreadsheet.options.interaction,A=t.deltaX,i=t.deltaY,o=t.offsetX,a=t.offsetY,s=n.getScrollOffset(),l=s.scrollX,u=s.rowHeaderScrollX;t.shiftKey&&mm()&&(o=o-A+i,A=i,a-=i,i=0);var c=st(Jm(A,i,null==r?void 0:r.scrollSpeedRatio),2),h=c[0],d=c[1];if(n.spreadsheet.hideTooltip(),n.spreadsheet.interaction.clearHoverTimer(),n.isScrollOverTheViewport({deltaX:h,deltaY:d,offsetX:o,offsetY:a})){if(n.stopScrollChaining(t),n.spreadsheet.interaction.addIntercepts([e.InterceptType.HOVER]),n.cancelScrollFrame()){if(0!==h&&void 0!==n.scrollDirection&&n.scrollDirection!==(h>0?e.ScrollDirection.SCROLL_LEFT:e.ScrollDirection.SCROLL_RIGHT))return n.scrollDirection=h>0?e.ScrollDirection.SCROLL_LEFT:e.ScrollDirection.SCROLL_RIGHT,n.updateHorizontalRowScrollOffset({offsetX:o,offsetY:a,offset:u}),void n.updateHorizontalScrollOffset({offsetX:o,offsetY:a,offset:l});n.scrollDirection=A>0?e.ScrollDirection.SCROLL_LEFT:e.ScrollDirection.SCROLL_RIGHT,n.scrollFrameId=requestAnimationFrame((function(){var e,t=n.getScrollOffset(),r=t.scrollX,A=t.scrollY,i=t.rowHeaderScrollX;0!==h&&(n.showHorizontalScrollBar(),n.updateHorizontalRowScrollOffset({offsetX:o,offsetY:a,offset:h+i}),n.updateHorizontalScrollOffset({offsetX:o,offsetY:a,offset:h+r})),0!==d&&(n.showVerticalScrollBar(),null===(e=n.vScrollBar)||void 0===e||e.emitScrollChange(d+A)),n.delayHideScrollbarOnMobile(),n.clearScrollFrameIdOnMobile()}))}}else n.stopScrollChainingIfNeeded(t)},this.realDataCellRender=function(t,r){var A=n.calculateXYIndexes(t,r);qC.getInstance().logger("realDataCellRender:",n.preCellIndexes,A);var i=Lb(n.preCellIndexes,A),o=i.add,a=i.remove;qC.getInstance().debugCallback(JC,(function(){var e;if(null===(e=n.spreadsheet.options.future)||void 0===e?void 0:e.experimentalReuseCell){for(var t=n.getDataCells(),r=Math.max(a.length,o.length),A=function(e){if(e<a.length){var r=st(a[e],2),A=r[0],i=r[1],s=lv.find(t,(function(e){return e.name==="".concat(i,"-").concat(A)}));s&&n.dataCellPool.release(s)}if(e<o.length){var l=st(o[e],2),u=l[0],c=l[1],h=n.getCellMeta(c,u),d=n.createDataCell(h);d&&n.addDataCell(d)}},i=0;i<r;i++)A(i);qC.getInstance().logger("Render Cell Panel: ".concat(null==t?void 0:t.length,", Add: ").concat(null==o?void 0:o.length,", Remove: ").concat(null==a?void 0:a.length))}else{lv.each(o,(function(e){var t=st(e,2),r=t[0],A=t[1],i=n.getCellMeta(A,r),o=n.createDataCell(i);o&&n.addDataCell(o)}));var s=n.getDataCells();lv.each(a,(function(e){var t=st(e,2),n=t[0],r=t[1],A=lv.find(s,(function(e){return e.name==="".concat(r,"-").concat(n)}));null==A||A.destroy()})),qC.getInstance().logger("Render Cell Panel: ".concat(null==s?void 0:s.length,", Add: ").concat(null==o?void 0:o.length,", Remove: ").concat(null==a?void 0:a.length))}})),n.preCellIndexes=A,n.spreadsheet.emit(e.S2Event.LAYOUT_AFTER_REAL_DATA_CELL_RENDER,{add:o,remove:a,spreadsheet:n.spreadsheet})},this.getGridInfo=function(){var e=st(n.preCellIndexes.center,4),t=e[0],r=e[1],A=e[2],i=e[3];return{cols:Tb(t,r,n.layoutResult.colLeafNodes),rows:Fb(A,i,n.viewCellHeights)}},this.onAfterScroll=lv.debounce((function(){var t=n.spreadsheet,r=t.interaction,A=t.container;if(!r.isSelectedState()&&(r.removeIntercepts([e.InterceptType.HOVER]),r.getHoverAfterScroll())){var i=r.eventController.canvasMousemoveEvent;if(i){var o=i.x,a=i.y,s=A.document.elementFromPointSync(o,a);s&&A.emit(e.OriginEventType.POINTER_MOVE,rt(rt({},i),{shape:s,target:s,timestamp:performance.now()}))}}}),300),this.getCellChildrenNodes=function(t){var r,A=null===(r=null==t?void 0:t.getMeta)||void 0===r?void 0:r.call(t),i=(null==t?void 0:t.cellType)===e.CellType.ROW_CELL;return n.spreadsheet.isHierarchyTreeType()&&i?yB.getAllLeaveNodes(A).filter((function(e){return e.rowIndex===A.rowIndex})):yB.getAllChildrenNodes(A)},this.spreadsheet=t,this.init()}return Object.defineProperty(t.prototype,"scrollBarTheme",{get:function(){return this.spreadsheet.theme.scrollBar},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scrollBarSize",{get:function(){var e;return null===(e=this.scrollBarTheme)||void 0===e?void 0:e.size},enumerable:!1,configurable:!0}),t.prototype.shouldRender=function(){return!ow(this.spreadsheet.dataCfg.fields)},t.prototype.initTextWrapTemp=function(){var e,t=[{},this.spreadsheet,{shallowRender:!0}];this.textWrapTempRowCell=this.getRowCellInstance.apply(this,lt([],st(t),!1)),this.textWrapTempColCell=this.getColCellInstance.apply(this,lt([],st(t),!1)),this.textWrapTempCornerCell=null===(e=this.getCornerCellInstance)||void 0===e?void 0:e.call.apply(e,lt([this],st(t),!1)),this.textWrapNodeHeightCache=NB(500),this.customRowHeightStatusMap={}},t.prototype.initGroups=function(){this.initBackgroundGroup(),this.initPanelGroups(),this.initForegroundGroup()},t.prototype.initForegroundGroup=function(){this.foregroundGroup=this.spreadsheet.container.appendChild(new ds({name:gv,style:{zIndex:3}}))},t.prototype.initBackgroundGroup=function(){this.backgroundGroup=this.spreadsheet.container.appendChild(new ds({name:pv,style:{zIndex:0}}))},t.prototype.initPanelGroups=function(){this.panelGroup=this.spreadsheet.container.appendChild(new ds({name:vv,style:{zIndex:1}})),this.panelScrollGroup=new yb({name:Cv,zIndex:1,s2:this.spreadsheet}),this.panelGroup.appendChild(this.panelScrollGroup)},t.prototype.getCellCustomSize=function(e,t){return lv.isFunction(t)?t(e):t},t.prototype.getRowCellDraggedWidth=function(e){var t,n,r,A=this.spreadsheet.options.style.rowCell;return null!==(n=null===(t=null==A?void 0:A.widthByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==n?n:null===(r=null==A?void 0:A.widthByField)||void 0===r?void 0:r[null==e?void 0:e.field]},t.prototype.getRowCellDraggedHeight=function(e){var t,n,r,A=this.spreadsheet.options.style.rowCell;return null!==(n=null===(t=null==A?void 0:A.heightByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==n?n:null===(r=null==A?void 0:A.heightByField)||void 0===r?void 0:r[null==e?void 0:e.field]},t.prototype.isCustomRowCellHeight=function(e){var t,n=this.spreadsheet.options.style.dataCell,r=null===(t=Gy.dataCell)||void 0===t?void 0:t.height;return lv.isNumber(this.getCustomRowCellHeight(e))||(null==n?void 0:n.height)!==r},t.prototype.getCustomRowCellHeight=function(e){var t,n=this.spreadsheet.options.style.rowCell;return null!==(t=this.getRowCellDraggedHeight(e))&&void 0!==t?t:this.getCellCustomSize(e,null==n?void 0:n.height)},t.prototype.getRowCellHeight=function(e){var t,n=this.spreadsheet.options.style.dataCell;return null!==(t=this.getCustomRowCellHeight(e))&&void 0!==t?t:null==n?void 0:n.height},t.prototype.getColCellDraggedWidth=function(e){var t,n,r,A,i,o,a=this.spreadsheet.options.style.colCell;return null!==(A=null!==(n=null===(t=null==a?void 0:a.widthByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==n?n:null===(r=null==a?void 0:a.widthByField)||void 0===r?void 0:r[null==e?void 0:e.field])&&void 0!==A?A:null===(i=null==a?void 0:a.widthByField)||void 0===i?void 0:i[null===(o=null==e?void 0:e.query)||void 0===o?void 0:o[ry]]},t.prototype.getColCellDraggedHeight=function(e){var t,n,r,A,i,o,a=this.spreadsheet.options.style.colCell;return null!==(A=null!==(n=null===(t=null==a?void 0:a.heightByField)||void 0===t?void 0:t[null==e?void 0:e.id])&&void 0!==n?n:null===(r=null==a?void 0:a.heightByField)||void 0===r?void 0:r[null==e?void 0:e.field])&&void 0!==A?A:null===(i=null==a?void 0:a.heightByField)||void 0===i?void 0:i[null===(o=null==e?void 0:e.query)||void 0===o?void 0:o[ry]]},t.prototype.getColNodeHeight=function(t){var n,r,A,i=this,o=t.colNode,a=t.colsHierarchy,s=t.useCache,l=void 0===s||s,u=t.cornerNodes,c=void 0===u?[]:u;if(!o)return 0;var h=this.spreadsheet.options.style,d=h.colCell,f=h.cornerCell,p=null!==(n=this.getColCellDraggedHeight(o))&&void 0!==n?n:this.getCellCustomSize(o,null==d?void 0:d.height);if(lv.isNumber(p)&&p!==(null===(r=Gy.colCell)||void 0===r?void 0:r.height))return o.extra.isCustomHeight=!0,p;var g=(null==d?void 0:d.maxLines)>1&&(null==d?void 0:d.wordWrap)||this.spreadsheet.theme.colCell.text.fontSize>Cb||this.spreadsheet.theme.colCell.bolderText.fontSize>Cb,v=(null==f?void 0:f.maxLines)>1&&(null==f?void 0:f.wordWrap)||this.spreadsheet.theme.cornerCell.text.fontSize>Cb||this.spreadsheet.theme.cornerCell.bolderText.fontSize>Cb,y=this.getDefaultColNodeHeight(o,a),C=y,B=y;if(g&&(C=this.getNodeAdaptiveHeight({meta:o,cell:this.textWrapTempColCell,defaultHeight:y,useCache:l})),v){var m=c.filter((function(t){return o.isLeaf?t.cornerType===e.CornerNodeType.Row:t.field===o.field}));lv.isEmpty(m)||(B=null!==(A=lv.max(m.map((function(e){return i.getNodeAdaptiveHeight({meta:e,cell:i.textWrapTempCornerCell,defaultHeight:y,useCache:!1})}))))&&void 0!==A?A:y)}return zm(Math.max(B,C,y))},t.prototype.getDefaultColNodeHeight=function(e,t){var n,r,A,i;if(!e)return 0;var o=this.spreadsheet.options.style.colCell,a=(null===(r=null===(n=null==t?void 0:t.sampleNodesForAllLevels)||void 0===n?void 0:n.find((function(t){return t.level===e.level})))||void 0===r?void 0:r.height)||0,s=null!==(i=null!==(A=this.getColCellDraggedHeight(e))&&void 0!==A?A:this.getCellCustomSize(e,null==o?void 0:o.height))&&void 0!==i?i:0;return zm(Math.max(s,a))},t.prototype.getNodeAdaptiveHeight=function(t){var n,r,A=t.meta,i=t.cell,o=t.defaultHeight,a=void 0===o?0:o,s=t.useCache,l=void 0===s||s;if(!A||!i)return a;i.setMeta(rt(rt({},A),{shallowRender:!0}));var u=String(i.getFieldValue());if(!u)return a;var c=Math.ceil(i.getMaxTextWidth());if(c<=0&&i.cellType===e.CellType.COL_CELL)return a;var h="".concat(u).concat(My).concat(c),d=this.textWrapNodeHeightCache.get(h);if(l&&lv.isNumber(d))return d||a;null===(r=(n=i).generateIconConfig)||void 0===r||r.call(n),i.drawTextShape();var f=i.getStyle().cell.padding,p=i.getActualTextHeight(),g=p+f.top+f.bottom,v=p>1.5*i.getTextLineHeight()||p>=a?Math.max(g,a):a;return this.textWrapNodeHeightCache.set(h,v),v},t.prototype.calculateColParentNodeWidthAndX=function(e){for(var t,n=null,r=0,A=e.slice(0);r<A.length;){var i=A[r++],o=null==i?void 0:i.parent;if(n!==o&&o){A.push(o);var a=null===(t=o.children)||void 0===t?void 0:t.find((function(e){return e.width})),s=(null==a?void 0:a.x)||0,l=lv.sumBy(o.children,"width");o.x=s,o.width=l,n=o}}},t.prototype.updateColsHierarchySampleMaxHeightNodes=function(e,t){var n,r=this,A=lv.isEmpty(e.sampleNodesForAllLevels),i=(A?e.allNodesWithoutRoot:e.sampleNodesForAllLevels).map((function(t){return lv.maxBy(e.getNodes(t.level).filter((function(e){return!e.isTotals||A})),(function(t){return r.getColNodeHeight({colNode:t,colsHierarchy:e})}))}));A&&(e.sampleNodeForLastLevel=null!==(n=i[0])&&void 0!==n?n:null,e.maxLevel=0),e.sampleNodesForAllLevels=lv.compact(i);var o=t?Xb.getCornerNodes({position:{x:0,y:0},width:t.width,height:e.height,layoutResult:{rowsHierarchy:t,colsHierarchy:e},seriesNumberWidth:this.getSeriesNumberWidth(),spreadsheet:this.spreadsheet}):[];e.sampleNodesForAllLevels.forEach((function(t){var n;if(t.height=r.getColNodeHeight({colNode:t,colsHierarchy:e,cornerNodes:o}),0===t.level)t.y=0;else{var A=null!==(n=e.sampleNodesForAllLevels[t.level-1])&&void 0!==n?n:{y:0,height:0};t.y=A.y+A.height}e.height+=t.height})),e.rootNode.height=e.height},t.prototype.render=function(){this.shouldRender()&&(this.adjustScrollOffset(),this.renderHeaders(),this.renderScrollBars(),this.renderBackground(),this.dynamicRenderCell(!0))},t.prototype.adjustScrollOffset=function(){var e=this.getAdjustedScrollOffset(this.getScrollOffset());this.setScrollOffset(e)},t.prototype.getSeriesNumberWidth=function(){var e,t,n=this.spreadsheet.options.seriesNumber;return zm((null==n?void 0:n.enable)&&null!==(t=null===(e=this.spreadsheet.theme.rowCell)||void 0===e?void 0:e.seriesNumberWidth)&&void 0!==t?t:0)},t.prototype.getCanvasSize=function(){var e=this.spreadsheet.options,t=e.width,n=void 0===t?0:t,r=e.height;return{width:n,height:void 0===r?0:r}},t.prototype.updateScrollOffset=function(e){var t,n,r;(null===(t=e.rowHeaderOffsetX)||void 0===t?void 0:t.animate)||(null===(n=e.offsetX)||void 0===n?void 0:n.animate)||(null===(r=e.offsetY)||void 0===r?void 0:r.animate)?this.scrollWithAnimation(e):this.scrollImmediately(e)},t.prototype.getPaginationScrollY=function(){var e=this.spreadsheet.options.pagination;if(e){var t=e.current,n=void 0===t?1:t,r=e.pageSize,A=this.viewCellHeights,i=Math.max((n-1)*r,0);return A.getCellOffsetY(i)}return 0},t.prototype.destroy=function(){this.unbindEvents(),this.clearAllGroup(),this.preCellIndexes=null,this.customRowHeightStatusMap={},this.textWrapNodeHeightCache.clear(!1),cancelAnimationFrame(this.scrollFrameId)},t.prototype.calculateCornerBBox=function(){this.cornerBBox=new Ub(this,!0)},t.prototype.calculatePanelBBox=function(){this.panelBBox=new Rb(this,!0)},t.prototype.getCellRange=function(){var e=this.spreadsheet.options.pagination;return nw(this.viewCellHeights,e)},t.prototype.clearAllGroup=function(){this.panelGroup.remove(),this.foregroundGroup.remove(),this.backgroundGroup.remove()},t.prototype.renderRowScrollBar=function(t){var n=this;if(this.spreadsheet.isFrozenRowHeader()&&this.cornerBBox.width<this.cornerBBox.originalWidth){var r=this.cornerBBox.originalWidth-this.cornerBBox.width,A=this.getScrollbarPosition().maxY,i=this.spreadsheet.theme,o=i.splitLine,a=i.scrollBar,s=Math.max(this.cornerBBox.width*this.cornerBBox.width/this.cornerBBox.originalWidth,null==a?void 0:a.thumbHorizontalMinSize),l=s-(null==o?void 0:o.verticalBorderWidth);this.hRowScrollBar=new Sb({isHorizontal:!0,trackLen:this.cornerBBox.width,thumbLen:l,position:{x:this.cornerBBox.minX+this.scrollBarSize/2,y:A},thumbOffset:t*(this.cornerBBox.width-s)/r,theme:this.scrollBarTheme,scrollTargetMaxOffset:r}),this.hRowScrollBar.addEventListener(e.ScrollType.ScrollChange,(function(t){var A,i,o=t.offset,a=Km(n.getValidScrollBarOffset(o,r));n.setScrollOffset({rowHeaderScrollX:a}),null===(A=n.rowHeader)||void 0===A||A.onRowScrollX(a,bv),null===(i=n.seriesNumberHeader)||void 0===i||i.onRowScrollX(a,xv),n.cornerHeader.onRowScrollX(a,Mv);var s=n.getScrollBarOffset(a,n.hRowScrollBar),l=n.getScrollOffset(),u={scrollX:l.scrollX,scrollY:l.scrollY,rowHeaderScrollX:s};n.hRowScrollBar.updateThumbOffset(s,!1),n.spreadsheet.emit(e.S2Event.ROW_CELL_SCROLL,u),n.spreadsheet.emit(e.S2Event.GLOBAL_SCROLL,u)})),this.foregroundGroup.appendChild(this.hRowScrollBar)}},t.prototype.getValidScrollBarOffset=function(e,t){return lv.clamp(e,0,t)},t.prototype.renderHScrollBar=function(t,n,r){var A=this;if(Km(t)<Km(n)){var i=this.scrollBarSize/2,o=this.getScrollbarPosition().maxY,a=!this.spreadsheet.isFrozenRowHeader(),s=t+(a?Math.min(this.cornerBBox.width,this.getCanvasSize().width):0),l={x:this.panelBBox.minX+(a?-this.cornerBBox.width+i:i),y:o},u=n+(a?this.cornerBBox.width:0),c=this.spreadsheet.theme.scrollBar,h=u-s,d=Math.max(s/u*s,null==c?void 0:c.thumbHorizontalMinSize);this.hScrollBar=new Sb({isHorizontal:!0,trackLen:s,thumbLen:d,position:l,thumbOffset:r*(s-d)/h,theme:this.scrollBarTheme,scrollTargetMaxOffset:h}),this.hScrollBar.addEventListener(e.ScrollType.ScrollChange,(function(e){var t=e.offset,n=e.updateThumbOffset,r=A.getValidScrollBarOffset(t,h);n&&A.hScrollBar.updateThumbOffset(A.getScrollBarOffset(r,A.hScrollBar),!1),A.setScrollOffset({scrollX:r}),A.dynamicRenderCell()})),this.foregroundGroup.appendChild(this.hScrollBar)}},t.prototype.getScrollbarPosition=function(){var t=this.panelBBox,n=t.maxX,r=t.maxY,A=this.getCanvasSize(),i=A.width,o=A.height,a=this.spreadsheet.options.interaction.scrollbarPosition===e.ScrollbarPositionType.CONTENT;return{maxX:(a?n:i)-this.scrollBarSize,maxY:(a?r:o)-this.scrollBarSize}},t.prototype.renderVScrollBar=function(t,n,r){var A=this;if(t<n){var i=this.spreadsheet.theme.scrollBar,o=Math.max(t/n*t,null==i?void 0:i.thumbVerticalMinSize),a=n-t,s=this.getScrollbarPosition().maxX;this.vScrollBar=new Sb({isHorizontal:!1,trackLen:t,thumbLen:o,thumbOffset:r*(t-o)/a,position:{x:s,y:this.panelBBox.minY},theme:this.scrollBarTheme,scrollTargetMaxOffset:a}),this.vScrollBar.addEventListener(e.ScrollType.ScrollChange,(function(e){var t=e.offset,n=e.updateThumbOffset,r=A.getValidScrollBarOffset(t,a);n&&A.vScrollBar.updateThumbOffset(A.getScrollBarOffset(r,A.vScrollBar),!1),A.setScrollOffset({scrollY:r}),A.dynamicRenderCell()})),this.foregroundGroup.appendChild(this.vScrollBar)}},t.prototype.translateRelatedGroups=function(e,t,n){var r,A,i,o,a,s;qm(this.panelScrollGroup,this.panelBBox.x-e,this.panelBBox.y-t),null===(r=this.rowHeader)||void 0===r||r.onScrollXY(this.getRealScrollX(e,n),t,bv),null===(A=this.seriesNumberHeader)||void 0===A||A.onScrollXY(this.getRealScrollX(e,n),t,xv),null===(i=this.cornerHeader)||void 0===i||i.onCorScroll(this.getRealScrollX(e,n),Mv),null===(o=this.centerFrame)||void 0===o||o.onChangeShadowVisibility(e,this.getRealWidth()-this.panelBBox.width),null===(a=this.centerFrame)||void 0===a||a.onBorderScroll(this.getCenterFrameScrollX(e)),null===(s=this.columnHeader)||void 0===s||s.onColScroll(e,Uv)},t.prototype.getCenterFrameScrollX=function(e){return this.getRealScrollX(e)},t.prototype.createDataCell=function(e){var t,n,r,A;if(e&&(this.dataCellPool.pool.length>0&&(null===(t=this.spreadsheet.options.future)||void 0===t?void 0:t.experimentalReuseCell)?(A=this.dataCellPool.acquire()).setMeta(e):A=null===(r=(n=this.spreadsheet.options).dataCell)||void 0===r?void 0:r.call(n,e,this.spreadsheet),A)){var i=e.rowIndex,o=e.colIndex;return A.position=[i,o],A.name="".concat(i,"-").concat(o),A}},t.prototype.init=function(){var t=this;this.initCellPool(),this.initTextWrapTemp(),this.initGroups(),qC.getInstance().debugCallback(ZC,(function(){t.layoutResult=t.doLayout(),t.saveInitColumnLeafNodes(t.layoutResult.colLeafNodes),t.spreadsheet.emit(e.S2Event.LAYOUT_AFTER_HEADER_LAYOUT,t.layoutResult)})),this.calculateCellWidthHeight(),this.calculateRowOffsets(),this.calculateCornerBBox(),this.calculatePanelBBox(),this.bindEvents()},t.prototype.renderBackground=function(){var e=this.getCanvasSize(),t=e.width,n=e.height,r=this.spreadsheet.theme.background,A=r.color,i=r.opacity;this.backgroundGroup.appendChild(new Ss({style:{fill:A,opacity:i,x:0,y:0,width:t,height:n}}))},t.prototype.renderScrollBars=function(){var e=this.getScrollOffset(),t=e.scrollX,n=e.scrollY,r=e.rowHeaderScrollX,A=this.panelBBox,i=A.width,o=A.height,a=this.layoutResult.colsHierarchy.width,s=this.getRealHeight();this.renderRowScrollBar(r),this.renderHScrollBar(i,a,t),this.renderVScrollBar(o,s,n)},t.prototype.renderHeaders=function(){var e=this.getSeriesNumberWidth();this.rowHeader=this.getRowHeader(),this.columnHeader=this.getColHeader(),e>0&&!this.seriesNumberHeader&&(this.seriesNumberHeader=this.getSeriesNumberHeader()),this.cornerHeader=this.getCornerHeader(),this.centerFrame=this.getCenterFrame(),this.seriesNumberHeader&&this.foregroundGroup.appendChild(this.seriesNumberHeader),this.rowHeader&&this.foregroundGroup.appendChild(this.rowHeader),this.foregroundGroup.appendChild(this.columnHeader),this.foregroundGroup.appendChild(this.cornerHeader),this.foregroundGroup.appendChild(this.centerFrame)},t.prototype.getRowHeaderCfg=function(){var e=this.panelBBox,t=e.y,n=e.viewportHeight,r=e.viewportWidth,A=e.height,i=this.getSeriesNumberWidth();return{width:this.cornerBBox.width,height:A,viewportWidth:r,viewportHeight:n,position:{x:i,y:t},nodes:this.layoutResult.rowNodes,spreadsheet:this.spreadsheet}},t.prototype.getRowHeader=function(){return this.rowHeader?this.rowHeader:new Yb(this.getRowHeaderCfg())},t.prototype.getColHeader=function(){if(!this.columnHeader){var e=this.panelBBox,t=e.x,n=e.width,r=e.viewportHeight,A=e.viewportWidth;return new Wb({width:n,cornerWidth:this.cornerBBox.width,height:this.cornerBBox.height,viewportWidth:A,viewportHeight:r,position:{x:t,y:0},nodes:this.layoutResult.colNodes,sortParam:this.spreadsheet.store.get("sortParam"),spreadsheet:this.spreadsheet})}return this.columnHeader},t.prototype.getCornerHeader=function(){return this.cornerHeader||Xb.getCornerHeader({panelBBox:this.panelBBox,cornerBBox:this.cornerBBox,seriesNumberWidth:this.getSeriesNumberWidth(),layoutResult:this.layoutResult,spreadsheet:this.spreadsheet})},t.prototype.getSeriesNumberHeader=function(){return this.seriesNumberHeader||jb.getSeriesNumberHeader({spreadsheet:this.spreadsheet,panelBBox:this.panelBBox,cornerWidth:this.cornerBBox.width,seriesNumberWidth:this.getSeriesNumberWidth(),rowsHierarchy:this.layoutResult.rowsHierarchy})},t.prototype.getCenterFrame=function(){var e;if(!this.centerFrame){var t=this.panelBBox,n=t.viewportWidth,r=t.viewportHeight,A=this.cornerBBox.width,i=this.cornerBBox.height,o=null===(e=this.spreadsheet.options)||void 0===e?void 0:e.frame,a={position:{x:this.cornerBBox.x,y:this.cornerBBox.y},cornerWidth:A,cornerHeight:i,viewportWidth:n,viewportHeight:r,showViewportLeftShadow:!1,showViewportRightShadow:!1,spreadsheet:this.spreadsheet};return o?o(a):new aw(a)}return this.centerFrame},t.prototype.updatePanelScrollGroup=function(){this.gridInfo=this.getGridInfo(),this.panelScrollGroup.update(this.gridInfo)},t.prototype.dynamicRenderCell=function(e){var t=this.getScrollOffset(),n=t.scrollX,r=t.scrollY,A=t.rowHeaderScrollX,i=r+this.getPaginationScrollY();this.spreadsheet.hideTooltip(),this.spreadsheet.interaction.clearHoverTimer(),this.realDataCellRender(n,i),this.updatePanelScrollGroup(),this.translateRelatedGroups(n,i,A),this.clip(n,i),e||this.emitScrollEvent({scrollX:n,scrollY:i,rowHeaderScrollX:A}),this.onAfterScroll()},t.prototype.emitScrollEvent=function(t){this.spreadsheet.emit(e.S2Event.GLOBAL_SCROLL,t)},t.prototype.saveInitColumnLeafNodes=function(e){void 0===e&&(e=[]);var t=this.spreadsheet,n=t.store,r=t.options.interaction.hiddenColumnFields,A=void 0===r?[]:r,i=e.length+A.length,o=this.getInitColLeafNodes();i!==(null==o?void 0:o.length)&&n.set("initColLeafNodes",e)},t.prototype.getHiddenColumnsInfo=function(e){var t=this.spreadsheet.store.get("hiddenColumnsDetail",[]);if(!lv.isEmpty(t))return t.find((function(t){var n;return null===(n=null==t?void 0:t.hideColumnNodes)||void 0===n?void 0:n.some((function(t){return t.id===e.id}))}))},t.prototype.updateCustomFieldsSampleNodes=function(e){var t;if(this.spreadsheet.isCustomColumnFields()){var n=(null===(t=e.sampleNodeForLastLevel)||void 0===t?void 0:t.id.split(My))||[],r=e.getNodes().filter((function(t){var r;return(null===(r=e.sampleNodeForLastLevel)||void 0===r?void 0:r.id.includes(t.id))&&n.includes(t.field)}));e.sampleNodesForAllLevels=r,e.height=lv.sumBy(r,"height")}},t.prototype.adjustCustomRowLeafNodesWidth=function(e){this.spreadsheet.isCustomRowFields()&&this.adjustLeafNodesSize("width")(e)},t.prototype.adjustCustomColLeafNodesHeight=function(e){this.spreadsheet.isCustomColumnFields()&&this.adjustLeafNodesSize("height")(e)},t.prototype.adjustLeafNodesSize=function(e){return function(t){var n=t.leafNodes,r=t.hierarchy,A=r.sampleNodeForLastLevel,i=r.sampleNodesForAllLevels;n.forEach((function(t){if(!(t.level>(null==A?void 0:A.level))){var n=lv.sumBy(i,(function(n){return n.level<t.level?0:n[e]}));t[e]=n}}))}},t.prototype.getHeaderNodes=function(e){var t=lv.concat(this.getCornerNodes(),this.getSeriesNumberNodes(),this.getRowNodes(),this.getColNodes());return e?t.filter((function(t){return e.includes(t.id)})):t},t.prototype.getCornerNodes=function(){var e;return(null===(e=this.cornerHeader)||void 0===e?void 0:e.getNodes())||[]},t.prototype.getSeriesNumberNodes=function(){var e;return(null===(e=this.seriesNumberHeader)||void 0===e?void 0:e.getNodes())||[]},t.prototype.getColNodes=function(e){var t=this.layoutResult.colNodes,n=void 0===t?[]:t;return lv.isNil(e)?n:n.filter((function(t){return t.level===e}))},t.prototype.getTopLevelColNodes=function(){return this.getColNodes(0)},t.prototype.getColNodeById=function(e){return this.getColNodes().find((function(t){return t.id===e}))},t.prototype.getColNodeByIndex=function(e){return this.getColNodes().find((function(t){return t.colIndex===e}))},t.prototype.getColLeafNodesByRange=function(e,t){return this.getColLeafNodes().filter((function(n){return n.colIndex>=e&&n.colIndex<=t}))},t.prototype.getColLeafNodeByIndex=function(e){return this.getColLeafNodes().find((function(t){return t.colIndex===e}))},t.prototype.getColNodesByField=function(e){return this.getColNodes().filter((function(t){return t.field===e}))},t.prototype.getColLeafNodes=function(){var e;return(null===(e=this.layoutResult)||void 0===e?void 0:e.colLeafNodes)||[]},t.prototype.getColTotalsNodes=function(e){return this.getColNodes(e).filter((function(e){return e.isTotals}))},t.prototype.getColSubTotalsNodes=function(e){return this.getColTotalsNodes(e).filter((function(e){return e.isSubTotals}))},t.prototype.getColGrandTotalsNodes=function(e){return this.getColTotalsNodes(e).filter((function(e){return e.isGrandTotals}))},t.prototype.getRowNodes=function(e){var t=this.layoutResult.rowNodes,n=void 0===t?[]:t;return lv.isNil(e)?n:n.filter((function(t){return t.level===e}))},t.prototype.getRowNodeById=function(e){return this.getRowNodes().find((function(t){return t.id===e}))},t.prototype.getRowNodeByIndex=function(e){return this.getRowNodes().find((function(t){return t.rowIndex===e}))},t.prototype.getRowLeafNodeByIndex=function(e){return this.getRowLeafNodes().find((function(t){return t.rowIndex===e}))},t.prototype.getRowLeafNodesByRange=function(e,t){return this.getRowLeafNodes().filter((function(n){return n.rowIndex>=e&&n.rowIndex<=t}))},t.prototype.getRowNodesByField=function(e){return this.getRowNodes().filter((function(t){return t.field===e}))},t.prototype.getRowLeafNodes=function(){var e;return(null===(e=this.layoutResult)||void 0===e?void 0:e.rowLeafNodes)||[]},t.prototype.getRowTotalsNodes=function(e){return this.getRowNodes(e).filter((function(e){return e.isTotals}))},t.prototype.getRowSubTotalsNodes=function(e){return this.getRowTotalsNodes(e).filter((function(e){return e.isSubTotals}))},t.prototype.getRowGrandTotalsNodes=function(e){return this.getRowTotalsNodes(e).filter((function(e){return e.isGrandTotals}))},t.prototype.getDataCells=function(){var e;return JS(null===(e=this.panelGroup)||void 0===e?void 0:e.children,Jx)},t.prototype.getRowCells=function(){var t,n=(null===(t=this.getRowHeader())||void 0===t?void 0:t.children)||[];return JS(n,AS).filter((function(t){return t.cellType===e.CellType.ROW_CELL}))},t.prototype.getRowLeafCells=function(){return this.getRowCells().filter((function(e){return e.getMeta().isLeaf}))},t.prototype.getColCells=function(){var t,n=(null===(t=this.getColHeader())||void 0===t?void 0:t.children)||[];return JS(n,jx).filter((function(t){return t.cellType===e.CellType.COL_CELL}))},t.prototype.getColLeafCells=function(){return this.getColCells().filter((function(e){return e.getMeta().isLeaf}))},t.prototype.getMergedCells=function(){return lv.filter(this.panelScrollGroup.getMergedCellsGroup().children,(function(e){return e instanceof rS}))},t.prototype.getCornerCells=function(){var t,n=(null===(t=this.getCornerHeader())||void 0===t?void 0:t.children)||[];return JS(n,Zx).filter((function(t){return t.cellType===e.CellType.CORNER_CELL}))},t.prototype.filterCells=function(e,t){return lv.isEmpty(t)?e:lv.isArray(t)?e.filter((function(e){return lv.includes(t,e.getMeta().id)})):e.filter((function(e){var n=t[e.cellType];return!!n&&n.includes(e.getMeta().id)}))},t.prototype.getHeaderCells=function(e){var t=lv.concat(this.getCornerCells(),this.getSeriesNumberCells(),this.getRowCells(),this.getColCells());return this.filterCells(t,e)},t.prototype.getCellById=function(e){return this.getCells().find((function(t){return t.getMeta().id===e}))},t.prototype.getCellsByField=function(e){return this.getCells().filter((function(t){return t.getMeta().field===e}))},t.prototype.getCells=function(e){var t=lv.concat(this.getHeaderCells(),this.getDataCells());return e?t.filter((function(t){return e.includes(t.getMeta().id)})):t},t.prototype.getInitColIndexLeafNodes=function(){return this.layoutResult.colsHierarchy.getIndexNodes()||[]},t.prototype.getInitColLeafNodes=function(){return this.spreadsheet.store.get("initColLeafNodes",[])},t.prototype.clearInitColLeafNodes=function(){this.spreadsheet.store.set("initColLeafNodes",void 0)},t.prototype.measureTextWidth=function(e,t){return Math.ceil(this.spreadsheet.measureTextWidth(e,t))+1},t.prototype.initCellPool=function(){this.dataCellPool=new pb},t}(),tI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t}(vb),nI=function(t){function n(){var n,r=t.apply(this,lt([],st(arguments),!1))||this;return r.frozenGroupAreas=((n={})[e.FrozenGroupArea.Col]={width:0,x:0,range:[]},n[e.FrozenGroupArea.TrailingCol]={width:0,x:0,range:[]},n[e.FrozenGroupArea.Row]={height:0,y:0,range:[]},n[e.FrozenGroupArea.TrailingRow]={height:0,y:0,range:[]},n),r.panelScrollGroupIndexes=[0,0,0,0],r.addDataCell=function(t){var n=r.getColLeafNodes().length,A=r.getCellRange(),i=$m(t.getMeta(),r.getFrozenOptions(),n,A);i===e.FrozenGroupType.Scroll?t.parentElement!==r.panelScrollGroup&&r.panelScrollGroup.appendChild(t):t.parentElement!==r.frozenGroups[i]&&r.frozenGroups[i].appendChild(t),IT((function(){r.spreadsheet.emit(e.S2Event.DATA_CELL_RENDER,t),r.spreadsheet.emit(e.S2Event.LAYOUT_CELL_RENDER,t)}))},r.addFrozenCell=function(e,t,n){var A=r.getCellMeta(t,e);if(A){A.isFrozenCorner=!0;var i=r.createDataCell(A);n.appendChild(i)}},r.translateFrozenGroups=function(){var t=r.getScrollOffset(),n=t.scrollY,A=t.scrollX,i=r.getPaginationScrollY(),o=r.panelBBox,a=o.x,s=o.y,l=o.viewportWidth,u=o.viewportHeight,c=Gb(r,r.cornerBBox.width,A),h=Kb(r,l),d=zb(r,u,i);qm(r.frozenGroups[e.FrozenGroupType.TopLeft],a-c,s-i),qm(r.frozenGroups[e.FrozenGroupType.TopRight],a-h,s-i),qm(r.frozenGroups[e.FrozenGroupType.BottomLeft],a-c,s-d),qm(r.frozenGroups[e.FrozenGroupType.BottomRight],a-h,s-d),qm(r.frozenGroups[e.FrozenGroupType.Row],a-A,s-i),qm(r.frozenGroups[e.FrozenGroupType.TrailingRow],a-A,s-d),qm(r.frozenGroups[e.FrozenGroupType.Col],a-c,s-n-i),qm(r.frozenGroups[e.FrozenGroupType.TrailingCol],a-h,s-n-i)},r.renderFrozenGroupSplitLine=function(e,t){var n,A=Math.floor(t-r.getPaginationScrollY());null===(n=r.foregroundGroup.getElementById(Hv))||void 0===n||n.remove();var i=r.spreadsheet.theme.splitLine,o=r.foregroundGroup.appendChild(new ds({id:Hv,style:{zIndex:4}})),a={lineWidth:1,stroke:null==i?void 0:i.verticalBorderColor,opacity:null==i?void 0:i.verticalBorderColorOpacity},s={lineWidth:1,stroke:null==i?void 0:i.horizontalBorderColor,opacity:null==i?void 0:i.horizontalBorderColorOpacity};r.renderFrozenColSplitLine(o,i,a,e),r.renderFrozenTrailingColSplitLine(o,i,a,e),r.renderFrozenRowSplitLine(o,i,s,A),r.renderFrozenTrailingRowSplitLine(o,i,s,A)},r.renderFrozenPanelCornerGroup=function(){var e=r.getCellRange(),t=ew(r.getFrozenOptions(),r.getColLeafNodes().length,e);Object.keys(t||{}).forEach((function(e){var n=t[e],A=r.frozenGroups[e];A&&n.forEach((function(e){r.addFrozenCell(e.x,e.y,A)}))}))},r.getTotalHeightForRange=function(e,t){if(e<0||t<0)return 0;if(r.rowOffsets)return r.rowOffsets[t+1]-r.rowOffsets[e];for(var n=0,A=e;A<t+1;A++){n+=r.getDefaultCellHeight()}return n},r.getShadowFill=function(e){var t,n,A=r.spreadsheet.theme.splitLine;return"l (".concat(e,") 0:").concat(null===(t=null==A?void 0:A.shadowColors)||void 0===t?void 0:t.left," 1:").concat(null===(n=null==A?void 0:A.shadowColors)||void 0===n?void 0:n.right)},r}return nt(n,t),n.prototype.initPanelGroups=function(){var n=this;t.prototype.initPanelGroups.call(this),this.frozenGroups=[e.FrozenGroupType.Row,e.FrozenGroupType.Col,e.FrozenGroupType.TrailingRow,e.FrozenGroupType.TrailingCol,e.FrozenGroupType.TopLeft,e.FrozenGroupType.TopRight,e.FrozenGroupType.BottomLeft,e.FrozenGroupType.BottomRight].reduce((function(e,t){var r=new tI({name:t,zIndex:4,s2:n.spreadsheet});return n.panelGroup.appendChild(r),e[t]=r,e}),{})},n.prototype.getFrozenOptions=function(){if(!this.validFrozenOptions){var e=this.getColLeafNodes().length,t=this.getCellRange();this.validFrozenOptions=Qm(this.spreadsheet.options.frozen,e,t.end-t.start+1)}return this.validFrozenOptions},n.prototype.calculateFrozenGroupInfo=function(){var t=this.getFrozenOptions(),n=t.colCount,r=t.rowCount,A=t.trailingColCount,i=t.trailingRowCount,o=this.viewCellHeights,a=this.getCellRange(),s=this.getColLeafNodes();n>0&&(this.frozenGroupAreas[e.FrozenGroupArea.Col].width=s[n-1].x+s[n-1].width,this.frozenGroupAreas[e.FrozenGroupArea.Col].x=0,this.frozenGroupAreas[e.FrozenGroupArea.Col].range=[0,n-1]),r>0&&(this.frozenGroupAreas[e.FrozenGroupArea.Row].height=o.getCellOffsetY(a.start+r)-o.getCellOffsetY(a.start),this.frozenGroupAreas[e.FrozenGroupArea.Row].y=o.getCellOffsetY(a.start),this.frozenGroupAreas[e.FrozenGroupArea.Row].range=[a.start,a.start+r-1]),A>0&&(this.frozenGroupAreas[e.FrozenGroupArea.TrailingCol].width=s[s.length-1].x-s[s.length-A].x+s[s.length-1].width,this.frozenGroupAreas[e.FrozenGroupArea.TrailingCol].x=s[s.length-A].x,this.frozenGroupAreas[e.FrozenGroupArea.TrailingCol].range=[s.length-A,s.length-1]),i>0&&(this.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].height=o.getCellOffsetY(a.end+1)-o.getCellOffsetY(a.end+1-i),this.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].y=o.getCellOffsetY(a.end+1-i),this.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].range=[a.end-i+1,a.end])},n.prototype.getFinalViewport=function(){var t=this.panelBBox,n=t.viewportHeight,r=t.viewportWidth,A=this.getFrozenOptions(),i=A.colCount,o=A.rowCount,a=A.trailingColCount,s=A.trailingRowCount,l={width:r,height:n,x:0,y:0};return(i>0||a>0)&&(l.width-=this.frozenGroupAreas[e.FrozenGroupArea.Col].width+this.frozenGroupAreas[e.FrozenGroupArea.TrailingCol].width,l.x+=this.frozenGroupAreas[e.FrozenGroupArea.Col].width),(o>0||s>0)&&(l.height<this.frozenGroupAreas[e.FrozenGroupArea.Row].height+this.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].height?(l.height=0,l.y=0):(l.height-=this.frozenGroupAreas[e.FrozenGroupArea.Row].height+this.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].height,l.y+=this.frozenGroupAreas[e.FrozenGroupArea.Row].height)),l},n.prototype.calculateXYIndexes=function(e,t){var n,r,A=this.getFinalViewport(),i=this.spreadsheet.isTableMode()&&(null===(r=null===(n=this.spreadsheet.dataSet)||void 0===n?void 0:n.isEmpty)||void 0===r?void 0:r.call(n))?this.spreadsheet.dataSet.getEmptyViewIndexes():Zm({scrollX:e,scrollY:t,widths:this.viewCellWidths,heights:this.viewCellHeights,viewport:A,rowRemainWidth:this.getRealScrollX(this.cornerBBox.width)});this.panelScrollGroupIndexes=i;var o=this.getColLeafNodes().length,a=this.getCellRange();return tw(i,this.getFrozenOptions(),o,a)},n.prototype.updateFrozenGroupGrid=function(){var t=this;[e.FrozenGroupArea.Col,e.FrozenGroupArea.Row,e.FrozenGroupArea.TrailingCol,e.FrozenGroupArea.TrailingRow].forEach((function(n){if(t.frozenGroupAreas[n].range){var r=[],A=[];if(n.toLowerCase().includes("row")){var i=st(t.frozenGroupAreas[n].range||[],2),o=i[0],a=i[1];if(r=t.gridInfo.cols,A=Fb(o,a,t.viewCellHeights),n===e.FrozenGroupArea.TrailingRow)A=function(e,t,n,r){var A=Fb(e,t,r),i=r.getCellOffsetY(e);return A.map((function(e){return e-i+n}))}(o,a,t.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].y,t.viewCellHeights)}else{var s=st(t.frozenGroupAreas[n].range||[],2),l=s[0],u=s[1],c=t.getColLeafNodes();r=Tb(l,u,c),A=t.gridInfo.rows}var h=gy[n];t.frozenGroups[h].updateGrid({cols:r,rows:A},h)}}))},n.prototype.updatePanelScrollGroup=function(){t.prototype.updatePanelScrollGroup.call(this),this.updateFrozenGroupGrid()},n.prototype.translateRelatedGroups=function(e,n,r){t.prototype.translateRelatedGroups.call(this,e,n,r),this.translateFrozenGroups(),this.renderRowResizeArea(),this.renderFrozenGroupSplitLine(e,n)},n.prototype.renderRowResizeArea=function(){},n.prototype.getFrozenColSplitLineSize=function(){var e=this.panelBBox;return{y:0,height:e.viewportHeight+e.y}},n.prototype.renderFrozenColSplitLine=function(t,n,r,A){var i=this.getFrozenOptions().colCount,o=this.panelBBox.x;if(i>0){var a=this.cornerBBox.width,s=Gb(this,a,A),l=o+this.frozenGroupAreas[e.FrozenGroupArea.Col].width-s,u=this.getFrozenColSplitLineSize(),c=u.y,h=u.height;um(t,rt(rt({},r),{x1:l,x2:l,y1:c,y2:c+h})),(null==n?void 0:n.showShadow)&&A>0&&(this.spreadsheet.isFrozenRowHeader()||s>=a)&&t.appendChild(new Ss({style:{x:l,y:c,width:null==n?void 0:n.shadowWidth,height:h,fill:this.getShadowFill(0)}}))}},n.prototype.renderFrozenTrailingColSplitLine=function(t,n,r,A){var i=this.getFrozenOptions().trailingColCount,o=this.panelBBox,a=o.viewportWidth,s=o.x;if(i>0){var l=a-this.frozenGroupAreas[e.FrozenGroupArea.TrailingCol].width+s,u=this.getFrozenColSplitLineSize(),c=u.y,h=u.height,d=Math.max(0,lv.last(this.viewCellWidths)-a);um(t,rt(rt({},r),{x1:l,x2:l,y1:c,y2:c+h})),(null==n?void 0:n.showShadow)&&Km(A)<Km(d)&&t.appendChild(new Ss({style:{x:l-n.shadowWidth,y:c,width:n.shadowWidth,height:h,fill:this.getShadowFill(180)}}))}},n.prototype.getFrozenRowSplitLineSize=function(){var e=this.panelBBox,t=e.viewportWidth;return{x:0,width:e.x+t}},n.prototype.renderFrozenRowSplitLine=function(t,n,r,A){var i=this.getFrozenOptions().rowCount,o=this.panelBBox.y;if(i>0){var a=o+this.frozenGroupAreas[e.FrozenGroupArea.Row].height,s=this.getFrozenRowSplitLineSize(),l=s.x,u=s.width;um(t,rt(rt({},r),{x1:l,x2:l+u,y1:a,y2:a})),(null==n?void 0:n.showShadow)&&A>0&&t.appendChild(new Ss({style:{x:l,y:a,width:u,height:null==n?void 0:n.shadowWidth,fill:this.getShadowFill(90)}}))}},n.prototype.renderFrozenTrailingRowSplitLine=function(t,n,r,A){var i=this.getFrozenOptions().trailingRowCount,o=this.panelBBox.viewportHeight;if(i>0){var a=this.panelBBox.maxY-this.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].height,s=this.getFrozenRowSplitLineSize(),l=s.x,u=s.width,c=this.getCellRange(),h=Math.max(0,this.viewCellHeights.getCellOffsetY(c.end+1)-this.viewCellHeights.getCellOffsetY(c.start)-o);um(t,rt(rt({},r),{x1:l,x2:l+u,y1:a,y2:a})),(null==n?void 0:n.showShadow)&&A<Km(h)&&t.appendChild(new Ss({style:{x:l,y:a-n.shadowWidth,width:u,height:n.shadowWidth,fill:this.getShadowFill(270)}}))}},n.prototype.render=function(){this.shouldRender()&&(this.calculateFrozenGroupInfo(),this.renderFrozenPanelCornerGroup(),t.prototype.render.call(this))},n.prototype.getCenterFrameScrollX=function(e){return this.getFrozenOptions().colCount>0?Gb(this,this.cornerBBox.width,e):t.prototype.getCenterFrameScrollX.call(this,e)},n.prototype.getDefaultCellHeight=function(){var e;return null!==(e=this.getRowCellHeight(null))&&void 0!==e?e:0},n.prototype.createOrUpdate=function(e,t){pm.call(this,e,t)},n.prototype.clip=function(){var t=this.getFrozenOptions(),n=t.colCount,r=t.rowCount,A=t.trailingColCount,i=t.trailingRowCount,o=this.getScrollOffset().scrollX,a=Vb(this,this.panelBBox),s=a.x,l=a.width,u=this.frozenGroupAreas[e.FrozenGroupArea.Col].width,c=this.frozenGroupAreas[e.FrozenGroupArea.TrailingCol].width,h=this.frozenGroupAreas[e.FrozenGroupArea.Row].height,d=this.frozenGroupAreas[e.FrozenGroupArea.TrailingRow].height,f=this.panelBBox.y+h,p=this.panelBBox.viewportHeight-h-d;this.createOrUpdate("panelScrollGroup.style.clipPath",{x:s,y:f,width:l,height:p}),n>0?this.createOrUpdate("frozenGroups.".concat(e.FrozenGroupType.Col,".style.clipPath"),{x:this.panelBBox.x-Gb(this,this.cornerBBox.width,o),y:f,width:u,height:p}):this.frozenGroups[e.FrozenGroupType.Col].style.clipPath=null,A>0?this.createOrUpdate("frozenGroups.".concat(e.FrozenGroupType.TrailingCol,".style.clipPath"),{x:this.panelBBox.x+this.panelBBox.viewportWidth-c,y:f,width:c,height:p}):this.frozenGroups[e.FrozenGroupType.TrailingCol].style.clipPath=null,r>0?this.createOrUpdate("frozenGroups.".concat(e.FrozenGroupType.Row,".style.clipPath"),{x:s,y:this.panelBBox.y,width:l,height:h}):this.frozenGroups[e.FrozenGroupType.Row].style.clipPath=null,i>0?this.createOrUpdate("frozenGroups.".concat(e.FrozenGroupType.TrailingRow,".style.clipPath"),{x:s,y:this.panelBBox.y+this.panelBBox.viewportHeight-d,width:l,height:d}):this.frozenGroups[e.FrozenGroupType.TrailingRow].style.clipPath=null},n}(eI),rI=function(e){var t,n,r,A,i,o=e.spreadsheet,a=e.nodeId,s=e.currentField,l=e.level,u=e.isTotals,c=e.isTotalMeasure;if(e.isLeaf)return!1;var h=null!==(n=null===(t=o.options.style)||void 0===t?void 0:t.rowCell)&&void 0!==n?n:{},d=h.collapseFields,f=h.collapseAll,p=h.expandDepth,g=null!==(r=null==d?void 0:d[a])&&void 0!==r?r:null==d?void 0:d[s],v=lv.isNumber(p)?l>=p:null;return!u&&!c&&(null!==(i=null!==(A=null!=g?g:v)&&void 0!==A?A:f)&&void 0!==i&&i)},AI=function(e){var t,n,r,A,i,o,a=e.fieldValue,s=e.currentField,l=e.query,u=e.parentNode,c=e.spreadsheet,h=e.level,d=e.fields,f=e.addMeasureInTotalQuery,p=CB.isTotalClassInstance(a),g=BB.isTotalMeasureInstance(a),v=!1,y=!1,C=!1,B=!1;return p?(y=a.isGrandTotals,C=a.isSubTotals,B=a.isTotalRoot,i=fv(a.label),o=B?rt({},l):rt(rt({},l),((t={})[s]=i,t)),f&&(o[ry]=null===(A=null==c?void 0:c.dataSet)||void 0===A?void 0:A.fields.values[0]),v=xB({spreadsheet:c,level:h,fields:d})):g?(i=fv(a.label),o=rt(rt({},l),((n={})[ry]=i,n)),y=u.isGrandTotals,C=u.isSubTotals,v=xB({spreadsheet:c,level:h,fields:d})):(o=(i=a)===ly?rt({},l):rt(rt({},l),((r={})[s]=i,r)),v=xB({spreadsheet:c,level:h,fields:d})),{value:i,nodeQuery:o,isLeaf:v,isGrandTotals:y,isSubTotals:C,isTotalRoot:B,isTotals:p,isTotalMeasure:g}},iI=function(e){var t,n,r,A=e.currentField,i=e.fields,o=e.fieldValues,a=e.hierarchy,s=e.parentNode,l=e.level,u=e.query,c=e.addMeasureInTotalQuery,h=e.addTotalMeasureInTotal,d=e.spreadsheet,f=e.handler;try{for(var p=at(o),g=p.next();!g.done;g=p.next()){var v=g.value,y=wB(v),C=A,B=AI({fieldValue:y,currentField:A,query:u,parentNode:s,spreadsheet:d,level:l,fields:i,addMeasureInTotalQuery:c}),m=EB(s.id,B.value);if(m){var w=rI({spreadsheet:d,nodeId:m,currentField:A,level:l,isTotals:B.isTotals,isTotalMeasure:B.isTotalMeasure,isLeaf:B.isLeaf}),E=new yB({id:m,value:B.value,level:l,field:C,parent:s,isTotals:B.isTotals||B.isTotalMeasure,isGrandTotals:B.isGrandTotals,isSubTotals:B.isSubTotals,isTotalMeasure:B.isTotalMeasure,isCollapsed:w,isTotalRoot:B.isTotalRoot,hierarchy:a,query:B.nodeQuery,spreadsheet:d,isLeaf:B.isLeaf||w}),x=XC(d,s,E,a),S=null===(r=null==d?void 0:d.facet)||void 0===r?void 0:r.getHiddenColumnsInfo(E);!(l>a.maxLevel)||B.isGrandTotals||s.isGrandTotals||s.isSubTotals||E.isSubTotals||S||(a.sampleNodesForAllLevels.push(E),a.maxLevel=l,a.sampleNodeForLastLevel=E),B.isLeaf||w||!x?(E.isLeaf=!0,a.pushIndexNode(E),E.rowIndex=a.getIndexNodes().length-1):null==f||f({addTotalMeasureInTotal:h,addMeasureInTotalQuery:c,parentNode:E,currentField:i[l+1],fields:i,hierarchy:a,spreadsheet:d})}}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}},oI=function(e){var t=e.addTotalMeasureInTotal,n=e.parentNode,r=e.currentField,A=e.fields,i=e.hierarchy,o=e.spreadsheet,a=A.indexOf(r),s=o.dataSet,l=s.fields.values,u=void 0===l?[]:l,c=[],h={},d=o.getTotalsConfig(r),f=n.isGrandTotals?d.grandTotalsGroupDimensions||[]:d.subTotalsGroupDimensions||[],p=s.isEmpty()?[]:f;if(null==p?void 0:p.includes(r)){h=bB(n);var g=s.getDimensionValues(r,h);c.push.apply(c,lt([],st((g||[]).map((function(e){return new CB({label:e,isSubTotals:n.isSubTotals,isGrandTotals:n.isGrandTotals,isTotalRoot:!1})}))),!1)),lv.isEmpty(c)&&r&&c.push(ly)}else{if(!t||r!==ry)return xB({spreadsheet:o,level:a,fields:A})?(n.isLeaf=!0,i.pushIndexNode(n),void(n.rowIndex=i.getIndexNodes().length-1)):void oI(rt(rt({},e),{currentField:A[a+1]}));h=bB(n),c.push.apply(c,lt([],st(u.map((function(e){return new BB(e)}))),!1))}var v=TB(c);iI(rt(rt({},e),{fieldValues:v,level:a,parentNode:n,query:h,handler:aI}))};function aI(e){e.parentNode.isTotals?oI(e):function(e){var t,n=e.parentNode,r=e.currentField,A=e.fields,i=e.spreadsheet,o=i.dataSet,a=o.fields.values,s=void 0===a?[]:a,l=A.indexOf(r),u=[];t=bB(n,!0);var c=o.getDimensionValues(r,t),h=WC(i,c,n,r);u.push.apply(u,lt([],st(h||[]),!1)),lv.isEmpty(u)&&r&&(r===ry?u.push.apply(u,lt([],st(s),!1)):u.push(ly)),FB({currentField:r,lastField:A[l-1],isFirstField:0===l,fieldValues:u,spreadsheet:i});var d=TB(u);iI(rt(rt({},e),{fieldValues:d,level:l,parentNode:n,query:t,handler:aI}))}(e)}var sI=function(e){var t,n=e.tree,r=void 0===n?[]:n,A=e.level,i=e.parentNode,o=e.hierarchy,a=e.spreadsheet,s=e.isRowHeader,l=null===(t=a.options.style)||void 0===t?void 0:t.rowCell,u=l.collapseFields,c=l.collapseAll,h=l.expandDepth,d=a.store.get("hiddenColumnsDetail")||[];r.forEach((function(e){var t,n,r,l=e.field,f=e.title,p=e.collapsed,g=e.children,v=At(e,["field","title","collapsed","children"]),y=d.some((function(e){return e.hideColumnNodes.find((function(e){return e.field===l}))})),C=((t={})[ry]=l,t),B=EB(i.id,l),m=null!=p&&p,w=null!==(n=null==u?void 0:u[B])&&void 0!==n?n:null==u?void 0:u[l],E=lv.isNumber(h)?A>h:null,x=null!==(r=null!=w?w:E)&&void 0!==r?r:c||m,S=a.isHierarchyTreeType()&&s&&x,T=lv.isEmpty(g),F=new yB({id:B,field:l,value:f,level:A,parent:i,isTotals:!1,isCollapsed:S,hierarchy:o,query:C,spreadsheet:a,isLeaf:T,extra:rt(rt({},v),{isCustomNode:!0})});if((T||y||S)&&o.pushIndexNode(F),!y){A>o.maxLevel&&!F.isSeriesNumberNode()&&(o.maxLevel=A,o.sampleNodesForAllLevels.push(F),o.sampleNodeForLastLevel=F,o.maxLevel=A);var b=XC(a,i,F,o);lv.isEmpty(g)||S||!b||sI({spreadsheet:a,parentNode:F,level:A+1,hierarchy:o,tree:g||[],isRowHeader:s})}}))},lI=function(e){var t,n,r,A,i,o,a,s,l,u,c=e.spreadsheet,h=e.parentNode,d=e.currentField,f=e.level,p=e.hierarchy,g=e.pivotMeta,v=h.query,y=h.id,C=(null===(o=null===(i=null===(A=c.dataCfg)||void 0===A?void 0:A.fields)||void 0===i?void 0:i.rows)||void 0===o?void 0:o.length)<=f,B=TB(Array.from(g.keys())),m=WC(c,B,h,d),w=c.store.get("drillItemsNum");C&&w>0&&(m=m.slice(0,w)),0===f&&function(e,t,n){var r=e.getTotalsConfig(t);(null==r?void 0:r.showGrandTotals)&&n[r.reverseGrandTotalsLayout?"unshift":"push"](new CB({label:r.grandTotalsLabel,isGrandTotals:!0,isSubTotals:!1,isTotalRoot:!1}))}(c,d,m);try{for(var E=at(m),x=E.next();!x.done;x=E.next()){var S=x.value,T=S instanceof CB,F=T?null:g.get(S),b=void 0,I=v,L=!1,Q=!1;if(T){var U=S;L=U.isGrandTotals,Q=U.isSubTotals,b=fv(S.label),I=v}else b=S,I=rt(rt({},v),((r={})[d]=b,r));var R=EB(y,b),M=null===(a=c.options.style)||void 0===a?void 0:a.rowCell,H=M.collapseFields,O=M.collapseAll,k=M.expandDepth,N=null!==(s=null==H?void 0:H[R])&&void 0!==s?s:null==H?void 0:H[d],_=lv.isNumber(k)?f>k:null,D=null!==(l=null!=N?N:_)&&void 0!==l?l:O,P=new yB({id:R,value:b,level:f,parent:h,field:d,isTotals:T,isGrandTotals:L,isSubTotals:Q,isCollapsed:D,hierarchy:p,query:I,spreadsheet:c});f>p.maxLevel&&(p.maxLevel=f);var G=lt([],st((null===(u=null==F?void 0:F.children)||void 0===u?void 0:u.keys())||[]),!1).filter((function(e){return e!==oy})),K=lv.isEmpty(G);(K||T)&&(P.isLeaf=!0),K||(P.isTotals=!0);var z=XC(c,h,P,p);K||D||T||!z||lI({level:f+1,currentField:F.childField,pivotMeta:F.children,parentNode:P,hierarchy:p,spreadsheet:c})}}catch(e){t={error:e}}finally{try{x&&!x.done&&(n=E.return)&&n.call(E)}finally{if(t)throw t.error}}},uI=function(e){var t=e.rootNode,n=e.hierarchy,r=e.fields,A=e.spreadsheet,i=e.isRowHeader,o=lv.filter(r,(function(e){return e!==ry}));sI({spreadsheet:A,tree:o,level:0,parentNode:t,hierarchy:n,isRowHeader:i})},cI=function(e){var t,n,r=e.isValueInCols,A=e.moreThanOneValue,i=e.rootNode,o=e.hierarchy,a=e.fields,s=e.isRowHeader,l=e.isCustomTreeFields,u=e.spreadsheet;s?(t=!r&&A,n=!r&&!A):(t=r&&A,n=r&&!A),l?uI(e):QB({spreadsheet:u,addTotalMeasureInTotal:t,addMeasureInTotalQuery:n,parentNode:i,currentField:a[0],fields:a,hierarchy:o})},hI=function(e){var t=e.spreadsheet;t.isHierarchyGridTreeType()?function(e){var t=e.isValueInCols,n=e.moreThanOneValue,r=e.rootNode,A=e.hierarchy,i=e.fields,o=e.isCustomTreeFields,a=e.spreadsheet,s=!t&&n,l=!t&&!n;o?uI(e):aI({spreadsheet:a,addTotalMeasureInTotal:s,addMeasureInTotalQuery:l,parentNode:r,currentField:i[0],fields:i,hierarchy:A})}(e):t.isHierarchyTreeType()?function(e){var t=e.spreadsheet,n=e.rootNode,r=e.hierarchy,A=e.isCustomTreeFields,i=t.dataSet.fields.rows;t.isHierarchyTreeType()&&!A?lI({level:0,currentField:null==i?void 0:i[0],pivotMeta:t.dataSet.rowPivotMeta,parentNode:n,hierarchy:r,spreadsheet:t}):uI(e)}(e):cI(e)},dI=function(e){e.spreadsheet.isPivotMode()?cI(e):function(e){var t,n=e.isCustomTreeFields,r=e.spreadsheet,A=(null!==(t=r.options.seriesNumber)&&void 0!==t?t:{}).enable;if(n){var i={field:sy,title:r.getSeriesNumberText()},o=A?lt([i],st(e.fields),!1):e.fields.filter((function(e){return(null==e?void 0:e.field)!==sy}));uI(rt(rt({},e),{fields:o}))}else RB(e)}(e)},fI=function(e){var t=e.isRowHeader,n=e.spreadsheet,r=n.dataSet.fields,A=r.rows,i=void 0===A?[]:A,o=r.columns,a=void 0===o?[]:o,s=n.isValueInCols(),l=n.dataSet.moreThanOneValue(),u=new MB,c=t?i:a,h=n.isCustomHeaderFields(t?"rows":"columns"),d={isValueInCols:s,moreThanOneValue:l,rootNode:u.rootNode,hierarchy:u,spreadsheet:n,fields:c,isRowHeader:t,isCustomTreeFields:h};t?hI(d):dI(d);return{hierarchy:u,leafNodes:t&&n.isHierarchyTreeType()?u.getNodes():u.getLeaves()}},pI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),Object.defineProperty(n.prototype,"rowCellTheme",{get:function(){return this.spreadsheet.theme.rowCell.cell},enumerable:!1,configurable:!0}),n.prototype.getCornerCellInstance=function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(null===(t=(e=this.spreadsheet.options).cornerCell)||void 0===t?void 0:t.call.apply(t,lt([e],st(n),!1)))||new(Zx.bind.apply(Zx,lt([void 0],st(n),!1)))},n.prototype.getRowCellInstance=function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(null===(t=(e=this.spreadsheet.options).rowCell)||void 0===t?void 0:t.call.apply(t,lt([e],st(n),!1)))||new(AS.bind.apply(AS,lt([void 0],st(n),!1)))},n.prototype.getColCellInstance=function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(null===(t=(e=this.spreadsheet.options).colCell)||void 0===t?void 0:t.call.apply(t,lt([e],st(n),!1)))||new(jx.bind.apply(jx,lt([void 0],st(n),!1)))},n.prototype.doLayout=function(){var e=this.buildAllHeaderHierarchy(),t=e.rowLeafNodes,n=e.colLeafNodes,r=e.rowsHierarchy,A=e.colsHierarchy;return this.calculateHeaderNodesCoordinate({rowLeafNodes:t,rowsHierarchy:r,colLeafNodes:n,colsHierarchy:A}),{colNodes:A.getNodes(),colsHierarchy:A,rowNodes:r.getNodes(),rowsHierarchy:r,rowLeafNodes:t,colLeafNodes:n}},n.prototype.buildAllHeaderHierarchy=function(){var e=fI({isRowHeader:!0,spreadsheet:this.spreadsheet}),t=e.leafNodes,n=e.hierarchy,r=fI({isRowHeader:!1,spreadsheet:this.spreadsheet});return{rowLeafNodes:t,colLeafNodes:r.leafNodes,rowsHierarchy:n,colsHierarchy:r.hierarchy}},n.prototype.getDataQueryInfo=function(e,t){var n,r,A,i,o,a=this.spreadsheet,s=a.options,l=a.dataSet,u=null!==(i=null===(A=null===(r=s.style)||void 0===r?void 0:r.colCell)||void 0===A?void 0:A.hideValue)&&void 0!==i&&i?((n={})[ry]=null===(o=l.fields.values)||void 0===o?void 0:o[0],n):{},c=lv.merge({},e,t,u);return{dataQuery:c,valueField:c[ry]}},n.prototype.getCellMeta=function(e,t){var n,r;void 0===e&&(e=0),void 0===t&&(t=0);var A=this.spreadsheet,i=A.options,o=A.dataSet,a=this.getLayoutResult(),s=a.rowLeafNodes,l=a.colLeafNodes,u=s[e],c=l[t];if(!u||!c)return null;var h=u.query,d=c.query,f=u.isTotals||u.isTotalMeasure||c.isTotals||c.isTotalMeasure,p=_w(u,c),g=this.getDataQueryInfo(h,d),v=g.dataQuery,y=g.valueField,C=o.getCellData({query:v,rowNode:u,isTotals:f,totalStatus:p}),B=lv.get(C,ny,null),m={spreadsheet:this.spreadsheet,x:c.x,y:u.y,width:c.width,height:u.height,data:C,rowIndex:e,colIndex:t,isTotals:f,valueField:y,fieldValue:B,rowQuery:h,colQuery:d,query:rt(rt({},h),d),rowId:u.id,colId:c.id,id:Bw(u.id,c.id)};return null!==(r=null===(n=i.layoutCellMeta)||void 0===n?void 0:n.call(i,m))&&void 0!==r?r:m},n.prototype.getPreLevelSampleNode=function(e,t){return t.getNodes(e.level-1).find((function(e){return!e.isTotals}))},n.prototype.calculateHeaderNodesCoordinate=function(e){this.calculateRowNodesCoordinate(e),this.calculateColNodesCoordinate(e)},n.prototype.calculateColNodesCoordinate=function(e){var t=e.colLeafNodes,n=e.colsHierarchy,r=e.rowsHierarchy;this.calculateColLeafNodesWidth(e),this.calculateColParentNodeWidthAndX(t),this.updateColsHierarchySampleMaxHeightNodes(n,r),this.calculateColNodesHeight(n),this.updateCustomFieldsSampleNodes(n),this.adjustCustomColLeafNodesHeight({leafNodes:t,hierarchy:n}),this.adjustColTotalNodesCoordinate(n)},n.prototype.calculateRowOffsets=function(){},n.prototype.adjustColTotalNodesCoordinate=function(e){var t;lv.isEmpty(null===(t=this.spreadsheet.options.totals)||void 0===t?void 0:t.col)||(this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!1,isSubTotal:!0}),this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!1,isSubTotal:!1}))},n.prototype.calculateColLeafNodesWidth=function(e){var t=this,n=e.rowLeafNodes,r=e.colLeafNodes,A=e.rowsHierarchy,i=e.colsHierarchy,o=yB.blankNode(),a=0;i.getLeaves().forEach((function(e){e.colIndex=a,a++,e.x=o.x+o.width,e.width=t.getColLeafNodesWidth(e,r,n,A.width),i.width+=e.width,o=e}))},n.prototype.calculateColNodesHeight=function(e){var t=this;e.getNodes().forEach((function(n){if(0===n.level)n.y=0;else{var r=t.getPreLevelSampleNode(n,e);n.y=(null==r?void 0:r.y)+(null==r?void 0:r.height)||0}var A=t.getColNodeHeight({colNode:n,colsHierarchy:e,useCache:!1});n.height=n.isGrandTotals&&!n.isTotalMeasure&&n.isLeaf?e.height:A,YC(t.spreadsheet,null,n)}))},n.prototype.getMultipleMap=function(e,t,n){for(var r=e.maxLevel,A=this.spreadsheet.dataSet,i=this.spreadsheet.options.totals,o=A.moreThanOneValue(),a=A.fields,s=a.rows,l=a.columns,u=t?s:l,c=t?i.row:i.col,h=n?(null==c?void 0:c.subTotalsGroupDimensions)||[]:(null==c?void 0:c.grandTotalsGroupDimensions)||[],d=A.isEmpty()?[]:h,f=Array.from({length:r+1},(function(){return 1})),p=r;p>0;p--){var g=u[p],v=g===ry&&o;d.includes(g)||v||(f[p-1]+=f[p],f[p]=0)}return f},n.prototype.adjustTotalNodesCoordinate=function(e){var t=e.hierarchy,n=e.isRowHeader,r=e.isSubTotal,A=this.getMultipleMap(t,n,r),i=lv.filter(t.getNodes(),(function(e){return r?e.isSubTotals:e.isGrandTotals})),o=n?"width":"height";lv.forEach(i,(function(e){var n,i=A[e.level];if(!i&&r)for(var a=1;i<1;)i=A[e.level-a]-a,a++;for(var s=0,l=function(r){s+=lv.get(null===(n=t.sampleNodesForAllLevels)||void 0===n?void 0:n.find((function(t){return t.level===e.level+r})),[o],0)},u=0;u<i;u++)l(u);e[o]=s}))},n.prototype.getColLeafNodesWidth=function(t,n,r,A){var i=this.spreadsheet.options.style.colCell,o=this.getColCellDraggedWidth(t);if(lv.isNumber(o))return zm(o);var a=this.getCellCustomSize(t,null==i?void 0:i.width);return lv.isNumber(a)?zm(a):this.spreadsheet.getLayoutWidthType()===e.LayoutWidthType.Compact?this.getCompactGridColNodeWidth(t,r):this.spreadsheet.isHierarchyTreeType()?this.getAdaptTreeColWidth(t,n,r):this.getAdaptGridColWidth(n,t,A)},n.prototype.getRowNodeHeight=function(e){if(!e)return 0;var t=this.spreadsheet.options.style.rowCell,n=this.getRowCellHeight(e),r=(null==t?void 0:t.maxLines)>1&&(null==t?void 0:t.wordWrap)||this.spreadsheet.theme.rowCell.text.fontSize>Cb||this.spreadsheet.theme.rowCell.measureText.fontSize>Cb||this.spreadsheet.theme.rowCell.seriesText.fontSize>Cb||this.spreadsheet.theme.rowCell.bolderText.fontSize>Cb;return this.isCustomRowCellHeight(e)||!r?(e.extra.isCustomHeight=!0,n||0):this.getNodeAdaptiveHeight({meta:e,cell:this.textWrapTempRowCell,defaultHeight:n})},n.prototype.getExpectedCellIconWidth=function(e,t,n){var r,A,i=0;if(t)i=1;else{var o=lv.map(this.spreadsheet.options.headerActionIcons,(function(e){return rt(rt({},e),{displayCondition:function(){return!0}})})),a=VB(o,null,e);i=(null==a?void 0:a.icons.length)||0}return i?i*(n.size+(null===(r=n.margin)||void 0===r?void 0:r.left))+(null===(A=n.margin)||void 0===A?void 0:A.right):0},n.prototype.calculateRowNodesAllLevelSampleNodes=function(e){var t=this,n=e.rowsHierarchy,r=e.colLeafNodes,A=this.spreadsheet.isHierarchyTreeType(),i=n.sampleNodesForAllLevels||[];A?n.width=this.getTreeRowHeaderWidth():i.forEach((function(e){var A;e.width=t.getGridRowNodesWidth(e,r),n.width+=e.width;var o=null!==(A=i[e.level-1])&&void 0!==A?A:{x:0,width:0};e.x=(null==o?void 0:o.x)+(null==o?void 0:o.width)})),n.rootNode.width=n.width},n.prototype.getRowLeafNodeHeight=function(e){var t,n=this,r=this.spreadsheet.options.style.rowCell,A=(null==r?void 0:r.maxLines)>1&&(null==r?void 0:r.wordWrap)?yB.getBranchNodes(e).map((function(e){return n.getRowNodeHeight(e)})):[],i=this.getRowNodeHeight(e);return zm(this.isCustomRowCellHeight(e)?i:null!==(t=lv.max(A))&&void 0!==t?t:i)},n.prototype.calculateRowNodesBBox=function(e){var t=this,n=this.spreadsheet.isHierarchyTreeType(),r=e.sampleNodesForAllLevels||[],A=yB.blankNode();e.getNodes().forEach((function(i){var o,a,s=n||!n&&i.isLeaf;if(n)i.width=t.getTreeRowHeaderWidth();else{var l=r[i.level];i.width=null==l?void 0:l.width}if(s){var u=(null!==(o=null==A?void 0:A.rowIndex)&&void 0!==o?o:-1)+1;null!==(a=i.rowIndex)&&void 0!==a||(i.rowIndex=u),i.y=A.y+A.height,i.height=t.getRowLeafNodeHeight(i),A=i,e.height+=i.height}if(n||0===i.level)i.x=0;else{var c=r[i.level-1];i.x=(null==c?void 0:c.x)+(null==c?void 0:c.width)}YC(t.spreadsheet,i,null)}))},n.prototype.calculateRowNodesCoordinate=function(e){var t=e.rowsHierarchy,n=e.rowLeafNodes,r=this.spreadsheet.isHierarchyTreeType();this.calculateRowNodesAllLevelSampleNodes(e),this.calculateRowNodesBBox(t),r||(this.adjustCustomRowLeafNodesWidth({leafNodes:n,hierarchy:t}),this.calculateRowNodeHeightAndY(n),this.adjustRowTotalNodesCoordinate(t))},n.prototype.adjustRowTotalNodesCoordinate=function(e){var t;lv.isEmpty(null===(t=this.spreadsheet.options.totals)||void 0===t?void 0:t.row)||(this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!0,isSubTotal:!1}),this.adjustTotalNodesCoordinate({hierarchy:e,isRowHeader:!0,isSubTotal:!0}))},n.prototype.calculateRowNodeHeightAndY=function(e){for(var t=null,n=0,r=e.slice(0);n<r.length;){var A=r[n++],i=null==A?void 0:A.parent;t!==i&&i&&(r.push(i),i.y=i.children[0].y,i.height=lv.sumBy(i.children,"height"),t=i)}},n.prototype.getGridRowNodesWidth=function(t,n){var r=this.spreadsheet.options.style.rowCell,A=this.getRowCellDraggedWidth(t);if(lv.isNumber(A))return zm(A);var i=this.getCellCustomSize(t,null==r?void 0:r.width);return lv.isNumber(i)?zm(i):this.spreadsheet.getLayoutWidthType()!==e.LayoutWidthType.Adaptive?this.getCompactGridRowNodeWidth(t):this.getAdaptGridColWidth(n)},n.prototype.getAdaptTreeColWidth=function(e,t,n){var r=this.getCanvasSize().width-this.getSeriesNumberWidth()-aw.getVerticalBorderWidth(this.spreadsheet),A=Math.min(r/2,this.getTreeRowHeaderWidth()),i=Math.max(1,t.length),o=this.spreadsheet.options.style.dataCell;return zm(Math.max(Pm(o,this.getColLabelLength(e,n)),Km((r-A)/i)))},n.prototype.getColLabelLength=function(e,t){var n=vS(null==e?void 0:e.value);if(lv.isArray(n))return n.length;for(var r=1,A=0;A<50;A++){var i=t[A];if(!i)return r;for(var o=this.spreadsheet.dataSet.getCellData({query:rt(rt({},e.query),i.query),rowNode:i,isTotals:e.isTotals||e.isTotalMeasure||i.isTotals||i.isTotalMeasure}),a=lv.keys(o),s=0;s<a.length;s++){var l=lv.get(o,a[s]),u=lv.size(lv.get(null==l?void 0:l.values,"0"));u>r&&(r=u)}}return r},n.prototype.getAdaptGridColWidth=function(e,t,n){var r=this.spreadsheet.dataSet.fields.rows,A=void 0===r?[]:r,i=this.spreadsheet.options.style.dataCell,o=A.length,a=e.length,s=this.getCanvasSize().width-this.getSeriesNumberWidth()-aw.getVerticalBorderWidth(this.spreadsheet),l=Math.max(1,o+a);return zm(n?Math.max(Pm(i),Km((s-n)/a)):Math.max(Pm(i),Km(s/l)))},n.prototype.getTreeRowHeaderWidth=function(){var e,t,n,r,A=this.spreadsheet.options.style.rowCell;if(lv.isNumber(null==A?void 0:A.treeWidth))return zm(A.treeWidth);var i=this.getCellCustomSize(null,null==A?void 0:A.width);if(lv.isNumber(i))return zm(i);var o=Xb.getTreeCornerText(this.spreadsheet),a=this.spreadsheet.theme.cornerCell,s=a.bolderText,l=a.icon,u=this.measureTextWidth(o,s)+2*l.size+(null===(e=l.margin)||void 0===e?void 0:e.left)+(null===(t=l.margin)||void 0===t?void 0:t.right)+(null===(n=this.rowCellTheme.padding)||void 0===n?void 0:n.left)+(null===(r=this.rowCellTheme.padding)||void 0===r?void 0:r.right),c=Math.max(null!=i?i:120,u);return Number.isNaN(c)?120:zm(c)},n.prototype.getCompactGridRowNodeWidth=function(t){var n,r=this,A=this.spreadsheet.theme.rowCell,i=A.bolderText,o=A.icon,a=A.cell,s=this.spreadsheet.theme.cornerCell,l=s.bolderText,u=s.icon,c=s.cell,h=t.field,d=t.isLeaf,f=this.getExpectedCellIconWidth(e.CellType.ROW_CELL,!this.spreadsheet.isValueInCols()&&d&&this.spreadsheet.options.showDefaultHeaderActionIcon,o),p=null===(n=this.spreadsheet.dataSet.getDimensionValues(h))||void 0===n?void 0:n.slice(0,50).map((function(e){var n,A;return null!==(A=null===(n=r.spreadsheet.dataSet.getFieldFormatter(h))||void 0===n?void 0:n(e,void 0,t))&&void 0!==A?A:e})),g=lv.maxBy(p,(function(e){return"".concat(e).length})),v=this.measureTextWidth(g,i)+f+a.padding.left+a.padding.right+a.verticalBorderWidth,y=this.spreadsheet.dataSet.getFieldName(h),C=this.getExpectedCellIconWidth(e.CellType.CORNER_CELL,!1,u),B=this.measureTextWidth(y,l)+C+c.padding.left+c.padding.right;qC.getInstance().logger("Max Label In Row:",h,v>B?g:y);var m=this.spreadsheet.options.style||{},w=m.compactExtraWidth,E=void 0===w?0:w,x=m.compactMinWidth,S=zm(Math.max(v,B)+E);return lv.isNumber(x)?Math.max(S,x):S},n.prototype.getCompactGridColNodeWidth=function(t,n){for(var r,A,i,o,a,s,l=this.spreadsheet.theme.colCell,u=l.bolderText,c=l.cell,h=l.icon,d=this.spreadsheet.theme.dataCell,f=d.text,p=d.icon,g=this.spreadsheet.dataSet.getFieldFormatter(t.field),v=null!==(r=null==g?void 0:g(t.value,void 0,t))&&void 0!==r?r:t.value,y=this.getExpectedCellIconWidth(e.CellType.COL_CELL,this.spreadsheet.isValueInCols()&&this.spreadsheet.options.showDefaultHeaderActionIcon,h),C=this.measureTextWidth(v,u)+y,B="",m=0,w=0,E=0;E<50;E++){var x=n[E];if(x){var S=this.getDataQueryInfo(x.query,t.query),T=S.valueField,F=S.dataQuery,b=this.spreadsheet.dataSet.getCellData({query:F,rowNode:x,isTotals:t.isTotals||t.isTotalMeasure||x.isTotals||x.isTotalMeasure});if(b){var I=null==b?void 0:b[ny],L=null!==(i=null===(A=this.spreadsheet.dataSet.getFieldFormatter(b[ry]))||void 0===A?void 0:A(I,b,t))&&void 0!==i?i:I,Q=rm(null===(o=this.spreadsheet.options.conditions)||void 0===o?void 0:o.icon,T)?(null==p?void 0:p.size)+(null===(a=null==p?void 0:p.margin)||void 0===a?void 0:a.left)+(null===(s=null==p?void 0:p.margin)||void 0===s?void 0:s.right):0,U=this.measureTextWidth(L,f)+Q;U>m&&(B=L,m=U,w=Q)}}}var R=C>m,M=R?v:B,H=R?y:w;qC.getInstance().logger("Max Label In Col:",t.field,M,m,w);var O=this.measureTextWidth(M,rt(rt({},u),{fontSize:Math.max(f.fontSize,u.fontSize)})),k=this.spreadsheet.options.style||{},N=k.compactExtraWidth,_=void 0===N?0:N,D=k.compactMinWidth,P=zm(O+c.padding.left+c.padding.right+2*c.verticalBorderWidth+H+_);return lv.isNumber(D)?Math.max(P,D):P},n.prototype.getViewCellHeights=function(){var e=this.getRowLeafNodes(),t=lv.reduce(e,(function(e,t){var n=lv.last(e)||0;return e.push(n+t.height),e}),[0]);return{getTotalHeight:function(){return lv.last(t)||0},getCellOffsetY:function(e){return t[e]||0},getTotalLength:function(){return t.length-1},getIndexRange:function(e,n){return YS(t,e,n)}}},n.prototype.getSeriesNumberCells=function(){var e,t=(null===(e=this.getSeriesNumberHeader())||void 0===e?void 0:e.children)||[];return JS(t,iS)},n.prototype.getFrozenOptions=function(){return this.validFrozenOptions||(this.validFrozenOptions=Um(t.prototype.getFrozenOptions.call(this),this.spreadsheet.options)),this.validFrozenOptions},n.prototype.getContentWidth=function(){var e=this.layoutResult,t=e.rowsHierarchy,n=e.colsHierarchy;return zm(t.width+n.width+aw.getVerticalBorderWidth(this.spreadsheet))},n.prototype.getContentHeight=function(){var e=this.layoutResult,t=e.rowsHierarchy,n=e.colsHierarchy;return zm(t.height+n.height+aw.getHorizontalBorderWidth(this.spreadsheet))},n}(nI),gI=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nt(t,e),t.prototype.getCellInstance=function(e){var t=this.getHeaderConfig(),n=t.spreadsheet,r=n.options,A=r.seriesNumberCell,i=r.colCell,o=[e,n,t];return e.field===sy?(null==A?void 0:A.apply(void 0,lt([],st(o),!1)))||new(aS.bind.apply(aS,lt([void 0],st(o),!1))):(null==i?void 0:i.apply(void 0,lt([],st(o),!1)))||new(oS.bind.apply(oS,lt([void 0],st(o),!1)))},t}(Wb),vI=function(t){function n(n){var r=t.call(this,n)||this;return r.onSortHandler=function(t){return it(r,void 0,void 0,(function(){var n,r,A,i;return ot(this,(function(o){switch(o.label){case 0:return n=this.spreadsheet,r=t,Array.isArray(t)||(r=[t]),A=n.dataCfg.sortParams||[],r=r.map((function(e){var t,n,r=rt(rt({},e),{sortFieldId:null!==(t=e.sortKey)&&void 0!==t?t:e.sortFieldId}),i=null!==(n=A.find((function(e){return e.sortFieldId===r.sortFieldId})))&&void 0!==n?n:{};return rt(rt({},i),r)})),i=A.filter((function(e){return!r.find((function(t){return t.sortFieldId===e.sortFieldId}))})),lv.set(n.dataCfg,"sortParams",lt(lt([],st(i),!1),st(r),!1)),n.setDataCfg(n.dataCfg),[4,n.render(!0)];case 1:return o.sent(),n.emit(e.S2Event.RANGE_SORTED,n.dataSet.getDisplayDataSet()),[2]}}))}))},r.onFilterHandler=function(t){return it(r,void 0,void 0,(function(){var n,r,A,i;return ot(this,(function(o){switch(o.label){case 0:return n=this.spreadsheet,r=!t.filteredValues||0===t.filteredValues.length,A=n.dataCfg.filterParams||[],-1!==(i=A.findIndex((function(e){return e.filterKey===t.filterKey})))?r?A.splice(i,1):A[i]=t:A.push(t),lv.set(n.dataCfg,"filterParams",A),[4,n.render(!0)];case 1:return o.sent(),n.emit(e.S2Event.RANGE_FILTERED,n.dataSet.getDisplayDataSet()),[2]}}))}))},r.spreadsheet.on(e.S2Event.RANGE_SORT,r.onSortHandler),r.spreadsheet.on(e.S2Event.RANGE_FILTER,r.onFilterHandler),r}return nt(n,t),n.prototype.getCornerCellInstance=function(){return null},n.prototype.getRowCellInstance=function(e){var t=this.spreadsheet.options.dataCell;return(null==t?void 0:t(e,this.spreadsheet))||new sS(e,this.spreadsheet)},n.prototype.getColCellInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.spreadsheet.options.colCell;return(null==n?void 0:n.apply(void 0,lt([],st(e),!1)))||new(oS.bind.apply(oS,lt([void 0],st(e),!1)))},n.prototype.initGroups=function(){t.prototype.initGroups.call(this),this.initEmptyPlaceholderGroup()},n.prototype.shouldRender=function(){var e,n=this.spreadsheet.dataSet.fields,r=null===(e=null==n?void 0:n.columns)||void 0===e?void 0:e.every((function(e){return e===sy}));return t.prototype.shouldRender.call(this)&&!r},n.prototype.render=function(){this.shouldRender()&&(t.prototype.render.call(this),this.renderEmptyPlaceholder())},n.prototype.clearAllGroup=function(){t.prototype.clearAllGroup.call(this),this.emptyPlaceholderGroup.remove()},n.prototype.initEmptyPlaceholderGroup=function(){this.emptyPlaceholderGroup=this.spreadsheet.container.appendChild(new ds({name:Ov,style:{zIndex:4}}))},n.prototype.renderEmptyPlaceholder=function(){var e,t,n;if(null===(e=this.spreadsheet.dataSet)||void 0===e?void 0:e.isEmpty()){var r=this.spreadsheet.options.placeholder.empty,A=this.spreadsheet.theme.background,i=this.spreadsheet.theme.empty,o=i.icon,a=i.description,s=this.spreadsheet.theme.dataCell.cell,l=s.horizontalBorderWidth,u=s.horizontalBorderColor,c=s.horizontalBorderColorOpacity,h=this.panelBBox,d=h.maxY,f=h.viewportWidth,p=h.height,g=f/2-o.width/2,v=p/2+d-o.height/2+o.margin.top,y=null!==(t=null==r?void 0:r.description)&&void 0!==t?t:fv("暂无数据"),C=f/2-this.measureTextWidth(y,a)/2,B=v+o.height+o.margin.bottom,m=new Ss({style:{x:0,y:d,width:f,height:p,stroke:u,strokeWidth:l,strokeOpacity:c,fill:null==A?void 0:A.color,fillOpacity:null!==(n=null==A?void 0:A.opacity)&&void 0!==n?n:1}});this.emptyPlaceholderGroup.appendChild(m),hm(this.emptyPlaceholderGroup,rt(rt({},o),{name:null==r?void 0:r.icon,x:g,y:v,width:o.width,height:o.height})),lm({group:this.emptyPlaceholderGroup,style:rt(rt({},a),{text:y,x:C,y:B})}),this.emptyPlaceholderGroup.toFront()}},n.prototype.getDataCellAdaptiveHeight=function(e){var t={id:String(null==e?void 0:e.rowIndex)},n=this.getRowCellHeight(t);if(this.isCustomRowCellHeight(t))return this.customRowHeightStatusMap[null==e?void 0:e.rowIndex]=!0,n||0;var r=this.getCellHeightByRowIndex(null==e?void 0:e.rowIndex);return this.getNodeAdaptiveHeight({meta:e,cell:this.textWrapTempRowCell,defaultHeight:r})},n.prototype.getCellHeightByRowIndex=function(e){var t;return this.rowOffsets?null!==(t=this.getRowCellHeight({id:String(e)}))&&void 0!==t?t:0:this.getDefaultCellHeight()},n.prototype.presetRowCellHeightIfNeeded=function(e){var t,n=this,r=this.spreadsheet.options.style,A=this.getColLeafNodes();if(!((lv.isEmpty(A)||(null===(t=null==r?void 0:r.dataCell)||void 0===t?void 0:t.maxLines)<=1)&&this.spreadsheet.theme.dataCell.text.fontSize<=Cb&&this.spreadsheet.theme.dataCell.bolderText.fontSize<=Cb)){var i=lv.max(A.map((function(t){var r=n.getCellMeta(e,t.colIndex);return n.getDataCellAdaptiveHeight(r)})))||this.getDefaultCellHeight();lv.set(this.spreadsheet.options,"style.rowCell.heightByField.".concat(e),i)}},n.prototype.calculateRowOffsets=function(){var e,t,n,r=this,A=this.spreadsheet.options.style,i=null===(e=null==A?void 0:A.rowCell)||void 0===e?void 0:e.heightByField,o=(null===(t=null==A?void 0:A.dataCell)||void 0===t?void 0:t.maxLines)>1&&(null===(n=null==A?void 0:A.dataCell)||void 0===n?void 0:n.wordWrap)||this.spreadsheet.theme.dataCell.text.fontSize>Cb||this.spreadsheet.theme.dataCell.bolderText.fontSize>Cb;if(lv.keys(i).length||o){var a=this.spreadsheet.dataSet.getDisplayDataSet();this.textWrapNodeHeightCache.clear(!1),this.customRowHeightStatusMap={},this.rowOffsets=[0],this.lastRowOffset=0,a.forEach((function(e,t){r.presetRowCellHeightIfNeeded(t);var n=r.getCellHeightByRowIndex(t),A=r.lastRowOffset+n;r.rowOffsets.push(A),r.lastRowOffset=A}))}},n.prototype.destroy=function(){t.prototype.destroy.call(this),this.spreadsheet.off(e.S2Event.RANGE_SORT,this.onSortHandler),this.spreadsheet.off(e.S2Event.RANGE_FILTER,this.onFilterHandler)},n.prototype.calculateCornerBBox=function(){var e=Km(this.getLayoutResult().colsHierarchy.height);this.cornerBBox=new Ub(this),this.cornerBBox.height=e,this.cornerBBox.maxY=e},n.prototype.doLayout=function(){var e=new MB,t=this.buildColHeaderHierarchy(),n=t.colLeafNodes,r=t.colsHierarchy;return this.calculateColNodesCoordinate(n,r),{colNodes:r.getNodes(),colLeafNodes:n,colsHierarchy:r,rowNodes:[],rowsHierarchy:e,rowLeafNodes:[],cornerNodes:[]}},n.prototype.buildColHeaderHierarchy=function(){var e=fI({isRowHeader:!1,spreadsheet:this.spreadsheet});return{colLeafNodes:e.leafNodes,colsHierarchy:e.hierarchy}},n.prototype.getCellMeta=function(e,t){var n,r,A,i;void 0===e&&(e=0),void 0===t&&(t=0);var o,a=this.spreadsheet,s=a.options,l=a.dataSet,u=this.getColLeafNodes()[t];if(!u)return null;var c=u.x,h=this.viewCellHeights.getCellOffsetY(e),d=this.getCellHeightByRowIndex(e);o=(null===(r=s.seriesNumber)||void 0===r?void 0:r.enable)&&u.field===sy?e+1:l.getCellData({query:{field:u.field,rowIndex:e}});var f=u.field,p=o,g={rowIndex:e},v={colIndex:t},y={spreadsheet:this.spreadsheet,x:c,y:h,width:u.width,height:d,data:(n={},n[u.field]=o,n),rowIndex:e,colIndex:t,isTotals:!1,colId:u.id,rowId:String(e),valueField:f,fieldValue:p,id:Bw(String(e),u.id),rowQuery:g,colQuery:v,query:rt(rt({},g),v)};return null!==(i=null===(A=s.layoutCellMeta)||void 0===A?void 0:A.call(s,y))&&void 0!==i?i:y},n.prototype.getAdaptiveColWidth=function(t){var n,r=this.spreadsheet.options.style.dataCell,A=this.spreadsheet.options.seriesNumber;if(this.spreadsheet.getLayoutWidthType()!==e.LayoutWidthType.Compact){var i=this.getSeriesNumberWidth(),o=t.length-((null==A?void 0:A.enable)?1:0),a=this.getCanvasSize().width-i-aw.getVerticalBorderWidth(this.spreadsheet);return Math.max(null==r?void 0:r.width,Km(a/Math.max(1,o)))}return zm(null!==(n=null==r?void 0:r.width)&&void 0!==n?n:0)},n.prototype.calculateColLeafNodesWidth=function(e,t){var n=this,r=yB.blankNode(),A=0,i=this.getAdaptiveColWidth(e);t.getLeaves().forEach((function(e){e.colIndex=A,A+=1,e.x=r.x+r.width,e.width=n.getColLeafNodesWidth(e,i),YC(n.spreadsheet,null,e),t.width+=e.width,r=e}))},n.prototype.calculateColNodesHeight=function(e){var t=this;e.getNodes().forEach((function(n){var r,A;0===n.level?n.y=0:n.y=(null===(r=null==n?void 0:n.parent)||void 0===r?void 0:r.y)+(null===(A=null==n?void 0:n.parent)||void 0===A?void 0:A.height)||0,n.height=t.getColNodeHeight({colNode:n,colsHierarchy:e,useCache:!1})}))},n.prototype.calculateColNodesCoordinate=function(e,t){this.calculateColLeafNodesWidth(e,t),this.calculateColParentNodeWidthAndX(e),this.updateColsHierarchySampleMaxHeightNodes(t),this.calculateColNodesHeight(t),this.updateCustomFieldsSampleNodes(t),this.adjustCustomColLeafNodesHeight({leafNodes:e,hierarchy:t})},n.prototype.getCompactColNodeWidth=function(e){var t=this,n=this.spreadsheet,r=n.theme,A=n.dataSet,i=r.colCell.bolderText,o=r.dataCell,a=o.text,s=o.cell,l=A.getDisplayDataSet(),u=A.getFieldFormatter(e.field),c=lv.maxBy(null==l?void 0:l.slice(0,50).map((function(t){var n;return"".concat(null!==(n=null==u?void 0:u(t[e.field]))&&void 0!==n?n:t[e.field])})),(function(e){return t.measureTextWidth(e,a)}));qC.getInstance().logger("Max Label In Col:",e.field,c);var h=this.measureTextWidth(c,a)+s.padding.left+s.padding.right,d=this.measureTextWidth(e.value,i)+gS(this.spreadsheet,e,r.colCell),f=this.spreadsheet.options.style||{},p=f.compactExtraWidth,g=void 0===p?0:p,v=f.compactMinWidth,y=zm(Math.max(d,h)+g);return lv.isNumber(v)?Math.max(y,v):y},n.prototype.getColLeafNodesWidth=function(t,n){var r=this.spreadsheet.options.style.colCell,A=this.spreadsheet.getLayoutWidthType(),i=this.getColCellDraggedWidth(t);if(lv.isNumber(i))return zm(i);var o=this.getCellCustomSize(t,null==r?void 0:r.width);return lv.isNumber(o)?zm(o):t.field===sy?this.getSeriesNumberWidth():A===e.LayoutWidthType.Compact?this.getCompactColNodeWidth(t):zm(n)},n.prototype.getViewCellHeights=function(){var e=this,t=this.getDefaultCellHeight();return{getTotalHeight:function(){return e.rowOffsets?lv.last(e.rowOffsets)||0:t*e.spreadsheet.dataSet.getDisplayDataSet().length},getCellOffsetY:function(n){return n<=0?0:e.rowOffsets?e.rowOffsets[n]:n*t},getTotalLength:function(){return e.spreadsheet.dataSet.getDisplayDataSet().length},getIndexRange:function(n,r){if(e.rowOffsets)return YS(e.rowOffsets,n,r);var A=Km(n/t,0),i=r%t==0?r/t-1:Km(r/t,0);return{start:Math.max(0,A),end:Math.max(0,i)}}}},n.prototype.renderRowResizeArea=function(){var e=this.spreadsheet.options.interaction.resize;if(lv.isBoolean(e)?e:null==e?void 0:e.rowCellVertical){var t=this.foregroundGroup.getElementById(bv);t&&t.removeChildren(),JS(this.panelGroup.children,sS).forEach((function(e){e.drawResizeArea()}))}},n.prototype.getRowHeader=function(){return null},n.prototype.getColHeader=function(){if(!this.columnHeader){var e=this.panelBBox,t=e.x,n=e.width,r=e.viewportHeight,A=e.viewportWidth;return new gI({width:n,height:this.cornerBBox.height,viewportWidth:A,viewportHeight:r,cornerWidth:this.cornerBBox.width,position:{x:t,y:0},nodes:this.getColNodes(),sortParam:this.spreadsheet.store.get("sortParam"),spreadsheet:this.spreadsheet})}return this.columnHeader},n.prototype.getSeriesNumberHeader=function(){return null},n.prototype.getScrollbarPosition=function(){var e=this.getCanvasSize().height,n=t.prototype.getScrollbarPosition.call(this),r=this.spreadsheet.dataSet.isEmpty()?e-this.scrollBarSize:n.maxY;return rt(rt({},n),{maxY:r})},n.prototype.getSeriesNumberCells=function(){return this.getDataCells().filter((function(e){return e.getMeta().valueField===sy}))},n.prototype.getContentWidth=function(){return zm(this.layoutResult.colsHierarchy.width)},n.prototype.getContentHeight=function(){var e=this.getViewCellHeights().getTotalHeight,t=this.layoutResult.colsHierarchy;return zm(e()+t.height+aw.getHorizontalBorderWidth(this.spreadsheet))},n}(nI),yI=function(){function e(e){var t=this;this.isLinkFieldText=function(e){var n=t.getCellAppendInfo(e);return null==n?void 0:n.isLinkFieldText},this.spreadsheet=e,this.bindEvents()}return e.prototype.getCellAppendInfo=function(e){return qS(e)},e.prototype.getTooltipOperator=function(e,t){void 0===t&&(t=[]);var n=this.spreadsheet.getCell(e.target),r=YT(this.spreadsheet,e).operation;return jT(r,{defaultMenus:t,cell:n})},e.prototype.reset=function(){},e}(),CI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.bindEvents=function(){this.bindCornerCellClick()},n.prototype.bindCornerCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.CORNER_CELL_CLICK,(function(n){var r=t.spreadsheet.getCell(n.target);if(r){var A=r.getMeta();switch(null==A?void 0:A.cornerType){case e.CornerNodeType.Row:t.onRowCornerClick(null==A?void 0:A.field,n);break;case e.CornerNodeType.Col:t.onColCornerClick(null==A?void 0:A.field,n);break;case e.CornerNodeType.Series:t.onSeriesCornerClick(null==A?void 0:A.field,n)}}}))},n.prototype.onRowCornerClick=function(e,t){var n=this.getSelectedRowNodes(e);this.selectCells(n,t)},n.prototype.onColCornerClick=function(e,t){var n=this.getSelectedColNodes(e);this.selectCells(n,t)},n.prototype.onSeriesCornerClick=function(e,t){var n=this.spreadsheet.facet.getSeriesNumberNodes();this.selectCells(n,t)},n.prototype.getSelectedRowNodes=function(e){var t=this.spreadsheet.facet;if(this.spreadsheet.isHierarchyTreeType())return t.getRowNodes();if(!this.spreadsheet.isCustomRowFields())return t.getRowNodesByField(e);var n=t.getRowNodesByField(e)[0];return t.getRowNodes(null==n?void 0:n.level)},n.prototype.getSelectedColNodes=function(e){var t=this.spreadsheet.facet;if(!this.spreadsheet.isCustomColumnFields())return t.getColNodesByField(e);var n=t.getColNodesByField(e)[0];return t.getColNodes(null==n?void 0:n.level)},n.prototype.getCellMetas=function(e,t){return e.map((function(e){return{id:e.id,colIndex:-1,rowIndex:-1,type:t}}))},n.prototype.emitSelectEvent=function(t,n){this.spreadsheet.interaction.emitSelectEvent({event:t,targetCell:n,interactionName:e.InteractionName.CORNER_CELL_CLICK})},n.prototype.selectCells=function(t,n){var r,A=this.spreadsheet.interaction,i=null===(r=t[0])||void 0===r?void 0:r.belongsCell,o=this.getCellMetas(t,null==i?void 0:i.cellType),a=this.spreadsheet.getCell(n.target);if(i&&A.isSelectedCell(i))return A.reset(),void this.emitSelectEvent(n,a);lv.isEmpty(t)||lv.isEmpty(o)||(A.addIntercepts([e.InterceptType.HOVER]),A.changeState({cells:o,stateName:e.InteractionStateName.SELECTED}),A.highlightNodes(t,e.InteractionStateName.SELECTED),null==a||a.updateByState(e.InteractionStateName.SELECTED),this.showTooltip(n),this.emitSelectEvent(n,a))},n.prototype.showTooltip=function(e){var t=this.spreadsheet.interaction.getActiveCells(),n=this.getTooltipOperator(e);this.spreadsheet.showTooltipWithInfo(e,[],{operator:n,data:{summaries:[{selectedData:t,name:"",value:null}]}})},n}(yI),BI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.bindEvents=function(){this.bindDataCellClick()},n.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.DATA_CELL_CLICK,(function(n){var r,A;n.stopPropagation();var i=t.spreadsheet.interaction;if(i.clearHoverTimer(),!i.hasIntercepts([e.InterceptType.CLICK]))if(t.isLinkFieldText(n.target))t.emitLinkFieldClickEvent(n);else{var o=t.spreadsheet.getCell(n.target),a=o.getMeta();a&&(i.addIntercepts([e.InterceptType.HOVER]),i.isSelectedCell(o)?(1===n.detail||1===(null===(r=n.nativeEvent)||void 0===r?void 0:r.detail)||1===(null===(A=n.originalEvent)||void 0===A?void 0:A.detail)||Bm())&&(i.reset(),i.emitSelectEvent({event:n,targetCell:o,interactionName:e.InteractionName.DATA_CELL_CLICK})):(i.changeState({cells:[gT(o)],stateName:e.InteractionStateName.SELECTED,onUpdateCells:wT}),i.emitSelectEvent({event:n,targetCell:o,interactionName:e.InteractionName.DATA_CELL_CLICK,cells:[o]}),t.showTooltip(n,a),i.updateDataCellRelevantHeaderCells(e.InteractionStateName.SELECTED,a),t.spreadsheet.emit(e.S2Event.DATA_CELL_CLICK_TRIGGERED_PRIVATE,o)))}}))},n.prototype.showTooltip=function(e,t){var n=t.data,r=t.isTotals,A=void 0!==r&&r,i=t.fieldValue,o=t.valueField,a=this.spreadsheet.isTableMode(),s=[(a?rt(rt({},n),{value:i,valueField:o}):n)||rt(rt({},t.rowQuery),t.colQuery)],l=this.getTooltipOperator(e);this.spreadsheet.showTooltipWithInfo(e,s,{isTotals:A,operator:l,hideSummary:!0,onlyShowCellText:a})},n.prototype.emitLinkFieldClickEvent=function(t){var n=this.getCellAppendInfo(t.target).meta,r=n,A=r.valueField,i=r.data;this.spreadsheet.emit(e.S2Event.GLOBAL_LINK_FIELD_JUMP,{meta:n,field:A,record:Object.assign({rowIndex:null==n?void 0:n.rowIndex},i)})},n}(yI),mI=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.getCellData=function(t){var n,r,A=t.getHeadLeafChild(),i=e.spreadsheet.dataSet.getCellMultiData({query:null==A?void 0:A.query})[0],o=Lx.getFieldValue(i);return rt(rt({},o),{rowIndex:null!==(n=t.rowIndex)&&void 0!==n?n:null==A?void 0:A.rowIndex,colIndex:null!==(r=t.colIndex)&&void 0!==r?r:null==A?void 0:A.colIndex})},e}return nt(n,t),n.prototype.bindEvents=function(){this.bindRowCellClick(),this.bindColCellClick()},n.prototype.onHeaderCellClick=function(t){if(!this.spreadsheet.interaction.hasIntercepts([e.InterceptType.CLICK])&&this.isLinkFieldText(t.target)){var n=this.getCellAppendInfo(t.target).meta,r=n.field,A=this.getCellData(n);this.spreadsheet.emit(e.S2Event.GLOBAL_LINK_FIELD_JUMP,{field:r,meta:n,record:A})}},n.prototype.bindRowCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.ROW_CELL_CLICK,(function(e){t.onHeaderCellClick(e)}))},n.prototype.bindColCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.COL_CELL_CLICK,(function(e){t.onHeaderCellClick(e)}))},n}(yI),wI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.bindEvents=function(){this.bindDataCellClick()},n.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.MERGED_CELLS_CLICK,(function(n){n.stopPropagation();var r=t.spreadsheet.interaction;r.hasIntercepts([e.InterceptType.CLICK])||r.addIntercepts([e.InterceptType.HOVER])}))},n}(yI),EI=function(e,t){var n=window.matchMedia("(orientation: portrait)").matches,r=n?"90vw":"90vh",A=n?"60vw":"60vh";Object.assign(e.style,rt({maxWidth:r,maxHeight:r,minHeight:A,minWidth:A,objectFit:"contain"},t))},xI=function(e){return it(void 0,void 0,void 0,(function(){var t,n,r,A,i,o,a,s;return ot(this,(function(l){switch(l.label){case 0:return t=e.getRenderer(),n=t.type,[4,kB(t.prepareText,e.getFieldValue().toString())];case 1:return r=l.sent(),!1!==t.clickToPreview&&[UB.IMAGE,UB.VIDEO].includes(t.type)?(A=e.getStyle("preview"),i=function(e){var t=document.createElement("div");return Object.assign(t.style,rt({width:"100vw",height:"100vh",position:"fixed",top:"0",left:"0",backgroundColor:"rgba(30, 30, 30, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",zIndex:"9999",cursor:"pointer",touchAction:"none",backdropFilter:"blur(2px)",pointerEvents:"auto"},e)),t.className="".concat(Gv,"-preview-overlay"),t}(null==A?void 0:A.overlay),n!==UB.IMAGE?[3,3]:[4,(u={src:r,mediaContainerStyle:null==A?void 0:A.mediaContainer,config:t},it(void 0,void 0,void 0,(function(){var e,t,n,r;return ot(this,(function(A){switch(A.label){case 0:return e=u.src,t=u.mediaContainerStyle,n=u.config,[4,OB({src:e,fallback:null==n?void 0:n.fallback,timeout:null==n?void 0:n.timeout})];case 1:return r=A.sent(),EI(r,t),r.alt="preview",[2,r]}}))})))]):[2];case 2:return a=l.sent(),[3,4];case 3:a=function(e,t){var n=document.createElement("video");return n.src=e,n.controls=!0,n.preload="auto",n.playsInline=!0,n.setAttribute("webkit-playsinline","true"),n.setAttribute("playsinline","true"),EI(n,t),n}(r,null==A?void 0:A.mediaContainer),l.label=4;case 4:return o=a,s=function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),e.target===i&&(document.body.removeChild(i),o.remove(),document.body.style.overflow="auto")},setTimeout((function(){["click","touchstart","touchend"].forEach((function(e){i.addEventListener(e,s,{passive:!1})}))}),500),document.body.style.overflow="hidden",i.appendChild(o),document.body.appendChild(i),[2]}var u}))}))},SI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.bindEvents=function(){var t=this;[e.S2Event.DATA_CELL_CLICK,e.S2Event.ROW_CELL_CLICK,e.S2Event.COL_CELL_CLICK].forEach((function(e){t.spreadsheet.on(e,(function(e){return t.bindMediaCellClick(e)}))}))},n.prototype.bindMediaCellClick=function(t){var n,r,A,i,o=this.spreadsheet.getCell(t.target);(null===(r=null===(n=null==o?void 0:o.getRenderer)||void 0===n?void 0:n.call(o))||void 0===r?void 0:r.type)===UB.IMAGE&&"image"!==lv.get(t.target,"nodeName")||(null===(i=null===(A=null==o?void 0:o.getRenderer)||void 0===A?void 0:A.call(o))||void 0===i?void 0:i.type)&&(this.spreadsheet.isPivotMode()||o.cellType!==e.CellType.COL_CELL)&&(this.spreadsheet.emit(e.S2Event.GLOBAL_PREVIEW_CLICK,t),xI(o))},n}(yI),TI=function(t){function n(){var n=t.apply(this,lt([],st(arguments),!1))||this;return n.isMultiSelection=!1,n.handleRowColClick=function(t){if(t.stopPropagation(),!n.isLinkFieldText(t.target)){var r=n.spreadsheet,A=r.interaction,i=r.options,o=n.spreadsheet.getCell(t.target);if(!(o instanceof iS)){var a=!(!i.interaction.multiSelection||!n.isMultiSelection),s=o.cellType===e.CellType.ROW_CELL?e.InteractionName.ROW_CELL_MULTI_SELECTION:e.InteractionName.COL_CELL_MULTI_SELECTION,l=o.cellType===e.CellType.ROW_CELL?e.InteractionName.ROW_CELL_CLICK:e.InteractionName.COL_CELL_CLICK;A.changeCell({event:t,cell:o,isMultiSelection:a,interactionName:a?s:l,scrollIntoView:!1})&&n.showTooltip(t)}}},n.getHideColumnField=function(e){var t;return(null===(t=e.extra)||void 0===t?void 0:t.isCustomNode)?e.id:n.spreadsheet.isTableMode()?e.field:e.id},n}return nt(n,t),n.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindKeyboardUp(),this.bindColCellClick(),this.bindRowCellClick(),this.bindTableColExpand(),this.bindMouseMove()},n.prototype.reset=function(){this.isMultiSelection=!1,this.spreadsheet.interaction.removeIntercepts([e.InterceptType.CLICK])},n.prototype.bindKeyboardDown=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_KEYBOARD_DOWN,(function(e){fT(e)&&(t.isMultiSelection=!0)}))},n.prototype.bindKeyboardUp=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_KEYBOARD_UP,(function(e){fT(e)&&t.reset()}))},n.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_MOUSE_MOVE,(function(e){t.isMultiSelection&&!pT(e)&&t.reset()}))},n.prototype.bindRowCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.ROW_CELL_CLICK,(function(e){t.handleRowColClick(e)}))},n.prototype.bindColCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.COL_CELL_CLICK,(function(e){t.handleRowColClick(e)}))},n.prototype.showTooltip=function(e){var t=YT(this.spreadsheet,e),n=t.operation;if(t.enable){var r=this.spreadsheet.interaction,A=r.isSelectedState()?VT(r.getActiveCells()):[],i=this.getHeaderTooltipOperator(e,n);this.spreadsheet.showTooltipWithInfo(e,A,{onlyShowCellText:!0,operator:i})}},n.prototype.getHeaderTooltipOperator=function(t,n){var r=this,A=this.spreadsheet.getCell(t.target),i=A.getMeta(),o=A.cellType===e.CellType.COL_CELL,a=1===this.spreadsheet.facet.getColLeafNodes().length,s=KC(),l=o&&!a&&i.isLeaf&&n.hiddenColumns,u=rt(rt({},s),{onClick:function(){r.hideSelectedColumns()}}),c=l?[u]:[];return this.getTooltipOperator(t,c)},n.prototype.bindTableColExpand=function(){var t=this;this.spreadsheet.on(e.S2Event.COL_CELL_EXPANDED,(function(e,n){t.handleExpandIconClick(e,n)}))},n.prototype.hideSelectedColumns=function(){return it(this,void 0,void 0,(function(){var e,t,n;return ot(this,(function(r){switch(r.label){case 0:return e=this.spreadsheet.interaction,t=e.getActiveCells().map((function(e){return e.getMeta()})),n=t.map(this.getHideColumnField),[4,dw(this.spreadsheet,n,!0)];case 1:return r.sent(),[2]}}))}))},n.prototype.handleExpandIconClick=function(e,t){return it(this,void 0,void 0,(function(){var n,r,A,i,o,a,s;return ot(this,(function(l){switch(l.label){case 0:return n=this.spreadsheet.store.get("hiddenColumnsDetail",[]),r=(lv.findLast(n,(function(n){var r=n.displaySiblingNode;return fw(r,e.id,t)}))||{}).hideColumnNodes,A=void 0===r?[]:r,i=this.spreadsheet.options.interaction.hiddenColumnFields,o=A.map(this.getHideColumnField),a=lv.difference(i,o),s=n.filter((function(n){var r=n.displaySiblingNode;return!fw(r,e.id,t)})),this.spreadsheet.setOptions({interaction:{hiddenColumnFields:a}}),this.spreadsheet.store.set("hiddenColumnsDetail",s),this.spreadsheet.interaction.reset(),[4,this.spreadsheet.render({reloadData:!1,rebuildHiddenColumnsDetail:!1})];case 1:return l.sent(),[2]}}))}))},n}(yI),FI=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.bindEvents=function(){this.bindDataCellHover(),this.bindHeaderCellHover()},n.prototype.changeStateToHoverFocus=function(t,n){var r,A=this;if(t){var i=t.getMeta(),o=this.spreadsheet.interaction,a=this.spreadsheet.options.interaction,s=a.hoverFocus;o.clearHoverTimer();var l=function(){if(!o.hasIntercepts([e.InterceptType.HOVER])){o.changeState({cells:[gT(t)],stateName:e.InteractionStateName.HOVER_FOCUS});var r=A.spreadsheet.isTableMode(),s={isTotals:i.isTotals,hideSummary:!0,onlyShowCellText:r};(null==a?void 0:a.hoverHighlight)&&o.updateDataCellRelevantHeaderCells(e.InteractionStateName.HOVER,i),A.spreadsheet.emit(e.S2Event.DATA_CELL_HOVER_TRIGGERED_PRIVATE,t);var l=A.getCellData(i,r);A.spreadsheet.showTooltipWithInfo(n,l,s)}},u=lv.isBoolean(s)?my:null!==(r=null==s?void 0:s.duration)&&void 0!==r?r:my;if(0===u)l();else{var c=window.setTimeout((function(){return l()}),u);o.setHoverTimer(c)}}},n.prototype.handleHeaderHover=function(t){var n,r=this.spreadsheet.getCell(t.target);if(!lv.isEmpty(r)){var A=this.spreadsheet,i=A.interaction,o=A.facet;i.clearHoverTimer(),i.isActiveCell(r)||(i.changeState({cells:[gT(r)],stateName:e.InteractionStateName.HOVER}),r.update(),this.showEllipsisTooltip(t,r),null===(n=o.centerFrame)||void 0===n||n.toFront())}},n.prototype.showEllipsisTooltip=function(e,t){if(t&&t.isTextOverflowing()){var n=t.getMeta(),r={isTotals:n.isTotals,hideSummary:!0,onlyShowCellText:!0,enableFormat:!0},A=this.getCellData(n,r.onlyShowCellText);this.spreadsheet.showTooltipWithInfo(e,A,r)}else this.spreadsheet.hideTooltip()},n.prototype.getCellData=function(e,t){void 0===e&&(e={});var n=e.data,r=e.query,A=e.value,i=e.field,o=e.fieldValue,a=e.valueField,s=e.rowQuery,l=e.colQuery,u=n;return t?[rt(rt({},r),{value:A||o,valueField:i||a})]:[u||rt(rt({},s),l)]},n.prototype.bindDataCellHover=function(){var t=this;this.spreadsheet.on(e.S2Event.DATA_CELL_HOVER,(function(n){var r=t.spreadsheet.getCell(n.target);if(!lv.isEmpty(r)){var A=t.spreadsheet,i=A.interaction,o=A.options;if(!i.isActiveCell(r)){var a=o.interaction,s=null==r?void 0:r.getMeta();i.changeState({cells:[gT(r)],stateName:e.InteractionStateName.HOVER}),(null==a?void 0:a.hoverHighlight)&&i.updateDataCellRelevantHeaderCells(e.InteractionStateName.HOVER,s),(null==a?void 0:a.hoverFocus)&&t.changeStateToHoverFocus(r,n),t.spreadsheet.emit(e.S2Event.DATA_CELL_HOVER_TRIGGERED_PRIVATE,r)}}}))},n.prototype.bindHeaderCellHover=function(){var t=this;[e.S2Event.ROW_CELL_HOVER,e.S2Event.COL_CELL_HOVER,e.S2Event.CORNER_CELL_HOVER].forEach((function(e){t.spreadsheet.on(e,(function(e){t.handleHeaderHover(e)}))}))},n}(yI),bI=function(t){function n(){var n=t.apply(this,lt([],st(arguments),!1))||this;return n.displayedCells=[],n.brushRangeCells=[],n.brushSelectionStage=e.InteractionBrushSelectionStage.UN_DRAGGED,n.brushSelectionMinimumMoveDistance=5,n.scrollAnimationComplete=!0,n.mouseMoveDistanceFromCanvas=0,n.setMoveDistanceFromCanvas=function(e,t,r){var A=0;if(t&&(A=e.x),r){var i=e.y;A=t?Math.max(i,A):i}n.mouseMoveDistanceFromCanvas=Math.abs(A)},n.formatBrushPointForScroll=function(e,t){var r,A,i,o;void 0===t&&(t=!1);var a=e.x,s=e.y,l=n.spreadsheet.facet,u=t?l.cornerBBox:l.panelBBox,c=u.minX,h=u.maxX,d=l.panelBBox,f=d.minY,p=d.maxY,g=(null===(r=n.endBrushPoint)||void 0===r?void 0:r.x)+a,v=(null===(A=n.endBrushPoint)||void 0===A?void 0:A.y)+s,y=t?!!l.hRowScrollBar:!!l.hScrollBar,C=!!l.vScrollBar,B=null===(o=null===(i=l.vScrollBar)||void 0===i?void 0:i.getBBox())||void 0===o?void 0:o.width;return g>h?g=h-B-2:g<c?g=c+2:y=!1,v>p?v=p-2:v<=f?v=f+2:C=!1,{x:{value:g,needScroll:y},y:{value:v,needScroll:C}}},n.autoScrollIntervalId=null,n.rectanglesIntersect=function(e,t){return e.maxX>t.minX&&e.minX<t.maxX&&e.minY<t.maxY&&e.maxY>t.minY},n.autoScrollConfig=lv.cloneDeep(by),n.validateYIndex=function(e){var t,r,A=n.spreadsheet.facet,i=A.frozenGroupAreas,o=0,a=null===(t=null==i?void 0:i.frozenRow)||void 0===t?void 0:t.range;if((null==a?void 0:a[1])&&(o=a[1]+1),e<o)return null;var s=A.getCellRange().end,l=null===(r=null==i?void 0:i.frozenTrailingRow)||void 0===r?void 0:r.range;return(null==l?void 0:l[0])&&(s=l[0]-1),e>s?null:e},n.validateXIndex=function(t){var r=n.spreadsheet.facet,A=r.frozenGroupAreas,i=0,o=A[e.FrozenGroupArea.Col].range;if((null==o?void 0:o[1])&&(i=o[1]+1),t<i)return null;var a=r.getColLeafNodes().length-1,s=A[e.FrozenGroupArea.TrailingCol].range;return(null==s?void 0:s[0])&&(a=s[0]-1),t>a?null:t},n.adjustNextColIndexWithFrozen=function(t,r){var A=n.spreadsheet.facet,i=A.getColLeafNodes().length,o=A.getFrozenOptions(),a=o.colCount,s=o.trailingColCount,l=A.panelScrollGroupIndexes;return a>0&&r===e.ScrollDirection.SCROLL_UP&&Wm(t,a)?l[0]:s>0&&r===e.ScrollDirection.SCROLL_DOWN&&Xm(t,s,i)?l[1]:t},n.adjustNextRowIndexWithFrozen=function(t,r){var A=n.spreadsheet.facet,i=A.getCellRange(),o=A.getFrozenOptions(),a=o.rowCount,s=o.trailingRowCount,l=A.panelScrollGroupIndexes;return a>0&&r===e.ScrollDirection.SCROLL_UP&&Ym(t,i.start,a)?l[2]:s>0&&r===e.ScrollDirection.SCROLL_DOWN&&jm(t,i.end,s)?l[3]:t},n.getWillScrollRowIndexDiff=function(t){return t===e.ScrollDirection.SCROLL_DOWN?e.ScrollDirectionRowIndexDiff.SCROLL_DOWN:e.ScrollDirectionRowIndexDiff.SCROLL_UP},n.getDefaultWillScrollToRowIndex=function(e){var t=n.adjustNextRowIndexWithFrozen(n.endBrushPoint.rowIndex,e)+n.getWillScrollRowIndexDiff(e);return n.validateYIndex(t)},n.getWillScrollToRowIndex=function(e){return n.getDefaultWillScrollToRowIndex(e)},n.getNextScrollDelta=function(t){var r=n.spreadsheet.facet.getScrollOffset(),A=r.scrollX,i=void 0===A?0:A,o=r.scrollY,a=void 0===o?0:o,s=0,l=0;if(t.y.scroll){var u=t.y.value>0?e.ScrollDirection.SCROLL_DOWN:e.ScrollDirection.SCROLL_UP,c=n.getWillScrollToRowIndex(u);if(lv.isNil(c))l=0;else{var h=dT(c,u,n.spreadsheet)-a;l=lv.isNil(h)||Number.isNaN(h)?0:h}}if(t.x.scroll){u=t.x.value>0?e.ScrollDirection.SCROLL_DOWN:e.ScrollDirection.SCROLL_UP;var d=n.adjustNextColIndexWithFrozen(n.endBrushPoint.colIndex,u),f=n.validateXIndex(d+(t.x.value>0?1:-1));s=lv.isNil(f)?0:hT(f,u,n.spreadsheet)-i}return{x:s,y:l}},n.onScrollAnimationComplete=function(){n.scrollAnimationComplete=!0,n.brushSelectionStage!==e.InteractionBrushSelectionStage.UN_DRAGGED&&n.renderPrepareSelected(n.endBrushPoint)},n.autoScroll=function(t){if(void 0===t&&(t=!1),n.brushSelectionStage!==e.InteractionBrushSelectionStage.UN_DRAGGED&&n.scrollAnimationComplete){var r=n.autoScrollConfig,A=n.spreadsheet.facet.getScrollOffset(),i=t?"rowHeaderOffsetX":"offsetX",o={rowHeaderOffsetX:{value:A.rowHeaderScrollX,animate:!0},offsetX:{value:A.scrollX,animate:!0},offsetY:{value:A.scrollY,animate:!0}},a=n.getNextScrollDelta(r),s=a.x,l=a.y;if(0!==l||0!==s){if(r.y.scroll&&(o.offsetY.value+=l),r.x.scroll){var u=o[i];u.value+=s,u.value<0&&(u.value=0)}n.scrollAnimationComplete=!1;var c=r.x.scroll?1:3,h=Math.max(16,300-n.mouseMoveDistanceFromCanvas*c);n.spreadsheet.facet.scrollWithAnimation(o,h,n.onScrollAnimationComplete)}else n.clearAutoScroll()}},n.handleScroll=lv.throttle((function(t,r,A){if(void 0===A&&(A=!1),n.brushSelectionStage!==e.InteractionBrushSelectionStage.UN_DRAGGED){var i=n.formatBrushPointForScroll({x:t,y:r},A),o=i.x,a=o.value,s=o.needScroll,l=i.y,u=l.value,c=l.needScroll,h=n.autoScrollConfig;c&&(h.y.value=r,h.y.scroll=!0),s&&(h.x.value=t,h.x.scroll=!0),n.setMoveDistanceFromCanvas({x:t,y:r},s,c),n.renderPrepareSelected({x:a,y:u}),(c||s)&&(n.clearAutoScroll(),n.autoScroll(A),n.autoScrollIntervalId=setInterval((function(){n.autoScroll(A)}),16))}}),30),n.clearAutoScroll=function(){n.autoScrollIntervalId&&(clearInterval(n.autoScrollIntervalId),n.autoScrollIntervalId=null,n.resetScrollDelta())},n.onUpdateCells=function(e,t){return t()},n.showPrepareSelectedCells=function(){n.brushRangeCells=n.getBrushRangeCells(),n.spreadsheet.interaction.changeState({cells:lv.map(n.brushRangeCells,(function(e){return gT(e)})),stateName:e.InteractionStateName.PREPARE_SELECT,force:!0,onUpdateCells:n.onUpdateCells})},n.renderPrepareSelected=function(t){var r=t.x,A=t.y,i=n.spreadsheet.container.document.elementsFromPointSync(r,A).map((function(e){return n.spreadsheet.getCell(e)})).find(Boolean);if(i&&(i instanceof Jx||i instanceof AS||i instanceof jx)){var o=i.getMeta(),a=o.rowIndex,s=o.colIndex;n.endBrushPoint={x:r,y:A,rowIndex:a,colIndex:s};var l=n.spreadsheet.interaction;l.addIntercepts([e.InterceptType.HOVER]),l.clearStyleIndependent(),n.isValidBrushSelection()&&(n.showPrepareSelectedCells(),n.updatePrepareSelectMask())}},n}return nt(n,t),n.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},n.prototype.getPrepareSelectMaskTheme=function(){var e;return null===(e=this.spreadsheet.theme)||void 0===e?void 0:e.prepareSelectMask},n.prototype.initPrepareSelectMaskShape=function(){var e,t=this.spreadsheet.facet.foregroundGroup;if(t){null===(e=this.prepareSelectMaskShape)||void 0===e||e.remove();var n=this.getPrepareSelectMaskTheme();this.prepareSelectMaskShape=t.appendChild(new Ss({style:{width:0,height:0,x:0,y:0,fill:null==n?void 0:n.backgroundColor,fillOpacity:null==n?void 0:n.backgroundOpacity,zIndex:5,visibility:"hidden",pointerEvents:"none"}}))}},n.prototype.setBrushSelectionStage=function(e){this.brushSelectionStage=e},n.prototype.isPointInCanvas=function(e){var t=this.spreadsheet.facet.getCanvasSize(),n=t.height,r=t.width,A=this.spreadsheet.facet.panelBBox,i=A.minX,o=A.minY;return(null==e?void 0:e.x)>i&&(null==e?void 0:e.x)<r&&(null==e?void 0:e.y)>o&&(null==e?void 0:e.y)<n},n.prototype.resetDrag=function(){this.hidePrepareSelectMaskShape(),this.setBrushSelectionStage(e.InteractionBrushSelectionStage.UN_DRAGGED)},n.prototype.isValidBrushSelection=function(){var e=this.getBrushRange(),t=e.start,n=e.end;return n.x-t.x>this.brushSelectionMinimumMoveDistance||n.y-t.y>this.brushSelectionMinimumMoveDistance},n.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.facet.getDataCells()},n.prototype.updatePrepareSelectMask=function(){var e=this.getBrushRange(),t=this.getPrepareSelectMaskPosition(e),n=t.x,r=t.y;this.prepareSelectMaskShape.attr({x:n,y:r,width:e.width,height:e.height}),this.prepareSelectMaskShape.setAttribute("visibility","visible")},n.prototype.hidePrepareSelectMaskShape=function(){var e;null===(e=this.prepareSelectMaskShape)||void 0===e||e.setAttribute("visibility","hidden")},n.prototype.resetScrollDelta=function(){this.autoScrollConfig=lv.cloneDeep(by)},n.prototype.getBrushPoint=function(e){var t=this.spreadsheet.facet.getScrollOffset(),n=t.scrollY,r=t.scrollX,A={x:null==e?void 0:e.x,y:null==e?void 0:e.y},i=this.spreadsheet.getCell(e.target).getMeta(),o=i.colIndex,a=i.rowIndex;return rt(rt({},A),{rowIndex:a,colIndex:o,scrollY:n,scrollX:r})},n.prototype.getBrushRange=function(){var e,t,n,r,A,i,o,a,s=this.spreadsheet.facet.getScrollOffset(),l=s.scrollX,u=void 0===l?0:l,c=s.scrollY,h=void 0===c?0:c,d=Math.min(this.startBrushPoint.rowIndex,null===(e=this.endBrushPoint)||void 0===e?void 0:e.rowIndex),f=Math.max(this.startBrushPoint.rowIndex,null===(t=this.endBrushPoint)||void 0===t?void 0:t.rowIndex),p=Math.min(this.startBrushPoint.colIndex,null===(n=this.endBrushPoint)||void 0===n?void 0:n.colIndex),g=Math.max(this.startBrushPoint.colIndex,null===(r=this.endBrushPoint)||void 0===r?void 0:r.colIndex),v=this.startBrushPoint.x+this.startBrushPoint.scrollX-u,y=this.startBrushPoint.y+this.startBrushPoint.scrollY-h,C=Math.min(v,null===(A=this.endBrushPoint)||void 0===A?void 0:A.x),B=Math.max(v,null===(i=this.endBrushPoint)||void 0===i?void 0:i.x),m=Math.min(y,null===(o=this.endBrushPoint)||void 0===o?void 0:o.y),w=Math.max(y,null===(a=this.endBrushPoint)||void 0===a?void 0:a.y);return{start:{rowIndex:d,colIndex:p,x:C,y:m},end:{rowIndex:f,colIndex:g,x:B,y:w},width:B-C,height:w-m}},n.prototype.getBrushRangeCells=function(){var e=this;return this.setDisplayedCells(),this.displayedCells.filter((function(t){var n=t.getMeta();return e.isInBrushRange(n)}))},n.prototype.mouseDown=function(t){var n;null===(n=null==t?void 0:t.preventDefault)||void 0===n||n.call(t),this.spreadsheet.interaction.hasIntercepts([e.InterceptType.CLICK])||(this.setBrushSelectionStage(e.InteractionBrushSelectionStage.CLICK),this.initPrepareSelectMaskShape(),this.setDisplayedCells(),this.startBrushPoint=this.getBrushPoint(t))},n.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([e.InterceptType.DATA_CELL_BRUSH_SELECTION])},n.prototype.bindMouseUp=function(t){var n=this;void 0===t&&(t=!1),this.spreadsheet.on(e.S2Event.GLOBAL_MOUSE_UP,(function(r){if(n.brushSelectionStage===e.InteractionBrushSelectionStage.DRAGGED){if(t&&n.clearAutoScroll(),n.isValidBrushSelection()){n.addBrushIntercepts(),n.updateSelectedCells(r);var A=WT(n.spreadsheet);n.spreadsheet.showTooltipWithInfo(r,A)}n.spreadsheet.interaction.getCurrentStateName()===e.InteractionStateName.PREPARE_SELECT&&n.spreadsheet.interaction.reset(),n.resetDrag()}else n.resetDrag()})),this.spreadsheet.on(e.S2Event.GLOBAL_CONTEXT_MENU,(function(){n.brushSelectionStage!==e.InteractionBrushSelectionStage.UN_DRAGGED&&(n.spreadsheet.interaction.removeIntercepts([e.InterceptType.HOVER]),n.resetDrag())}))},n.prototype.autoBrushScroll=function(e,t){var n,r;if(void 0===t&&(t=!1),this.clearAutoScroll(),!this.isPointInCanvas(e)){var A=(null==e?void 0:e.x)-(null===(n=this.endBrushPoint)||void 0===n?void 0:n.x),i=(null==e?void 0:e.y)-(null===(r=this.endBrushPoint)||void 0===r?void 0:r.y);return this.handleScroll(A,i,t),!0}return!1},n.prototype.emitBrushSelectionEvent=function(t,n,r){this.spreadsheet.emit(t,n,r),this.spreadsheet.emit(e.S2Event.GLOBAL_SELECTED,n,r),lv.isEmpty(n)&&this.spreadsheet.interaction.removeIntercepts([e.InterceptType.HOVER])},n.prototype.getVisibleBrushRangeCells=function(e){return this.brushRangeCells.find((function(t){var n=t.getMeta();return(null==n?void 0:n.id)===e}))},n.prototype.isInBrushRange=function(e){return!1},n.prototype.bindMouseDown=function(){},n.prototype.bindMouseMove=function(){},n.prototype.updateSelectedCells=function(e){},n.prototype.getPrepareSelectMaskPosition=function(e){return{x:e.start.x,y:e.start.y}},n}(yI),II=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.displayedCells=[],e.brushRangeCells=[],e.onUpdateCells=function(t){return t.updateCells(e.spreadsheet.facet.getColCells())},e}return nt(n,t),n.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},n.prototype.bindMouseDown=function(){var n=this;this.spreadsheet.on(e.S2Event.COL_CELL_MOUSE_DOWN,(function(e){n.spreadsheet.interaction.getBrushSelection().colCell&&t.prototype.mouseDown.call(n,e)}))},n.prototype.isPointInCanvas=function(e){var t=this.spreadsheet.facet.getCanvasSize().width,n=this.spreadsheet.facet.cornerBBox,r=n.width,A=n.minY,i=n.maxY;return e.x>=r&&e.x<=t&&e.y>=A&&e.y<=i},n.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(e.S2Event.COL_CELL_MOUSE_MOVE,(function(n){var r;if(t.brushSelectionStage!==e.InteractionBrushSelectionStage.UN_DRAGGED){t.setBrushSelectionStage(e.InteractionBrushSelectionStage.DRAGGED);var A=null===(r=t.spreadsheet.interaction.eventController)||void 0===r?void 0:r.getViewportPoint(n);t.isPointInCanvas(A)&&t.renderPrepareSelected(A)}}))},n.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.facet.getColCells()},n.prototype.isInBrushRange=function(e){var t=this.getBrushRange(),n=t.start,r=t.end,A=this.spreadsheet.facet.getScrollOffset().scrollX,i=void 0===A?0:A,o=this.spreadsheet.facet.cornerBBox,a=e.x,s=void 0===a?0:a,l=e.y,u=void 0===l?0:l,c=e.width,h=void 0===c?0:c,d=e.height,f=void 0===d?0:d;return this.rectanglesIntersect({minX:n.x-o.width+i,minY:n.y,maxX:r.x-o.width+i,maxY:r.y},{minX:s,maxX:s+h,minY:u,maxY:u+f})},n.prototype.updateSelectedCells=function(t){var n=this.spreadsheet,r=n.interaction,A=n.facet;r.changeState({cells:lv.map(this.brushRangeCells,gT),onUpdateCells:function(e){e.updateCells(A.getColCells())},stateName:e.InteractionStateName.COL_CELL_BRUSH_SELECTED}),this.emitBrushSelectionEvent(e.S2Event.COL_CELL_BRUSH_SELECTION,this.brushRangeCells,{event:t,targetCell:this.brushRangeCells[0],interactionName:e.InteractionName.COL_CELL_BRUSH_SELECTION})},n.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([e.InterceptType.COL_CELL_BRUSH_SELECTION])},n}(bI),LI=function(t){function n(){var n=t.apply(this,lt([],st(arguments),!1))||this;return n.displayedCells=[],n.brushRangeCells=[],n.getSelectedCellMetas=function(t){var r=n.spreadsheet.facet,A=[],i=r.getRowLeafNodes(),o=r.getColLeafNodes(),a=lv.range(t.start.rowIndex,t.end.rowIndex+1),s=lv.range(t.start.colIndex,t.end.colIndex+1);return a.forEach((function(t){s.forEach((function(r){var a=String(o[r].id),s=lv.isEmpty(i)?String(t):String(i[t].id);A.push({colIndex:r,rowIndex:t,id:Bw(s,a),type:e.CellType.DATA_CELL,rowId:s,colId:a,spreadsheet:n.spreadsheet})}))})),A},n}return nt(n,t),n.prototype.bindMouseDown=function(){var n=this;this.spreadsheet.on(e.S2Event.DATA_CELL_MOUSE_DOWN,(function(e){n.spreadsheet.interaction.getBrushSelection().dataCell&&(t.prototype.mouseDown.call(n,e),n.resetScrollDelta())}))},n.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_MOUSE_MOVE,(function(n){if(t.brushSelectionStage!==e.InteractionBrushSelectionStage.UN_DRAGGED){t.setBrushSelectionStage(e.InteractionBrushSelectionStage.DRAGGED);var r=t.spreadsheet.interaction.eventController.getViewportPoint(n);t.autoBrushScroll(r)||t.renderPrepareSelected(r)}}))},n.prototype.isInBrushRange=function(e){var t=this.getBrushRange(),n=t.start,r=t.end,A=e.rowIndex,i=e.colIndex;return A>=n.rowIndex&&A<=r.rowIndex&&i>=n.colIndex&&i<=r.colIndex},n.prototype.updateSelectedCells=function(t){var n=this.getBrushRange(),r=this.getSelectedCellMetas(n);this.spreadsheet.interaction.changeState({cells:r,stateName:e.InteractionStateName.DATA_CELL_BRUSH_SELECTED,onUpdateCells:wT});var A=this.getScrollBrushRangeCells(r);this.emitBrushSelectionEvent(e.S2Event.DATA_CELL_BRUSH_SELECTION,A,{event:t,targetCell:A[0],interactionName:e.InteractionName.DATA_CELL_BRUSH_SELECTION})},n.prototype.getScrollBrushRangeCells=function(e){var t=this;return e.map((function(e){var n=t.getVisibleBrushRangeCells(e.id);if(n)return n;var r=t.spreadsheet.facet.getCellMeta(e.rowIndex,e.colIndex);return t.spreadsheet.facet.createDataCell(r)}))},n.prototype.bindMouseUp=function(){t.prototype.bindMouseUp.call(this,!0)},n.prototype.getPrepareSelectMaskPosition=function(e){var t=this.spreadsheet.facet.panelBBox,n=t.minX,r=t.minY;return{x:Math.max(e.start.x,n),y:Math.max(e.start.y,r)}},n}(bI),QI=function(t){function n(){var n=t.apply(this,lt([],st(arguments),!1))||this;return n.displayedCells=[],n.brushRangeCells=[],n.isInBrushRange=function(e){var t=n.getBrushRange(),r=t.start,A=t.end,i=n.spreadsheet.facet.getScrollOffset(),o=i.scrollY,a=i.rowHeaderScrollX,s=n.spreadsheet.facet.cornerBBox,l=e.x,u=void 0===l?0:l,c=e.y,h=void 0===c?0:c,d=e.width,f=void 0===d?0:d,p=e.height,g=void 0===p?0:p;return n.rectanglesIntersect({minX:r.x+a,minY:r.y-s.height+o,maxX:A.x+a,maxY:A.y-s.height+o},{minX:u,maxX:u+f,minY:h,maxY:h+g})},n.onUpdateCells=function(e){return e.updateCells(n.spreadsheet.facet.getRowCells())},n.getSelectedRowNodes=function(){return n.spreadsheet.facet.getRowNodes().filter(n.isInBrushRange)},n.getVisibleRowLeafCellByScrollDirection=function(t){var r=n.spreadsheet.facet.getRowCells();return t===e.ScrollDirection.SCROLL_DOWN?lv.last(r):r.find((function(e){return e.getMeta().isLeaf}))},n.getWillScrollToRowIndex=function(e){var t,r;if(!lv.isNil(n.endBrushPoint.rowIndex))return n.getDefaultWillScrollToRowIndex(e);var A=n.getVisibleRowLeafCellByScrollDirection(e),i=(null!==(r=null===(t=null==A?void 0:A.getMeta())||void 0===t?void 0:t.rowIndex)&&void 0!==r?r:0)+n.getWillScrollRowIndexDiff(e);return n.validateYIndex(i)},n}return nt(n,t),n.prototype.bindMouseDown=function(){var n=this;this.spreadsheet.on(e.S2Event.ROW_CELL_MOUSE_DOWN,(function(e){n.spreadsheet.interaction.getBrushSelection().rowCell&&t.prototype.mouseDown.call(n,e)}))},n.prototype.isPointInCanvas=function(e){var t=this.spreadsheet.facet.getCanvasSize().height,n=this.spreadsheet.facet.cornerBBox,r=n.minX,A=n.height,i=n.maxX;return e.x>=r&&e.x<=i&&e.y>=A&&e.y<=t},n.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_MOUSE_MOVE,(function(n){if(t.brushSelectionStage!==e.InteractionBrushSelectionStage.UN_DRAGGED){t.setBrushSelectionStage(e.InteractionBrushSelectionStage.DRAGGED);var r=t.spreadsheet.interaction.eventController.getViewportPoint(n);t.autoBrushScroll(r,!0)||t.renderPrepareSelected(r)}}))},n.prototype.setDisplayedCells=function(){this.displayedCells=this.spreadsheet.facet.getRowCells()},n.prototype.updateSelectedCells=function(t){var n=this.getSelectedRowNodes(),r=this.getScrollBrushRangeCells(n),A=lv.map(r,gT);this.spreadsheet.interaction.changeState({cells:A,stateName:e.InteractionStateName.ROW_CELL_BRUSH_SELECTED,onUpdateCells:this.onUpdateCells}),this.emitBrushSelectionEvent(e.S2Event.ROW_CELL_BRUSH_SELECTION,r,{event:t,targetCell:r[0],interactionName:e.InteractionName.ROW_CELL_BRUSH_SELECTION})},n.prototype.addBrushIntercepts=function(){this.spreadsheet.interaction.addIntercepts([e.InterceptType.ROW_CELL_BRUSH_SELECTION])},n.prototype.getScrollBrushRangeCells=function(e){var t=this;return e.map((function(e){var n=t.getVisibleBrushRangeCells(e.id);return n||t.spreadsheet.facet.rowHeader.getCellInstance(e)}))},n.prototype.getPrepareSelectMaskPosition=function(e){var t=this.spreadsheet.facet.panelBBox.minY;return{x:e.start.x,y:Math.max(e.start.y,t)}},n}(bI),UI=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.isMultiSelection=!1,e}return nt(n,t),n.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindKeyboardUp(),this.bindMouseMove()},n.prototype.reset=function(){this.isMultiSelection=!1,this.spreadsheet.interaction.removeIntercepts([e.InterceptType.CLICK])},n.prototype.bindKeyboardDown=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_KEYBOARD_DOWN,(function(n){fT(n)&&(t.isMultiSelection=!0,t.spreadsheet.interaction.addIntercepts([e.InterceptType.CLICK]))}))},n.prototype.bindKeyboardUp=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_KEYBOARD_UP,(function(e){fT(e)&&t.reset()}))},n.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_MOUSE_MOVE,(function(e){t.isMultiSelection&&!pT(e)&&t.reset()}))},n.prototype.getSelectedCells=function(t){var n=t.getMeta().id,r=this.spreadsheet.interaction,A=r.getCells([e.CellType.DATA_CELL]);return r.getCurrentStateName()!==e.InteractionStateName.SELECTED&&(A=[]),A.find((function(e){return e.id===n}))?A.filter((function(e){return e.id!==n})):lt(lt([],st(A),!1),[gT(t)],!1)},n.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.DATA_CELL_CLICK,(function(n){n.stopPropagation();var r=t.spreadsheet.getCell(n.target),A=r.getMeta(),i=t.spreadsheet.interaction;if(t.isMultiSelection&&A){var o=t.getSelectedCells(r);if(lv.isEmpty(o))return i.clearState(),t.spreadsheet.hideTooltip(),void i.emitSelectEvent({event:n,targetCell:r,interactionName:e.InteractionName.DATA_CELL_MULTI_SELECTION});i.addIntercepts([e.InterceptType.CLICK,e.InterceptType.HOVER]),t.spreadsheet.hideTooltip(),i.changeState({cells:o,stateName:e.InteractionStateName.SELECTED,onUpdateCells:wT}),i.emitSelectEvent({event:n,targetCell:r,interactionName:e.InteractionName.DATA_CELL_MULTI_SELECTION}),t.spreadsheet.showTooltipWithInfo(n,WT(t.spreadsheet))}}))},n}(yI),RI=function(){function t(t){var n=this;this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[],this.isCanvasEffect=!1,this.onScroll=lv.throttle((function(){n.spreadsheet.hideTooltip()}),16),this.isGuiIconShape=function(e){return e instanceof rB&&e.imgType===gB.type},this.isConditionIconShape=function(e,t){return t.getConditionIconShapes().some((function(t){var n;return(null==t?void 0:t.name)===(null===(n=null==e?void 0:e.attributes)||void 0===n?void 0:n.name)}))},this.onCanvasMousedown=function(t){if(n.target=t.target,n.spreadsheet.interaction.clearHoverTimer(),n.isResizeArea(t)){n.spreadsheet.emit(e.S2Event.LAYOUT_RESIZE_MOUSE_DOWN,t);var r=function(t){if(!n.spreadsheet.getCanvasElement())return!1;n.spreadsheet.getCanvasElement()!==t.target&&n.spreadsheet.emit(e.S2Event.LAYOUT_RESIZE_MOUSE_MOVE,t)};return window.addEventListener(e.OriginEventType.POINTER_MOVE,r),void window.addEventListener(e.OriginEventType.POINTER_UP,(function(){window.removeEventListener(e.OriginEventType.POINTER_MOVE,r)}),{once:!0})}switch(n.spreadsheet.getCellType(t.target)){case e.CellType.DATA_CELL:n.spreadsheet.emit(e.S2Event.DATA_CELL_MOUSE_DOWN,t);break;case e.CellType.ROW_CELL:n.spreadsheet.emit(e.S2Event.ROW_CELL_MOUSE_DOWN,t);break;case e.CellType.COL_CELL:n.spreadsheet.emit(e.S2Event.COL_CELL_MOUSE_DOWN,t);break;case e.CellType.CORNER_CELL:n.spreadsheet.emit(e.S2Event.CORNER_CELL_MOUSE_DOWN,t);break;case e.CellType.MERGED_CELL:n.spreadsheet.emit(e.S2Event.MERGED_CELLS_MOUSE_DOWN,t)}},this.onCanvasMousemove=function(t){if(n.canvasMousemoveEvent=t,n.isResizeArea(t))return n.activeResizeArea(t),void n.spreadsheet.emit(e.S2Event.LAYOUT_RESIZE_MOUSE_MOVE,t.nativeEvent);n.resetResizeArea();var r=n.spreadsheet.getCell(t.target);if(r){var A=r.cellType;switch(A){case e.CellType.DATA_CELL:n.spreadsheet.emit(e.S2Event.DATA_CELL_MOUSE_MOVE,t);break;case e.CellType.ROW_CELL:n.spreadsheet.emit(e.S2Event.ROW_CELL_MOUSE_MOVE,t);break;case e.CellType.COL_CELL:n.spreadsheet.emit(e.S2Event.COL_CELL_MOUSE_MOVE,t);break;case e.CellType.CORNER_CELL:n.spreadsheet.emit(e.S2Event.CORNER_CELL_MOUSE_MOVE,t);break;case e.CellType.MERGED_CELL:n.spreadsheet.emit(e.S2Event.MERGED_CELLS_MOUSE_MOVE,t)}if(!n.hasBrushSelectionIntercepts())switch(n.spreadsheet.emit(e.S2Event.GLOBAL_HOVER,t),A){case e.CellType.DATA_CELL:n.spreadsheet.emit(e.S2Event.DATA_CELL_HOVER,t);break;case e.CellType.ROW_CELL:n.spreadsheet.emit(e.S2Event.ROW_CELL_HOVER,t);break;case e.CellType.COL_CELL:n.spreadsheet.emit(e.S2Event.COL_CELL_HOVER,t);break;case e.CellType.CORNER_CELL:n.spreadsheet.emit(e.S2Event.CORNER_CELL_HOVER,t);break;case e.CellType.MERGED_CELL:n.spreadsheet.emit(e.S2Event.MERGED_CELLS_HOVER,t)}}},this.onCanvasMouseup=function(t){if(n.isResizeArea(t))n.spreadsheet.emit(e.S2Event.LAYOUT_RESIZE_MOUSE_UP,t);else{var r=n.spreadsheet.getCell(t.target);if(r){switch(r.cellType){case e.CellType.DATA_CELL:n.spreadsheet.emit(e.S2Event.DATA_CELL_MOUSE_UP,t);break;case e.CellType.ROW_CELL:n.spreadsheet.emit(e.S2Event.ROW_CELL_MOUSE_UP,t);break;case e.CellType.COL_CELL:n.spreadsheet.emit(e.S2Event.COL_CELL_MOUSE_UP,t);break;case e.CellType.CORNER_CELL:n.spreadsheet.emit(e.S2Event.CORNER_CELL_MOUSE_UP,t);break;case e.CellType.MERGED_CELL:n.spreadsheet.emit(e.S2Event.MERGED_CELLS_MOUSE_UP,t)}Bm()&&n.onCanvasSingleClick(t)}}},this.onCanvasClick=function(t){var r=n.spreadsheet;if(1!==t.detail||Bm()){if(2===t.detail)if(n.isResizeArea(t))r.emit(e.S2Event.LAYOUT_RESIZE_MOUSE_UP,t);else{r.emit(e.S2Event.GLOBAL_DOUBLE_CLICK,t);var A=r.getCell(t.target);if(A){var i=A.cellType;if(n.target===t.target)switch(i){case e.CellType.DATA_CELL:r.emit(e.S2Event.DATA_CELL_DOUBLE_CLICK,t);break;case e.CellType.ROW_CELL:r.emit(e.S2Event.ROW_CELL_DOUBLE_CLICK,t);break;case e.CellType.COL_CELL:r.emit(e.S2Event.COL_CELL_DOUBLE_CLICK,t);break;case e.CellType.CORNER_CELL:r.emit(e.S2Event.CORNER_CELL_DOUBLE_CLICK,t);break;case e.CellType.MERGED_CELL:r.emit(e.S2Event.MERGED_CELLS_DOUBLE_CLICK,t)}}}}else n.onCanvasSingleClick(t)},this.onCanvasMouseout=function(e){if(n.isAutoResetSheetStyle(e)&&!n.isMouseOnTheCanvasContainer(e)){var t=n.spreadsheet.interaction;t.isSelectedState()||t.intercepts.size>0||t.reset()}},this.onCanvasContextMenu=function(t){var r=n.spreadsheet;if(n.isResizeArea(t))r.emit(e.S2Event.LAYOUT_RESIZE_MOUSE_UP,t);else switch(r.emit(e.S2Event.GLOBAL_CONTEXT_MENU,t),n.spreadsheet.getCellType(t.target)){case e.CellType.DATA_CELL:n.spreadsheet.emit(e.S2Event.DATA_CELL_CONTEXT_MENU,t);break;case e.CellType.ROW_CELL:n.spreadsheet.emit(e.S2Event.ROW_CELL_CONTEXT_MENU,t);break;case e.CellType.COL_CELL:n.spreadsheet.emit(e.S2Event.COL_CELL_CONTEXT_MENU,t);break;case e.CellType.CORNER_CELL:n.spreadsheet.emit(e.S2Event.CORNER_CELL_CONTEXT_MENU,t);break;case e.CellType.MERGED_CELL:n.spreadsheet.emit(e.S2Event.MERGED_CELLS_CONTEXT_MENU,t)}},this.spreadsheet=t,this.bindEvents()}return Object.defineProperty(t.prototype,"canvasContainer",{get:function(){return this.spreadsheet.container},enumerable:!1,configurable:!0}),t.prototype.isAutoResetSheetStyle=function(e){var t,n=this.spreadsheet.options.interaction;return lv.isFunction(null==n?void 0:n.autoResetSheetStyle)?null===(t=null==n?void 0:n.autoResetSheetStyle)||void 0===t?void 0:t.call(n,e,this.spreadsheet):null==n?void 0:n.autoResetSheetStyle},t.prototype.bindEvents=function(){var t=this;this.clearAllEvents(),this.addCanvasEvent(e.OriginEventType.MOUSE_DOWN,this.onCanvasMousedown),this.addCanvasEvent(e.OriginEventType.TOUCH_START,(function(e){t.target=e.target}));var n=Bm()?e.OriginEventType.TOUCH_END:e.OriginEventType.POINTER_UP;this.addCanvasEvent(e.OriginEventType.POINTER_MOVE,this.onCanvasMousemove),this.addCanvasEvent(e.OriginEventType.MOUSE_OUT,this.onCanvasMouseout),this.addCanvasEvent(n,this.onCanvasMouseup),this.addCanvasEvent(e.OriginEventType.CLICK,this.onCanvasClick),this.addCanvasEvent(e.OriginEventType.RIGHT_DOWN,this.onCanvasContextMenu),this.addS2Event(e.S2Event.GLOBAL_ACTION_ICON_CLICK,(function(){t.spreadsheet.interaction.addIntercepts([e.InterceptType.HOVER]),t.spreadsheet.interaction.clearState()})),vm()||(this.addDomEventListener(window,e.OriginEventType.CLICK,(function(e){t.resetSheetStyle(e),t.isCanvasEffect=t.isMouseOnTheCanvasContainer(e)})),this.addDomEventListener(window,e.OriginEventType.KEY_DOWN,(function(n){t.onKeyboardCopy(n),t.onKeyboardEsc(n),t.spreadsheet.emit(e.S2Event.GLOBAL_KEYBOARD_DOWN,n)})),this.addDomEventListener(window,e.OriginEventType.KEY_UP,(function(n){t.spreadsheet.emit(e.S2Event.GLOBAL_KEYBOARD_UP,n)})),this.addDomEventListener(window,e.OriginEventType.POINTER_UP,(function(n){t.spreadsheet.emit(e.S2Event.GLOBAL_MOUSE_UP,n)})),this.addDomEventListener(window,e.OriginEventType.POINTER_MOVE,(function(n){t.spreadsheet.emit(e.S2Event.GLOBAL_MOUSE_MOVE,n)})),this.addDomEventListener(window,e.OriginEventType.SCROLL,this.onScroll))},t.prototype.onKeyboardCopy=function(t){var n=this.spreadsheet.options.interaction.copy;if(this.isCanvasEffect&&(null==n?void 0:n.enable)&&FS(t.key,e.InteractionKeyboardKey.COPY)&&(t.metaKey||t.ctrlKey)){var r=VS(this.spreadsheet);lv.isNil(r)||this.spreadsheet.emit(e.S2Event.GLOBAL_COPIED,r)}},t.prototype.onKeyboardEsc=function(t){this.isCanvasEffect&&FS(t.key,e.InteractionKeyboardKey.ESC)&&this.resetSheetStyle(t)},t.prototype.resetSheetStyle=function(t){var n,r;if(this.isAutoResetSheetStyle(t)&&this.spreadsheet){var A=this.spreadsheet.interaction;(null===(n=null==A?void 0:A.hasIntercepts)||void 0===n?void 0:n.call(A,[e.InterceptType.DATA_CELL_BRUSH_SELECTION,e.InterceptType.COL_CELL_BRUSH_SELECTION,e.InterceptType.ROW_CELL_BRUSH_SELECTION]))?null===(r=null==A?void 0:A.removeIntercepts)||void 0===r||r.call(A,[e.InterceptType.DATA_CELL_BRUSH_SELECTION,e.InterceptType.ROW_CELL_BRUSH_SELECTION,e.InterceptType.COL_CELL_BRUSH_SELECTION]):this.isMouseOnTheTooltip(t)||this.isMouseOnTheCanvasContainer(t)||(A.reset(),this.spreadsheet.emit(e.S2Event.GLOBAL_RESET,t),this.spreadsheet.emit(e.S2Event.GLOBAL_SELECTED,A.getActiveCells(),{event:t,targetCell:null,interactionName:e.InteractionName.GLOBAL_RESET}))}},t.prototype.isMouseEvent=function(e){return lv.hasIn(e,"clientX")&&lv.hasIn(e,"clientY")},t.prototype.isMatchElement=function(e){var t=this.spreadsheet.getCanvasElement(),n=e.target;return n===t||n instanceof ss||n instanceof Gs},t.prototype.isMatchPoint=function(e){var t=this.spreadsheet.getCanvasElement(),n=this.getContainerRect(),r=n.width,A=n.height,i=t.getBoundingClientRect()||{},o=i.x,a=i.y,s=e.clientX,l=e.clientY;return s<=o+r&&s>=o&&l<=a+A&&l>=a},t.prototype.isMouseOnTheCanvasContainer=function(e){return!!this.isMouseEvent(e)&&(!!this.spreadsheet.getCanvasElement()&&(this.spreadsheet.getCanvasConfig().supportsCSSTransform?this.isMatchElement(e):this.isMatchElement(e)&&this.isMatchPoint(e)))},t.prototype.getContainerRect=function(){var e,t=this.spreadsheet,n=t.facet,r=t.options,A=(null==n?void 0:n.hRowScrollBar)||(null==n?void 0:n.hScrollBar),i=(null==n?void 0:n.panelBBox)||{},o=i.maxX,a=i.maxY,s=r.width,l=void 0===s?0:s,u=r.height,c=void 0===u?0:u,h=(null===(e=null==A?void 0:A.theme)||void 0===e?void 0:e.size)||0;return{width:Math.min(l,o),height:Math.min(c,a+h)}},t.prototype.isMouseOnTheTooltip=function(e){var t,n,r,A,i=this.spreadsheet.tooltip;if(!(null==i?void 0:i.visible))return!1;var o=(null===(r=null===(n=null===(t=this.spreadsheet.tooltip)||void 0===t?void 0:t.container)||void 0===n?void 0:n.getBoundingClientRect)||void 0===r?void 0:r.call(n))||{},a=o.x,s=o.y,l=o.width,u=o.height;return e.target instanceof Node?ZT(null===(A=this.spreadsheet.tooltip)||void 0===A?void 0:A.container,e.target):!!this.isMouseEvent(e)&&(e.clientX>=a&&e.clientX<=a+l&&e.clientY>=s&&e.clientY<=s+u)},t.prototype.isResizeArea=function(e){var t=qS(e.target);return null==t?void 0:t.isResizeArea},t.prototype.activeResizeArea=function(e){var t,n,r,A=lv.get(e.target,"attrs.appendInfo");if(!(null==A?void 0:A.isResizeMask)){this.resetResizeArea();var i=e.target;this.spreadsheet.store.set("activeResizeArea",i),i.attr(wy.backgroundOpacity,null===(r=null===(n=null===(t=this.spreadsheet.theme.resizeArea)||void 0===t?void 0:t.interactionState)||void 0===n?void 0:n.hover)||void 0===r?void 0:r.backgroundOpacity)}},t.prototype.resetResizeArea=function(){var e,t=this.spreadsheet.store.get("activeResizeArea");lv.isEmpty(t)||t.attr(wy.backgroundOpacity,null===(e=this.spreadsheet.theme.resizeArea)||void 0===e?void 0:e.backgroundOpacity),this.spreadsheet.store.set("activeResizeArea",t)},t.prototype.hasBrushSelectionIntercepts=function(){return this.spreadsheet.interaction.hasIntercepts([e.InterceptType.HOVER,e.InterceptType.DATA_CELL_BRUSH_SELECTION,e.InterceptType.ROW_CELL_BRUSH_SELECTION,e.InterceptType.COL_CELL_BRUSH_SELECTION])},t.prototype.onCanvasSingleClick=function(t){var n=this.spreadsheet.getCell(t.target);if(this.target===t.target&&n){if(this.isGuiIconShape(t.target)&&!this.isConditionIconShape(t.target,n))return;switch(this.spreadsheet.emit(e.S2Event.GLOBAL_CLICK,t),n.cellType){case e.CellType.DATA_CELL:this.spreadsheet.emit(e.S2Event.DATA_CELL_CLICK,t);break;case e.CellType.ROW_CELL:this.spreadsheet.emit(e.S2Event.ROW_CELL_CLICK,t);break;case e.CellType.COL_CELL:this.spreadsheet.emit(e.S2Event.COL_CELL_CLICK,t);break;case e.CellType.CORNER_CELL:this.spreadsheet.emit(e.S2Event.CORNER_CELL_CLICK,t);break;case e.CellType.MERGED_CELL:this.spreadsheet.emit(e.S2Event.MERGED_CELLS_CLICK,t)}}},t.prototype.clear=function(){this.unbindEvents()},t.prototype.unbindEvents=function(){this.clearAllEvents()},t.prototype.addCanvasEvent=function(e,t){var n;null===(n=this.canvasContainer)||void 0===n||n.on(e,t),this.canvasEventHandlers.push({type:e,handler:t})},t.prototype.addS2Event=function(e,t){this.spreadsheet.on(e,t),this.s2EventHandlers.push({type:e,handler:t})},t.prototype.addDomEventListener=function(e,t,n){if(e.addEventListener){var r=this.spreadsheet.options.interaction.eventListenerOptions;e.addEventListener(t,n,r),this.domEventListeners.push({target:e,type:t,handler:n,options:r})}else console.error("Please make sure ".concat(e," has addEventListener function"))},t.prototype.clearAllEvents=function(){var e=this;lv.each(this.canvasEventHandlers,(function(t){var n,r=t.type,A=t.handler;null===(n=e.canvasContainer)||void 0===n||n.removeEventListener(r,A)})),lv.each(this.s2EventHandlers,(function(t){var n=t.type,r=t.handler;e.spreadsheet.off(n,r)})),lv.each(this.domEventListeners,(function(e){e.target.removeEventListener(e.type,e.handler,e.options)})),this.canvasEventHandlers=[],this.s2EventHandlers=[],this.domEventListeners=[]},t.prototype.getViewportPoint=function(e){return!this.spreadsheet.getCanvasConfig().supportsCSSTransform||lv.isNil(e.offsetX)||lv.isNil(e.offsetY)?this.spreadsheet.container.client2Viewport({x:e.clientX,y:e.clientY}):{x:e.offsetX,y:e.offsetY}},t}(),MI=function(t){function n(){var n=t.apply(this,lt([],st(arguments),!1))||this;return n.isRangeSelection=!1,n.handleColClick=function(t){t.stopPropagation();var r=n.spreadsheet,A=r.interaction,i=r.facet,o=n.spreadsheet.getCell(t.target),a=null==o?void 0:o.getMeta();if(!lv.isNil(null==a?void 0:a.x)){A.addIntercepts([e.InterceptType.HOVER]);var s=[gT(o)],l=n.spreadsheet.store.get("lastClickedCell");if(n.isRangeSelection&&l&&l.cellType===o.cellType&&l.getMeta().level===a.level){var u=i.getLayoutResult(),c=u.rowsHierarchy,h=u.colsHierarchy,d=st([c.maxLevel,h.maxLevel],2),f=d[0],p=d[1],g=vT(l.getMeta(),a),v=g.start,y=g.end;o instanceof Jx?s=n.handleSeriesNumberRowSelected(v.rowIndex,y.rowIndex,o):(null==o?void 0:o.cellType)===e.CellType.ROW_CELL&&a.level===f?s=n.handleRowSelected(v.rowIndex,y.rowIndex,o):(null==o?void 0:o.cellType)===e.CellType.COL_CELL&&a.level===p&&(s=n.handleColSelected(v.colIndex,y.colIndex,o)),A.changeState({cells:s,stateName:e.InteractionStateName.SELECTED});var C=ET(s);A.updateCells(i.getHeaderCells(C)),A.emitSelectEvent({event:t,targetCell:o,interactionName:e.InteractionName.RANGE_SELECTION})}else lv.isEmpty(A.getCells())&&A.reset(),n.spreadsheet.store.set("lastClickedCell",o)}},n}return nt(n,t),n.prototype.bindEvents=function(){this.bindKeyboardDown(),this.bindDataCellClick(),this.bindColCellClick(),this.bindKeyboardUp(),this.bindMouseMove()},n.prototype.reset=function(){this.isRangeSelection=!1,this.spreadsheet.interaction.removeIntercepts([e.InterceptType.CLICK])},n.prototype.bindKeyboardDown=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_KEYBOARD_DOWN,(function(n){n.key===e.InteractionKeyboardKey.SHIFT&&(t.isRangeSelection=!0,t.spreadsheet.interaction.addIntercepts([e.InterceptType.CLICK]))}))},n.prototype.bindKeyboardUp=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_KEYBOARD_UP,(function(n){n.key===e.InteractionKeyboardKey.SHIFT&&t.reset()}))},n.prototype.bindMouseMove=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_MOUSE_MOVE,(function(e){t.isRangeSelection&&!e.shiftKey&&t.reset()}))},n.prototype.bindColCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.COL_CELL_CLICK,(function(e){t.handleColClick(e)}))},n.prototype.bindDataCellClick=function(){var t=this;this.spreadsheet.on(e.S2Event.DATA_CELL_CLICK,(function(n){n.stopPropagation();var r=t.spreadsheet.getCell(n.target),A=r.getMeta(),i=t.spreadsheet.interaction;if(A){var o=t.spreadsheet.store.get("lastClickedCell");if(t.isRangeSelection&&(null==o?void 0:o.cellType)===r.cellType){var a=vT(o.getMeta(),r.getMeta()),s=a.start,l=a.end,u=lv.range(s.colIndex,l.colIndex+1).flatMap((function(e){var n=t.spreadsheet.facet.getColLeafNodes()[e].id;return lv.range(s.rowIndex,l.rowIndex+1).map((function(A){var i=t.spreadsheet.facet.getSeriesNumberWidth()||t.spreadsheet.isTableMode()?String(A):t.spreadsheet.facet.getRowLeafNodes()[A].id;return{id:"".concat(i,"-").concat(n),colIndex:e,rowIndex:A,type:r.cellType}}))}));i.addIntercepts([e.InterceptType.CLICK,e.InterceptType.HOVER]),i.changeState({cells:u,stateName:e.InteractionStateName.SELECTED}),t.spreadsheet.showTooltipWithInfo(n,WT(t.spreadsheet)),i.emitSelectEvent({targetCell:r,event:n,interactionName:e.InteractionName.RANGE_SELECTION})}else t.spreadsheet.store.set("lastClickedCell",r)}}))},n.prototype.handleSeriesNumberRowSelected=function(e,t,n){var r=this.spreadsheet.facet.getColLeafNodes()[0].id;return lv.range(e,t+1).map((function(e){var t=String(e);return{id:"".concat(t,"-").concat(r),colIndex:0,rowIndex:e,type:n.cellType}}))},n.prototype.handleRowSelected=function(e,t,n){return this.spreadsheet.facet.getRowNodes().filter((function(n){var r=n.rowIndex;return lv.inRange(r,e,t+1)})).map((function(e){return{id:e.id,colIndex:e.colIndex,rowIndex:e.rowIndex,type:n.cellType}}))},n.prototype.handleColSelected=function(e,t,n){return this.spreadsheet.facet.getColLeafNodes().filter((function(n){var r=n.colIndex;return lv.inRange(r,e,t+1)})).map((function(e){return{id:e.id,colIndex:e.colIndex,rowIndex:e.rowIndex,type:n.cellType}}))},n}(yI),HI=function(t){function n(){var e=t.apply(this,lt([],st(arguments),!1))||this;return e.resizeStartPosition={},e}return nt(n,t),n.prototype.bindEvents=function(){this.bindMouseDown(),this.bindMouseMove(),this.bindMouseUp()},n.prototype.initResizeGroup=function(){if(!this.resizeReferenceGroup){this.resizeReferenceGroup=this.spreadsheet.facet.foregroundGroup.appendChild(new ds);var e=this.spreadsheet.options,t=e.width,n=e.height,r=this.getResizeAreaTheme(),A=r.guideLineColor,i={d:"",lineDash:r.guideLineDash,stroke:A,lineWidth:r.size};this.resizeReferenceGroup.appendChild(new Bs({id:Oy,style:i})),this.resizeReferenceGroup.appendChild(new Bs({id:ky,style:i})),this.resizeReferenceGroup.appendChild(new AB({id:Ny,style:{x:0,y:0,width:t,height:n,fill:"transparent"}},{isResizeArea:!0,isResizeMask:!0}))}},n.prototype.getResizeAreaTheme=function(){return this.spreadsheet.theme.resizeArea},n.prototype.setResizeTarget=function(e){this.resizeTarget=e},n.prototype.getGuideLineWidthAndHeight=function(){var e=this.spreadsheet.options,t=e.width,n=e.height,r=this.spreadsheet.facet.panelBBox,A=r.maxY,i=r.maxX;return{width:Math.min(i,t),height:Math.min(A,n)}},n.prototype.getResizeShapes=function(){var e;return(null===(e=this.resizeReferenceGroup)||void 0===e?void 0:e.children)||[]},n.prototype.setResizeMaskCursor=function(e){var t=st(this.getResizeShapes(),3)[2];null==t||t.attr("cursor",e)},n.prototype.updateResizeGuideLinePosition=function(t,n){var r=this.getResizeShapes();if(!lv.isEmpty(r)){var A=st(r,2),i=A[0],o=A[1],a=n.type,s=n.offsetX,l=n.offsetY,u=n.width,c=n.height,h=n.size,d=this.getGuideLineWidthAndHeight(),f=d.width,p=d.height;this.cursorType="".concat(a,"-resize"),this.setResizeMaskCursor(this.cursorType);var g=h/2;if(a===e.ResizeDirectionType.Horizontal)return i.attr("d",[["M",s+g,l],["L",s+g,p]]),o.attr("d",[["M",s+u-g,l],["L",s+u-g,p]]),this.resizeStartPosition.offsetX=t.offsetX,void(this.resizeStartPosition.clientX=t.clientX);i.attr("d",[["M",s,l+g],["L",f,l+g]]),o.attr("d",[["M",s,l+c-g],["L",f,l+c-g]]),this.resizeStartPosition.offsetY=t.offsetY,this.resizeStartPosition.clientY=t.clientY}},n.prototype.bindMouseDown=function(){var t=this;this.spreadsheet.on(e.S2Event.LAYOUT_RESIZE_MOUSE_DOWN,(function(n){var r;null===(r=null==n?void 0:n.preventDefault)||void 0===r||r.call(n);var A=n.target,i=t.getCellAppendInfo(n.target);t.spreadsheet.store.set("resized",!1),(null==i?void 0:i.isResizeArea)&&(t.spreadsheet.hideTooltip(),t.spreadsheet.interaction.addIntercepts([e.InterceptType.RESIZE]),t.setResizeTarget(A),t.showResizeGroup(),t.updateResizeGuideLinePosition(n,i))}))},n.prototype.bindMouseMove=function(){this.spreadsheet.on(e.S2Event.LAYOUT_RESIZE_MOUSE_MOVE,lv.throttle(this.resizeMouseMove.bind(this),33))},n.prototype.getResizeGuideLinePosition=function(){var e,t=st((null===(e=this.resizeReferenceGroup)||void 0===e?void 0:e.children)||[],2),n=t[0],r=t[1],A=(null==n?void 0:n.attr("d"))||[],i=(null==r?void 0:r.attr("d"))||[],o=st(A[0]||[],3),a=o[1],s=void 0===a?0:a,l=o[2],u=void 0===l?0:l,c=st(i[0]||[],3),h=c[1],d=void 0===h?0:h,f=c[2];return{start:{x:+s,y:+u},end:{x:+d,y:+(void 0===f?0:f)}}},n.prototype.getDisAllowResizeInfo=function(){var e,t=this.getResizeInfo(),n=this.spreadsheet.options.interaction.resize,r=t.width,A=t.height,i=t.resizedWidth,o=void 0===i?0:i,a=t.resizedHeight,s=void 0===a?0:a,l=null===(e=null==n?void 0:n.disable)||void 0===e?void 0:e.call(n,t);return{displayWidth:l?r:o,displayHeight:l?A:s,isDisabled:l}},n.prototype.getResizeCellField=function(t){var n,r,A,i,o,a=t.type===e.ResizeDirectionType.Vertical,s=a?!this.isEffectRowOf(e.ResizeType.ALL):!this.isEffectColOf(e.ResizeType.ALL);return this.spreadsheet.isTableMode()?a?(null===(n=null==t?void 0:t.meta)||void 0===n?void 0:n.rowId)||String(null===(r=null==t?void 0:t.meta)||void 0===r?void 0:r.rowIndex):null===(A=null==t?void 0:t.meta)||void 0===A?void 0:A.field:s?null===(i=null==t?void 0:t.meta)||void 0===i?void 0:i.id:null===(o=null==t?void 0:t.meta)||void 0===o?void 0:o.field},n.prototype.isEffectRowOf=function(e){var t,n;return(null===(n=null===(t=this.spreadsheet.options.interaction)||void 0===t?void 0:t.resize)||void 0===n?void 0:n.rowResizeType)===e},n.prototype.isEffectColOf=function(e){var t,n;return(null===(n=null===(t=this.spreadsheet.options.interaction)||void 0===t?void 0:t.resize)||void 0===n?void 0:n.colResizeType)===e},n.prototype.getCellStyleByField=function(t){var n,r=this,A=this.spreadsheet.interaction,i=this.getResizeInfo(),o=i.type===e.ResizeDirectionType.Vertical?A.getActiveRowCells():A.getActiveColCells(),a=A.isSelectedState()&&o.length>1;return(this.isEffectRowOf(e.ResizeType.SELECTED)||this.isEffectColOf(e.ResizeType.SELECTED))&&a?o.reduce((function(e,n){return yB.getAllLeaveNodes(n.getMeta()).forEach((function(n){var A=rt(rt({},i),{meta:n});e[r.getResizeCellField(A)]=t})),e}),{}):((n={})[this.getResizeCellField(i)]=t,n)},n.prototype.getResizeWidthDetail=function(){var t,n=this.getResizeInfo(),r=this.getDisAllowResizeInfo().displayWidth;switch(n.effect){case e.ResizeAreaEffect.Field:return{eventType:e.S2Event.LAYOUT_RESIZE_ROW_WIDTH,style:{rowCell:{widthByField:(t={},t[n.meta.field]=r,t)}}};case e.ResizeAreaEffect.Tree:return{eventType:e.S2Event.LAYOUT_RESIZE_TREE_WIDTH,style:{rowCell:{treeWidth:r}}};case e.ResizeAreaEffect.Cell:return{eventType:e.S2Event.LAYOUT_RESIZE_COL_WIDTH,style:{colCell:{width:this.isEffectColOf(e.ResizeType.ALL)?r:void 0,widthByField:this.getCellStyleByField(r)}}};case e.ResizeAreaEffect.Series:return{eventType:e.S2Event.LAYOUT_RESIZE_SERIES_WIDTH,seriesNumberWidth:r};default:return null}},n.prototype.getResizeHeightDetail=function(){var t=this.spreadsheet.options.style,n=this.getResizeInfo(),r=this.getDisAllowResizeInfo().displayHeight;switch(n.effect){case e.ResizeAreaEffect.Field:return{eventType:e.S2Event.LAYOUT_RESIZE_COL_HEIGHT,style:{colCell:this.getResizedCellStyleByField(this.getColCellHeightByField(n,r),null==t?void 0:t.colCell,r)}};case e.ResizeAreaEffect.Cell:return{eventType:e.S2Event.LAYOUT_RESIZE_ROW_HEIGHT,style:{rowCell:rt(rt({},this.getResizedCellStyleByField(this.getCellStyleByField(r),null==t?void 0:t.rowCell,r)),{height:this.isEffectRowOf(e.ResizeType.ALL)?r:void 0})}};default:return null}},n.prototype.getResizedCellStyleByField=function(e,t,n){if(!((null==t?void 0:t.maxLines)>1&&(null==t?void 0:t.wordWrap)))return{heightByField:e};var r=this.getResizeInfo().cell,A=r.getMaxLinesByCustomHeight({targetCell:r,displayHeight:n,isCustomHeight:!0});return{heightByField:e,maxLinesByField:Object.keys(e||{}).reduce((function(e,t){return e[t]=A,e}),{})}},n.prototype.getColCellHeightByField=function(e,t){var n;return this.spreadsheet.isCustomColumnFields()||this.spreadsheet.isTableMode()?this.spreadsheet.facet.getColNodes().filter((function(t){var n,r;return t.level===(null===(n=e.meta)||void 0===n?void 0:n.level)&&t.height===(null===(r=e.meta)||void 0===r?void 0:r.height)})).reduce((function(e,n){return e[n.field]=t,e}),{}):((n={})[e.meta.field]=t,n)},n.prototype.getResizeDetail=function(){return this.getResizeInfo().type===e.ResizeDirectionType.Horizontal?this.getResizeWidthDetail():this.getResizeHeightDetail()},n.prototype.showResizeGroup=function(){var e;this.initResizeGroup(),null===(e=this.resizeReferenceGroup)||void 0===e||e.setAttribute("visibility","visible")},n.prototype.hideResizeGroup=function(){var e;null===(e=this.resizeReferenceGroup)||void 0===e||e.setAttribute("visibility","hidden")},n.prototype.bindMouseUp=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_MOUSE_UP,(function(){var e;t.cursorType="default",t.setResizeMaskCursor(t.cursorType),t.resizeReferenceGroup&&!lv.isEmpty(null===(e=t.resizeReferenceGroup)||void 0===e?void 0:e.children)&&(t.hideResizeGroup(),t.renderResizedResult())}))},n.prototype.resizeMouseMove=function(t){var n,r;if("visible"===(null===(n=this.resizeReferenceGroup)||void 0===n?void 0:n.parsedStyle.visibility)){var A=this.getResizeInfo(),i=(null===(r=this.resizeReferenceGroup)||void 0===r?void 0:r.children)||[];if(!lv.isEmpty(i)){var o=st(i,2)[1],a=st(lv.clone(o.attr("d")),2),s=a[0],l=a[1];A.type===e.ResizeDirectionType.Horizontal?this.updateHorizontalResizingEndGuideLinePosition(t.offsetX,A,{start:s,end:l}):this.updateVerticalResizingEndGuideLinePosition(t.offsetY,A,{start:s,end:l}),this.updateResizeGuideLineTheme(o),o.attr("d",[s,l])}}},n.prototype.updateResizeGuideLineTheme=function(e){var t=this.getResizeAreaTheme(),n=t.guideLineColor,r=t.guideLineDisableColor,A=this.getDisAllowResizeInfo().isDisabled;e.attr("stroke",A?r:n),this.setResizeMaskCursor(A?"no-drop":this.cursorType)},n.prototype.updateHorizontalResizingEndGuideLinePosition=function(e,t,n){var r,A,i=((null===(r=this.spreadsheet.options.interaction)||void 0===r?void 0:r.resize)||{}).minCellWidth,o=void 0===i?40:i,a=e-this.resizeStartPosition.offsetX;t.width+a<o&&(a=-(t.width-o));var s=t.offsetX+t.width+a,l=t.size/2;n.start[1]=s-l,n.end[1]=s-l,null===(A=this.resizeTarget)||void 0===A||A.attr({x:s-t.size})},n.prototype.updateVerticalResizingEndGuideLinePosition=function(e,t,n){var r,A,i=((null===(r=this.spreadsheet.options.interaction)||void 0===r?void 0:r.resize)||{}).minCellHeight,o=void 0===i?20:i,a=e-this.resizeStartPosition.offsetY;t.height+a<o&&(a=-(t.height-o));var s=t.offsetY+t.height+a,l=t.size/2;n.start[2]=s-l,n.end[2]=s-l,null===(A=this.resizeTarget)||void 0===A||A.attr({y:s-t.size})},n.prototype.renderResizedResult=function(){return it(this,void 0,void 0,(function(){var t,n,r,A,i,o;return ot(this,(function(a){switch(a.label){case 0:return t=this.getResizeInfo(),n=this.getResizeDetail()||{},r=n.style,A=n.seriesNumberWidth,i=n.eventType,o={info:t,style:r},this.spreadsheet.emit(e.S2Event.LAYOUT_RESIZE,o),this.spreadsheet.emit(i,o),r&&this.spreadsheet.setOptions({style:r}),A&&this.spreadsheet.setTheme({rowCell:{seriesNumberWidth:A}}),this.spreadsheet.store.set("resized",!0),[4,this.render()];case 1:return a.sent(),[2]}}))}))},n.prototype.getResizeInfo=function(){var t=this.getCellAppendInfo(this.resizeTarget),n=this.getResizeGuideLinePosition(),r=n.start,A=n.end,i=zm(A.x-r.x+(t.type===e.ResizeDirectionType.Horizontal?t.size:0)),o=zm(A.y-r.y+(t.type===e.ResizeDirectionType.Vertical?t.size:0));return rt(rt({},t),{resizedWidth:i,resizedHeight:o})},n.prototype.render=function(){return it(this,void 0,void 0,(function(){return ot(this,(function(e){switch(e.label){case 0:return this.resizeStartPosition={},this.resizeTarget=null,this.resizeReferenceGroup=null,[4,this.spreadsheet.render(!1)];case 1:return e.sent(),[2]}}))}))},n}(yI),OI=[e.InteractionKeyboardKey.ARROW_LEFT,e.InteractionKeyboardKey.ARROW_RIGHT,e.InteractionKeyboardKey.ARROW_UP,e.InteractionKeyboardKey.ARROW_DOWN],kI=function(t){function n(e){return t.call(this,e)||this}return nt(n,t),n.prototype.isCanvasEffect=function(){return this.spreadsheet.interaction.eventController.isCanvasEffect},n.prototype.bindEvents=function(){var t=this;this.spreadsheet.on(e.S2Event.GLOBAL_KEYBOARD_DOWN,(function(e){if(t.isCanvasEffect()){var n=e.shiftKey,r=e.metaKey,A=!1,i=!1,o=!1;OI.includes(e.key)&&(r&&n?(A=!1,i=!0,o=!1):r?(A=!0,i=!0,o=!0):n?(A=!1,i=!1,o=!1):(A=!0,i=!1,o=!0),t.handleMove({event:e,changeStartCell:A,isJumpMode:i,isSingleSelection:o}))}})),this.spreadsheet.on(e.S2Event.DATA_CELL_CLICK,(function(e){var n=t.spreadsheet.getCell(e.target),r=null==n?void 0:n.getMeta();r&&(t.startCell=t.getCellMetaByViewMeta(r),t.endCell=t.startCell)}))},n.prototype.getCellMetaByViewMeta=function(t){return{rowIndex:t.rowIndex,colIndex:t.colIndex,id:t.id,type:e.CellType.DATA_CELL}},n.prototype.handleMove=function(t){var n=t.event,r=t.changeStartCell,A=t.isJumpMode,i=t.isSingleSelection,o=this,a=o.spreadsheet,s=o.startCell,l=o.endCell,u=r?s:l,c=this.getMoveInfo(n.key,u,A);if(c){var h=st([c.row,c.col],2),d=h[0],f=h[1];this.scrollToActiveCell(a,d,f);var p=this.generateCellMeta(a,d,f),g=i?[p]:this.getRangeCells(a,s,p);r&&(this.startCell=p),this.endCell=p,a.interaction.changeState({stateName:e.InteractionStateName.SELECTED,cells:g}),a.interaction.emitSelectEvent({event:n,interactionName:e.InteractionName.SELECTED_CELL_MOVE}),this.spreadsheet.emit(e.S2Event.DATA_CELL_SELECT_MOVE,g)}},n.prototype.generateCellMeta=function(t,n,r){var A=t.isTableMode,i=t.facet,o=i.getRowLeafNodes(),a=i.getColLeafNodes(),s=A()?String(n):o[n].id,l=a[r].id;return{rowIndex:n,colIndex:r,id:Bw(s,l),type:e.CellType.DATA_CELL}},n.prototype.getRangeCells=function(e,t,n){for(var r=vT(t,n),A=r.start,i=A.rowIndex,o=A.colIndex,a=r.end,s=a.rowIndex,l=a.colIndex,u=[],c=i;c<=s;c++)for(var h=o;h<=l;h++)u.push(this.generateCellMeta(e,c,h));return u},n.prototype.getMoveInfo=function(t,n,r){var A=this.spreadsheet,i=A.facet.getFrozenOptions(),o=i.rowCount,a=i.trailingRowCount,s=i.colCount,l=i.trailingColCount,u=A.facet.getCellRange(),c=u.start,h=u.end,d=st([0+s,A.facet.getColLeafNodes().length-l-1],2),f=d[0],p=d[1],g=st([c+o,h-a],2),v=g[0],y=g[1];if(n)switch(t){case e.InteractionKeyboardKey.ARROW_RIGHT:if(n.colIndex+1>p)return;return{row:n.rowIndex,col:r?p:n.colIndex+1};case e.InteractionKeyboardKey.ARROW_LEFT:if(n.colIndex-1<f)return;return{row:n.rowIndex,col:r?f:n.colIndex-1};case e.InteractionKeyboardKey.ARROW_UP:if(n.rowIndex-1<v)return;return{row:r?v:n.rowIndex-1,col:n.colIndex};case e.InteractionKeyboardKey.ARROW_DOWN:if(n.rowIndex+1>y)return;return{row:r?y:n.rowIndex+1,col:n.colIndex}}},n.prototype.calculateOffset=function(t,n,r){var A=t.facet,i=A.getFrozenOptions().rowCount,o=A.getColLeafNodes(),a=A.panelBBox,s=a.viewportHeight,l=a.viewportWidth,u=A.frozenGroupAreas,c=u[e.FrozenGroupArea.Col].width,h=u[e.FrozenGroupArea.TrailingCol].width,d=u[e.FrozenGroupArea.TrailingRow].height,f=A.panelScrollGroupIndexes,p=o.find((function(e){return e.colIndex===r})),g=null,v=null;if(r<=f[0]?g=(null==p?void 0:p.x)-c:r>=f[1]&&(g=(null==p?void 0:p.x)+(null==p?void 0:p.width)-l+h),n<=f[2])v=A.viewCellHeights.getCellOffsetY(n-i);else if(n>=f[3]){v=A.viewCellHeights.getCellOffsetY(n+1)-s+d}return{offsetX:g,offsetY:v}},n.prototype.scrollToActiveCell=function(e,t,n){var r=this.calculateOffset(e,t,n),A=r.offsetX,i=r.offsetY,o=e.facet,a=e.facet.getScrollOffset(),s=a.scrollX,l=a.scrollY;o.scrollWithAnimation({offsetX:{value:null!=A?A:s},offsetY:{value:null!=i?i:l}})},n}(yI),NI=function(){function t(t){var n=this;this.interactions=new Map,this.intercepts=new Set,this.hoverTimer=null,this.drawRafId=null,this.defaultState={cells:[],force:!1},this.onTriggerInteractionsResetEffect=function(){n.interactions.forEach((function(e){e.reset()}))},this.shouldForbidHeaderCellSelected=function(e){return lv.unionBy(e,"type").length>1},this.highlightNodes=function(t,n){void 0===t&&(t=[]),void 0===n&&(n=e.InteractionStateName.HOVER),t.forEach((function(e){var t;null===(t=null==e?void 0:e.belongsCell)||void 0===t||t.updateByState(n,e.belongsCell)}))},this.mergeCells=function(e,t){oT(n.spreadsheet,e,t)},this.unmergeCell=function(e){sT(n.spreadsheet,e)},this.spreadsheet=t,this.registerEventController(),this.registerInteractions(),vm()||window.addEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)}return t.prototype.destroy=function(){this.interactions.clear(),this.intercepts.clear(),this.eventController.clear(),this.clearHoverTimer(),this.resetState(),vm()||window.removeEventListener("visibilitychange",this.onTriggerInteractionsResetEffect)},t.prototype.reset=function(){this.clearState(),this.clearHoverTimer(),this.intercepts.clear(),this.spreadsheet.hideTooltip()},t.prototype.setState=function(e){ST(this.spreadsheet,e)},t.prototype.getState=function(){return this.spreadsheet.store.get(xy)||this.defaultState},t.prototype.setInteractedCells=function(e){var t=this.getInteractedCells().concat([e]),n=this.getState();n.interactedCells=t,this.setState(n)},t.prototype.getInteractedCells=function(){var e=this.getState();return(null==e?void 0:e.interactedCells)||[]},t.prototype.resetState=function(){this.spreadsheet.store.set(xy,this.defaultState)},t.prototype.getCurrentStateName=function(){return this.getState().stateName},t.prototype.isEqualStateName=function(e){return this.getCurrentStateName()===e},t.prototype.isStateOf=function(e){var t=this.getState();return(null==t?void 0:t.stateName)===e},t.prototype.isSelectedState=function(){var t=this;return this.isBrushSelectedState()||[e.InteractionStateName.SELECTED,e.InteractionStateName.ALL_SELECTED].some((function(e){return t.isStateOf(e)}))},t.prototype.isBrushSelectedState=function(){var t=this;return[e.InteractionStateName.ROW_CELL_BRUSH_SELECTED,e.InteractionStateName.COL_CELL_BRUSH_SELECTED,e.InteractionStateName.DATA_CELL_BRUSH_SELECTED].some((function(e){return t.isStateOf(e)}))},t.prototype.isAllSelectedState=function(){return this.isStateOf(e.InteractionStateName.ALL_SELECTED)},t.prototype.isHoverFocusState=function(){return this.isStateOf(e.InteractionStateName.HOVER_FOCUS)},t.prototype.isHoverState=function(){return this.isStateOf(e.InteractionStateName.HOVER)},t.prototype.isActiveCell=function(e){return!!this.getCells().find((function(t){return e.getMeta().id===t.id&&e.cellType===t.type}))},t.prototype.isSelectedCell=function(e){return this.isSelectedState()&&this.isActiveCell(e)},t.prototype.getCells=function(e){var t=this.getState(),n=(null==t?void 0:t.cells)||[];return lv.isNil(e)?n:n.filter((function(t){return e.includes(t.type)}))},t.prototype.getActiveCells=function(){var e,t=this.getCells().map((function(e){return e.id})),n=null===(e=this.spreadsheet.facet)||void 0===e?void 0:e.getCells();return lv.map(t,(function(e){return lv.find(n,(function(t){var n;return(null===(n=null==t?void 0:t.getMeta())||void 0===n?void 0:n.id)===e}))})).filter(Boolean)},t.prototype.getActiveDataCells=function(){return this.getActiveCells().filter((function(t){return t.cellType===e.CellType.DATA_CELL}))},t.prototype.getActiveRowCells=function(){return this.getActiveCells().filter((function(t){return t.cellType===e.CellType.ROW_CELL}))},t.prototype.getActiveColCells=function(){return this.getActiveCells().filter((function(t){return t.cellType===e.CellType.COL_CELL}))},t.prototype.clearStyleIndependent=function(){(this.isSelectedState()||this.isHoverState()||this.isAllSelectedState())&&this.spreadsheet.facet.getDataCells().forEach((function(e){e.hideInteractionShape()}))},t.prototype.getUnSelectedDataCells=function(){var e=this;return this.spreadsheet.facet.getDataCells().filter((function(t){return!e.isActiveCell(t)}))},t.prototype.scrollToCellByMeta=function(e,t){if(void 0===t&&(t={animate:!0}),e){var n=t.skipScrollEvent,r=t.animate,A=this.spreadsheet.facet;(A.hRowScrollBar||A.hScrollBar||A.vScrollBar)&&this.scrollTo({skipScrollEvent:n,rowHeaderOffsetX:{value:e.x,animate:r},offsetX:{value:e.x-lv.get(A,"frozenGroupAreas.frozenCol.width",0),animate:r},offsetY:{value:e.y-lv.get(A,"frozenGroupAreas.frozenRow.height",0),animate:r}})}},t.prototype.scrollTo=function(e){var t=this.spreadsheet.facet,n=t.getScrollOffset(),r={skipScrollEvent:!1,offsetX:{value:n.scrollX,animate:!1},offsetY:{value:n.scrollY,animate:!1},rowHeaderOffsetX:{value:n.rowHeaderScrollX,animate:!1}};t.updateScrollOffset(TT(r,e))},t.prototype.scrollToNode=function(e,t){this.scrollToCellByMeta(e,t)},t.prototype.scrollToCell=function(e,t){this.scrollToCellByMeta(e.getMeta(),t)},t.prototype.scrollToCellById=function(e,t){if(e){var n=this.spreadsheet.facet.getHeaderNodes(),r=this.spreadsheet.facet.getDataCells().map((function(e){return e.getMeta()})),A=lt(lt([],st(n),!1),st(r),!1).find((function(t){return t.id===e}));A&&this.scrollToCellByMeta(A,t)}},t.prototype.scrollToTop=function(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetY:{value:0,animate:null==e?void 0:e.animate}})},t.prototype.scrollToRight=function(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetX:{value:this.spreadsheet.facet.panelBBox.maxX,animate:null==e?void 0:e.animate}})},t.prototype.scrollToBottom=function(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetY:{value:this.spreadsheet.facet.panelBBox.maxY,animate:null==e?void 0:e.animate}})},t.prototype.scrollToLeft=function(e){this.scrollTo({skipScrollEvent:null==e?void 0:e.skipScrollEvent,offsetX:{value:0,animate:null==e?void 0:e.animate}})},t.prototype.selectAll=function(){var t=this.spreadsheet.facet.getCells().map(gT);this.changeState({cells:t,stateName:e.InteractionStateName.ALL_SELECTED}),this.addIntercepts([e.InterceptType.HOVER]),this.updateCells(this.spreadsheet.facet.getCells())},t.prototype.highlightCell=function(t,n){this.changeCell(rt(rt({},n),{cell:t,stateName:e.InteractionStateName.HOVER}))},t.prototype.selectCell=function(t,n){this.changeCell(rt(rt({},n),{cell:t,stateName:e.InteractionStateName.SELECTED}))},t.prototype.changeCell=function(t){var n,r;void 0===t&&(t={});var A=t.event,i=t.cell,o=t.stateName,a=void 0===o?e.InteractionStateName.SELECTED:o,s=t.interactionName,l=t.scrollIntoView,u=void 0===l||l,c=t.animate,h=void 0===c||c,d=t.skipScrollEvent,f=void 0===d||d;if(!lv.isEmpty(i)){var p=null===(n=null==i?void 0:i.getMeta)||void 0===n?void 0:n.call(i);if(p&&!lv.isNil(null==p?void 0:p.x)){this.addIntercepts([e.InterceptType.HOVER]);var g=this.spreadsheet.isHierarchyTreeType(),v=(null==i?void 0:i.cellType)===e.CellType.COL_CELL,y=this.getState(),C=this.isSelectedCell(i),B=(null==t?void 0:t.isMultiSelection)&&this.isSelectedState(),m=C?[]:this.spreadsheet.facet.getCellChildrenNodes(i),w=C?[]:[gT(i)];if(B&&(w=lv.concat((null==y?void 0:y.cells)||[],w),m=lv.concat((null==y?void 0:y.nodes)||[],m),C&&(w=w.filter((function(e){return e.id!==p.id})),m=m.filter((function(e){return!(null==e?void 0:e.id.includes(p.id))})))),lv.isEmpty(w))return this.reset(),void this.emitSelectEvent({event:A,targetCell:i,interactionName:s});if(!this.shouldForbidHeaderCellSelected(w)){var E=lv.isEmpty(m)?[i.getMeta()]:m;this.changeState({cells:w,nodes:E,stateName:a});var x=ET(w);return this.updateCells(this.spreadsheet.facet.getHeaderCells(x)),g&&!v||this.highlightNodes(m,a),u&&this.scrollToCell(i,{skipScrollEvent:f,animate:h}),null===(r=this.spreadsheet.facet.centerFrame)||void 0===r||r.toFront(),this.emitSelectEvent({event:A,targetCell:i,interactionName:s}),!0}}}},t.prototype.hideColumns=function(){return it(this,arguments,void 0,(function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=!0),ot(this,(function(n){switch(n.label){case 0:return[4,dw(this.spreadsheet,e,t)];case 1:return n.sent(),[2]}}))}))},t.prototype.getBrushSelectionInfo=function(e){var t,n,r;return lv.isBoolean(e)?{dataCellBrushSelection:e,rowCellBrushSelection:e,colCellBrushSelection:e}:{dataCellBrushSelection:null!==(t=null==e?void 0:e.dataCell)&&void 0!==t&&t,rowCellBrushSelection:null!==(n=null==e?void 0:e.rowCell)&&void 0!==n&&n,colCellBrushSelection:null!==(r=null==e?void 0:e.colCell)&&void 0!==r&&r}},t.prototype.getDefaultInteractions=function(){var t=this.spreadsheet.options.interaction,n=t.resize,r=t.brushSelection,A=t.multiSelection,i=t.rangeSelection,o=t.selectedCellMove,a=this.getBrushSelectionInfo(r),s=a.dataCellBrushSelection,l=a.rowCellBrushSelection,u=a.colCellBrushSelection;return[{key:e.InteractionName.CORNER_CELL_CLICK,interaction:CI},{key:e.InteractionName.DATA_CELL_CLICK,interaction:BI},{key:e.InteractionName.ROW_COLUMN_CLICK,interaction:TI},{key:e.InteractionName.HEADER_CELL_LINK_CLICK,interaction:mI},{key:e.InteractionName.MERGED_CELLS_CLICK,interaction:wI},{key:e.InteractionName.PREVIEW_CLICK,interaction:SI},{key:e.InteractionName.HOVER,interaction:FI,enable:!Bm()},{key:e.InteractionName.DATA_CELL_BRUSH_SELECTION,interaction:LI,enable:!Bm()&&s},{key:e.InteractionName.ROW_CELL_BRUSH_SELECTION,interaction:QI,enable:!Bm()&&l},{key:e.InteractionName.COL_CELL_BRUSH_SELECTION,interaction:II,enable:!Bm()&&u},{key:e.InteractionName.COL_ROW_RESIZE,interaction:HI,enable:!Bm()&&n},{key:e.InteractionName.DATA_CELL_MULTI_SELECTION,interaction:UI,enable:!Bm()&&A},{key:e.InteractionName.RANGE_SELECTION,interaction:MI,enable:!Bm()&&i},{key:e.InteractionName.SELECTED_CELL_MOVE,interaction:kI,enable:!Bm()&&o}]},t.prototype.registerInteractions=function(){var e=this,t=this.spreadsheet.options.interaction.customInteractions;this.interactions.clear(),this.getDefaultInteractions().forEach((function(t){var n=t.key,r=t.interaction;!1!==t.enable&&e.interactions.set(n,new r(e.spreadsheet))})),lv.isEmpty(t)||lv.forEach(t,(function(t){var n=t.interaction;n&&e.interactions.set(t.key,new n(e.spreadsheet))}))},t.prototype.registerEventController=function(){this.eventController=new RI(this.spreadsheet)},t.prototype.draw=function(){var e=this;null!==this.drawRafId&&cancelAnimationFrame(this.drawRafId),this.drawRafId=requestAnimationFrame((function(){e.spreadsheet.container.render(),e.drawRafId=null}))},t.prototype.clearState=function(){xT(this.spreadsheet)&&this.draw()},t.prototype.changeState=function(t){var n=this,r=this.spreadsheet.interaction,A=t.cells,i=void 0===A?[]:A,o=t.force,a=t.stateName,s=t.onUpdateCells;if(lv.isEmpty(i)&&a===e.InteractionStateName.SELECTED)o&&r.changeState({cells:[],stateName:e.InteractionStateName.UNSELECTED});else{this.getCurrentStateName()===e.InteractionStateName.ALL_SELECTED&&this.clearStyleIndependent(),this.clearState(),this.setState(t);var l=function(){n.updateAllDataCells()};s?s(this,l):l(),this.draw()}},t.prototype.updateAllDataCells=function(){this.updateCells(this.spreadsheet.facet.getDataCells())},t.prototype.updateCells=function(e){void 0===e&&(e=[]),e.forEach((function(e){e.update()}))},t.prototype.addIntercepts=function(e){var t=this;void 0===e&&(e=[]),e.forEach((function(e){t.intercepts.add(e)}))},t.prototype.hasIntercepts=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.intercepts.has(e)}))},t.prototype.removeIntercepts=function(e){var t=this;void 0===e&&(e=[]),e.forEach((function(e){t.intercepts.delete(e)}))},t.prototype.clearHoverTimer=function(){clearTimeout(this.hoverTimer)},t.prototype.setHoverTimer=function(e){this.hoverTimer=e},t.prototype.getHoverTimer=function(){return this.hoverTimer},t.prototype.getSelectedCellHighlight=function(){var e,t=this.spreadsheet.options.interaction.selectedCellHighlight;if(lv.isBoolean(t))return{rowHeader:t,colHeader:t,currentRow:t,currentCol:t};var n=null!==(e=t)&&void 0!==e?e:{},r=n.rowHeader,A=void 0!==r&&r,i=n.colHeader,o=void 0!==i&&i,a=n.currentRow,s=void 0!==a&&a,l=n.currentCol;return{rowHeader:A,colHeader:o,currentRow:s,currentCol:void 0!==l&&l}},t.prototype.getHoverAfterScroll=function(){return this.spreadsheet.options.interaction.hoverAfterScroll},t.prototype.getHoverHighlight=function(){var e=this.spreadsheet.options.interaction.hoverHighlight;if(lv.isBoolean(e))return{rowHeader:e,colHeader:e,currentRow:e,currentCol:e};var t=null!=e?e:{},n=t.rowHeader,r=void 0!==n&&n,A=t.colHeader,i=void 0!==A&&A,o=t.currentRow,a=void 0!==o&&o,s=t.currentCol;return{rowHeader:r,colHeader:i,currentRow:a,currentCol:void 0!==s&&s}},t.prototype.getBrushSelection=function(){var e=this.spreadsheet.options.interaction.brushSelection;if(lv.isBoolean(e))return{dataCell:e,rowCell:e,colCell:e};var t=null!=e?e:{},n=t.dataCell,r=void 0!==n&&n,A=t.rowCell,i=void 0!==A&&A,o=t.colCell;return{dataCell:r,rowCell:i,colCell:void 0!==o&&o}},t.prototype.updateDataCellRelevantHeaderCells=function(e,t){this.updateDataCellRelevantColCells(e,t),this.updateDataCellRelevantRowCells(e,t)},t.prototype.updateDataCellRelevantRowCells=function(t,n){var r=n.rowId,A=this.spreadsheet,i=A.facet,o=A.interaction,a=t===e.InteractionStateName.HOVER;if((a?o.getHoverHighlight():o.getSelectedCellHighlight()).rowHeader&&r){var s=a?$S(r,i.getRowCells(),this.spreadsheet.isHierarchyTreeType()):yT(n,this.spreadsheet),l=lt(lt([],st(i.getSeriesNumberCells().filter((function(e){return s.find((function(t){return t.getMeta().y===e.getMeta().y}))}))),!1),st(s),!1);lv.forEach(l,(function(e){e.updateByState(t)}))}},t.prototype.updateDataCellRelevantColCells=function(t,n){var r=n.colId,A=this.spreadsheet,i=A.facet,o=A.interaction;(t===e.InteractionStateName.HOVER?o.getHoverHighlight():o.getSelectedCellHighlight()).colHeader&&r&&eT(r,i.getColCells(),t)},t.prototype.emitSelectEvent=function(t){var n,r=this.spreadsheet.interaction,A=t.cells,i=At(t,["cells"]),o=A||r.getActiveCells(),a=(null==i?void 0:i.targetCell)||o[0],s=rt(rt({},i),{targetCell:a}),l=null==a?void 0:a.cellType,u=(n={},n[e.CellType.CORNER_CELL]=e.S2Event.CORNER_CELL_SELECTED,n[e.CellType.ROW_CELL]=e.S2Event.ROW_CELL_SELECTED,n[e.CellType.COL_CELL]=e.S2Event.COL_CELL_SELECTED,n[e.CellType.DATA_CELL]=e.S2Event.DATA_CELL_SELECTED,n)[l];u&&(this.spreadsheet.emit(u,o,s),this.spreadsheet.emit(e.S2Event.GLOBAL_SELECTED,o,s))},t}(),_I="".concat(Gv,"-drill-down"),DI="".concat(Gv,"-strategy-sheet-tooltip"),PI={zh_CN:{"选择分析信息":"选择分析信息","切换指标":"切换指标","确定":"确定","取消":"取消","重置":"重置","请输入关键字搜索":"请输入关键字搜索","搜索":"搜索","恢复":"恢复","已选 {} 项":"已选 {} 项","所选项":"所选项","选择下钻维度":"选择下钻维度","恢复默认":"恢复默认","搜索字段":"搜索字段","行列切换":"行列切换","行头":"行头","列头":"列头","值":"值","展开子项":"展开子项","首字母":"首字母","手动排序":"手动排序","其他字段":"其他字段","高级排序":"高级排序","设置顺序":"设置顺序","可选字段":"可选字段","按以下规则进行排序（优先级由低到高）":"按以下规则进行排序（优先级由低到高）","按":"按","说明":"说明：","复制原始数据":"复制原始数据","复制格式化数据":"复制格式化数据","下载原始数据":"下载原始数据","下载格式化数据":"下载格式化数据","操作成功":"操作成功","操作失败":"操作失败","时间":"时间","指标":"指标","目标值":"目标值","自定义颜色":"自定义颜色","平铺":"平铺","树状":"树状","默认":"默认","多彩风":"多彩风","简约风":"简约风","极简风":"极简风","斑马纹风":"斑马纹风","主题风格":"主题风格","类型":"类型","主题":"主题","主色系":"主色系","深色主题":"深色主题","浅色主题":"浅色主题","灰色":"灰色","自定义":"自定义","文字对齐":"文字对齐","左对齐":"左对齐","居中":"居中","右对齐":"右对齐","表头":"表头","表身 (维度)":"表身 (维度)","表身 (指标)":"表身 (指标)","冻结行列头":"冻结行列头","行":"行","列":"列","冻结行":"冻结行","冻结列":"冻结列","冻结":"冻结","冻结前":"冻结前","冻结后":"冻结后"},en_US:{"选择分析信息":"Select Analysis Information","切换指标":"Switch indicator","确定":"Ok","取消":"Cancel","重置":"Reset","请输入关键字搜索":"Please enter a keyword search","搜索":"Search","恢复":"Recover","已选 {} 项":"selected {} item","所选项":"selected items","选择下钻维度":"Select drill down dimension","恢复默认":"Restore default","搜索字段":"Search field","行列切换":"Switch Dimensions","行头":"Rows","列头":"Cols","值":"Values","展开子项":"Expand Children","首字母":"Alphabetical order","手动排序":"Custom order","其他字段":"Other field","高级排序":"Advanced order","设置顺序":"SetManual","可选字段":"Fields","按以下规则进行排序（优先级由低到高）":"Order according to the following rules (from low to high priority)","按":"By","说明":"Description: ","复制原始数据":"Copy raw data","复制格式化数据":"Copy formatted data","下载原始数据":"Download raw data","下载格式化数据":"Download formatted data","操作成功":"Operation successful","操作失败":"Operation failed","时间":"Date","指标":"Measure","目标值":"Target Value","自定义颜色":"Custom color","平铺":"Grid","树状":"Tree","默认":"Default","多彩风":"Colorful","简约风":"Normal","极简风":"Basic","斑马纹风":"Zebra","主题风格":"Thematic style","类型":"Theme type","主题":"Theme color","主色系":"Primary color","深色主题":"Dark theme","浅色主题":"Light theme","灰色":"Gray","自定义":"Custom","文字对齐":"Text align","左对齐":"Align left","居中":"Align center","右对齐":"Align right","表头":"Header","表身 (维度)":"Body(dimension)","表身 (指标)":"Body(measure)","冻结行列头":"Frozen header","行":"Row","列":"Column","冻结行":"Frozen row","冻结列":"Frozen column","冻结":"Frozen","冻结前":"Freeze the first","冻结后":"Freeze the last"},ru_RU:{"选择分析信息":"Выберите информацию для анализа","切换指标":"Индикатор переключения","确定":"Подтвердить","取消":"Отмена","重置":"Сбросить","请输入关键字搜索":"Пожалуйста, введите поиск по ключевым словам","搜索":"Поиск","恢复":"Восстановить","已选 {} 项":"Выбран(-но) {} элемент(-а/-ов)","所选项":"выбранные элементы","选择下钻维度":"Выберите параметры детализации","恢复默认":"Сбросить до первоначального состояния","搜索字段":"Поисковое поле","行列切换":"Конфигурация отображения строк, столбцов и значений","行头":"Строки","列头":"Колонки","值":"Значения","展开子项":"Отобразить дочерние элементы","首字母":"Алфавитная сортировка","手动排序":"Ручная сортировка","其他字段":"Другое поле","高级排序":"Расширенная сортировка","设置顺序":"Установить сортировку","可选字段":"Необязательные поля","按以下规则进行排序（优先级由低到高）":"Порядок, определеяемый следующими правилами (от низкого приоритета к высокому)","按":"По","说明":"Описание: ","复制原始数据":"Копировать строковые данные","复制格式化数据":"Копировать отформатированные данные","下载原始数据":"Скачать строковые данные","下载格式化数据":"Скачать отформатированные данные","操作成功":"Операция успешно выполнена","操作失败":"Операция завершилась неудачно","时间":"Дата","指标":"Мера","目标值":"Целевое Значение"}},GI={tooltip:{enable:!0,autoAdjustBoundary:"body",operation:{hiddenColumns:!0,sort:!0}},showDefaultHeaderActionIcon:!0},KI="".concat(Gv,"-advanced-sort"),zI=function(e,t){var n=e.store.get("drillDownDataCache",[]),r=null==n?void 0:n.find((function(e){return e.rowId===t.id}));return{drillDownDataCache:n,drillDownCurrentCache:r}},VI=function(t){var n=t.meta,r=t.event,A=t.callback,i=n.spreadsheet;i.store.set("drillDownNode",n);var o=zI(i,n),a=o.drillDownDataCache,s=o.drillDownCurrentCache,l=(null==s?void 0:s.drillField)?[null==s?void 0:s.drillField]:[],u=[];a.forEach((function(e){n.id.includes(e.rowId)&&n.id!==e.rowId&&u.push(e.drillField)})),r&&i.emit(e.S2Event.GLOBAL_ACTION_ICON_CLICK,r),A({sheetInstance:i,cacheDrillFields:l,disabledFields:u,event:r})},WI=function(e){var t=e.spreadsheet,n=t.dataCfg.fields,r=lv.size(n.rows)-1,A=!!lv.isEmpty(n.values)||t.isValueInCols();return r<=e.level&&t.isHierarchyTreeType()&&A&&!e.isGrandTotals},XI=function(e,t){var n,r,A;return lv.isBoolean(t)?{container:e,adaptiveWidth:!0,adaptiveHeight:!1}:{container:(null===(n=null==t?void 0:t.getContainer)||void 0===n?void 0:n.call(t))||e,adaptiveWidth:null===(r=null==t?void 0:t.width)||void 0===r||r,adaptiveHeight:null===(A=null==t?void 0:t.height)||void 0===A||A}};function YI(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var jI=0;function ZI(e){return"__private_"+jI+++"_"+e}
/*!
   * @antv/g-canvas
   * @description A renderer implemented by Canvas 2D API
   * @version 2.2.0
   * @date 12/24/2025, 11:55:53 AM
   * @author AntVis
   * @docs https://g.antv.antgroup.com/
   */var JI=ZI("renderState"),qI=function(){function e(t){o(this,e),this.renderQueue=[],Object.defineProperty(this,JI,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=T(),this.dprMatrix=T(),this.tmpMat4=T(),this.vec3a=le(),this.vec3b=le(),this.vec3c=le(),this.vec3d=le(),this.canvasRendererPluginOptions=t}return s(e,[{key:"apply",value:function(t,n){var r=this;this.context=t;var A=this.context,i=A.config,o=A.camera,a=A.renderingService,s=A.renderingContext,l=A.pathGeneratorFactory,u=i.renderer.getConfig().enableRenderingOptimization;i.renderer.getConfig().enableDirtyCheck=!1,i.renderer.getConfig().enableDirtyRectangleRendering=!1,this.pathGeneratorFactory=l;var c=t.contextService,h=s.root.ownerDocument.defaultView;a.hooks.init.tap(e.tag,(function(){var e=c.getDPR(),t=i.width,n=i.height,A=c.getContext();r.clearRect(A,0,0,t*e,n*e,i.background)})),a.hooks.destroy.tap(e.tag,(function(){r.renderQueue=[],YI(r,JI)[JI]={restoreStack:[],prevObject:null,currentContext:null}}));var d=function(e,t){for(var A=[e];A.length>0;){var i,o=A.pop();o.isVisible()&&!o.isCulled()&&(u?r.renderDisplayObjectOptimized(o,t,r.context,YI(r,JI)[JI],n):r.renderDisplayObject(o,t,r.context,YI(r,JI)[JI],n));for(var a=(null===(i=o.sortable)||void 0===i||null===(i=i.sorted)||void 0===i?void 0:i.length)>0?o.sortable.sorted:o.childNodes,s=a.length-1;s>=0;s--)A.push(a[s])}};a.hooks.endFrame.tap(e.tag,(function(){if(function(){var e,t=c.getContext(),n=c.getDPR(),A=i.width,o=i.height,s=r.canvasRendererPluginOptions,l=s.dirtyObjectNumThreshold,u=s.dirtyObjectRatioThreshold,d=a.getStats(),f=d.total,p=d.rendered,g=p/f;r.clearFullScreen=r.clearFullScreenLastFrame||!(null!==(e=h.context.renderingPlugins[1])&&void 0!==e&&e.isFirstTimeRenderingFinished)||a.disableDirtyRectangleRendering()||p>l&&g>u,t&&("function"==typeof t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(t,0,0,A*n,o*n,i.background))}(),0!==s.root.childNodes.length){u=i.renderer.getConfig().enableRenderingOptimization,YI(r,JI)[JI]={restoreStack:[],prevObject:null,currentContext:YI(r,JI)[JI].currentContext},YI(r,JI)[JI].currentContext.clear(),r.clearFullScreenLastFrame=!1;var e=c.getContext(),t=c.getDPR();if(P(r.dprMatrix,[t,t,1]),H(r.vpMatrix,r.dprMatrix,o.getOrthoMatrix()),r.clearFullScreen)u?(e.save(),d(s.root,e),e.restore()):d(s.root,e);else{var A=r.safeMergeAABB(r.mergeDirtyAABBs(r.renderQueue));if(Nn.isEmpty(A))return void(r.renderQueue=[]);var l=r.convertAABB2Rect(A),f=l.x,p=l.y,g=l.width,v=l.height,C=we(r.vec3a,[f,p,0],r.vpMatrix),B=we(r.vec3b,[f+g,p,0],r.vpMatrix),m=we(r.vec3c,[f,p+v,0],r.vpMatrix),w=we(r.vec3d,[f+g,p+v,0],r.vpMatrix),E=Math.min(C[0],B[0],w[0],m[0]),x=Math.min(C[1],B[1],w[1],m[1]),S=Math.max(C[0],B[0],w[0],m[0]),T=Math.max(C[1],B[1],w[1],m[1]),F=Math.floor(E),b=Math.floor(x),I=Math.ceil(S-E),L=Math.ceil(T-x);e.save(),r.clearRect(e,F,b,I,L,i.background),e.beginPath(),e.rect(F,b,I,L),e.clip(),e.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]),i.renderer.getConfig().enableDirtyRectangleRenderingDebug&&h.dispatchEvent(new ua(Os.DIRTY_RECTANGLE,{dirtyRect:{x:F,y:b,width:I,height:L}}));var Q=y(A.getMin(),2),U=Q[0],R=Q[1],M=y(A.getMax(),2),O=M[0],k=M[1];s.root.ownerDocument.elementsFromBBox(U,R,O,k).sort((function(e,t){return e.sortable.renderOrder-t.sortable.renderOrder})).forEach((function(t){t&&t.isVisible()&&!t.isCulled()&&r.renderDisplayObject(t,e,r.context,YI(r,JI)[JI],n)})),e.restore(),r.renderQueue.forEach((function(e){r.saveDirtyAABB(e)})),r.renderQueue=[]}YI(r,JI)[JI].restoreStack.forEach((function(){e.restore()})),YI(r,JI)[JI].restoreStack=[]}else r.clearFullScreenLastFrame=!0})),a.hooks.render.tap(e.tag,(function(e){r.clearFullScreen||r.renderQueue.push(e)}))}},{key:"clearRect",value:function(e,t,n,r,A,i){e.clearRect(t,n,r,A),i&&(e.fillStyle=i,e.fillRect(t,n,r,A))}},{key:"renderDisplayObjectOptimized",value:function(e,t,n,r,A){var i=e.nodeName,o=!1,a=this.context.styleRendererFactory[i],s=this.pathGeneratorFactory[i],l=e.parsedStyle.clipPath;if(l){(!r.prevObject||!ie(l.getWorldTransform(),r.prevObject.getWorldTransform()))&&(this.applyWorldTransform(t,l),r.prevObject=null);var u=this.pathGeneratorFactory[l.nodeName];u&&(t.save(),o=!0,t.beginPath(),u(t,l.parsedStyle),t.closePath(),t.clip())}if(a){(!r.prevObject||!ie(e.getWorldTransform(),r.prevObject.getWorldTransform()))&&this.applyWorldTransform(t,e);var c=!r.prevObject;if(!c){var h=r.prevObject.nodeName;c=i===bn.TEXT?h!==bn.TEXT:i===bn.IMAGE?h!==bn.IMAGE:h===bn.TEXT||h===bn.IMAGE}a.applyStyleToContext(t,e,c,r),r.prevObject=e}s&&(t.beginPath(),s(t,e.parsedStyle),i!==bn.LINE&&i!==bn.PATH&&i!==bn.POLYLINE&&t.closePath()),a&&a.drawToContext(t,e,YI(this,JI)[JI],this,A),o&&t.restore(),e.dirty(!1)}},{key:"renderDisplayObject",value:function(e,t,n,r,A){var i=e.nodeName,o=r.restoreStack[r.restoreStack.length-1];!o||e.compareDocumentPosition(o)&ha.DOCUMENT_POSITION_CONTAINS||(t.restore(),r.restoreStack.pop());var a=this.context.styleRendererFactory[i],s=this.pathGeneratorFactory[i],l=e.parsedStyle.clipPath;if(l){this.applyWorldTransform(t,l);var u=this.pathGeneratorFactory[l.nodeName];u&&(t.save(),r.restoreStack.push(e),t.beginPath(),u(t,l.parsedStyle),t.closePath(),t.clip())}a&&(this.applyWorldTransform(t,e),t.save(),this.applyAttributesToContext(t,e)),s&&(t.beginPath(),s(t,e.parsedStyle),i!==bn.LINE&&i!==bn.PATH&&i!==bn.POLYLINE&&t.closePath()),a&&(a.render(t,e.parsedStyle,e,n,this,A),t.restore()),e.dirty(!1)}},{key:"applyAttributesToContext",value:function(e,t){var n=t.parsedStyle,r=n.stroke,A=n.fill,i=n.opacity,o=n.lineDash,a=n.lineDashOffset;o&&e.setLineDash(o),Ge(a)||(e.lineDashOffset=a),Ge(i)||(e.globalAlpha*=i),Ge(r)||Array.isArray(r)||r.isNone||(e.strokeStyle=t.attributes.stroke),Ge(A)||Array.isArray(A)||A.isNone||(e.fillStyle=t.attributes.fill)}},{key:"convertAABB2Rect",value:function(e){var t=e.getMin(),n=e.getMax(),r=Math.floor(t[0]),A=Math.floor(t[1]);return{x:r,y:A,width:Math.ceil(n[0])-r,height:Math.ceil(n[1])-A}}},{key:"mergeDirtyAABBs",value:function(e){var t=new Nn;return e.forEach((function(e){var n=e.getRenderBounds();t.add(n);var r=e.renderable.dirtyRenderBounds;r&&t.add(r)})),t}},{key:"saveDirtyAABB",value:function(e){var t=e.renderable;t.dirtyRenderBounds||(t.dirtyRenderBounds=new Nn);var n=e.getRenderBounds();n&&t.dirtyRenderBounds.update(n.center,n.halfExtents)}},{key:"applyWorldTransform",value:function(e,t,n){n?(b(this.tmpMat4,t.getLocalTransform()),H(this.tmpMat4,n,this.tmpMat4),H(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(b(this.tmpMat4,t.getWorldTransform()),H(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var e=new Nn,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.add(t)})),e}}])}();function $I(e,t,n,r,A,i,o){var a,s;if("rect"===e.image.nodeName){var l=e.image.parsedStyle,u=l.width,c=l.height;s=r.contextService.getDPR();var h=r.config.offscreenCanvas;(a=i.offscreenCanvasCreator.getOrCreateCanvas(h)).width=u*s,a.height=c*s;var d=i.offscreenCanvasCreator.getOrCreateContext(h),f={restoreStack:[],prevObject:null,currentContext:new Map};e.image.forEach((function(e){A.renderDisplayObject(e,d,r,f,i)})),f.restoreStack.forEach((function(){d.restore()}))}return o.getOrCreatePatternSync(t,e,n,a,s,t.getGeometryBounds().min,(function(){t.dirty(),r.renderingService.dirty()}))}function eL(e,t,n,r){var A;if(e.type===fA.LinearGradient||e.type===fA.RadialGradient){var o=t.getGeometryBounds(),a=o&&2*o.halfExtents[0]||1,s=o&&2*o.halfExtents[1]||1,l=o&&o.min||[0,0];A=r.getOrCreateGradient(i(i({type:e.type},e.value),{},{min:l,width:a,height:s}),n)}return A}qI.tag="CanvasRenderer";var tL=["shadowBlur","shadowOffsetX","shadowOffsetY"],nL=["lineCap","lineJoin","miterLimit"],rL={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},AL={};function iL(e,t,n,r){var A=r.has(t)?r.get(t):rL[t];return A!==n&&("lineDash"===t?e.setLineDash(n):e[t]=n,r.set(t,n)),A}var oL=function(){return s((function e(t){o(this,e),this.imagePool=t}),[{key:"applyAttributesToContext",value:function(e,t){}},{key:"render",value:function(e,t,n,r,A,i){}},{key:"applyCommonStyleToContext",value:function(e,t,n,r){var A=n?AL:r.prevObject.parsedStyle,i=t.parsedStyle;(n||i.opacity!==A.opacity)&&iL(e,"globalAlpha",Ge(i.opacity)?rL.globalAlpha:i.opacity,r.currentContext),(n||i.blend!==A.blend)&&iL(e,"globalCompositeOperation",Ge(i.blend)?rL.globalCompositeOperation:i.blend,r.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(e,t,n,r){var A=n?AL:r.prevObject.parsedStyle,i=t.parsedStyle,o=i.lineWidth,a=void 0===o?rL.lineWidth:o,s=i.fill&&!i.fill.isNone;if(i.stroke&&!i.stroke.isNone&&a>0){if(n||t.attributes.stroke!==r.prevObject.attributes.stroke)iL(e,"strokeStyle",Ge(i.stroke)||Array.isArray(i.stroke)||i.stroke.isNone?rL.strokeStyle:t.attributes.stroke,r.currentContext);(n||i.lineWidth!==A.lineWidth)&&iL(e,"lineWidth",Ge(i.lineWidth)?rL.lineWidth:i.lineWidth,r.currentContext),(n||i.lineDash!==A.lineDash)&&iL(e,"lineDash",i.lineDash||rL.lineDash,r.currentContext),(n||i.lineDashOffset!==A.lineDashOffset)&&iL(e,"lineDashOffset",Ge(i.lineDashOffset)?rL.lineDashOffset:i.lineDashOffset,r.currentContext);for(var l=0;l<nL.length;l++){var u=nL[l];(n||i[u]!==A[u])&&iL(e,u,Ge(i[u])?rL[u]:i[u],r.currentContext)}}s&&(n||t.attributes.fill!==r.prevObject.attributes.fill)&&iL(e,"fillStyle",Ge(i.fill)||Array.isArray(i.fill)||i.fill.isNone?rL.fillStyle:t.attributes.fill,r.currentContext)}},{key:"applyStyleToContext",value:function(e,t,n,r){var A=t.nodeName;this.applyCommonStyleToContext(e,t,n,r),A===bn.IMAGE||this.applyStrokeFillStyleToContext(e,t,n,r)}},{key:"applyShadowAndFilterStyleToContext",value:function(e,t,n,r){var A=t.parsedStyle;if(n){iL(e,"shadowColor",A.shadowColor.toString(),r.currentContext);for(var i=0;i<tL.length;i++){var o=tL[i];iL(e,o,A[o]||rL[o],r.currentContext)}}A.filter&&A.filter.length&&iL(e,"filter",t.attributes.filter,r.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(e,t,n,r){var A=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(t){iL(e,"shadowColor",rL.shadowColor,r.currentContext);for(var i=0;i<tL.length;i++){var o=tL[i];iL(e,o,rL[o],r.currentContext)}}if(n)if(t&&A){var a=e.filter;!Ge(a)&&a.indexOf("drop-shadow")>-1&&iL(e,"filter",a.replace(/drop-shadow\([^)]*\)/,"").trim()||rL.filter,r.currentContext)}else iL(e,"filter",rL.filter,r.currentContext)}},{key:"fillToContext",value:function(e,t,n,r,A){var i=this,o=t.parsedStyle,a=o.fill,s=o.fillRule,l=null;if(Array.isArray(a)&&a.length>0)a.forEach((function(r){var A=iL(e,"fillStyle",eL(r,t,e,i.imagePool),n.currentContext);l=null!=l?l:A,s?e.fill(s):e.fill()}));else{if(NA(a)){var u=$I(a,t,e,t.ownerDocument.defaultView.context,r,A,this.imagePool);u&&(e.fillStyle=u,l=!0)}s?e.fill(s):e.fill()}null!==l&&iL(e,"fillStyle",l,n.currentContext)}},{key:"strokeToContext",value:function(e,t,n,r,A){var i=this,o=t.parsedStyle.stroke,a=null;if(Array.isArray(o)&&o.length>0)o.forEach((function(r){var A=iL(e,"strokeStyle",eL(r,t,e,i.imagePool),n.currentContext);a=null!=a?a:A,e.stroke()}));else{if(NA(o)){var s=$I(o,t,e,t.ownerDocument.defaultView.context,r,A,this.imagePool);if(s){var l=iL(e,"strokeStyle",s,n.currentContext);a=null!=a?a:l}}e.stroke()}null!==a&&iL(e,"strokeStyle",a,n.currentContext)}},{key:"drawToContext",value:function(e,t,n,r,A){var i,o=t.nodeName,a=t.parsedStyle,s=a.opacity,l=void 0===s?rL.globalAlpha:s,u=a.fillOpacity,c=void 0===u?rL.fillOpacity:u,h=a.strokeOpacity,d=void 0===h?rL.strokeOpacity:h,f=a.lineWidth,p=void 0===f?rL.lineWidth:f,g=a.fill&&!a.fill.isNone,v=a.stroke&&!a.stroke.isNone&&p>0;if(g||v){var y=!Ge(a.shadowColor)&&a.shadowBlur>0,C="inner"===a.shadowType,B=0===(null===(i=a.fill)||void 0===i?void 0:i.alpha),m=!(!a.filter||!a.filter.length),w=y&&v&&(o===bn.PATH||o===bn.LINE||o===bn.POLYLINE||B||C),E=null;if(g)w||this.applyShadowAndFilterStyleToContext(e,t,y,n),E=iL(e,"globalAlpha",l*c,n.currentContext),this.fillToContext(e,t,n,r,A),w||this.clearShadowAndFilterStyleForContext(e,y,m,n);if(v){var x=!1,S=iL(e,"globalAlpha",l*d,n.currentContext);if(E=g?E:S,w&&(this.applyShadowAndFilterStyleToContext(e,t,y,n),x=!0,C)){var T=e.globalCompositeOperation;e.globalCompositeOperation="source-atop",this.strokeToContext(e,t,n,r,A),e.globalCompositeOperation=T,this.clearShadowAndFilterStyleForContext(e,y,m,n,!0)}this.strokeToContext(e,t,n,r,A),x&&this.clearShadowAndFilterStyleForContext(e,y,m,n)}null!==E&&iL(e,"globalAlpha",E,n.currentContext)}}}])}(),aL=function(e){function t(){return o(this,t),p(this,t,arguments)}return v(t,e),s(t,[{key:"render",value:function(e,t,n,r,A,i){var o=t.fill,a=t.fillRule,s=t.opacity,l=void 0===s?1:s,u=t.fillOpacity,c=void 0===u?1:u,h=t.stroke,d=t.strokeOpacity,f=void 0===d?1:d,p=t.lineWidth,g=void 0===p?1:p,v=t.lineCap,y=t.lineJoin,C=t.shadowType,B=t.shadowColor,m=t.shadowBlur,w=t.filter,E=t.miterLimit,x=o&&!o.isNone,S=h&&!h.isNone&&g>0,T=0===(null==o?void 0:o.alpha),F=!(!w||!w.length),b=!Ge(B)&&m>0,I=n.nodeName,L="inner"===C,Q=S&&b&&(I===bn.PATH||I===bn.LINE||I===bn.POLYLINE||T||L);x&&(e.globalAlpha=l*c,Q||sL(n,e,b),lL(e,n,o,a,r,A,i,this.imagePool),Q||this.clearShadowAndFilter(e,F,b)),S&&(e.globalAlpha=l*f,e.lineWidth=g,Ge(E)||(e.miterLimit=E),Ge(v)||(e.lineCap=v),Ge(y)||(e.lineJoin=y),Q&&(L&&(e.globalCompositeOperation="source-atop"),sL(n,e,!0),L&&(uL(e,n,h,r,A,i,this.imagePool),e.globalCompositeOperation=rL.globalCompositeOperation,this.clearShadowAndFilter(e,F,!0))),uL(e,n,h,r,A,i,this.imagePool))}},{key:"clearShadowAndFilter",value:function(e,t,n){if(n&&(e.shadowColor="transparent",e.shadowBlur=0),t){var r=e.filter;!Ge(r)&&r.indexOf("drop-shadow")>-1&&(e.filter=r.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(oL);function sL(e,t,n){var r=e.parsedStyle,A=r.filter,i=r.shadowColor,o=r.shadowBlur,a=r.shadowOffsetX,s=r.shadowOffsetY;A&&A.length&&(t.filter=e.style.filter),n&&(t.shadowColor=i.toString(),t.shadowBlur=o||0,t.shadowOffsetX=a||0,t.shadowOffsetY=s||0)}function lL(e,t,n,r,A,i,o,a){var s=arguments.length>8&&void 0!==arguments[8]&&arguments[8];Array.isArray(n)?n.forEach((function(n){e.fillStyle=eL(n,t,e,a),s||(r?e.fill(r):e.fill())})):(NA(n)&&(e.fillStyle=$I(n,t,e,A,i,o,a)),s||(r?e.fill(r):e.fill()))}function uL(e,t,n,r,A,i,o){var a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];Array.isArray(n)?n.forEach((function(n){e.strokeStyle=eL(n,t,e,o),a||e.stroke()})):(NA(n)&&(e.strokeStyle=$I(n,t,e,r,A,i,o)),a||e.stroke())}var cL=function(e){function t(){return o(this,t),p(this,t,arguments)}return v(t,e),s(t,[{key:"renderDownSampled",value:function(e,t,n,r){var A=r.src,i=r.imageCache;i.downSampled?e.drawImage(i.downSampled,Math.floor(r.drawRect[0]),Math.floor(r.drawRect[1]),Math.ceil(r.drawRect[2]),Math.ceil(r.drawRect[3])):this.imagePool.createDownSampledImage(A,n).then((function(){n.ownerDocument&&(n.dirty(),n.ownerDocument.defaultView.context.renderingService.dirty())})).catch((function(e){console.error(e)}))}},{key:"renderTile",value:function(e,t,n,r){var A=r.src,i=r.imageCache,o=r.imageRect,a=r.drawRect,s=i.size,l=e.getTransform(),u=l.a,c=l.b,h=l.c,d=l.d,f=l.e,p=l.f;if(e.resetTransform(),null!=i&&i.gridSize){for(var g=[s[0]/o[2],s[1]/o[3]],v=[i.tileSize[0]/g[0],i.tileSize[1]/g[1]],y=[Math.floor((a[0]-o[0])/v[0]),Math.ceil((a[0]+a[2]-o[0])/v[0])],C=y[0],B=y[1],m=[Math.floor((a[1]-o[1])/v[1]),Math.ceil((a[1]+a[3]-o[1])/v[1])],w=m[1],E=m[0];E<=w;E++)for(var x=C;x<=B;x++){var S=i.tiles[E][x];if(S){var T=[Math.floor(o[0]+S.tileX*v[0]),Math.floor(o[1]+S.tileY*v[1]),Math.ceil(v[0]),Math.ceil(v[1])];e.drawImage(S.data,T[0],T[1],T[2],T[3])}}e.setTransform(u,c,h,d,f,p)}else this.imagePool.createImageTiles(A,[],(function(){n.ownerDocument&&(n.dirty(),n.ownerDocument.defaultView.context.renderingService.dirty())}),n).catch((function(e){console.error(e)}))}},{key:"render",value:function(e,n,r){var A=n.x,i=void 0===A?0:A,o=n.y,a=void 0===o?0:o,s=n.width,l=n.height,u=n.src,c=n.shadowColor,h=n.shadowBlur,d=this.imagePool.getImageSync(u,r),f=null==d?void 0:d.img,p=s,g=l;if(f){var v,C,B,m,w,E,x,S,T,F,b,L,Q,U,R;p||(p=f.width),g||(g=f.height),sL(r,e,!Ge(c)&&h>0);try{var M=r.ownerDocument.defaultView.getContextService().getDomElement(),H=M.width,O=M.height,k=e.getTransform(),N=k.a,_=k.b,D=function(e,t){var n=we(le(),[e[0],e[1],0],t),r=we(le(),[e[0]+e[2],e[1],0],t),A=we(le(),[e[0],e[1]+e[3],0],t),i=we(le(),[e[0]+e[2],e[1]+e[3],0],t);return[Math.min(n[0],r[0],A[0],i[0]),Math.min(n[1],r[1],A[1],i[1]),Math.max(n[0],r[0],A[0],i[0])-Math.min(n[0],r[0],A[0],i[0]),Math.max(n[1],r[1],A[1],i[1])-Math.min(n[1],r[1],A[1],i[1])]}([i,a,p,g],I(N,k.c,0,0,_,k.d,0,0,0,0,1,0,k.e,k.f,0,1)),P=(v=D,C=y([0,0,H,O],4),B=C[0],m=C[1],w=C[2],E=C[3],x=y(v,4),S=x[0],T=x[1],F=x[2],b=x[3],L=Math.max(B,S),Q=Math.max(m,T),U=Math.min(B+w,S+F),R=Math.min(m+E,T+b),U<=L||R<=Q?null:[L,Q,U-L,R-Q]);if(!P)return;if(!r.ownerDocument.defaultView.getConfig().enableLargeImageOptimization)return void t.renderFull(e,n,r,{image:f,drawRect:[i,a,p,g]});if(D[2]/d.size[0]<(d.downSamplingRate||.5))return void this.renderDownSampled(e,n,r,{src:u,imageCache:d,drawRect:[i,a,p,g]});if(!ImagePool.isSupportTile)return void t.renderFull(e,n,r,{image:f,drawRect:[i,a,p,g]});this.renderTile(e,n,r,{src:u,imageCache:d,imageRect:D,drawRect:P})}catch(e){}}}},{key:"drawToContext",value:function(e,t,n,r,A){this.render(e,t.parsedStyle,t)}}],[{key:"renderFull",value:function(e,t,n,r){e.drawImage(r.image,Math.floor(r.drawRect[0]),Math.floor(r.drawRect[1]),Math.ceil(r.drawRect[2]),Math.ceil(r.drawRect[3]))}}])}(aL),hL=function(e){function t(){return o(this,t),p(this,t,arguments)}return v(t,e),s(t,[{key:"render",value:function(e,t,n,r,A,i){n.getBounds();var o=t.lineWidth,a=void 0===o?1:o,s=t.textAlign,l=void 0===s?"start":s,u=t.textBaseline,c=void 0===u?"alphabetic":u,h=t.lineJoin,d=void 0===h?"miter":h,f=t.miterLimit,p=void 0===f?10:f,g=t.letterSpacing,v=void 0===g?0:g,y=t.stroke,C=t.fill,B=t.fillRule,m=t.fillOpacity,w=void 0===m?1:m,E=t.strokeOpacity,x=void 0===E?1:E,S=t.opacity,T=void 0===S?1:S,F=t.metrics,b=t.x,I=void 0===b?0:b,L=t.y,Q=void 0===L?0:L,U=t.dx,R=t.dy,M=t.shadowColor,H=t.shadowBlur,O=t.textDecorationLine,k=F.font,N=F.lines,_=F.height,D=F.lineHeight,P=F.lineMetrics;e.font=k,e.lineWidth=a,e.textAlign="middle"===l?"center":l;var G=c;"alphabetic"===G&&(G="bottom"),e.lineJoin=d,Ge(p)||(e.miterLimit=p);var K=Q;"middle"===c?K+=-_/2-D/2:"bottom"===c||"alphabetic"===c||"ideographic"===c?K+=-_:"top"!==c&&"hanging"!==c||(K+=-D);var z=I+(U||0);K+=R||0,1===N.length&&("bottom"===G?(G="middle",K-=.5*_):"top"===G&&(G="middle",K+=.5*_)),e.textBaseline=G,sL(n,e,!Ge(M)&&H>0);for(var V=0;V<N.length;V++){var W=a/2+z;K+=D,Ge(y)||y.isNone||!a||this.drawLetterSpacing(e,n,N[V],P[V],l,W,K,v,C,B,w,y,x,T,!0,r,A,i),Ge(C)||this.drawLetterSpacing(e,n,N[V],P[V],l,W,K,v,C,B,w,y,x,T,!1,r,A,i)}O&&"none"!==O&&this.drawTextDecorations(e,t,n,N,D,z,Q+(R||0),r,A,i)}},{key:"drawLetterSpacing",value:function(e,t,n,r,A,i,o,a,s,l,u,c,h,d,f,p,g,v){if(0!==a){var y=e.textAlign;e.textAlign="left";var C=i;"center"===A||"middle"===A?C=i-r.width/2:"right"!==A&&"end"!==A||(C=i-r.width);for(var B=Array.from(n),m=e.measureText(n).width,w=0,E=0;E<B.length;++E){var x=B[E];f?this.strokeText(e,t,x,C,o,c,h,p,g,v):this.fillText(e,t,x,C,o,s,l,u,d,p,g,v),C+=m-(w=e.measureText(n.substring(E+1)).width)+a,m=w}e.textAlign=y}else f?this.strokeText(e,t,n,i,o,c,h,p,g,v):this.fillText(e,t,n,i,o,s,l,u,d,p,g,v)}},{key:"fillText",value:function(e,t,n,r,A,i,o,a,s,l,u,c){var h;lL(e,t,i,o,l,u,c,this.imagePool,!0);var d=!Ge(a)&&1!==a;d&&(h=e.globalAlpha,e.globalAlpha=a*s),e.fillText(n,r,A),d&&(e.globalAlpha=h)}},{key:"strokeText",value:function(e,t,n,r,A,i,o,a,s,l){var u;uL(e,t,i,a,s,l,this.imagePool,!0);var c=!Ge(o)&&1!==o;c&&(u=e.globalAlpha,e.globalAlpha=o),e.strokeText(n,r,A),c&&(e.globalAlpha=u)}},{key:"drawTextDecorations",value:function(e,t,n,r,A,i,o,a,s,l){var u=t.textDecorationLine,c=t.textDecorationColor,h=t.textDecorationStyle,d=t.textDecorationThickness,f=void 0===d?1:d,p=t.textAlign,g=void 0===p?"start":p,v=t.lineWidth,y=void 0===v?1:v,C=t.metrics;if(u&&"none"!==u){var B=C.lineMetrics,m=u.split(" ");switch(e.lineWidth=f,c&&(e.strokeStyle="rgba(".concat(c.r,", ").concat(c.g,", ").concat(c.b,", ").concat(c.alpha,")")),h){case"dashed":e.setLineDash([5,5]);break;case"dotted":e.setLineDash([2,2]);break;default:e.setLineDash([])}var w=o,E=t.textBaseline,x=void 0===E?"alphabetic":E;"middle"===x?w+=-C.height/2-A/2:"bottom"===x||"alphabetic"===x||"ideographic"===x?w+=-C.height:"top"!==x&&"hanging"!==x||(w+=-A);for(var S=0;S<r.length;S++){w+=A;var T=B[S];if(T){var F=y/2,b=i,I=i+T.width;"center"===g||"middle"===g?(b=i-T.width/2,I=i+T.width/2):"right"!==g&&"end"!==g||(b=i-T.width,I=i),b+=F,I+=F;var L,Q=Tn(m);try{for(Q.s();!(L=Q.n()).done;){var U=L.value,R=w;switch(U){case"underline":R+=2;break;case"overline":R-=A-2;break;case"line-through":R-=A/2;break;default:continue}"wavy"===h?this.drawWavyLine(e,b,I,R):(e.beginPath(),e.moveTo(b,R),e.lineTo(I,R),e.stroke())}}catch(e){Q.e(e)}finally{Q.f()}}}e.setLineDash([])}}},{key:"drawWavyLine",value:function(e,t,n,r){var A=10,i=Math.floor((n-t)/A);e.beginPath(),e.moveTo(t,r);for(var o=0;o<i;o++){var a=t+o*A+2.5,s=r+2,l=t+o*A+5,u=r;e.quadraticCurveTo(a,s,l,u);var c=t+o*A+7.5,h=r-2,d=t+(o+1)*A,f=r;e.quadraticCurveTo(c,h,d,f)}e.stroke()}},{key:"drawToContext",value:function(e,t,n,r,A){this.render(e,t.parsedStyle,t,t.ownerDocument.defaultView.context,r,A)}}])}(aL),dL=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(this,t),(e=p(this,t)).name="canvas-renderer",e.options=n,e}return v(t,e),s(t,[{key:"init",value:function(){var e,t=i({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,A=new aL(n),o=(r(r(r(r(r(r(r(r(r(r(e={},bn.CIRCLE,A),bn.ELLIPSE,A),bn.RECT,A),bn.IMAGE,new cL(n)),bn.TEXT,new hL(n)),bn.LINE,A),bn.POLYLINE,A),bn.POLYGON,A),bn.PATH,A),bn.GROUP,void 0),r(r(r(e,bn.HTML,void 0),bn.MESH,void 0),bn.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new qI(t))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(Ln),fL=le(),pL=le(),gL=le(),vL=T(),yL=function(){function e(){var t=this;o(this,e),this.isHit=function(e,n,r,A){var i=t.context.pointInPathPickerFactory[e.nodeName];if(i){var o=R(vL,r),a=we(pL,fe(gL,n[0],n[1],0),o);if(i(e,new Gn(a[0],a[1]),A,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(e,n){var r=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),A=t.context.pathGeneratorFactory[e.nodeName];return A&&(r.beginPath(),A(r,e.parsedStyle),r.closePath()),r.isPointInPath(n.x,n.y)}}return s(e,[{key:"apply",value:function(t,n){var r,A=this,i=t.renderingService,o=t.renderingContext;this.context=t,this.runtime=n;var a=null===(r=o.root)||void 0===r?void 0:r.ownerDocument;i.hooks.pick.tapPromise(e.tag,function(){var e=Sn(En().mark((function e(t){return En().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",A.pick(a,t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),i.hooks.pickSync.tap(e.tag,(function(e){return A.pick(a,e)}))}},{key:"pick",value:function(e,t){var n,r=t.topmost,A=t.position,i=A.x,o=A.y,a=fe(fL,i,o,0),s=[],l=Tn(e.elementsFromBBox(a[0],a[1],a[0],a[1]));try{for(l.s();!(n=l.n()).done;){var u=n.value,c=u.getWorldTransform();if(this.isHit(u,a,c,!1)){var h=fo(u);if(h){var d=h.parsedStyle.clipPath;if(this.isHit(d,a,d.getWorldTransform(),!0)){if(r)return t.picked=[u],t;s.push(u)}}else{if(r)return t.picked=[u],t;s.push(u)}}}}catch(e){l.e(e)}finally{l.f()}return t.picked=s,t}}])}();function CL(e,t,n){var r=e.parsedStyle,A=r.cx,i=void 0===A?0:A,o=r.cy,a=void 0===o?0:o,s=r.r,l=r.fill,u=r.stroke,c=r.lineWidth,h=void 0===c?1:c,d=r.increasedLineWidthForHitTesting,f=void 0===d?0:d,p=r.pointerEvents,g=void 0===p?"auto":p,v=(h+f)/2,C=jt(i,a,t.x,t.y),B=y(Co(g,l,u),2),m=B[0],w=B[1];return m&&w||n?C<=s+v:m?C<=s:!!w&&(C>=s-v&&C<=s+v)}function BL(e,t,n,r){return e/(n*n)+t/(r*r)}function mL(e,t,n){var r=e.parsedStyle,A=r.cx,i=void 0===A?0:A,o=r.cy,a=void 0===o?0:o,s=r.rx,l=r.ry,u=r.fill,c=r.stroke,h=r.lineWidth,d=void 0===h?1:h,f=r.increasedLineWidthForHitTesting,p=void 0===f?0:f,g=r.pointerEvents,v=void 0===g?"auto":g,C=t.x,B=t.y,m=y(Co(v,u,c),2),w=m[0],E=m[1],x=(d+p)/2,S=(C-i)*(C-i),T=(B-a)*(B-a);return w&&E||n?BL(S,T,s+x,l+x)<=1:w?BL(S,T,s,l)<=1:!!E&&(BL(S,T,s-x,l-x)>=1&&BL(S,T,s+x,l+x)<=1)}function wL(e,t,n,r,A,i){return A>=e&&A<=e+n&&i>=t&&i<=t+r}function EL(e,t,n,r,A,i,o,a){var s=(Math.atan2(a-t,o-e)+2*Math.PI)%(2*Math.PI),l={x:e+n*Math.cos(s),y:t+n*Math.sin(s)};return jt(l.x,l.y,o,a)<=i/2}function xL(e,t,n,r,A,i,o){var a=Math.min(e,n),s=Math.max(e,n),l=Math.min(t,r),u=Math.max(t,r),c=A/2;return i>=a-c&&i<=s+c&&o>=l-c&&o<=u+c&&An(e,t,n,r,i,o)<=A/2}function SL(e,t,n,r,A){var i=e.length;if(i<2)return!1;for(var o=0;o<i-1;o++){if(xL(e[o][0],e[o][1],e[o+1][0],e[o+1][1],t,n,r))return!0}if(A){var a=e[0],s=e[i-1];if(xL(a[0],a[1],s[0],s[1],t,n,r))return!0}return!1}yL.tag="CanvasPicker";var TL=1e-6;function FL(e){return Math.abs(e)<TL?0:e<0?-1:1}function bL(e,t,n){return(n[0]-e[0])*(t[1]-e[1])==(t[0]-e[0])*(n[1]-e[1])&&Math.min(e[0],t[0])<=n[0]&&n[0]<=Math.max(e[0],t[0])&&Math.min(e[1],t[1])<=n[1]&&n[1]<=Math.max(e[1],t[1])}function IL(e,t,n){var r=!1,A=e.length;if(A<=2)return!1;for(var i=0;i<A;i++){var o=e[i],a=e[(i+1)%A];if(bL(o,a,[t,n]))return!0;FL(o[1]-n)>0!=FL(a[1]-n)>0&&FL(t-(n-o[1])*(o[0]-a[0])/(o[1]-a[1])-o[0])<0&&(r=!r)}return r}function LL(e,t,n){for(var r=!1,A=0;A<e.length;A++){if(r=IL(e[A],t,n))break}return r}function QL(e,t,n){var r=e.parsedStyle,A=r.x1,i=r.y1,o=r.x2,a=r.y2,s=r.lineWidth,l=void 0===s?1:s,u=r.increasedLineWidthForHitTesting,c=void 0===u?0:u,h=r.pointerEvents;return!(!y(Co(void 0===h?"auto":h,r.fill,r.stroke),2)[1]&&!n||!l)&&xL(A,i,o,a,l+c,t.x,t.y)}function UL(e,t,n,r,A,i){var o=e.parsedStyle,a=o.lineWidth,s=void 0===a?1:a,l=o.increasedLineWidthForHitTesting,u=void 0===l?0:l,c=o.stroke,h=o.fill,d=o.d,f=o.pointerEvents,p=void 0===f?"auto":f,g=d.segments,v=d.hasArc,C=d.polylines,B=d.polygons,m=y(Co(p,(null==B?void 0:B.length)&&h,c),2),w=m[0],E=m[1],x=oi(e),S=!1;return w||n?S=v?r(e,t):LL(B,t.x,t.y)||LL(C,t.x,t.y):((E||n)&&(S=function(e,t,n,r,A){for(var i=!1,o=t/2,a=0;a<e.length;a++){var s=e[a],l=s.currentPoint,u=s.params,c=s.prePoint,h=s.box;if(!h||wL(h.x-o,h.y-o,h.width+t,h.height+t,n,r))switch(s.command){case"L":case"Z":if(i=xL(c[0],c[1],l[0],l[1],t,n,r))return!0;break;case"Q":if(i=fn(c[0],c[1],u[1],u[2],u[3],u[4],n,r)<=t/2)return!0;break;case"C":if(i=ln(c[0],c[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,A)<=t/2)return!0;break;case"A":s.cubicParams||(s.cubicParams=bt(c[0],c[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=s.cubicParams,f=c,p=0;p<d.length;p+=6){var g=ln(f[0],f[1],d[p],d[p+1],d[p+2],d[p+3],d[p+4],d[p+5],n,r,A);if(f=[d[p+4],d[p+5]],i=g<=t/2)return!0}}}return i}(g,s+u,t.x,t.y,x)),S)}function RL(e,t,n){var r=e.parsedStyle,A=r.stroke,i=r.fill,o=r.lineWidth,a=void 0===o?1:o,s=r.increasedLineWidthForHitTesting,l=void 0===s?0:s,u=r.points,c=r.pointerEvents,h=y(Co(void 0===c?"auto":c,i,A),2),d=h[0],f=!1;return(h[1]||n)&&(f=SL(u.points,a+l,t.x,t.y,!0)),f||!d&&!n||(f=IL(u.points,t.x,t.y)),f}function ML(e,t,n){var r=e.parsedStyle,A=r.lineWidth,i=void 0===A?1:A,o=r.increasedLineWidthForHitTesting,a=void 0===o?0:o,s=r.points,l=r.pointerEvents;return!(!y(Co(void 0===l?"auto":l,r.fill,r.stroke),2)[1]&&!n||!i)&&SL(s.points,i+a,t.x,t.y,!1)}function HL(e,t,n,r,A){var i=e.parsedStyle,o=i.radius,a=i.fill,s=i.stroke,l=i.lineWidth,u=void 0===l?1:l,c=i.increasedLineWidthForHitTesting,h=void 0===c?0:c,d=i.x,f=void 0===d?0:d,p=i.y,g=void 0===p?0:p,v=i.width,C=i.height,B=i.pointerEvents,m=y(Co(void 0===B?"auto":B,a,s),2),w=m[0],E=m[1],x=u+h;if(o&&o.some((function(e){return 0!==e}))){var S=!1;return(E||n)&&(S=function(e,t,n,r,A,i,o,a){var s=y(A,4),l=s[0],u=s[1],c=s[2],h=s[3];return xL(e+l,t,e+n-u,t,i,o,a)||xL(e+n,t+u,e+n,t+r-c,i,o,a)||xL(e+n-c,t+r,e+h,t+r,i,o,a)||xL(e,t+r-h,e,t+l,i,o,a)||EL(e+n-u,t+u,u,Math.PI,Math.PI,i,o,a)||EL(e+n-c,t+r-c,c,0,Math.PI,i,o,a)||EL(e+h,t+r-h,h,Math.PI,Math.PI,i,o,a)||EL(e+l,t+l,l,Math.PI,Math.PI,i,o,a)}(f,g,v,C,o.map((function(e){return Ye(e,0,Math.min(Math.abs(v)/2,Math.abs(C)/2))})),x,t.x,t.y)),S||!w&&!n||(S=r(e,t)),S}var T=x/2;return w&&E||n?wL(f-T,g-T,v+T,C+T,t.x,t.y):w?wL(f,g,v,C,t.x,t.y):!!E&&function(e,t,n,r,A,i,o){var a=A/2;return wL(e-a,t-a,n,A,i,o)||wL(e+n-a,t-a,A,r,i,o)||wL(e+a,t+r-a,n,A,i,o)||wL(e-a,t+a,A,r,i,o)}(f,g,v,C,x,t.x,t.y)}function OL(e,t,n,r,A,o){var a=e.parsedStyle,s=a.pointerEvents,l=void 0===s?"auto":s,u=a.x,c=void 0===u?0:u,h=a.y,d=void 0===h?0:h,f=a.width,p=a.height;if("non-transparent-pixel"===l){var g=A.config.offscreenCanvas,v=o.offscreenCanvasCreator.getOrCreateCanvas(g),y=o.offscreenCanvasCreator.getOrCreateContext(g,{willReadFrequently:!0});return v.width=f,v.height=p,A.defaultStyleRendererFactory[bn.IMAGE].render(y,i(i({},e.parsedStyle),{},{x:0,y:0}),e,void 0,void 0,void 0),y.getImageData(t.x-c,t.y-d,1,1).data.every((function(e){return 0!==e}))}return!0}function kL(e,t,n,r){var A=e.getGeometryBounds();return t.x>=A.min[0]&&t.y>=A.min[1]&&t.x<=A.max[0]&&t.y<=A.max[1]}var NL=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).name="canvas-picker",e}return v(t,e),s(t,[{key:"init",value:function(){var e,t=(r(r(r(r(r(r(r(r(r(r(e={},bn.CIRCLE,CL),bn.ELLIPSE,mL),bn.RECT,HL),bn.LINE,QL),bn.POLYLINE,ML),bn.POLYGON,RL),bn.PATH,UL),bn.TEXT,kL),bn.GROUP,null),bn.IMAGE,OL),r(r(e,bn.HTML,null),bn.MESH,null));this.context.pointInPathPickerFactory=t,this.addRenderingPlugin(new yL)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(Ln);function _L(e,t){var n=t.cx,r=void 0===n?0:n,A=t.cy,i=void 0===A?0:A,o=t.r;e.arc(r,i,o,0,2*Math.PI,!1)}function DL(e,t){var n=t.cx,r=void 0===n?0:n,A=t.cy,i=void 0===A?0:A,o=t.rx,a=t.ry;if(e.ellipse)e.ellipse(r,i,o,a,0,0,2*Math.PI,!1);else{var s=o>a?o:a,l=o>a?1:o/a,u=o>a?a/o:1;e.save(),e.scale(l,u),e.arc(r,i,s,0,2*Math.PI)}}function PL(e,t){var n,r,A=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.markerStart,l=t.markerEnd,u=t.markerStartOffset,c=t.markerEndOffset,h=0,d=0,f=0,p=0,g=0;s&&rs(s)&&u&&(n=o-A,r=a-i,g=Math.atan2(r,n),h=Math.cos(g)*(u||0),d=Math.sin(g)*(u||0)),l&&rs(l)&&c&&(n=A-o,r=i-a,g=Math.atan2(r,n),f=Math.cos(g)*(c||0),p=Math.sin(g)*(c||0)),e.moveTo(A+h,i+d),e.lineTo(o+f,a+p)}function GL(e,t){var n,r,A=t.markerStart,i=t.markerEnd,o=t.markerStartOffset,a=t.markerEndOffset,s=t.d,l=s.absolutePath,u=s.segments,c=0,h=0,d=0,f=0,p=0;if(A&&rs(A)&&o){var g=y(A.parentNode.getStartTangent(),2),v=g[0],C=g[1];n=v[0]-C[0],r=v[1]-C[1],p=Math.atan2(r,n),c=Math.cos(p)*(o||0),h=Math.sin(p)*(o||0)}if(i&&rs(i)&&a){var B=y(i.parentNode.getEndTangent(),2),m=B[0],w=B[1];n=m[0]-w[0],r=m[1]-w[1],p=Math.atan2(r,n),d=Math.cos(p)*(a||0),f=Math.sin(p)*(a||0)}for(var E=0;E<l.length;E++){var x=l[E],S=x[0],T=l[E+1],F=0===E&&(0!==c||0!==h),b=(E===l.length-1||T&&("M"===T[0]||"Z"===T[0]))&&0!==d&&0!==f,I=y(F?[c,h]:[0,0],2),L=I[0],Q=I[1],U=y(b?[d,f]:[0,0],2),R=U[0],M=U[1];switch(S){case"M":e.moveTo(x[1]+L,x[2]+Q);break;case"L":e.lineTo(x[1]+R,x[2]+M);break;case"Q":e.quadraticCurveTo(x[1],x[2],x[3]+R,x[4]+M);break;case"C":e.bezierCurveTo(x[1],x[2],x[3],x[4],x[5]+R,x[6]+M);break;case"A":var H=u[E].arcParams,O=H.cx,k=H.cy,N=H.rx,_=H.ry,D=H.startAngle,P=H.endAngle,G=H.xRotation,K=H.sweepFlag;if(e.ellipse)e.ellipse(O,k,N,_,G,D,P,!!(1-K));else{var z=N>_?N:_,V=N>_?1:N/_,W=N>_?_/N:1;e.translate(O,k),e.rotate(G),e.scale(V,W),e.arc(0,0,z,D,P,!!(1-K)),e.scale(1/V,1/W),e.rotate(-G),e.translate(-O,-k)}b&&e.lineTo(x[6]+d,x[7]+f);break;case"Z":e.closePath()}}}function KL(e,t){var n,r,A=t.markerStart,i=t.markerEnd,o=t.markerStartOffset,a=t.markerEndOffset,s=t.points.points,l=s.length,u=s[0][0],c=s[0][1],h=s[l-1][0],d=s[l-1][1],f=0,p=0,g=0,v=0,y=0;A&&rs(A)&&o&&(n=s[1][0]-s[0][0],r=s[1][1]-s[0][1],y=Math.atan2(r,n),f=Math.cos(y)*(o||0),p=Math.sin(y)*(o||0)),i&&rs(i)&&a&&(n=s[l-1][0]-s[0][0],r=s[l-1][1]-s[0][1],y=Math.atan2(r,n),g=Math.cos(y)*(a||0),v=Math.sin(y)*(a||0)),e.moveTo(u+(f||g),c+(p||v));for(var C=1;C<l-1;C++){var B=s[C];e.lineTo(B[0],B[1])}e.lineTo(h,d)}function zL(e,t){var n,r,A=t.markerStart,i=t.markerEnd,o=t.markerStartOffset,a=t.markerEndOffset,s=t.points.points,l=s.length,u=s[0][0],c=s[0][1],h=s[l-1][0],d=s[l-1][1],f=0,p=0,g=0,v=0,y=0;A&&rs(A)&&o&&(n=s[1][0]-s[0][0],r=s[1][1]-s[0][1],y=Math.atan2(r,n),f=Math.cos(y)*(o||0),p=Math.sin(y)*(o||0)),i&&rs(i)&&a&&(n=s[l-2][0]-s[l-1][0],r=s[l-2][1]-s[l-1][1],y=Math.atan2(r,n),g=Math.cos(y)*(a||0),v=Math.sin(y)*(a||0)),e.moveTo(u+f,c+p);for(var C=1;C<l-1;C++){var B=s[C];e.lineTo(B[0],B[1])}e.lineTo(h+g,d+v)}function VL(e,t){var n=t.x,r=void 0===n?0:n,A=t.y,i=void 0===A?0:A,o=t.radius,a=t.width,s=t.height,l=a,u=s;if(o&&o.some((function(e){return 0!==e}))){var c=a>0?1:-1,h=s>0?1:-1,d=c+h===0,f=y(o.map((function(e){return Ye(e,0,Math.min(Math.abs(l)/2,Math.abs(u)/2))})),4),p=f[0],g=f[1],v=f[2],C=f[3];e.moveTo(c*p+r,i),e.lineTo(l-c*g+r,i),0!==g&&e.arc(l-c*g+r,h*g+i,g,-h*Math.PI/2,c>0?0:Math.PI,d),e.lineTo(l+r,u-h*v+i),0!==v&&e.arc(l-c*v+r,u-h*v+i,v,c>0?0:Math.PI,h>0?Math.PI/2:1.5*Math.PI,d),e.lineTo(c*C+r,u+i),0!==C&&e.arc(c*C+r,u-h*C+i,C,h>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,d),e.lineTo(r,h*p+i),0!==p&&e.arc(c*p+r,h*p+i,p,c>0?Math.PI:0,h>0?1.5*Math.PI:Math.PI/2,d)}else e.rect(r,i,l,u)}var WL,XL=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).name="canvas-path-generator",e}return v(t,e),s(t,[{key:"init",value:function(){var e,t=(r(r(r(r(r(r(r(r(r(r(e={},bn.CIRCLE,_L),bn.ELLIPSE,DL),bn.RECT,VL),bn.LINE,PL),bn.POLYLINE,zL),bn.POLYGON,KL),bn.PATH,GL),bn.TEXT,void 0),bn.GROUP,void 0),bn.IMAGE,void 0),r(r(r(e,bn.HTML,void 0),bn.MESH,void 0),bn.FRAGMENT,void 0));this.context.pathGeneratorFactory=t}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(Ln),YL=function(){return s((function e(t){o(this,e),this.renderingContext=t.renderingContext,this.canvasConfig=t.config}),[{key:"init",value:function(){var e=this.canvasConfig,t=e.container,n=e.canvas;if(n)this.$canvas=n,t&&n.parentElement!==t&&t.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container;else if(t&&(this.$container=Xe(t)?document.getElementById(t):t,this.$container)){var r=document.createElement("canvas");this.$container.appendChild(r),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=r}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(e,t){var n=this.canvasConfig.devicePixelRatio;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*t,function(e,t,n){uo&&e.style&&(e.style.width=t+"px",e.style.height=n+"px")}(this.$canvas,e,t)),this.renderingContext.renderReasons.add(pa.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)}},{key:"toDataURL",value:(e=Sn(En().mark((function e(){var t,n,r,A=arguments;return En().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(t=A.length>0&&void 0!==A[0]?A[0]:{}).type,r=t.encoderOptions,e.abrupt("return",this.context.canvas.toDataURL(n,r));case 1:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})}]);var e}(),jL=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=new Array(n),A=0;A<n;A++)r[A]=arguments[A];return(e=p(this,t,[].concat(r))).name="canvas-context-register",e}return v(t,e),s(t,[{key:"init",value:function(){this.context.ContextService=YL}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(Ln),ZL=function(e){function t(e){var n;return o(this,t),(n=p(this,t,[e])).registerPlugin(new jL),n.registerPlugin(new qs.Plugin),n.registerPlugin(new XL),n.registerPlugin(new dL),n.registerPlugin(new Al.Plugin),n.registerPlugin(new NL),n.registerPlugin(new tl.Plugin),n}return v(t,e),s(t)}(Qn),JL=function(){function e(e){var t=this;this.viewport=vm()?void 0:window,this.init=function(){vm()||(t.initDevicePixelRatioListener(),t.initDeviceZoomListener())},this.destroy=function(){vm()||(t.removeDevicePixelRatioListener(),t.removeDeviceZoomListener())},this.removeDevicePixelRatioListener=function(){var e;(null===(e=t.devicePixelRatioMedia)||void 0===e?void 0:e.removeEventListener)?t.devicePixelRatioMedia.removeEventListener("change",t.renderByDevicePixelRatioChanged):t.devicePixelRatioMedia.removeListener(t.renderByDevicePixelRatioChanged)},this.initDeviceZoomListener=function(){var e,n;Bm()||null===(n=null===(e=t.viewport)||void 0===e?void 0:e.visualViewport)||void 0===n||n.addEventListener("resize",t.renderByZoomScaleWithoutResizeEffect)},this.removeDeviceZoomListener=function(){var e,n;Bm()||null===(n=null===(e=t.viewport)||void 0===e?void 0:e.visualViewport)||void 0===n||n.removeEventListener("resize",t.renderByZoomScaleWithoutResizeEffect)},this.renderByZoomScaleWithoutResizeEffect=function(e){return it(t,void 0,void 0,(function(){return ot(this,(function(t){switch(t.label){case 0:return this.isDevicePixelRatioChange=!1,[4,this.renderByZoomScale(e)];case 1:return t.sent(),[2]}}))}))},this.renderByDevicePixelRatioChanged=function(){return it(t,void 0,void 0,(function(){return ot(this,(function(e){switch(e.label){case 0:return this.isDevicePixelRatioChange=!0,[4,this.renderByDevicePixelRatio()];case 1:return e.sent(),[2]}}))}))},this.renderByDevicePixelRatio=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return it(t,lt([],st(e),!1),void 0,(function(e){var t,n,r,A,i,o,a,s;return void 0===e&&(e=window.devicePixelRatio),ot(this,(function(l){switch(l.label){case 0:return this.spreadsheet.destroyed?[2]:(t=this.spreadsheet,n=t.container,r=t.options,A=r.width,i=r.height,o=this.spreadsheet.getCanvasElement(),a=Math.ceil(e),(null!==(s=n.getConfig().devicePixelRatio)&&void 0!==s?s:1)!==a&&o?(n.getConfig().devicePixelRatio=a,n.resize(A,i),[4,this.spreadsheet.render(!1)]):[2]);case 1:return l.sent(),[2]}}))}))},this.renderByZoomScale=lv.debounce((function(e){return it(t,void 0,void 0,(function(){var t,n,r,A;return ot(this,(function(i){switch(i.label){case 0:return this.spreadsheet.destroyed?[2]:(t=e.target,n=Math.ceil(null==t?void 0:t.scale),r=(this.zoomOffsetLeft||0)!==((null==t?void 0:t.offsetLeft)||0),n>=1&&r&&!this.isDevicePixelRatioChange?(A=Math.max(n,window.devicePixelRatio),[4,this.renderByDevicePixelRatio(A)]):[3,2]);case 1:i.sent(),this.zoomOffsetLeft=t.offsetLeft,i.label=2;case 2:return[2]}}))}))}),350),this.spreadsheet=e,this.isDevicePixelRatioChange=!1,this.zoomOffsetLeft=0}return e.prototype.initDevicePixelRatioListener=function(){var e;this.devicePixelRatioMedia=window.matchMedia("(resolution: ".concat(window.devicePixelRatio,"dppx)")),(null===(e=this.devicePixelRatioMedia)||void 0===e?void 0:e.addEventListener)?this.devicePixelRatioMedia.addEventListener("change",this.renderByDevicePixelRatioChanged):this.devicePixelRatioMedia.addListener(this.renderByDevicePixelRatioChanged)},e}();!function(e){e.UN_STICKY="UN_STICKY",e.STICKY="STICKY",e.STICKY_EDGE="STICKY_EDGE"}(WL||(WL={}));var qL=function(){function t(e){var t=this;this.stickyS2=null,this.wrapperElement=null,this.stickyContainer=null,this.stickyState=WL.UN_STICKY,this.disposers=[],this.scrollContainer=window,this.isSyncing=!1,this.syncStyle=function(){if(t.wrapperElement){var e=t.getTableBox();if(e){var n=e.headerHeight,r=e.tableBottom,A=e.tableHeight,i=e.tableLeft,o=e.tableWidth,a=e.tableTop,s=t.getOffsetTop(),l=t.isWindowScroll()?s:t.scrollContainer.getBoundingClientRect().top+s,u=t.wrapperElement.style;if(l<a||l>a+A)return t.stickyState=WL.UN_STICKY,void(u.display="none");if(u.display="",u.height="".concat(n,"px"),a<l&&l<r-n)return t.stickyState=WL.STICKY,void(t.isWindowScroll()?(u.position="fixed",u.top="".concat(l,"px"),u.left="".concat(i,"px"),u.width="".concat(o,"px"),u.right=""):(u.position="absolute",u.top="".concat(l-a,"px"),u.left="0",u.right="0",u.width=""));r-n<=l&&l<=r&&(t.stickyState=WL.STICKY_EDGE,u.position="absolute",u.top="".concat(A-n,"px"),u.left="0",u.right="0",u.width="")}}},this.spreadsheet=e,this.options=this.resolveOptions(),this.scrollContainer=this.resolveScrollContainer(),this.init()}return t.prototype.getStickyState=function(){return this.stickyState},t.prototype.resolveOptions=function(){var e,t=null===(e=this.spreadsheet.options.interaction)||void 0===e?void 0:e.stickyHeader;return!t||lv.isBoolean(t)?{}:t},t.prototype.init=function(){this.createDOM(),this.createStickyS2(),this.bindScrollListener(),this.bindSyncListeners(),this.bindInteractionBridge(),this.renderStickyS2()},t.prototype.createDOM=function(){var e=this.spreadsheet.getCanvasElement();if(e){var t=e.parentElement;"static"===window.getComputedStyle(t).position&&(t.style.position="relative"),this.wrapperElement=document.createElement("div"),this.wrapperElement.className="s2-sticky-header-wrapper",Object.assign(this.wrapperElement.style,{position:"absolute",top:"0",left:"0",right:"0",zIndex:"10",overflow:"hidden",display:"none"}),this.stickyContainer=document.createElement("div"),this.wrapperElement.appendChild(this.stickyContainer),t.insertBefore(this.wrapperElement,e)}},t.prototype.minimizeDataCfg=function(e){var t,n=null===(t=null==e?void 0:e.fields)||void 0===t?void 0:t.columns;if(!n)return e;var r={};return e.data.forEach((function(e){var t=n.map((function(t){var n=lv.isString(t)?t:t.field;return String(e[n])})).join("\0");r[t]||(r[t]=e)})),rt(rt({},e),{data:Object.values(r)})},t.prototype.applyStickyOptions=function(e){var t,n=this.options.enableInteraction;return TT(e,n?{style:{dataCell:{height:0}},interaction:{resize:null===(t=e.interaction)||void 0===t?void 0:t.resize,stickyHeader:!1,brushSelection:!1,multiSelection:!1,rangeSelection:!1,selectedCellMove:!1},tooltip:{enable:!0,operation:{hiddenColumns:!1}}}:{style:{dataCell:{height:0}},interaction:{resize:!1,stickyHeader:!1},tooltip:{enable:!1},headerActionIcons:[],showDefaultHeaderActionIcon:!1})},t.prototype.toStickyConfig=function(){var e=this.spreadsheet,t=e.dataCfg,n=e.options;return{dataCfg:this.minimizeDataCfg(t),options:this.applyStickyOptions(n)}},t.prototype.createStickyS2=function(){if(this.stickyContainer){var e=this.toStickyConfig(),t=e.dataCfg,n=e.options,r=this.spreadsheet.constructor;this.stickyS2=new r(this.stickyContainer,t,n)}},t.prototype.renderStickyS2=function(){return it(this,void 0,void 0,(function(){var e,t,n,r,A,i,o;return ot(this,(function(a){switch(a.label){case 0:return this.stickyS2&&(e=this.spreadsheet.facet)?(t=this.spreadsheet.getCanvasConfig(),n=null!==(i=null===(A=e.cornerBBox)||void 0===A?void 0:A.height)&&void 0!==i?i:0,r=null!==(o=t.width)&&void 0!==o?o:0,this.stickyS2.changeSheetSize(r,n),[4,this.stickyS2.render()]):[2];case 1:return a.sent(),[2]}}))}))},t.prototype.getOffsetTop=function(){var e=this.options.offsetTop;return lv.isFunction(e)?e():lv.isNumber(e)?e:0},t.prototype.getScrollParent=function(e){if(!e)return window;for(var t=e.parentElement;t&&t!==document.body&&t!==document.documentElement;){var n=window.getComputedStyle(t),r=n.getPropertyValue("overflow")+n.getPropertyValue("overflow-y")+n.getPropertyValue("overflow-x");if(/(?:auto|scroll|overlay)/.test(r)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return window},t.prototype.resolveScrollContainer=function(){if(this.options.scrollContainer)return this.options.scrollContainer;var e=this.spreadsheet.getCanvasElement();return this.getScrollParent(e)},t.prototype.isWindowScroll=function(){return this.scrollContainer===window},t.prototype.getTableBox=function(){var e,t,n=this.spreadsheet.getCanvasElement();if(!n)return null;var r=n.getBoundingClientRect(),A=this.spreadsheet.facet;if(!A)return null;var i=r.top,o=r.left,a=r.width,s=null!==(t=null===(e=A.cornerBBox)||void 0===e?void 0:e.height)&&void 0!==t?t:0,l=r.height,u=A.getContentHeight(),c=Math.min(u,l);return{tableTop:i,tableLeft:o,tableWidth:a,tableHeight:c,tableBottom:i+c,headerHeight:s}},t.prototype.bindScrollListener=function(){var e=this,t=lv.throttle(this.syncStyle,16);this.scrollContainer.addEventListener("scroll",t,{passive:!0}),this.disposers.push((function(){e.scrollContainer.removeEventListener("scroll",t)}))},t.prototype.bindSyncListeners=function(){var t=this,n=this.spreadsheet,r=function(e){var n;(null===(n=t.stickyS2)||void 0===n?void 0:n.facet)&&t.stickyS2.facet.updateScrollOffset({offsetX:{value:e.scrollX,animate:!1},offsetY:{value:e.scrollY,animate:!1},rowHeaderOffsetX:{value:e.rowHeaderScrollX,animate:!1}})};n.on(e.S2Event.GLOBAL_SCROLL,r),this.disposers.push((function(){n.off(e.S2Event.GLOBAL_SCROLL,r)}));var A=function(){if(t.stickyS2&&!t.isSyncing){t.isSyncing=!0;try{var e=t.toStickyConfig(),r=e.dataCfg,A=e.options;t.stickyS2.setDataCfg(r),t.stickyS2.setOptions(A);var i=n.getCanvasConfig();t.stickyS2.changeSheetSize(i.width,n.facet.cornerBBox.height),t.stickyS2.render(!1),t.syncStyle()}finally{t.isSyncing=!1}}},i=[e.S2Event.LAYOUT_AFTER_RENDER,e.S2Event.LAYOUT_RESIZE];i.forEach((function(e){n.on(e,A)})),this.disposers.push((function(){i.forEach((function(e){n.off(e,A)}))}))},t.prototype.bindInteractionBridge=function(){var t=this;if(this.options.enableInteraction&&this.stickyS2){var n=this.stickyS2,r=this.spreadsheet;n.on(e.S2Event.LAYOUT_RESIZE,(function(n){return it(t,void 0,void 0,(function(){return ot(this,(function(t){switch(t.label){case 0:return n.style?(r.setOptions({style:n.style}),[4,r.render(!1)]):[3,2];case 1:t.sent(),t.label=2;case 2:return r.emit(e.S2Event.LAYOUT_RESIZE,n),[2]}}))}))})),n.on(e.S2Event.RANGE_SORT,(function(n){return it(t,void 0,void 0,(function(){return ot(this,(function(t){switch(t.label){case 0:return r.setDataCfg(rt(rt({},r.dataCfg),{sortParams:n})),[4,r.render()];case 1:return t.sent(),r.emit(e.S2Event.RANGE_SORT,n),[2]}}))}))})),n.on(e.S2Event.ROW_CELL_COLLAPSED,(function(n){r.emit(e.S2Event.ROW_CELL_COLLAPSED__PRIVATE,n),t.scrollToTableTop()})),n.on(e.S2Event.ROW_CELL_ALL_COLLAPSED,(function(n){return it(t,void 0,void 0,(function(){return ot(this,(function(t){switch(t.label){case 0:return r.setOptions({style:{rowCell:{collapseAll:n,collapseFields:null,expandDepth:null}}}),[4,r.render(!1)];case 1:return t.sent(),r.emit(e.S2Event.ROW_CELL_ALL_COLLAPSED,n),this.scrollToTableTop(),[2]}}))}))}))}},t.prototype.scrollToTableTop=function(){var e,t=this.spreadsheet.getCanvasElement();null===(e=null==t?void 0:t.scrollIntoView)||void 0===e||e.call(t,{behavior:"smooth",block:"start"})},t.prototype.destroy=function(){this.disposers.forEach((function(e){return e()})),this.disposers=[],this.stickyS2&&(this.stickyS2.destroy(),this.stickyS2=null),this.wrapperElement&&(this.wrapperElement.remove(),this.wrapperElement=null),this.stickyContainer=null,this.stickyState=WL.UN_STICKY},t}(),$L=function(){function e(e){this.visible=!1,this.position={x:0,y:0},this.spreadsheet=e}return e.prototype.show=function(e){var t,n,r,A=e.position,i=e.content,o=e.event,a=this.spreadsheet.options.tooltip||{},s=a.autoAdjustBoundary,l=a.adjustPosition;this.visible=!0,this.options=e;var u=this.getContainer();this.renderContent(i);var c=QT({spreadsheet:this.spreadsheet,position:A,tooltipContainer:u,autoAdjustBoundary:s}),h=c.x,d=c.y;this.position=null!==(t=null==l?void 0:l({position:{x:h,y:d},event:o}))&&void 0!==t?t:{x:h,y:d},RT(u,{style:{left:"".concat(null===(n=this.position)||void 0===n?void 0:n.x,"px"),top:"".concat(null===(r=this.position)||void 0===r?void 0:r.y,"px"),pointerEvents:"all"},visible:!0,dark:"dark"===this.spreadsheet.getThemeName()})},e.prototype.hide=function(){this.visible=!1,this.container&&(RT(this.container,{style:{pointerEvents:"none"},visible:!1}),this.resetPosition())},e.prototype.destroy=function(){var e,t;this.visible=!1,this.container&&(this.resetPosition(),null===(t=(e=this.container).remove)||void 0===t||t.call(e),this.container=null)},e.prototype.renderContent=function(e){var t,n,r,A;if(this.container){this.clearContent();var i=(this.spreadsheet.options.tooltip||{}).content,o=null!=e?e:i;if(!lv.isNil(o))return"string"==typeof o?(this.container.innerHTML=o,void(null===(n=(t=this.options).onMounted)||void 0===n||n.call(t))):void(o instanceof Element&&(this.container.appendChild(o),null===(A=(r=this.options).onMounted)||void 0===A||A.call(r)))}},e.prototype.clearContent=function(){this.container&&(this.container.innerHTML="")},e.prototype.disablePointerEvent=function(){this.container&&"none"!==this.container.style.pointerEvents&&RT(this.container,{style:{pointerEvents:"none"}})},e.prototype.resetPosition=function(){this.position={x:0,y:0}},e.prototype.getContainer=function(){var e;if(!this.container){var t=this.spreadsheet.options.tooltip,n=(null===(e=null==t?void 0:t.getContainer)||void 0===e?void 0:e.call(t))||document.body,r=document.createElement("div");return RT(r,{style:null==t?void 0:t.style,className:[NC].concat(null==t?void 0:t.className)}),n.appendChild(r),this.container=r,this.container}return this.container},e}(),eQ=function(t){function n(e,n,r){var A=t.call(this)||this;return A.store=new vB,A.stickyHeaderController=null,A.destroyed=!1,A.measureText=lv.memoize((function(e,t){if(!t)return null;var n=hS()||A.getCanvasElement(),r=null==n?void 0:n.getContext("2d"),i=t,o=i.fontSize,a=i.fontFamily,s=i.fontWeight,l=i.fontStyle,u=i.fontVariant;return r.font=[l,u,s,"".concat(o,"px"),a].join(" ").trim(),r.measureText(String(e))}),(function(e,t){return lt([e],st(lv.values(t)),!1).join("")})),A.measureTextWidth=function(e,t){var n=A.measureText(e,t);return(null==n?void 0:n.width)||0},A.measureTextHeight=function(e,t){var n=A.measureText(e,t);return n?n.actualBoundingBoxAscent+n.actualBoundingBoxDescent:0},A.measureTextWidthRoughly=function(e,t){var n,r,i=A.measureTextWidth("a",t),o=A.measureTextWidth("蚂",t),a=0;if(!e)return a;try{for(var s=at(String(e)),l=s.next();!l.done;l=s.next()){var u=l.value.charCodeAt(0);a+=u>=0&&u<=255?i:o}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return a},A.setupDataConfig(n),A.setupOptions(r),A.dataSet=A.getDataSet(),A.setDebug(),A.initTooltip(),A.initContainer(e),A.bindEvents(),A.initInteraction(),A.initTheme(),A.initHdAdapter(),A.registerIcons(),A.setOverscrollBehavior(),A.mountSheetInstance(),A.initStickyHeader(),A}return nt(n,t),n.prototype.setupDataConfig=function(e){this.dataCfg=FT(e)},n.prototype.setupOptions=function(e){this.options=bT(e)},n.prototype.isCustomHeaderFields=function(e){var t=this.dataCfg.fields;return e?lv.some(null==t?void 0:t[e],(function(e){return!lv.isString(e)})):lv.some(lt(lt([],st(null==t?void 0:t.rows),!1),st(null==t?void 0:t.columns),!1),(function(e){return!lv.isString(e)}))},n.prototype.isCustomColumnFields=function(){return this.isCustomHeaderFields("columns")},n.prototype.setOverscrollBehavior=function(){if(!vm()&&ym()){var e=this.options.interaction.overscrollBehavior,t=window.getComputedStyle(document.body).getPropertyValue("overscroll-behavior");t&&"auto"!==t?this.store.set("initOverscrollBehavior",t):e&&(document.body.style.overscrollBehavior=e)}},n.prototype.restoreOverscrollBehavior=function(){ym()&&(document.body.style.overscrollBehavior=this.store.get("initOverscrollBehavior")||"")},n.prototype.setDebug=function(){qC.getInstance().setDebug(this.options.debug)},n.prototype.initTheme=function(){this.setThemeCfg({name:"default"})},n.prototype.getMountContainer=function(e){var t=lv.isString(e)?document.querySelector(e):e;if(!t)throw new Error("Target mount container is not a DOM element");return t},n.prototype.initHdAdapter=function(){this.options.hd&&(this.hdAdapter=new JL(this),this.hdAdapter.init())},n.prototype.initStickyHeader=function(){var t,n=this;if(null===(t=this.options.interaction)||void 0===t?void 0:t.stickyHeader){var r=function(){var t;n.off(e.S2Event.LAYOUT_AFTER_RENDER,r),null===(t=n.stickyHeaderController)||void 0===t||t.destroy(),n.stickyHeaderController=new qL(n)};this.on(e.S2Event.LAYOUT_AFTER_RENDER,r)}},n.prototype.initInteraction=function(){var e,t;null===(t=null===(e=this.interaction)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e),this.interaction=new NI(this)},n.prototype.initTooltip=function(){var e,t,n,r;null===(t=null===(e=this.tooltip)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e),this.tooltip=this.renderTooltip(),this.tooltip instanceof $L||console.warn("[Custom Tooltip]: ".concat(null===(r=null===(n=this.tooltip)||void 0===n?void 0:n.constructor)||void 0===r?void 0:r.toString()," should be extends from BaseTooltip"))},n.prototype.renderTooltip=function(){var e,t;return(null===(t=null===(e=this.options.tooltip)||void 0===e?void 0:e.render)||void 0===t?void 0:t.call(e,this))||new $L(this)},n.prototype.getTargetCell=function(e){return this.getCell(e)||lv.last(this.interaction.getInteractedCells())},n.prototype.showTooltip=function(e){var t=this,n=e.content,r=e.event,A=this.getTargetCell(null==r?void 0:r.target),i=lv.isFunction(n)?n(A,e):n;return new Promise((function(n){var r,A,o=rt(rt({},e),{content:i,onMounted:n});null===(A=null===(r=t.tooltip)||void 0===r?void 0:r.show)||void 0===A||A.call(r,o)}))},n.prototype.showTooltipWithInfo=function(e,t,n){var r,A=YT(this,e),i=A.enable,o=A.content;if(i){var a=this.getTargetCell(null==e?void 0:e.target),s=null!==(r=null==n?void 0:n.data)&&void 0!==r?r:zT({spreadsheet:this,cellInfos:t,targetCell:a,options:rt({enableFormat:!0},n)});return this.showTooltip({data:s,position:{x:e.clientX,y:e.clientY},options:n,event:e,content:o})}},n.prototype.hideTooltip=function(){var e,t;null===(t=null===(e=this.tooltip)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)},n.prototype.destroyTooltip=function(){var e,t;null===(t=null===(e=this.tooltip)||void 0===e?void 0:e.destroy)||void 0===t||t.call(e)},n.prototype.registerIcons=function(){var e=this.options.customSVGIcons;lv.isEmpty(e)||lv.forEach(e,(function(e){tB(e.name,e.src)}))},n.prototype.setDataCfg=function(e,t){this.store.set("originalDataCfg",e),this.dataCfg=t?FT(e):FT(this.dataCfg,e),this.store.set(Kv,zv)},n.prototype.setOptions=function(e,t){var n;this.hideTooltip(),t?this.setupOptions(e):this.options=TT(this.options,e),(t||(null===(n=null==e?void 0:e.tooltip)||void 0===n?void 0:n.render))&&this.initTooltip(),this.resetHiddenColumnsDetailInfoIfNeeded(),this.registerIcons(),this.syncStickyHeader()},n.prototype.syncStickyHeader=function(){var e,t=!!(null===(e=this.options.interaction)||void 0===e?void 0:e.stickyHeader);this.stickyHeaderController&&(this.stickyHeaderController.destroy(),this.stickyHeaderController=null),t&&this.initStickyHeader()},n.prototype.resetDataCfg=function(){this.setDataCfg(null,!0)},n.prototype.resetOptions=function(){this.setOptions(null,!0)},n.prototype.resetHiddenColumnsDetailInfoIfNeeded=function(){var e;lv.isEmpty(null===(e=this.options.interaction)||void 0===e?void 0:e.hiddenColumnFields)||this.store.set("hiddenColumnsDetail",[])},n.prototype.doRender=function(t){return it(this,void 0,void 0,(function(){var n,r,A,i,o,a,s,l;return ot(this,(function(u){switch(u.label){case 0:return(n=this.getCanvasElement())&&n.isConnected?(A=(r=t||{}).reloadData,i=void 0===A||A,o=r.rebuildDataSet,a=void 0!==o&&o,s=r.rebuildHiddenColumnsDetail,l=void 0===s||s,this.emit(e.S2Event.LAYOUT_BEFORE_RENDER),a&&(this.dataSet=this.getDataSet()),i&&(this.clearDrillDownData("",!0),this.dataSet.setDataCfg(this.dataCfg)),this.buildFacet(),l?[4,this.initHiddenColumnsDetail()]:[3,2]):[2];case 1:u.sent(),u.label=2;case 2:return this.emit(e.S2Event.LAYOUT_AFTER_RENDER),[2]}}))}))},n.prototype.render=function(e){return it(this,void 0,void 0,(function(){var t;return ot(this,(function(n){switch(n.label){case 0:return this.destroyed?[2]:(t="boolean"==typeof e?{reloadData:e}:e,[4,this.container.ready]);case 1:return n.sent(),[4,this.doRender(t)];case 2:return n.sent(),[2]}}))}))},n.prototype.mountSheetInstance=function(){var e=this.getCanvasElement();e&&(e.__s2_instance__=this)},n.prototype.unmountSheetInstance=function(){var e=this.getCanvasElement();e&&delete e.__s2_instance__},n.prototype.destroy=function(){var t,n,r,A,i,o;this.destroyed||(this.destroyed=!0,this.restoreOverscrollBehavior(),this.emit(e.S2Event.LAYOUT_DESTROY),null===(t=this.stickyHeaderController)||void 0===t||t.destroy(),this.stickyHeaderController=null,null===(n=this.facet)||void 0===n||n.destroy(),null===(r=this.hdAdapter)||void 0===r||r.destroy(),null===(A=this.interaction)||void 0===A||A.destroy(),null===(i=this.store)||void 0===i||i.clear(),this.destroyTooltip(),this.clearCanvasEvent(),this.unmountSheetInstance(),null===(o=this.container)||void 0===o||o.destroy(),dS())},n.prototype.setThemeName=function(e){this.themeName=e},n.prototype.setThemeCfg=function(e,t){void 0===e&&(e={});var n=(null==e?void 0:e.theme)||{},r=xb(rt(rt({},e),{spreadsheet:this,getCustomTheme:t}));this.theme=TT(r,n),this.setThemeName(null==e?void 0:e.name)},n.prototype.setTheme=function(e){this.theme=TT(this.theme,e)},n.prototype.getTheme=function(){return this.theme},n.prototype.getThemeName=function(){return this.themeName},n.prototype.updatePagination=function(e){this.options=TT(this.options,{pagination:e}),this.facet.resetScrollOffset()},n.prototype.changeSheetSize=function(e,t){void 0===e&&(e=this.options.width),void 0===t&&(t=this.options.height);var n=this.getCanvasElement(),r=this.container.getConfig(),A=r.width,i=r.height;(e!==A||t!==i)&&n&&(this.options=TT(this.options,{width:e,height:t}),this.container.resize(e,t))},n.prototype.on=function(e,n){return t.prototype.on.call(this,e,n)},n.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];t.prototype.emit.apply(this,lt([e],st(n),!1))},n.prototype.getCanvas=function(){return this.container},n.prototype.getCanvasConfig=function(){return this.getCanvas().getConfig()},n.prototype.getCanvasElement=function(){return this.getCanvas().getContextService().getDomElement()},n.prototype.getLayoutWidthType=function(){var e;return null===(e=this.options.style)||void 0===e?void 0:e.layoutWidthType},n.prototype.isCellType=function(e){return e instanceof Gm},n.prototype.getCell=function(e){for(var t=e;t&&!(t instanceof Gs);){if(this.isCellType(t))return t;t=null==t?void 0:t.parentNode}return null},n.prototype.getCellType=function(e){var t=this.getCell(e);return null==t?void 0:t.cellType},n.prototype.getTotalsConfig=function(e){var t=this.options.totals,n=this.dataSet.fields.rows,r=lv.get(t,lv.includes(n,e)?"row":"col",{}),A=!(!r.showSubTotals||!lv.includes(r.subTotalsDimensions,e))&&r.showSubTotals;return rt(rt({grandTotalsLabel:fv("总计"),subTotalsLabel:fv("小计"),grandTotalsGroupDimensions:[],subTotalsGroupDimensions:[]},r),{showSubTotals:A})},n.prototype.initContainer=function(e){var t=this.options,n=t.width,r=t.height,A=t.device,i=t.transformCanvasConfig,o=t.rendererConfig,a=new ZL(o),s=null==i?void 0:i(a,this),l=!Bm(A);this.container=new Gs(rt({container:this.getMountContainer(e),width:n,height:r,renderer:a,supportsPointerEvents:l,future:{experimentalRICSyncRTree:!0,experimentalCancelEventPropagation:!0}},s)),this.setupContainerStyle()},n.prototype.setupContainerStyle=function(){var e=this.getCanvasElement();e&&(e.style.display="block",e.style.userSelect="none")},n.prototype.initHiddenColumnsDetail=function(){return it(this,void 0,void 0,(function(){var e,t;return ot(this,(function(n){switch(n.label){case 0:return e=this.options.interaction.hiddenColumnFields,t=this.store.get("hiddenColumnsDetail"),lv.isEmpty(e)&&lv.isEmpty(t)?[2]:[4,dw(this,e,!0)];case 1:return n.sent(),[2]}}))}))},n.prototype.clearCanvasEvent=function(){var e=this,t=this.getEvents();lv.forIn(t,(function(t,n){e.off(n)}))},n.prototype.updateSortMethodMap=function(e,t,n){var r;void 0===n&&(n=!1);var A=n?null:this.store.get("sortMethodMap");this.store.set("sortMethodMap",rt(rt({},A),((r={})[e]=t,r)))},n.prototype.getMenuDefaultSelectedKeys=function(e){var t=this.store.get("sortMethodMap"),n=lv.get(t,e);return n?[n]:[]},n.prototype.handleGroupSort=function(t,n){var r=this;t.stopPropagation(),this.interaction.addIntercepts([e.InterceptType.HOVER]);var A={menu:{selectedKeys:this.getMenuDefaultSelectedKeys(null==n?void 0:n.id),items:this.isTableMode()?VC():zC(),onClick:function(A){return it(r,[A],void 0,(function(r){var A=r.key;return ot(this,(function(r){switch(r.label){case 0:return[4,this.groupSortByMethod(A,n)];case 1:return r.sent(),this.emit(e.S2Event.RANGE_SORTED,t),[2]}}))}))}}};this.showTooltipWithInfo(t,[],{operator:A,onlyShowOperator:!0})},n.prototype.getSeriesNumberText=function(){var e,t=null!==(e=this.options.seriesNumber)&&void 0!==e?e:{},n=t.text;return t.enable?null!=n?n:Dv():""},n.prototype.enableAsyncExport=function(){return!0},n}(Zb),tQ=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.isCustomRowFields=function(){return this.isCustomHeaderFields("rows")},n.prototype.getDataSet=function(){var e=this.options.dataSet;return e?e(this):this.isCustomRowFields()?new qT(this):new JT(this)},n.prototype.getContentHeight=function(){return this.facet.getContentHeight()},n.prototype.isPivotMode=function(){return!0},n.prototype.isTableMode=function(){return!1},n.prototype.isHierarchyTreeType=function(){return"tree"===this.options.hierarchyType},n.prototype.isHierarchyGridTreeType=function(){return"grid-tree"===this.options.hierarchyType},n.prototype.isFrozenRowHeader=function(){var e,t;return!!(null===(t=null===(e=this.options)||void 0===e?void 0:e.frozen)||void 0===t?void 0:t.rowHeader)},n.prototype.isValueInCols=function(){var e,t;return null===(t=null===(e=this.dataSet)||void 0===e?void 0:e.fields)||void 0===t?void 0:t.valueInCols},n.prototype.clearDrillDownData=function(e,t){return it(this,void 0,void 0,(function(){return ot(this,(function(n){switch(n.label){case 0:return this.dataSet instanceof JT?!this.dataSet.clearDrillDownData(e)||t?[3,2]:(this.interaction.reset(),[4,this.render(!1)]):[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))},n.prototype.buildFacet=function(){var e,t,n,r,A,i,o=this;null!==(e=(i=this.options).dataCell)&&void 0!==e||(i.dataCell=function(e){return new Jx(e,o)}),null===(t=this.facet)||void 0===t||t.destroy(),this.facet=null!==(A=null===(r=(n=this.options).facet)||void 0===r?void 0:r.call(n,this))&&void 0!==A?A:new pI(this),this.facet.render()},n.prototype.bindEvents=function(){this.off(e.S2Event.ROW_CELL_COLLAPSED__PRIVATE),this.off(e.S2Event.ROW_CELL_ALL_COLLAPSED__PRIVATE),this.on(e.S2Event.ROW_CELL_COLLAPSED__PRIVATE,this.handleRowCellCollapsed),this.on(e.S2Event.ROW_CELL_ALL_COLLAPSED__PRIVATE,this.handleRowCellToggleCollapseAll)},n.prototype.handleRowCellCollapsed=function(t){return it(this,void 0,void 0,(function(){var n,r,A,i,o,a;return ot(this,(function(s){switch(s.label){case 0:return n=t.isCollapsed,r=t.node,A=(null===(a=this.options.style)||void 0===a?void 0:a.rowCell).collapseFields,i=rt(rt({},A),((o={})[r.id]=n,o)),this.setOptions({style:{rowCell:{collapseFields:i}}}),[4,this.render(!1)];case 1:return s.sent(),this.emit(e.S2Event.ROW_CELL_COLLAPSED,{isCollapsed:n,collapseFields:i,node:r}),[2]}}))}))},n.prototype.handleRowCellToggleCollapseAll=function(t){return it(this,void 0,void 0,(function(){var n;return ot(this,(function(r){switch(r.label){case 0:return n=!t,this.setOptions({style:{rowCell:{collapseAll:n,collapseFields:null,expandDepth:null}}}),[4,this.render(!1)];case 1:return r.sent(),this.emit(e.S2Event.ROW_CELL_ALL_COLLAPSED,n),[2]}}))}))},n.prototype.groupSortByMethod=function(t,n){return it(this,void 0,void 0,(function(){var r,A,i,o,a,s,l,u,c,h,d,f,p,g,v,y,C,B,m,w,E;return ot(this,(function(x){switch(x.label){case 0:return r=this.dataCfg.fields,A=r.rows,i=r.columns,o=this.options.style.colCell.hideValue,a=this.isValueInCols()?lv.last(A):lv.last(i),s=n.query,l=n.field,u=n.value,c=n.extra,h=lv.clone(s),d=(null==c?void 0:c.isCustomNode)?l:u,o&&this.isValueInCols()&&(d=this.dataSet.fields.values[0],h[ry]=d),f=lv.isString(a)?a:a.field,p=null===(B=this.dataCfg.sortParams)||void 0===B?void 0:B.find((function(e){return(null==e?void 0:e.sortFieldId)===f||(null==e?void 0:e.sortFieldId)===d})),g=null===(m=this.dataCfg.sortParams)||void 0===m?void 0:m.find((function(e){return"*"===(null==e?void 0:e.sortFieldId)})),v={sortFieldId:f,sortMethod:t,sortByMeasure:d,query:h,nullsPlacement:null!==(w=null==p?void 0:p.nullsPlacement)&&void 0!==w?w:null==g?void 0:g.nullsPlacement},y=null===(E=this.dataCfg.sortParams)||void 0===E?void 0:E.filter((function(e){return(null==e?void 0:e.sortFieldId)!==a})),this.updateSortMethodMap(n.id,t,!0),C=lt(lt([],st(y),!1),[v],!1),this.emit(e.S2Event.RANGE_SORT,C),this.setDataCfg(rt(rt({},this.dataCfg),{sortParams:C})),[4,this.render()];case 1:return x.sent(),[2]}}))}))},n}(eQ),nQ=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return nt(n,t),n.prototype.isCustomRowFields=function(){return!1},n.prototype.getDataSet=function(){var e=this.options.dataSet;return e?e(this):new $T(this)},n.prototype.isPivotMode=function(){return!1},n.prototype.isTableMode=function(){return!0},n.prototype.isHierarchyTreeType=function(){return!1},n.prototype.isHierarchyGridTreeType=function(){return!1},n.prototype.isFrozenRowHeader=function(){return!1},n.prototype.clearDrillDownData=function(){return it(this,void 0,void 0,(function(){return ot(this,(function(e){return[2]}))}))},n.prototype.isValueInCols=function(){return!1},n.prototype.bindEvents=function(){},n.prototype.buildFacet=function(){var e,t,n,r,A,i,o=this;null!==(e=(i=this.options).dataCell)&&void 0!==e||(i.dataCell=function(e){var t;return(null===(t=o.options.seriesNumber)||void 0===t?void 0:t.enable)&&0===e.colIndex?new lS(e,o):new sS(e,o)}),null===(t=this.facet)||void 0===t||t.destroy(),this.facet=null!==(A=null===(r=(n=this.options).facet)||void 0===r?void 0:r.call(n,this))&&void 0!==A?A:new vI(this),this.facet.render()},n.prototype.destroy=function(){t.prototype.destroy.call(this),this.off(e.S2Event.RANGE_SORT),this.off(e.S2Event.RANGE_FILTER)},n.prototype.groupSortByMethod=function(t,n){var r={sortFieldId:n.field,sortMethod:t};this.updateSortMethodMap(n.id,t),this.emit(e.S2Event.RANGE_SORT,[r])},n}(eQ);e.ADVANCED_SORT_PRE_CLS=KI,e.AsyncRenderThreshold=Jv,e.AsyncRequestThreshold=1e5,e.BACK_GROUND_GROUP_CONTAINER_Z_INDEX=0,e.BRUSH_AUTO_SCROLL_INITIAL_CONFIG=by,e.BaseBrushSelection=bI,e.BaseCell=Gm,e.BaseDataSet=uS,e.BaseEvent=yI,e.BaseFacet=eI,e.BaseTooltip=$L,e.CELL_PADDING=8,e.CSV_SEPARATOR=",",e.CellData=Lx,e.ColCell=jx,e.ColCellBrushSelection=II,e.ColHeader=Wb,e.CornerBBox=Ub,e.CornerCell=Zx,e.CornerCellClick=CI,e.CornerHeader=Xb,e.CustomGridPivotDataSet=qT,e.DARK_THEME_CLS=HC,e.DATA_CELL_ID_SEPARATOR=Hy,e.DEBUG_HEADER_LAYOUT=ZC,e.DEBUG_TRANSFORM_DATA=jC,e.DEBUG_VIEW_RENDER=JC,e.DEFAULT_CELL_HEIGHT=30,e.DEFAULT_CELL_TEXT_WORD_WRAP_STYLE=Py,e.DEFAULT_CELL_WIDTH=96,e.DEFAULT_CORNER_MAX_WIDTH_RATIO=.5,e.DEFAULT_DATA_CONFIG=qv,e.DEFAULT_FONTSIZE=Cb,e.DEFAULT_FONT_COLOR=Vv,e.DEFAULT_FROZEN_COUNTS=Ky,e.DEFAULT_OPTIONS=zy,e.DEFAULT_PAGE_INDEX=1,e.DEFAULT_ROW_CELL_TREE_WIDTH=120,e.DEFAULT_STYLE=Gy,e.DEFAULT_TEXT_LINE_HEIGHT=16,e.DEFAULT_VALUE_RANGES=zv,e.DRILL_DOWN_PRE_CLASS=_I,e.DataCell=Jx,e.DataCellBrushSelection=LI,e.DataCellClick=BI,e.DataCellMultiSelection=UI,e.DebuggerUtil=qC,e.ELLIPSIS_SYMBOL="...",e.EMPTY_EXTRA_FIELD_PLACEHOLDER=uy,e.EMPTY_FIELD_VALUE=ly,e.EMPTY_PLACEHOLDER=Nv,e.EMPTY_PLACEHOLDER_GROUP_CONTAINER_Z_INDEX=4,e.EXTRA_COLUMN_FIELD=iy,e.EXTRA_FIELD=ry,e.EventController=RI,e.FONT_FAMILY=MC,e.FRONT_GROUND_GROUP_BRUSH_SELECTION_Z_INDEX=5,e.FRONT_GROUND_GROUP_CONTAINER_Z_INDEX=3,e.FRONT_GROUND_GROUP_FROZEN_Z_INDEX=4,e.FRONT_GROUND_GROUP_RESIZE_AREA_Z_INDEX=5,e.FRONT_GROUND_GROUP_SCROLL_Z_INDEX=3,e.Frame=aw,e.FrozenFacet=nI,e.FrozenGroupAreaTypeMap=gy,e.G2_THEME_TYPE={default:"light",colorful:"light",gray:"light",dark:"dark"},e.GEvent=sa,e.GuiIcon=gB,e.HORIZONTAL_RESIZE_AREA_KEY_PRE=kv,e.HOVER_FOCUS_DURATION=my,e.HeaderCell=Yx,e.HeaderCellLinkClick=mI,e.Hierarchy=MB,e.HoverEvent=FI,e.INTERACTION_STATE_INFO_KEY=xy,e.INTERVAL_BAR_HEIGHT=12,e.KEY_GROUP_BACK_GROUND=pv,e.KEY_GROUP_COL_FROZEN=Lv,e.KEY_GROUP_COL_FROZEN_TRAILING=Qv,e.KEY_GROUP_COL_RESIZE_AREA=Uv,e.KEY_GROUP_COL_SCROLL=Iv,e.KEY_GROUP_CORNER_RESIZE_AREA=Mv,e.KEY_GROUP_CORNER_SCROLL=Rv,e.KEY_GROUP_EMPTY_PLACEHOLDER=Ov,e.KEY_GROUP_FORE_GROUND=gv,e.KEY_GROUP_FROZEN_SPLIT_LINE=Hv,e.KEY_GROUP_GRID_GROUP=yv,e.KEY_GROUP_MERGED_CELLS=Bv,e.KEY_GROUP_PANEL_GROUND=vv,e.KEY_GROUP_PANEL_SCROLL=Cv,e.KEY_GROUP_ROW_FROZEN=Tv,e.KEY_GROUP_ROW_FROZEN_TRAILING=Fv,e.KEY_GROUP_ROW_INDEX_FROZEN=wv,e.KEY_GROUP_ROW_INDEX_FROZEN_TRAILING=Ev,e.KEY_GROUP_ROW_INDEX_RESIZE_AREA=xv,e.KEY_GROUP_ROW_INDEX_SCROLL=mv,e.KEY_GROUP_ROW_RESIZE_AREA=bv,e.KEY_GROUP_ROW_SCROLL=Sv,e.LAYOUT_SAMPLE_COUNT=50,e.LINE_SEPARATOR="\r\n",e.Locale=PI,e.MIN_DEVICE_PIXEL_RATIO=1,e.MOBILE_SCROLL_THRESHOLD=10,e.MOBILE_TOOLTIP_PREFIX_CLS=kC,e.MULTI_VALUE=ay,e.MergedCell=rS,e.MergedCellClick=wI,e.NODE_ID_SEPARATOR=My,e.NULL_SYMBOL_ID=cy,e.Node=yB,e.ORIGIN_FIELD=Ay,e.PALETTE_MAP=RC,e.PANEL_GRID_GROUP_Z_INDEX=2,e.PANEL_GROUP_FROZEN_GROUP_Z_INDEX=4,e.PANEL_GROUP_GROUP_CONTAINER_Z_INDEX=1,e.PANEL_GROUP_SCROLL_GROUP_Z_INDEX=1,e.PANEL_MERGE_GROUP_Z_INDEX=3,e.PRECISION=16,e.PanelBBox=Rb,e.PivotDataCellCopy=NS,e.PivotDataSet=JT,e.PivotFacet=pI,e.PivotSheet=tQ,e.PreviewClick=SI,e.RESIZE_END_GUIDE_LINE_ID=ky,e.RESIZE_MASK_ID=Ny,e.RESIZE_MIN_CELL_HEIGHT=20,e.RESIZE_MIN_CELL_WIDTH=40,e.RESIZE_RENDER_DELAY=200,e.RESIZE_START_GUIDE_LINE_ID=Oy,e.REVERSE_FONT_COLOR=Wv,e.ROOT_BEGINNING_REGEX=/^root\[&\]*/,e.ROOT_NODE_ID=Ry,e.RangeSelection=MI,e.RootInteraction=NI,e.RowCell=AS,e.RowCellBrushSelection=QI,e.RowColumnClick=TI,e.RowColumnResize=HI,e.RowHeader=Yb,e.S2_PREFIX_CLS=Gv,e.SERIES_NUMBER_FIELD=sy,e.SHAPE_ATTRS_MAP=Ey,e.SHAPE_STYLE_MAP=wy,e.SHEET_COMPONENT_DEFAULT_OPTIONS=GI,e.SPLIT_LINE_WIDTH=1,e.STRATEGY_SHEET_TOOLTIP_PRE_CLASS=DI,e.ScrollBar=Sb,e.SelectedCellMove=kI,e.SeriesNumberCell=iS,e.SeriesNumberHeader=jb,e.SpreadSheet=eQ,e.StickyHeaderController=qL,e.Store=vB,e.TAB_SEPARATOR=Zv,e.TOOLTIP_CONTAINER_CLS=NC,e.TOOLTIP_CONTAINER_HIDE_CLS=DC,e.TOOLTIP_CONTAINER_SHOW_CLS=_C,e.TOOLTIP_OPERATION_PREFIX_CLS=PC,e.TOOLTIP_POSITION_OFFSET=GC,e.TOOLTIP_PREFIX_CLS=OC,e.TOTAL_VALUE=oy,e.TableColCell=oS,e.TableCornerCell=aS,e.TableDataCell=sS,e.TableDataSet=$T,e.TableFacet=vI,e.TableSeriesNumberCell=lS,e.TableSheet=nQ,e.UNDEFINED_SYMBOL_ID=hy,e.VALUE_FIELD=ny,e.VALUE_RANGES_KEY=Kv,e.adjustTextIconPositionWhileScrolling=lw,e.afterSelectDataCells=wT,e.analyzeAdaptive=XI,e.areAllFieldsEmpty=ow,e.assembleMatrix=mS,e.asyncGetAllData=function(e){return it(void 0,void 0,void 0,(function(){return ot(this,(function(t){switch(t.label){case 0:return[4,WS(e)];case 1:return[2,t.sent()]}}))}))},e.asyncGetAllHtmlData=function(e){return it(void 0,void 0,void 0,(function(){return ot(this,(function(t){switch(t.label){case 0:return[4,WS(e)];case 1:return[2,t.sent()[1].content]}}))}))},e.asyncGetAllPlainData=function(e){return it(void 0,void 0,void 0,(function(){return ot(this,(function(t){switch(t.label){case 0:return[4,WS(e)];case 1:return[2,t.sent()[0].content]}}))}))},e.auto=function(e,t,n){if(void 0===t&&(t=2),void 0===n&&(n=em[dv()]||em.zh_CN),"number"!=typeof e||lv.isNaN(e))return"";for(var r,A=e,i=st(n,2),o=i[0],a=i[1],s=0,l=!0;l;)A>=(r=a[s])&&s<o.length?A/=r:l=!1,s+=1;var u=(A=parseFloat(A.toFixed(t)))>=1e3?A.toLocaleString("en"):"".concat(A);return 0===s?u:"".concat(u," ").concat(o[s-1])},e.batchSetStyle=fm,e.buildDrillDownOptions=function(e,t,n){var r,A=(null===(r=null==e?void 0:e.headerActionIcons)||void 0===r?void 0:r.length)?lt([],st(e.headerActionIcons),!1):[];if(!lv.isEmpty(t)){var i={icons:[{name:"DrillDownIcon",position:"right",onClick:function(e){var t=e.meta,r=e.event;t.spreadsheet.store.set("drillDownNode",t),VI({meta:t,event:r,callback:n})}}],belongsCell:"rowCell",defaultHide:!0,displayCondition:(null==t?void 0:t.displayCondition)||WI};A.push(i)}return rt(rt({},e),{headerActionIcons:A})},e.buildGridHierarchy=QB,e.buildTableHierarchy=RB,e.calculateFrozenCornerCells=ew,e.calculateInViewIndexes=Zm,e.clearState=xT,e.copyToClipboard=OS,e.copyToClipboardByClipboard=HS,e.copyToClipboardByExecCommand=MS,e.createOrUpdateRect=pm,e.createResizeObserver=function(e){var t=!0,n=e.s2,r=e.adaptive,A=e.container,i=e.wrapper,o=XI(i,r),a=o.container,s=o.adaptiveWidth,l=o.adaptiveHeight;if(a&&A&&r&&n){var u=function(e,t){return it(void 0,void 0,void 0,(function(){return ot(this,(function(r){switch(r.label){case 0:return null==n||n.changeSheetSize(e,t),[4,null==n?void 0:n.render(!1)];case 1:return r.sent(),[2]}}))}))},c=lv.debounce(u,200),h=new ResizeObserver((function(e){st(void 0===e?[]:e,1)[0]&&it(void 0,void 0,void 0,(function(){var e,r,i,o;return ot(this,(function(a){switch(a.label){case 0:return e=A.clientWidth,r=A.clientHeight,i=s?Km(null!=e?e:n.options.width):n.options.width,o=l?Km(null!=r?r:n.options.height):n.options.height,s||l?t?[4,u(i,o)]:[3,2]:[2];case 1:return a.sent(),t=!1,[2];case 2:return c(i,o),[2]}}))}))}));return h.observe(a,{box:"border-box"}),function(){h.unobserve(a)}}},e.customMerge=TT,e.defaultPartDrillDownDisplayCondition=WI,e.deleteMetaById=kw,e.differenceTempMergedCells=uT,e.download=function(e,t){try{var n=document.createElement("a");n.download="".concat(t,".csv");var r=new Blob(["\ufeff".concat(e)],{type:"text/csv;charset=utf-8"});n.href=URL.createObjectURL(r),n.click(),URL.revokeObjectURL(n.href)}catch(e){console.error(e)}},e.drawBar=Sm,e.drawBullet=Im,e.drawCustomContent=Dm,e.drawInterval=bm,e.drawLine=xm,e.existDimensionTotalGroup=Dw,e.extendLocale=function(e){hv=lv.merge({},hv,e)},e.filterExtraDimension=Fw,e.filterValidChartData=Em,e.flattenDimensionValues=Gw,e.flattenIndexesData=zw,e.floor=Km,e.formattedFieldValue=YB,e.generateExtraFieldMeta=Nw,e.generateId=EB,e.generateNillString=mB,e.generatePalette=QC,e.generateStandardColors=LC,e.getActionIconConfig=VB,e.getActiveCellsInfo=AT,e.getActiveHoverHeaderCells=$S,e.getAdjustedRowScrollX=jS,e.getAdjustedScrollOffset=ZS,e.getAllChildCells=JS,e.getAutoAdjustPosition=QT,e.getBaseCellData=function(e,t){var n,r,A,i=null==e?void 0:e.target,o=null===(n=qS(i))||void 0===n?void 0:n.meta,a=(null===(r=null==t?void 0:t.getCell)||void 0===r?void 0:r.call(t,i))||(null==i?void 0:i.parentNode);return{target:a,viewMeta:(null===(A=null==a?void 0:a.getMeta)||void 0===A?void 0:A.call(a))||o,event:e}},e.getBaseSheetComponentOptions=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return TT.apply(void 0,lt([zy,GI],st(e),!1))},e.getBorderPositionAndStyle=$B,e.getBulletRangeColor=Tm,e.getCellBoxByType=qB,e.getCellMeta=gT,e.getCellRange=nw,e.getCellWidth=Pm,e.getCellsTooltipData=WT,e.getClassNameWithPrefix=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"".concat(Gv,"-").concat(e.join("-"))},e.getColCellTheme=wb,e.getColHeaderByCellId=BT,e.getContentAreaForMultiData=_m,e.getCornerCellTheme=Bb,e.getCustomFieldsSummaries=GT,e.getDataCellId=Bw,e.getDataCellTheme=Eb,e.getDataPath=Mw,e.getDataPathPrefix=Rw,e.getDefaultCornerText=Pv,e.getDefaultSeriesNumberText=Dv,e.getDimensionsWithParentPath=Uw,e.getDimensionsWithoutPathPre=function(e){return e.map((function(e){var t,n=null==e?void 0:e.split(My);return null!==(t=n[(null==n?void 0:n.length)-1])&&void 0!==t?t:e}))},e.getDisplayText=Rm,e.getDrillDownCache=zI,e.getEmptyPlaceholder=Nm,e.getExistValues=Lw,e.getExtraFrozenColNodes=Pb,e.getExtraFrozenRowNodes=_b,e.getExtraFrozenSeriesNodes=Db,e.getExtraPaddingForExpandIcon=pS,e.getFieldList=HT,e.getFlattenDimensionValues=Kw,e.getFrozenColOffset=Gb,e.getFrozenGroupTypeByCell=$m,e.getFrozenTrailingColOffset=Kb,e.getFrozenTrailingRowOffset=zb,e.getHeadInfo=OT,e.getHeaderList=LS,e.getHeaderTotalStatus=_w,e.getHorizontalTextIconPosition=JB,e.getIcon=nB,e.getIconTotalWidth=WB,e.getIndexFields=Hw,e.getIndexRangeWithOffsets=YS,e.getInteractionCells=mT,e.getInteractionCellsBySelectedCells=function(e,t){var n=lv.reduce(e,(function(e,n){return lt(lt([],st(e),!1),st(mT(n,t)),!1)}),[]);return lv.uniqBy(lt(lt([],st(e),!1),st(n),!1),"id")},e.getInvisibleInfo=tT,e.getLang=dv,e.getLeafColumns=rw,e.getLeafColumnsWithKey=Aw,e.getLeftLeafNode=iw,e.getListItem=MT,e.getLocale=function(){return hv},e.getMaxRowLen=wS,e.getMergedCellInstance=iT,e.getMergedQuery=UT,e.getNextEdge=eS,e.getNodeFormatData=xS,e.getNodeRoot=function(e){for(;0!==e.level;)e=e.parent;return e},e.getOccupiedWidthForTableCol=gS,e.getOffscreenCanvas=hS,e.getOrCreateResizeAreaGroupById=vw,e.getPalette=LT,e.getPolygonPoints=tS,e.getRangeIndex=vT,e.getRectangleEdges=qx,e.getResizeAreaAttrs=gw,e.getRightAndBottomCells=nS,e.getRowCellForSelectedCell=yT,e.getRowCellTheme=mb,e.getRowHeaderByCellId=CT,e.getSatisfiedPivotMetaValues=Pw,e.getScrollGroupClip=Vb,e.getScrollOffsetForCol=hT,e.getScrollOffsetForRow=dT,e.getSelectedCellIndexes=DT,e.getSelectedCellsData=PT,e.getSelectedData=VS,e.getSeriesNumberNodes=Hb,e.getSortByMeasureValues=zx,e.getSortMethod=function(){return[{name:fv("升序"),value:"ASC"},{name:fv("降序"),value:"DESC"}]},e.getSortRuleOptions=function(){return[{label:fv("首字母"),value:"sortMethod"},{label:fv("手动排序"),value:"sortBy"},{label:fv("其他字段"),value:"sortByMeasure",children:[]}]},e.getSortTypeIcon=Wx,e.getSortedPivotMeta=Xx,e.getStrategySheetTooltipClsName=function(e){return e?"".concat(DI,"-").concat(e):DI},e.getSubTotalNodeWidthOrHeightByLevel=function(e,t,n){return e.filter((function(e){return e.level>=t})).map((function(e){return e[n]})).reduce((function(e,t){return e+t}),0)},e.getSummaries=KT,e.getSummaryName=NT,e.getTableColIconsWidth=fS,e.getTempMergedCell=rT,e.getTheme=xb,e.getTooltipData=zT,e.getTooltipDefaultOptions=function(e){return rt({operator:{menu:{onClick:lv.noop,items:[],selectedKeys:[]}},enableFormat:!0},e)},e.getTooltipDetailList=kT,e.getTooltipOperatorHiddenColumnsMenu=KC,e.getTooltipOperatorSortMenus=zC,e.getTooltipOperatorTableSortMenus=VC,e.getTooltipOptions=YT,e.getTooltipOptionsByCellType=XT,e.getTooltipVisibleOperator=jT,e.getValidFrozenOptions=Qm,e.getValidFrozenOptionsForPivot=Um,e.getVerticalIconPosition=ZB,e.getVerticalTextPosition=jB,e.getVisibleInfo=nT,e.groupIconsByPosition=XB,e.groupSelectedCells=ET,e.handleActionIconClick=VI,e.handleDrillDown=function(e){var t=e.fetchData,n=e.spreadsheet,r=e.drillFields,A=e.drillItemsNum,i=void 0===A?-1:A;n.store.set("drillItemsNum",i);var o=n.store.get("drillDownNode"),a=zI(n,o),s=a.drillDownDataCache,l=a.drillDownCurrentCache,u=lv.clone(s);l&&(u=lv.filter(s,(function(e){return e.rowId!==o.id}))),t&&t(o,r).then((function(e){return it(void 0,void 0,void 0,(function(){var t,r,A,i;return ot(this,(function(a){switch(a.label){case 0:return t=e.drillData,r=e.drillField,n.dataSet.transformDrillDownData(r,t,o),lv.isEmpty(t)||(A=o.level+1,i={rowId:o.id,drillLevel:A,drillData:t,drillField:r},u.push(i),n.store.set("drillDownDataCache",u)),n.interaction.reset(),[4,n.render(!1)];case 1:return a.sent(),[2]}}))}))}))},e.handleSortAction=Vx,e.hasDocument=ym,e.hasNavigator=Cm,e.i18n=fv,e.includeCell=Cw,e.injectCssText=function(e,t){void 0===t&&(t="");var n=document.getElementById(e);return n||((n=document.createElement("style")).id=e,document.head.appendChild(n)),n.innerHTML=t,n},e.isAscSort=kx,e.isDataCell=ww,e.isDescSort=Nx,e.isFrozenCol=Wm,e.isFrozenRow=Ym,e.isFrozenTrailingCol=Xm,e.isFrozenTrailingRow=jm,e.isIPhoneX=function(){return!vm()&&(/iPhone/gi.test(navigator.userAgent)&&812===window.screen.height&&375===window.screen.width)},e.isLinkFieldNode=gm,e.isMobile=Bm,e.isMouseEventWithMeta=pT,e.isMultiSelectionKey=fT,e.isMultiValue=bw,e.isReadableText=bC,e.isSSR=vm,e.isUnchangedValue=function(e,t){return Hm(e)||e===t},e.isUpDataValue=function(e){return lv.isNumber(e)?e>=0:!!e&&!lv.trim(e).startsWith("-")},e.isWindows=mm,e.isZeroOrEmptyValue=Hm,e.mergeCell=oT,e.mergeCellInfo=VT,e.mergeTempMergedCell=function(e,t){var n={};return lt(lt([],st(e),!1),st(t),!1).forEach((function(e){n[e.viewMeta.id]=e})),Object.values(n)},e.mergedCellConvertTempMergedCells=lT,e.optimizeScrollXY=Jm,e.registerIcon=tB,e.removeOffscreenCanvas=dS,e.removeUnmergedCellsInfo=aT,e.renderCircle=sm,e.renderIcon=hm,e.renderLine=um,e.renderMiniChart=Lm,e.renderPolygon=om,e.renderPolyline=am,e.renderRect=im,e.renderText=lm,e.renderTreeIcon=dm,e.replaceEmptyFieldValue=Mm,e.resolveId=function(e){return void 0===e&&(e=""),e.split(My).reduce((function(e,t){return t===Ry||e.push(wB(t)),e}),[])},e.resolveNillString=wB,e.round=zm,e.safeJsonParse=vS,e.scale=wm,e.setLang=function(e){cv=e||uv},e.setState=ST,e.setTooltipContainerStyle=RT,e.setupDataConfig=FT,e.setupOptions=bT,e.shouldAddResizeArea=yw,e.shouldReverseFontColor=FC,e.shouldUpdateBySelectedCellsHighlight=mw,e.sortAction=_x,e.sortByCustom=Px,e.sortByFunc=Gx,e.splitInViewIndexesWithFrozen=tw,e.strategyCopy=function(e){var t=e.sheetInstance,n=e.split,r=e.formatOptions;return new XS({spreadsheet:t,isExport:!0,config:{separator:n,formatOptions:r}}).getPivotAllCopyData()[0].content},e.transformDimensionsValues=Iw,e.transformIndexesData=Ow,e.transformRatioToPercent=Fm,e.translateGroup=qm,e.translateGroupX=function(e,t){if(e){var n=st(e.getPosition(),1)[0];e.translate(t-n,0)}},e.translateGroupY=function(e,t){if(e){var n=st(e.getPosition(),2)[1];null==e||e.translate(0,t-n)}},e.unique=$x,e.unmergeCell=sT,e.updateAllHeaderCellState=eT,e.updateBySelectedCellsHighlight=Tw,e.updateCurrentCellState=Sw,e.updateCurrentColumnCellState=xw,e.updateCurrentRowCellState=Ew,e.updateMergedCells=cT,e.updateShapeAttr=cm,e.verifyTheElementInTooltip=ZT,e.version="@antv/s2-v2.7.0",e.waitForCellMounted=IT}));
//# sourceMappingURL=s2.min.js.map
