UNPKG

three-globe

Version:

Globe data visualization as a ThreeJS reusable 3D object

2 lines 458 kB
// Version 2.37.0 three-globe - https://github.com/vasturiano/three-globe !function(A,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three")):"function"==typeof define&&define.amd?define(["three"],t):(A="undefined"!=typeof globalThis?globalThis:A||self).ThreeGlobe=t(A.THREE)}(this,(function(A){"use strict";function t(A,t){(null==t||t>A.length)&&(t=A.length);for(var e=0,n=Array(t);e<t;e++)n[e]=A[e];return n}function e(A,t,e){if("function"==typeof A?A===t:A.has(t))return arguments.length<3?t:e;throw new TypeError("Private element is not present on this object")}function n(A,t,e){return t=h(t),function(A,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(A){if(void 0===A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A}(A)}(A,m()?Reflect.construct(t,e||[],h(A).constructor):t.apply(A,e))}function r(A,t){if(t.has(A))throw new TypeError("Cannot initialize the same private elements twice on an object")}function i(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}function o(A,t){return A.get(e(A,t))}function a(A,t,e){r(A,t),t.set(A,e)}function l(A,t,n){return A.set(e(A,t),n),n}function u(A,t,e){if(m())return Reflect.construct.apply(null,arguments);var n=[null];return n.push.apply(n,t),new(A.bind.apply(A,n))}function s(A,t,e){return t&&function(A,t){for(var e=0;e<t.length;e++){var n=t[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,w(n.key),n)}}(A.prototype,t),Object.defineProperty(A,"prototype",{writable:!1}),A}function f(A,t,e){return(t=w(t))in A?Object.defineProperty(A,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):A[t]=e,A}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(A,t,e){var n=function(A,t){for(;!{}.hasOwnProperty.call(A,t)&&null!==(A=h(A)););return A}(A,t);if(n){var r=Object.getOwnPropertyDescriptor(n,t);return r.get?r.get.call(arguments.length<3?A:e):r.value}},c.apply(null,arguments)}function h(A){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},h(A)}function d(A,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(t&&t.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),Object.defineProperty(A,"prototype",{writable:!1}),t&&v(A,t)}function m(){try{var A=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(A){}return(m=function(){return!!A})()}function p(A,t){var e=Object.keys(A);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(A);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(A,t).enumerable}))),e.push.apply(e,n)}return e}function g(A){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?p(Object(e),!0).forEach((function(t){f(A,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(e)):p(Object(e)).forEach((function(t){Object.defineProperty(A,t,Object.getOwnPropertyDescriptor(e,t))}))}return A}function v(A,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,t){return A.__proto__=t,A},v(A,t)}function b(A,t){return function(A){if(Array.isArray(A))return A}(A)||function(A,t){var e=null==A?null:"undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(null!=e){var n,r,i,o,a=[],l=!0,u=!1;try{if(i=(e=e.call(A)).next,0===t){if(Object(e)!==e)return;l=!1}else for(;!(l=(n=i.call(e)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(A){u=!0,r=A}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(u)throw r}}return a}}(A,t)||x(A,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 y(A,t,e,n){var r=c(h(A.prototype),t,e);return"function"==typeof r?function(A){return r.apply(e,A)}:r}function q(A){return function(A){if(Array.isArray(A))return t(A)}(A)||function(A){if("undefined"!=typeof Symbol&&null!=A[Symbol.iterator]||null!=A["@@iterator"])return Array.from(A)}(A)||x(A)||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 w(A){var t=function(A,t){if("object"!=typeof A||!A)return A;var e=A[Symbol.toPrimitive];if(void 0!==e){var n=e.call(A,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(A)}(A,"string");return"symbol"==typeof t?t:t+""}function x(A,e){if(A){if("string"==typeof A)return t(A,e);var n={}.toString.call(A).slice(8,-1);return"Object"===n&&A.constructor&&(n=A.constructor.name),"Map"===n||"Set"===n?Array.from(A):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(A,e):void 0}}function _(A){var t=typeof A;return null!=A&&("object"==t||"function"==t)}var M="object"==typeof global&&global&&global.Object===Object&&global,E="object"==typeof self&&self&&self.Object===Object&&self,B=M||E||Function("return this")(),k=function(){return B.Date.now()},S=/\s/;var D=/^\s+/;function C(A){return A?A.slice(0,function(A){for(var t=A.length;t--&&S.test(A.charAt(t)););return t}(A)+1).replace(D,""):A}var T=B.Symbol,O=Object.prototype,P=O.hasOwnProperty,I=O.toString,R=T?T.toStringTag:void 0;var Q=Object.prototype.toString;var j=T?T.toStringTag:void 0;function L(A){return null==A?void 0===A?"[object Undefined]":"[object Null]":j&&j in Object(A)?function(A){var t=P.call(A,R),e=A[R];try{A[R]=void 0;var n=!0}catch(A){}var r=I.call(A);return n&&(t?A[R]=e:delete A[R]),r}(A):function(A){return Q.call(A)}(A)}var G=/^[-+]0x[0-9a-f]+$/i,F=/^0b[01]+$/i,U=/^0o[0-7]+$/i,z=parseInt;function N(A){if("number"==typeof A)return A;if(function(A){return"symbol"==typeof A||function(A){return null!=A&&"object"==typeof A}(A)&&"[object Symbol]"==L(A)}(A))return NaN;if(_(A)){var t="function"==typeof A.valueOf?A.valueOf():A;A=_(t)?t+"":t}if("string"!=typeof A)return 0===A?A:+A;A=C(A);var e=F.test(A);return e||U.test(A)?z(A.slice(2),e?2:8):G.test(A)?NaN:+A}var H=Math.max,V=Math.min;function Y(A,t,e){var n,r,i,o,a,l,u=0,s=!1,f=!1,c=!0;if("function"!=typeof A)throw new TypeError("Expected a function");function h(t){var e=n,i=r;return n=r=void 0,u=t,o=A.apply(i,e)}function d(A){var e=A-l;return void 0===l||e>=t||e<0||f&&A-u>=i}function m(){var A=k();if(d(A))return p(A);a=setTimeout(m,function(A){var e=t-(A-l);return f?V(e,i-(A-u)):e}(A))}function p(A){return a=void 0,c&&n?h(A):(n=r=void 0,o)}function g(){var A=k(),e=d(A);if(n=arguments,r=this,l=A,e){if(void 0===a)return function(A){return u=A,a=setTimeout(m,t),s?h(A):o}(l);if(f)return clearTimeout(a),a=setTimeout(m,t),h(l)}return void 0===a&&(a=setTimeout(m,t)),o}return t=N(t)||0,_(e)&&(s=!!e.leading,i=(f="maxWait"in e)?H(N(e.maxWait)||0,t):i,c="trailing"in e?!!e.trailing:c),g.cancel=function(){void 0!==a&&clearTimeout(a),u=0,n=l=r=a=void 0},g.flush=function(){return void 0===a?o:p(k())},g}function W(A,t){(null==t||t>A.length)&&(t=A.length);for(var e=0,n=Array(t);e<t;e++)n[e]=A[e];return n}function Z(A,t,e){return Object.defineProperty(A,"prototype",{writable:!1}),A}function X(A,t){return function(A){if(Array.isArray(A))return A}(A)||function(A,t){var e=null==A?null:"undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(null!=e){var n,r,i,o,a=[],l=!0,u=!1;try{if(i=(e=e.call(A)).next,0===t);else for(;!(l=(n=i.call(e)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(A){u=!0,r=A}finally{try{if(!l&&null!=e.return&&(o=e.return(),Object(o)!==o))return}finally{if(u)throw r}}return a}}(A,t)||function(A,t){if(A){if("string"==typeof A)return W(A,t);var e={}.toString.call(A).slice(8,-1);return"Object"===e&&A.constructor&&(e=A.constructor.name),"Map"===e||"Set"===e?Array.from(A):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?W(A,t):void 0}}(A,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 A(t,e){var n=e.default,r=void 0===n?null:n,i=e.triggerUpdate,o=void 0===i||i,a=e.onChange,l=void 0===a?function(A,t){}:a;!function(A,t){if(!(A instanceof t))throw new TypeError("Cannot call a class as a function")}(this,A),this.name=t,this.defaultVal=r,this.triggerUpdate=o,this.onChange=l}));function K(A){var t=A.stateInit,e=void 0===t?function(){return{}}:t,n=A.props,r=void 0===n?{}:n,i=A.methods,o=void 0===i?{}:i,a=A.aliases,l=void 0===a?{}:a,u=A.init,s=void 0===u?function(){}:u,f=A.update,c=void 0===f?function(){}:f,h=Object.keys(r).map((function(A){return new J(A,r[A])}));return function A(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=!!(this instanceof A?this.constructor:void 0),a=i?n.shift():void 0,u=n[0],f=void 0===u?{}:u,d=Object.assign({},e instanceof Function?e(f):e,{initialised:!1}),m={};function p(A){return g(A,f),v(),p}var g=function(A,t){s.call(p,A,d,t),d.initialised=!0},v=Y((function(){d.initialised&&(c.call(p,d,m),m={})}),1);return h.forEach((function(A){p[A.name]=function(A){var t=A.name,e=A.triggerUpdate,n=void 0!==e&&e,r=A.onChange,i=void 0===r?function(A,t){}:r,o=A.defaultVal,a=void 0===o?null:o;return function(A){var e=d[t];if(!arguments.length)return e;var r=void 0===A?a:A;return d[t]=r,i.call(p,r,d,e),!m.hasOwnProperty(t)&&(m[t]=e),n&&v(),p}}(A)})),Object.keys(o).forEach((function(A){p[A]=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=o[A]).call.apply(t,[p,d].concat(n))}})),Object.entries(l).forEach((function(A){var t=X(A,2),e=t[0],n=t[1];return p[e]=p[n]})),p.resetProps=function(){return h.forEach((function(A){p[A.name](A.defaultVal)})),p},p.resetProps(),d._rerender=v,i&&a&&p(a),p}}var $,AA=Object.freeze({Linear:Object.freeze({None:function(A){return A},In:function(A){return A},Out:function(A){return A},InOut:function(A){return A}}),Quadratic:Object.freeze({In:function(A){return A*A},Out:function(A){return A*(2-A)},InOut:function(A){return(A*=2)<1?.5*A*A:-.5*(--A*(A-2)-1)}}),Cubic:Object.freeze({In:function(A){return A*A*A},Out:function(A){return--A*A*A+1},InOut:function(A){return(A*=2)<1?.5*A*A*A:.5*((A-=2)*A*A+2)}}),Quartic:Object.freeze({In:function(A){return A*A*A*A},Out:function(A){return 1- --A*A*A*A},InOut:function(A){return(A*=2)<1?.5*A*A*A*A:-.5*((A-=2)*A*A*A-2)}}),Quintic:Object.freeze({In:function(A){return A*A*A*A*A},Out:function(A){return--A*A*A*A*A+1},InOut:function(A){return(A*=2)<1?.5*A*A*A*A*A:.5*((A-=2)*A*A*A*A+2)}}),Sinusoidal:Object.freeze({In:function(A){return 1-Math.sin((1-A)*Math.PI/2)},Out:function(A){return Math.sin(A*Math.PI/2)},InOut:function(A){return.5*(1-Math.sin(Math.PI*(.5-A)))}}),Exponential:Object.freeze({In:function(A){return 0===A?0:Math.pow(1024,A-1)},Out:function(A){return 1===A?1:1-Math.pow(2,-10*A)},InOut:function(A){return 0===A?0:1===A?1:(A*=2)<1?.5*Math.pow(1024,A-1):.5*(2-Math.pow(2,-10*(A-1)))}}),Circular:Object.freeze({In:function(A){return 1-Math.sqrt(1-A*A)},Out:function(A){return Math.sqrt(1- --A*A)},InOut:function(A){return(A*=2)<1?-.5*(Math.sqrt(1-A*A)-1):.5*(Math.sqrt(1-(A-=2)*A)+1)}}),Elastic:Object.freeze({In:function(A){return 0===A?0:1===A?1:-Math.pow(2,10*(A-1))*Math.sin(5*(A-1.1)*Math.PI)},Out:function(A){return 0===A?0:1===A?1:Math.pow(2,-10*A)*Math.sin(5*(A-.1)*Math.PI)+1},InOut:function(A){return 0===A?0:1===A?1:(A*=2)<1?-.5*Math.pow(2,10*(A-1))*Math.sin(5*(A-1.1)*Math.PI):.5*Math.pow(2,-10*(A-1))*Math.sin(5*(A-1.1)*Math.PI)+1}}),Back:Object.freeze({In:function(A){var t=1.70158;return 1===A?1:A*A*((t+1)*A-t)},Out:function(A){var t=1.70158;return 0===A?0:--A*A*((t+1)*A+t)+1},InOut:function(A){var t=2.5949095;return(A*=2)<1?A*A*((t+1)*A-t)*.5:.5*((A-=2)*A*((t+1)*A+t)+2)}}),Bounce:Object.freeze({In:function(A){return 1-AA.Bounce.Out(1-A)},Out:function(A){return A<1/2.75?7.5625*A*A:A<2/2.75?7.5625*(A-=1.5/2.75)*A+.75:A<2.5/2.75?7.5625*(A-=2.25/2.75)*A+.9375:7.5625*(A-=2.625/2.75)*A+.984375},InOut:function(A){return A<.5?.5*AA.Bounce.In(2*A):.5*AA.Bounce.Out(2*A-1)+.5}}),generatePow:function(A){return void 0===A&&(A=4),A=(A=A<Number.EPSILON?Number.EPSILON:A)>1e4?1e4:A,{In:function(t){return Math.pow(t,A)},Out:function(t){return 1-Math.pow(1-t,A)},InOut:function(t){return t<.5?Math.pow(2*t,A)/2:(1-Math.pow(2-2*t,A))/2+.5}}}}),tA=function(){return performance.now()},eA=function(){function A(){for(var A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];this._tweens={},this._tweensAddedDuringUpdate={},this.add.apply(this,A)}return A.prototype.getAll=function(){var A=this;return Object.keys(this._tweens).map((function(t){return A._tweens[t]}))},A.prototype.removeAll=function(){this._tweens={}},A.prototype.add=function(){for(var A,t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,r=t;n<r.length;n++){var i=r[n];null===(A=i._group)||void 0===A||A.remove(i),i._group=this,this._tweens[i.getId()]=i,this._tweensAddedDuringUpdate[i.getId()]=i}},A.prototype.remove=function(){for(var A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];for(var e=0,n=A;e<n.length;e++){var r=n[e];r._group=void 0,delete this._tweens[r.getId()],delete this._tweensAddedDuringUpdate[r.getId()]}},A.prototype.allStopped=function(){return this.getAll().every((function(A){return!A.isPlaying()}))},A.prototype.update=function(A,t){void 0===A&&(A=tA()),void 0===t&&(t=!0);var e=Object.keys(this._tweens);if(0!==e.length)for(;e.length>0;){this._tweensAddedDuringUpdate={};for(var n=0;n<e.length;n++){var r=this._tweens[e[n]],i=!t;r&&!1===r.update(A,i)&&!t&&this.remove(r)}e=Object.keys(this._tweensAddedDuringUpdate)}},A}(),nA={Linear:function(A,t){var e=A.length-1,n=e*t,r=Math.floor(n),i=nA.Utils.Linear;return t<0?i(A[0],A[1],n):t>1?i(A[e],A[e-1],e-n):i(A[r],A[r+1>e?e:r+1],n-r)},Bezier:function(A,t){for(var e=0,n=A.length-1,r=Math.pow,i=nA.Utils.Bernstein,o=0;o<=n;o++)e+=r(1-t,n-o)*r(t,o)*A[o]*i(n,o);return e},CatmullRom:function(A,t){var e=A.length-1,n=e*t,r=Math.floor(n),i=nA.Utils.CatmullRom;return A[0]===A[e]?(t<0&&(r=Math.floor(n=e*(1+t))),i(A[(r-1+e)%e],A[r],A[(r+1)%e],A[(r+2)%e],n-r)):t<0?A[0]-(i(A[0],A[0],A[1],A[1],-n)-A[0]):t>1?A[e]-(i(A[e],A[e],A[e-1],A[e-1],n-e)-A[e]):i(A[r?r-1:0],A[r],A[e<r+1?e:r+1],A[e<r+2?e:r+2],n-r)},Utils:{Linear:function(A,t,e){return(t-A)*e+A},Bernstein:function(A,t){var e=nA.Utils.Factorial;return e(A)/e(t)/e(A-t)},Factorial:($=[1],function(A){var t=1;if($[A])return $[A];for(var e=A;e>1;e--)t*=e;return $[A]=t,t}),CatmullRom:function(A,t,e,n,r){var i=.5*(e-A),o=.5*(n-t),a=r*r;return(2*t-2*e+i+o)*(r*a)+(-3*t+3*e-2*i-o)*a+i*r+t}}},rA=function(){function A(){}return A.nextId=function(){return A._nextId++},A._nextId=0,A}(),iA=new eA,oA=function(){function A(A,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=AA.Linear.None,this._interpolationFunction=nA.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._id=rA.nextId(),this._isChainStopped=!1,this._propertiesAreSetUp=!1,this._goToEnd=!1,this._object=A,"object"==typeof t?(this._group=t,t.add(this)):!0===t&&(this._group=iA,iA.add(this))}return A.prototype.getId=function(){return this._id},A.prototype.isPlaying=function(){return this._isPlaying},A.prototype.isPaused=function(){return this._isPaused},A.prototype.getDuration=function(){return this._duration},A.prototype.to=function(A,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=A,this._propertiesAreSetUp=!1,this._duration=t<0?0:t,this},A.prototype.duration=function(A){return void 0===A&&(A=1e3),this._duration=A<0?0:A,this},A.prototype.dynamic=function(A){return void 0===A&&(A=!1),this._isDynamic=A,this},A.prototype.start=function(A,t){if(void 0===A&&(A=tA()),void 0===t&&(t=!1),this._isPlaying)return this;if(this._repeat=this._initialRepeat,this._reversed)for(var e in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(e),this._valuesStart[e]=this._valuesStartRepeat[e];if(this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._onEveryStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=A,this._startTime+=this._delayTime,!this._propertiesAreSetUp||t){if(this._propertiesAreSetUp=!0,!this._isDynamic){var n={};for(var r in this._valuesEnd)n[r]=this._valuesEnd[r];this._valuesEnd=n}this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat,t)}return this},A.prototype.startFromCurrentValues=function(A){return this.start(A,!0)},A.prototype._setupProperties=function(A,t,e,n,r){for(var i in e){var o=A[i],a=Array.isArray(o),l=a?"array":typeof o,u=!a&&Array.isArray(e[i]);if("undefined"!==l&&"function"!==l){if(u){if(0===(p=e[i]).length)continue;for(var s=[o],f=0,c=p.length;f<c;f+=1){var h=this._handleRelativeValue(o,p[f]);if(isNaN(h)){u=!1,console.warn("Found invalid interpolation list. Skipping.");break}s.push(h)}u&&(e[i]=s)}if("object"!==l&&!a||!o||u)(void 0===t[i]||r)&&(t[i]=o),a||(t[i]*=1),n[i]=u?e[i].slice().reverse():t[i]||0;else{t[i]=a?[]:{};var d=o;for(var m in d)t[i][m]=d[m];n[i]=a?[]:{};var p=e[i];if(!this._isDynamic){var g={};for(var m in p)g[m]=p[m];e[i]=p=g}this._setupProperties(d,t[i],p,n[i],r)}}}},A.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},A.prototype.end=function(){return this._goToEnd=!0,this.update(this._startTime+this._duration),this},A.prototype.pause=function(A){return void 0===A&&(A=tA()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=A),this},A.prototype.resume=function(A){return void 0===A&&(A=tA()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=A-this._pauseStart,this._pauseStart=0,this):this},A.prototype.stopChainedTweens=function(){for(var A=0,t=this._chainedTweens.length;A<t;A++)this._chainedTweens[A].stop();return this},A.prototype.group=function(A){return A?(A.add(this),this):(console.warn("tween.group() without args has been removed, use group.add(tween) instead."),this)},A.prototype.remove=function(){var A;return null===(A=this._group)||void 0===A||A.remove(this),this},A.prototype.delay=function(A){return void 0===A&&(A=0),this._delayTime=A,this},A.prototype.repeat=function(A){return void 0===A&&(A=0),this._initialRepeat=A,this._repeat=A,this},A.prototype.repeatDelay=function(A){return this._repeatDelayTime=A,this},A.prototype.yoyo=function(A){return void 0===A&&(A=!1),this._yoyo=A,this},A.prototype.easing=function(A){return void 0===A&&(A=AA.Linear.None),this._easingFunction=A,this},A.prototype.interpolation=function(A){return void 0===A&&(A=nA.Linear),this._interpolationFunction=A,this},A.prototype.chain=function(){for(var A=[],t=0;t<arguments.length;t++)A[t]=arguments[t];return this._chainedTweens=A,this},A.prototype.onStart=function(A){return this._onStartCallback=A,this},A.prototype.onEveryStart=function(A){return this._onEveryStartCallback=A,this},A.prototype.onUpdate=function(A){return this._onUpdateCallback=A,this},A.prototype.onRepeat=function(A){return this._onRepeatCallback=A,this},A.prototype.onComplete=function(A){return this._onCompleteCallback=A,this},A.prototype.onStop=function(A){return this._onStopCallback=A,this},A.prototype.update=function(t,e){var n,r,i=this;if(void 0===t&&(t=tA()),void 0===e&&(e=A.autoStartOnUpdate),this._isPaused)return!0;if(!this._goToEnd&&!this._isPlaying){if(!e)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 o=t-this._startTime,a=this._duration+(null!==(n=this._repeatDelayTime)&&void 0!==n?n:this._delayTime),l=this._duration+this._repeat*a,u=function(){if(0===i._duration)return 1;if(o>l)return 1;var A=Math.trunc(o/a),t=o-A*a,e=Math.min(t/i._duration,1);return 0===e&&o===i._duration?1:e}(),s=this._easingFunction(u);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,s),this._onUpdateCallback&&this._onUpdateCallback(this._object,u),0===this._duration||o>=this._duration){if(this._repeat>0){var f=Math.min(Math.trunc((o-this._duration)/a)+1,this._repeat);for(r in isFinite(this._repeat)&&(this._repeat-=f),this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[r]||(this._valuesStartRepeat[r]=this._valuesStartRepeat[r]+parseFloat(this._valuesEnd[r])),this._yoyo&&this._swapEndStartRepeatValues(r),this._valuesStart[r]=this._valuesStartRepeat[r];return this._yoyo&&(this._reversed=!this._reversed),this._startTime+=a*f,this._onRepeatCallback&&this._onRepeatCallback(this._object),this._onEveryStartCallbackFired=!1,!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var c=0,h=this._chainedTweens.length;c<h;c++)this._chainedTweens[c].start(this._startTime+this._duration,!1);return this._isPlaying=!1,!1}return!0},A.prototype._updateProperties=function(A,t,e,n){for(var r in e)if(void 0!==t[r]){var i=t[r]||0,o=e[r],a=Array.isArray(A[r]),l=Array.isArray(o);!a&&l?A[r]=this._interpolationFunction(o,n):"object"==typeof o&&o?this._updateProperties(A[r],i,o,n):"number"==typeof(o=this._handleRelativeValue(i,o))&&(A[r]=i+(o-i)*n)}},A.prototype._handleRelativeValue=function(A,t){return"string"!=typeof t?t:"+"===t.charAt(0)||"-"===t.charAt(0)?A+parseFloat(t):parseFloat(t)},A.prototype._swapEndStartRepeatValues=function(A){var t=this._valuesStartRepeat[A],e=this._valuesEnd[A];this._valuesStartRepeat[A]="string"==typeof e?this._valuesStartRepeat[A]+parseFloat(e):this._valuesEnd[A],this._valuesEnd[A]=t},A.autoStartOnUpdate=!1,A}(),aA=iA;aA.getAll.bind(aA),aA.removeAll.bind(aA),aA.add.bind(aA),aA.remove.bind(aA),aA.update.bind(aA);var lA=function(A){A instanceof Array?A.forEach(lA):(A.map&&A.map.dispose(),A.dispose())},uA=function(A){A.geometry&&A.geometry.dispose(),A.material&&lA(A.material),A.texture&&A.texture.dispose(),A.children&&A.children.forEach(uA)},sA=function(A){if(A&&A.children)for(;A.children.length;){var t=A.children[0];A.remove(t),uA(t)}};function fA(A,t){var e=new t;return{linkProp:function(t){return{default:e[t](),onChange:function(e,n){n[A][t](e)},triggerUpdate:!1}},linkMethod:function(t){return function(e){for(var n=e[A],r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var a=n[t].apply(n,i);return a===n?this:a}}}}var cA=100;function hA(){return cA}function dA(A,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=(90-A)*Math.PI/180,r=(90-t)*Math.PI/180,i=cA*(1+e);return{x:i*Math.sin(n)*Math.cos(r),y:i*Math.cos(n),z:i*Math.sin(n)*Math.sin(r)}}function mA(A){var t=A.x,e=A.y,n=A.z,r=Math.sqrt(t*t+e*e+n*n),i=Math.acos(e/r),o=Math.atan2(n,t);return{lat:90-180*i/Math.PI,lng:90-180*o/Math.PI-(o<-Math.PI/2?360:0),altitude:r/cA-1}}function pA(A){return A*Math.PI/180}function gA(A,t,e=2){const n=t&&t.length,r=n?t[0]*e:A.length;let i=vA(A,0,r,e,!0);const o=[];if(!i||i.next===i.prev)return o;let a,l,u;if(n&&(i=function(A,t,e,n){const r=[];for(let e=0,i=t.length;e<i;e++){const o=vA(A,t[e]*n,e<i-1?t[e+1]*n:A.length,n,!1);o===o.next&&(o.steiner=!0),r.push(SA(o))}r.sort(MA);for(let A=0;A<r.length;A++)e=EA(r[A],e);return e}(A,t,i,e)),A.length>80*e){a=1/0,l=1/0;let t=-1/0,n=-1/0;for(let i=e;i<r;i+=e){const e=A[i],r=A[i+1];e<a&&(a=e),r<l&&(l=r),e>t&&(t=e),r>n&&(n=r)}u=Math.max(t-a,n-l),u=0!==u?32767/u:0}return yA(i,o,e,a,l,u,0),o}function vA(A,t,e,n,r){let i;if(r===function(A,t,e,n){let r=0;for(let i=t,o=e-n;i<e;i+=n)r+=(A[o]-A[i])*(A[i+1]+A[o+1]),o=i;return r}(A,t,e,n)>0)for(let r=t;r<e;r+=n)i=LA(r/n|0,A[r],A[r+1],i);else for(let r=e-n;r>=t;r-=n)i=LA(r/n|0,A[r],A[r+1],i);return i&&OA(i,i.next)&&(GA(i),i=i.next),i}function bA(A,t){if(!A)return A;t||(t=A);let e,n=A;do{if(e=!1,n.steiner||!OA(n,n.next)&&0!==TA(n.prev,n,n.next))n=n.next;else{if(GA(n),n=t=n.prev,n===n.next)break;e=!0}}while(e||n!==t);return t}function yA(A,t,e,n,r,i,o){if(!A)return;!o&&i&&function(A,t,e,n){let r=A;do{0===r.z&&(r.z=kA(r.x,r.y,t,e,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==A);r.prevZ.nextZ=null,r.prevZ=null,function(A){let t,e=1;do{let n,r=A;A=null;let i=null;for(t=0;r;){t++;let o=r,a=0;for(let A=0;A<e&&(a++,o=o.nextZ,o);A++);let l=e;for(;a>0||l>0&&o;)0!==a&&(0===l||!o||r.z<=o.z)?(n=r,r=r.nextZ,a--):(n=o,o=o.nextZ,l--),i?i.nextZ=n:A=n,n.prevZ=i,i=n;r=o}i.nextZ=null,e*=2}while(t>1)}(r)}(A,n,r,i);let a=A;for(;A.prev!==A.next;){const l=A.prev,u=A.next;if(i?wA(A,n,r,i):qA(A))t.push(l.i,A.i,u.i),GA(A),A=u.next,a=u.next;else if((A=u)===a){o?1===o?yA(A=xA(bA(A),t),t,e,n,r,i,2):2===o&&_A(A,t,e,n,r,i):yA(bA(A),t,e,n,r,i,1);break}}}function qA(A){const t=A.prev,e=A,n=A.next;if(TA(t,e,n)>=0)return!1;const r=t.x,i=e.x,o=n.x,a=t.y,l=e.y,u=n.y,s=r<i?r<o?r:o:i<o?i:o,f=a<l?a<u?a:u:l<u?l:u,c=r>i?r>o?r:o:i>o?i:o,h=a>l?a>u?a:u:l>u?l:u;let d=n.next;for(;d!==t;){if(d.x>=s&&d.x<=c&&d.y>=f&&d.y<=h&&DA(r,a,i,l,o,u,d.x,d.y)&&TA(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function wA(A,t,e,n){const r=A.prev,i=A,o=A.next;if(TA(r,i,o)>=0)return!1;const a=r.x,l=i.x,u=o.x,s=r.y,f=i.y,c=o.y,h=a<l?a<u?a:u:l<u?l:u,d=s<f?s<c?s:c:f<c?f:c,m=a>l?a>u?a:u:l>u?l:u,p=s>f?s>c?s:c:f>c?f:c,g=kA(h,d,t,e,n),v=kA(m,p,t,e,n);let b=A.prevZ,y=A.nextZ;for(;b&&b.z>=g&&y&&y.z<=v;){if(b.x>=h&&b.x<=m&&b.y>=d&&b.y<=p&&b!==r&&b!==o&&DA(a,s,l,f,u,c,b.x,b.y)&&TA(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,y.x>=h&&y.x<=m&&y.y>=d&&y.y<=p&&y!==r&&y!==o&&DA(a,s,l,f,u,c,y.x,y.y)&&TA(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;b&&b.z>=g;){if(b.x>=h&&b.x<=m&&b.y>=d&&b.y<=p&&b!==r&&b!==o&&DA(a,s,l,f,u,c,b.x,b.y)&&TA(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=h&&y.x<=m&&y.y>=d&&y.y<=p&&y!==r&&y!==o&&DA(a,s,l,f,u,c,y.x,y.y)&&TA(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function xA(A,t){let e=A;do{const n=e.prev,r=e.next.next;!OA(n,r)&&PA(n,e,e.next,r)&&QA(n,r)&&QA(r,n)&&(t.push(n.i,e.i,r.i),GA(e),GA(e.next),e=A=r),e=e.next}while(e!==A);return bA(e)}function _A(A,t,e,n,r,i){let o=A;do{let A=o.next.next;for(;A!==o.prev;){if(o.i!==A.i&&CA(o,A)){let a=jA(o,A);return o=bA(o,o.next),a=bA(a,a.next),yA(o,t,e,n,r,i,0),void yA(a,t,e,n,r,i,0)}A=A.next}o=o.next}while(o!==A)}function MA(A,t){return A.x-t.x}function EA(A,t){const e=function(A,t){let e=t;const n=A.x,r=A.y;let i,o=-1/0;do{if(r<=e.y&&r>=e.next.y&&e.next.y!==e.y){const A=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(A<=n&&A>o&&(o=A,i=e.x<e.next.x?e:e.next,A===n))return i}e=e.next}while(e!==t);if(!i)return null;const a=i,l=i.x,u=i.y;let s=1/0;e=i;do{if(n>=e.x&&e.x>=l&&n!==e.x&&DA(r<u?n:o,r,l,u,r<u?o:n,r,e.x,e.y)){const t=Math.abs(r-e.y)/(n-e.x);QA(e,A)&&(t<s||t===s&&(e.x>i.x||e.x===i.x&&BA(i,e)))&&(i=e,s=t)}e=e.next}while(e!==a);return i}(A,t);if(!e)return t;const n=jA(e,A);return bA(n,n.next),bA(e,e.next)}function BA(A,t){return TA(A.prev,A,t.prev)<0&&TA(t.next,A,A.next)<0}function kA(A,t,e,n,r){return(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A=(A-e)*r|0)|A<<8))|A<<4))|A<<2))|A<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function SA(A){let t=A,e=A;do{(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next}while(t!==A);return e}function DA(A,t,e,n,r,i,o,a){return(r-o)*(t-a)>=(A-o)*(i-a)&&(A-o)*(n-a)>=(e-o)*(t-a)&&(e-o)*(i-a)>=(r-o)*(n-a)}function CA(A,t){return A.next.i!==t.i&&A.prev.i!==t.i&&!function(A,t){let e=A;do{if(e.i!==A.i&&e.next.i!==A.i&&e.i!==t.i&&e.next.i!==t.i&&PA(e,e.next,A,t))return!0;e=e.next}while(e!==A);return!1}(A,t)&&(QA(A,t)&&QA(t,A)&&function(A,t){let e=A,n=!1;const r=(A.x+t.x)/2,i=(A.y+t.y)/2;do{e.y>i!=e.next.y>i&&e.next.y!==e.y&&r<(e.next.x-e.x)*(i-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next}while(e!==A);return n}(A,t)&&(TA(A.prev,A,t.prev)||TA(A,t.prev,t))||OA(A,t)&&TA(A.prev,A,A.next)>0&&TA(t.prev,t,t.next)>0)}function TA(A,t,e){return(t.y-A.y)*(e.x-t.x)-(t.x-A.x)*(e.y-t.y)}function OA(A,t){return A.x===t.x&&A.y===t.y}function PA(A,t,e,n){const r=RA(TA(A,t,e)),i=RA(TA(A,t,n)),o=RA(TA(e,n,A)),a=RA(TA(e,n,t));return r!==i&&o!==a||(!(0!==r||!IA(A,e,t))||(!(0!==i||!IA(A,n,t))||(!(0!==o||!IA(e,A,n))||!(0!==a||!IA(e,t,n)))))}function IA(A,t,e){return t.x<=Math.max(A.x,e.x)&&t.x>=Math.min(A.x,e.x)&&t.y<=Math.max(A.y,e.y)&&t.y>=Math.min(A.y,e.y)}function RA(A){return A>0?1:A<0?-1:0}function QA(A,t){return TA(A.prev,A,A.next)<0?TA(A,t,A.next)>=0&&TA(A,A.prev,t)>=0:TA(A,t,A.prev)<0||TA(A,A.next,t)<0}function jA(A,t){const e=FA(A.i,A.x,A.y),n=FA(t.i,t.x,t.y),r=A.next,i=t.prev;return A.next=t,t.prev=A,e.next=r,r.prev=e,n.next=e,e.prev=n,i.next=n,n.prev=i,n}function LA(A,t,e,n){const r=FA(A,t,e);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function GA(A){A.next.prev=A.prev,A.prev.next=A.next,A.prevZ&&(A.prevZ.nextZ=A.nextZ),A.nextZ&&(A.nextZ.prevZ=A.prevZ)}function FA(A,t,e){return{i:A,x:t,y:e,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function UA(A){const t=[],e=[],n=A[0][0].length;let r=0,i=0;for(const o of A){for(const A of o)for(let e=0;e<n;e++)t.push(A[e]);i&&(r+=i,e.push(r)),i=o.length}return{vertices:t,holes:e,dimensions:n}}function zA(A,t){return null==A||null==t?NaN:A<t?-1:A>t?1:A>=t?0:NaN}function NA(A,t){return null==A||null==t?NaN:t<A?-1:t>A?1:t>=A?0:NaN}function HA(A){let t,e,n;function r(A,n,r=0,i=A.length){if(r<i){if(0!==t(n,n))return i;do{const t=r+i>>>1;e(A[t],n)<0?r=t+1:i=t}while(r<i)}return r}return 2!==A.length?(t=zA,e=(t,e)=>zA(A(t),e),n=(t,e)=>A(t)-e):(t=A===zA||A===NA?A:VA,e=A,n=A),{left:r,center:function(A,t,e=0,i=A.length){const o=r(A,t,e,i-1);return o>e&&n(A[o-1],t)>-n(A[o],t)?o-1:o},right:function(A,n,r=0,i=A.length){if(r<i){if(0!==t(n,n))return i;do{const t=r+i>>>1;e(A[t],n)<=0?r=t+1:i=t}while(r<i)}return r}}}function VA(){return 0}const YA=HA(zA).right;function WA(A,t){let e,n;if(void 0===t)for(const t of A)null!=t&&(void 0===e?t>=t&&(e=n=t):(e>t&&(e=t),n<t&&(n=t)));else{let r=-1;for(let i of A)null!=(i=t(i,++r,A))&&(void 0===e?i>=i&&(e=n=i):(e>i&&(e=i),n<i&&(n=i)))}return[e,n]}HA((function(A){return null===A?NaN:+A})).center;class ZA{constructor(){this._partials=new Float64Array(32),this._n=0}add(A){const t=this._partials;let e=0;for(let n=0;n<this._n&&n<32;n++){const r=t[n],i=A+r,o=Math.abs(A)<Math.abs(r)?A-(i-r):r-(i-A);o&&(t[e++]=o),A=i}return t[e]=A,this._n=e+1,this}valueOf(){const A=this._partials;let t,e,n,r=this._n,i=0;if(r>0){for(i=A[--r];r>0&&(t=i,e=A[--r],i=t+e,n=e-(i-t),!n););r>0&&(n<0&&A[r-1]<0||n>0&&A[r-1]>0)&&(e=2*n,t=i+e,e==t-i&&(i=t))}return i}}const XA=Math.sqrt(50),JA=Math.sqrt(10),KA=Math.sqrt(2);function $A(A,t,e){const n=(t-A)/Math.max(0,e),r=Math.floor(Math.log10(n)),i=n/Math.pow(10,r),o=i>=XA?10:i>=JA?5:i>=KA?2:1;let a,l,u;return r<0?(u=Math.pow(10,-r)/o,a=Math.round(A*u),l=Math.round(t*u),a/u<A&&++a,l/u>t&&--l,u=-u):(u=Math.pow(10,r)*o,a=Math.round(A/u),l=Math.round(t/u),a*u<A&&++a,l*u>t&&--l),l<a&&.5<=e&&e<2?$A(A,t,2*e):[a,l,u]}function At(A,t,e){return $A(A=+A,t=+t,e=+e)[2]}function tt(A){return Array.from(function*(A){for(const t of A)yield*t}(A))}function et(A,t,e){A=+A,t=+t,e=(r=arguments.length)<2?(t=A,A=0,1):r<3?1:+e;for(var n=-1,r=0|Math.max(0,Math.ceil((t-A)/e)),i=new Array(r);++n<r;)i[n]=A+n*e;return i}var nt=1e-6,rt=1e-12,it=Math.PI,ot=it/2,at=it/4,lt=2*it,ut=180/it,st=it/180,ft=Math.abs,ct=Math.atan,ht=Math.atan2,dt=Math.cos,mt=Math.ceil,pt=Math.hypot,gt=Math.sin,vt=Math.sign||function(A){return A>0?1:A<0?-1:0},bt=Math.sqrt;function yt(A){return A>1?ot:A<-1?-ot:Math.asin(A)}function qt(A){return(A=gt(A/2))*A}function wt(){}function xt(A,t){A&&Mt.hasOwnProperty(A.type)&&Mt[A.type](A,t)}var _t={Feature:function(A,t){xt(A.geometry,t)},FeatureCollection:function(A,t){for(var e=A.features,n=-1,r=e.length;++n<r;)xt(e[n].geometry,t)}},Mt={Sphere:function(A,t){t.sphere()},Point:function(A,t){A=A.coordinates,t.point(A[0],A[1],A[2])},MultiPoint:function(A,t){for(var e=A.coordinates,n=-1,r=e.length;++n<r;)A=e[n],t.point(A[0],A[1],A[2])},LineString:function(A,t){Et(A.coordinates,t,0)},MultiLineString:function(A,t){for(var e=A.coordinates,n=-1,r=e.length;++n<r;)Et(e[n],t,0)},Polygon:function(A,t){Bt(A.coordinates,t)},MultiPolygon:function(A,t){for(var e=A.coordinates,n=-1,r=e.length;++n<r;)Bt(e[n],t)},GeometryCollection:function(A,t){for(var e=A.geometries,n=-1,r=e.length;++n<r;)xt(e[n],t)}};function Et(A,t,e){var n,r=-1,i=A.length-e;for(t.lineStart();++r<i;)n=A[r],t.point(n[0],n[1],n[2]);t.lineEnd()}function Bt(A,t){var e=-1,n=A.length;for(t.polygonStart();++e<n;)Et(A[e],t,1);t.polygonEnd()}function kt(A,t){A&&_t.hasOwnProperty(A.type)?_t[A.type](A,t):xt(A,t)}var St,Dt,Ct,Tt,Ot,Pt,It,Rt,Qt,jt,Lt,Gt,Ft,Ut,zt,Nt,Ht=new ZA,Vt=new ZA,Yt={point:wt,lineStart:wt,lineEnd:wt,polygonStart:function(){Ht=new ZA,Yt.lineStart=Wt,Yt.lineEnd=Zt},polygonEnd:function(){var A=+Ht;Vt.add(A<0?lt+A:A),this.lineStart=this.lineEnd=this.point=wt},sphere:function(){Vt.add(lt)}};function Wt(){Yt.point=Xt}function Zt(){Jt(St,Dt)}function Xt(A,t){Yt.point=Jt,St=A,Dt=t,Ct=A*=st,Tt=dt(t=(t*=st)/2+at),Ot=gt(t)}function Jt(A,t){var e=(A*=st)-Ct,n=e>=0?1:-1,r=n*e,i=dt(t=(t*=st)/2+at),o=gt(t),a=Ot*o,l=Tt*i+a*dt(r),u=a*n*gt(r);Ht.add(ht(u,l)),Ct=A,Tt=i,Ot=o}function Kt(A){return[ht(A[1],A[0]),yt(A[2])]}function $t(A){var t=A[0],e=A[1],n=dt(e);return[n*dt(t),n*gt(t),gt(e)]}function Ae(A,t){return A[0]*t[0]+A[1]*t[1]+A[2]*t[2]}function te(A,t){return[A[1]*t[2]-A[2]*t[1],A[2]*t[0]-A[0]*t[2],A[0]*t[1]-A[1]*t[0]]}function ee(A,t){A[0]+=t[0],A[1]+=t[1],A[2]+=t[2]}function ne(A,t){return[A[0]*t,A[1]*t,A[2]*t]}function re(A){var t=bt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2]);A[0]/=t,A[1]/=t,A[2]/=t}var ie,oe,ae,le,ue,se,fe,ce,he,de,me,pe,ge,ve,be,ye,qe={point:we,lineStart:_e,lineEnd:Me,polygonStart:function(){qe.point=Ee,qe.lineStart=Be,qe.lineEnd=ke,Ut=new ZA,Yt.polygonStart()},polygonEnd:function(){Yt.polygonEnd(),qe.point=we,qe.lineStart=_e,qe.lineEnd=Me,Ht<0?(Pt=-(Rt=180),It=-(Qt=90)):Ut>nt?Qt=90:Ut<-1e-6&&(It=-90),Nt[0]=Pt,Nt[1]=Rt},sphere:function(){Pt=-(Rt=180),It=-(Qt=90)}};function we(A,t){zt.push(Nt=[Pt=A,Rt=A]),t<It&&(It=t),t>Qt&&(Qt=t)}function xe(A,t){var e=$t([A*st,t*st]);if(Ft){var n=te(Ft,e),r=te([n[1],-n[0],0],n);re(r),r=Kt(r);var i,o=A-jt,a=o>0?1:-1,l=r[0]*ut*a,u=ft(o)>180;u^(a*jt<l&&l<a*A)?(i=r[1]*ut)>Qt&&(Qt=i):u^(a*jt<(l=(l+360)%360-180)&&l<a*A)?(i=-r[1]*ut)<It&&(It=i):(t<It&&(It=t),t>Qt&&(Qt=t)),u?A<jt?Se(Pt,A)>Se(Pt,Rt)&&(Rt=A):Se(A,Rt)>Se(Pt,Rt)&&(Pt=A):Rt>=Pt?(A<Pt&&(Pt=A),A>Rt&&(Rt=A)):A>jt?Se(Pt,A)>Se(Pt,Rt)&&(Rt=A):Se(A,Rt)>Se(Pt,Rt)&&(Pt=A)}else zt.push(Nt=[Pt=A,Rt=A]);t<It&&(It=t),t>Qt&&(Qt=t),Ft=e,jt=A}function _e(){qe.point=xe}function Me(){Nt[0]=Pt,Nt[1]=Rt,qe.point=we,Ft=null}function Ee(A,t){if(Ft){var e=A-jt;Ut.add(ft(e)>180?e+(e>0?360:-360):e)}else Lt=A,Gt=t;Yt.point(A,t),xe(A,t)}function Be(){Yt.lineStart()}function ke(){Ee(Lt,Gt),Yt.lineEnd(),ft(Ut)>nt&&(Pt=-(Rt=180)),Nt[0]=Pt,Nt[1]=Rt,Ft=null}function Se(A,t){return(t-=A)<0?t+360:t}function De(A,t){return A[0]-t[0]}function Ce(A,t){return A[0]<=A[1]?A[0]<=t&&t<=A[1]:t<A[0]||A[1]<t}function Te(A){var t,e,n,r,i,o,a;if(Qt=Rt=-(Pt=It=1/0),zt=[],kt(A,qe),e=zt.length){for(zt.sort(De),t=1,i=[n=zt[0]];t<e;++t)Ce(n,(r=zt[t])[0])||Ce(n,r[1])?(Se(n[0],r[1])>Se(n[0],n[1])&&(n[1]=r[1]),Se(r[0],n[1])>Se(n[0],n[1])&&(n[0]=r[0])):i.push(n=r);for(o=-1/0,t=0,n=i[e=i.length-1];t<=e;n=r,++t)r=i[t],(a=Se(n[1],r[0]))>o&&(o=a,Pt=r[0],Rt=n[1])}return zt=Nt=null,Pt===1/0||It===1/0?[[NaN,NaN],[NaN,NaN]]:[[Pt,It],[Rt,Qt]]}var Oe={sphere:wt,point:Pe,lineStart:Re,lineEnd:Le,polygonStart:function(){Oe.lineStart=Ge,Oe.lineEnd=Fe},polygonEnd:function(){Oe.lineStart=Re,Oe.lineEnd=Le}};function Pe(A,t){A*=st;var e=dt(t*=st);Ie(e*dt(A),e*gt(A),gt(t))}function Ie(A,t,e){++ie,ae+=(A-ae)/ie,le+=(t-le)/ie,ue+=(e-ue)/ie}function Re(){Oe.point=Qe}function Qe(A,t){A*=st;var e=dt(t*=st);ve=e*dt(A),be=e*gt(A),ye=gt(t),Oe.point=je,Ie(ve,be,ye)}function je(A,t){A*=st;var e=dt(t*=st),n=e*dt(A),r=e*gt(A),i=gt(t),o=ht(bt((o=be*i-ye*r)*o+(o=ye*n-ve*i)*o+(o=ve*r-be*n)*o),ve*n+be*r+ye*i);oe+=o,se+=o*(ve+(ve=n)),fe+=o*(be+(be=r)),ce+=o*(ye+(ye=i)),Ie(ve,be,ye)}function Le(){Oe.point=Pe}function Ge(){Oe.point=Ue}function Fe(){ze(pe,ge),Oe.point=Pe}function Ue(A,t){pe=A,ge=t,A*=st,t*=st,Oe.point=ze;var e=dt(t);ve=e*dt(A),be=e*gt(A),ye=gt(t),Ie(ve,be,ye)}function ze(A,t){A*=st;var e=dt(t*=st),n=e*dt(A),r=e*gt(A),i=gt(t),o=be*i-ye*r,a=ye*n-ve*i,l=ve*r-be*n,u=pt(o,a,l),s=yt(u),f=u&&-s/u;he.add(f*o),de.add(f*a),me.add(f*l),oe+=s,se+=s*(ve+(ve=n)),fe+=s*(be+(be=r)),ce+=s*(ye+(ye=i)),Ie(ve,be,ye)}function Ne(A){ie=oe=ae=le=ue=se=fe=ce=0,he=new ZA,de=new ZA,me=new ZA,kt(A,Oe);var t=+he,e=+de,n=+me,r=pt(t,e,n);return r<rt&&(t=se,e=fe,n=ce,oe<nt&&(t=ae,e=le,n=ue),(r=pt(t,e,n))<rt)?[NaN,NaN]:[ht(e,t)*ut,yt(n/r)*ut]}function He(A,t){function e(e,n){return e=A(e,n),t(e[0],e[1])}return A.invert&&t.invert&&(e.invert=function(e,n){return(e=t.invert(e,n))&&A.invert(e[0],e[1])}),e}function Ve(A,t){return ft(A)>it&&(A-=Math.round(A/lt)*lt),[A,t]}function Ye(A,t,e){return(A%=lt)?t||e?He(Ze(A),Xe(t,e)):Ze(A):t||e?Xe(t,e):Ve}function We(A){return function(t,e){return ft(t+=A)>it&&(t-=Math.round(t/lt)*lt),[t,e]}}function Ze(A){var t=We(A);return t.invert=We(-A),t}function Xe(A,t){var e=dt(A),n=gt(A),r=dt(t),i=gt(t);function o(A,t){var o=dt(t),a=dt(A)*o,l=gt(A)*o,u=gt(t),s=u*e+a*n;return[ht(l*r-s*i,a*e-u*n),yt(s*r+l*i)]}return o.invert=function(A,t){var o=dt(t),a=dt(A)*o,l=gt(A)*o,u=gt(t),s=u*r-l*i;return[ht(l*r+u*i,a*e+s*n),yt(s*e-a*n)]},o}function Je(A,t){(t=$t(t))[0]-=A,re(t);var e,n=(e=-t[1])>1?0:e<-1?it:Math.acos(e);return((-t[2]<0?-n:n)+lt-nt)%lt}function Ke(){var A,t=[];return{point:function(t,e,n){A.push([t,e,n])},lineStart:function(){t.push(A=[])},lineEnd:wt,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],A=null,e}}}function $e(A,t){return ft(A[0]-t[0])<nt&&ft(A[1]-t[1])<nt}function An(A,t,e,n){this.x=A,this.z=t,this.o=e,this.e=n,this.v=!1,this.n=this.p=null}function tn(A,t,e,n,r){var i,o,a=[],l=[];if(A.forEach((function(A){if(!((t=A.length-1)<=0)){var t,e,n=A[0],o=A[t];if($e(n,o)){if(!n[2]&&!o[2]){for(r.lineStart(),i=0;i<t;++i)r.point((n=A[i])[0],n[1]);return void r.lineEnd()}o[0]+=2e-6}a.push(e=new An(n,A,null,!0)),l.push(e.o=new An(n,null,e,!1)),a.push(e=new An(o,A,null,!1)),l.push(e.o=new An(o,null,e,!0))}})),a.length){for(l.sort(t),en(a),en(l),i=0,o=l.length;i<o;++i)l[i].e=e=!e;for(var u,s,f=a[0];;){for(var c=f,h=!0;c.v;)if((c=c.n)===f)return;u=c.z,r.lineStart();do{if(c.v=c.o.v=!0,c.e){if(h)for(i=0,o=u.length;i<o;++i)r.point((s=u[i])[0],s[1]);else n(c.x,c.n.x,1,r);c=c.n}else{if(h)for(u=c.p.z,i=u.length-1;i>=0;--i)r.point((s=u[i])[0],s[1]);else n(c.x,c.p.x,-1,r);c=c.p}u=(c=c.o).z,h=!h}while(!c.v);r.lineEnd()}}}function en(A){if(t=A.length){for(var t,e,n=0,r=A[0];++n<t;)r.n=e=A[n],e.p=r,r=e;r.n=e=A[0],e.p=r}}function nn(A){return ft(A[0])<=it?A[0]:vt(A[0])*((ft(A[0])+it)%lt-it)}function rn(A,t){var e=nn(t),n=t[1],r=gt(n),i=[gt(e),-dt(e),0],o=0,a=0,l=new ZA;1===r?n=ot+nt:-1===r&&(n=-ot-nt);for(var u=0,s=A.length;u<s;++u)if(c=(f=A[u]).length)for(var f,c,h=f[c-1],d=nn(h),m=h[1]/2+at,p=gt(m),g=dt(m),v=0;v<c;++v,d=y,p=w,g=x,h=b){var b=f[v],y=nn(b),q=b[1]/2+at,w=gt(q),x=dt(q),_=y-d,M=_>=0?1:-1,E=M*_,B=E>it,k=p*w;if(l.add(ht(k*M*gt(E),g*x+k*dt(E))),o+=B?_+M*lt:_,B^d>=e^y>=e){var S=te($t(h),$t(b));re(S);var D=te(i,S);re(D);var C=(B^_>=0?-1:1)*yt(D[2]);(n>C||n===C&&(S[0]||S[1]))&&(a+=B^_>=0?1:-1)}}return(o<-1e-6||o<nt&&l<-1e-12)^1&a}function on(A,t,e,n){return function(r){var i,o,a,l=t(r),u=Ke(),s=t(u),f=!1,c={point:h,lineStart:m,lineEnd:p,polygonStart:function(){c.point=g,c.lineStart=v,c.lineEnd=b,o=[],i=[]},polygonEnd:function(){c.point=h,c.lineStart=m,c.lineEnd=p,o=tt(o);var A=rn(i,n);o.length?(f||(r.polygonStart(),f=!0),tn(o,ln,A,e,r)):A&&(f||(r.polygonStart(),f=!0),r.lineStart(),e(null,null,1,r),r.lineEnd()),f&&(r.polygonEnd(),f=!1),o=i=null},sphere:function(){r.polygonStart(),r.lineStart(),e(null,null,1,r),r.lineEnd(),r.polygonEnd()}};function h(t,e){A(t,e)&&r.point(t,e)}function d(A,t){l.point(A,t)}function m(){c.point=d,l.lineStart()}function p(){c.point=h,l.lineEnd()}function g(A,t){a.push([A,t]),s.point(A,t)}function v(){s.lineStart(),a=[]}function b(){g(a[0][0],a[0][1]),s.lineEnd();var A,t,e,n,l=s.clean(),c=u.result(),h=c.length;if(a.pop(),i.push(a),a=null,h)if(1&l){if((t=(e=c[0]).length-1)>0){for(f||(r.polygonStart(),f=!0),r.lineStart(),A=0;A<t;++A)r.point((n=e[A])[0],n[1]);r.lineEnd()}}else h>1&&2&l&&c.push(c.pop().concat(c.shift())),o.push(c.filter(an))}return c}}function an(A){return A.length>1}function ln(A,t){return((A=A.x)[0]<0?A[1]-ot-nt:ot-A[1])-((t=t.x)[0]<0?t[1]-ot-nt:ot-t[1])}Ve.invert=Ve;var un=on((function(){return!0}),(function(A){var t,e=NaN,n=NaN,r=NaN;return{lineStart:function(){A.lineStart(),t=1},point:function(i,o){var a=i>0?it:-it,l=ft(i-e);ft(l-it)<nt?(A.point(e,n=(n+o)/2>0?ot:-ot),A.point(r,n),A.lineEnd(),A.lineStart(),A.point(a,n),A.point(i,n),t=0):r!==a&&l>=it&&(ft(e-r)<nt&&(e-=r*nt),ft(i-a)<nt&&(i-=a*nt),n=function(A,t,e,n){var r,i,o=gt(A-e);return ft(o)>nt?ct((gt(t)*(i=dt(n))*gt(e)-gt(n)*(r=dt(t))*gt(A))/(r*i*o)):(t+n)/2}(e,n,i,o),A.point(r,n),A.lineEnd(),A.lineStart(),A.point(a,n),t=0),A.point(e=i,n=o),r=a},lineEnd:function(){A.lineEnd(),e=n=NaN},clean:function(){return 2-t}}}),(function(A,t,e,n){var r;if(null==A)r=e*ot,n.point(-it,r),n.point(0,r),n.point(it,r),n.point(it,0),n.point(it,-r),n.point(0,-r),n.point(-it,-r),n.point(-it,0),n.point(-it,r);else if(ft(A[0]-t[0])>nt){var i=A[0]<t[0]?it:-it;r=e*i/2,n.point(-i,r),n.point(0,r),n.point(i,r)}else n.point(t[0],t[1])}),[-it,-ot]);function sn(A){var t=dt(A),e=2*st,n=t>0,r=ft(t)>nt;function i(A,e){return dt(A)*dt(e)>t}function o(A,e,n){var r=[1,0,0],i=te($t(A),$t(e)),o=Ae(i,i),a=i[0],l=o-a*a;if(!l)return!n&&A;var u=t*o/l,s=-t*a/l,f=te(r,i),c=ne(r,u);ee(c,ne(i,s));var h=f,d=Ae(c,h),m=Ae(h,h),p=d*d-m*(Ae(c,c)-1);if(!(p<0)){var g=bt(p),v=ne(h,(-d-g)/m);if(ee(v,c),v=Kt(v),!n)return v;var b,y=A[0],q=e[0],w=A[1],x=e[1];q<y&&(b=y,y=q,q=b);var _=q-y,M=ft(_-it)<nt;if(!M&&x<w&&(b=w,w=x,x=b),M||_<nt?M?w+x>0^v[1]<(ft(v[0]-y)<nt?w:x):w<=v[1]&&v[1]<=x:_>it^(y<=v[0]&&v[0]<=q)){var E=ne(h,(-d+g)/m);return ee(E,c),[v,Kt(E)]}}}function a(t,e){var r=n?A:it-A,i=0;return t<-r?i|=1:t>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}return on(i,(function(A){var t,e,l,u,s;return{lineStart:function(){u=l=!1,s=1},point:function(f,c){var h,d=[f,c],m=i(f,c),p=n?m?0:a(f,c):m?a(f+(f<0?it:-it),c):0;if(!t&&(u=l=m)&&A.lineStart(),m!==l&&(!(h=o(t,d))||$e(t,h)||$e(d,h))&&(d[2]=1),m!==l)s=0,m?(A.lineStart(),h=o(d,t),A.point(h[0],h[1])):(h=o(t,d),A.point(h[0],h[1],2),A.lineEnd()),t=h;else if(r&&t&&n^m){var g;p&e||!(g=o(d,t,!0))||(s=0,n?(A.lineStart(),A.point(g[0][0],g[0][1]),A.point(g[1][0],g[1][1]),A.lineEnd()):(A.point(g[1][0],g[1][1]),A.lineEnd(),A.lineStart(),A.point(g[0][0],g[0][1],3)))}!m||t&&$e(t,d)||A.point(d[0],d[1]),t=d,l=m,e=p},lineEnd:function(){l&&A.lineEnd(),t=null},clean:function(){return s|(u&&l)<<1}}}),(function(t,n,r,i){!function(A,t,e,n,r,i){if(e){var o=dt(t),a=gt(t),l=n*e;null==r?(r=t+n*lt,i=t-l/2):(r=Je(o,r),i=Je(o,i),(n>0?r<i:r>i)&&(r+=n*lt));for(var u,s=r;n>0?s>i:s<i;s-=l)u=Kt([o,-a*dt(s),-a*gt(s)]),A.point(u[0],u[1])}}(i,A,e,r,t,n)}),n?[0,-A]:[-it,A-it])}var fn,cn,hn,dn,mn=1e9,pn=-mn;function gn(A,t,e,n){function r(r,i){return A<=r&&r<=e&&t<=i&&i<=n}function i(r,i,a,u){var s=0,f=0;if(null==r||(s=o(r,a))!==(f=o(i,a))||l(r,i)<0^a>0)do{u.point(0===s||3===s?A:e,s>1?n:t)}while((s=(s+a+4)%4)!==f);else u.point(i[0],i[1])}function o(n,r){return ft(n[0]-A)<nt?r>0?0:3:ft(n[0]-e)<nt?r>0?2:1:ft(n[1]-t)<nt?r>0?1:0:r>0?3:2}function a(A,t){return l(A.x,t.x)}function l(A,t){var e=o(A,1),n=o(t,1);return e!==n?e-n:0===e?t[1]-A[1]:1===e?A[0]-t[0]:2===e?A[1]-t[1]:t[0]-A[0]}return function(o){var l,u,s,f,c,h,d,m,p,g,v,b=o,y=Ke(),q={point:w,lineStart:function(){q.point=x,u&&u.push(s=[]);g=!0,p=!1,d=m=NaN},lineEnd:function(){l&&(x(f,c),h&&p&&y.rejoin(),l.push(y.result()));q.point=w,p&&b.lineEnd()},polygonStart:function(){b=y,l=[],u=[],v=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,r=u.length;e<r;++e)for(var i,o,a=u[e],l=1,s=a.length,f=a[0],c=f[0],h=f[1];l<s;++l)i=c,o=h,c=(f=a[l])[0],h=f[1],o<=n?h>n&&(c-i)*(n-o)>(h-o)*(A-i)&&++t:h<=n&&(c-i)*(n-o)<(h-o)*(A-i)&&--t;return t}(),e=v&&t,r=(l=tt(l)).length;(e||r)&&(o.polygonStart(),e&&(o.lineStart(),i(null,null,1,o),o.lineEnd()),r&&tn(l,a,t,i,o),o.polygonEnd());b=o,l=u=s=null}};function w(A,t){r(A,t)&&b.point(A,t)}function x(i,o){var a=r(i,o);if(u&&s.push([i,o]),g)f=i,c=o,h=a,g=!1,a&&(b.lineStart(),b.point(i,o));else if(a&&p)b.point(i,o);else{var l=[d=Math.max(pn,Math.min(mn,d)),m=Math.max(pn,Math.min(mn,m))],y=[i=Math.max(pn,Math.min(mn,i)),o=Math.max(pn,Math.min(mn,o))];!function(A,t,e,n,r,i){var o,a=A[0],l=A[1],u=0,s=1,f=t[0]-a,c=t[1]-l;if(o=e-a,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<s&&(s=o)}else if(f>0){if(o>s)return;o>u&&(u=o)}if(o=r-a,f||!(o<0)){if(o/=f,f<0){if(o>s)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<s&&(s=o)}if(o=n-l,c||!(o>0)){if(o/=c,c<0){if(o<u)return;o<s&&(s=o)}else if(c>0){if(o>s)return;o>u&&(u=o)}if(o=i-l,c||!(o<0)){if(o/=c,c<0){if(o>s)return;o>u&&(u=o)}else if(c>0){if(o<u)return;o<s&&(s=o)}return u>0&&(A[0]=a+u*f,A[1]=l+u*c),s<1&&(t[0]=a+s*f,t[1]=l+s*c),!0}}}}}(l,y,A,t,e,n)?a&&(b.lineStart(),b.point(i,o),v=!1):(p||(b.lineStart(),b.point(l[0],l[1])),b.point(y[0],y[1]),a||b.lineEnd(),v=!1)}d=i,m=o,p=a}return q}}var vn={sphere:wt,point:wt,lineStart:function(){vn.point=yn,vn.lineEnd=bn},lineEnd:wt,polygonStart:wt,polygonEnd:wt};function bn(){vn.point=vn.lineEnd=wt}function yn(A,t){cn=A*=st,hn=gt(t*=st),dn=dt(t),vn.point=qn}function qn(A,t){A*=st;var e=gt(t*=st),n=dt(t),r=ft(A-cn),i=dt(r),o=n*gt(r),a=dn*e-hn*n*i,l=hn*e+dn*n*i;fn.add(ht(bt(o*o+a*a),l)),cn=A,hn=e,dn=n}var wn=[null,null],xn={type:"LineString",coordinates:wn};function _n(A,t){return wn[0]=A,wn[1]=t,function(A){return fn=new ZA,kt(A,vn),+fn}(xn)}var Mn={Feature:function(A,t){return Bn(A.geometry,t)},FeatureCollection:function(A,t){for(var e=A.features,n=-1,r=e.length;++n<r;)if(Bn(e[n].geometry,t))return!0;return!1}},En={Sphere:function(){return!0},Point:function(A,t){return kn(A.coordinates,t)},MultiPoint:function(A,t){for(var e=A.coordinates,n=-1,r=e.length;++n<r;)if(kn(e[n],t))return!0;return!1},LineString:function(A,t){return Sn(A.coordinates,t)},MultiLineString:function(A,t){for(var e=A.coordinates,n=-1,r=e.length;++n<r;)if(Sn(e[n],t))return!0;return!1},Polygon:function(A,t){return Dn(A.coordinates,t)},MultiPolygon:function(A,t){for(var e=A.coordinates,n=-1,r=e.length;++n<r;)if(Dn(e[n],t))return!0;return!1},GeometryCollection:function(A,t){for(var e=A.geometries,n=-1,r=e.length;++n<r;)if(Bn(e[n],t))return!0;return!1}};function Bn(A,t){return!(!A||!En.hasOwnProperty(A.type))&&En[A.type](A,t)}function kn(A,t){return 0===_n(A,t)}function Sn(A,t){for(var e,n,r,i=0,o=A.length;i<o;i++){if(0===(n=_n(A[i],t)))return!0;if(i>0&&(r=_n(A[i],A[i-1]))>0&&e<=r&&n<=r&&(e+n-r)*(1-Math.pow((e-n)/r,2))<rt*r)return!0;e=n}return!1}function Dn(A,t){return!!rn(A.map(Cn),Tn(t))}function Cn(A){return(A=A.map(Tn)).pop(),A}function Tn(A){return[A[0]*st,A[1]*st]}function On(A,t,e){var n=et(A,t-nt,e).concat(t);return function(A){return n.map((function(t){return[A,t]}))}}function Pn(A,t,e){var n=et(A,t-nt,e).concat(t);return function(A){return n.map((function(t){return[t,A]}))}}function In(){return function(){var A,t,e,n,r,i,o,a,l,u,s,f,c=10,h=c,d=90,m=360,p=2.5;function g(){return{type:"MultiLineString",coordinates:v()}}function v(){return et(mt(n/d)*d,e,d).map(s).concat(et(mt(a/m)*m,o,m).map(f)).concat(et(mt(t/c)*c,A,c).filter((function(A){return ft(A%d)>nt})).map(l)).concat(et(mt(i/h)*h,r,h).filter((function(A){return ft(A%m)>nt})).map(u))}return g.lines=function(){return v().map((function(A){return{type:"LineString",coordinates:A}}))},g.outline=function(){return{type:"Polygon",coordinates:[s(n).concat(f(o).slice(1),s(e).reverse().slice(1),f(a).reverse().slice(1))]}},g.extent=function(A){return arguments.length?g.extentMajor(A).extentMinor(A):g.extentMinor()},g.extentMajor=function(A){return arguments.length?(n=+A[0][0],e=+A[1][0],a=+A[0][1],o=+A[1][1],n>e&&(A=n,n=e,e=A),a>o&&(A=a,a=o,o=A),g.precision(p)):[[n,a],[e,o]]},g.extentMinor=function(e){return arguments.length?(t=+e[0][0],A=+e[1][0],i=+e[0][1],r=+e[1][1],t>A&&(e=t,t=A,A=e),i>r&&(e=i,i=r,r=e),g.precision(p)):[[t,i],[A,r]]},g.step=function(A){return arguments.length?g.stepMajor(A).stepMinor(A):g.stepMinor()},g.stepMajor=function(A){return arguments.length?(d=+A[0],m=+A[1],g):[d,m]},g.stepMinor=function(A){return arguments.length?(c=+A[0],h=+A[1],g):[c,h]},g.precision=function(c){return arguments.length?(p=+c,l=On(i,r,90),u=Pn(t,A,p),s=On(a,o,90),f=Pn(n,e,p),g):p},g.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()()}function Rn(A,t){var e=A[0]*st,n=A[1]*st,r=t[0]*st,i=t[1]*st,o=dt(n),a=gt(n),l=dt(i),u=gt(i),s=o*dt(e),f=o*gt(e),c=l*dt(r),h=l*gt(r),d=2*yt(bt(qt(i-n)+o*l*qt(r-e))),m=gt(d),p=d?function(A){var t=gt(A*=d)/m,e=gt(d-A)/m,n=e*s+t*c,r=e*f+t*h,i=e*a+t*u;return[ht(r,n)*ut,ht(i,bt(n*n+r*r))*ut]}:function(){return[e*ut,n*ut]};return p.distance=d,p}var Qn=A=>A,jn=1/0,Ln=jn,Gn=-jn,Fn=Gn,Un={point:function(A,t){A<jn&&(jn=A);A>Gn&&(Gn=A);t<Ln&&(Ln=t);t>Fn&&(Fn=t)},lineStart:wt,lineEnd:wt,polygonStart:wt,polygonEnd:wt,result:function(){var A=[[jn,Ln],[Gn,Fn]];return Gn=Fn=-(Ln=jn=1/0),A}};func