@antv/g6
Version:
A Graph Visualization Framework in JavaScript
9 lines • 1.12 MB
JavaScript
!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).G6={})}(this,function(t){"use strict";var e="undefined"!=typeof document?document.currentScript:null;function n(t){return n="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},n(t)}function r(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e);if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function i(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,r(i.key),i)}}function u(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t,e){if(t){if("string"==typeof t)return c(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)?c(t,e):void 0}}function d(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||h(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 p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(p=function(){return!!t})()}function g(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)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 v(t,e,n){return e=f(e),g(t,p()?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 b(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,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){u=!0,i=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(t,e)||h(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 x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function E(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function w(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})}),n}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 o(t,e,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||t,a),l=n?n+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],s]:t._events[l].push(s):(t._events[l]=s,t._eventsCount++),t}function a(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=n?n+t:t,r=this._events[e];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i<o;i++)a[i]=r[i].fn;return a},s.prototype.listenerCount=function(t){var e=n?n+t:t,r=this._events[e];return r?r.fn?1:r.length:0},s.prototype.emit=function(t,e,r,i,o,a){var s=n?n+t:t;if(!this._events[s])return!1;var l,u,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,o),!0;case 6:return c.fn.call(c.context,e,r,i,o,a),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),h){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,r);break;case 4:c[u].fn.call(c[u].context,e,r,i);break;default:if(!l)for(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(t,e,n){return o(this,t,e,n,!1)},s.prototype.once=function(t,e,n){return o(this,t,e,n,!0)},s.prototype.removeListener=function(t,e,r,i){var o=n?n+t:t;if(!this._events[o])return this;if(!e)return a(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||i&&!s.once||r&&s.context!==r||a(this,o);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==e||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[o]=1===u.length?u[0]:u:a(this,o)}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=n?n+t:t,this._events[e]&&a(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 M=E(k.exports),S=1e-6,N="undefined"!=typeof Float32Array?Float32Array:Array;function O(){var t=new N(9);return N!=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 T(){var t=new N(16);return N!=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 A(t){var e=new N(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 C(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,o,a,s,l,u,c,h,d,f,p,g){var v=new N(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=o,v[6]=a,v[7]=s,v[8]=l,v[9]=u,v[10]=c,v[11]=h,v[12]=d,v[13]=f,v[14]=p,v[15]=g,v}function R(t,e,n,r,i,o,a,s,l,u,c,h,d,f,p,g,v){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=l,t[8]=u,t[9]=c,t[10]=h,t[11]=d,t[12]=f,t[13]=p,t[14]=g,t[15]=v,t}function D(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 L(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],a=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]=o,t[11]=e[14],t[12]=i,t[13]=a,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 _(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=n*s-r*a,b=n*l-i*a,x=n*u-o*a,E=r*l-i*s,w=r*u-o*s,k=i*u-o*l,M=c*g-h*p,S=c*v-d*p,N=c*m-f*p,O=h*v-d*g,T=h*m-f*g,A=d*m-f*v,C=y*A-b*T+x*O+E*N-w*S+k*M;return C?(C=1/C,t[0]=(s*A-l*T+u*O)*C,t[1]=(i*T-r*A-o*O)*C,t[2]=(g*k-v*w+m*E)*C,t[3]=(d*w-h*k-f*E)*C,t[4]=(l*N-a*A-u*S)*C,t[5]=(n*A-i*N+o*S)*C,t[6]=(v*x-p*k-m*b)*C,t[7]=(c*k-d*x+f*b)*C,t[8]=(a*T-s*N+u*M)*C,t[9]=(r*N-n*T-o*M)*C,t[10]=(p*w-g*x+m*y)*C,t[11]=(h*x-c*w-f*y)*C,t[12]=(s*S-a*O-l*M)*C,t[13]=(n*O-r*S+i*M)*C,t[14]=(g*b-p*E-v*y)*C,t[15]=(c*E-h*b+d*y)*C,t):null}function I(t){var e=t[0],n=t[1],r=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*a-n*o)*(h*v-d*g)-(e*s-r*o)*(c*v-d*p)+(e*l-i*o)*(c*g-h*p)+(n*s-r*a)*(u*v-d*f)-(n*l-i*a)*(u*g-h*f)+(r*l-i*s)*(u*p-c*f)}function j(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],g=e[12],v=e[13],m=e[14],y=e[15],b=n[0],x=n[1],E=n[2],w=n[3];return t[0]=b*r+x*s+E*h+w*g,t[1]=b*i+x*l+E*d+w*v,t[2]=b*o+x*u+E*f+w*m,t[3]=b*a+x*c+E*p+w*y,b=n[4],x=n[5],E=n[6],w=n[7],t[4]=b*r+x*s+E*h+w*g,t[5]=b*i+x*l+E*d+w*v,t[6]=b*o+x*u+E*f+w*m,t[7]=b*a+x*c+E*p+w*y,b=n[8],x=n[9],E=n[10],w=n[11],t[8]=b*r+x*s+E*h+w*g,t[9]=b*i+x*l+E*d+w*v,t[10]=b*o+x*u+E*f+w*m,t[11]=b*a+x*c+E*p+w*y,b=n[12],x=n[13],E=n[14],w=n[15],t[12]=b*r+x*s+E*h+w*g,t[13]=b*i+x*l+E*d+w*v,t[14]=b*o+x*u+E*f+w*m,t[15]=b*a+x*c+E*p+w*y,t}function B(t,e,n){var r,i,o,a,s,l,u,c,h,d,f,p,g=n[0],v=n[1],m=n[2];return e===t?(t[12]=e[0]*g+e[4]*v+e[8]*m+e[12],t[13]=e[1]*g+e[5]*v+e[9]*m+e[13],t[14]=e[2]*g+e[6]*v+e[10]*m+e[14],t[15]=e[3]*g+e[7]*v+e[11]*m+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=e[8],d=e[9],f=e[10],p=e[11],t[0]=r,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]=r*g+s*v+h*m+e[12],t[13]=i*g+l*v+d*m+e[13],t[14]=o*g+u*v+f*m+e[14],t[15]=a*g+c*v+p*m+e[15]),t}function F(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function z(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+c*r,t[6]=s*i+h*r,t[7]=l*i+d*r,t[8]=u*i-o*r,t[9]=c*i-a*r,t[10]=h*i-s*r,t[11]=d*i-l*r,t}function G(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[8],c=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-u*r,t[1]=a*i-c*r,t[2]=s*i-h*r,t[3]=l*i-d*r,t[8]=o*r+u*i,t[9]=a*r+c*i,t[10]=s*r+h*i,t[11]=l*r+d*i,t}function V(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 W(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 H(t,e,n){var r,i,o,a=n[0],s=n[1],l=n[2],u=Math.hypot(a,s,l);return u<S?null:(a*=u=1/u,s*=u,l*=u,r=Math.sin(e),o=1-(i=Math.cos(e)),t[0]=a*a*o+i,t[1]=s*a*o+l*r,t[2]=l*a*o-s*r,t[3]=0,t[4]=a*s*o-l*r,t[5]=s*s*o+i,t[6]=l*s*o+a*r,t[7]=0,t[8]=a*l*o+s*r,t[9]=s*l*o-a*r,t[10]=l*l*o+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function U(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 $(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 q(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=r+r,l=i+i,u=o+o,c=r*s,h=r*l,d=r*u,f=i*l,p=i*u,g=o*u,v=a*s,m=a*l,y=a*u;return t[0]=1-(f+g),t[1]=h+y,t[2]=d-m,t[3]=0,t[4]=h-y,t[5]=1-(c+g),t[6]=p+v,t[7]=0,t[8]=d+m,t[9]=p-v,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function X(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function K(t,e){var n=e[0],r=e[1],i=e[2],o=e[4],a=e[5],s=e[6],l=e[8],u=e[9],c=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(o,a,s),t[2]=Math.hypot(l,u,c),t}function Z(t,e){var n=new N(3);K(n,e);var r=1/n[0],i=1/n[1],o=1/n[2],a=e[0]*r,s=e[1]*i,l=e[2]*o,u=e[4]*r,c=e[5]*i,h=e[6]*o,d=e[8]*r,f=e[9]*i,p=e[10]*o,g=a+c+p,v=0;return g>0?(v=2*Math.sqrt(g+1),t[3]=.25*v,t[0]=(h-f)/v,t[1]=(d-l)/v,t[2]=(s-u)/v):a>c&&a>p?(v=2*Math.sqrt(1+a-c-p),t[3]=(h-f)/v,t[0]=.25*v,t[1]=(s+u)/v,t[2]=(d+l)/v):c>p?(v=2*Math.sqrt(1+c-a-p),t[3]=(d-l)/v,t[0]=(s+u)/v,t[1]=.25*v,t[2]=(h+f)/v):(v=2*Math.sqrt(1+p-a-c),t[3]=(s-u)/v,t[0]=(d+l)/v,t[1]=(h+f)/v,t[2]=.25*v),t}function Q(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],l=e[3],u=o+o,c=a+a,h=s+s,d=o*u,f=o*c,p=o*h,g=a*c,v=a*h,m=s*h,y=l*u,b=l*c,x=l*h,E=r[0],w=r[1],k=r[2],M=i[0],S=i[1],N=i[2],O=(1-(g+m))*E,T=(f+x)*E,A=(p-b)*E,C=(f-x)*w,P=(1-(d+m))*w,R=(v+y)*w,D=(p+b)*k,L=(v-y)*k,_=(1-(d+g))*k;return t[0]=O,t[1]=T,t[2]=A,t[3]=0,t[4]=C,t[5]=P,t[6]=R,t[7]=0,t[8]=D,t[9]=L,t[10]=_,t[11]=0,t[12]=n[0]+M-(O*M+C*S+D*N),t[13]=n[1]+S-(T*M+P*S+L*N),t[14]=n[2]+N-(A*M+R*S+_*N),t[15]=1,t}function J(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,h=r*s,d=i*a,f=i*s,p=i*l,g=o*a,v=o*s,m=o*l;return t[0]=1-h-p,t[1]=c+m,t[2]=d-v,t[3]=0,t[4]=c-m,t[5]=1-u-p,t[6]=f+g,t[7]=0,t[8]=d+v,t[9]=f-g,t[10]=1-u-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function tt(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var et=tt;function nt(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(a+o)*u,t[15]=1,t}var rt=nt;function it(t,e,n,r,i,o,a){var s=1/(e-n),l=1/(r-i),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=u,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=o*u,t[15]=1,t}function ot(t,e,n,r){var i,o,a,s,l,u,c,h,d,f,p=e[0],g=e[1],v=e[2],m=r[0],y=r[1],b=r[2],x=n[0],E=n[1],w=n[2];return Math.abs(p-x)<S&&Math.abs(g-E)<S&&Math.abs(v-w)<S?D(t):(c=p-x,h=g-E,d=v-w,i=y*(d*=f=1/Math.hypot(c,h,d))-b*(h*=f),o=b*(c*=f)-m*d,a=m*h-y*c,(f=Math.hypot(i,o,a))?(i*=f=1/f,o*=f,a*=f):(i=0,o=0,a=0),s=h*a-d*o,l=d*i-c*a,u=c*o-h*i,(f=Math.hypot(s,l,u))?(s*=f=1/f,l*=f,u*=f):(s=0,l=0,u=0),t[0]=i,t[1]=s,t[2]=c,t[3]=0,t[4]=o,t[5]=l,t[6]=h,t[7]=0,t[8]=a,t[9]=u,t[10]=d,t[11]=0,t[12]=-(i*p+o*g+a*v),t[13]=-(s*p+l*g+u*v),t[14]=-(c*p+h*g+d*v),t[15]=1,t)}function at(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function st(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]}var lt=j,ut=at,ct=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],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],d=e[10],f=e[11],p=e[12],g=e[13],v=e[14],m=e[15];return t[0]=s*(d*m-f*v)-h*(l*m-u*v)+g*(l*f-u*d),t[1]=-(r*(d*m-f*v)-h*(i*m-o*v)+g*(i*f-o*d)),t[2]=r*(l*m-u*v)-s*(i*m-o*v)+g*(i*u-o*l),t[3]=-(r*(l*f-u*d)-s*(i*f-o*d)+h*(i*u-o*l)),t[4]=-(a*(d*m-f*v)-c*(l*m-u*v)+p*(l*f-u*d)),t[5]=n*(d*m-f*v)-c*(i*m-o*v)+p*(i*f-o*d),t[6]=-(n*(l*m-u*v)-a*(i*m-o*v)+p*(i*u-o*l)),t[7]=n*(l*f-u*d)-a*(i*f-o*d)+c*(i*u-o*l),t[8]=a*(h*m-f*g)-c*(s*m-u*g)+p*(s*f-u*h),t[9]=-(n*(h*m-f*g)-c*(r*m-o*g)+p*(r*f-o*h)),t[10]=n*(s*m-u*g)-a*(r*m-o*g)+p*(r*u-o*s),t[11]=-(n*(s*f-u*h)-a*(r*f-o*h)+c*(r*u-o*s)),t[12]=-(a*(h*v-d*g)-c*(s*v-l*g)+p*(s*d-l*h)),t[13]=n*(h*v-d*g)-c*(r*v-i*g)+p*(r*d-i*h),t[14]=-(n*(s*v-l*g)-a*(r*v-i*g)+p*(r*l-i*s)),t[15]=n*(s*d-l*h)-a*(r*d-i*h)+c*(r*l-i*s),t},clone:A,copy:C,create:T,determinant:I,equals:function(t,e){var n=t[0],r=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],m=t[15],y=e[0],b=e[1],x=e[2],E=e[3],w=e[4],k=e[5],M=e[6],N=e[7],O=e[8],T=e[9],A=e[10],C=e[11],P=e[12],R=e[13],D=e[14],L=e[15];return Math.abs(n-y)<=S*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-b)<=S*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=S*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-E)<=S*Math.max(1,Math.abs(o),Math.abs(E))&&Math.abs(a-w)<=S*Math.max(1,Math.abs(a),Math.abs(w))&&Math.abs(s-k)<=S*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=S*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(u-N)<=S*Math.max(1,Math.abs(u),Math.abs(N))&&Math.abs(c-O)<=S*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(h-T)<=S*Math.max(1,Math.abs(h),Math.abs(T))&&Math.abs(d-A)<=S*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(f-C)<=S*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(p-P)<=S*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(g-R)<=S*Math.max(1,Math.abs(g),Math.abs(R))&&Math.abs(v-D)<=S*Math.max(1,Math.abs(v),Math.abs(D))&&Math.abs(m-L)<=S*Math.max(1,Math.abs(m),Math.abs(L))},exactEquals:st,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:J,fromQuat2:function(t,e){var n=new N(3),r=-e[0],i=-e[1],o=-e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],h=r*r+i*i+o*o+a*a;return h>0?(n[0]=2*(s*a+c*r+l*o-u*i)/h,n[1]=2*(l*a+c*i+u*r-s*o)/h,n[2]=2*(u*a+c*o+s*i-l*r)/h):(n[0]=2*(s*a+c*r+l*o-u*i),n[1]=2*(l*a+c*i+u*r-s*o),n[2]=2*(u*a+c*o+s*i-l*r)),q(t,e,n),t},fromRotation:H,fromRotationTranslation:q,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[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,m=s*l,y=s*u,b=s*c,x=r[0],E=r[1],w=r[2];return t[0]=(1-(p+v))*x,t[1]=(d+b)*x,t[2]=(f-y)*x,t[3]=0,t[4]=(d-b)*E,t[5]=(1-(h+v))*E,t[6]=(g+m)*E,t[7]=0,t[8]=(f+y)*w,t[9]=(g-m)*w,t[10]=(1-(h+p))*w,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Q,fromScaling:W,fromTranslation:V,fromValues:P,fromXRotation:U,fromYRotation:$,fromZRotation:Y,frustum:function(t,e,n,r,i,o,a){var s=1/(n-e),l=1/(i-r),u=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(a+o)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*u,t[15]=0,t},getRotation:Z,getScaling:K,getTranslation:X,identity:D,invert:_,lookAt:ot,mul:lt,multiply:j,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:rt,orthoNO:nt,orthoZO:it,perspective:et,perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(i+o);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(a-s)*l*.5,t[9]=(i-o)*u*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},perspectiveNO:tt,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},rotate:function(t,e,n,r){var i,o,a,s,l,u,c,h,d,f,p,g,v,m,y,b,x,E,w,k,M,N,O,T,A=r[0],C=r[1],P=r[2],R=Math.hypot(A,C,P);return R<S?null:(A*=R=1/R,C*=R,P*=R,i=Math.sin(n),a=1-(o=Math.cos(n)),s=e[0],l=e[1],u=e[2],c=e[3],h=e[4],d=e[5],f=e[6],p=e[7],g=e[8],v=e[9],m=e[10],y=e[11],b=A*A*a+o,x=C*A*a+P*i,E=P*A*a-C*i,w=A*C*a-P*i,k=C*C*a+o,M=P*C*a+A*i,N=A*P*a+C*i,O=C*P*a-A*i,T=P*P*a+o,t[0]=s*b+h*x+g*E,t[1]=l*b+d*x+v*E,t[2]=u*b+f*x+m*E,t[3]=c*b+p*x+y*E,t[4]=s*w+h*k+g*M,t[5]=l*w+d*k+v*M,t[6]=u*w+f*k+m*M,t[7]=c*w+p*k+y*M,t[8]=s*N+h*O+g*T,t[9]=l*N+d*O+v*T,t[10]=u*N+f*O+m*T,t[11]=c*N+p*O+y*T,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:z,rotateY:G,rotateZ:function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+c*r,t[2]=s*i+h*r,t[3]=l*i+d*r,t[4]=u*i-o*r,t[5]=c*i-a*r,t[6]=h*i-s*r,t[7]=d*i-l*r,t},scale:F,set:R,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:ut,subtract:at,targetTo:function(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=r[0],l=r[1],u=r[2],c=i-n[0],h=o-n[1],d=a-n[2],f=c*c+h*h+d*d;f>0&&(c*=f=1/Math.sqrt(f),h*=f,d*=f);var p=l*d-u*h,g=u*c-s*d,v=s*h-l*c;return(f=p*p+g*g+v*v)>0&&(p*=f=1/Math.sqrt(f),g*=f,v*=f),t[0]=p,t[1]=g,t[2]=v,t[3]=0,t[4]=h*v-d*g,t[5]=d*p-c*v,t[6]=c*g-h*p,t[7]=0,t[8]=c,t[9]=h,t[10]=d,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t},translate:B,transpose:L});function ht(){var t=new N(3);return N!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function dt(t){var e=new N(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function ft(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function pt(t,e,n){var r=new N(3);return r[0]=t,r[1]=e,r[2]=n,r}function gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function vt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function mt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function yt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function bt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function xt(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function Et(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function wt(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],l=n[2];return t[0]=i*l-o*s,t[1]=o*a-r*l,t[2]=r*s-i*a,t}function kt(t,e,n,r){var i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function Mt(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function St(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=S*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=S*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=S*Math.max(1,Math.abs(i),Math.abs(s))}var Nt=yt,Ot=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)},Tt=ft;function At(){var t=new N(4);return N!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function Ct(t,e,n,r){var i=new N(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function Pt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Rt(){var t=new N(4);return N!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Dt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Lt(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],l=n[1],u=n[2],c=n[3];return t[0]=r*c+a*s+i*u-o*l,t[1]=i*c+a*l+o*s-r*u,t[2]=o*c+a*u+r*l-i*s,t[3]=a*c-r*s-i*l-o*u,t}function _t(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t}function It(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),l=Math.cos(n),u=Math.sin(r),c=Math.cos(r);return t[0]=o*l*c-a*s*u,t[1]=a*s*c+o*l*u,t[2]=a*l*u-o*s*c,t[3]=a*l*c+o*s*u,t}ht(),function(){var t=At()}();var jt=Ct,Bt=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Ft=function(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t},zt=Lt,Gt=function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t};function Vt(){var t=new N(2);return N!=Float32Array&&(t[0]=0,t[1]=0),t}ht(),pt(1,0,0),pt(0,1,0),Rt(),Rt(),O(),function(){var t=Vt()}();var Wt=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Ht=function(t,e){return void 0===e&&(e=[]),function(t,e){if(!Wt(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n}(t,function(t){return!function(t,e){return!!Wt(t)&&t.indexOf(e)>-1}(e,t)})};function Ut(t){return"function"==typeof t}function $t(t){return null==t}function Yt(t){return Array.isArray(t)}var qt=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};function Xt(t,e){if(t)if(Yt(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(qt(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Kt=function(t){return"object"==typeof t&&null!==t},Zt={}.toString,Qt=function(t,e){return Zt.call(t)==="[object "+e+"]"},Jt=function(t){if(!Kt(t)||!Qt(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function te(t){if(!Array.isArray(t))return-1/0;var e=t.length;if(!e)return-1/0;for(var n=t[0],r=1;r<e;r++)n=Math.max(n,t[r]);return n}var ee=function(t){if(Yt(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])};function ne(t){return"string"==typeof t}var re=Object.prototype.hasOwnProperty;function ie(t,e){if(!e||!Yt(t))return{};for(var n,r={},i=Ut(e)?e:function(t){return t[e]},o=0;o<t.length;o++){var a=t[o];n=i(a),re.call(r,n)?r[n].push(a):r[n]=[a]}return r}var oe=function(t,e,n){return t<e?e:t>n?n:t};function ae(t){return"number"==typeof t}function se(t,e,n){return void 0===n&&(n=1e-5),t===e||Math.abs(t-e)<n}var le=function(t,e){if(Yt(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var o=t[i],a=Ut(e)?e(o):o[e];a>r&&(n=o,r=a)}return n}},ue=function(t,e){if(Yt(t)){for(var n,r=1/0,i=0;i<t.length;i++){var o=t[i],a=Ut(e)?e(o):o[e];a<r&&(n=o,r=a)}return n}},ce=function(t,e){return(t%e+e)%e},he=function(t){return $t(t)?"":t.toString()};var de=function(t){var e=he(t);return e.charAt(0).toUpperCase()+e.substring(1)},fe={}.toString,pe=function(t){return Qt(t,"Boolean")};var ge=Object.prototype,ve=function(t){return void 0===t},me=function(t){if("object"!=typeof t||null===t)return t;var e;if(Yt(t)){e=[];for(var n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=me(t[n]):e[n]=t[n]}else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=me(t[i]):e[i]=t[i];return e};function ye(t,e,n){var r;return function(){var n=this,i=arguments;clearTimeout(r),r=setTimeout(function(){r=null,t.apply(n,i)},e)}}var be=new Map;function xe(t,e,n){void 0===n&&(n=128);return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=e?e.apply(this,r):r[0];be.has(t)||be.set(t,function(t){var e,n,r,i=t||1;function o(t,o){++e>i&&(r=n,a(1),++e),n[t]=o}function a(t){e=0,n=Object.create(null),t||(r=Object.create(null))}return a(),{clear:a,has:function(t){return void 0!==n[t]||void 0!==r[t]},get:function(t){var e=n[t];return void 0!==e?e:void 0!==(e=r[t])?(o(t,e),e):void 0},set:function(t,e){void 0!==n[t]?n[t]=e:o(t,e)}}}(n));var a=be.get(t);if(a.has(o))return a.get(o);var s=t.apply(this,r);return a.set(o,s),s}}function Ee(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}function we(t,e,n,r){for(var i in n=n||0,r=r||5,e)if(Ee(e,i)){var o=e[i];null!==o&&Jt(o)?(Jt(t[i])||(t[i]={}),n<r?we(t[i],o,n+1,r):t[i]=e[i]):Yt(o)?(t[i]=[],t[i]=t[i].concat(o)):void 0!==o&&(t[i]=o)}}var ke=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)we(t,e[r]);return t},Me=Object.prototype.hasOwnProperty;function Se(t){if($t(t))return!0;if(Wt(t))return!t.length;var e=function(t){return fe.call(t).replace(/^\[object /,"").replace(/]$/,"")}(t);if("Map"===e||"Set"===e)return!t.size;if(function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ge)}(t))return!Object.keys(t).length;for(var n in t)if(Me.call(t,n))return!1;return!0}var Ne=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(ne(t)||ne(e))return!1;if(Wt(t)||Wt(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Ne(t[r],e[r]));r++);return n}if(Kt(t)||Kt(e)){var i=Object.keys(t),o=Object.keys(e);if(i.length!==o.length)return!1;for(n=!0,r=0;r<i.length&&(n=Ne(t[i[r]],e[i[r]]));r++);return n}return!1},Oe=function(t,e,n){for(var r=0,i=ne(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},Te=function(t,e,n){var r=t,i=ne(e)?e.split("."):e;return i.forEach(function(t,e){e<i.length-1?(qt(r[t])||(r[t]=ae(i[e+1])?[]:{}),r=r[t]):r[t]=n}),t},Ae=Object.prototype.hasOwnProperty,Ce=function(t,e){if(null===t||!Jt(t))return{};var n={};return Xt(e,function(e){Ae.call(t,e)&&(n[e]=t[e])}),n},Pe=function(t,e){return function(t,e,n){if(!Yt(t)&&!Jt(t))return t;var r=n;return Xt(t,function(t,n){r=e(r,t,n)}),r}(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})},Re=function(t,e,n){var r,i,o,a,s=0;n||(n={});var l=function(){s=!1===n.leading?0:Date.now(),r=null,a=t.apply(i,o),r||(i=o=null)},u=function(){var u=Date.now();s||!1!==n.leading||(s=u);var c=e-(u-s);return i=this,o=arguments,c<=0||c>e?(r&&(clearTimeout(r),r=null),s=u,a=t.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,c)),a};return u.cancel=function(){clearTimeout(r),s=0,r=i=o=null},u},De={},Le=function(){},_e=function(t){return t},Ie=function(t,e){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ie(t,e)};function je(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ie(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Be=function(){return Be=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},Be.apply(this,arguments)};function Fe(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function ze(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{l(r.next(t))}catch(t){o(t)}}function s(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((r=r.apply(t,e||[])).next())})}function Ge(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ve(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function We(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function He(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}"function"==typeof SuppressedError&&SuppressedError;var Ue={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function $e(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 Ye={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function qe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return Ye[e]===t.length-1&&"achlmqstvz".includes(e)})}function Xe(t){return qe(t)&&t.every(function(t){var e=t[0];return e===e.toUpperCase()})}function Ke(t){return Xe(t)&&t.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}function Ze(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Ye[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,Ye[n]))),Ye[n]););}function Qe(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 Je(t){return t>=48&&t<=57||43===t||45===t||46===t}function tn(t){return t>=48&&t<=57}function en(t){var e,n=t.max,r=t.pathValue,i=t.index,o=i,a=!1,s=!1,l=!1,u=!1;if(o>=n)t.err="[path-util]: Invalid path value at index ".concat(o,', "pathValue" is missing param');else if(43!==(e=r.charCodeAt(o))&&45!==e||(o+=1,e=r.charCodeAt(o)),tn(e)||46===e){if(46!==e){if(a=48===e,o+=1,e=r.charCodeAt(o),a&&o<n&&e&&tn(e))return void(t.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(r[i],'" illegal number'));for(;o<n&&tn(r.charCodeAt(o));)o+=1,s=!0;e=r.charCodeAt(o)}if(46===e){for(u=!0,o+=1;tn(r.charCodeAt(o));)o+=1,l=!0;e=r.charCodeAt(o)}if(101===e||69===e){if(u&&!s&&!l)return void(t.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(r[o],'" invalid float exponent'));if(o+=1,43!==(e=r.charCodeAt(o))&&45!==e||(o+=1),!(o<n&&tn(r.charCodeAt(o))))return void(t.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(r[o],'" invalid integer exponent'));for(;o<n&&tn(r.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(i,o)}else t.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(r[o],'" is not a number')}function nn(t){return 10===t||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)}function rn(t){for(var e=t.pathValue,n=t.max;t.index<n&&nn(e.charCodeAt(t.index));)t.index+=1}function on(t){return 97==(32|t)}function an(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),o=Ye[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,rn(t),t.data=[],o){for(;;){for(var a=o;a>0;a-=1){if(!on(i)||3!==a&&4!==a?en(t):Qe(t),t.err.length)return;t.data.push(t.param),rn(t),t.index<e&&44===n.charCodeAt(t.index)&&(t.index+=1,rn(t))}if(t.index>=t.max)break;if(!Je(n.charCodeAt(t.index)))break}Ze(t)}else Ze(t);else t.err='[path-util]: Invalid path value "'.concat(n[r],'" is not a path command')}var sn=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 ln(t){if(Xe(t))return[].concat(t);var e=function(t){if(qe(t))return[].concat(t);var e=new sn(t);for(rn(e);e.index<e.max&&!e.err.length;)an(e);return e.err?e.err:e.segments}(t),n=0,r=0,i=0,o=0;return e.map(function(t){var e,a=t.slice(1).map(Number),s=t[0],l=s.toUpperCase();if("M"===s)return n=a[0],r=a[1],i=n,o=r,["M",n,r];if(s!==l)switch(l){case"A":e=[l,a[0],a[1],a[2],a[3],a[4],a[5]+n,a[6]+r];break;case"V":e=[l,a[0]+r];break;case"H":e=[l,a[0]+n];break;default:var u=a.map(function(t,e){return t+(e%2?r:n)});e=[l].concat(u)}else e=[l].concat(a);var c=e.length;switch(l){case"Z":n=i,r=o;break;case"H":n=e[1];break;case"V":r=e[1];break;default:n=e[c-2],r=e[c-1],"M"===l&&(i=n,o=r)}return e})}function un(t,e){var n=t[0],r=e.x1,i=e.y1,o=e.x2,a=e.y2,s=t.slice(1).map(Number),l=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),"H"===n)l=["L",t[1],i];else if("V"===n)l=["L",r,t[1]];else if("S"===n){var u=2*r-o,c=2*i-a;e.x1=u,e.y1=c,l=["C",u,c].concat(s)}else if("T"===n){var h=2*r-e.qx,d=2*i-e.qy;e.qx=h,e.qy=d,l=["Q",h,d].concat(s)}else if("Q"===n){var f=s[0],p=s[1];e.qx=f,e.qy=p}return l}function cn(t){if(Ke(t))return[].concat(t);for(var e=ln(t),n=Be({},Ue),r=0;r<e.length;r+=1){e[r]=un(e[r],n);var i=e[r],o=i.length;n.x1=+i[o-2],n.y1=+i[o-1],n.x2=+i[o-4]||n.x1,n.y2=+i[o-3]||n.y1}return e}function hn(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function dn(t,e,n,r,i,o,a,s,l,u){var c,h,d,f,p,g=t,v=e,m=n,y=r,b=s,x=l,E=120*Math.PI/180,w=Math.PI/180*(+i||0),k=[];if(u)h=u[0],d=u[1],f=u[2],p=u[3];else{g=(c=hn(g,v,-w)).x,v=c.y;var M=(g-(b=(c=hn(b,x,-w)).x))/2,S=(v-(x=c.y))/2,N=M*M/(m*m)+S*S/(y*y);N>1&&(m*=N=Math.sqrt(N),y*=N);var O=m*m,T=y*y,A=(o===a?-1:1)*Math.sqrt(Math.abs((O*T-O*S*S-T*M*M)/(O*S*S+T*M*M)));f=A*m*S/y+(g+b)/2,p=A*-y*M/m+(v+x)/2,h=Math.asin(((v-p)/y*Math.pow(10,9)|0)/Math.pow(10,9)),d=Math.asin(((x-p)/y*Math.pow(10,9)|0)/Math.pow(10,9)),h=g<f?Math.PI-h:h,d=b<f?Math.PI-d:d,h<0&&(h=2*Math.PI+h),d<0&&(d=2*Math.PI+d),a&&h>d&&(h-=2*Math.PI),!a&&d>h&&(d-=2*Math.PI)}var C=d-h;if(Math.abs(C)>E){var P=d,R=b,D=x;d=h+E*(a&&d>h?1:-1),k=dn(b=f+m*Math.cos(d),x=p+y*Math.sin(d),m,y,i,0,a,R,D,[d,P,f,p])}C=d-h;var L=Math.cos(h),_=Math.sin(h),I=Math.cos(d),j=Math.sin(d),B=Math.tan(C/4),F=4/3*m*B,z=4/3*y*B,G=[g,v],V=[g+F*_,v-z*L],W=[b+F*j,x-z*I],H=[b,x];if(V[0]=2*G[0]-V[0],V[1]=2*G[1]-V[1],u)return V.concat(W,H,k);for(var U=[],$=0,Y=(k=V.concat(W,H,k)).length;$<Y;$+=1)U[$]=$%2?hn(k[$-1],k[$],w).y:hn(k[$],k[$+1],w).x;return U}function fn(t,e,n){var r=t[0],i=t[1];return[r+(e[0]-r)*n,i+(e[1]-i)*n]}var pn=function(t,e,n,r){return We(We([],fn([t,e],[n,r],.5),!0),[n,r,n,r],!1)};function gn(t,e){var n,r,i,o,a,s,l,u,c,h=t[0],d=t.slice(1).map(Number),f=d[0],p=d[1],g=e.x1,v=e.y1,m=e.x,y=e.y;switch("TQ".includes(h)||(e.qx=null,e.qy=null),h){case"M":return e.x=f,e.y=p,t;case"A":return n=[g,v].concat(d),["C"].concat(dn(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=f,e.qy=p,n=[g,v].concat(d),["C"].concat((r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],[(u=1/3)*r+(c=2/3)*o,u*i+c*a,u*s+c*o,u*l+c*a,s,l]));case"L":return["C"].concat(pn(g,v,f,p));case"Z":return g===m&&v===y?["C",g,v,m,y,m,y]:["C"].concat(pn(g,v,m,y))}return t}function vn(t,e){if(void 0===e&&(e=!1),function(t){return Ke(t)&&t.every(function(t){var e=t[0];return"MC".includes(e)})}(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r,i,o=cn(t),a=Be({},Ue),s=[],l="",u=o.length,c=[],h=0;h<u;h+=1){o[h]&&(l=o[h][0]),s[h]=l;var d=gn(o[h],a);o[h]=d,$e(o,s,h),u=o.length,"Z"===l&&c.push(h),i=(r=o[h]).length,a.x1=+r[i-2],a.y1=+r[i-1],a.x2=+r[i-4]||a.x1,a.y2=+r[i-3]||a.y1}return e?[o,c]:o}function mn(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function yn(t,e,n,r,i){var o=mn([t,e],[n,r]),a={x:0,y:0};if("number"==typeof i)if(i<=0)a={x:t,y:e};else if(i>=o)a={x:n,y:r};else{var s=fn([t,e],[n,r],i/o);a={x:s[0],y:s[1]}}return{length:o,point:a,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function bn(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a=n*i+r*o,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(o,2)));return(n*o-r*i<0?-1:1)*Math.acos(a/s)}function xn(t,e,n,r,i,o,a,s,l,u){var c=Math.abs,h=Math.sin,d=Math.cos,f=Math.sqrt,p=Math.PI,g=c(n),v=c(r),m=(i%360+360)%360*(p/180);if(t===s&&e===l)return{x:t,y:e};if(0===g||0===v)return yn(t,e,s,l,u).point;var y=(t-s)/2,b=(e-l)/2,x={x:d(m)*y+h(m)*b,y:-h(m)*y+d(m)*b},E=Math.pow(x.x,2)/Math.pow(g,2)+Math.pow(x.y,2)/Math.pow(v,2);E>1&&(g*=f(E),v*=f(E));var w=(Math.pow(g,2)*Math.pow(v,2)-Math.pow(g,2)*Math.pow(x.y,2)-Math.pow(v,2)*Math.pow(x.x,2))/(Math.pow(g,2)*Math.pow(x.y,2)+Math.pow(v,2)*Math.pow(x.x,2)),k=(o!==a?1:-1)*f(w=w<0?0:w),M=k*(g*x.y/v),S=k*(-v*x.x/g),N=d(m)*M-h(m)*S+(t+s)/2,O=h(m)*M+d(m)*S+(e+l)/2,T={x:(x.x-M)/g,y:(x.y-S)/v},A=bn({x:1,y:0},T),C=bn(T,{x:(-x.x-M)/g,y:(-x.y-S)/v});!a&&C>0?C-=2*p:a&&C<0&&(C+=2*p);var P=A+(C%=2*p)*u,R=g*d(P),D=v*h(P);return{x:d(m)*R-h(m)*D+N,y:h(m)*R+d(m)*D+O}}function En(t,e,n,r,i,o,a,s,l,u,c){var h,d=c.bbox,f=void 0===d||d,p=c.length,g=void 0===p||p,v=c.sampleSize,m=void 0===v?30:v,y="number"==typeof u,b=t,x=e,E=0,w=[b,x,E],k=[b,x],M={x:0,y:0},S=[{x:b,y:x}];y&&u<=0&&(M={x:b,y:x});for(var N=0;N<=m;N+=1){if(b=(h=xn(t,e,n,r,i,o,a,s,l,N/m)).x,x=h.y,f&&S.push({x:b,y:x}),g&&(E+=mn(k,[b,x])),k=[b,x],y&&E>=u&&u>w[2]){var O=(E-u)/(E-w[2]);M={x:k[0]*(1-O)+w[0]*O,y:k[1]*(1-O)+w[1]*O}}w=[b,x,E]}return y&&u>=E&&(M={x:s,y:l}),{length:E,point:M,min:{x:Math.min.apply(null,S.map(function(t){return t.x})),y:Math.min.apply(null,S.map(function(t){return t.y}))},max:{x:Math.max.apply(null,S.map(function(t){return t.x})),y:Math.max.apply(null,S.map(function(t){return t.y}))}}}function wn(t,e,n,r,i,o,a,s,l){var u=1-l;return{x:Math.pow(u,3)*t+3*Math.pow(u,2)*l*n+3*u*Math.pow(l,2)*i+Math.pow(l,3)*a,y:Math.pow(u,3)*e+3*Math.pow(u,2)*l*r+3*u*Math.pow(l,2)*o+Math.pow(l,3)*s}}function kn(t,e,n,r,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?10:g,m="number"==typeof l,y=t,b=e,x=0,E=[y,b,x],w=[y,b],k={x:0,y:0},M=[{x:y,y:b}];m&&l<=0&&(k={x:y,y:b});for(var S=0;S<=v;S+=1){if(y=(c=wn(t,e,n,r,i,o,a,s,S/v)).x,b=c.y,d&&M.push({x:y,y:b}),p&&(x+=mn(w,[y,b])),w=[y,b],m&&x>=l&&l>E[2]){var N=(x-l)/(x-E[2]);k={x:w[0]*(1-N)+E[0]*N,y:w[1]*(1-N)+E[1]*N}}E=[y,b,x]}return m&&l>=x&&(k={x:a,y:s}),{length:x,point:k,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 Mn(t,e,n,r,i,o,a){var s=1-a;return{x:Math.pow(s,2)*t+2*s*a*n+Math.pow(a,2)*i,y:Math.pow(s,2)*e+2*s*a*r+Math.pow(a,2)*o}}function Sn(t,e,n,r,i,o,a,s){var l,u=s.bbox,c=void 0===u||u,h=s.length,d=void 0===h||h,f=s.sampleSize,p=void 0===f?10:f,g="number"==typeof a,v=t,m=e,y=0,b=[v,m,y],x=[v,m],E={x:0,y:0},w=[{x:v,y:m}];g&&a<=0&&(E={x:v,y:m});for(var k=0;k<=p;k+=1){if(v=(l=Mn(t,e,n,r,i,o,k/p)).x,m=l.y,c&&w.push({x:v,y:m}),d&&(y+=mn(x,[v,m])),x=[v,m],g&&y>=a&&a>b[2]){var M=(y-a)/(y-b[2]);E={x:x[0]*(1-M)+b[0]*M,y:x[1]*(1-M)+b[1]*M}}b=[v,m,y]}return g&&a>=y&&(E={x:i,y:o}),{length:y,point:E,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 Nn(t,e,n){for(var r,i,o,a,s,l,u,c,h,d=cn(t),f="number"==typeof e,p=[],g=0,v=0,m=0,y=0,b=[],x=[],E=0,w={x:0,y:0},k=w,M=w,S=w,N=0,O=0,T=d.length;O<T;O+=1)p=(u="M"===(c=(h=d[O])[0]))?p:[g,v].concat(h.slice(1)),u?(k=w={x:m=h[1],y:y=h[2]},E=0,f&&e<.001&&(S=w)):"L"===c?(E=(r=yn(p[0],p[1],p[2],p[3],(e||0)-N)).length,w=r.min,k=r.max,M=r.point):"A"===c?(E=(i=En(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],(e||0)-N,n||{})).length,w=i.min,k=i.max,M=i.point):"C"===c?(E=(o=kn(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],(e||0)-N,n||{})).length,w=o.min,k=o.max,M=o.point):"Q"===c?(E=(a=Sn(p[0],p[1],p[2],p[3],p[4],p[5],(e||0)-N,n||{})).length,w=a.min,k=a.max,M=a.point):"Z"===c&&(E=(s=yn((p=[g,v,m,y])[0],p[1],p[2],p[3],(e||0)-N)).length,w=s.min,k=s.max,M=s.point),f&&N<e&&N+E>=e&&(S=M),x.push(k),b.push(w),N+=E,g=(l="Z"!==c?h.slice(-2):[m,y])[0],v=l[1];return f&&e>=N&&(S={x:g,y:v}),{length:N,point:S,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,x.map(function(t){return t.x})),y:Math.max.apply(null,x.map(function(t){return t.y}))}}}function On(t,e){var n=t.length-1,r=[],i=0,o=function(t){var e=t.length,n=e-1;return t.map(function(r,i){return t.map(function(r,o){var a,s=i+o;return 0===o||t[s]&&"M"===t[s][0]?(a=t[s],["M"].concat(a.slice(-2))):(s>=e&&(s-=n),t[s])})})}(t);return o.forEach(function(o,a){t.slice(1).forEach(function(r,o){i+=mn(t[(a+o)%n].slice(-2),e[o%n].slice(-2))}),r[a]=i,i=0}),o[r.indexOf(Math.min.apply(null,r))]}function Tn(t){return function(t){var e=0,n=0,r=0;return vn(t).map(function(t){var i;if("M"===t[0])return e=t[1],n=t[2],0;var o=t.slice(1),a=o[0],s=o[1],l=o[2],u=o[3],c=o[4],h=o[5];return r=function(t,e,n,r,i,o,a,s){return 3*((s-e)*(n+i)-(a-t)*(r+o)+r*(t-i)-n*(e-o)+s*(i+t/3)-a*(o+e/3))/20}(e,n,a,s,l,u,c,h),i=t.slice(-2),e=i[0],n=i[1],r}).reduce(function(t,e){return t+e},0)}(t)>=0}function An(t){return t.map(function(t,e,n){var r=e&&n[e-1].slice(-2).concat(t.slice(1)),i=e?kn(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),o=t.slice(6,8),a=fn(n,r,e),s=fn(r,i,e),l=fn(i,o,e),u=fn(a,s,e),c=fn(s,l,e),h=fn(u,c,e);return[["C"].concat(a,u,h),["C"].concat(c,l,o)]}(r):[t,t]:[t],l:i}})}function Cn(t,e,n){var r=An(t),i=An(e),o=r.length,a=i.length,s=r.filter(function(t){return t.l}).length,l=i.filter(function(t){return t.l}).length,u=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)/l||0,h=n||Math.max(o,a),d=[u,c],f=[h-o,h-a],p=0,g=[r,i].map(function(t,e){return t.l===h?t.map(function(t){return t.s}):t.map(function(t,n){return p=n&&f[e]&&t.l>=d[e],f[e]-=p?1:0,p?t.ss:[t.s]}).flat()});return g[0].length===g[1].length?g:Cn(g[0],g[1],h)}function Pn(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function Rn(){return Rn="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(arguments.length<3?t:n):i.value}},Rn.apply(null,arguments)}function Dn(t,e,n,r){var i=Rn(f(t.prototype),e,n);return"function"==typeof i?function(t){return i.apply(n,t)}:i}
/*!
* @antv/g-math
* @description Geometry util
* @version 3.0.1
* @date 5/9/2025, 8:18:51 AM
* @author AntVis
* @docs https://g.antv.antgroup.com/
*/function Ln(t,e,n,r){var i=t-n,o=e-r;return Math.sqrt(i*i+o*o)}function _n(t,e){var n=Math.min.apply(Math,d(t)),r=Math.min.apply(Math,d(e));return{x:n,y:r,width:Math.max.apply(Math,d(t))-n,height:Math.max.apply(Math,d(e))-r}}function In(t,e,n,r,i,o){return n*Math.cos(i)*Math.cos(o)-r*Math.sin(i)*Math.sin(o)+t}function jn(t,e,n,r,i,o){return n*Math.sin(i)*Math.cos(o)+r*Math.cos(i)*Math.sin(o)+e}function Bn(t,e,n,r,i,o,a){for(var s=function(t,e,n){return Math.atan(-e/t*Math.tan(n))}(n,r,i),l=1/0,u=-1/0,c=[o,a],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var d=s+h;o<a?o<d&&d<a&&c.push(d):a<d&&d<o&&c.push(d)}for(var f=0;f<c.length;f++){var p=In(t,0,n,r,i,c[f]);p<l&&(l=p),p>u&&(u=p)}for(var g=function(t,e,n){return Math.atan(e/(t*Math.tan(n)))}(n,r,i),v=1/0,m=-1/0,y=[o,a],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;o<a?o<x&&x<a&&y.push(x):a<x&&x<o&&y.push(x)}for(var E=0;E<y.length;E++){var w=jn(0,e,n,r,i,y[E]);w<v&&(v=w),w>m&&(m=w)}return{x:l,y:v,width:u-l,height:m-v}}function Fn(t,e,n,r,i,o){var a=-1,s=1/0,l=[n,r],u=20;o&&o>200&&(u=o/10);for(var c=1/u,h=c/10,f=0;f<=u;f++){var p=f*c