text: !function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("sprite-extend-3d"),require("spritejs")):"function"==typeof define&&define.amd?define([,"spritejs"],t):"object"==typeof exports?exports.globe=t(require("sprite-extend-3d"),require("spritejs")):(n.spritejs=n.spritejs||{},n.spritejs.globe=t(n.spritejs.ext3d,n.spritejs))}(this,(function(n,t){return function(n){var t={};function e(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return n[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=n,e.c=t,e.d=function(n,t,r){e.o(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:r})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,t){if(1&t&&(n=e(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var o in n)e.d(r,o,function(t){return n[t]}.bind(null,o));return r},e.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(t,"a",t),t},e.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},e.p="/js/",e(e.s=91)}([function(t,e){t.exports=n},function(n,t,e){(function(t){var e=function(n){return n&&n.Math==Math&&n};n.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t&&t)||Function("return this")()}).call(this,e(53))},function(n,t,e){var r=e(1),o=e(31),i=e(4),a=e(35),u=e(36),c=e(54),l=o("wks"),s=r.Symbol,f=c?s:s&&s.withoutSetter||a;n.exports=function(n){return i(l,n)||(u&&i(s,n)?l[n]=s[n]:l[n]=f("Symbol."+n)),l[n]}},function(n,t,e){var r=e(7);n.exports=function(n){if(!r(n))throw TypeError(String(n)+" is not an object");return n}},function(n,t){var e={}.hasOwnProperty;n.exports=function(n,t){return e.call(n,t)}},function(n,t){n.exports=function(n){try{return!!n()}catch(n){return!0}}},function(n,t,e){var r=e(8),o=e(9),i=e(21);n.exports=r?function(n,t,e){return o.f(n,t,i(1,e))}:function(n,t,e){return n[t]=e,n}},function(n,t){n.exports=function(n){return"object"==typeof n?null!==n:"function"==typeof n}},function(n,t,e){var r=e(5);n.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(n,t,e){var r=e(8),o=e(33),i=e(3),a=e(34),u=Object.defineProperty;t.f=r?u:function(n,t,e){if(i(n),t=a(t,!0),i(e),o)try{return u(n,t,e)}catch(n){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(n[t]=e.value),n}},function(n,t){var e={}.toString;n.exports=function(n){return e.call(n).slice(8,-1)}},function(n,t,e){var r=e(59),o=e(1),i=function(n){return"function"==typeof n?n:void 0};n.exports=function(n,t){return arguments.length<2?i(r[n])||i(o[n]):r[n]&&r[n][t]||o[n]&&o[n][t]}},function(n,t){n.exports={}},function(n,e){n.exports=t},function(n,t,e){"use strict";var r=e(15),o=e(52),i=e(12),a=e(25),u=e(61),c=a.set,l=a.getterFor("Array Iterator");n.exports=u(Array,"Array",(function(n,t){c(this,{type:"Array Iterator",target:r(n),index:0,kind:t})}),(function(){var n=l(this),t=n.target,e=n.kind,r=n.index++;return!t||r>=t.length?(n.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:r,done:!1}:"values"==e?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(n,t,e){var r=e(51),o=e(30);n.exports=function(n){return r(o(n))}},function(n,t){n.exports=!1},function(n,t,e){var r=e(1),o=e(6),i=e(4),a=e(19),u=e(26),c=e(25),l=c.get,s=c.enforce,f=String(String).split("String");(n.exports=function(n,t,e,u){var c=!!u&&!!u.unsafe,l=!!u&&!!u.enumerable,p=!!u&&!!u.noTargetGet;"function"==typeof e&&("string"!=typeof t||i(e,"name")||o(e,"name",t),s(e).source=f.join("string"==typeof t?t:"")),n!==r?(c?!p&&n[t]&&(l=!0):delete n[t],l?n[t]=e:o(n,t,e)):l?n[t]=e:a(t,e)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||u(this)}))},function(n,t){n.exports=function(n){if("function"!=typeof n)throw TypeError(String(n)+" is not a function");return n}},function(n,t,e){var r=e(1),o=e(6);n.exports=function(n,t){try{o(r,n,t)}catch(e){r[n]=t}return t}},function(n,t,e){var r=e(1),o=e(7),i=r.document,a=o(i)&&o(i.createElement);n.exports=function(n){return a?i.createElement(n):{}}},function(n,t){n.exports=function(n,t){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:t}}},function(n,t){n.exports={}},function(n,t){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(n,t,e){var r=e(31),o=e(35),i=r("keys");n.exports=function(n){return i[n]||(i[n]=o(n))}},function(n,t,e){var r,o,i,a=e(60),u=e(1),c=e(7),l=e(6),s=e(4),f=e(24),p=e(22),v=u.WeakMap;if(a){var h=new v,g=h.get,m=h.has,d=h.set;r=function(n,t){return d.call(h,n,t),t},o=function(n){return g.call(h,n)||{}},i=function(n){return m.call(h,n)}}else{var y=f("state");p[y]=!0,r=function(n,t){return l(n,y,t),t},o=function(n){return s(n,y)?n[y]:{}},i=function(n){return s(n,y)}}n.exports={set:r,get:o,has:i,enforce:function(n){return i(n)?o(n):r(n,{})},getterFor:function(n){return function(t){var e;if(!c(t)||(e=o(t)).type!==n)throw TypeError("Incompatible receiver, "+n+" required");return e}}}},function(n,t,e){var r=e(32),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(n){return o.call(n)}),n.exports=r.inspectSource},function(n,t,e){var r=e(8),o=e(62),i=e(21),a=e(15),u=e(34),c=e(4),l=e(33),s=Object.getOwnPropertyDescriptor;t.f=r?s:function(n,t){if(n=a(n),t=u(t,!0),l)try{return s(n,t)}catch(n){}if(c(n,t))return i(!o.f.call(n,t),n[t])}},function(n,t,e){var r=e(9).f,o=e(4),i=e(2)("toStringTag");n.exports=function(n,t,e){n&&!o(n=e?n:n.prototype,i)&&r(n,i,{configurable:!0,value:t})}},function(n,t,e){var r=e(1),o=e(90),i=e(14),a=e(6),u=e(2),c=u("iterator"),l=u("toStringTag"),s=i.values;for(var f in o){var p=r[f],v=p&&p.prototype;if(v){if(v[c]!==s)try{a(v,c,s)}catch(n){v[c]=s}if(v[l]||a(v,l,f),o[f])for(var h in i)if(v[h]!==i[h])try{a(v,h,i[h])}catch(n){v[h]=i[h]}}}},function(n,t){n.exports=function(n){if(null==n)throw TypeError("Can't call method on "+n);return n}},function(n,t,e){var r=e(16),o=e(32);(n.exports=function(n,t){return o[n]||(o[n]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.4",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(n,t,e){var r=e(1),o=e(19),i=r["__core-js_shared__"]||o("__core-js_shared__",{});n.exports=i},function(n,t,e){var r=e(8),o=e(5),i=e(20);n.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(n,t,e){var r=e(7);n.exports=function(n,t){if(!r(n))return n;var e,o;if(t&&"function"==typeof(e=n.toString)&&!r(o=e.call(n)))return o;if("function"==typeof(e=n.valueOf)&&!r(o=e.call(n)))return o;if(!t&&"function"==typeof(e=n.toString)&&!r(o=e.call(n)))return o;throw TypeError("Can't convert object to primitive value")}},function(n,t){var e=0,r=Math.random();n.exports=function(n){return"Symbol("+String(void 0===n?"":n)+")_"+(++e+r).toString(36)}},function(n,t,e){var r=e(5);n.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(n,t,e){var r,o=e(3),i=e(55),a=e(23),u=e(22),c=e(41),l=e(20),s=e(24),f=s("IE_PROTO"),p=function(){},v=function(n){return"<script>"+n+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(n){}var n,t;h=r?function(n){n.write(v("")),n.close();var t=n.parentWindow.Object;return n=null,t}(r):((t=l("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(n=t.contentWindow.document).open(),n.write(v("document.F=Object")),n.close(),n.F);for(var e=a.length;e--;)delete h.prototype[a[e]];return h()};u[f]=!0,n.exports=Object.create||function(n,t){var e;return null!==n?(p.prototype=o(n),e=new p,p.prototype=null,e[f]=n):e=h(),void 0===t?e:i(e,t)}},function(n,t,e){var r=e(4),o=e(15),i=e(57).indexOf,a=e(22);n.exports=function(n,t){var e,u=o(n),c=0,l=[];for(e in u)!r(a,e)&&r(u,e)&&l.push(e);for(;t.length>c;)r(u,e=t[c++])&&(~i(l,e)||l.push(e));return l}},function(n,t,e){var r=e(40),o=Math.min;n.exports=function(n){return n>0?o(r(n),9007199254740991):0}},function(n,t){var e=Math.ceil,r=Math.floor;n.exports=function(n){return isNaN(n=+n)?0:(n>0?r:e)(n)}},function(n,t,e){var r=e(11);n.exports=r("document","documentElement")},function(n,t,e){var r=e(1),o=e(27).f,i=e(6),a=e(17),u=e(19),c=e(63),l=e(43);n.exports=function(n,t){var e,s,f,p,v,h=n.target,g=n.global,m=n.stat;if(e=g?r:m?r[h]||u(h,{}):(r[h]||{}).prototype)for(s in t){if(p=t[s],f=n.noTargetGet?(v=o(e,s))&&v.value:e[s],!l(g?s:h+(m?".":"#")+s,n.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(n.sham||f&&f.sham)&&i(p,"sham",!0),a(e,s,p,n)}}},function(n,t,e){var r=e(5),o=/#|\.prototype\./,i=function(n,t){var e=u[a(n)];return e==l||e!=c&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(n){return String(n).replace(o,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";n.exports=i},function(n,t,e){"use strict";var r,o,i,a=e(45),u=e(6),c=e(4),l=e(2),s=e(16),f=l("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(o=a(a(i)))!==Object.prototype&&(r=o):p=!0),null==r&&(r={}),s||c(r,f)||u(r,f,(function(){return this})),n.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(n,t,e){var r=e(4),o=e(68),i=e(24),a=e(69),u=i("IE_PROTO"),c=Object.prototype;n.exports=a?Object.getPrototypeOf:function(n){return n=o(n),r(n,u)?n[u]:"function"==typeof n.constructor&&n instanceof n.constructor?n.constructor.prototype:n instanceof Object?c:null}},function(n,t,e){var r=e(18);n.exports=function(n,t,e){if(r(n),void 0===t)return n;switch(e){case 0:return function(){return n.call(t)};case 1:return function(e){return n.call(t,e)};case 2:return function(e,r){return n.call(t,e,r)};case 3:return function(e,r,o){return n.call(t,e,r,o)}}return function(){return n.apply(t,arguments)}}},function(n,t,e){var r,o,i,a=e(1),u=e(5),c=e(10),l=e(46),s=e(41),f=e(20),p=e(48),v=a.location,h=a.setImmediate,g=a.clearImmediate,m=a.process,d=a.MessageChannel,y=a.Dispatch,x=0,b={},S=function(n){if(b.hasOwnProperty(n)){var t=b[n];delete b[n],t()}},w=function(n){return function(){S(n)}},M=function(n){S(n.data)},C=function(n){a.postMessage(n+"",v.protocol+"//"+v.host)};h&&g||(h=function(n){for(var t=[],e=1;arguments.length>e;)t.push(arguments[e++]);return b[++x]=function(){("function"==typeof n?n:Function(n)).apply(void 0,t)},r(x),x},g=function(n){delete b[n]},"process"==c(m)?r=function(n){m.nextTick(w(n))}:y&&y.now?r=function(n){y.now(w(n))}:d&&!p?(i=(o=new d).port2,o.port1.onmessage=M,r=l(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||u(C)?r="onreadystatechange"in f("script")?function(n){s.appendChild(f("script")).onreadystatechange=function(){s.removeChild(this),S(n)}}:function(n){setTimeout(w(n),0)}:(r=C,a.addEventListener("message",M,!1))),n.exports={set:h,clear:g}},function(n,t,e){var r=e(49);n.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},function(n,t,e){var r=e(11);n.exports=r("navigator","userAgent")||""},function(n,t,e){"use strict";var r=e(18),o=function(n){var t,e;this.promise=new n((function(n,r){if(void 0!==t||void 0!==e)throw TypeError("Bad Promise constructor");t=n,e=r})),this.resolve=r(t),this.reject=r(e)};n.exports.f=function(n){return new o(n)}},function(n,t,e){var r=e(5),o=e(10),i="".split;n.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(n){return"String"==o(n)?i.call(n,""):Object(n)}:Object},function(n,t,e){var r=e(2),o=e(37),i=e(9),a=r("unscopables"),u=Array.prototype;null==u[a]&&i.f(u,a,{configurable:!0,value:o(null)}),n.exports=function(n){u[a][n]=!0}},function(n,t){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(n){"object"==typeof window&&(e=window)}n.exports=e},function(n,t,e){var r=e(36);n.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(n,t,e){var r=e(8),o=e(9),i=e(3),a=e(56);n.exports=r?Object.defineProperties:function(n,t){i(n);for(var e,r=a(t),u=r.length,c=0;u>c;)o.f(n,e=r[c++],t[e]);return n}},function(n,t,e){var r=e(38),o=e(23);n.exports=Object.keys||function(n){return r(n,o)}},function(n,t,e){var r=e(15),o=e(39),i=e(58),a=function(n){return function(t,e,a){var u,c=r(t),l=o(c.length),s=i(a,l);if(n&&e!=e){for(;l>s;)if((u=c[s++])!=u)return!0}else for(;l>s;s++)if((n||s in c)&&c[s]===e)return n||s||0;return!n&&-1}};n.exports={includes:a(!0),indexOf:a(!1)}},function(n,t,e){var r=e(40),o=Math.max,i=Math.min;n.exports=function(n,t){var e=r(n);return e<0?o(e+t,0):i(e,t)}},function(n,t,e){var r=e(1);n.exports=r},function(n,t,e){var r=e(1),o=e(26),i=r.WeakMap;n.exports="function"==typeof i&&/native code/.test(o(i))},function(n,t,e){"use strict";var r=e(42),o=e(67),i=e(45),a=e(70),u=e(28),c=e(6),l=e(17),s=e(2),f=e(16),p=e(12),v=e(44),h=v.IteratorPrototype,g=v.BUGGY_SAFARI_ITERATORS,m=s("iterator"),d=function(){return this};n.exports=function(n,t,e,s,v,y,x){o(e,t,s);var b,S,w,M=function(n){if(n===v&&T)return T;if(!g&&n in _)return _[n];switch(n){case"keys":case"values":case"entries":return function(){return new e(this,n)}}return function(){return new e(this)}},C=t+" Iterator",P=!1,_=n.prototype,j=_[m]||_["@@iterator"]||v&&_[v],T=!g&&j||M(v),E="Array"==t&&_.entries||j;if(E&&(b=i(E.call(new n)),h!==Object.prototype&&b.next&&(f||i(b)===h||(a?a(b,h):"function"!=typeof b[m]&&c(b,m,d)),u(b,C,!0,!0),f&&(p[C]=d))),"values"==v&&j&&"values"!==j.name&&(P=!0,T=function(){return j.call(this)}),f&&!x||_[m]===T||c(_,m,T),p[t]=T,v)if(S={values:M("values"),keys:y?T:M("keys"),entries:M("entries")},x)for(w in S)!g&&!P&&w in _||l(_,w,S[w]);else r({target:t,proto:!0,forced:g||P},S);return S}},function(n,t,e){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(n){var t=o(this,n);return!!t&&t.enumerable}:r},function(n,t,e){var r=e(4),o=e(64),i=e(27),a=e(9);n.exports=function(n,t){for(var e=o(t),u=a.f,c=i.f,l=0;l<e.length;l++){var s=e[l];r(n,s)||u(n,s,c(t,s))}}},function(n,t,e){var r=e(11),o=e(65),i=e(66),a=e(3);n.exports=r("Reflect","ownKeys")||function(n){var t=o.f(a(n)),e=i.f;return e?t.concat(e(n)):t}},function(n,t,e){var r=e(38),o=e(23).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(n){return r(n,o)}},function(n,t){t.f=Object.getOwnPropertySymbols},function(n,t,e){"use strict";var r=e(44).IteratorPrototype,o=e(37),i=e(21),a=e(28),u=e(12),c=function(){return this};n.exports=function(n,t,e){var l=t+" Iterator";return n.prototype=o(r,{next:i(1,e)}),a(n,l,!1,!0),u[l]=c,n}},function(n,t,e){var r=e(30);n.exports=function(n){return Object(r(n))}},function(n,t,e){var r=e(5);n.exports=!r((function(){function n(){}return n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype}))},function(n,t,e){var r=e(3),o=e(71);n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var n,t=!1,e={};try{(n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),t=e instanceof Array}catch(n){}return function(e,i){return r(e),o(i),t?n.call(e,i):e.__proto__=i,e}}():void 0)},function(n,t,e){var r=e(7);n.exports=function(n){if(!r(n)&&null!==n)throw TypeError("Can't set "+String(n)+" as a prototype");return n}},function(n,t,e){"use strict";var r,o,i,a,u=e(42),c=e(16),l=e(1),s=e(11),f=e(73),p=e(17),v=e(74),h=e(28),g=e(75),m=e(7),d=e(18),y=e(76),x=e(10),b=e(26),S=e(77),w=e(83),M=e(84),C=e(47).set,P=e(85),_=e(86),j=e(87),T=e(50),E=e(88),O=e(25),L=e(43),k=e(2),N=e(89),z=k("species"),F="Promise",R=O.get,D=O.set,I=O.getterFor(F),A=f,U=l.TypeError,V=l.document,G=l.process,W=s("fetch"),q=T.f,B=q,H="process"==x(G),Y=!!(V&&V.createEvent&&l.dispatchEvent),K=L(F,(function(){if(!(b(A)!==String(A))){if(66===N)return!0;if(!H&&"function"!=typeof PromiseRejectionEvent)return!0}if(c&&!A.prototype.finally)return!0;if(N>=51&&/native code/.test(A))return!1;var n=A.resolve(1),t=function(n){n((function(){}),(function(){}))};return(n.constructor={})[z]=t,!(n.then((function(){}))instanceof t)})),X=K||!w((function(n){A.all(n).catch((function(){}))})),Q=function(n){var t;return!(!m(n)||"function"!=typeof(t=n.then))&&t},Z=function(n,t,e){if(!t.notified){t.notified=!0;var r=t.reactions;P((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var u,c,l,s=r[a++],f=i?s.ok:s.fail,p=s.resolve,v=s.reject,h=s.domain;try{f?(i||(2===t.rejection&&tn(n,t),t.rejection=1),!0===f?u=o:(h&&h.enter(),u=f(o),h&&(h.exit(),l=!0)),u===s.promise?v(U("Promise-chain cycle")):(c=Q(u))?c.call(u,p,v):p(u)):v(o)}catch(n){h&&!l&&h.exit(),v(n)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&$(n,t)}))}},J=function(n,t,e){var r,o;Y?((r=V.createEvent("Event")).promise=t,r.reason=e,r.initEvent(n,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:e},(o=l["on"+n])?o(r):"unhandledrejection"===n&&j("Unhandled promise rejection",e)},$=function(n,t){C.call(l,(function(){var e,r=t.value;if(nn(t)&&(e=E((function(){H?G.emit("unhandledRejection",r,n):J("unhandledrejection",n,r)})),t.rejection=H||nn(t)?2:1,e.error))throw e.value}))},nn=function(n){return 1!==n.rejection&&!n.parent},tn=function(n,t){C.call(l,(function(){H?G.emit("rejectionHandled",n):J("rejectionhandled",n,t.value)}))},en=function(n,t,e,r){return function(o){n(t,e,o,r)}},rn=function(n,t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Z(n,t,!0))},on=function(n,t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(n===e)throw U("Promise can't be resolved itself");var o=Q(e);o?P((function(){var r={done:!1};try{o.call(e,en(on,n,r,t),en(rn,n,r,t))}catch(e){rn(n,r,e,t)}})):(t.value=e,t.state=1,Z(n,t,!1))}catch(e){rn(n,{done:!1},e,t)}}};K&&(A=function(n){y(this,A,F),d(n),r.call(this);var t=R(this);try{n(en(on,this,t),en(rn,this,t))}catch(n){rn(this,t,n)}},(r=function(n){D(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=v(A.prototype,{then:function(n,t){var e=I(this),r=q(M(this,A));return r.ok="function"!=typeof n||n,r.fail="function"==typeof t&&t,r.domain=H?G.domain:void 0,e.parent=!0,e.reactions.push(r),0!=e.state&&Z(this,e,!1),r.promise},catch:function(n){return this.then(void 0,n)}}),o=function(){var n=new r,t=R(n);this.promise=n,this.resolve=en(on,n,t),this.reject=en(rn,n,t)},T.f=q=function(n){return n===A||n===i?new o(n):B(n)},c||"function"!=typeof f||(a=f.prototype.then,p(f.prototype,"then",(function(n,t){var e=this;return new A((function(n,t){a.call(e,n,t)})).then(n,t)}),{unsafe:!0}),"function"==typeof W&&u({global:!0,enumerable:!0,forced:!0},{fetch:function(n){return _(A,W.apply(l,arguments))}}))),u({global:!0,wrap:!0,forced:K},{Promise:A}),h(A,F,!1,!0),g(F),i=s(F),u({target:F,stat:!0,forced:K},{reject:function(n){var t=q(this);return t.reject.call(void 0,n),t.promise}}),u({target:F,stat:!0,forced:c||K},{resolve:function(n){return _(c&&this===i?A:this,n)}}),u({target:F,stat:!0,forced:X},{all:function(n){var t=this,e=q(t),r=e.resolve,o=e.reject,i=E((function(){var e=d(t.resolve),i=[],a=0,u=1;S(n,(function(n){var c=a++,l=!1;i.push(void 0),u++,e.call(t,n).then((function(n){l||(l=!0,i[c]=n,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),e.promise},race:function(n){var t=this,e=q(t),r=e.reject,o=E((function(){var o=d(t.resolve);S(n,(function(n){o.call(t,n).then(e.resolve,r)}))}));return o.error&&r(o.value),e.promise}})},function(n,t,e){var r=e(1);n.exports=r.Promise},function(n,t,e){var r=e(17);n.exports=function(n,t,e){for(var o in t)r(n,o,t[o],e);return n}},function(n,t,e){"use strict";var r=e(11),o=e(9),i=e(2),a=e(8),u=i("species");n.exports=function(n){var t=r(n),e=o.f;a&&t&&!t[u]&&e(t,u,{configurable:!0,get:function(){return this}})}},function(n,t){n.exports=function(n,t,e){if(!(n instanceof t))throw TypeError("Incorrect "+(e?e+" ":"")+"invocation");return n}},function(n,t,e){var r=e(3),o=e(78),i=e(39),a=e(46),u=e(79),c=e(82),l=function(n,t){this.stopped=n,this.result=t};(n.exports=function(n,t,e,s,f){var p,v,h,g,m,d,y,x=a(t,e,s?2:1);if(f)p=n;else{if("function"!=typeof(v=u(n)))throw TypeError("Target is not iterable");if(o(v)){for(h=0,g=i(n.length);g>h;h++)if((m=s?x(r(y=n[h])[0],y[1]):x(n[h]))&&m instanceof l)return m;return new l(!1)}p=v.call(n)}for(d=p.next;!(y=d.call(p)).done;)if("object"==typeof(m=c(p,x,y.value,s))&&m&&m instanceof l)return m;return new l(!1)}).stop=function(n){return new l(!0,n)}},function(n,t,e){var r=e(2),o=e(12),i=r("iterator"),a=Array.prototype;n.exports=function(n){return void 0!==n&&(o.Array===n||a[i]===n)}},function(n,t,e){var r=e(80),o=e(12),i=e(2)("iterator");n.exports=function(n){if(null!=n)return n[i]||n["@@iterator"]||o[r(n)]}},function(n,t,e){var r=e(81),o=e(10),i=e(2)("toStringTag"),a="Arguments"==o(function(){return arguments}());n.exports=r?o:function(n){var t,e,r;return void 0===n?"Undefined":null===n?"Null":"string"==typeof(e=function(n,t){try{return n[t]}catch(n){}}(t=Object(n),i))?e:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(n,t,e){var r={};r[e(2)("toStringTag")]="z",n.exports="[object z]"===String(r)},function(n,t,e){var r=e(3);n.exports=function(n,t,e,o){try{return o?t(r(e)[0],e[1]):t(e)}catch(t){var i=n.return;throw void 0!==i&&r(i.call(n)),t}}},function(n,t,e){var r=e(2)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(n){}n.exports=function(n,t){if(!t&&!o)return!1;var e=!1;try{var i={};i[r]=function(){return{next:function(){return{done:e=!0}}}},n(i)}catch(n){}return e}},function(n,t,e){var r=e(3),o=e(18),i=e(2)("species");n.exports=function(n,t){var e,a=r(n).constructor;return void 0===a||null==(e=r(a)[i])?t:o(e)}},function(n,t,e){var r,o,i,a,u,c,l,s,f=e(1),p=e(27).f,v=e(10),h=e(47).set,g=e(48),m=f.MutationObserver||f.WebKitMutationObserver,d=f.process,y=f.Promise,x="process"==v(d),b=p(f,"queueMicrotask"),S=b&&b.value;S||(r=function(){var n,t;for(x&&(n=d.domain)&&n.exit();o;){t=o.fn,o=o.next;try{t()}catch(n){throw o?a():i=void 0,n}}i=void 0,n&&n.enter()},x?a=function(){d.nextTick(r)}:m&&!g?(u=!0,c=document.createTextNode(""),new m(r).observe(c,{characterData:!0}),a=function(){c.data=u=!u}):y&&y.resolve?(l=y.resolve(void 0),s=l.then,a=function(){s.call(l,r)}):a=function(){h.call(f,r)}),n.exports=S||function(n){var t={fn:n,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},function(n,t,e){var r=e(3),o=e(7),i=e(50);n.exports=function(n,t){if(r(n),o(t)&&t.constructor===n)return t;var e=i.f(n);return(0,e.resolve)(t),e.promise}},function(n,t,e){var r=e(1);n.exports=function(n,t){var e=r.console;e&&e.error&&(1===arguments.length?e.error(n):e.error(n,t))}},function(n,t){n.exports=function(n){try{return{error:!1,value:n()}}catch(n){return{error:!0,value:n}}}},function(n,t,e){var r,o,i=e(1),a=e(49),u=i.process,c=u&&u.versions,l=c&&c.v8;l?o=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),n.exports=o&&+o},function(n,t){n.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(n,t,e){"use strict";e.r(t),e.d(t,"addBeam",(function(){return be})),e.d(t,"addCurve",(function(){return we})),e.d(t,"addMarker",(function(){return xe})),e.d(t,"cameraTo",(function(){return Me})),e.d(t,"config",(function(){return Kt})),e.d(t,"createGlobe",(function(){return me})),e.d(t,"getCountryInfo",(function(){return le})),e.d(t,"highlightMap",(function(){return se})),e.d(t,"latlngToPosition",(function(){return ie})),e.d(t,"launchMissile",(function(){return Se})),e.d(t,"project",(function(){return re})),e.d(t,"positionToLatlng",(function(){return ae})),e.d(t,"unproject",(function(){return oe}));e(14),e(72),e(29);var r=function(n){return n},o=function(n){if(null==n)return r;var t,e,o=n.scale[0],i=n.scale[1],a=n.translate[0],u=n.translate[1];return function(n,r){r||(t=e=0);var c=2,l=n.length,s=new Array(l);for(s[0]=(t+=n[0])*o+a,s[1]=(e+=n[1])*i+u;c<l;)s[c]=n[c],++c;return s}},i=function(n,t){return"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return a(n,t)}))}:a(n,t)};function a(n,t){var e=t.id,r=t.bbox,o=null==t.properties?{}:t.properties,i=u(n,t);return null==e&&null==r?{type:"Feature",properties:o,geometry:i}:null==r?{type:"Feature",id:e,properties:o,geometry:i}:{type:"Feature",id:e,bbox:r,properties:o,geometry:i}}function u(n,t){var e=o(n.transform),r=n.arcs;function i(n,t){t.length&&t.pop();for(var o=r[n<0?~n:n],i=0,a=o.length;i<a;++i)t.push(e(o[i],i));n<0&&function(n,t){for(var e,r=n.length,o=r-t;o<--r;)e=n[o],n[o++]=n[r],n[r]=e}(t,a)}function a(n){return e(n)}function u(n){for(var t=[],e=0,r=n.length;e<r;++e)i(n[e],t);return t.length<2&&t.push(t[0]),t}function c(n){for(var t=u(n);t.length<4;)t.push(t[0]);return t}function l(n){return n.map(c)}return function n(t){var e,r=t.type;switch(r){case"GeometryCollection":return{type:r,geometries:t.geometries.map(n)};case"Point":e=a(t.coordinates);break;case"MultiPoint":e=t.coordinates.map(a);break;case"LineString":e=u(t.arcs);break;case"MultiLineString":e=t.arcs.map(u);break;case"Polygon":e=l(t.arcs);break;case"MultiPolygon":e=t.arcs.map(l);break;default:return null}return{type:r,coordinates:e}}(t)}var c=new ArrayBuffer(16);new Float64Array(c),new Uint32Array(c);Math.PI,Math.abs,Math.atan2,Math.cos,Math.sin;var l=function(n){return n};function s(n,t){n&&p.hasOwnProperty(n.type)&&p[n.type](n,t)}var f={Feature:function(n,t){s(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,o=e.length;++r<o;)s(e[r].geometry,t)}},p={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,o=e.length;++r<o;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){v(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,o=e.length;++r<o;)v(e[r],t,0)},Polygon:function(n,t){h(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,o=e.length;++r<o;)h(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,o=e.length;++r<o;)s(e[r],t)}};function v(n,t,e){var r,o=-1,i=n.length-e;for(t.lineStart();++o<i;)r=n[o],t.point(r[0],r[1],r[2]);t.lineEnd()}function h(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)v(n[e],t,1);t.polygonEnd()}var g=function(n,t){n&&f.hasOwnProperty(n.type)?f[n.type](n,t):s(n,t)},m=function(){return new d};function d(){this.reset()}d.prototype={constructor:d,reset:function(){this.s=this.t=0},add:function(n){x(y,n,this.t),x(this,y.s,this.s),this.s?this.t+=y.t:this.s=y.t},valueOf:function(){return this.s}};var y=new d;function x(n,t,e){var r=n.s=t+e,o=r-t,i=r-o;n.t=t-i+(e-o)}var b=Math.PI,S=b/2,w=b/4,M=2*b,C=180/b,P=b/180,_=Math.abs,j=Math.atan,T=Math.atan2,E=Math.cos,O=(Math.ceil,Math.exp,Math.floor,Math.log,Math.pow,Math.sin),L=Math.sign||function(n){return n>0?1:n<0?-1:0},k=Math.sqrt;Math.tan;function N(n){return n>1?S:n<-1?-S:Math.asin(n)}function z(){}var F,R,D,I,A=m(),U=m(),V={point:z,lineStart:z,lineEnd:z,polygonStart:function(){V.lineStart=G,V.lineEnd=B},polygonEnd:function(){V.lineStart=V.lineEnd=V.point=z,A.add(_(U)),U.reset()},result:function(){var n=A/2;return A.reset(),n}};function G(){V.point=W}function W(n,t){V.point=q,F=D=n,R=I=t}function q(n,t){U.add(I*n-D*t),D=n,I=t}function B(){q(F,R)}var H=V,Y=1/0,K=Y,X=-Y,Q=X;var Z,J,$,nn,tn={point:function(n,t){n<Y&&(Y=n);n>X&&(X=n);t<K&&(K=t);t>Q&&(Q=t)},lineStart:z,lineEnd:z,polygonStart:z,polygonEnd:z,result:function(){var n=[[Y,K],[X,Q]];return X=Q=-(K=Y=1/0),n}},en=0,rn=0,on=0,an=0,un=0,cn=0,ln=0,sn=0,fn=0,pn={point:vn,lineStart:hn,lineEnd:dn,polygonStart:function(){pn.lineStart=yn,pn.lineEnd=xn},polygonEnd:function(){pn.point=vn,pn.lineStart=hn,pn.lineEnd=dn},result:function(){var n=fn?[ln/fn,sn/fn]:cn?[an/cn,un/cn]:on?[en/on,rn/on]:[NaN,NaN];return en=rn=on=an=un=cn=ln=sn=fn=0,n}};function vn(n,t){en+=n,rn+=t,++on}function hn(){pn.point=gn}function gn(n,t){pn.point=mn,vn($=n,nn=t)}function mn(n,t){var e=n-$,r=t-nn,o=k(e*e+r*r);an+=o*($+n)/2,un+=o*(nn+t)/2,cn+=o,vn($=n,nn=t)}function dn(){pn.point=vn}function yn(){pn.point=bn}function xn(){Sn(Z,J)}function bn(n,t){pn.point=Sn,vn(Z=$=n,J=nn=t)}function Sn(n,t){var e=n-$,r=t-nn,o=k(e*e+r*r);an+=o*($+n)/2,un+=o*(nn+t)/2,cn+=o,ln+=(o=nn*n-$*t)*($+n),sn+=o*(nn+t),fn+=3*o,vn($=n,nn=t)}var wn=pn;function Mn(n){this._context=n}Mn.prototype={_radius:4.5,pointRadius:function(n){return this._radius=n,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._context.moveTo(n,t),this._point=1;break;case 1:this._context.lineTo(n,t);break;default:this._context.moveTo(n+this._radius,t),this._context.arc(n,t,this._radius,0,M)}},result:z};var Cn,Pn,_n,jn,Tn,En=m(),On={point:z,lineStart:function(){On.point=Ln},lineEnd:function(){Cn&&kn(Pn,_n),On.point=z},polygonStart:function(){Cn=!0},polygonEnd:function(){Cn=null},result:function(){var n=+En;return En.reset(),n}};function Ln(n,t){On.point=kn,Pn=jn=n,_n=Tn=t}function kn(n,t){jn-=n,Tn-=t,En.add(k(jn*jn+Tn*Tn)),jn=n,Tn=t}var Nn=On;function zn(){this._string=[]}function Fn(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}zn.prototype={_radius:4.5,_circle:Fn(4.5),pointRadius:function(n){return(n=+n)!==this._radius&&(this._radius=n,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._string.push("M",n,",",t),this._point=1;break;case 1:this._string.push("L",n,",",t);break;default:null==this._circle&&(this._circle=Fn(this._radius)),this._string.push("M",n,",",t,this._circle)}},result:function(){if(this._string.length){var n=this._string.join("");return this._string=[],n}return null}};var Rn=function(n,t){var e,r,o=4.5;function i(n){return n&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),g(n,e(r))),r.result()}return i.area=function(n){return g(n,e(H)),H.result()},i.measure=function(n){return g(n,e(Nn)),Nn.result()},i.bounds=function(n){return g(n,e(tn)),tn.result()},i.centroid=function(n){return g(n,e(wn)),wn.result()},i.projection=function(t){return arguments.length?(e=null==t?(n=null,l):(n=t).stream,i):n},i.context=function(n){return arguments.length?(r=null==n?(t=null,new zn):new Mn(t=n),"function"!=typeof o&&r.pointRadius(o),i):t},i.pointRadius=function(n){return arguments.length?(o="function"==typeof n?n:(r.pointRadius(+n),+n),i):o},i.projection(n).context(t)},Dn=function(){var n,t=[];return{point:function(t,e){n.push([t,e])},lineStart:function(){t.push(n=[])},lineEnd:z,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var e=t;return t=[],n=null,e}}},In=function(n,t){return _(n[0]-t[0])<1e-6&&_(n[1]-t[1])<1e-6};function An(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}var Un=function(n,t,e,r,o){var i,a,u=[],c=[];if(n.forEach((function(n){if(!((t=n.length-1)<=0)){var t,e,r=n[0],a=n[t];if(In(r,a)){for(o.lineStart(),i=0;i<t;++i)o.point((r=n[i])[0],r[1]);o.lineEnd()}else u.push(e=new An(r,n,null,!0)),c.push(e.o=new An(r,null,e,!1)),u.push(e=new An(a,n,null,!1)),c.push(e.o=new An(a,null,e,!0))}})),u.length){for(c.sort(t),Vn(u),Vn(c),i=0,a=c.length;i<a;++i)c[i].e=e=!e;for(var l,s,f=u[0];;){for(var p=f,v=!0;p.v;)if((p=p.n)===f)return;l=p.z,o.lineStart();do{if(p.v=p.o.v=!0,p.e){if(v)for(i=0,a=l.length;i<a;++i)o.point((s=l[i])[0],s[1]);else r(p.x,p.n.x,1,o);p=p.n}else{if(v)for(l=p.p.z,i=l.length-1;i>=0;--i)o.point((s=l[i])[0],s[1]);else r(p.x,p.p.x,-1,o);p=p.p}l=(p=p.o).z,v=!v}while(!p.v);o.lineEnd()}}};function Vn(n){if(t=n.length){for(var t,e,r=0,o=n[0];++r<t;)o.n=e=n[r],e.p=o,o=e;o.n=e=n[0],e.p=o}}function Gn(n){return[T(n[1],n[0]),N(n[2])]}function Wn(n){var t=n[0],e=n[1],r=E(e);return[r*E(t),r*O(t),O(e)]}function qn(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function Bn(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Hn(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Yn(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Kn(n){var t=k(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}var Xn=m();function Qn(n){return _(n[0])<=b?n[0]:L(n[0])*((_(n[0])+b)%M-b)}var Zn=function(n,t){var e=Qn(t),r=t[1],o=O(r),i=[O(e),-E(e),0],a=0,u=0;Xn.reset(),1===o?r=S+1e-6:-1===o&&(r=-S-1e-6);for(var c=0,l=n.length;c<l;++c)if(f=(s=n[c]).length)for(var s,f,p=s[f-1],v=Qn(p),h=p[1]/2+w,g=O(h),m=E(h),d=0;d<f;++d,v=x,g=P,m=_,p=y){var y=s[d],x=Qn(y),C=y[1]/2+w,P=O(C),_=E(C),j=x-v,L=j>=0?1:-1,k=L*j,z=k>b,F=g*P;if(Xn.add(T(F*L*O(k),m*_+F*E(k))),a+=z?j+L*M:j,z^v>=e^x>=e){var R=Bn(Wn(p),Wn(y));Kn(R);var D=Bn(i,R);Kn(D);var I=(z^j>=0?-1:1)*N(D[2]);(r>I||r===I&&(R[0]||R[1]))&&(u+=z^j>=0?1:-1)}}return(a<-1e-6||a<1e-6&&Xn<-1e-6)^1&u},Jn=function(n,t){return n<t?-1:n>t?1:n>=t?0:NaN};var $n,nt;1===($n=Jn).length&&(nt=$n,$n=function(n,t){return Jn(nt(n),t)});var tt=Array.prototype;tt.slice,tt.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2);var et=function(n){for(var t,e,r,o=n.length,i=-1,a=0;++i<o;)a+=n[i].length;for(e=new Array(a);--o>=0;)for(t=(r=n[o]).length;--t>=0;)e[--a]=r[t];return e};var rt=function(n,t,e,r){return function(o){var i,a,u,c=t(o),l=Dn(),s=t(l),f=!1,p={point:v,lineStart:g,lineEnd:m,polygonStart:function(){p.point=d,p.lineStart=y,p.lineEnd=x,a=[],i=[]},polygonEnd:function(){p.point=v,p.lineStart=g,p.lineEnd=m,a=et(a);var n=Zn(i,r);a.length?(f||(o.polygonStart(),f=!0),Un(a,it,n,e,o)):n&&(f||(o.polygonStart(),f=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=i=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function v(t,e){n(t,e)&&o.point(t,e)}function h(n,t){c.point(n,t)}function g(){p.point=h,c.lineStart()}function m(){p.point=v,c.lineEnd()}function d(n,t){u.push([n,t]),s.point(n,t)}function y(){s.lineStart(),u=[]}function x(){d(u[0][0],u[0][1]),s.lineEnd();var n,t,e,r,c=s.clean(),p=l.result(),v=p.length;if(u.pop(),i.push(u),u=null,v)if(1&c){if((t=(e=p[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),n=0;n<t;++n)o.point((r=e[n])[0],r[1]);o.lineEnd()}}else v>1&&2&c&&p.push(p.pop().concat(p.shift())),a.push(p.filter(ot))}return p}};function ot(n){return n.length>1}function it(n,t){return((n=n.x)[0]<0?n[1]-S-1e-6:S-n[1])-((t=t.x)[0]<0?t[1]-S-1e-6:S-t[1])}var at=rt((function(){return!0}),(function(n){var t,e=NaN,r=NaN,o=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(i,a){var u=i>0?b:-b,c=_(i-e);_(c-b)<1e-6?(n.point(e,r=(r+a)/2>0?S:-S),n.point(o,r),n.lineEnd(),n.lineStart(),n.point(u,r),n.point(i,r),t=0):o!==u&&c>=b&&(_(e-o)<1e-6&&(e-=1e-6*o),_(i-u)<1e-6&&(i-=1e-6*u),r=function(n,t,e,r){var o,i,a=O(n-e);return _(a)>1e-6?j((O(t)*(i=E(r))*O(e)-O(r)*(o=E(t))*O(n))/(o*i*a)):(t+r)/2}(e,r,i,a),n.point(o,r),n.lineEnd(),n.lineStart(),n.point(u,r),t=0),n.point(e=i,r=a),o=u},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}),(function(n,t,e,r){var o;if(null==n)o=e*S,r.point(-b,o),r.point(0,o),r.point(b,o),r.point(b,0),r.point(b,-o),r.point(0,-o),r.point(-b,-o),r.point(-b,0),r.point(-b,o);else if(_(n[0]-t[0])>1e-6){var i=n[0]<t[0]?b:-b;o=e*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(t[0],t[1])}),[-b,-S]);var ut=function(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return(e=t.invert(e,r))&&n.invert(e[0],e[1])}),e};function ct(n,t){return[_(n)>b?n+Math.round(-n/M)*M:n,t]}function lt(n,t,e){return(n%=M)?t||e?ut(ft(n),pt(t,e)):ft(n):t||e?pt(t,e):ct}function st(n){return function(t,e){return[(t+=n)>b?t-M:t<-b?t+M:t,e]}}function ft(n){var t=st(n);return t.invert=st(-n),t}function pt(n,t){var e=E(n),r=O(n),o=E(t),i=O(t);function a(n,t){var a=E(t),u=E(n)*a,c=O(n)*a,l=O(t),s=l*e+u*r;return[T(c*o-s*i,u*e-l*r),N(s*o+c*i)]}return a.invert=function(n,t){var a=E(t),u=E(n)*a,c=O(n)*a,l=O(t),s=l*o-c*i;return[T(c*o+l*i,u*e+s*r),N(s*e-u*r)]},a}ct.invert=ct;function vt(n,t,e,r,o,i){if(e){var a=E(t),u=O(t),c=r*e;null==o?(o=t+r*M,i=t-c/2):(o=ht(a,o),i=ht(a,i),(r>0?o<i:o>i)&&(o+=r*M));for(var l,s=o;r>0?s>i:s<i;s-=c)l=Gn([a,-u*E(s),-u*O(s)]),n.point(l[0],l[1])}}function ht(n,t){(t=Wn(t))[0]-=n,Kn(t);var e,r=(e=-t[1])>1?0:e<-1?b:Math.acos(e);return((-t[2]<0?-r:r)+M-1e-6)%M}var gt=function(n){var t=E(n),e=6*P,r=t>0,o=_(t)>1e-6;function i(n,e){return E(n)*E(e)>t}function a(n,e,r){var o=[1,0,0],i=Bn(Wn(n),Wn(e)),a=qn(i,i),u=i[0],c=a-u*u;if(!c)return!r&&n;var l=t*a/c,s=-t*u/c,f=Bn(o,i),p=Yn(o,l);Hn(p,Yn(i,s));var v=f,h=qn(p,v),g=qn(v,v),m=h*h-g*(qn(p,p)-1);if(!(m<0)){var d=k(m),y=Yn(v,(-h-d)/g);if(Hn(y,p),y=Gn(y),!r)return y;var x,S=n[0],w=e[0],M=n[1],C=e[1];w<S&&(x=S,S=w,w=x);var P=w-S,j=_(P-b)<1e-6;if(!j&&C<M&&(x=M,M=C,C=x),j||P<1e-6?j?M+C>0^y[1]<(_(y[0]-S)<1e-6?M:C):M<=y[1]&&y[1]<=C:P>b^(S<=y[0]&&y[0]<=w)){var T=Yn(v,(-h+d)/g);return Hn(T,p),[y,Gn(T)]}}}function u(t,e){var o=r?n:b-n,i=0;return t<-o?i|=1:t>o&&(i|=2),e<-o?i|=4:e>o&&(i|=8),i}return rt(i,(function(n){var t,e,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,p){var v,h=[f,p],g=i(f,p),m=r?g?0:u(f,p):g?u(f+(f<0?b:-b),p):0;if(!t&&(l=c=g)&&n.lineStart(),g!==c&&(!(v=a(t,h))||In(t,v)||In(h,v))&&(h[0]+=1e-6,h[1]+=1e-6,g=i(h[0],h[1])),g!==c)s=0,g?(n.lineStart(),v=a(h,t),n.point(v[0],v[1])):(v=a(t,h),n.point(v[0],v[1]),n.lineEnd()),t=v;else if(o&&t&&r^g){var d;m&e||!(d=a(h,t,!0))||(s=0,r?(n.lineStart(),n.point(d[0][0],d[0][1]),n.point(d[1][0],d[1][1]),n.lineEnd()):(n.point(d[1][0],d[1][1]),n.lineEnd(),n.lineStart(),n.point(d[0][0],d[0][1])))}!g||t&&In(t,h)||n.point(h[0],h[1]),t=h,c=g,e=m},lineEnd:function(){c&&n.lineEnd(),t=null},clean:function(){return s|(l&&c)<<1}}}),(function(t,r,o,i){vt(i,n,e,o,t,r)}),r?[0,-n]:[-b,n-b])};function mt(n,t,e,r){function o(o,i){return n<=o&&o<=e&&t<=i&&i<=r}function i(o,i,u,l){var s=0,f=0;if(null==o||(s=a(o,u))!==(f=a(i,u))||c(o,i)<0^u>0)do{l.point(0===s||3===s?n:e,s>1?r:t)}while((s=(s+u+4)%4)!==f);else l.point(i[0],i[1])}function a(r,o){return _(r[0]-n)<1e-6?o>0?0:3:_(r[0]-e)<1e-6?o>0?2:1:_(r[1]-t)<1e-6?o>0?1:0:o>0?3:2}function u(n,t){return c(n.x,t.x)}function c(n,t){var e=a(n,1),r=a(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){var c,l,s,f,p,v,h,g,m,d,y,x=a,b=Dn(),S={point:w,lineStart:function(){S.point=M,l&&l.push(s=[]);d=!0,m=!1,h=g=NaN},lineEnd:function(){c&&(M(f,p),v&&m&&b.rejoin(),c.push(b.result()));S.point=w,m&&x.lineEnd()},polygonStart:function(){x=b,c=[],l=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,o=l.length;e<o;++e)for(var i,a,u=l[e],c=1,s=u.length,f=u[0],p=f[0],v=f[1];c<s;++c)i=p,a=v,f=u[c],p=f[0],v=f[1],a<=r?v>r&&(p-i)*(r-a)>(v-a)*(n-i)&&++t:v<=r&&(p-i)*(r-a)<(v-a)*(n-i)&&--t;return t}(),e=y&&t,o=(c=et(c)).length;(e||o)&&(a.polygonStart(),e&&(a.lineStart(),i(null,null,1,a),a.lineEnd()),o&&Un(c,u,t,i,a),a.polygonEnd());x=a,c=l=s=null}};function w(n,t){o(n,t)&&x.point(n,t)}function M(i,a){var u=o(i,a);if(l&&s.push([i,a]),d)f=i,p=a,v=u,d=!1,u&&(x.lineStart(),x.point(i,a));else if(u&&m)x.point(i,a);else{var c=[h=Math.max(-1e9,Math.min(1e9,h)),g=Math.max(-1e9,Math.min(1e9,g))],b=[i=Math.max(-1e9,Math.min(1e9,i)),a=Math.max(-1e9,Math.min(1e9,a))];!function(n,t,e,r,o,i){var a,u=n[0],c=n[1],l=0,s=1,f=t[0]-u,p=t[1]-c;if(a=e-u,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<s&&(s=a)}else if(f>0){if(a>s)return;a>l&&(l=a)}if(a=o-u,f||!(a<0)){if(a/=f,f<0){if(a>s)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<s&&(s=a)}if(a=r-c,p||!(a>0)){if(a/=p,p<0){if(a<l)return;a<s&&(s=a)}else if(p>0){if(a>s)return;a>l&&(l=a)}if(a=i-c,p||!(a<0)){if(a/=p,p<0){if(a>s)return;a>l&&(l=a)}else if(p>0){if(a<l)return;a<s&&(s=a)}return l>0&&(n[0]=u+l*f,n[1]=c+l*p),s<1&&(t[0]=u+s*f,t[1]=c+s*p),!0}}}}}(c,b,n,t,e,r)?u&&(x.lineStart(),x.point(i,a),y=!1):(m||(x.lineStart(),x.point(c[0],c[1])),x.point(b[0],b[1]),u||x.lineEnd(),y=!1)}h=i,g=a,m=u}return S}}function dt(n){return function(t){var e=new yt;for(var r in n)e[r]=n[r];return e.stream=t,e}}function yt(){}function xt(n,t,e){var r=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=r&&n.clipExtent(null),g(e,n.stream(tn)),t(tn.result()),null!=r&&n.clipExtent(r),n}function bt(n,t,e){return xt(n,(function(e){var r=t[1][0]-t[0][0],o=t[1][1]-t[0][1],i=Math.min(r/(e[1][0]-e[0][0]),o/(e[1][1]-e[0][1])),a=+t[0][0]+(r-i*(e[1][0]+e[0][0]))/2,u=+t[0][1]+(o-i*(e[1][1]+e[0][1]))/2;n.scale(150*i).translate([a,u])}),e)}yt.prototype={constructor:yt,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var St=E(30*P),wt=function(n,t){return+t?function(n,t){function e(r,o,i,a,u,c,l,s,f,p,v,h,g,m){var d=l-r,y=s-o,x=d*d+y*y;if(x>4*t&&g--){var b=a+p,S=u+v,w=c+h,M=k(b*b+S*S+w*w),C=N(w/=M),P=_(_(w)-1)<1e-6||_(i-f)<1e-6?(i+f)/2:T(S,b),j=n(P,C),E=j[0],O=j[1],L=E-r,z=O-o,F=y*L-d*z;(F*F/x>t||_((d*L+y*z)/x-.5)>.3||a*p+u*v+c*h<St)&&(e(r,o,i,a,u,c,E,O,P,b/=M,S/=M,w,g,m),m.point(E,O),e(E,O,P,b,S,w,l,s,f,p,v,h,g,m))}}return function(t){var r,o,i,a,u,c,l,s,f,p,v,h,g={point:m,lineStart:d,lineEnd:x,polygonStart:function(){t.polygonStart(),g.lineStart=b},polygonEnd:function(){t.polygonEnd(),g.lineStart=d}};function m(e,r){e=n(e,r),t.point(e[0],e[1])}function d(){s=NaN,g.point=y,t.lineStart()}function y(r,o){var i=Wn([r,o]),a=n(r,o);e(s,f,l,p,v,h,s=a[0],f=a[1],l=r,p=i[0],v=i[1],h=i[2],16,t),t.point(s,f)}function x(){g.point=m,t.lineEnd()}function b(){d(),g.point=S,g.lineEnd=w}function S(n,t){y(r=n,t),o=s,i=f,a=p,u=v,c=h,g.point=y}function w(){e(s,f,l,p,v,h,o,i,r,a,u,c,16,t),g.lineEnd=x,x()}return g}}(n,t):function(n){return dt({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}(n)};var Mt=dt({point:function(n,t){this.stream.point(n*P,t*P)}});function Ct(n,t,e){function r(r,o){return[t+n*r,e-n*o]}return r.invert=function(r,o){return[(r-t)/n,(e-o)/n]},r}function Pt(n,t,e,r){var o=E(r),i=O(r),a=o*n,u=i*n,c=o/n,l=i/n,s=(i*e-o*t)/n,f=(i*t+o*e)/n;function p(n,r){return[a*n-u*r+t,e-u*n-a*r]}return p.invert=function(n,t){return[c*n-l*t+s,f-l*n-c*t]},p}function _t(n){return function(n){var t,e,r,o,i,a,u,c,s,f,p=150,v=480,h=250,g=0,m=0,d=0,y=0,x=0,b=0,S=null,w=at,M=null,_=l,j=.5;function T(n){return c(n[0]*P,n[1]*P)}function E(n){return(n=c.invert(n[0],n[1]))&&[n[0]*C,n[1]*C]}function O(){var n=Pt(p,0,0,b).apply(null,t(g,m)),r=(b?Pt:Ct)(p,v-n[0],h-n[1],b);return e=lt(d,y,x),u=ut(t,r),c=ut(e,u),a=wt(u,j),L()}function L(){return s=f=null,T}return T.stream=function(n){return s&&f===n?s:s=Mt(function(n){return dt({point:function(t,e){var r=n(t,e);return this.stream.point(r[0],r[1])}})}(e)(w(a(_(f=n)))))},T.preclip=function(n){return arguments.length?(w=n,S=void 0,L()):w},T.postclip=function(n){return arguments.length?(_=n,M=r=o=i=null,L()):_},T.clipAngle=function(n){return arguments.length?(w=+n?gt(S=n*P):(S=null,at),L()):S*C},T.clipExtent=function(n){return arguments.length?(_=null==n?(M=r=o=i=null,l):mt(M=+n[0][0],r=+n[0][1],o=+n[1][0],i=+n[1][1]),L()):null==M?null:[[M,r],[o,i]]},T.scale=function(n){return arguments.length?(p=+n,O()):p},T.translate=function(n){return arguments.length?(v=+n[0],h=+n[1],O()):[v,h]},T.center=function(n){return arguments.length?(g=n[0]%360*P,m=n[1]%360*P,O()):[g*C,m*C]},T.rotate=function(n){return arguments.length?(d=n[0]%360*P,y=n[1]%360*P,x=n.length>2?n[2]%360*P:0,O()):[d*C,y*C,x*C]},T.angle=function(n){return arguments.length?(b=n%360*P,O()):b*C},T.precision=function(n){return arguments.length?(a=wt(u,j=n*n),L()):k(j)},T.fitExtent=function(n,t){return bt(T,n,t)},T.fitSize=function(n,t){return function(n,t,e){return bt(n,[[0,0],t],e)}(T,n,t)},T.fitWidth=function(n,t){return function(n,t,e){return xt(n,(function(e){var r=+t,o=r/(e[1][0]-e[0][0]),i=(r-o*(e[1][0]+e[0][0]))/2,a=-o*e[0][1];n.scale(150*o).translate([i,a])}),e)}(T,n,t)},T.fitHeight=function(n,t){return function(n,t,e){return xt(n,(function(e){var r=+t,o=r/(e[1][1]-e[0][1]),i=-o*e[0][0],a=(r-o*(e[1][1]+e[0][1]))/2;n.scale(150*o).translate([i,a])}),e)}(T,n,t)},function(){return t=n.apply(this,arguments),T.invert=t.invert&&E,O()}}((function(){return n}))()}function jt(n,t){return[n,t]}jt.invert=jt;var Tt,Et,Ot,Lt=m(),kt={sphere:z,point:z,lineStart:function(){kt.point=zt,kt.lineEnd=Nt},lineEnd:z,polygonStart:z,polygonEnd:z};function Nt(){kt.point=kt.lineEnd=z}function zt(n,t){Tt=n*=P,Et=O(t*=P),Ot=E(t),kt.point=Ft}function Ft(n,t){n*=P;var e=O(t*=P),r=E(t),o=_(n-Tt),i=E(o),a=r*O(o),u=Ot*e-Et*r*i,c=Et*e+Ot*r*i;Lt.add(T(k(a*a+u*u),c)),Tt=n,Et=e,Ot=r}var Rt=[null,null],Dt={type:"LineString",coordinates:Rt},It=function(n,t){return Rt[0]=n,Rt[1]=t,e=Dt,Lt.reset(),g(e,kt),+Lt;var e},At={Feature:function(n,t){return Vt(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,o=e.length;++r<o;)if(Vt(e[r].geometry,t))return!0;return!1}},Ut={Sphere:function(){return!0},Point:function(n,t){return Gt(n.coordinates,t)},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,o=e.length;++r<o;)if(Gt(e[r],t))return!0;return!1},LineString:function(n,t){return Wt(n.coordinates,t)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,o=e.length;++r<o;)if(Wt(e[r],t))return!0;return!1},Polygon:function(n,t){return qt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,o=e.length;++r<o;)if(qt(e[r],t))return!0;return!1},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,o=e.length;++r<o;)if(Vt(e[r],t))return!0;return!1}};function Vt(n,t){return!(!n||!Ut.hasOwnProperty(n.type))&&Ut[n.type](n,t)}function Gt(n,t){return 0===It(n,t)}function Wt(n,t){for(var e,r,o,i=0,a=n.length;i<a;i++){if(0===(r=It(n[i],t)))return!0;if(i>0&&(o=It(n[i],n[i-1]))>0&&e<=o&&r<=o&&(e+r-o)*(1-Math.pow((e-r)/o,2))<1e-12*o)return!0;e=r}return!1}function qt(n,t){return!!Zn(n.map(Bt),Ht(t))}function Bt(n){return(n=n.map(Ht)).pop(),n}function Ht(n){return[n[0]*P,n[1]*P]}var Yt=e(0),Kt={topojsonData:"https://s5.ssl.qhres.com/static/843bbd2c37f94f26.json",coronaTexture:"https://p5.ssl.qhimg.com/t0198a3387059d4a7f7.jpg"};function Xt(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function Qt(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}let Zt,Jt,$t,ne;"function"!=typeof OffscreenCanvas&&(window.OffscreenCanvas=function(n,t){const e=document.createElement("canvas");return e.width=n,e.height=t,e.transferToImageBitmap=function(){const n=e.cloneNode().getContext("2d");return n.translate(0,e.height),n.scale(1,-1),n.drawImage(e,0,0),n.canvas},e});const te=_t(jt).scale(152.63);async function ee(n=Kt.topojsonData,{strokeColor:t,fillColor:e}={}){const r=await(await fetch(n)).json(),o=i(r,r.objects.countries),a=new OffscreenCanvas(3840,1920).getContext("2d");return a.imageSmoothingEnabled=!1,function({context:n=Zt,countries:t=Jt,projection:e=$t,strokeColor:r="#666",fillColor:o="#000",strokeWidth:i=1.5}={}){Zt=n,Jt=t,$t=e;const a=Rn(e).context(n);return n.save(),n.translate(0,1920),n.scale(1,-1),n.strokeStyle=r,n.lineWidth=i,n.fillStyle=o,n.beginPath(),a(t),n.fill(),n.stroke(),n.restore(),ne=n.canvas.transferToImageBitmap(),ne.originalMap=!0,ne}({context:a,countries:o,projection:te,strokeColor:t,fillColor:e})}function re(n,t,e=1){n/=3840,t/=1920;const r=2*Math.PI,o=Math.PI,i=-e*Math.cos(n*r)*Math.sin(t*o),a=e*Math.cos(t*o),u=e*Math.sin(n*r)*Math.sin(t*o);return new Yt.Vec3(i,a,u)}function oe(n,t,e,r=1){const o=2*Math.PI,i=Math.PI,a=Math.acos(t/r)/i;let u=Math.atan2(-e,n)+Math.PI;return u/=o,[4*u*960,4*a*480]}function ie(n,t,e=1){const[r,o]=te([t,n]);return re(r,o,e)}function ae(n,t,e,r=1){const[o,i]=oe(n,t,e,r);return te.invert([o,i])}te.scale(4*te.scale()).translate([1920,964]);let ue=null,ce=-1;function le(n,{pos:t,latitude:e,longitude:r,countries:o=Jt}={}){if(null==e||null==r){const[o,i]=oe(...t,n.attributes.radius);[r,e]=te.invert([o,i])}if(!o)return{index:-1};let i=-1;o.features.some((n,t)=>{const o=(u=[r,e],((a=n)&&At.hasOwnProperty(a.type)?At[a.type]:Vt)(a,u));var a,u;return o&&(i=t),o});const a=i>=0?function(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(e),!0).forEach((function(t){Qt(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Xt(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}({},o.features[i]):{};return a.index=i,a}function se(n,{pos:t,latitude:e,longitude:r,bitmap:o=ne,countries:i=Jt}={}){if(!i)return{image:null,index:-1};const a=le(n,{pos:t,latitude:e,longitude:r,countries:i}).index;if(a===ce)o=null;else{if(ce=a,a>0){if(!ue){const n=new OffscreenCanvas(3840,1920);ue=n.getContext("2d")}const n=Rn(te).context(ue);ue.clearRect(0,0,3840,1920),ue.drawImage(o,0,0),ue.save(),ue.translate(0,1920),ue.scale(1,-1),ue.fillStyle="#fff",ue.beginPath(),n({type:"FeatureCollection",features:i.features.slice(a,a+1)}),ue.fill(),ue.restore(),o=ue.canvas.transferToImageBitmap()}!function(n,t){if(t){const e=n.program.uniforms.tMap.value,r=e.image;e.image=t,r.close&&!r.originalMap&&r.close(),e.needsUpdate=!0}}(n,o)}return{image:o,index:a}}var fe=e(13);function pe(n,t){if(null==n)return{};var e,r,o=function(n,t){if(null==n)return{};var e,r,o={},i=Object.keys(n);for(r=0;r<i.length;r++)e=i[r],t.indexOf(e)>=0||(o[e]=n[e]);return o}(n,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r<i.length;r++)e=i[r],t.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(o[e]=n[e])}return o}const ve=Yt.shaders.GEOMETRY_WITH_TEXTURE.vertex,he=Yt.shaders.TEXTURE_NORMAL_MAP_300.vertex,ge={radius:1,colors:"#333",rotateX:-30,rotateY:150,widthSegments:64,heightSegments:32};function me(n,t={}){let{program:e,vertex:r=null,fragment:o=null,data:i=Kt.topojsonData,orbit:a=!0,raycast:u=!1,highlight:c=!1,tick:l,sky:s=!0,skyProgram:f=null,corona:p=!0,coronaProgram:v=null,autoResize:h=!0,texture:g=null,normalMap:m=null,bumpMap:d=null,normalScale:y=1}=t,x=pe(t,["program","vertex","fragment","data","orbit","raycast","highlight","tick","sky","skyProgram","corona","coronaProgram","autoResize","texture","normalMap","bumpMap","normalScale"]);const b=n.createTexture({});ee(i).then(t=>{b.image=t,b.needsUpdate=!0,n.forceUpdate()}),e||(e=g?m?n.createProgram({fragment:o||"#version 300 es\nprecision highp float;\nprecision highp int;\n\nuniform vec4 directionalLight; //平行光\n\nuniform sampler2D tMap;\nuniform sampler2D tMapSkin;\nuniform sampler2D tBump;\n\nin vec2 vUv;\nin vec3 vMPos;\nin vec3 vNormal;\nin vec4 vColor;\nin vec3 vLDir;\n\nuniform vec4 pointLightColor; // 点光源颜色\nuniform vec4 ambientColor; // 环境光\n\nuniform vec2 uResolution;\nuniform bool highlight;\n\nuniform sampler2D tNormal;\nuniform float uNormalScale;\nuniform float uNormalUVScale;\nuniform mat4 viewMatrix;\n\nout vec4 FragColor;\n\nvec3 getNormal(float depth) {\n  vec3 pos_dx = dFdx(vMPos.xyz);\n  vec3 pos_dy = dFdy(vMPos.xyz);\n  vec2 tex_dx = dFdx(vUv);\n  vec2 tex_dy = dFdy(vUv);\n\n  vec3 t = normalize(pos_dx * tex_dy.t - pos_dy * tex_dx.t);\n  vec3 b = normalize(-pos_dx * tex_dy.s + pos_dy * tex_dx.s);\n  mat3 tbn = mat3(t, b, normalize(vNormal));\n\n  vec3 n = texture(tNormal, vUv * uNormalUVScale).rgb * 2.0 - 1.0;\n  n.xy *= depth * uNormalScale;\n  vec3 normal = normalize(tbn * n);\n\n  // Get world normal from view normal\n  return normalize((vec4(normal, 0.0) * viewMatrix).xyz);\n}\n\nvoid main() {\n  vec4 color = vColor;\n  vec4 texColor = texture(tMapSkin, vUv);\n  vec4 bgColor = texture(tMap, vUv);\n  float depth = texture(tBump, vUv).x;\n\n  vec2 st = gl_FragCoord.xy / uResolution;\n\n  float alpha = texColor.a;\n  if(highlight) alpha *= mix(0.5, 1.0, bgColor.r);\n  color.rgb = mix(color.rgb, texColor.rgb, alpha);\n  color.rgb = mix(texColor.rgb, color.rgb, clamp(color.a / max(0.0001, texColor.a), 0.0, 1.0));\n  color.a = texColor.a + (1.0 - texColor.a) * color.a;\n\n  vec3 normal = getNormal(depth);\n  float cos = max(dot(vLDir, normal), 0.0);// 计算入射角余弦值\n  vec3 light = normalize(directionalLight.xyz);\n  float shading = dot(normal, light) * directionalLight.w;\n  vec3 diffuse = pointLightColor.rgb * color.rgb * pointLightColor.a * cos;// 计算点光源漫反射颜色\n  vec3 ambient = ambientColor.rgb * color.rgb;// 计算环境光反射颜色\n  color = vec4(diffuse + ambient, color.a);\n\n  float d = distance(st, vec2(0.5));\n  FragColor.rgb = color.rgb + shading + 0.3 * pow((1.0 - d), 3.0);\n  FragColor.a = color.a;\n} ",vertex:r||he,cullFace:null,texture:b,normalMap:m,uniforms:{tMapSkin:{value:g},tBump:{value:d},highlight:{value:c},uNormalScale:{value:y}}}):n.createProgram({fragment:o||"precision highp float;\nprecision highp int;\n\nvarying vec3 vNormal;\nvarying vec4 vColor;\n\nuniform vec4 directionalLight; //平行光\n\nuniform sampler2D tMap;\nuniform sampler2D tMapSkin;\nvarying vec2 vUv;\n\nvarying float fCos;\n\nuniform vec4 pointLightColor; // 点光源颜色\nuniform vec4 ambientColor; // 环境光\n\nuniform vec2 uResolution;\nuniform bool highlight;\n\nvoid main() {\n  vec4 color = vColor;\n  vec4 texColor = texture2D(tMapSkin, vUv);\n  vec4 bgColor = texture2D(tMap, vUv);\n\n  vec2 st = gl_FragCoord.xy / uResolution;\n\n  vec3 light = normalize(directionalLight.xyz);\n  float shading = dot(vNormal, light) * directionalLight.w;\n\n  float alpha = texColor.a;\n  if(highlight) alpha *= mix(0.5, 1.0, bgColor.r);\n  color.rgb = mix(color.rgb, texColor.rgb, alpha);\n  color.rgb = mix(texColor.rgb, color.rgb, clamp(color.a / max(0.0001, texColor.a), 0.0, 1.0));\n  color.a = texColor.a + (1.0 - texColor.a) * color.a;\n\n  vec3 diffuse = pointLightColor.rgb * color.rgb * pointLightColor.a * fCos;// 计算点光源漫反射颜色\n  vec3 ambient = ambientColor.rgb * color.rgb;// 计算环境光反射颜色\n\n  color = vec4(diffuse + ambient, color.a);\n\n  float d = distance(st, vec2(0.5));\n\n  gl_FragColor.rgb = color.rgb + shading + 0.3 * pow((1.0 - d), 3.0);\n  gl_FragColor.a = color.a;\n} ",vertex:r||ve,cullFace:null,texture:b,uniforms:{tMapSkin:{value:g},highlight:{value:c}}}):m?n.createProgram({fragment:o||"#version 300 es\n\nprecision highp float;\nprecision highp int;\n\nuniform vec4 directionalLight; //平行光\nuniform sampler2D tMap;\nuniform sampler2D tBump;\n\nin vec2 vUv;\nin vec3 vMPos;\nin vec3 vNormal;\nin vec4 vColor;\nin vec3 vLDir;\n\nuniform vec4 pointLightColor; // 点光源颜色\nuniform vec4 ambientColor; // 环境光\n\nuniform vec2 uResolution;\n\nuniform sampler2D tNormal;\nuniform float uNormalScale;\nuniform float uNormalUVScale;\nuniform mat4 viewMatrix;\n\nout vec4 FragColor;\n\nvec3 getNormal(float depth) {\n  vec3 pos_dx = dFdx(vMPos.xyz);\n  vec3 pos_dy = dFdy(vMPos.xyz);\n  vec2 tex_dx = dFdx(vUv);\n  vec2 tex_dy = dFdy(vUv);\n\n  vec3 t = normalize(pos_dx * tex_dy.t - pos_dy * tex_dx.t);\n  vec3 b = normalize(-pos_dx * tex_dy.s + pos_dy * tex_dx.s);\n  mat3 tbn = mat3(t, b, normalize(vNormal));\n\n  vec3 n = texture(tNormal, vUv * uNormalUVScale).rgb * 2.0 - 1.0;\n  n.xy *= depth * uNormalScale;\n  vec3 normal = normalize(tbn * n);\n\n  // Get world normal from view normal\n  return normalize((vec4(normal, 0.0) * viewMatrix).xyz);\n}\n\nvoid main() {\n  vec4 color = vColor;\n  vec4 texColor = texture(tMap, vUv);\n  vec2 st = gl_FragCoord.xy / uResolution;\n  float depth = texture(tBump, vUv).x;\n\n  float alpha = texColor.a;\n  color.rgb = mix(color.rgb, texColor.rgb, alpha);\n  color.rgb = mix(texColor.rgb, color.rgb, clamp(color.a / max(0.0001, texColor.a), 0.0, 1.0));\n  color.a = texColor.a + (1.0 - texColor.a) * color.a;\n\n  vec3 normal = getNormal(depth);\n  float cos = max(dot(vLDir, normal), 0.0);// 计算入射角余弦值\n  vec3 light = normalize(directionalLight.xyz);\n  float shading = dot(normal, light) * directionalLight.w;\n  vec3 diffuse = pointLightColor.rgb * color.rgb * pointLightColor.a * cos;// 计算点光源漫反射颜色\n  vec3 ambient = ambientColor.rgb * color.rgb;// 计算环境光反射颜色\n  color = vec4(diffuse + ambient, color.a);\n\n  float d = distance(st, vec2(0.5));\n\n  FragColor.rgb = color.rgb + shading; // + 0.3 * pow((1.0 - d), 3.0);\n  FragColor.a = color.a;\n} ",vertex:r||he,normalMap:m,uniforms:{tBump:{value:d},uNormalScale:{value:y}},cullFace:null,texture:b}):n.createProgram({fragment:o||"precision highp float;\nprecision highp int;\n\nvarying vec3 vNormal;\nvarying vec4 vColor;\n\nuniform vec4 directionalLight; //平行光\n\nuniform sampler2D tMap;\nvarying vec2 vUv;\n\nvarying float fCos;\n\nuniform vec4 pointLightColor; // 点光源颜色\nuniform vec4 ambientColor; // 环境光\n\nuniform vec2 uResolution;\n\nvoid main() {\n  vec4 color = vColor;\n  vec4 texColor = texture2D(tMap, vUv);\n  vec2 st = gl_FragCoord.xy / uResolution;\n\n  vec3 light = normalize(directionalLight.xyz);\n  float shading = dot(vNormal, light) * directionalLight.w;\n\n  float alpha = texColor.a;\n  color.rgb = mix(color.rgb, texColor.rgb, alpha);\n  color.rgb = mix(texColor.rgb, color.rgb, clamp(color.a / max(0.0001, texColor.a), 0.0, 1.0));\n  color.a = texColor.a + (1.0 - texColor.a) * color.a;\n\n  vec3 diffuse = pointLightColor.rgb * color.rgb * pointLightColor.a * fCos;// 计算点光源漫反射颜色\n  vec3 ambient = ambientColor.rgb * color.rgb;// 计算环境光反射颜色\n\n  color = vec4(diffuse + ambient, color.a);\n\n  float d = distance(st, vec2(0.5));\n\n  gl_FragColor.rgb = color.rgb + shading + 0.3 * pow((1.0 - d), 3.0);\n  gl_FragColor.a = color.a;\n} ",vertex:r||ve,cullFace:null,texture:b})),x=Object.assign({},ge,x);const S=new Yt.Sphere(e,x);if(n.append(S),S.enableOrbit=a,S.updateTicker=!0,a&&n.setOrbit({maxDistance:50}),u&&n.setRaycast(),l&&n.tick(()=>{S.updateTicker&&l.call(S)}),s&&function(n,t){t=t||n.createProgram({vertex:"precision highp float;\nprecision highp int;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec2 uv;\n\nuniform mat3 normalMatrix;\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\n\nvarying vec2 vUv;\n\nvoid main() {\n  vUv = uv;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}",fragment:"precision highp float;\nprecision highp int;\nvarying vec2 vUv;\n\nhighp float random(vec2 co)\n{\n  highp float a = 12.9898;\n  highp float b = 78.233;\n  highp float c = 43758.5453;\n  highp float dt= dot(co.xy ,vec2(a,b));\n  highp float sn= mod(dt,3.14);\n  return fract(sin(sn) * c);\n}\n\n// Value Noise by Inigo Quilez - iq/2013\n// https://www.shadertoy.com/view/lsf3WH\nhighp float noise(vec2 st) {\n  vec2 i = floor(st);\n  vec2 f = fract(st);\n  vec2 u = f * f * (3.0 - 2.0 * f);\n  return mix( mix( random( i + vec2(0.0,0.0) ),\n                   random( i + vec2(1.0,0.0) ), u.x),\n              mix( random( i + vec2(0.0,1.0) ),\n                   random( i + vec2(1.0,1.0) ), u.x), u.y);\n}\n\nvoid main() {\n  gl_FragColor.rgb = vec3(1.0);\n  gl_FragColor.a = step(0.93, noise(vUv * 6000.0));\n}",transparent:!0,cullFace:null});const e=new Yt.Sphere(t);e.attributes.scale=100,n.append(e)}(n,f),p&&function(n,t,e,r){const o=function(){const n=[];for(let t=0;t<=128;t++){const e=2*Math.PI*t/128,r=t/129,o=Math.cos(e),i=Math.sin(e);n.push(o,i,r,0,o,i,r,1)}return{data:n,size:4}}(),i=new Yt.Geometry(n.gl,{position:o}),a=n.createTexture({image:Kt.coronaTexture,generateMipmaps:!0,wrapS:n.gl.REPEAT,wrapT:n.gl.CLAMP_TO_EDGE});t=t||n.createProgram({vertex:"precision highp float;\nprecision highp int;\n\nattribute vec4 position;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat3 normalMatrix;\n\nuniform float zoff;\n\nvarying vec2 v_texcoord;\n\n// corona.vertex //\nvoid main() {\n  float s = 1.0 + (0.9 * position.w);\n  vec3 P = vec3(s * position.xy, zoff);\n  P = normalMatrix * P;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(P, 1.0);\n  v_texcoord = position.zw;\n}  ",fragment:"precision highp float;\nprecision highp int;\n\nuniform sampler2D tMap;\nuniform float uTime;\nuniform vec4 color0;\nuniform vec3 color1;\n\nvarying vec2 v_texcoord;\n\nvoid main() {\n  vec2 uv = vec2(5.0 * v_texcoord.x + 0.01 * uTime, 0.8 - 1.5 * v_texcoord.y);\n  float smoke = texture2D(tMap, uv).r;\n  uv = vec2(3.0 * v_texcoord.x - 0.007 * uTime, 0.9 - 0.5 * v_texcoord.y);\n  smoke *= 1.5 * texture2D(tMap, uv).r;\n\n  float t = pow(v_texcoord.y, 0.25);\n  gl_FragColor.rgb = mix(color0.rgb, color1, t) + 0.3 * smoke;\n  gl_FragColor.a = color0.a;\n}",texture:a,uniforms:{zoff:{value:0},uTime:{value:0},color0:{value:new fe.Color(r)},color1:{value:[0,0,0]}},transparent:!0}),n.bindTime(t);const u=new Yt.Mesh3d(t,{model:i,mode:"TRIANGLE_STRIP",raycast:"none"}),c=n.createSublayer();c.append(u),n.append(c),e&&n.setOrbit({camera:c.camera,maxDistance:50,enableRotate:!1}),n.corona=c}(n,v,a,"boolean"==typeof p?"rgb(18, 64, 41)":p),h){let{width:t}=n.getResolution();n.addEventListener("resolutionchange",function(n,t=300){let e=null;return function(...r){e&&clearTimeout(e),e=setTimeout(()=>{n.apply(this,r)},t)}}(e=>{const{width:r}=e.detail,o=n.camera;n.setOrbit(null);const i=(new Yt.Vec3).copy(o.attributes.pos).scale(t/r);o.attributes.pos=i;const u=n.corona;u&&(u.camera.attributes.z*=t/r,a&&n.setOrbit({camera:u.camera,maxDistance:50,enableRotate:!1})),a&&n.setOrbit({maxDistance:50}),t=r}))}return c&&S.addEventListener("mousemove",n=>{se(S,{pos:n.hit.localPoint})}),S}function de(n,t,e){let{latitude:r,longitude:o,transpose:i=!1}=e,a=pe(e,["latitude","longitude","transpose"]);const u=n.attributes.radius;if(i&&t.transpose(),null!=r&&null!=o){const n=t.attributes.scaleY*(a.scale||1),e=t.attributes.height,i=ie(r,o,u);i.scale(.5*e*n/u+1),a.pos=i}t.attr(a);const c=(new Yt.Vec3).copy(a.pos).scale(2);t.lookAt(c),n.append(t)}function ye(n,t,{width:e,height:r,speed:o,color:i,segments:a}){const u=n.createProgram({transparent:!0,vertex:"precision highp float;\nprecision highp int;\n\nattribute vec4 position;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat3 normalMatrix;\n\nuniform float uTime;\nuniform float uWidth;\nuniform float uSpeed;\nuniform float uHeight;\n\nvarying float time;\n\nvoid main() {\n  time = mod(uTime, 1.5 / uSpeed) * uSpeed + position.z - 1.0;\n  float d = clamp(0.0, uWidth * mix(1.0, 0.5, min(1.0, uHeight)), time);\n  float s = d + (0.1 * position.w);\n  vec3 P = vec3(s * position.xy, uHeight * time);\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(P, 1.0);\n}",fragment:"precision highp float;\nprecision highp int;\n\nuniform vec2 uResolution;\nuniform vec3 uColor;\n\nvarying float time;\n\nvoid main() {\n  float t = clamp(0.0, 1.0, time);\n  gl_FragColor.rgb = uColor;\n  gl_FragColor.a = 1.0 - t;\n}",uniforms:{uTime:{value:0},uColor:{value:new fe.Color(i).slice(0,3)},uWidth:{value:e},uSpeed:{value:o},uHeight:{value:r}}}),c=new Yt.Geometry(n.gl,function(n=1,t){const e=[];for(let r=0;r<=t;r++){const o=2*Math.PI*r/t,i=n*Math.cos(o),a=n*Math.sin(o);e.push(i,a,1,0,i,a,1,1)}const r=[...e];return e.push(...r.map((n,t)=>t%4==2?.33:n)),e.push(...r.map((n,t)=>t%4==2?.67:n)),{position:{data:e,size:4}}}(t.attributes.radius,a)),l=n.createProgram({transparent:!0,vertex:"precision highp float;\nprecision highp int;\n\nattribute vec4 position;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat3 normalMatrix;\n\nuniform float uTime;\nuniform float uWidth;\nuniform float uSpeed;\nuniform float uHeight;\n\nvarying float time;\nvarying vec2 st;\n\nvoid main() {\n  time = mod(uTime, 1.5 / uSpeed) * uSpeed + position.z - 1.0;\n  float s = 0.0 + (0.2 * uWidth * position.w);\n  vec3 P = vec3(s * position.xy, 0.0);\n  st = P.xy;\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(P, 1.0);\n}",fragment:"precision highp float;\nprecision highp int;\n\nuniform vec2 uResolution;\nuniform vec3 uColor;\nuniform float uWidth;\n\nvarying float time;\nvarying vec2 st;\n\nvoid main() {\n  float d = distance(st, vec2(0));\n  gl_FragColor.rgb = uColor + 1.5 * (0.2 * uWidth - 2.0 * d);\n  gl_FragColor.a = 1.0;\n}",uniforms:{uTime:{value:0},uColor:{value:new fe.Color(i).slice(0,3)},uWidth:{value:e},uSpeed:{value:o},uHeight:{value:r}}});return{program:u,geometry:c,spotGeometry:new Yt.Geometry(n.gl,function(n=1,t){const e=[];for(let r=0;r<=t;r++){const o=2*Math.PI*r/t,i=n*Math.cos(o),a=n*Math.sin(o);e.push(i,a,1,0,i,a,1,1)}return{position:{data:e,size:4}}}(t.attributes.radius,a)),spotProgram:l,mode:"TRIANGLE_STRIP"}}function xe(n,{latitude:t,longitude:e,width:r=1,height:o=0,speed:i=1,color:a="rgb(245,250,113)",segments:u=60,lifeTime:c=1/0}={}){const l=n.layer,s=n.attributes.radius;if(l){let f="TRIANGLES";const p=ye(l,n,{width:r,height:o,speed:i,color:a,segments:u}),v=p.program,h=p.geometry,g=p.spotProgram,m=p.spotGeometry;if(f=p.mode,v){const r=ie(t,e,s),o=new Yt.Mesh3d(v,{model:h,mode:f}),i=new Yt.Mesh3d(g,{model:m,mode:f});return de(n,o,{pos:r,scale:.05,raycast:"none"}),de(n,i,{pos:r,scale:.05,raycast:"none"}),l.bindTime(o.program),Number.isFinite(c)&&setTimeout(()=>{l.unbindTime(o.program),o.dispose(),i.dispose(),o.program.remove(),i.program.remove()},c),{marker:o,spot:i}}}}function be(n,{latitude:t,longitude:e,width:r=1,height:o=25,color:i="rgba(245,250,113, 0.5)",raycast:a="none",segments:u=60}={}){const c=n.layer,l=n.attributes.radius;if(c){const s=r/2,f=.015*l,p=c.createProgram({transparent:!0,vertex:"precision highp float;\nprecision highp int;\n\nattribute vec3 position;\nattribute vec3 normal;\nattribute vec4 color;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform mat3 normalMatrix;\n\nvarying vec3 vNormal;\nvarying vec4 vColor;\n\nuniform vec3 pointLightPosition; //点光源位置\nuniform vec4 pointLightColor; // 点光源颜色\nuniform vec4 ambientColor; // 环境光\nuniform float uHeight;\n\nvoid main() {\n  vNormal = normalize(normalMatrix * normal);\n\n  vec3 dir = normalize(pointLightPosition - position);// 计算点光源入射光线反方向并归一化\n  float cos = max(dot(dir, vNormal), 0.0);// 计算入射角余弦值\n  vec3 diffuse = pointLightColor.rgb * color.rgb * pointLightColor.a * cos;// 计算点光源漫反射颜色\n  vec3 ambient = ambientColor.rgb * color.rgb;// 计算环境光反射颜色\n  \n  float height = 0.5 - position.z / uHeight;\n\n  vColor = vec4(diffuse + ambient + 0.3 * sin(height), color.a * height);\n  // vColor = color;\n\n  vec3 P = position;\n  P.xy *= 2.0 - pow(height, 3.0);\n\n  gl_Position = projectionMatrix * modelViewMatrix * vec4(P, 1.0);\n}",fragment:"precision highp float;\nprecision highp int;\n\nvarying vec3 vNormal;\nvarying vec4 vColor;\n\nuniform vec4 directionalLight; //平行光 xyz - 向量位置, w - 强度\n\nvoid main() {\n  float light = dot(vNormal, normalize(directionalLight.xyz));\n  gl_FragColor.rgb = vColor.rgb + light * directionalLight.w;\n  gl_FragColor.a = vColor.a;\n}",uniforms:{uHeight:{value:o}}}),v=new Yt.Cylinder(p,{radiusTop:s,radiusBottom:s,radialSegments:u,height:o,colors:i});return de(n,v,{transpose:!0,latitude:t,longitude:e,scale:f,raycast:a}),v}}function Se(n,{from:t,to:e,color:r="rgb(232,22,140)",thickness:o=1,height:i=1,lifeTime:a=1e3}){const u=n.layer;if(u){const c=function(n,t,{radius:e=1,height:r=1}={}){n=ie(n.latitude,n.longitude,e),t=ie(t.latitude,t.longitude,e);const o=n.distance(t),i=Math.max(Math.floor(o*e*100),24),a=[];a.push(n);for(let e=1;e<i;e++){const o=e/i,u=.5-Math.abs(o-.5),c=(new Yt.Vec3).copy(n).lerp(t,o).normalize().scale(1+.1*r*u);a.push(c)}return a.push(t),a}(t,e,{radius:n.attributes.radius,height:i}),l=u.createProgram({transparent:!0,vertex:"precision highp float;\nattribute vec3 position;\nattribute vec3 next;\nattribute vec3 prev;\nattribute float side;\nattribute vec4 color;\nattribute float seg;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform vec2 uResolution;\nuniform float uDPR;\nuniform float uThickness;\nuniform float uMiter;\n\nuniform float uTotalLength;\nuniform float uTime;\nuniform float uDuration;\n\nvarying vec4 vColor;\nvarying float fSeg;\n\nfloat getThickness(float sp, float sp2) {\n  float p = clamp(0.0, 1.0, uTime * 3.0 / 4.0 / uDuration) * 2.0;\n  float ep;\n  if(p < 0.5) {\n    ep = 1.0 - step(p, sp);\n  }\n  else if(p < 1.0) {\n    ep = (1.0 - step(p, sp)) * step(p - 0.5, sp);\n  }\n  else {\n    ep = step(p - 1.0, sp) * step(p - 0.5, sp);\n  }\n  return uThickness * ep;\n}\n\nvec4 getPosition() {\n  mat4 mvp = projectionMatrix * modelViewMatrix;\n  vec4 current = mvp * vec4(position, 1);\n\n  vec4 nextPos = mvp * vec4(next, 1);\n  vec4 prevPos = mvp * vec4(prev, 1);\n  vec2 aspect = vec2(uResolution.x / uResolution.y, 1);    \n  vec2 currentScreen = current.xy / current.w * aspect;\n  vec2 nextScreen = nextPos.xy / nextPos.w * aspect;\n  vec2 prevScreen = prevPos.xy / prevPos.w * aspect;\n\n  vec2 dir1 = normalize(currentScreen - prevScreen);\n  vec2 dir2 = normalize(nextScreen - currentScreen);\n  vec2 dir = normalize(dir1 + dir2);\n\n  vec2 normal = vec2(-dir.y, dir.x);\n  normal /= mix(1.0, max(0.3, dot(normal, vec2(-dir1.y, dir1.x))), uMiter);\n  normal /= aspect;\n  float pixelWidthRatio = 1.0 / (uResolution.y / uDPR);\n  float pixelWidth = current.w * pixelWidthRatio;\n  float sp = (seg - distance(current.xyz, prevPos.xyz)) / uTotalLength;\n  float sp2 = (seg + distance(current.xyz, nextPos.xyz)) / uTotalLength;\n  normal *= pixelWidth * getThickness(sp, sp2);\n  // normal *= pixelWidth * uThickness;\n  current.xy -= normal * side;\n  return current;\n}\n\nvoid main() {\n  gl_Position = getPosition();\n  vColor = color;\n  fSeg = seg;\n}",fragment:"precision highp float;\n\nuniform float uTotalLength;\nuniform float uTime;\nuniform float uDuration;\n\nvarying vec4 vColor;\nvarying float fSeg;\n\nvoid main() {\n  float p = clamp(0.0, 1.0, uTime * 3.0 / 4.0 / uDuration) * 2.0;\n  float sp = fSeg / uTotalLength;\n  float ep;\n  float light = 0.0;\n  if(p < 0.5) {\n    ep = (1.0 - step(p, sp)) * smoothstep(0.0, 0.3, sp);\n    light = ep * abs(sp - 0.5 * p) / 0.5 * p;\n  }\n  else if(p < 1.0) {\n    ep = (1.0 - step(p, sp)) * smoothstep(p - 0.5, p - 0.2, sp);\n    light = ep * abs(p - 0.5 - sp) / 0.5;\n  }\n  else {\n    ep = step(p - 1.0, sp) * smoothstep(p - 0.5, p - 0.2, sp);\n  }\n  gl_FragColor.rgb = vColor.rgb + 0.35 * light * ep; // TODO: 亮度用 hsb 调\n  gl_FragColor.a = vColor.a * ep;\n}",uniforms:{uThickness:{value:1.5*o},uTime:{value:0},uDuration:{value:.001*a}},depthTest:!0});u.bindTime(l);const s=(new Yt.Vec3).copy(c[Math.floor(.5*c.length)]).scale(10),f=c.map((n,t)=>[n[0]-s[0],n[1]-s[1],n[2]-s[2]]),p=new Yt.Polyline3d(l,{points:f,colors:r,pos:s});n.append(p),setTimeout(()=>{u.unbindTime(l),p.dispose(),l.remove()},1.2*a)}}function we(n,{from:t,to:e,color:r="rgb(232,22,140)",thickness:o=1,height:i=1,dashLength:a=1e7,dashOffset:u=0}){const c=n.layer;if(c){const l=n.attributes.radius,s=ie(t.latitude,t.longitude,l),f=ie(e.latitude,e.longitude,l),p=(new Yt.Vec3).copy(s).lerp(f,.382).normalize().scale(1+.382*i),v=new Yt.Curve({points:[s,p,f],type:Yt.Curve.QUADRATICBEZIER}).getPoints(50),h=c.createProgram({transparent:!0,vertex:"precision highp float;\nattribute vec3 position;\nattribute vec3 next;\nattribute vec3 prev;\nattribute vec2 uv;\nattribute float side;\nattribute vec4 color;\nattribute float seg;\n\nuniform mat4 modelViewMatrix;\nuniform mat4 projectionMatrix;\nuniform vec2 uResolution;\nuniform float uDPR;\nuniform float uThickness;\nuniform float uMiter;\nuniform float uTotalLength;\n\nvarying vec2 vUv;\nvarying vec4 vColor;\nvarying float fSeg;\n\nvec4 getPosition() {\n  mat4 mvp = projectionMatrix * modelViewMatrix;\n  vec4 current = mvp * vec4(position, 1);\n  vec4 nextPos = mvp * vec4(next, 1);\n  vec4 prevPos = mvp * vec4(prev, 1);\n  vec2 aspect = vec2(uResolution.x / uResolution.y, 1);    \n  vec2 currentScreen = current.xy / current.w * aspect;\n  vec2 nextScreen = nextPos.xy / nextPos.w * aspect;\n  vec2 prevScreen = prevPos.xy / prevPos.w * aspect;\n\n  vec2 dir1 = normalize(currentScreen - prevScreen);\n  vec2 dir2 = normalize(nextScreen - currentScreen);\n  vec2 dir = normalize(dir1 + dir2);\n\n  vec2 normal = vec2(-dir.y, dir.x);\n  normal /= mix(1.0, max(0.3, dot(normal, vec2(-dir1.y, dir1.x))), uMiter);\n  normal /= aspect;\n  float pixelWidthRatio = 1.0 / (uResolution.y / uDPR);\n  float pixelWidth = current.w * pixelWidthRatio * 2.0 - fSeg / uTotalLength;\n  normal *= pixelWidth * uThickness;\n  current.xy -= normal * side;\n  return current;\n}\n\nvoid main() {\n  vUv = uv;\n  gl_Position = getPosition();\n  vColor = color;\n  fSeg = seg;\n}",fragment:"precision highp float;\n\nuniform float uTotalLength;\nuniform float uDashLength;\nuniform float uDashOffset;\nuniform float uTime;\n\nvarying vec4 vColor;\nvarying vec2 vUv;\nvarying float fSeg;\n\n/**\n  rgb/hsb颜色转换\n */\nvec3 rgb2hsb(vec3 c){\n  vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n  vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\n  vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));\n  float d = q.x - min(q.w, q.y);\n  float e = 1.0e-10;\n  return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n}\n\n//  Function from Iñigo Quiles\n//  https://www.shadertoy.com/view/MsS3Wc\nvec3 hsb2rgb(vec3 c){\n  vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0), 6.0)-3.0)-1.0, 0.0, 1.0);\n  rgb = rgb * rgb * (3.0 - 2.0 * rgb);\n  return c.z * mix(vec3(1.0), rgb, c.y);\n}\n\n#define PI 3.141592653589793\n\nvoid main() {\n  float f = fract((uDashOffset + fSeg) / (2.0 * uDashLength));\n  f = 1.0 - step(0.5, f);\n  float t = 1.0 - fSeg / uTotalLength;\n\n  vec3 color = rgb2hsb(vColor.rgb);\n  color.z += 1.618 * mix(-0.2, 1.0, 0.5 + 0.5 * sin(2.5 * uTime + PI * t));\n  color = hsb2rgb(color);\n\n  float alpha = 0.2 + 0.8 * vColor.a * t;\n\n  gl_FragColor = vec4(color, alpha) * f;\n}",uniforms:{uThickness:{value:o},uDashLength:{value:a},uDashOffset:{value:u},uTime:{value:0}}});c.bindTime(h);const g=(new Yt.Vec3).copy(v[Math.floor(.5*v.length)]).scale(10),m=v.map((n,t)=>[n[0]-g[0],n[1]-g[1],n[2]-g[2]]),d=new Yt.Polyline3d(h,{points:m,colors:r,pos:g});return n.append(d),d}}function Me(n,{to:t,latitude:e,longitude:r,duration:o=500}){const i=n.layer;if(!i)return;const a=n.enableOrbit,u=n.attributes.radius;a&&i.setOrbit(null);const c=i.camera,l=new Yt.Vec3(...c.attributes.pos),s=l.len(),f=(new Yt.Mat4).copy(n.worldMatrix);null!=e&&null!=r&&(t=ie(e,r,u)),t.applyMatrix4(f).scale(s);const p=Date.now();n.updateTicker=!1,function e(){const r=Math.min((Date.now()-p)/o),u=(new Yt.Vec3).copy(l).lerp(t,r).normalize().scale(s);if(c.attributes.pos=u,c.lookAt([0,0,0]),r<1)requestAnimationFrame(e);else if(a){n.updateTicker=!0,i.setOrbit({maxDistance:50});const t=i.corona;t&&i.setOrbit({camera:t.camera,maxDistance:50,enableRotate:!1})}}()}}])}));