UNPKG

@antv/g

Version:

A core module for rendering engine implements DOM API.

17 lines 291 kB
/*! * @antv/g * @description A core module for rendering engine implements DOM API. * @version 6.1.25 * @date 5/23/2025, 7:01:37 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G={})}(this,(function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function n(t){var n=function(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(t,"string");return"symbol"==e(n)?n:n+""}function r(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;arguments.length>e;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;e.length>r;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,n(i.key),i)}}function u(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);e>n;n++)r[n]=t[n];return r}function c(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}function h(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||c(t)||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 f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function v(t,n){if(n&&("object"==e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function p(t,e,n){return e=f(e),v(t,d()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function y(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],u=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){l=!0,i=t}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(t,e)||c(t,e)||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 k={exports:{}};!function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||t,o),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],s]:t._events[u].push(s):(t._events[u]=s,t._eventsCount++),t}function o(t,e){0===--t._eventsCount?t._events=new r:delete t._events[e]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var t,r,i=[];if(0===this._eventsCount)return i;for(r in t=this._events)e.call(t,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},s.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var r=0,i=e.length,a=Array(i);i>r;r++)a[r]=e[r].fn;return a},s.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},s.prototype.emit=function(t,e,r,i,a,o){var s=n?n+t:t;if(!this._events[s])return!1;var u,l,c=this._events[s],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,r),!0;case 4:return c.fn.call(c.context,e,r,i),!0;case 5:return c.fn.call(c.context,e,r,i,a),!0;case 6:return c.fn.call(c.context,e,r,i,a,o),!0}for(l=1,u=Array(h-1);h>l;l++)u[l-1]=arguments[l];c.fn.apply(c.context,u)}else{var f,d=c.length;for(l=0;d>l;l++)switch(c[l].once&&this.removeListener(t,c[l].fn,void 0,!0),h){case 1:c[l].fn.call(c[l].context);break;case 2:c[l].fn.call(c[l].context,e);break;case 3:c[l].fn.call(c[l].context,e,r);break;case 4:c[l].fn.call(c[l].context,e,r,i);break;default:if(!u)for(f=1,u=Array(h-1);h>f;f++)u[f-1]=arguments[f];c[l].fn.apply(c[l].context,u)}}return!0},s.prototype.on=function(t,e,n){return a(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return a(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var a=n?n+t:t;if(!this._events[a])return this;if(!e)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||o(this,a);else{for(var u=0,l=[],c=s.length;c>u;u++)(s[u].fn!==e||i&&!s[u].once||r&&s[u].context!==r)&&l.push(s[u]);l.length?this._events[a]=1===l.length?l[0]:l:o(this,a)}return this},s.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&o(this,e):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s}(k);var E=k.exports,x=1e-6,b="undefined"!=typeof Float32Array?Float32Array:Array;function T(){var t=new b(9);return b!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function M(){var t=new b(16);return b!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function w(t){var e=new b(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function N(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function P(t,e,n,r,i,a,o,s,u,l,c,h,f,d,v,p,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=u,t[8]=l,t[9]=c,t[10]=h,t[11]=f,t[12]=d,t[13]=v,t[14]=p,t[15]=m,t}function S(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function A(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function C(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],v=e[12],p=e[13],m=e[14],y=e[15],g=n*s-r*o,k=n*u-i*o,E=n*l-a*o,x=r*u-i*s,b=r*l-a*s,T=i*l-a*u,M=c*p-h*v,w=c*m-f*v,N=c*y-d*v,P=h*m-f*p,S=h*y-d*p,A=f*y-d*m,C=g*A-k*S+E*P+x*N-b*w+T*M;return C?(t[0]=(s*A-u*S+l*P)*(C=1/C),t[1]=(i*S-r*A-a*P)*C,t[2]=(p*T-m*b+y*x)*C,t[3]=(f*b-h*T-d*x)*C,t[4]=(u*N-o*A-l*w)*C,t[5]=(n*A-i*N+a*w)*C,t[6]=(m*E-v*T-y*k)*C,t[7]=(c*T-f*E+d*k)*C,t[8]=(o*S-s*N+l*M)*C,t[9]=(r*N-n*S-a*M)*C,t[10]=(v*b-p*E+y*g)*C,t[11]=(h*E-c*b-d*g)*C,t[12]=(s*w-o*P-u*M)*C,t[13]=(n*P-r*w+i*M)*C,t[14]=(p*k-v*x-m*g)*C,t[15]=(c*x-h*k+f*g)*C,t):null}function R(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],u=t[7],l=t[8],c=t[9],h=t[10],f=t[11],d=t[12],v=t[13],p=t[14],m=t[15];return(e*o-n*a)*(h*m-f*p)-(e*s-r*a)*(c*m-f*v)+(e*u-i*a)*(c*p-h*v)+(n*s-r*o)*(l*m-f*d)-(n*u-i*o)*(l*p-h*d)+(r*u-i*s)*(l*v-c*d)}function O(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],v=e[11],p=e[12],m=e[13],y=e[14],g=e[15],k=n[0],E=n[1],x=n[2],b=n[3];return t[0]=k*r+E*s+x*h+b*p,t[1]=k*i+E*u+x*f+b*m,t[2]=k*a+E*l+x*d+b*y,t[3]=k*o+E*c+x*v+b*g,t[4]=(k=n[4])*r+(E=n[5])*s+(x=n[6])*h+(b=n[7])*p,t[5]=k*i+E*u+x*f+b*m,t[6]=k*a+E*l+x*d+b*y,t[7]=k*o+E*c+x*v+b*g,t[8]=(k=n[8])*r+(E=n[9])*s+(x=n[10])*h+(b=n[11])*p,t[9]=k*i+E*u+x*f+b*m,t[10]=k*a+E*l+x*d+b*y,t[11]=k*o+E*c+x*v+b*g,t[12]=(k=n[12])*r+(E=n[13])*s+(x=n[14])*h+(b=n[15])*p,t[13]=k*i+E*u+x*f+b*m,t[14]=k*a+E*l+x*d+b*y,t[15]=k*o+E*c+x*v+b*g,t}function L(t,e,n){var r,i,a,o,s,u,l,c,h,f,d,v,p=n[0],m=n[1],y=n[2];return e===t?(t[12]=e[0]*p+e[4]*m+e[8]*y+e[12],t[13]=e[1]*p+e[5]*m+e[9]*y+e[13],t[14]=e[2]*p+e[6]*m+e[10]*y+e[14],t[15]=e[3]*p+e[7]*m+e[11]*y+e[15]):(i=e[1],a=e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=e[8],f=e[9],d=e[10],v=e[11],t[0]=r=e[0],t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=u,t[6]=l,t[7]=c,t[8]=h,t[9]=f,t[10]=d,t[11]=v,t[12]=r*p+s*m+h*y+e[12],t[13]=i*p+u*m+f*y+e[13],t[14]=a*p+l*m+d*y+e[14],t[15]=o*p+c*m+v*y+e[15]),t}function I(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[4],o=e[5],s=e[6],u=e[7],l=e[8],c=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+l*r,t[5]=o*i+c*r,t[6]=s*i+h*r,t[7]=u*i+f*r,t[8]=l*i-a*r,t[9]=c*i-o*r,t[10]=h*i-s*r,t[11]=f*i-u*r,t}function _(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],u=e[3],l=e[8],c=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-l*r,t[1]=o*i-c*r,t[2]=s*i-h*r,t[3]=u*i-f*r,t[8]=a*r+l*i,t[9]=o*r+c*i,t[10]=s*r+h*i,t[11]=u*r+f*i,t}function D(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function F(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function G(t,e,n){var r,i,a,o=n[0],s=n[1],u=n[2],l=Math.hypot(o,s,u);return x>l?null:(o*=l=1/l,s*=l,u*=l,r=Math.sin(e),t[0]=o*o*(a=1-(i=Math.cos(e)))+i,t[1]=s*o*a+u*r,t[2]=u*o*a-s*r,t[3]=0,t[4]=o*s*a-u*r,t[5]=s*s*a+i,t[6]=u*s*a+o*r,t[7]=0,t[8]=o*u*a+s*r,t[9]=s*u*a-o*r,t[10]=u*u*a+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function B(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function V(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Y(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function U(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=r+r,u=i+i,l=a+a,c=r*s,h=r*u,f=r*l,d=i*u,v=i*l,p=a*l,m=o*s,y=o*u,g=o*l;return t[0]=1-(d+p),t[1]=h+g,t[2]=f-y,t[3]=0,t[4]=h-g,t[5]=1-(c+p),t[6]=v+m,t[7]=0,t[8]=f+y,t[9]=v-m,t[10]=1-(c+d),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function z(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function j(t,e){var n=e[4],r=e[5],i=e[6],a=e[8],o=e[9],s=e[10];return t[0]=Math.hypot(e[0],e[1],e[2]),t[1]=Math.hypot(n,r,i),t[2]=Math.hypot(a,o,s),t}function X(t,e){var n=new b(3);j(n,e);var r=1/n[0],i=1/n[1],a=1/n[2],o=e[0]*r,s=e[1]*i,u=e[2]*a,l=e[4]*r,c=e[5]*i,h=e[6]*a,f=e[8]*r,d=e[9]*i,v=e[10]*a,p=o+c+v,m=0;return p>0?(t[3]=.25*(m=2*Math.sqrt(p+1)),t[0]=(h-d)/m,t[1]=(f-u)/m,t[2]=(s-l)/m):o>c&&o>v?(t[3]=(h-d)/(m=2*Math.sqrt(1+o-c-v)),t[0]=.25*m,t[1]=(s+l)/m,t[2]=(f+u)/m):c>v?(t[3]=(f-u)/(m=2*Math.sqrt(1+c-o-v)),t[0]=(s+l)/m,t[1]=.25*m,t[2]=(h+d)/m):(t[3]=(s-l)/(m=2*Math.sqrt(1+v-o-c)),t[0]=(f+u)/m,t[1]=(h+d)/m,t[2]=.25*m),t}function H(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],u=e[3],l=a+a,c=o+o,h=s+s,f=a*l,d=a*c,v=a*h,p=o*c,m=o*h,y=s*h,g=u*l,k=u*c,E=u*h,x=r[0],b=r[1],T=r[2],M=i[0],w=i[1],N=i[2],P=(1-(p+y))*x,S=(d+E)*x,A=(v-k)*x,C=(d-E)*b,R=(1-(f+y))*b,O=(m+g)*b,L=(v+k)*T,I=(m-g)*T,_=(1-(f+p))*T;return t[0]=P,t[1]=S,t[2]=A,t[3]=0,t[4]=C,t[5]=R,t[6]=O,t[7]=0,t[8]=L,t[9]=I,t[10]=_,t[11]=0,t[12]=n[0]+M-(P*M+C*w+L*N),t[13]=n[1]+w-(S*M+R*w+I*N),t[14]=n[2]+N-(A*M+O*w+_*N),t[15]=1,t}function W(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,u=i+i,l=n*o,c=r*o,h=r*s,f=i*o,d=i*s,v=i*u,p=a*o,m=a*s,y=a*u;return t[0]=1-h-v,t[1]=c+y,t[2]=f-m,t[3]=0,t[4]=c-y,t[5]=1-l-v,t[6]=d+p,t[7]=0,t[8]=f+m,t[9]=d-p,t[10]=1-l-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function q(t,e,n,r,i){var a,o=1/Math.tan(e/2);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(a=1/(r-i)),t[14]=2*i*r*a):(t[10]=-1,t[14]=-2*r),t}function Z(t,e,n,r,i,a,o){var s=1/(e-n),u=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(o+a)*l,t[15]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var K=Z;function Q(t,e,n,r,i,a,o){var s=1/(e-n),u=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=a*l,t[15]=1,t}function $(t,e,n,r){var i,a,o,s,u,l,c,h,f,d,v=e[0],p=e[1],m=e[2],y=r[0],g=r[1],k=r[2],E=n[0],b=n[1],T=n[2];return x>Math.abs(v-E)&&x>Math.abs(p-b)&&x>Math.abs(m-T)?S(t):(d=1/Math.hypot(c=v-E,h=p-b,f=m-T),(d=Math.hypot(i=g*(f*=d)-k*(h*=d),a=k*(c*=d)-y*f,o=y*h-g*c))?(i*=d=1/d,a*=d,o*=d):(i=0,a=0,o=0),(d=Math.hypot(s=h*o-f*a,u=f*i-c*o,l=c*a-h*i))?(s*=d=1/d,u*=d,l*=d):(s=0,u=0,l=0),t[0]=i,t[1]=s,t[2]=c,t[3]=0,t[4]=a,t[5]=u,t[6]=h,t[7]=0,t[8]=o,t[9]=l,t[10]=f,t[11]=0,t[12]=-(i*v+a*p+o*m),t[13]=-(s*v+u*p+l*m),t[14]=-(c*v+h*p+f*m),t[15]=1,t)}function J(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var tt=O,et=Object.freeze({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],l=e[7],c=e[8],h=e[9],f=e[10],d=e[11],v=e[12],p=e[13],m=e[14],y=e[15];return t[0]=s*(f*y-d*m)-h*(u*y-l*m)+p*(u*d-l*f),t[1]=-(r*(f*y-d*m)-h*(i*y-a*m)+p*(i*d-a*f)),t[2]=r*(u*y-l*m)-s*(i*y-a*m)+p*(i*l-a*u),t[3]=-(r*(u*d-l*f)-s*(i*d-a*f)+h*(i*l-a*u)),t[4]=-(o*(f*y-d*m)-c*(u*y-l*m)+v*(u*d-l*f)),t[5]=n*(f*y-d*m)-c*(i*y-a*m)+v*(i*d-a*f),t[6]=-(n*(u*y-l*m)-o*(i*y-a*m)+v*(i*l-a*u)),t[7]=n*(u*d-l*f)-o*(i*d-a*f)+c*(i*l-a*u),t[8]=o*(h*y-d*p)-c*(s*y-l*p)+v*(s*d-l*h),t[9]=-(n*(h*y-d*p)-c*(r*y-a*p)+v*(r*d-a*h)),t[10]=n*(s*y-l*p)-o*(r*y-a*p)+v*(r*l-a*s),t[11]=-(n*(s*d-l*h)-o*(r*d-a*h)+c*(r*l-a*s)),t[12]=-(o*(h*m-f*p)-c*(s*m-u*p)+v*(s*f-u*h)),t[13]=n*(h*m-f*p)-c*(r*m-i*p)+v*(r*f-i*h),t[14]=-(n*(s*m-u*p)-o*(r*m-i*p)+v*(r*u-i*s)),t[15]=n*(s*f-u*h)-o*(r*f-i*h)+c*(r*u-i*s),t},clone:w,copy:N,create:M,determinant:R,equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],l=t[7],c=t[8],h=t[9],f=t[10],d=t[11],v=t[12],p=t[13],m=t[14],y=t[15],g=e[0],k=e[1],E=e[2],b=e[3],T=e[4],M=e[5],w=e[6],N=e[7],P=e[8],S=e[9],A=e[10],C=e[11],R=e[12],O=e[13],L=e[14],I=e[15];return!(Math.abs(n-g)>x*Math.max(1,Math.abs(n),Math.abs(g))||Math.abs(r-k)>x*Math.max(1,Math.abs(r),Math.abs(k))||Math.abs(i-E)>x*Math.max(1,Math.abs(i),Math.abs(E))||Math.abs(a-b)>x*Math.max(1,Math.abs(a),Math.abs(b))||Math.abs(o-T)>x*Math.max(1,Math.abs(o),Math.abs(T))||Math.abs(s-M)>x*Math.max(1,Math.abs(s),Math.abs(M))||Math.abs(u-w)>x*Math.max(1,Math.abs(u),Math.abs(w))||Math.abs(l-N)>x*Math.max(1,Math.abs(l),Math.abs(N))||Math.abs(c-P)>x*Math.max(1,Math.abs(c),Math.abs(P))||Math.abs(h-S)>x*Math.max(1,Math.abs(h),Math.abs(S))||Math.abs(f-A)>x*Math.max(1,Math.abs(f),Math.abs(A))||Math.abs(d-C)>x*Math.max(1,Math.abs(d),Math.abs(C))||Math.abs(v-R)>x*Math.max(1,Math.abs(v),Math.abs(R))||Math.abs(p-O)>x*Math.max(1,Math.abs(p),Math.abs(O))||Math.abs(m-L)>x*Math.max(1,Math.abs(m),Math.abs(L))||Math.abs(y-I)>x*Math.max(1,Math.abs(y),Math.abs(I)))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},fromQuat:W,fromQuat2:function(t,e){var n=new b(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],u=e[5],l=e[6],c=e[7],h=r*r+i*i+a*a+o*o;return h>0?(n[0]=2*(s*o+c*r+u*a-l*i)/h,n[1]=2*(u*o+c*i+l*r-s*a)/h,n[2]=2*(l*o+c*a+s*i-u*r)/h):(n[0]=2*(s*o+c*r+u*a-l*i),n[1]=2*(u*o+c*i+l*r-s*a),n[2]=2*(l*o+c*a+s*i-u*r)),U(t,e,n),t},fromRotation:G,fromRotationTranslation:U,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3],u=i+i,l=a+a,c=o+o,h=i*u,f=i*l,d=i*c,v=a*l,p=a*c,m=o*c,y=s*u,g=s*l,k=s*c,E=r[0],x=r[1],b=r[2];return t[0]=(1-(v+m))*E,t[1]=(f+k)*E,t[2]=(d-g)*E,t[3]=0,t[4]=(f-k)*x,t[5]=(1-(h+m))*x,t[6]=(p+y)*x,t[7]=0,t[8]=(d+g)*b,t[9]=(p-y)*b,t[10]=(1-(h+v))*b,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:H,fromScaling:F,fromTranslation:D,fromValues:function(t,e,n,r,i,a,o,s,u,l,c,h,f,d,v,p){var m=new b(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=a,m[6]=o,m[7]=s,m[8]=u,m[9]=l,m[10]=c,m[11]=h,m[12]=f,m[13]=d,m[14]=v,m[15]=p,m},fromXRotation:B,fromYRotation:V,fromZRotation:Y,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),u=1/(i-r),l=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t},getRotation:X,getScaling:j,getTranslation:z,identity:S,invert:C,lookAt:$,mul:tt,multiply:O,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:K,orthoNO:Z,orthoZO:Q,perspective:q,perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(o+s),l=2/(i+a);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-s)*u*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},perspectiveNO:q,perspectiveZO:function(t,e,n,r,i){var a,o=1/Math.tan(e/2);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(a=1/(r-i)),t[14]=i*r*a):(t[10]=-1,t[14]=-r),t},rotate:function(t,e,n,r){var i,a,o,s,u,l,c,h,f,d,v,p,m,y,g,k,E,b,T,M,w,N,P,S,A=r[0],C=r[1],R=r[2],O=Math.hypot(A,C,R);return x>O?null:(A*=O=1/O,C*=O,R*=O,i=Math.sin(n),u=e[1],l=e[2],c=e[3],f=e[5],d=e[6],v=e[7],m=e[9],y=e[10],g=e[11],T=A*C*(o=1-(a=Math.cos(n)))-R*i,M=C*C*o+a,w=R*C*o+A*i,N=A*R*o+C*i,P=C*R*o-A*i,S=R*R*o+a,t[0]=(s=e[0])*(k=A*A*o+a)+(h=e[4])*(E=C*A*o+R*i)+(p=e[8])*(b=R*A*o-C*i),t[1]=u*k+f*E+m*b,t[2]=l*k+d*E+y*b,t[3]=c*k+v*E+g*b,t[4]=s*T+h*M+p*w,t[5]=u*T+f*M+m*w,t[6]=l*T+d*M+y*w,t[7]=c*T+v*M+g*w,t[8]=s*N+h*P+p*S,t[9]=u*N+f*P+m*S,t[10]=l*N+d*P+y*S,t[11]=c*N+v*P+g*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:I,rotateY:_,rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],u=e[3],l=e[4],c=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+l*r,t[1]=o*i+c*r,t[2]=s*i+h*r,t[3]=u*i+f*r,t[4]=l*i-a*r,t[5]=c*i-o*r,t[6]=h*i-s*r,t[7]=f*i-u*r,t},scale:function(t,e,n){var r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},set:P,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:J,subtract:J,targetTo:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=r[0],u=r[1],l=r[2],c=i-n[0],h=a-n[1],f=o-n[2],d=c*c+h*h+f*f;d>0&&(c*=d=1/Math.sqrt(d),h*=d,f*=d);var v=u*f-l*h,p=l*c-s*f,m=s*h-u*c;return(d=v*v+p*p+m*m)>0&&(v*=d=1/Math.sqrt(d),p*=d,m*=d),t[0]=v,t[1]=p,t[2]=m,t[3]=0,t[4]=h*m-f*p,t[5]=f*v-c*m,t[6]=c*p-h*v,t[7]=0,t[8]=c,t[9]=h,t[10]=f,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t},translate:L,transpose:A});function nt(){var t=new b(3);return b!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function rt(t){var e=new b(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function it(t){return Math.hypot(t[0],t[1],t[2])}function at(t,e,n){var r=new b(3);return r[0]=t,r[1]=e,r[2]=n,r}function ot(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function st(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function lt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function ct(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function ht(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function ft(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function dt(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t}function vt(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t}function pt(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/(o=o||1),t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t}function mt(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2];return x*Math.max(1,Math.abs(n),Math.abs(a))>=Math.abs(n-a)&&x*Math.max(1,Math.abs(r),Math.abs(o))>=Math.abs(r-o)&&x*Math.max(1,Math.abs(i),Math.abs(s))>=Math.abs(i-s)}var yt=lt,gt=function(t,e){return Math.hypot(e[0]-t[0],e[1]-t[1],e[2]-t[2])},kt=it;function Et(){var t=new b(4);return b!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function xt(t,e,n,r){var i=new b(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function bt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,t}function Tt(){var t=new b(4);return b!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Mt(t,e,n){var r=Math.sin(n*=.5);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function wt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],u=n[1],l=n[2],c=n[3];return t[0]=r*c+o*s+i*l-a*u,t[1]=i*c+o*u+a*s-r*l,t[2]=a*c+o*l+r*u-i*s,t[3]=o*c-r*s-i*u-a*l,t}function Nt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=a*s,t}function Pt(t,e,n,r){var i=.5*Math.PI/180;n*=i,r*=i;var a=Math.sin(e*=i),o=Math.cos(e),s=Math.sin(n),u=Math.cos(n),l=Math.sin(r),c=Math.cos(r);return t[0]=a*u*c-o*s*l,t[1]=o*s*c+a*u*l,t[2]=o*u*l-a*s*c,t[3]=o*u*c+a*s*l,t}nt(),function(){var t=Et()}();var St=xt,At=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Ct=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},Rt=wt,Ot=function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t};function Lt(){var t=new b(2);return b!=Float32Array&&(t[0]=0,t[1]=0),t}function It(t){return"function"==typeof t}function _t(t){return null==t}function Dt(t){return Array.isArray(t)}nt(),at(1,0,0),at(0,1,0),Tt(),Tt(),T(),function(){var t=Lt()}();var Ft={}.toString,Gt=function(t,e){return Ft.call(t)==="[object "+e+"]"};function Bt(t){if(!Array.isArray(t))return-1/0;var e=t.length;if(!e)return-1/0;for(var n=t[0],r=1;e>r;r++)n=Math.max(n,t[r]);return n}var Vt=function(t){if(Dt(t))return t.reduce((function(t,e){return Math.min(t,e)}),t[0])};function Yt(t){return"string"==typeof t}var Ut=function(t,e,n){return e>t?e:t>n?n:t};function zt(t){return"number"==typeof t}function jt(t,e,n){return void 0===n&&(n=1e-5),t===e||n>Math.abs(t-e)}var Xt=function(t,e){return(t%e+e)%e},Ht=function(t){return Gt(t,"Boolean")},Wt=function(t){return void 0===t},qt=function(){return qt=Object.assign||function(t){for(var e,n=1,r=arguments.length;r>n;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},qt.apply(this,arguments)};function Zt(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;a>i;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Kt={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Qt(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}var $t={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Jt(t){return Array.isArray(t)&&t.every((function(t){var e=t[0].toLowerCase();return $t[e]===t.length-1&&"achlmqstvz".includes(e)}))}function te(t){return Jt(t)&&t.every((function(t){var e=t[0];return e===e.toUpperCase()}))}function ee(t){return te(t)&&t.every((function(t){return"ACLMQZ".includes(t[0])}))}function ne(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=$t[n]&&("m"===n&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,$t[n]))),$t[n]););}function re(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);return 48===r?(t.param=0,void(t.index+=1)):49===r?(t.param=1,void(t.index+=1)):void(t.err='[path-util]: invalid Arc flag "'.concat(n[e],'", expecting 0 or 1 at index ').concat(e))}function ie(t){return t>=48&&57>=t||43===t||45===t||46===t}function ae(t){return t>=48&&57>=t}function oe(t){var e,n=t.max,r=t.pathValue,i=t.index,a=i,o=!1,s=!1,u=!1,l=!1;if(n>a)if(43!==(e=r.charCodeAt(a))&&45!==e||(e=r.charCodeAt(a+=1)),ae(e)||46===e){if(46!==e){if(o=48===e,e=r.charCodeAt(a+=1),o&&n>a&&e&&ae(e))return void(t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(r[i],'" illegal number'));for(;n>a&&ae(r.charCodeAt(a));)a+=1,s=!0;e=r.charCodeAt(a)}if(46===e){for(l=!0,a+=1;ae(r.charCodeAt(a));)a+=1,u=!0;e=r.charCodeAt(a)}if(101===e||69===e){if(l&&!s&&!u)return void(t.err="[path-util]: Invalid path value at index ".concat(a,', "').concat(r[a],'" invalid float exponent'));if(43!==(e=r.charCodeAt(a+=1))&&45!==e||(a+=1),a>=n||!ae(r.charCodeAt(a)))return void(t.err="[path-util]: Invalid path value at index ".concat(a,', "').concat(r[a],'" invalid integer exponent'));for(;n>a&&ae(r.charCodeAt(a));)a+=1}t.index=a,t.param=+t.pathValue.slice(i,a)}else t.err="[path-util]: Invalid path value at index ".concat(a,', "').concat(r[a],'" is not a number');else t.err="[path-util]: Invalid path value at index ".concat(a,', "pathValue" is missing param')}function se(t){for(var e,n=t.pathValue,r=t.max;r>t.index&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function ue(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),a=$t[n[r].toLowerCase()];if(t.segmentStart=r,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}(i))if(t.index+=1,se(t),t.data=[],a){for(;;){for(var o=a;o>0;o-=1){if(97!=(32|i)||3!==o&&4!==o?oe(t):re(t),t.err.length)return;t.data.push(t.param),se(t),e>t.index&&44===n.charCodeAt(t.index)&&(t.index+=1,se(t))}if(t.index>=t.max)break;if(!ie(n.charCodeAt(t.index)))break}ne(t)}else ne(t);else t.err='[path-util]: Invalid path value "'.concat(n[r],'" is not a path command')}var le=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function ce(t){if(te(t))return[].concat(t);var e=function(t){if(Jt(t))return[].concat(t);var e=new le(t);for(se(e);e.max>e.index&&!e.err.length;)ue(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,a=0;return e.map((function(t){var e,o=t.slice(1).map(Number),s=t[0],u=s.toUpperCase();if("M"===s)return i=n=o[0],a=r=o[1],["M",n,r];if(s!==u)switch(u){case"A":e=[u,o[0],o[1],o[2],o[3],o[4],o[5]+n,o[6]+r];break;case"V":e=[u,o[0]+r];break;case"H":e=[u,o[0]+n];break;default:var l=o.map((function(t,e){return t+(e%2?r:n)}));e=[u].concat(l)}else e=[u].concat(o);var c=e.length;switch(u){case"Z":n=i,r=a;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[c-2],r=e[c-1],"M"===u&&(i=n,a=r)}return e}))}function he(t,e){var n=t[0],r=e.x1,i=e.y1,a=e.x2,o=e.y2,s=t.slice(1).map(Number),u=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)u=["L",t[1],i];else if("V"===n)u=["L",r,t[1]];else if("S"===n){var l=2*r-a,c=2*i-o;e.x1=l,e.y1=c,u=["C",l,c].concat(s)}else if("T"===n){var h=2*r-e.qx,f=2*i-e.qy;e.qx=h,e.qy=f,u=["Q",h,f].concat(s)}else if("Q"===n){var d=s[1];e.qx=s[0],e.qy=d}return u}function fe(t){if(ee(t))return[].concat(t);for(var e=ce(t),n=qt({},Kt),r=0;e.length>r;r+=1){e[r]=he(e[r],n);var i=e[r],a=i.length;n.x1=+i[a-2],n.y1=+i[a-1],n.x2=+i[a-4]||n.x1,n.y2=+i[a-3]||n.y1}return e}function de(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function ve(t,e,n,r,i,a,o,s,u,l){var c,h,f,d,v,p=t,m=e,y=n,g=r,k=s,E=u,x=120*Math.PI/180,b=Math.PI/180*(+i||0),T=[];if(l)h=l[0],f=l[1],d=l[2],v=l[3];else{m=(c=de(p,m,-b)).y;var M=((p=c.x)-(k=(c=de(k,E,-b)).x))/2,w=(m-(E=c.y))/2,N=M*M/(y*y)+w*w/(g*g);N>1&&(y*=N=Math.sqrt(N),g*=N);var P=y*y,S=g*g,A=(a===o?-1:1)*Math.sqrt(Math.abs((P*S-P*w*w-S*M*M)/(P*w*w+S*M*M)));d=A*y*w/g+(p+k)/2,h=Math.asin(((m-(v=A*-g*M/y+(m+E)/2))/g*1e9|0)/1e9),f=Math.asin(((E-v)/g*1e9|0)/1e9),0>(h=d>p?Math.PI-h:h)&&(h=2*Math.PI+h),0>(f=d>k?Math.PI-f:f)&&(f=2*Math.PI+f),o&&h>f&&(h-=2*Math.PI),!o&&f>h&&(f-=2*Math.PI)}var C=f-h;if(Math.abs(C)>x){var R=f,O=k,L=E;T=ve(k=d+y*Math.cos(f=h+x*(o&&f>h?1:-1)),E=v+g*Math.sin(f),y,g,i,0,o,O,L,[f,R,d,v])}C=f-h;var I=Math.cos(h),_=Math.sin(h),D=Math.cos(f),F=Math.sin(f),G=Math.tan(C/4),B=4/3*y*G,V=4/3*g*G,Y=[p,m],U=[p+B*_,m-V*I],z=[k+B*F,E-V*D],j=[k,E];if(U[0]=2*Y[0]-U[0],U[1]=2*Y[1]-U[1],l)return U.concat(z,j,T);for(var X=[],H=0,W=(T=U.concat(z,j,T)).length;W>H;H+=1)X[H]=H%2?de(T[H-1],T[H],b).y:de(T[H],T[H+1],b).x;return X}function pe(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}var me=function(t,e,n,r){return Zt(Zt([],pe([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function ye(t,e){var n,r,i,a,o,s,u,l=t[0],c=t.slice(1).map(Number),h=c[0],f=c[1],d=e.x1,v=e.y1,p=e.x,m=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=h,e.y=f,t;case"A":return n=[d,v].concat(c),["C"].concat(ve(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9]));case"Q":return e.qx=h,e.qy=f,n=[d,v].concat(c),["C"].concat([(s=1/3)*n[0]+(u=2/3)*(r=n[2]),s*n[1]+u*(i=n[3]),s*(a=n[4])+u*r,s*(o=n[5])+u*i,a,o]);case"L":return["C"].concat(me(d,v,h,f));case"Z":return d===p&&v===m?["C",d,v,p,m,p,m]:["C"].concat(me(d,v,p,m))}return t}function ge(t,e){if(void 0===e&&(e=!1),function(t){return ee(t)&&t.every((function(t){return"MC".includes(t[0])}))}(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r,i,a=fe(t),o=qt({},Kt),s=[],u="",l=a.length,c=[],h=0;l>h;h+=1){a[h]&&(u=a[h][0]),s[h]=u;var f=ye(a[h],o);a[h]=f,Qt(a,s,h),l=a.length,"Z"===u&&c.push(h),o.x1=+(r=a[h])[(i=r.length)-2],o.y1=+r[i-1],o.x2=+r[i-4]||o.x1,o.y2=+r[i-3]||o.y1}return e?[a,c]:a}function ke(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ee(t,e,n,r,i){var a=ke([t,e],[n,r]),o={x:0,y:0};if("number"==typeof i)if(0<i)if(i<a){var s=pe([t,e],[n,r],i/a);o={x:s[0],y:s[1]}}else o={x:n,y:r};else o={x:t,y:e};return{length:a,point:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function xe(t,e){var n=t.x,r=t.y,i=e.x,a=e.y;return(0>n*a-r*i?-1:1)*Math.acos((n*i+r*a)/Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))))}function be(t,e,n,r,i,a,o,s,u,l){var c=Math.abs,h=Math.sin,f=Math.cos,d=Math.sqrt,v=Math.PI,p=c(n),m=c(r),y=(i%360+360)%360*(v/180);if(t===s&&e===u)return{x:t,y:e};if(0===p||0===m)return Ee(t,e,s,u,l).point;var g=(t-s)/2,k=(e-u)/2,E={x:f(y)*g+h(y)*k,y:-h(y)*g+f(y)*k},x=Math.pow(E.x,2)/Math.pow(p,2)+Math.pow(E.y,2)/Math.pow(m,2);x>1&&(p*=d(x),m*=d(x));var b=(Math.pow(p,2)*Math.pow(m,2)-Math.pow(p,2)*Math.pow(E.y,2)-Math.pow(m,2)*Math.pow(E.x,2))/(Math.pow(p,2)*Math.pow(E.y,2)+Math.pow(m,2)*Math.pow(E.x,2)),T=(a!==o?1:-1)*d(b=0>b?0:b),M=T*(p*E.y/m),w=T*(-m*E.x/p),N=f(y)*M-h(y)*w+(t+s)/2,P=h(y)*M+f(y)*w+(e+u)/2,S={x:(E.x-M)/p,y:(E.y-w)/m},A=xe({x:1,y:0},S),C=xe(S,{x:(-E.x-M)/p,y:(-E.y-w)/m});!o&&C>0?C-=2*v:o&&0>C&&(C+=2*v);var R=A+(C%=2*v)*l,O=p*f(R),L=m*h(R);return{x:f(y)*O-h(y)*L+N,y:h(y)*O+f(y)*L+P}}function Te(t,e,n,r,i,a,o,s,u,l,c){var h,f=c.bbox,d=void 0===f||f,v=c.length,p=void 0===v||v,m=c.sampleSize,y=void 0===m?30:m,g="number"==typeof l,k=t,E=e,x=0,b=[k,E,x],T=[k,E],M={x:0,y:0},w=[{x:k,y:E}];g&&0>=l&&(M={x:k,y:E});for(var N=0;y>=N;N+=1){if(k=(h=be(t,e,n,r,i,a,o,s,u,N/y)).x,E=h.y,d&&w.push({x:k,y:E}),p&&(x+=ke(T,[k,E])),T=[k,E],g&&x>=l&&l>b[2]){var P=(x-l)/(x-b[2]);M={x:T[0]*(1-P)+b[0]*P,y:T[1]*(1-P)+b[1]*P}}b=[k,E,x]}return g&&l>=x&&(M={x:s,y:u}),{length:x,point:M,min:{x:Math.min.apply(null,w.map((function(t){return t.x}))),y:Math.min.apply(null,w.map((function(t){return t.y})))},max:{x:Math.max.apply(null,w.map((function(t){return t.x}))),y:Math.max.apply(null,w.map((function(t){return t.y})))}}}function Me(t,e,n,r,i,a,o,s,u){var l=1-u;return{x:Math.pow(l,3)*t+3*Math.pow(l,2)*u*n+3*l*Math.pow(u,2)*i+Math.pow(u,3)*o,y:Math.pow(l,3)*e+3*Math.pow(l,2)*u*r+3*l*Math.pow(u,2)*a+Math.pow(u,3)*s}}function we(t,e,n,r,i,a,o,s,u,l){var c,h=l.bbox,f=void 0===h||h,d=l.length,v=void 0===d||d,p=l.sampleSize,m=void 0===p?10:p,y="number"==typeof u,g=t,k=e,E=0,x=[g,k,E],b=[g,k],T={x:0,y:0},M=[{x:g,y:k}];y&&0>=u&&(T={x:g,y:k});for(var w=0;m>=w;w+=1){if(g=(c=Me(t,e,n,r,i,a,o,s,w/m)).x,k=c.y,f&&M.push({x:g,y:k}),v&&(E+=ke(b,[g,k])),b=[g,k],y&&E>=u&&u>x[2]){var N=(E-u)/(E-x[2]);T={x:b[0]*(1-N)+x[0]*N,y:b[1]*(1-N)+x[1]*N}}x=[g,k,E]}return y&&u>=E&&(T={x:o,y:s}),{length:E,point:T,min:{x:Math.min.apply(null,M.map((function(t){return t.x}))),y:Math.min.apply(null,M.map((function(t){return t.y})))},max:{x:Math.max.apply(null,M.map((function(t){return t.x}))),y:Math.max.apply(null,M.map((function(t){return t.y})))}}}function Ne(t,e,n,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*t+2*s*o*n+Math.pow(o,2)*i,y:Math.pow(s,2)*e+2*s*o*r+Math.pow(o,2)*a}}function Pe(t,e,n,r,i,a,o,s){var u,l=s.bbox,c=void 0===l||l,h=s.length,f=void 0===h||h,d=s.sampleSize,v=void 0===d?10:d,p="number"==typeof o,m=t,y=e,g=0,k=[m,y,g],E=[m,y],x={x:0,y:0},b=[{x:m,y:y}];p&&0>=o&&(x={x:m,y:y});for(var T=0;v>=T;T+=1){if(m=(u=Ne(t,e,n,r,i,a,T/v)).x,y=u.y,c&&b.push({x:m,y:y}),f&&(g+=ke(E,[m,y])),E=[m,y],p&&g>=o&&o>k[2]){var M=(g-o)/(g-k[2]);x={x:E[0]*(1-M)+k[0]*M,y:E[1]*(1-M)+k[1]*M}}k=[m,y,g]}return p&&o>=g&&(x={x:i,y:a}),{length:g,point:x,min:{x:Math.min.apply(null,b.map((function(t){return t.x}))),y:Math.min.apply(null,b.map((function(t){return t.y})))},max:{x:Math.max.apply(null,b.map((function(t){return t.x}))),y:Math.max.apply(null,b.map((function(t){return t.y})))}}}function Se(t,e,n){for(var r,i,a,o,s,u,l,c,h,f=fe(t),d="number"==typeof e,v=[],p=0,m=0,y=0,g=0,k=[],E=[],x=0,b={x:0,y:0},T=b,M=b,w=b,N=0,P=0,S=f.length;S>P;P+=1)v=(l="M"===(c=(h=f[P])[0]))?v:[p,m].concat(h.slice(1)),l?(T=b={x:y=h[1],y:g=h[2]},x=0,d&&.001>e&&(w=b)):"L"===c?(x=(r=Ee(v[0],v[1],v[2],v[3],(e||0)-N)).length,b=r.min,T=r.max,M=r.point):"A"===c?(x=(i=Te(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],(e||0)-N,n||{})).length,b=i.min,T=i.max,M=i.point):"C"===c?(x=(a=we(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],(e||0)-N,n||{})).length,b=a.min,T=a.max,M=a.point):"Q"===c?(x=(o=Pe(v[0],v[1],v[2],v[3],v[4],v[5],(e||0)-N,n||{})).length,b=o.min,T=o.max,M=o.point):"Z"===c&&(x=(s=Ee((v=[p,m,y,g])[0],v[1],v[2],v[3],(e||0)-N)).length,b=s.min,T=s.max,M=s.point),d&&e>N&&N+x>=e&&(w=M),E.push(T),k.push(b),N+=x,p=(u="Z"!==c?h.slice(-2):[y,g])[0],m=u[1];return d&&e>=N&&(w={x:p,y:m}),{length:N,point:w,min:{x:Math.min.apply(null,k.map((function(t){return t.x}))),y:Math.min.apply(null,k.map((function(t){return t.y})))},max:{x:Math.max.apply(null,E.map((function(t){return t.x}))),y:Math.max.apply(null,E.map((function(t){return t.y})))}}}function Ae(t){return function(t){var e=0,n=0,r=0;return ge(t).map((function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var a,o,s,u,l,c,h,f,d=t.slice(1);return r=3*(((f=d[5])-(o=n))*((s=d[0])+(l=d[2]))-((h=d[4])-(a=e))*((u=d[1])+(c=d[3]))+u*(a-l)-s*(o-c)+f*(l+a/3)-h*(c+o/3))/20,i=t.slice(-2),e=i[0],n=i[1],r})).reduce((function(t,e){return t+e}),0)}(t)>=0}function Ce(t){return t.map((function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?we(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0;return{s:t,ss:e?i?function(t,e){void 0===e&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),a=t.slice(6,8),o=pe(n,r,e),s=pe(r,i,e),u=pe(i,a,e),l=pe(o,s,e),c=pe(s,u,e),h=pe(l,c,e);return[["C"].concat(o,l,h),["C"].concat(c,u,a)]}(r):[t,t]:[t],l:i}}))}function Re(t,e,n){var r=Ce(t),i=Ce(e),a=r.length,o=i.length,s=r.filter((function(t){return t.l})).length,u=i.filter((function(t){return t.l})).length,l=r.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/s||0,c=i.filter((function(t){return t.l})).reduce((function(t,e){return t+e.l}),0)/u||0,h=n||Math.max(a,o),f=[l,c],d=[h-a,h-o],v=0,p=[r,i].map((function(t,e){return t.l===h?t.map((function(t){return t.s})):t.map((function(t,n){return d[e]-=(v=n&&d[e]&&t.l>=f[e])?1:0,v?t.ss:[t.s]})).flat()}));return p[0].length===p[1].length?p:Re(p[0],p[1],h)}function Oe(){return Oe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(3>arguments.length?t:n):i.value}},Oe.apply(null,arguments)}function Le(t,e,n,r){var i=Oe(f(1&r?t.prototype:t),e,n);return 2&r&&"function"==typeof i?function(t){return i.apply(n,t)}:i} /*! * @antv/g-math * @description Geometry util * @version 3.0.1 * @date 5/23/2025, 6:59:22 AM * @author AntVis * @docs https://g.antv.antgroup.com/ */function Ie(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)}function _e(t,e){var n=Math.min.apply(Math,h(t)),r=Math.min.apply(Math,h(e));return{x:n,y:r,width:Math.max.apply(Math,h(t))-n,height:Math.max.apply(Math,h(e))-r}}function De(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Fe(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Ge(t,e,n,r,i,a,o){for(var s=function(t,e,n){return Math.atan(-e/t*Math.tan(n))}(n,r,i),u=1/0,l=-1/0,c=[a,o],h=2*-Math.PI;2*Math.PI>=h;h+=Math.PI){var f=s+h;o>a?f>a&&o>f&&c.push(f):f>o&&a>f&&c.push(f)}for(var d=0;c.length>d;d++){var v=De(t,0,n,r,i,c[d]);u>v&&(u=v),v>l&&(l=v)}for(var p=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),m=1/0,y=-1/0,g=[a,o],k=2*-Math.PI;2*Math.PI>=k;k+=Math.PI){var E=p+k;o>a?E>a&&o>E&&g.push(E):E>o&&a>E&&g.push(E)}for(var x=0;g.length>x;x++){var b=Fe(0,e,n,r,i,g[x]);m>b&&(m=b),b>y&&(y=b)}return{x:u,y:m,width:l-u,height:y-m}}function Be(t,e,n,r){return Ie(t,e,n,r)}function Ve(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function Ye(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function Ue(t,e,n,r){var i,a,o,s=-3*t+9*e-9*n+3*r,u=6*t-12*e+6*n,l=3*e-3*t,c=[];if(jt(s,0))jt(u,0)||0>(i=-l/u)||i>1||c.push(i);else{var h=u*u-4*s*l;jt(h,0)?c.push(-u/(2*s)):h>0&&(a=(-u-(o=Math.sqrt(h)))/(2*s),0>(i=(-u+o)/(2*s))||i>1||c.push(i),0>a||a>1||c.push(a))}return c}function ze(t,e,n,r,i,a,o,s){for(var u=[t,o],l=[e,s],c=Ue(t,n,i,o),h=Ue(e,r,a,s),f=0;c.length>f;f++)u.push(Ye(t,n,i,o,c[f]));for(var d=0;h.length>d;d++)l.push(Ye(e,r,a,s,h[d]));return _e(u,l)}function je(t){return function(t){if(2>t.length)return 0;for(var e=0,n=0;t.length-1>n;n++){var r=t[n],i=t[n+1];e+=Ie(r[0],r[1],i[0],i[1])}return e}(t)}function Xe(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function He(t,e,n){var r=t+n-2*e;if(jt(r,0))return[.5];var i=(t-e)/r;return i>1||0>i?[]:[i]}function We(t,e,n,r,i,a){var o=He(t,n,i)[0],s=He(e,r,a)[0],u=[t,i],l=[e,a];return void 0!==o&&u.push(Xe(t,n,i,o)),void 0!==s&&l.push(Xe(e,r,a,s)),_e(u,l)}function qe(){qe=function(){return n};var t,n={},r=Object.prototype,i=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,n,r){return Object.defineProperty(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function c(e,n,r,i){var a=Object.create((n&&n.prototype instanceof d?n:d).prototype);return l(a,"_invoke",function(e,n,r){var i=1;return function(a,o){if(3===i)throw Error("Generator is already running");if(4===i){if("throw"===a)throw o;return{value:t,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var u=b(s,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===i)throw i=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=3;var l=h(e,n,r);if("normal"===l.type){if(i=r.done?4:2,l.arg===f)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=4,r.method="throw",r.arg=l.arg)}}}(e,r,new w(i||[])),!0),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=c;var f={};function d(){}function v(){}function p(){}var m={};l(m,o,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(N([])));g&&g!==r&&i.call(g,o)&&(m=g);var k=p.prototype=d.prototype=Object.create(m);function E(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,n){function r(a,o,s,u){var l=h(t[a],t,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==e(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):n.resolve(f).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(l.arg)}var a;l(this,"_invoke",(function(t,e){function i(){return new n((function(n,i){r(t,e,n,i)}))}return a=a?a.then(i,i):i()}),!0)}function b(e,n){var r=n.method,i=e.i[r];if(i===t)return n.delegate=null,"throw"===r&&e.i.return&&(n.method="return",n.arg=t,b(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var a=h(i,e.i,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,f;var o=a.arg;return o?o.done?(n[e.r]=o.value,n.next=e.n,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function T(t){this.tryEntries.push(t)}function M(e){var n=e[4]||{};n.type="normal",n.arg=t,e[4]=n}function w(t){this.tryEntries=[[-1]],t.forEach(T,this),this.reset(!0)}function N(n){if(null!=n){var r=n[o];if(r)return r.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var a=-1,s=function e(){for(;++a<n.length;)if(i.call(n,a))return e.value=n[a],e.done=!1,e;return e.value=t,e.done=!0,e};return s.next=s}}throw new TypeError(e(n)+" is not iterable")}return v.prototype=p,l(k,"constructor",p),l(p,"constructor",v),v.displayName=l(p,u,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},n.awrap=function(t){return{__await:t}},E(x.prototype),l(x.prototype,s,(function(){return this})),n.AsyncIterator=x,n.async=function(t,e,r,i,a){void 0===a&&(a=Promise);var o=new x(c(t,e,r,i),a);return n.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},E(k),l(k,u,"Generator"),l(k,o,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function t(){for(;n.length;)if((r=n.pop())in e)return t.value=r,t.done=!1,t;return t.done=!0,t}},n.values=N,w.prototype={constructor:w,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(M),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t){o.type="throw",o.arg=e,n.next=t}for(var i=n.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a[4],s=this.prev,u=a[1],l=a[2];if(-1===a[0])return r("end"),!1;if(!u&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&s>=a[0]){if(u>s)return this.method="next",this.arg=t,r(u),!0;if(l>s)return r(l),!1}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&this.prev>=r[0]&&r[2]>this.prev){var i=r;break}}i&&("break"===t||"continue"===t)&&e>=i[0]&&i[2]>=e&&(i=null);var a=i?i[4]:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i[2],f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[2]===t)return this.complete(n[4],n[3]),M(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]===t){var r=n[4];if("throw"===r.type){var i=r.arg;M(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={i:N(e),r:n,n:r},"next"===this.method&&(this.arg=t),f}},n}function Ze(t,e,n,r,i,a,o){try{var s=t[a](o),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Ke(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var a=t.apply(e,n);function o(t){Ze(a,r,i,o,s,"next",t)}function s(t){Ze(a,r,i,o,s,"throw",t)}o(void 0)}))}}function Qe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=c(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return t.length>r?{done:!1,value:t[r++]}:{done:!0}},e:function(t){throw t},f:i}}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 a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function $e(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnProperty