UNPKG

three-globe

Version:

Globe data visualization as a ThreeJS reusable 3D object

2 lines 1.2 MB
// Version 2.43.0 three-globe - https://github.com/vasturiano/three-globe !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three")):"function"==typeof define&&define.amd?define(["three"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).ThreeGlobe=t(e.THREE)}(this,function(e){"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function r(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function i(e,t,r,i,n,s,a){try{var o=e[s](a),A=o.value}catch(e){return void r(e)}o.done?t(A):Promise.resolve(A).then(i,n)}function n(e,t,r){return t=d(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,f()?Reflect.construct(t,r||[],d(e).constructor):t.apply(e,r))}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return e.get(r(e,t))}function o(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function A(e,t,i){return e.set(r(e,t),i),i}function l(e,t,r){if(f())return Reflect.construct.apply(null,arguments);var i=[null];return i.push.apply(i,t),new(e.bind.apply(e,i))}function u(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,T(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return(t=T(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var i=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(i){var n=Object.getOwnPropertyDescriptor(i,t);return n.get?n.get.call(arguments.length<3?e:r):n.value}},c.apply(null,arguments)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(){var e,t,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function s(r,i,n,s){var A=i&&i.prototype instanceof o?i:o,l=Object.create(A.prototype);return b(l,"_invoke",function(r,i,n){var s,o,A,l=0,u=n||[],h=!1,c={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return s=t,o=0,A=e,c.n=r,a}};function d(r,i){for(o=r,A=i,t=0;!h&&l&&!n&&t<u.length;t++){var n,s=u[t],d=c.p,p=s[2];r>3?(n=p===i)&&(A=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=e):s[0]<=d&&((n=r<2&&d<s[1])?(o=0,c.v=i,c.n=s[1]):d<p&&(n=r<3||s[0]>i||i>p)&&(s[4]=r,s[5]=i,c.n=p,o=0))}if(n||r>1)return a;throw h=!0,i}return function(n,u,p){if(l>1)throw TypeError("Generator is already running");for(h&&1===u&&d(u,p),o=u,A=p;(t=o<2?e:A)||!h;){s||(o?o<3?(o>1&&(c.n=-1),d(o,A)):c.n=A:c.v=A);try{if(l=2,s){if(o||(n="next"),t=s[n]){if(!(t=t.call(s,A)))throw TypeError("iterator result is not an object");if(!t.done)return t;A=t.value,o<2&&(o=0)}else 1===o&&(t=s.return)&&t.call(s),o<2&&(A=TypeError("The iterator does not provide a '"+n+"' method"),o=1);s=e}else if((t=(h=c.n<0)?A:r.call(i,c))!==a)break}catch(t){s=e,o=1,A=t}finally{l=1}}return{value:t,done:h}}}(r,n,s),!0),l}var a={};function o(){}function A(){}function l(){}t=Object.getPrototypeOf;var u=[][i]?t(t([][i]())):(b(t={},i,function(){return this}),t),h=l.prototype=o.prototype=Object.create(u);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,b(e,n,"GeneratorFunction")),e.prototype=Object.create(h),e}return A.prototype=l,b(h,"constructor",l),b(l,"constructor",A),A.displayName="GeneratorFunction",b(l,n,"GeneratorFunction"),b(h),b(h,n,"Generator"),b(h,i,function(){return this}),b(h,"toString",function(){return"[object Generator]"}),(y=function(){return{w:s,m:c}})()}function b(e,t,r,i){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}b=function(e,t,r,i){if(t)n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r;else{function s(t,r){b(e,t,function(e){return this._invoke(t,r,e)})}s("next",0),s("throw",1),s("return",2)}},b(e,t,r,i)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,s,a,o=[],A=!0,l=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;A=!1}else for(;!(A=(i=s.call(r)).done)&&(o.push(i.value),o.length!==t);A=!0);}catch(e){l=!0,n=e}finally{try{if(!A&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw n}}return o}}(e,t)||M(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t,r,i){var n=c(d(e.prototype),t,r);return"function"==typeof n?function(e){return n.apply(r,e)}:n}function w(e){return function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function M(e,r){if(e){if("string"==typeof e)return t(e,r);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,r):void 0}}function S(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var E="object"==typeof global&&global&&global.Object===Object&&global,N="object"==typeof self&&self&&self.Object===Object&&self,C=E||N||Function("return this")(),R=function(){return C.Date.now()},B=/\s/;var P=/^\s+/;function q(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&B.test(e.charAt(t)););return t}(e)+1).replace(P,""):e}var D=C.Symbol,I=Object.prototype,L=I.hasOwnProperty,F=I.toString,O=D?D.toStringTag:void 0;var k=Object.prototype.toString;var V=D?D.toStringTag:void 0;function U(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":V&&V in Object(e)?function(e){var t=L.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch(e){}var n=F.call(e);return i&&(t?e[O]=r:delete e[O]),n}(e):function(e){return k.call(e)}(e)}var z=/^[-+]0x[0-9a-f]+$/i,G=/^0b[01]+$/i,j=/^0o[0-7]+$/i,H=parseInt;function W(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return null!=e&&"object"==typeof e}(e)&&"[object Symbol]"==U(e)}(e))return NaN;if(S(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=S(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=q(e);var r=G.test(e);return r||j.test(e)?H(e.slice(2),r?2:8):z.test(e)?NaN:+e}var Q=Math.max,$=Math.min;function X(e,t,r){var i,n,s,a,o,A,l=0,u=!1,h=!1,c=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var r=i,s=n;return i=n=void 0,l=t,a=e.apply(s,r)}function p(e){var r=e-A;return void 0===A||r>=t||r<0||h&&e-l>=s}function f(){var e=R();if(p(e))return m(e);o=setTimeout(f,function(e){var r=t-(e-A);return h?$(r,s-(e-l)):r}(e))}function m(e){return o=void 0,c&&i?d(e):(i=n=void 0,a)}function g(){var e=R(),r=p(e);if(i=arguments,n=this,A=e,r){if(void 0===o)return function(e){return l=e,o=setTimeout(f,t),u?d(e):a}(A);if(h)return clearTimeout(o),o=setTimeout(f,t),d(A)}return void 0===o&&(o=setTimeout(f,t)),a}return t=W(t)||0,S(r)&&(u=!!r.leading,s=(h="maxWait"in r)?Q(W(r.maxWait)||0,t):s,c="trailing"in r?!!r.trailing:c),g.cancel=function(){void 0!==o&&clearTimeout(o),l=0,i=A=n=o=void 0},g.flush=function(){return void 0===o?a:m(R())},g}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Z(e,t,r){return Object.defineProperty(e,"prototype",{writable:!1}),e}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,s,a,o=[],A=!0,l=!1;try{if(s=(r=r.call(e)).next,0===t);else for(;!(A=(i=s.call(r)).done)&&(o.push(i.value),o.length!==t);A=!0);}catch(e){l=!0,n=e}finally{try{if(!A&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw n}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var J=Z(function e(t,r){var i=r.default,n=void 0===i?null:i,s=r.triggerUpdate,a=void 0===s||s,o=r.onChange,A=void 0===o?function(e,t){}:o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t,this.defaultVal=n,this.triggerUpdate=a,this.onChange=A});function ee(e){var t=e.stateInit,r=void 0===t?function(){return{}}:t,i=e.props,n=void 0===i?{}:i,s=e.methods,a=void 0===s?{}:s,o=e.aliases,A=void 0===o?{}:o,l=e.init,u=void 0===l?function(){}:l,h=e.update,c=void 0===h?function(){}:h,d=Object.keys(n).map(function(e){return new J(e,n[e])});return function e(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];var s=!!(this instanceof e?this.constructor:void 0),o=s?i.shift():void 0,l=i[0],h=void 0===l?{}:l,p=Object.assign({},r instanceof Function?r(h):r,{initialised:!1}),f={};function m(e){return g(e,h),y(),m}var g=function(e,t){u.call(m,e,p,t),p.initialised=!0},y=X(function(){p.initialised&&(c.call(m,p,f),f={})},1);return d.forEach(function(e){m[e.name]=function(e){var t=e.name,r=e.triggerUpdate,i=void 0!==r&&r,n=e.onChange,s=void 0===n?function(e,t){}:n,a=e.defaultVal,o=void 0===a?null:a;return function(e){var r=p[t];if(!arguments.length)return r;var n=void 0===e?o:e;return p[t]=n,s.call(m,n,p,r),!f.hasOwnProperty(t)&&(f[t]=r),i&&y(),m}}(e)}),Object.keys(a).forEach(function(e){m[e]=function(){for(var t,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return(t=a[e]).call.apply(t,[m,p].concat(i))}}),Object.entries(A).forEach(function(e){var t=K(e,2),r=t[0],i=t[1];return m[r]=m[i]}),m.resetProps=function(){return d.forEach(function(e){m[e.name](e.defaultVal)}),m},m.resetProps(),p._rerender=y,s&&o&&m(o),m}}var te=Object.freeze({Linear:Object.freeze({None:function(e){return e},In:function(e){return e},Out:function(e){return e},InOut:function(e){return e}}),Quadratic:Object.freeze({In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}}),Cubic:Object.freeze({In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}}),Quartic:Object.freeze({In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}}),Quintic:Object.freeze({In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}}),Sinusoidal:Object.freeze({In:function(e){return 1-Math.sin((1-e)*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.sin(Math.PI*(.5-e)))}}),Exponential:Object.freeze({In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}}),Circular:Object.freeze({In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}}),Elastic:Object.freeze({In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}}),Back:Object.freeze({In:function(e){var t=1.70158;return 1===e?1:e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return 0===e?0:--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}}),Bounce:Object.freeze({In:function(e){return 1-te.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*te.Bounce.In(2*e):.5*te.Bounce.Out(2*e-1)+.5}}),generatePow:function(e){return void 0===e&&(e=4),e=(e=e<Number.EPSILON?Number.EPSILON:e)>1e4?1e4:e,{In:function(t){return Math.pow(t,e)},Out:function(t){return 1-Math.pow(1-t,e)},InOut:function(t){return t<.5?Math.pow(2*t,e)/2:(1-Math.pow(2-2*t,e))/2+.5}}}}),re=function(){return performance.now()},ie=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,e)}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(t){return e._tweens[t]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var i=0,n=t;i<n.length;i++){var s=n[i];null===(e=s._group)||void 0===e||e.remove(s),s._group=this,this._tweens[s.getId()]=s,this._tweensAddedDuringUpdate[s.getId()]=s}},e.prototype.remove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,i=e;r<i.length;r++){var n=i[r];n._group=void 0,delete this._tweens[n.getId()],delete this._tweensAddedDuringUpdate[n.getId()]}},e.prototype.allStopped=function(){return this.getAll().every(function(e){return!e.isPlaying()})},e.prototype.update=function(e,t){void 0===e&&(e=re()),void 0===t&&(t=!0);var r=Object.keys(this._tweens);if(0!==r.length)for(;r.length>0;){this._tweensAddedDuringUpdate={};for(var i=0;i<r.length;i++){var n=this._tweens[r[i]],s=!t;n&&!1===n.update(e,s)&&!t&&this.remove(n)}r=Object.keys(this._tweensAddedDuringUpdate)}},e}(),ne={Linear:function(e,t){var r=e.length-1,i=r*t,n=Math.floor(i),s=ne.Utils.Linear;return t<0?s(e[0],e[1],i):t>1?s(e[r],e[r-1],r-i):s(e[n],e[n+1>r?r:n+1],i-n)},Utils:{Linear:function(e,t,r){return(t-e)*r+e}}},se=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),ae=new ie,oe=function(){function e(e,t){this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._isDynamic=!1,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=te.Linear.None,this._interpolationFunction=ne.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=se.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=e,"object"==typeof t?(this._group=t,t.add(this)):!0===t&&(this._group=ae,ae.add(this))}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.getDuration=function(){return this._duration},e.prototype.to=function(e,t){if(void 0===t&&(t=1e3),this._isPlaying)throw new Error("Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.");return this._valuesEnd=e,this._propertiesAreSetUp=!1,this._duration=t<0?0:t,this},e.prototype.duration=function(e){return void 0===e&&(e=1e3),this._duration=e<0?0:e,this},e.prototype.dynamic=function(e){return void 0===e&&(e=!1),this._isDynamic=e,this},e.prototype.start=function(e,t){if(void 0===e&&(e=re()),void 0===t&&(t=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var r in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=e,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var i={};for(var n in this._valuesEnd)i[n]=this._valuesEnd[n];this._valuesEnd=i}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},e.prototype.startFromCurrentValues=function(e){return this.start(e,!0)},e.prototype._setupProperties=function(e,t,r,i,n){for(var s in r){var a=e[s],o=Array.isArray(a),A=o?"array":typeof a,l=!o&&Array.isArray(r[s]);if("undefined"!==A&&"function"!==A){if(l){if(0===(m=r[s]).length)continue;for(var u=[a],h=0,c=m.length;h<c;h+=1){var d=this._handleRelativeValue(a,m[h]);if(isNaN(d)){l=!1,console.warn("Found invalid interpolation list. Skipping.");break}u.push(d)}l&&(r[s]=u)}if("object"!==A&&!o||!a||l)(void 0===t[s]||n)&&(t[s]=a),o||(t[s]*=1),i[s]=l?r[s].slice().reverse():t[s]||0;else{t[s]=o?[]:{};var p=a;for(var f in p)t[s][f]=p[f];i[s]=o?[]:{};var m=r[s];if(!this._isDynamic){var g={};for(var f in m)g[f]=m[f];r[s]=m=g}this._setupProperties(p,t[s],m,i[s],n)}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},e.prototype.pause=function(e){return void 0===e&&(e=re()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e),this},e.prototype.resume=function(e){return void 0===e&&(e=re()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;e<t;e++)this._chainedTweens[e].stop();return this},e.prototype.group=function(e){return e?(e.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},e.prototype.remove=function(){var e;return null===(e=this._group)||void 0===e||e.remove(this),this},e.prototype.delay=function(e){return void 0===e&&(e=0),this._delayTime=e,this},e.prototype.repeat=function(e){return void 0===e&&(e=0),this._initialRepeat=e,this._repeat=e,this},e.prototype.repeatDelay=function(e){return this._repeatDelayTime=e,this},e.prototype.yoyo=function(e){return void 0===e&&(e=!1),this._yoyo=e,this},e.prototype.easing=function(e){return void 0===e&&(e=te.Linear.None),this._easingFunction=e,this},e.prototype.interpolation=function(e){return void 0===e&&(e=ne.Linear),this._interpolationFunction=e,this},e.prototype.chain=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this._chainedTweens=e,this},e.prototype.onStart=function(e){return this._onStartCallback=e,this},e.prototype.onEveryStart=function(e){return this._onEveryStartCallback=e,this},e.prototype.onUpdate=function(e){return this._onUpdateCallback=e,this},e.prototype.onRepeat=function(e){return this._onRepeatCallback=e,this},e.prototype.onComplete=function(e){return this._onCompleteCallback=e,this},e.prototype.onStop=function(e){return this._onStopCallback=e,this},e.prototype.update=function(t,r){var i,n,s=this;if(void 0===t&&(t=re()),void 0===r&&(r=e.autoStartOnUpdate),this._isPaused)return!0;if(!this._goToEnd&&!this._isPlaying){if(!r)return!1;this.start(t,!0)}if(this._goToEnd=!1,t<this._startTime)return!0;!1===this._onStartCallbackFired&&(this._onStartCallback&&this._onStartCallback(this._object),this._onStartCallbackFired=!0),!1===this._onEveryStartCallbackFired&&(this._onEveryStartCallback&&this._onEveryStartCallback(this._object),this._onEveryStartCallbackFired=!0);var a=t-this._startTime,o=this._duration+(null!==(i=this._repeatDelayTime)&&void 0!==i?i:this._delayTime),A=this._duration+this._repeat*o,l=function(){if(0===s._duration)return 1;if(a>A)return 1;var e=Math.trunc(a/o),t=a-e*o,r=Math.min(t/s._duration,1);return 0===r&&a===s._duration?1:r}(),u=this._easingFunction(l);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,u),this._onUpdateCallback&&this._onUpdateCallback(this._object,l),0===this._duration||a>=this._duration){if(this._repeat>0){var h=Math.min(Math.trunc((a-this._duration)/o)+1,this._repeat);for(n in isFinite(this._repeat)&&(this._repeat-=h),this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=o*h,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var c=0,d=this._chainedTweens.length;c<d;c++)this._chainedTweens[c].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},e.prototype._updateProperties=function(e,t,r,i){for(var n in r)if(void 0!==t[n]){var s=t[n]||0,a=r[n],o=Array.isArray(e[n]),A=Array.isArray(a);!o&&A?e[n]=this._interpolationFunction(a,i):"object"==typeof a&&a?this._updateProperties(e[n],s,a,i):"number"==typeof(a=this._handleRelativeValue(s,a))&&(e[n]=s+(a-s)*i)}},e.prototype._handleRelativeValue=function(e,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?e+parseFloat(t):parseFloat(t)},e.prototype._swapEndStartRepeatValues=function(e){var t=this._valuesStartRepeat[e],r=this._valuesEnd[e];this._valuesStartRepeat[e]="string"==typeof r?this._valuesStartRepeat[e]+parseFloat(r):this._valuesEnd[e],this._valuesEnd[e]=t},e.autoStartOnUpdate=!1,e}();se.nextId;var Ae=ae;Ae.getAll.bind(Ae),Ae.removeAll.bind(Ae),Ae.add.bind(Ae),Ae.remove.bind(Ae),Ae.update.bind(Ae);var le=function(e){e instanceof Array?e.forEach(le):(e.map&&e.map.dispose(),e.dispose())},ue=function(e){e.geometry&&e.geometry.dispose(),e.material&&le(e.material),e.texture&&e.texture.dispose(),e.children&&e.children.forEach(ue)},he=function(e){if(e&&e.children)for(;e.children.length;){var t=e.children[0];e.remove(t),ue(t)}};function ce(e,t){var r=new t;return{linkProp:function(t){return{default:r[t](),onChange:function(r,i){i[e][t](r)},triggerUpdate:!1}},linkMethod:function(t){return function(r){for(var i=r[e],n=arguments.length,s=new Array(n>1?n-1:0),a=1;a<n;a++)s[a-1]=arguments[a];var o=i[t].apply(i,s);return o===i?this:o}}}}var de=100;function pe(){return de}function fe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=(90-e)*Math.PI/180,n=(90-t)*Math.PI/180,s=de*(1+r),a=Math.sin(i);return{x:s*a*Math.cos(n),y:s*Math.cos(i),z:s*a*Math.sin(n)}}function me(e){var t=e.x,r=e.y,i=e.z,n=Math.sqrt(t*t+r*r+i*i),s=Math.acos(r/n),a=Math.atan2(i,t);return{lat:90-180*s/Math.PI,lng:90-180*a/Math.PI-(a<-Math.PI/2?360:0),altitude:n/de-1}}function ge(e){return e*Math.PI/180}function ye(e,t,r,i,n){if(isNaN(t)||isNaN(r)||isNaN(i))return e;var s,a,o,A,l,u,h,c,d,p,f,m,g=e._root,y={data:n},b=e._x0,x=e._y0,v=e._z0,_=e._x1,w=e._y1,T=e._z1;if(!g)return e._root=y,e;for(;g.length;)if((c=t>=(a=(b+_)/2))?b=a:_=a,(d=r>=(o=(x+w)/2))?x=o:w=o,(p=i>=(A=(v+T)/2))?v=A:T=A,s=g,!(g=g[f=p<<2|d<<1|c]))return s[f]=y,e;if(l=+e._x.call(null,g.data),u=+e._y.call(null,g.data),h=+e._z.call(null,g.data),t===l&&r===u&&i===h)return y.next=g,s?s[f]=y:e._root=y,e;do{s=s?s[f]=new Array(8):e._root=new Array(8),(c=t>=(a=(b+_)/2))?b=a:_=a,(d=r>=(o=(x+w)/2))?x=o:w=o,(p=i>=(A=(v+T)/2))?v=A:T=A}while((f=p<<2|d<<1|c)==(m=(h>=A)<<2|(u>=o)<<1|l>=a));return s[m]=g,s[f]=y,e}function be(e,t,r,i,n,s,a){this.node=e,this.x0=t,this.y0=r,this.z0=i,this.x1=n,this.y1=s,this.z1=a}const xe=(e,t,r,i,n,s)=>Math.sqrt((e-i)**2+(t-n)**2+(r-s)**2);function ve(e){return e[0]}function _e(e){return e[1]}function we(e){return e[2]}function Te(e,t,r,i){var n=new Me(null==t?ve:t,null==r?_e:r,null==i?we:i,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function Me(e,t,r,i,n,s,a,o,A){this._x=e,this._y=t,this._z=r,this._x0=i,this._y0=n,this._z0=s,this._x1=a,this._y1=o,this._z1=A,this._root=void 0}function Se(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Ee=Te.prototype=Me.prototype;function Ne(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Ce(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Re(e){let t,r,i;function n(e,i,n=0,s=e.length){if(n<s){if(0!==t(i,i))return s;do{const t=n+s>>>1;r(e[t],i)<0?n=t+1:s=t}while(n<s)}return n}return 2!==e.length?(t=Ne,r=(t,r)=>Ne(e(t),r),i=(t,r)=>e(t)-r):(t=e===Ne||e===Ce?e:Be,r=e,i=e),{left:n,center:function(e,t,r=0,s=e.length){const a=n(e,t,r,s-1);return a>r&&i(e[a-1],t)>-i(e[a],t)?a-1:a},right:function(e,i,n=0,s=e.length){if(n<s){if(0!==t(i,i))return s;do{const t=n+s>>>1;r(e[t],i)<=0?n=t+1:s=t}while(n<s)}return n}}}function Be(){return 0}Ee.copy=function(){var e,t,r=new Me(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),i=this._root;if(!i)return r;if(!i.length)return r._root=Se(i),r;for(e=[{source:i,target:r._root=new Array(8)}];i=e.pop();)for(var n=0;n<8;++n)(t=i.source[n])&&(t.length?e.push({source:t,target:i.target[n]=new Array(8)}):i.target[n]=Se(t));return r},Ee.add=function(e){const t=+this._x.call(null,e),r=+this._y.call(null,e),i=+this._z.call(null,e);return ye(this.cover(t,r,i),t,r,i,e)},Ee.addAll=function(e){Array.isArray(e)||(e=Array.from(e));const t=e.length,r=new Float64Array(t),i=new Float64Array(t),n=new Float64Array(t);let s=1/0,a=1/0,o=1/0,A=-1/0,l=-1/0,u=-1/0;for(let h,c,d,p,f=0;f<t;++f)isNaN(c=+this._x.call(null,h=e[f]))||isNaN(d=+this._y.call(null,h))||isNaN(p=+this._z.call(null,h))||(r[f]=c,i[f]=d,n[f]=p,c<s&&(s=c),c>A&&(A=c),d<a&&(a=d),d>l&&(l=d),p<o&&(o=p),p>u&&(u=p));if(s>A||a>l||o>u)return this;this.cover(s,a,o).cover(A,l,u);for(let s=0;s<t;++s)ye(this,r[s],i[s],n[s],e[s]);return this},Ee.cover=function(e,t,r){if(isNaN(e=+e)||isNaN(t=+t)||isNaN(r=+r))return this;var i=this._x0,n=this._y0,s=this._z0,a=this._x1,o=this._y1,A=this._z1;if(isNaN(i))a=(i=Math.floor(e))+1,o=(n=Math.floor(t))+1,A=(s=Math.floor(r))+1;else{for(var l,u,h=a-i||1,c=this._root;i>e||e>=a||n>t||t>=o||s>r||r>=A;)switch(u=(r<s)<<2|(t<n)<<1|e<i,(l=new Array(8))[u]=c,c=l,h*=2,u){case 0:a=i+h,o=n+h,A=s+h;break;case 1:i=a-h,o=n+h,A=s+h;break;case 2:a=i+h,n=o-h,A=s+h;break;case 3:i=a-h,n=o-h,A=s+h;break;case 4:a=i+h,o=n+h,s=A-h;break;case 5:i=a-h,o=n+h,s=A-h;break;case 6:a=i+h,n=o-h,s=A-h;break;case 7:i=a-h,n=o-h,s=A-h}this._root&&this._root.length&&(this._root=c)}return this._x0=i,this._y0=n,this._z0=s,this._x1=a,this._y1=o,this._z1=A,this},Ee.data=function(){var e=[];return this.visit(function(t){if(!t.length)do{e.push(t.data)}while(t=t.next)}),e},Ee.extent=function(e){return arguments.length?this.cover(+e[0][0],+e[0][1],+e[0][2]).cover(+e[1][0],+e[1][1],+e[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},Ee.find=function(e,t,r,i){var n,s,a,o,A,l,u,h,c,d=this._x0,p=this._y0,f=this._z0,m=this._x1,g=this._y1,y=this._z1,b=[],x=this._root;for(x&&b.push(new be(x,d,p,f,m,g,y)),null==i?i=1/0:(d=e-i,p=t-i,f=r-i,m=e+i,g=t+i,y=r+i,i*=i);h=b.pop();)if(!(!(x=h.node)||(s=h.x0)>m||(a=h.y0)>g||(o=h.z0)>y||(A=h.x1)<d||(l=h.y1)<p||(u=h.z1)<f))if(x.length){var v=(s+A)/2,_=(a+l)/2,w=(o+u)/2;b.push(new be(x[7],v,_,w,A,l,u),new be(x[6],s,_,w,v,l,u),new be(x[5],v,a,w,A,_,u),new be(x[4],s,a,w,v,_,u),new be(x[3],v,_,o,A,l,w),new be(x[2],s,_,o,v,l,w),new be(x[1],v,a,o,A,_,w),new be(x[0],s,a,o,v,_,w)),(c=(r>=w)<<2|(t>=_)<<1|e>=v)&&(h=b[b.length-1],b[b.length-1]=b[b.length-1-c],b[b.length-1-c]=h)}else{var T=e-+this._x.call(null,x.data),M=t-+this._y.call(null,x.data),S=r-+this._z.call(null,x.data),E=T*T+M*M+S*S;if(E<i){var N=Math.sqrt(i=E);d=e-N,p=t-N,f=r-N,m=e+N,g=t+N,y=r+N,n=x.data}}return n},Ee.findAllWithinRadius=function(e,t,r,i){const n=[],s=e-i,a=t-i,o=r-i,A=e+i,l=t+i,u=r+i;return this.visit((h,c,d,p,f,m,g)=>{if(!h.length)do{const s=h.data;xe(e,t,r,this._x(s),this._y(s),this._z(s))<=i&&n.push(s)}while(h=h.next);return c>A||d>l||p>u||f<s||m<a||g<o}),n},Ee.remove=function(e){if(isNaN(s=+this._x.call(null,e))||isNaN(a=+this._y.call(null,e))||isNaN(o=+this._z.call(null,e)))return this;var t,r,i,n,s,a,o,A,l,u,h,c,d,p,f,m=this._root,g=this._x0,y=this._y0,b=this._z0,x=this._x1,v=this._y1,_=this._z1;if(!m)return this;if(m.length)for(;;){if((h=s>=(A=(g+x)/2))?g=A:x=A,(c=a>=(l=(y+v)/2))?y=l:v=l,(d=o>=(u=(b+_)/2))?b=u:_=u,t=m,!(m=m[p=d<<2|c<<1|h]))return this;if(!m.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(r=t,f=p)}for(;m.data!==e;)if(i=m,!(m=m.next))return this;return(n=m.next)&&delete m.next,i?(n?i.next=n:delete i.next,this):t?(n?t[p]=n:delete t[p],(m=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&m===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!m.length&&(r?r[f]=m:this._root=m),this):(this._root=n,this)},Ee.removeAll=function(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this},Ee.root=function(){return this._root},Ee.size=function(){var e=0;return this.visit(function(t){if(!t.length)do{++e}while(t=t.next)}),e},Ee.visit=function(e){var t,r,i,n,s,a,o,A,l=[],u=this._root;for(u&&l.push(new be(u,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=l.pop();)if(!e(u=t.node,i=t.x0,n=t.y0,s=t.z0,a=t.x1,o=t.y1,A=t.z1)&&u.length){var h=(i+a)/2,c=(n+o)/2,d=(s+A)/2;(r=u[7])&&l.push(new be(r,h,c,d,a,o,A)),(r=u[6])&&l.push(new be(r,i,c,d,h,o,A)),(r=u[5])&&l.push(new be(r,h,n,d,a,c,A)),(r=u[4])&&l.push(new be(r,i,n,d,h,c,A)),(r=u[3])&&l.push(new be(r,h,c,s,a,o,d)),(r=u[2])&&l.push(new be(r,i,c,s,h,o,d)),(r=u[1])&&l.push(new be(r,h,n,s,a,c,d)),(r=u[0])&&l.push(new be(r,i,n,s,h,c,d))}return this},Ee.visitAfter=function(e){var t,r=[],i=[];for(this._root&&r.push(new be(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=r.pop();){var n=t.node;if(n.length){var s,a=t.x0,o=t.y0,A=t.z0,l=t.x1,u=t.y1,h=t.z1,c=(a+l)/2,d=(o+u)/2,p=(A+h)/2;(s=n[0])&&r.push(new be(s,a,o,A,c,d,p)),(s=n[1])&&r.push(new be(s,c,o,A,l,d,p)),(s=n[2])&&r.push(new be(s,a,d,A,c,u,p)),(s=n[3])&&r.push(new be(s,c,d,A,l,u,p)),(s=n[4])&&r.push(new be(s,a,o,p,c,d,h)),(s=n[5])&&r.push(new be(s,c,o,p,l,d,h)),(s=n[6])&&r.push(new be(s,a,d,p,c,u,h)),(s=n[7])&&r.push(new be(s,c,d,p,l,u,h))}i.push(t)}for(;t=i.pop();)e(t.node,t.x0,t.y0,t.z0,t.x1,t.y1,t.z1);return this},Ee.x=function(e){return arguments.length?(this._x=e,this):this._x},Ee.y=function(e){return arguments.length?(this._y=e,this):this._y},Ee.z=function(e){return arguments.length?(this._z=e,this):this._z};const Pe=Re(Ne).right;function qe(e,t){let r,i;if(void 0===t)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let n=-1;for(let s of e)null!=(s=t(s,++n,e))&&(void 0===r?s>=s&&(r=i=s):(r>s&&(r=s),i<s&&(i=s)))}return[r,i]}Re(function(e){return null===e?NaN:+e}).center;class De{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const n=t[i],s=e+n,a=Math.abs(e)<Math.abs(n)?e-(s-n):n-(s-e);a&&(t[r++]=a),e=s}return t[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let t,r,i,n=this._n,s=0;if(n>0){for(s=e[--n];n>0&&(t=s,r=e[--n],s=t+r,i=r-(s-t),!i););n>0&&(i<0&&e[n-1]<0||i>0&&e[n-1]>0)&&(r=2*i,t=s+r,r==t-s&&(s=t))}return s}}const Ie=Math.sqrt(50),Le=Math.sqrt(10),Fe=Math.sqrt(2);function Oe(e,t,r){const i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),s=i/Math.pow(10,n),a=s>=Ie?10:s>=Le?5:s>=Fe?2:1;let o,A,l;return n<0?(l=Math.pow(10,-n)/a,o=Math.round(e*l),A=Math.round(t*l),o/l<e&&++o,A/l>t&&--A,l=-l):(l=Math.pow(10,n)*a,o=Math.round(e/l),A=Math.round(t/l),o*l<e&&++o,A*l>t&&--A),A<o&&.5<=r&&r<2?Oe(e,t,2*r):[o,A,l]}function ke(e,t,r){return Oe(e=+e,t=+t,r=+r)[2]}function Ve(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function Ue(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/r)),s=new Array(n);++i<n;)s[i]=e+i*r;return s}function ze(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Ge(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function je(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function He(){}var We=.7,Qe=1/We,$e="\\s*([+-]?\\d+)\\s*",Xe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ye="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ze=/^#([0-9a-f]{3,8})$/,Ke=new RegExp(`^rgb\\(${$e},${$e},${$e}\\)$`),Je=new RegExp(`^rgb\\(${Ye},${Ye},${Ye}\\)$`),et=new RegExp(`^rgba\\(${$e},${$e},${$e},${Xe}\\)$`),tt=new RegExp(`^rgba\\(${Ye},${Ye},${Ye},${Xe}\\)$`),rt=new RegExp(`^hsl\\(${Xe},${Ye},${Ye}\\)$`),it=new RegExp(`^hsla\\(${Xe},${Ye},${Ye},${Xe}\\)$`),nt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function st(){return this.rgb().formatHex()}function at(){return this.rgb().formatRgb()}function ot(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Ze.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?At(t):3===r?new ht(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?lt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?lt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Ke.exec(e))?new ht(t[1],t[2],t[3],1):(t=Je.exec(e))?new ht(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=et.exec(e))?lt(t[1],t[2],t[3],t[4]):(t=tt.exec(e))?lt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=rt.exec(e))?gt(t[1],t[2]/100,t[3]/100,1):(t=it.exec(e))?gt(t[1],t[2]/100,t[3]/100,t[4]):nt.hasOwnProperty(e)?At(nt[e]):"transparent"===e?new ht(NaN,NaN,NaN,0):null}function At(e){return new ht(e>>16&255,e>>8&255,255&e,1)}function lt(e,t,r,i){return i<=0&&(e=t=r=NaN),new ht(e,t,r,i)}function ut(e,t,r,i){return 1===arguments.length?((n=e)instanceof He||(n=ot(n)),n?new ht((n=n.rgb()).r,n.g,n.b,n.opacity):new ht):new ht(e,t,r,null==i?1:i);var n}function ht(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function ct(){return`#${mt(this.r)}${mt(this.g)}${mt(this.b)}`}function dt(){const e=pt(this.opacity);return`${1===e?"rgb(":"rgba("}${ft(this.r)}, ${ft(this.g)}, ${ft(this.b)}${1===e?")":`, ${e})`}`}function pt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ft(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mt(e){return((e=ft(e))<16?"0":"")+e.toString(16)}function gt(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new bt(e,t,r,i)}function yt(e){if(e instanceof bt)return new bt(e.h,e.s,e.l,e.opacity);if(e instanceof He||(e=ot(e)),!e)return new bt;if(e instanceof bt)return e;var t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),s=Math.max(t,r,i),a=NaN,o=s-n,A=(s+n)/2;return o?(a=t===s?(r-i)/o+6*(r<i):r===s?(i-t)/o+2:(t-r)/o+4,o/=A<.5?s+n:2-s-n,a*=60):o=A>0&&A<1?0:a,new bt(a,o,A,e.opacity)}function bt(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function xt(e){return(e=(e||0)%360)<0?e+360:e}function vt(e){return Math.max(0,Math.min(1,e||0))}function _t(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}Ge(He,ot,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:st,formatHex:st,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return yt(this).formatHsl()},formatRgb:at,toString:at}),Ge(ht,ut,je(He,{brighter(e){return e=null==e?Qe:Math.pow(Qe,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?We:Math.pow(We,e),new ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ht(ft(this.r),ft(this.g),ft(this.b),pt(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ct,formatHex:ct,formatHex8:function(){return`#${mt(this.r)}${mt(this.g)}${mt(this.b)}${mt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:dt,toString:dt})),Ge(bt,function(e,t,r,i){return 1===arguments.length?yt(e):new bt(e,t,r,null==i?1:i)},je(He,{brighter(e){return e=null==e?Qe:Math.pow(Qe,e),new bt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?We:Math.pow(We,e),new bt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new ht(_t(e>=240?e-240:e+120,n,i),_t(e,n,i),_t(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new bt(xt(this.h),vt(this.s),vt(this.l),pt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=pt(this.opacity);return`${1===e?"hsl(":"hsla("}${xt(this.h)}, ${100*vt(this.s)}%, ${100*vt(this.l)}%${1===e?")":`, ${e})`}`}}));var wt=e=>()=>e;function Tt(e){return 1===(e=+e)?Mt:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}(t,r,e):wt(isNaN(t)?r:t)}}function Mt(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):wt(isNaN(e)?t:e)}var St=function e(t){var r=Tt(t);function i(e,t){var i=r((e=ut(e)).r,(t=ut(t)).r),n=r(e.g,t.g),s=r(e.b,t.b),a=Mt(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=n(t),e.b=s(t),e.opacity=a(t),e+""}}return i.gamma=e,i}(1);function Et(e,t){t||(t=[]);var r,i=e?Math.min(t.length,e.length):0,n=t.slice();return function(s){for(r=0;r<i;++r)n[r]=e[r]*(1-s)+t[r]*s;return n}}function Nt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ct(e,t){return(Nt(t)?Et:Rt)(e,t)}function Rt(e,t){var r,i=t?t.length:0,n=e?Math.min(i,e.length):0,s=new Array(n),a=new Array(i);for(r=0;r<n;++r)s[r]=Ft(e[r],t[r]);for(;r<i;++r)a[r]=t[r];return function(e){for(r=0;r<n;++r)a[r]=s[r](e);return a}}function Bt(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function Pt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function qt(e,t){var r,i={},n={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?i[r]=Ft(e[r],t[r]):n[r]=t[r];return function(e){for(r in i)n[r]=i[r](e);return n}}var Dt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,It=new RegExp(Dt.source,"g");function Lt(e,t){var r,i,n,s=Dt.lastIndex=It.lastIndex=0,a=-1,o=[],A=[];for(e+="",t+="";(r=Dt.exec(e))&&(i=It.exec(t));)(n=i.index)>s&&(n=t.slice(s,n),o[a]?o[a]+=n:o[++a]=n),(r=r[0])===(i=i[0])?o[a]?o[a]+=i:o[++a]=i:(o[++a]=null,A.push({i:a,x:Pt(r,i)})),s=It.lastIndex;return s<t.length&&(n=t.slice(s),o[a]?o[a]+=n:o[++a]=n),o.length<2?A[0]?function(e){return function(t){return e(t)+""}}(A[0].x):function(e){return function(){return e}}(t):(t=A.length,function(e){for(var r,i=0;i<t;++i)o[(r=A[i]).i]=r.x(e);return o.join("")})}function Ft(e,t){var r,i=typeof t;return null==t||"boolean"===i?wt(t):("number"===i?Pt:"string"===i?(r=ot(t))?(t=r,St):Lt:t instanceof ot?St:t instanceof Date?Bt:Nt(t)?Et:Array.isArray(t)?Rt:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?qt:Pt)(e,t)}function Ot(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function kt(e){return+e}var Vt=[0,1];function Ut(e){return e}function zt(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function Gt(e,t,r){var i=e[0],n=e[1],s=t[0],a=t[1];return n<i?(i=zt(n,i),s=r(a,s)):(i=zt(i,n),s=r(s,a)),function(e){return s(i(e))}}function jt(e,t,r){var i=Math.min(e.length,t.length)-1,n=new Array(i),s=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)n[a]=zt(e[a],e[a+1]),s[a]=r(t[a],t[a+1]);return function(t){var r=Pe(e,t,1,i)-1;return s[r](n[r](t))}}function Ht(){var e,t,r,i,n,s,a=Vt,o=Vt,A=Ft,l=Ut;function u(){var e,t,r,A=Math.min(a.length,o.length);return l!==Ut&&(e=a[0],t=a[A-1],e>t&&(r=e,e=t,t=r),l=function(r){return Math.max(e,Math.min(t,r))}),i=A>2?jt:Gt,n=s=null,h}function h(t){return null==t||isNaN(t=+t)?r:(n||(n=i(a.map(e),o,A)))(e(l(t)))}return h.invert=function(r){return l(t((s||(s=i(o,a.map(e),Pt)))(r)))},h.domain=function(e){return arguments.length?(a=Array.from(e,kt),u()):a.slice()},h.range=function(e){return arguments.length?(o=Array.from(e),u()):o.slice()},h.rangeRound=function(e){return o=Array.from(e),A=Ot,u()},h.clamp=function(e){return arguments.length?(l=!!e||Ut,u()):l!==Ut},h.interpolate=function(e){return arguments.length?(A=e,u()):A},h.unknown=function(e){return arguments.length?(r=e,h):r},function(r,i){return e=r,t=i,u()}}function Wt(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function Qt(e){return(e=Wt(Math.abs(e)))?e[1]:NaN}var $t,Xt=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yt(e){if(!(t=Xt.exec(e)))throw new Error("invalid format: "+e);var t;return new Zt({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Zt(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Kt(e,t){var r=Wt(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}Yt.prototype=Zt.prototype,Zt.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Jt={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Kt(100*e,t),r:Kt,s:function(e,t){var r=Wt(e,t);if(!r)return e+"";var i=r[0],n=r[1],s=n-($t=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+Wt(e,Math.max(0,t+s-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function er(e){return e}var tr,rr,ir,nr=Array.prototype.map,sr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ar(e){var t,r,i=void 0===e.grouping||void 0===e.thousands?er:(t=nr.call(e.grouping,Number),r=e.thousands+"",function(e,i){for(var n=e.length,s=[],a=0,o=t[0],A=0;n>0&&o>0&&(A+o+1>i&&(o=Math.max(1,i-A)),s.push(e.substring(n-=o,n+o)),!((A+=o+1)>i));)o=t[a=(a+1)%t.length];return s.reverse().join(r)}),n=void 0===e.currency?"":e.currency[0]+"",s=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?er:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(nr.call(e.numerals,String)),A=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=Yt(e)).fill,r=e.align,h=e.sign,c=e.symbol,d=e.zero,p=e.width,f=e.comma,m=e.precision,g=e.trim,y=e.type;"n"===y?(f=!0,y="g"):Jt[y]||(void 0===m&&(m=12),g=!0,y="g"),(d||"0"===t&&"="===r)&&(d=!0,t="0",r="=");var b="$"===c?n:"#"===c&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",x="$"===c?s:/[%p]/.test(y)?A:"",v=Jt[y],_=/[defgprs%]/.test(y);function w(e){var n,s,A,c=b,w=x;if("c"===y)w=v(e)+w,e="";else{var T=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:v(Math.abs(e),m),g&&(e=function(e){e:for(var t,r=e.length,i=1,n=-1;i<r;++i)switch(e[i]){case".":n=t=i;break;case"0":0===n&&(n=i),t=i;break;default:if(!+e[i])break e;n>0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),T&&0===+e&&"+"!==h&&(T=!1),c=(T?"("===h?h:l:"-"===h||"("===h?"":h)+c,w=("s"===y?sr[8+$t/3]:"")+w+(T&&"("===h?")":""),_)for(n=-1,s=e.length;++n<s;)if(48>(A=e.charCodeAt(n))||A>57){w=(46===A?a+e.slice(n+1):e.slice(n))+w,e=e.slice(0,n);break}}f&&!d&&(e=i(e,1/0));var M=c.length+e.length+w.length,S=M<p?new Array(p-M+1).join(t):"";switch(f&&d&&(e=i(S+e,S.length?p-w.length:1/0),S=""),r){case"<":e=c+e+w+S;break;case"=":e=c+S+e+w;break;case"^":e=S.slice(0,M=S.length>>1)+c+e+w+S.slice(M);break;default:e=S+c+e+w}return o(e)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),w.toString=function(){return e+""},w}return{format:h,formatPrefix:function(e,t){var r=h(((e=Yt(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(Qt(t)/3))),n=Math.pow(10,-i),s=sr[8+i/3];return function(e){return r(n*e)+s}}}}function or(e,t,r,i){var n,s=function(e,t,r){r=+r;const i=(t=+t)<(e=+e),n=i?ke(t,e,r):ke(e,t,r);return(i?-1:1)*(n<0?1/-n:n)}(e,t,r);switch((i=Yt(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=i.precision||isNaN(n=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Qt(t)/3)))-Qt(Math.abs(e)))}(s,a))||(i.precision=n),ir(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=function(e,t){return e=Ma