UNPKG

@supermapgis/iclient-maplibregl

Version:

@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台, 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源,为用户提供了完整专业的 GIS 能力, 同时提供了优秀的可视化功能。

40 lines 1.75 MB
/*!
  *     forked from antvis/L7
  *     Copyright (c) 2018 AntV team
  *     Copyright© 2000-2024 SuperMap Software Co. Ltdnpm
  *     license: MIT
  *     version: 20250527
  */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("maplibre-gl")):"function"==typeof define&&define.amd?define(["exports","maplibre-gl"],t):t((e=e||self).L7={},e.maplibregl)}(this,(function(e,t){"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,o=Object.create(i.prototype),s=new P(n||[]);return a(o,"_invoke",{value:w(e,r,s)}),o}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var p="suspendedStart",d="executing",v="completed",g={};function m(){}function y(){}function _(){}var b={};l(b,s,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(I([])));S&&S!==r&&n.call(S,s)&&(b=S);var E=_.prototype=m.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function r(i,a,o,s){var u=f(e[i],e,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(l).then((function(e){c.value=e,o(c)}),(function(e){return r("throw",e,o,s)}))}s(u.arg)}var i;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,i){r(e,n,t,i)}))}return i=i?i.then(a,a):a()}})}function w(t,r,n){var i=p;return function(a,o){if(i===d)throw new Error("Generator is already running");if(i===v){if("throw"===a)throw o;return{value:e,done:!0}}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var u=C(s,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=f(t,r,n);if("normal"===c.type){if(i=n.done?v:"suspendedYield",c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function C(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=f(i,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var o=a.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=_,a(E,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:y,configurable:!0}),y.displayName=l(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,c,"GeneratorFunction")),e.prototype=Object.create(E),e},t.awrap=function(e){return{__await:e}},A(T.prototype),l(T.prototype,u,(function(){return this})),t.AsyncIterator=T,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new T(h(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(E),l(E,c,"Generator"),l(E,s,(function(){return this})),l(E,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(M),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var u=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),M(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;M(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)}))}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M(n.key),n)}}function l(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return(t=M(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function v(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function g(e,t,r){return(g=v()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&d(i,r.prototype),i}).apply(null,arguments)}function m(e){var t="function"==typeof Map?new Map:void 0;return(m=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return g(e,arguments,p(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,e)})(e)}function y(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _(e)}function x(e){var t=v();return function(){var r,n=p(e);if(t){var i=p(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b(this,r)}}function S(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}function E(){return(E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=S(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}}).apply(this,arguments)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function k(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function M(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function P(e,t,r,n){r&&Object.defineProperty(e,t,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function I(e,t,r,n,i){var a={};return Object.keys(n).forEach((function(e){a[e]=n[e]})),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=r.slice().reverse().reduce((function(r,n){return n(e,t,r)||r}),a),i&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(i):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t;var O,R="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function L(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function N(e,t){return e(t={exports:{}},t.exports),t.exports
/*! *****************************************************************************
  Copyright (C) Microsoft. All rights reserved.
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  this file except in compliance with the License. You may obtain a copy of the
  License at http://www.apache.org/licenses/LICENSE-2.0

  THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  MERCHANTABLITY OR NON-INFRINGEMENT.

  See the Apache Version 2.0 License for specific language governing permissions
  and limitations under the License.
  ***************************************************************************** */}!function(e){!function(t){var r="object"==typeof R?R:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=i(e);function i(e,t){return function(r,n){"function"!=typeof e[r]&&Object.defineProperty(e,r,{configurable:!0,writable:!0,value:n}),t&&t(r,n)}}void 0===r.Reflect?r.Reflect=e:n=i(r.Reflect,n),function(e){var t=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",i=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",a="function"==typeof Object.create,o={__proto__:[]}instanceof Array,s=!a&&!o,u={create:a?function(){return O(Object.create(null))}:o?function(){return O({__proto__:null})}:function(){return O({})},has:s?function(e,r){return t.call(e,r)}:function(e,t){return t in e},get:s?function(e,r){return t.call(e,r)?e[r]:void 0}:function(e,t){return e[t]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,h=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?function(){var e={},t=[],r=function(){function e(e,t,r){this._index=0,this._keys=e,this._values=t,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[i]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=t,this._values=t):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=t,this._values=t),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=t,this._values=t),{value:e,done:!0}},e}();return function(){function t(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(t.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),t.prototype.has=function(e){return this._find(e,!1)>=0},t.prototype.get=function(e){var t=this._find(e,!1);return t>=0?this._values[t]:void 0},t.prototype.set=function(e,t){var r=this._find(e,!0);return this._values[r]=t,this},t.prototype.delete=function(t){var r=this._find(t,!1);if(r>=0){for(var n=this._keys.length,i=r+1;i<n;i++)this._keys[i-1]=this._keys[i],this._values[i-1]=this._values[i];return this._keys.length--,this._values.length--,t===this._cacheKey&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},t.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},t.prototype.keys=function(){return new r(this._keys,this._values,n)},t.prototype.values=function(){return new r(this._keys,this._values,a)},t.prototype.entries=function(){return new r(this._keys,this._values,o)},t.prototype["@@iterator"]=function(){return this.entries()},t.prototype[i]=function(){return this.entries()},t.prototype._find=function(e,t){return this._cacheKey!==e&&(this._cacheIndex=this._keys.indexOf(this._cacheKey=e)),this._cacheIndex<0&&t&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},t}();function n(e,t){return e}function a(e,t){return t}function o(e,t){return[e,t]}}():Map,f=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?function(){function e(){this._map=new h}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.values()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[i]=function(){return this.keys()},e}():Set,p=new(l||"function"!=typeof WeakMap?function(){var e=u.create(),r=n();return function(){function e(){this._key=n()}return e.prototype.has=function(e){var t=i(e,!1);return void 0!==t&&u.has(t,this._key)},e.prototype.get=function(e){var t=i(e,!1);return void 0!==t?u.get(t,this._key):void 0},e.prototype.set=function(e,t){return i(e,!0)[this._key]=t,this},e.prototype.delete=function(e){var t=i(e,!1);return void 0!==t&&delete t[this._key]},e.prototype.clear=function(){this._key=n()},e}();function n(){var t;do{t="@@WeakMap@@"+o()}while(u.has(e,t));return e[t]=!0,t}function i(e,n){if(!t.call(e,r)){if(!n)return;Object.defineProperty(e,r,{value:u.create()})}return e[r]}function a(e,t){for(var r=0;r<t;++r)e[r]=255*Math.random()|0;return e}function o(){var e,t=(e=16,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):a(new Uint8Array(e),e):a(new Array(e),e));t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var r="",n=0;n<16;++n){var i=t[n];4!==n&&6!==n&&8!==n||(r+="-"),i<16&&(r+="0"),r+=i.toString(16).toLowerCase()}return r}}():WeakMap);function d(e,t,r){var n=p.get(e);if(b(n)){if(!r)return;n=new h,p.set(e,n)}var i=n.get(t);if(b(i)){if(!r)return;i=new h,n.set(t,i)}return i}function v(e,t,r){var n=d(t,r,!1);return!b(n)&&!!n.has(e)}function g(e,t,r){var n=d(t,r,!1);if(!b(n))return n.get(e)}function m(e,t,r,n){d(r,n,!0).set(e,t)}function y(e,t){var r=[],n=d(e,t,!1);if(b(n))return r;for(var a=function(e){var t=k(e,i);if(!w(t))throw new TypeError;var r=t.call(e);if(!S(r))throw new TypeError;return r}(n.keys()),o=0;;){var s=M(a);if(!s)return r.length=o,r;var u=s.value;try{r[o]=u}catch(e){try{P(a)}finally{throw e}}o++}}function _(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function b(e){return void 0===e}function x(e){return null===e}function S(e){return"object"==typeof e?null!==e:"function"==typeof e}function E(e,t){switch(_(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r=3===t?"string":5===t?"number":"default",i=k(e,n);if(void 0!==i){var a=i.call(e,r);if(S(a))throw new TypeError;return a}return function(e,t){if("string"===t){var r=e.toString;if(w(r))if(!S(i=r.call(e)))return i;if(w(n=e.valueOf))if(!S(i=n.call(e)))return i}else{var n;if(w(n=e.valueOf))if(!S(i=n.call(e)))return i;var i,a=e.toString;if(w(a))if(!S(i=a.call(e)))return i}throw new TypeError}(e,"default"===r?"number":r)}function A(e){var t=E(e,3);return"symbol"==typeof t?t:function(e){return""+e}(t)}function T(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function w(e){return"function"==typeof e}function C(e){return"function"==typeof e}function k(e,t){var r=e[t];if(null!=r){if(!w(r))throw new TypeError;return r}}function M(e){var t=e.next();return!t.done&&t}function P(e){var t=e.return;t&&t.call(e)}function I(e){var t=Object.getPrototypeOf(e);if("function"!=typeof e||e===c)return t;if(t!==c)return t;var r=e.prototype,n=r&&Object.getPrototypeOf(r);if(null==n||n===Object.prototype)return t;var i=n.constructor;return"function"!=typeof i||i===e?t:i}function O(e){return e.__=void 0,delete e.__,e}e("decorate",(function(e,t,r,n){if(b(r)){if(!T(e))throw new TypeError;if(!C(t))throw new TypeError;return function(e,t){for(var r=e.length-1;r>=0;--r){var n=(0,e[r])(t);if(!b(n)&&!x(n)){if(!C(n))throw new TypeError;t=n}}return t}(e,t)}if(!T(e))throw new TypeError;if(!S(t))throw new TypeError;if(!S(n)&&!b(n)&&!x(n))throw new TypeError;return x(n)&&(n=void 0),function(e,t,r,n){for(var i=e.length-1;i>=0;--i){var a=(0,e[i])(t,r,n);if(!b(a)&&!x(a)){if(!S(a))throw new TypeError;n=a}}return n}(e,t,r=A(r),n)})),e("metadata",(function(e,t){return function(r,n){if(!S(r))throw new TypeError;if(!b(n)&&!function(e){switch(_(e)){case 3:case 4:return!0;default:return!1}}(n))throw new TypeError;m(e,t,r,n)}})),e("defineMetadata",(function(e,t,r,n){if(!S(r))throw new TypeError;return b(n)||(n=A(n)),m(e,t,r,n)})),e("hasMetadata",(function(e,t,r){if(!S(t))throw new TypeError;return b(r)||(r=A(r)),function e(t,r,n){if(v(t,r,n))return!0;var i=I(r);return!x(i)&&e(t,i,n)}(e,t,r)})),e("hasOwnMetadata",(function(e,t,r){if(!S(t))throw new TypeError;return b(r)||(r=A(r)),v(e,t,r)})),e("getMetadata",(function(e,t,r){if(!S(t))throw new TypeError;return b(r)||(r=A(r)),function e(t,r,n){if(v(t,r,n))return g(t,r,n);var i=I(r);return x(i)?void 0:e(t,i,n)}(e,t,r)})),e("getOwnMetadata",(function(e,t,r){if(!S(t))throw new TypeError;return b(r)||(r=A(r)),g(e,t,r)})),e("getMetadataKeys",(function(e,t){if(!S(e))throw new TypeError;return b(t)||(t=A(t)),function e(t,r){var n=y(t,r),i=I(t);if(null===i)return n;var a=e(i,r);if(a.length<=0)return n;if(n.length<=0)return a;for(var o=new f,s=[],u=0,c=n;u<c.length;u++){var l=c[u];o.has(l)||(o.add(l),s.push(l))}for(var h=0,p=a;h<p.length;h++){l=p[h];o.has(l)||(o.add(l),s.push(l))}return s}(e,t)})),e("getOwnMetadataKeys",(function(e,t){if(!S(e))throw new TypeError;return b(t)||(t=A(t)),y(e,t)})),e("deleteMetadata",(function(e,t,r){if(!S(t))throw new TypeError;b(r)||(r=A(r));var n=d(t,r,!1);if(b(n))return!1;if(!n.delete(e))return!1;if(n.size>0)return!0;var i=p.get(t);return i.delete(r),i.size>0||p.delete(t),!0}))}(n)}()}(O||(O={}));var D=N((function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function a(e,t,n,a,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new i(n,a||e,o),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var u,c,l=this._events[s],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,a),!0;case 6:return l.fn.call(l.context,t,n,i,a,o),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,n);break;case 4:l[c].fn.call(l[c].context,t,n,i);break;default:if(!u)for(f=1,u=new Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},s.prototype.on=function(e,t,r){return a(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return a(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||n&&s.context!==n||o(this,a);else{for(var u=0,c=[],l=s.length;u<l;u++)(s[u].fn!==t||i&&!s[u].once||n&&s[u].context!==n)&&c.push(s[u]);c.length?this._events[a]=1===c.length?c[0]:c:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&o(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})),F=D.EventEmitter,z=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NON_CUSTOM_TAG_KEYS=t.POST_CONSTRUCT=t.DESIGN_PARAM_TYPES=t.PARAM_TYPES=t.TAGGED_PROP=t.TAGGED=t.MULTI_INJECT_TAG=t.INJECT_TAG=t.OPTIONAL_TAG=t.UNMANAGED_TAG=t.NAME_TAG=t.NAMED_TAG=void 0,t.NAMED_TAG="named",t.NAME_TAG="name",t.UNMANAGED_TAG="unmanaged",t.OPTIONAL_TAG="optional",t.INJECT_TAG="inject",t.MULTI_INJECT_TAG="multi_inject",t.TAGGED="inversify:tagged",t.TAGGED_PROP="inversify:tagged_props",t.PARAM_TYPES="inversify:paramtypes",t.DESIGN_PARAM_TYPES="design:paramtypes",t.POST_CONSTRUCT="post_construct",t.NON_CUSTOM_TAG_KEYS=[t.INJECT_TAG,t.MULTI_INJECT_TAG,t.NAME_TAG,t.UNMANAGED_TAG,t.NAMED_TAG,t.OPTIONAL_TAG]}));L(z);z.NON_CUSTOM_TAG_KEYS,z.POST_CONSTRUCT,z.DESIGN_PARAM_TYPES,z.PARAM_TYPES,z.TAGGED_PROP,z.TAGGED,z.MULTI_INJECT_TAG,z.INJECT_TAG,z.OPTIONAL_TAG,z.UNMANAGED_TAG,z.NAME_TAG,z.NAMED_TAG;var B=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=void 0;t.BindingScopeEnum={Request:"Request",Singleton:"Singleton",Transient:"Transient"};t.BindingTypeEnum={ConstantValue:"ConstantValue",Constructor:"Constructor",DynamicValue:"DynamicValue",Factory:"Factory",Function:"Function",Instance:"Instance",Invalid:"Invalid",Provider:"Provider"};t.TargetTypeEnum={ClassProperty:"ClassProperty",ConstructorArgument:"ConstructorArgument",Variable:"Variable"}}));L(B);B.TargetTypeEnum,B.BindingTypeEnum,B.BindingScopeEnum;var U=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;var r=0;t.id=function(){return r++}}));L(U);U.id;var j=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Binding=void 0;var r=function(){function e(e,t){this.id=U.id(),this.activated=!1,this.serviceIdentifier=e,this.scope=t,this.type=B.BindingTypeEnum.Invalid,this.constraint=function(e){return!0},this.implementationType=null,this.cache=null,this.factory=null,this.provider=null,this.onActivation=null,this.dynamicValue=null}return e.prototype.clone=function(){var t=new e(this.serviceIdentifier,this.scope);return t.activated=t.scope===B.BindingScopeEnum.Singleton&&this.activated,t.implementationType=this.implementationType,t.dynamicValue=this.dynamicValue,t.scope=this.scope,t.type=this.type,t.factory=this.factory,t.provider=this.provider,t.constraint=this.constraint,t.onActivation=this.onActivation,t.cache=this.cache,t},e}();t.Binding=r}));L(j);j.Binding;var V=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.STACK_OVERFLOW=t.CIRCULAR_DEPENDENCY_IN_FACTORY=t.POST_CONSTRUCT_ERROR=t.MULTIPLE_POST_CONSTRUCT_METHODS=t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK=t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE=t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE=t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT=t.ARGUMENTS_LENGTH_MISMATCH=t.INVALID_DECORATOR_OPERATION=t.INVALID_TO_SELF_VALUE=t.INVALID_FUNCTION_BINDING=t.INVALID_MIDDLEWARE_RETURN=t.NO_MORE_SNAPSHOTS_AVAILABLE=t.INVALID_BINDING_TYPE=t.NOT_IMPLEMENTED=t.CIRCULAR_DEPENDENCY=t.UNDEFINED_INJECT_ANNOTATION=t.MISSING_INJECT_ANNOTATION=t.MISSING_INJECTABLE_ANNOTATION=t.NOT_REGISTERED=t.CANNOT_UNBIND=t.AMBIGUOUS_MATCH=t.KEY_NOT_FOUND=t.NULL_ARGUMENT=t.DUPLICATED_METADATA=t.DUPLICATED_INJECTABLE_DECORATOR=void 0,t.DUPLICATED_INJECTABLE_DECORATOR="Cannot apply @injectable decorator multiple times.",t.DUPLICATED_METADATA="Metadata key was used more than once in a parameter:",t.NULL_ARGUMENT="NULL argument",t.KEY_NOT_FOUND="Key Not Found",t.AMBIGUOUS_MATCH="Ambiguous match found for serviceIdentifier:",t.CANNOT_UNBIND="Could not unbind serviceIdentifier:",t.NOT_REGISTERED="No matching bindings found for serviceIdentifier:",t.MISSING_INJECTABLE_ANNOTATION="Missing required @injectable annotation in:",t.MISSING_INJECT_ANNOTATION="Missing required @inject or @multiInject annotation in:";t.UNDEFINED_INJECT_ANNOTATION=function(e){return"@inject called with undefined this could mean that the class "+e+" has a circular dependency problem. You can use a LazyServiceIdentifer to  overcome this limitation."},t.CIRCULAR_DEPENDENCY="Circular dependency found:",t.NOT_IMPLEMENTED="Sorry, this feature is not fully implemented yet.",t.INVALID_BINDING_TYPE="Invalid binding type:",t.NO_MORE_SNAPSHOTS_AVAILABLE="No snapshot available to restore.",t.INVALID_MIDDLEWARE_RETURN="Invalid return type in middleware. Middleware must return!",t.INVALID_FUNCTION_BINDING="Value provided to function binding must be a function!",t.INVALID_TO_SELF_VALUE="The toSelf function can only be applied when a constructor is used as service identifier",t.INVALID_DECORATOR_OPERATION="The @inject @multiInject @tagged and @named decorators must be applied to the parameters of a class constructor or a class property.";t.ARGUMENTS_LENGTH_MISMATCH=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"The number of constructor arguments in the derived class "+e[0]+" must be >= than the number of constructor arguments of its base class."},t.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT="Invalid Container constructor argument. Container options must be an object.",t.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE="Invalid Container option. Default scope must be a string ('singleton' or 'transient').",t.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE="Invalid Container option. Auto bind injectable must be a boolean",t.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK="Invalid Container option. Skip base check must be a boolean",t.MULTIPLE_POST_CONSTRUCT_METHODS="Cannot apply @postConstruct decorator multiple times in the same class";t.POST_CONSTRUCT_ERROR=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"@postConstruct error in class "+e[0]+": "+e[1]};t.CIRCULAR_DEPENDENCY_IN_FACTORY=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"It looks like there is a circular dependency in one of the '"+e[0]+"' bindings. Please investigate bindings withservice identifier '"+e[1]+"'."},t.STACK_OVERFLOW="Maximum call stack size exceeded"}));L(V);V.STACK_OVERFLOW,V.CIRCULAR_DEPENDENCY_IN_FACTORY,V.POST_CONSTRUCT_ERROR,V.MULTIPLE_POST_CONSTRUCT_METHODS,V.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK,V.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE,V.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE,V.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT,V.ARGUMENTS_LENGTH_MISMATCH,V.INVALID_DECORATOR_OPERATION,V.INVALID_TO_SELF_VALUE,V.INVALID_FUNCTION_BINDING,V.INVALID_MIDDLEWARE_RETURN,V.NO_MORE_SNAPSHOTS_AVAILABLE,V.INVALID_BINDING_TYPE,V.NOT_IMPLEMENTED,V.CIRCULAR_DEPENDENCY,V.UNDEFINED_INJECT_ANNOTATION,V.MISSING_INJECT_ANNOTATION,V.MISSING_INJECTABLE_ANNOTATION,V.NOT_REGISTERED,V.CANNOT_UNBIND,V.AMBIGUOUS_MATCH,V.KEY_NOT_FOUND,V.NULL_ARGUMENT,V.DUPLICATED_METADATA,V.DUPLICATED_INJECTABLE_DECORATOR;var G=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataReader=void 0;var r=function(){function e(){}return e.prototype.getConstructorMetadata=function(e){return{compilerGeneratedMetadata:Reflect.getMetadata(z.PARAM_TYPES,e),userGeneratedMetadata:Reflect.getMetadata(z.TAGGED,e)||{}}},e.prototype.getPropertiesMetadata=function(e){return Reflect.getMetadata(z.TAGGED_PROP,e)||[]},e}();t.MetadataReader=r}));L(G);G.MetadataReader;var H=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingCount=void 0;t.BindingCount={MultipleBindingsAvailable:2,NoBindingsAvailable:0,OnlyOneBindingAvailable:1}}));L(H);H.BindingCount;var W=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isStackOverflowExeption=void 0,t.isStackOverflowExeption=function(e){return e instanceof RangeError||e.message===V.STACK_OVERFLOW}}));L(W);W.isStackOverflowExeption;var Y=N((function(e,t){function r(e){return"function"==typeof e?e.name:"symbol"==typeof e?e.toString():e}function n(e){if(e.name)return e.name;var t=e.toString(),r=t.match(/^function\s*([^\s(]+)/);return r?r[1]:"Anonymous function: "+t}Object.defineProperty(t,"__esModule",{value:!0}),t.circularDependencyToException=t.listMetadataForTarget=t.listRegisteredBindingsForServiceIdentifier=t.getServiceIdentifierAsString=t.getFunctionName=void 0,t.getServiceIdentifierAsString=r,t.listRegisteredBindingsForServiceIdentifier=function(e,t,r){var i="",a=r(e,t);return 0!==a.length&&(i="\nRegistered bindings:",a.forEach((function(e){var t="Object";null!==e.implementationType&&(t=n(e.implementationType)),i=i+"\n "+t,e.constraint.metaData&&(i=i+" - "+e.constraint.metaData)}))),i},t.circularDependencyToException=function e(t){t.childRequests.forEach((function(t){if(function e(t,r){return null!==t.parentRequest&&(t.parentRequest.serviceIdentifier===r||e(t.parentRequest,r))}(t,t.serviceIdentifier)){var n=function(e){return function e(t,n){void 0===n&&(n=[]);var i=r(t.serviceIdentifier);return n.push(i),null!==t.parentRequest?e(t.parentRequest,n):n}(e).reverse().join(" --\x3e ")}(t);throw new Error(V.CIRCULAR_DEPENDENCY+" "+n)}e(t)}))},t.listMetadataForTarget=function(e,t){if(t.isTagged()||t.isNamed()){var r="",n=t.getNamedTag(),i=t.getCustomTags();return null!==n&&(r+=n.toString()+"\n"),null!==i&&i.forEach((function(e){r+=e.toString()+"\n"}))," "+e+"\n "+e+" - "+r}return" "+e},t.getFunctionName=n}));L(Y);Y.circularDependencyToException,Y.listMetadataForTarget,Y.listRegisteredBindingsForServiceIdentifier,Y.getServiceIdentifierAsString,Y.getFunctionName;var X=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Context=void 0;var r=function(){function e(e){this.id=U.id(),this.container=e}return e.prototype.addPlan=function(e){this.plan=e},e.prototype.setCurrentRequest=function(e){this.currentRequest=e},e}();t.Context=r}));L(X);X.Context;var Z=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Metadata=void 0;var r=function(){function e(e,t){this.key=e,this.value=t}return e.prototype.toString=function(){return this.key===z.NAMED_TAG?"named: "+this.value.toString()+" ":"tagged: { key:"+this.key.toString()+", value: "+this.value+" }"},e}();t.Metadata=r}));L(Z);Z.Metadata;var q=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Plan=void 0;var r=function(e,t){this.parentContext=e,this.rootRequest=t};t.Plan=r}));L(q);q.Plan;var K=N((function(e,t){function r(e,t,r,n,i){var a={},o="number"==typeof i,s=void 0!==i&&o?i.toString():r;if(o&&void 0!==r)throw new Error(V.INVALID_DECORATOR_OPERATION);Reflect.hasOwnMetadata(e,t)&&(a=Reflect.getMetadata(e,t));var u=a[s];if(Array.isArray(u))for(var c=0,l=u;c<l.length;c++){var h=l[c];if(h.key===n.key)throw new Error(V.DUPLICATED_METADATA+" "+h.key.toString())}else u=[];u.push(n),a[s]=u,Reflect.defineMetadata(e,a,t)}function n(e,t){Reflect.decorate(e,t)}function i(e,t){return function(r,n){t(r,n,e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.tagProperty=t.tagParameter=t.decorate=void 0,t.tagParameter=function(e,t,n,i){r(z.TAGGED,e,t,i,n)},t.tagProperty=function(e,t,n){r(z.TAGGED_PROP,e.constructor,t,n)},t.decorate=function(e,t,r){"number"==typeof r?n([i(r,e)],t):"string"==typeof r?Reflect.decorate([e],t,r):n([e],t)}}));L(K);K.tagProperty,K.tagParameter,K.decorate;var Q=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.inject=t.LazyServiceIdentifer=void 0;var r=function(){function e(e){this._cb=e}return e.prototype.unwrap=function(){return this._cb()},e}();t.LazyServiceIdentifer=r,t.inject=function(e){return function(t,r,n){if(void 0===e)throw new Error(V.UNDEFINED_INJECT_ANNOTATION(t.name));var i=new Z.Metadata(z.INJECT_TAG,e);"number"==typeof n?K.tagParameter(t,r,n,i):K.tagProperty(t,r,i)}}}));L(Q);Q.inject,Q.LazyServiceIdentifer;var $=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.QueryableString=void 0;var r=function(){function e(e){this.str=e}return e.prototype.startsWith=function(e){return 0===this.str.indexOf(e)},e.prototype.endsWith=function(e){var t,r=e.split("").reverse().join("");return t=this.str.split("").reverse().join(""),this.startsWith.call({str:t},r)},e.prototype.contains=function(e){return-1!==this.str.indexOf(e)},e.prototype.equals=function(e){return this.str===e},e.prototype.value=function(){return this.str},e}();t.QueryableString=r}));L($);$.QueryableString;var J=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Target=void 0;var r=function(){function e(e,t,r,n){this.id=U.id(),this.type=e,this.serviceIdentifier=r,this.name=new $.QueryableString(t||""),this.metadata=new Array;var i=null;"string"==typeof n?i=new Z.Metadata(z.NAMED_TAG,n):n instanceof Z.Metadata&&(i=n),null!==i&&this.metadata.push(i)}return e.prototype.hasTag=function(e){for(var t=0,r=this.metadata;t<r.length;t++){if(r[t].key===e)return!0}return!1},e.prototype.isArray=function(){return this.hasTag(z.MULTI_INJECT_TAG)},e.prototype.matchesArray=function(e){return this.matchesTag(z.MULTI_INJECT_TAG)(e)},e.prototype.isNamed=function(){return this.hasTag(z.NAMED_TAG)},e.prototype.isTagged=function(){return this.metadata.some((function(e){return z.NON_CUSTOM_TAG_KEYS.every((function(t){return e.key!==t}))}))},e.prototype.isOptional=function(){return this.matchesTag(z.OPTIONAL_TAG)(!0)},e.prototype.getNamedTag=function(){return this.isNamed()?this.metadata.filter((function(e){return e.key===z.NAMED_TAG}))[0]:null},e.prototype.getCustomTags=function(){return this.isTagged()?this.metadata.filter((function(e){return z.NON_CUSTOM_TAG_KEYS.every((function(t){return e.key!==t}))})):null},e.prototype.matchesNamedTag=function(e){return this.matchesTag(z.NAMED_TAG)(e)},e.prototype.matchesTag=function(e){var t=this;return function(r){for(var n=0,i=t.metadata;n<i.length;n++){var a=i[n];if(a.key===e&&a.value===r)return!0}return!1}},e}();t.Target=r}));L(J);J.Target;var ee=N((function(e,t){var r=R&&R.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};function n(e,t,n,o){var s=e.getConstructorMetadata(n),u=s.compilerGeneratedMetadata;if(void 0===u){var c=V.MISSING_INJECTABLE_ANNOTATION+" "+t+".";throw new Error(c)}var l=s.userGeneratedMetadata,h=Object.keys(l),f=0===n.length&&h.length>0,p=h.length>n.length,d=function(e,t,r,n,a){for(var o=[],s=0;s<a;s++){var u=i(s,e,t,r,n);null!==u&&o.push(u)}return o}(o,t,u,l,f||p?h.length:n.length),v=function e(t,n){for(var i=t.getPropertiesMetadata(n),o=[],s=Object.keys(i),u=0,c=s;u<c.length;u++){var l=c[u],h=i[l],f=a(i[l]),p=f.targetName||l,d=f.inject||f.multiInject,v=new J.Target(B.TargetTypeEnum.ClassProperty,p,d);v.metadata=h,o.push(v)}var g=Object.getPrototypeOf(n.prototype).constructor;if(g!==Object){var m=e(t,g);o=r(r([],o),m)}return o}(e,n);return r(r([],d),v)}function i(e,t,r,n,i){var o=i[e.toString()]||[],s=a(o),u=!0!==s.unmanaged,c=n[e],l=s.inject||s.multiInject;if((c=l||c)instanceof Q.LazyServiceIdentifer&&(c=c.unwrap()),u){if(!t&&(c===Object||c===Function||void 0===c)){var h=V.MISSING_INJECT_ANNOTATION+" argument "+e+" in class "+r+".";throw new Error(h)}var f=new J.Target(B.TargetTypeEnum.ConstructorArgument,s.targetName,c);return f.metadata=o,f}return null}function a(e){var t={};return e.forEach((function(e){t[e.key.toString()]=e.value})),{inject:t[z.INJECT_TAG],multiInject:t[z.MULTI_INJECT_TAG],targetName:t[z.NAME_TAG],unmanaged:t[z.UNMANAGED_TAG]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getFunctionName=t.getBaseClassDependencyCount=t.getDependencies=void 0,Object.defineProperty(t,"getFunctionName",{enumerable:!0,get:function(){return Y.getFunctionName}}),t.getDependencies=function(e,t){return n(e,Y.getFunctionName(t),t,!1)},t.getBaseClassDependencyCount=function e(t,r){var i=Object.getPrototypeOf(r.prototype).constructor;if(i!==Object){var a=n(t,Y.getFunctionName(i),i,!0),o=a.map((function(e){return e.metadata.filter((function(e){return e.key===z.UNMANAGED_TAG}))})),s=[].concat.apply([],o).length,u=a.length-s;return u>0?u:e(t,i)}return 0}}));L(ee);ee.getFunctionName,ee.getBaseClassDependencyCount,ee.getDependencies;var te=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Request=void 0;var r=function(){function e(e,t,r,n,i){this.id=U.id(),this.serviceIdentifier=e,this.parentContext=t,this.parentRequest=r,this.target=i,this.childRequests=[],this.bindings=Array.isArray(n)?n:[n],this.requestScope=null===r?new Map:null}return e.prototype.addChildRequest=function(t,r,n){var i=new e(t,this.parentContext,this,r,n);return this.childRequests.push(i),i},e}();t.Request=r}));L(te);te.Request;var re=N((function(e,t){function r(e){return e._bindingDictionary}function n(e,t,r,n,i,a){var o=e?z.MULTI_INJECT_TAG:z.INJECT_TAG,s=new Z.Metadata(o,r),u=new J.Target(t,n,r,s);if(void 0!==i){var c=new Z.Metadata(i,a);u.metadata.push(c)}return u}function i(e,t,r,n,i){var o=a(r.container,i.serviceIdentifier),s=[];return o.length===H.BindingCount.NoBindingsAvailable&&r.container.options.autoBindInjectable&&"function"==typeof i.serviceIdentifier&&e.getConstructorMetadata(i.serviceIdentifier).compilerGeneratedMetadata&&(r.container.bind(i.serviceIdentifier).toSelf(),o=a(r.container,i.serviceIdentifier)),s=t?o:o.filter((function(e){var t=new te.Request(e.serviceIdentifier,r,n,e,i);return e.constraint(t)})),function(e,t,r,n){switch(t.length){case H.BindingCount.NoBindingsAvailable:if(r.isOptional())return t;var i=Y.getServiceIdentifierAsString(e),o=V.NOT_REGISTERED;throw o+=Y.listMetadataForTarget(i,r),o+=Y.listRegisteredBindingsForServiceIdentifier(n,i,a),new Error(o);case H.BindingCount.OnlyOneBindingAvailable:if(!r.isArray())return t;case H.BindingCount.MultipleBindingsAvailable:default:if(r.isArray())return t;i=Y.getServiceIdentifierAsString(e),o=V.AMBIGUOUS_MATCH+" "+i;throw o+=Y.listRegisteredBindingsForServiceIdentifier(n,i,a),new Error(o)}}(i.serviceIdentifier,s,i,r.container),s}function a(e,t){var n=[],i=r(e);return i.hasKey(t)?n=i.get(t):null!==e.parent&&(n=a(e.parent,t)),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getBindingDictionary=t.createMockRequest=t.plan=void 0,t.getBindingDictionary=r,t.plan=function(e,t,r,a,o,s,u,c){void 0===c&&(c=!1);var l=new X.Context(t),h=n(r,a,o,"",s,u);try{return function e(t,r,n,a,o,s){var u,c;if(null===o){u=i(t,r,a,null,s),c=new te.Request(n,a,null,u,s);var l=new q.Plan(a,c);a.addPlan(l)}else u=i(t,r,a,o,s),c=o.addChildRequest(s.serviceIdentifier,u,s);u.forEach((function(r){var n=null;if(s.isArray())n=c.addChildRequest(r.serviceIdentifier,r,s);else{if(r.cache)return;n=c}if(r.type===B.BindingTypeEnum.Instance&&null!==r.implementationType){var i=ee.getDependencies(t,r.implementationType);if(!a.container.options.skipBaseClassChecks){var o=ee.getBaseClassDependencyCount(t,r.implementationType);if(i.length<o){var u=V.ARGUMENTS_LENGTH_MISMATCH(ee.getFunctionName(r.implementationType));throw new Error(u)}}i.forEach((function(r){e(t,!1,r.serviceIdentifier,a,n,r)}))}}))}(e,c,o,l,null,h),l}catch(e){throw W.isStackOverflowExeption(e)&&l.plan&&Y.circularDependencyToException(l.plan.rootRequest),e}},t.createMockRequest=function(e,t,r,n){var i=new J.Target(B.TargetTypeEnum.Variable,"",t,new Z.Metadata(r,n)),a=new X.Context(e);return new te.Request(t,a,null,[],i)}}));L(re);re.getBindingDictionary,re.createMockRequest,re.plan;var ne=N((function(e,t){var r=R&&R.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.resolveInstance=void 0,t.resolveInstance=function(e,t,n){var i,a,o=null;if(t.length>0){var s=t.filter((function(e){return null!==e.target&&e.target.type===B.TargetTypeEnum.ConstructorArgument})).map(n);a=s,o=function(e,t,r){var n=t.filter((function(e){return null!==e.target&&e.target.type===B.TargetTypeEnum.ClassProperty})),i=n.map(r);return n.forEach((function(t,r){var n;n=t.target.name.value();var a=i[r];e[n]=a})),e}(o=new((i=e).bind.apply(i,r([void 0],a))),t,n)}else o=new e;return function(e,t){if(Reflect.hasMetadata(z.POST_CONSTRUCT,e)){var r=Reflect.getMetadata(z.POST_CONSTRUCT,e);try{t[r.value]()}catch(t){throw new Error(V.POST_CONSTRUCT_ERROR(e.name,t.message))}}}(e,o),o}}));L(ne);ne.resolveInstance;var ie=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolve=void 0;var r=function(e,t,r){try{return r()}catch(r){throw W.isStackOverflowExeption(r)?new Error(V.CIRCULAR_DEPENDENCY_IN_FACTORY(e,t.toString())):r}},n=function(e){return function(t){t.parentContext.setCurrentRequest(t);var i=t.bindings,a=t.childRequests,o=t.target&&t.target.isArray(),s=!(t.parentRequest&&t.parentRequest.target&&t.target&&t.parentRequest.target.matchesArray(t.target.serviceIdentifier));if(o&&s)return a.map((function(t){return n(e)(t)}));var u=null;if(!t.target.isOptional()||0!==i.length){var c=i[0],l=c.scope===B.BindingScopeEnum.Singleton,h=c.scope===B.BindingScopeEnum.Request;if(l&&c.activated)return c.cache;if(h&&null!==e&&e.has(c.id))return e.get(c.id);if(c.type===B.BindingTypeEnum.ConstantValue)u=c.cache,c.activated=!0;else if(c.type===B.BindingTypeEnum.Function)u=c.cache,c.activated=!0;else if(c.type===B.BindingTypeEnum.Constructor)u=c.implementationType;else if(c.type===B.BindingTypeEnum.DynamicValue&&null!==c.dynamicValue)u=r("toDynamicValue",c.serviceIdentifier,(function(){return c.dynamicValue(t.parentContext)}));else if(c.type===B.BindingTypeEnum.Factory&&null!==c.factory)u=r("toFactory",c.serviceIdentifier,(function(){return c.factory(t.parentContext)}));else if(c.type===B.BindingTypeEnum.Provider&&null!==c.provider)u=r("toProvider",c.serviceIdentifier,(function(){return c.provider(t.parentContext)}));else{if(c.type!==B.BindingTypeEnum.Instance||null===c.implementationType){var f=Y.getServiceIdentifierAsString(t.serviceIdentifier);throw new Error(V.INVALID_BINDING_TYPE+" "+f)}u=ne.resolveInstance(c.implementationType,a,n(e))}return"function"==typeof c.onActivation&&(u=c.onActivation(t.parentContext,u)),l&&(c.cache=u,c.activated=!0),h&&null!==e&&!e.has(c.id)&&e.set(c.id,u),u}}};t.resolve=function(e){return n(e.plan.rootRequest.requestScope)(e.plan.rootRequest)}}));L(ie);ie.resolve;var ae=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.typeConstraint=t.namedConstraint=t.taggedConstraint=t.traverseAncerstors=void 0;var r=function(e,t){var n=e.parentRequest;return null!==n&&(!!t(n)||r(n,t))};t.traverseAncerstors=r;var n=function(e){return function(t){var r=function(r){return null!==r&&null!==r.target&&r.target.matchesTag(e)(t)};return r.metaData=new Z.Metadata(e,t),r}};t.taggedConstraint=n;var i=n(z.NAMED_TAG);t.namedConstraint=i;t.typeConstraint=function(e){return function(t){var r=null;if(null!==t){if(r=t.bindings[0],"string"==typeof e)return r.serviceIdentifier===e;var n=t.bindings[0].implementationType;return e===n}return!1}}}));L(ae);ae.typeConstraint,ae.namedConstraint,ae.taggedConstraint,ae.traverseAncerstors;var oe=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingWhenSyntax=void 0;var r=function(){function e(e){this._binding=e}return e.prototype.when=function(e){return this._binding.constraint=e,new se.BindingOnSyntax(this._binding)},e.prototype.whenTargetNamed=function(e){return this._binding.constraint=ae.namedConstraint(e),new se.BindingOnSyntax(this._binding)},e.prototype.whenTargetIsDefault=function(){return this._binding.constraint=function(e){return null!==e.target&&!e.target.isNamed()&&!e.target.isTagged()},new se.BindingOnSyntax(this._binding)},e.prototype.whenTargetTagged=function(e,t){return this._binding.constraint=ae.taggedConstraint(e)(t),new se.BindingOnSyntax(this._binding)},e.prototype.whenInjectedInto=function(e){return this._binding.constraint=function(t){return ae.typeConstraint(e)(t.parentRequest)},new se.BindingOnSyntax(this._binding)},e.prototype.whenParentNamed=function(e){return this._binding.constraint=function(t){return ae.namedConstraint(e)(t.parentRequest)},new se.BindingOnSyntax(this._binding)},e.prototype.whenParentTagged=function(e,t){return this._binding.constraint=function(r){return ae.taggedConstraint(e)(t)(r.parentRequest)},new se.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorIs=function(e){return this._binding.constraint=function(t){return ae.traverseAncerstors(t,ae.typeConstraint(e))},new se.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorIs=function(e){return this._binding.constraint=function(t){return!ae.traverseAncerstors(t,ae.typeConstraint(e))},new se.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorNamed=function(e){return this._binding.constraint=function(t){return ae.traverseAncerstors(t,ae.namedConstraint(e))},new se.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorNamed=function(e){return this._binding.constraint=function(t){return!ae.traverseAncerstors(t,ae.namedConstraint(e))},new se.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._binding.constraint=function(r){return ae.traverseAncerstors(r,ae.taggedConstraint(e)(t))},new se.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorTagged=function(e,t){return this._binding.constraint=function(r){return!ae.traverseAncerstors(r,ae.taggedConstraint(e)(t))},new se.BindingOnSyntax(this._binding)},e.prototype.whenAnyAncestorMatches=function(e){return this._binding.constraint=function(t){return ae.traverseAncerstors(t,e)},new se.BindingOnSyntax(this._binding)},e.prototype.whenNoAncestorMatches=function(e){return this._binding.constraint=function(t){return!ae.traverseAncerstors(t,e)},new se.BindingOnSyntax(this._binding)},e}();t.BindingWhenSyntax=r}));L(oe);oe.BindingWhenSyntax;var se=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingOnSyntax=void 0;var r=function(){function e(e){this._binding=e}return e.prototype.onActivation=function(e){return this._binding.onActivation=e,new oe.BindingWhenSyntax(this._binding)},e}();t.BindingOnSyntax=r}));L(se);se.BindingOnSyntax;var ue=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingWhenOnSyntax=void 0;var r=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new oe.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new se.BindingOnSyntax(this._binding)}return e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingWhenOnSyntax=r}));L(ue);ue.BindingWhenOnSyntax;var ce=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingInSyntax=void 0;var r=function(){function e(e){this._binding=e}return e.prototype.inRequestScope=function(){return this._binding.scope=B.BindingScopeEnum.Request,new ue.BindingWhenOnSyntax(this._binding)},e.prototype.inSingletonScope=function(){return this._binding.scope=B.BindingScopeEnum.Singleton,new ue.BindingWhenOnSyntax(this._binding)},e.prototype.inTransientScope=function(){return this._binding.scope=B.BindingScopeEnum.Transient,new ue.BindingWhenOnSyntax(this._binding)},e}();t.BindingInSyntax=r}));L(ce);ce.BindingInSyntax;var le=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingInWhenOnSyntax=void 0;var r=function(){function e(e){this._binding=e,this._bindingWhenSyntax=new oe.BindingWhenSyntax(this._binding),this._bindingOnSyntax=new se.BindingOnSyntax(this._binding),this._bindingInSyntax=new ce.BindingInSyntax(e)}return e.prototype.inRequestScope=function(){return this._bindingInSyntax.inRequestScope()},e.prototype.inSingletonScope=function(){return this._bindingInSyntax.inSingletonScope()},e.prototype.inTransientScope=function(){return this._bindingInSyntax.inTransientScope()},e.prototype.when=function(e){return this._bindingWhenSyntax.when(e)},e.prototype.whenTargetNamed=function(e){return this._bindingWhenSyntax.whenTargetNamed(e)},e.prototype.whenTargetIsDefault=function(){return this._bindingWhenSyntax.whenTargetIsDefault()},e.prototype.whenTargetTagged=function(e,t){return this._bindingWhenSyntax.whenTargetTagged(e,t)},e.prototype.whenInjectedInto=function(e){return this._bindingWhenSyntax.whenInjectedInto(e)},e.prototype.whenParentNamed=function(e){return this._bindingWhenSyntax.whenParentNamed(e)},e.prototype.whenParentTagged=function(e,t){return this._bindingWhenSyntax.whenParentTagged(e,t)},e.prototype.whenAnyAncestorIs=function(e){return this._bindingWhenSyntax.whenAnyAncestorIs(e)},e.prototype.whenNoAncestorIs=function(e){return this._bindingWhenSyntax.whenNoAncestorIs(e)},e.prototype.whenAnyAncestorNamed=function(e){return this._bindingWhenSyntax.whenAnyAncestorNamed(e)},e.prototype.whenAnyAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenAnyAncestorTagged(e,t)},e.prototype.whenNoAncestorNamed=function(e){return this._bindingWhenSyntax.whenNoAncestorNamed(e)},e.prototype.whenNoAncestorTagged=function(e,t){return this._bindingWhenSyntax.whenNoAncestorTagged(e,t)},e.prototype.whenAnyAncestorMatches=function(e){return this._bindingWhenSyntax.whenAnyAncestorMatches(e)},e.prototype.whenNoAncestorMatches=function(e){return this._bindingWhenSyntax.whenNoAncestorMatches(e)},e.prototype.onActivation=function(e){return this._bindingOnSyntax.onActivation(e)},e}();t.BindingInWhenOnSyntax=r}));L(le);le.BindingInWhenOnSyntax;var he=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BindingToSyntax=void 0;var r=function(){function e(e){this._binding=e}return e.prototype.to=function(e){return this._binding.type=B.BindingTypeEnum.Instance,this._binding.implementationType=e,new le.BindingInWhenOnSyntax(this._binding)},e.prototype.toSelf=function(){if("function"!=typeof this._binding.serviceIdentifier)throw new Error(""+V.INVALID_TO_SELF_VALUE);var e=this._binding.serviceIdentifier;return this.to(e)},e.prototype.toConstantValue=function(e){return this._binding.type=B.BindingTypeEnum.ConstantValue,this._binding.cache=e,this._binding.dynamicValue=null,this._binding.implementationType=null,this._binding.scope=B.BindingScopeEnum.Singleton,new ue.BindingWhenOnSyntax(this._binding)},e.prototype.toDynamicValue=function(e){return this._binding.type=B.BindingTypeEnum.DynamicValue,this._binding.cache=null,this._binding.dynamicValue=e,this._binding.implementationType=null,new le.BindingInWhenOnSyntax(this._binding)},e.prototype.toConstructor=function(e){return this._binding.type=B.BindingTypeEnum.Constructor,this._binding.implementationType=e,this._binding.scope=B.BindingScopeEnum.Singleton,new ue.BindingWhenOnSyntax(this._binding)},e.prototype.toFactory=function(e){return this._binding.type=B.BindingTypeEnum.Factory,this._binding.factory=e,this._binding.scope=B.BindingScopeEnum.Singleton,new ue.BindingWhenOnSyntax(this._binding)},e.prototype.toFunction=function(e){if("function"!=typeof e)throw new Error(V.INVALID_FUNCTION_BINDING);var t=this.toConstantValue(e);return this._binding.type=B.BindingTypeEnum.Function,this._binding.scope=B.BindingScopeEnum.Singleton,t},e.prototype.toAutoFactory=function(e){return this._binding.type=B.BindingTypeEnum.Factory,this._binding.factory=function(t){return function(){return t.container.get(e)}},this._binding.scope=B.BindingScopeEnum.Singleton,new ue.BindingWhenOnSyntax(this._binding)},e.prototype.toProvider=function(e){return this._binding.type=B.BindingTypeEnum.Provider,this._binding.provider=e,this._binding.scope=B.BindingScopeEnum.Singleton,new ue.BindingWhenOnSyntax(this._binding)},e.prototype.toService=function(e){this.toDynamicValue((function(t){return t.container.get(e)}))},e}();t.BindingToSyntax=r}));L(he);he.BindingToSyntax;var fe=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerSnapshot=void 0;var r=function(){function e(){}return e.of=function(t,r){var n=new e;return n.bindings=t,n.middleware=r,n},e}();t.ContainerSnapshot=r}));L(fe);fe.ContainerSnapshot;var pe=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Lookup=void 0;var r=function(){function e(){this._map=new Map}return e.prototype.getMap=function(){return this._map},e.prototype.add=function(e,t){if(null==e)throw new Error(V.NULL_ARGUMENT);if(null==t)throw new Error(V.NULL_ARGUMENT);var r=this._map.get(e);void 0!==r?(r.push(t),this._map.set(e,r)):this._map.set(e,[t])},e.prototype.get=function(e){if(null==e)throw new Error(V.NULL_ARGUMENT);var t=this._map.get(e);if(void 0!==t)return t;throw new Error(V.KEY_NOT_FOUND)},e.prototype.remove=function(e){if(null==e)throw new Error(V.NULL_ARGUMENT);if(!this._map.delete(e))throw new Error(V.KEY_NOT_FOUND)},e.prototype.removeByCondition=function(e){var t=this;this._map.forEach((function(r,n){var i=r.filter((function(t){return!e(t)}));i.length>0?t._map.set(n,i):t._map.delete(n)}))},e.prototype.hasKey=function(e){if(null==e)throw new Error(V.NULL_ARGUMENT);return this._map.has(e)},e.prototype.clone=function(){var t=new e;return this._map.forEach((function(e,r){e.forEach((function(e){return t.add(r,e.clone())}))})),t},e.prototype.traverse=function(e){this._map.forEach((function(t,r){e(r,t)}))},e}();t.Lookup=r}));L(pe);pe.Lookup;var de=N((function(e,t){var r=R&&R.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},n=R&&R.__generator||function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},i=R&&R.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.Container=void 0;var a=function(){function e(e){this._appliedMiddleware=[];var t=e||{};if("object"!=typeof t)throw new Error(""+V.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT);if(void 0===t.defaultScope)t.defaultScope=B.BindingScopeEnum.Transient;else if(t.defaultScope!==B.BindingScopeEnum.Singleton&&t.defaultScope!==B.BindingScopeEnum.Transient&&t.defaultScope!==B.BindingScopeEnum.Request)throw new Error(""+V.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE);if(void 0===t.autoBindInjectable)t.autoBindInjectable=!1;else if("boolean"!=typeof t.autoBindInjectable)throw new Error(""+V.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE);if(void 0===t.skipBaseClassChecks)t.skipBaseClassChecks=!1;else if("boolean"!=typeof t.skipBaseClassChecks)throw new Error(""+V.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK);this.options={autoBindInjectable:t.autoBindInjectable,defaultScope:t.defaultScope,skipBaseClassChecks:t.skipBaseClassChecks},this.id=U.id(),this._bindingDictionary=new pe.Lookup,this._snapshots=[],this._middleware=null,this.parent=null,this._metadataReader=new G.MetadataReader}return e.merge=function(t,r){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var o=new e,s=i([t,r],n).map((function(e){return re.getBindingDictionary(e)})),u=re.getBindingDictionary(o);function c(e,t){e.traverse((function(e,r){r.forEach((function(e){t.add(e.serviceIdentifier,e.clone())}))}))}return s.forEach((function(e){c(e,u)})),o},e.prototype.load=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=this._getContainerModuleHelpersFactory(),n=0,i=e;n<i.length;n++){var a=i[n],o=r(a.id);a.registry(o.bindFunction,o.unbindFunction,o.isboundFunction,o.rebindFunction)}},e.prototype.loadAsync=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(this,void 0,void 0,(function(){var t,r,i,a,o;return n(this,(function(n){switch(n.label){case 0:t=this._getContainerModuleHelpersFactory(),r=0,i=e,n.label=1;case 1:return r<i.length?(a=i[r],o=t(a.id),[4,a.registry(o.bindFunction,o.unbindFunction,o.isboundFunction,o.rebindFunction)]):[3,4];case 2:n.sent(),n.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))},e.prototype.unload=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=function(e){return function(t){return t.moduleId===e}};t.forEach((function(t){var r=n(t.id);e._bindingDictionary.removeByCondition(r)}))},e.prototype.bind=function(e){var t=this.options.defaultScope||B.BindingScopeEnum.Transient,r=new j.Binding(e,t);return this._bindingDictionary.add(e,r),new he.BindingToSyntax(r)},e.prototype.rebind=function(e){return this.unbind(e),this.bind(e)},e.prototype.unbind=function(e){try{this._bindingDictionary.remove(e)}catch(t){throw new Error(V.CANNOT_UNBIND+" "+Y.getServiceIdentifierAsString(e))}},e.prototype.unbindAll=function(){this._bindingDictionary=new pe.Lookup},e.prototype.isBound=function(e){var t=this._bindingDictionary.hasKey(e);return!t&&this.parent&&(t=this.parent.isBound(e)),t},e.prototype.isBoundNamed=function(e,t){return this.isBoundTagged(e,z.NAMED_TAG,t)},e.prototype.isBoundTagged=function(e,t,r){var n=!1;if(this._bindingDictionary.hasKey(e)){var i=this._bindingDictionary.get(e),a=re.createMockRequest(this,e,t,r);n=i.some((function(e){return e.constraint(a)}))}return!n&&this.parent&&(n=this.parent.isBoundTagged(e,t,r)),n},e.prototype.snapshot=function(){this._snapshots.push(fe.ContainerSnapshot.of(this._bindingDictionary.clone(),this._middleware))},e.prototype.restore=function(){var e=this._snapshots.pop();if(void 0===e)throw new Error(V.NO_MORE_SNAPSHOTS_AVAILABLE);this._bindingDictionary=e.bindings,this._middleware=e.middleware},e.prototype.createChild=function(t){var r=new e(t||this.options);return r.parent=this,r},e.prototype.applyMiddleware=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._appliedMiddleware=this._appliedMiddleware.concat(e);var r=this._middleware?this._middleware:this._planAndResolve();this._middleware=e.reduce((function(e,t){return t(e)}),r)},e.prototype.applyCustomMetadataReader=function(e){this._metadataReader=e},e.prototype.get=function(e){return this._get(!1,!1,B.TargetTypeEnum.Variable,e)},e.prototype.getTagged=function(e,t,r){return this._get(!1,!1,B.TargetTypeEnum.Variable,e,t,r)},e.prototype.getNamed=function(e,t){return this.getTagged(e,z.NAMED_TAG,t)},e.prototype.getAll=function(e){return this._get(!0,!0,B.TargetTypeEnum.Variable,e)},e.prototype.getAllTagged=function(e,t,r){return this._get(!1,!0,B.TargetTypeEnum.Variable,e,t,r)},e.prototype.getAllNamed=function(e,t){return this.getAllTagged(e,z.NAMED_TAG,t)},e.prototype.resolve=function(e){var t=this.createChild();return t.bind(e).toSelf(),this._appliedMiddleware.forEach((function(e){t.applyMiddleware(e)})),t.get(e)},e.prototype._getContainerModuleHelpersFactory=function(){var e=this,t=function(e,t){e._binding.moduleId=t},r=function(r){return function(n){var i=e.rebind.bind(e)(n);return t(i,r),i}};return function(n){return{bindFunction:(i=n,function(r){var n=e.bind.bind(e)(r);return t(n,i),n}),isboundFunction:function(t){return e.isBound.bind(e)(t)},rebindFunction:r(n),unbindFunction:function(t){e.unbind.bind(e)(t)}};var i}},e.prototype._get=function(e,t,r,n,i,a){var o=null,s={avoidConstraints:e,contextInterceptor:function(e){return e},isMultiInject:t,key:i,serviceIdentifier:n,targetType:r,value:a};if(this._middleware){if(null==(o=this._middleware(s)))throw new Error(V.INVALID_MIDDLEWARE_RETURN)}else o=this._planAndResolve()(s);return o},e.prototype._planAndResolve=function(){var e=this;return function(t){var r=re.plan(e._metadataReader,e,t.isMultiInject,t.targetType,t.serviceIdentifier,t.key,t.value,t.avoidConstraints);return r=t.contextInterceptor(r),ie.resolve(r)}},e}();t.Container=a}));L(de);de.Container;var ve=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncContainerModule=t.ContainerModule=void 0;var r=function(e){this.id=U.id(),this.registry=e};t.ContainerModule=r;var n=function(e){this.id=U.id(),this.registry=e};t.AsyncContainerModule=n}));L(ve);ve.AsyncContainerModule,ve.ContainerModule;var ge=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.injectable=void 0,t.injectable=function(){return function(e){if(Reflect.hasOwnMetadata(z.PARAM_TYPES,e))throw new Error(V.DUPLICATED_INJECTABLE_DECORATOR);var t=Reflect.getMetadata(z.DESIGN_PARAM_TYPES,e)||[];return Reflect.defineMetadata(z.PARAM_TYPES,t,e),e}}}));L(ge);ge.injectable;var me=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.tagged=void 0,t.tagged=function(e,t){return function(r,n,i){var a=new Z.Metadata(e,t);"number"==typeof i?K.tagParameter(r,n,i,a):K.tagProperty(r,n,a)}}}));L(me);me.tagged;var ye=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.named=void 0,t.named=function(e){return function(t,r,n){var i=new Z.Metadata(z.NAMED_TAG,e);"number"==typeof n?K.tagParameter(t,r,n,i):K.tagProperty(t,r,i)}}}));L(ye);ye.named;var _e=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.optional=void 0,t.optional=function(){return function(e,t,r){var n=new Z.Metadata(z.OPTIONAL_TAG,!0);"number"==typeof r?K.tagParameter(e,t,r,n):K.tagProperty(e,t,n)}}}));L(_e);_e.optional;var be=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.unmanaged=void 0,t.unmanaged=function(){return function(e,t,r){var n=new Z.Metadata(z.UNMANAGED_TAG,!0);K.tagParameter(e,t,r,n)}}}));L(be);be.unmanaged;var xe=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.multiInject=void 0,t.multiInject=function(e){return function(t,r,n){var i=new Z.Metadata(z.MULTI_INJECT_TAG,e);"number"==typeof n?K.tagParameter(t,r,n,i):K.tagProperty(t,r,i)}}}));L(xe);xe.multiInject;var Se=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.targetName=void 0,t.targetName=function(e){return function(t,r,n){var i=new Z.Metadata(z.NAME_TAG,e);K.tagParameter(t,r,n,i)}}}));L(Se);Se.targetName;var Ee=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.postConstruct=void 0,t.postConstruct=function(){return function(e,t,r){var n=new Z.Metadata(z.POST_CONSTRUCT,t);if(Reflect.hasOwnMetadata(z.POST_CONSTRUCT,e.constructor))throw new Error(V.MULTIPLE_POST_CONSTRUCT_METHODS);Reflect.defineMetadata(z.POST_CONSTRUCT,n,e.constructor)}}}));L(Ee);Ee.postConstruct;var Ae=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.multiBindToService=void 0;t.multiBindToService=function(e){return function(t){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return r.forEach((function(r){return e.bind(r).toService(t)}))}}}}));L(Ae);Ae.multiBindToService;var Te=N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.multiBindToService=t.getServiceIdentifierAsString=t.typeConstraint=t.namedConstraint=t.taggedConstraint=t.traverseAncerstors=t.decorate=t.id=t.MetadataReader=t.postConstruct=t.targetName=t.multiInject=t.unmanaged=t.optional=t.LazyServiceIdentifer=t.inject=t.named=t.tagged=t.injectable=t.ContainerModule=t.AsyncContainerModule=t.TargetTypeEnum=t.BindingTypeEnum=t.BindingScopeEnum=t.Container=t.METADATA_KEY=void 0,t.METADATA_KEY=z,Object.defineProperty(t,"Container",{enumerable:!0,get:function(){return de.Container}}),Object.defineProperty(t,"BindingScopeEnum",{enumerable:!0,get:function(){return B.BindingScopeEnum}}),Object.defineProperty(t,"BindingTypeEnum",{enumerable:!0,get:function(){return B.BindingTypeEnum}}),Object.defineProperty(t,"TargetTypeEnum",{enumerable:!0,get:function(){return B.TargetTypeEnum}}),Object.defineProperty(t,"AsyncContainerModule",{enumerable:!0,get:function(){return ve.AsyncContainerModule}}),Object.defineProperty(t,"ContainerModule",{enumerable:!0,get:function(){return ve.ContainerModule}}),Object.defineProperty(t,"injectable",{enumerable:!0,get:function(){return ge.injectable}}),Object.defineProperty(t,"tagged",{enumerable:!0,get:function(){return me.tagged}}),Object.defineProperty(t,"named",{enumerable:!0,get:function(){return ye.named}}),Object.defineProperty(t,"inject",{enumerable:!0,get:function(){return Q.inject}}),Object.defineProperty(t,"LazyServiceIdentifer",{enumerable:!0,get:function(){return Q.LazyServiceIdentifer}}),Object.defineProperty(t,"optional",{enumerable:!0,get:function(){return _e.optional}}),Object.defineProperty(t,"unmanaged",{enumerable:!0,get:function(){return be.unmanaged}}),Object.defineProperty(t,"multiInject",{enumerable:!0,get:function(){return xe.multiInject}}),Object.defineProperty(t,"targetName",{enumerable:!0,get:function(){return Se.targetName}}),Object.defineProperty(t,"postConstruct",{enumerable:!0,get:function(){return Ee.postConstruct}}),Object.defineProperty(t,"MetadataReader",{enumerable:!0,get:function(){return G.MetadataReader}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return U.id}}),Object.defineProperty(t,"decorate",{enumerable:!0,get:function(){return K.decorate}}),Object.defineProperty(t,"traverseAncerstors",{enumerable:!0,get:function(){return ae.traverseAncerstors}}),Object.defineProperty(t,"taggedConstraint",{enumerable:!0,get:function(){return ae.taggedConstraint}}),Object.defineProperty(t,"namedConstraint",{enumerable:!0,get:function(){return ae.namedConstraint}}),Object.defineProperty(t,"typeConstraint",{enumerable:!0,get:function(){return ae.typeConstraint}}),Object.defineProperty(t,"getServiceIdentifierAsString",{enumerable:!0,get:function(){return Y.getServiceIdentifierAsString}}),Object.defineProperty(t,"multiBindToService",{enumerable:!0,get:function(){return Ae.multiBindToService}})}));L(Te);Te.multiBindToService,Te.getServiceIdentifierAsString,Te.typeConstraint,Te.namedConstraint,Te.taggedConstraint,Te.traverseAncerstors;var we=Te.decorate,Ce=(Te.id,Te.MetadataReader,Te.postConstruct),ke=(Te.targetName,Te.multiInject,Te.unmanaged,Te.optional,Te.LazyServiceIdentifer,Te.inject),Me=(Te.named,Te.tagged,Te.injectable),Pe=(Te.ContainerModule,Te.AsyncContainerModule,Te.TargetTypeEnum,Te.BindingTypeEnum,Te.BindingScopeEnum,Te.Container),Ie=(Te.METADATA_KEY,N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Symbol.for("INJECTION");function n(e,t,n,i){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return i&&!Reflect.hasMetadata(r,this,t)&&Reflect.defineMetadata(r,n(),this,t),Reflect.hasMetadata(r,this,t)?Reflect.getMetadata(r,this,t):n()},set:function(e){Reflect.defineMetadata(r,e,this,t)}})}t.makePropertyInjectDecorator=function(e,t){return function(r){return function(i,a){n(i,a,(function(){return e.get(r)}),t)}}},t.makePropertyInjectNamedDecorator=function(e,t){return function(r,i){return function(a,o){n(a,o,(function(){return e.getNamed(r,i)}),t)}}},t.makePropertyInjectTaggedDecorator=function(e,t){return function(r,i,a){return function(o,s){n(o,s,(function(){return e.getTagged(r,i,a)}),t)}}},t.makePropertyMultiInjectDecorator=function(e,t){return function(r){return function(i,a){n(i,a,(function(){return e.getAll(r)}),t)}}}})));L(Ie);Ie.makePropertyInjectDecorator,Ie.makePropertyInjectNamedDecorator,Ie.makePropertyInjectTaggedDecorator,Ie.makePropertyMultiInjectDecorator;var Oe,Re,Le=L(N((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return void 0===t&&(t=!0),{lazyInject:Ie.makePropertyInjectDecorator(e,t),lazyInjectNamed:Ie.makePropertyInjectNamedDecorator(e,t),lazyInjectTagged:Ie.makePropertyInjectTaggedDecorator(e,t),lazyMultiInject:Ie.makePropertyMultiInjectDecorator(e,t)}}}))),Ne=function(e){return e&&e.Math===Math&&e},De=Ne("object"==typeof globalThis&&globalThis)||Ne("object"==typeof window&&window)||Ne("object"==typeof self&&self)||Ne("object"==typeof R&&R)||function(){return this}()||R||Function("return this")(),Fe=function(e){try{return!!e()}catch(e){return!0}},ze=!Fe((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),Be=!Fe((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Ue=Function.prototype.call,je=Be?Ue.bind(Ue):function(){return Ue.apply(Ue,arguments)},Ve={}.propertyIsEnumerable,Ge=Object.getOwnPropertyDescriptor,He={f:Ge&&!Ve.call({1:2},1)?function(e){var t=Ge(this,e);return!!t&&t.enumerable}:Ve},We=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Ye=Function.prototype,Xe=Ye.call,Ze=Be&&Ye.bind.bind(Xe,Xe),qe=Be?Ze:function(e){return function(){return Xe.apply(e,arguments)}},Ke=qe({}.toString),Qe=qe("".slice),$e=function(e){return Qe(Ke(e),8,-1)},Je=Object,et=qe("".split),tt=Fe((function(){return!Je("z").propertyIsEnumerable(0)}))?function(e){return"String"===$e(e)?et(e,""):Je(e)}:Je,rt=function(e){return null==e},nt=TypeError,it=function(e){if(rt(e))throw new nt("Can't call method on "+e);return e},at=function(e){return tt(it(e))},ot="object"==typeof document&&document.all,st={all:ot,IS_HTMLDDA:void 0===ot&&void 0!==ot},ut=st.all,ct=st.IS_HTMLDDA?function(e){return"function"==typeof e||e===ut}:function(e){return"function"==typeof e},lt=st.all,ht=st.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ct(e)||e===lt}:function(e){return"object"==typeof e?null!==e:ct(e)},ft=function(e){return ct(e)?e:void 0},pt=function(e,t){return arguments.length<2?ft(De[e]):De[e]&&De[e][t]},dt=qe({}.isPrototypeOf),vt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",gt=De.process,mt=De.Deno,yt=gt&&gt.versions||mt&&mt.version,_t=yt&&yt.v8;_t&&(Re=(Oe=_t.split("."))[0]>0&&Oe[0]<4?1:+(Oe[0]+Oe[1])),!Re&&vt&&(!(Oe=vt.match(/Edge\/(\d+)/))||Oe[1]>=74)&&(Oe=vt.match(/Chrome\/(\d+)/))&&(Re=+Oe[1]);var bt=Re,xt=De.String,St=!!Object.getOwnPropertySymbols&&!Fe((function(){var e=Symbol("symbol detection");return!xt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&bt&&bt<41})),Et=St&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,At=Object,Tt=Et?function(e){return"symbol"==typeof e}:function(e){var t=pt("Symbol");return ct(t)&&dt(t.prototype,At(e))},wt=String,Ct=function(e){try{return wt(e)}catch(e){return"Object"}},kt=TypeError,Mt=function(e){if(ct(e))return e;throw new kt(Ct(e)+" is not a function")},Pt=function(e,t){var r=e[t];return rt(r)?void 0:Mt(r)},It=TypeError,Ot=Object.defineProperty,Rt=function(e,t){try{Ot(De,e,{value:t,configurable:!0,writable:!0})}catch(r){De[e]=t}return t},Lt=De["__core-js_shared__"]||Rt("__core-js_shared__",{}),Nt=N((function(e){(e.exports=function(e,t){return Lt[e]||(Lt[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.33.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),Dt=Object,Ft=function(e){return Dt(it(e))},zt=qe({}.hasOwnProperty),Bt=Object.hasOwn||function(e,t){return zt(Ft(e),t)},Ut=0,jt=Math.random(),Vt=qe(1..toString),Gt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Vt(++Ut+jt,36)},Ht=De.Symbol,Wt=Nt("wks"),Yt=Et?Ht.for||Ht:Ht&&Ht.withoutSetter||Gt,Xt=function(e){return Bt(Wt,e)||(Wt[e]=St&&Bt(Ht,e)?Ht[e]:Yt("Symbol."+e)),Wt[e]},Zt=TypeError,qt=Xt("toPrimitive"),Kt=function(e,t){if(!ht(e)||Tt(e))return e;var r,n=Pt(e,qt);if(n){if(void 0===t&&(t="default"),r=je(n,e,t),!ht(r)||Tt(r))return r;throw new Zt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&ct(r=e.toString)&&!ht(n=je(r,e)))return n;if(ct(r=e.valueOf)&&!ht(n=je(r,e)))return n;if("string"!==t&&ct(r=e.toString)&&!ht(n=je(r,e)))return n;throw new It("Can't convert object to primitive value")}(e,t)},Qt=function(e){var t=Kt(e,"string");return Tt(t)?t:t+""},$t=De.document,Jt=ht($t)&&ht($t.createElement),er=function(e){return Jt?$t.createElement(e):{}},tr=!ze&&!Fe((function(){return 7!==Object.defineProperty(er("div"),"a",{get:function(){return 7}}).a})),rr=Object.getOwnPropertyDescriptor,nr={f:ze?rr:function(e,t){if(e=at(e),t=Qt(t),tr)try{return rr(e,t)}catch(e){}if(Bt(e,t))return We(!je(He.f,e,t),e[t])}},ir=ze&&Fe((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),ar=String,or=TypeError,sr=function(e){if(ht(e))return e;throw new or(ar(e)+" is not an object")},ur=TypeError,cr=Object.defineProperty,lr=Object.getOwnPropertyDescriptor,hr={f:ze?ir?function(e,t,r){if(sr(e),t=Qt(t),sr(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=lr(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return cr(e,t,r)}:cr:function(e,t,r){if(sr(e),t=Qt(t),sr(r),tr)try{return cr(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new ur("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},fr=ze?function(e,t,r){return hr.f(e,t,We(1,r))}:function(e,t,r){return e[t]=r,e},pr=Function.prototype,dr=ze&&Object.getOwnPropertyDescriptor,vr=Bt(pr,"name"),gr={EXISTS:vr,PROPER:vr&&"something"===function(){}.name,CONFIGURABLE:vr&&(!ze||ze&&dr(pr,"name").configurable)},mr=qe(Function.toString);ct(Lt.inspectSource)||(Lt.inspectSource=function(e){return mr(e)});var yr,_r,br,xr=Lt.inspectSource,Sr=De.WeakMap,Er=ct(Sr)&&/native code/.test(String(Sr)),Ar=Nt("keys"),Tr=function(e){return Ar[e]||(Ar[e]=Gt(e))},wr={},Cr=De.TypeError,kr=De.WeakMap;if(Er||Lt.state){var Mr=Lt.state||(Lt.state=new kr);Mr.get=Mr.get,Mr.has=Mr.has,Mr.set=Mr.set,yr=function(e,t){if(Mr.has(e))throw new Cr("Object already initialized");return t.facade=e,Mr.set(e,t),t},_r=function(e){return Mr.get(e)||{}},br=function(e){return Mr.has(e)}}else{var Pr=Tr("state");wr[Pr]=!0,yr=function(e,t){if(Bt(e,Pr))throw new Cr("Object already initialized");return t.facade=e,fr(e,Pr,t),t},_r=function(e){return Bt(e,Pr)?e[Pr]:{}},br=function(e){return Bt(e,Pr)}}var Ir={set:yr,get:_r,has:br,enforce:function(e){return br(e)?_r(e):yr(e,{})},getterFor:function(e){return function(t){var r;if(!ht(t)||(r=_r(t)).type!==e)throw new Cr("Incompatible receiver, "+e+" required");return r}}},Or=N((function(e){var t=gr.CONFIGURABLE,r=Ir.enforce,n=Ir.get,i=String,a=Object.defineProperty,o=qe("".slice),s=qe("".replace),u=qe([].join),c=ze&&!Fe((function(){return 8!==a((function(){}),"length",{value:8}).length})),l=String(String).split("String"),h=e.exports=function(e,n,h){"Symbol("===o(i(n),0,7)&&(n="["+s(i(n),/^Symbol\(([^)]*)\)/,"$1")+"]"),h&&h.getter&&(n="get "+n),h&&h.setter&&(n="set "+n),(!Bt(e,"name")||t&&e.name!==n)&&(ze?a(e,"name",{value:n,configurable:!0}):e.name=n),c&&h&&Bt(h,"arity")&&e.length!==h.arity&&a(e,"length",{value:h.arity});try{h&&Bt(h,"constructor")&&h.constructor?ze&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var f=r(e);return Bt(f,"source")||(f.source=u(l,"string"==typeof n?n:"")),e};Function.prototype.toString=h((function(){return ct(this)&&n(this).source||xr(this)}),"toString")})),Rr=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(ct(r)&&Or(r,a,n),n.global)i?e[t]=r:Rt(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:hr.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Lr=Math.ceil,Nr=Math.floor,Dr=Math.trunc||function(e){var t=+e;return(t>0?Nr:Lr)(t)},Fr=function(e){var t=+e;return t!=t||0===t?0:Dr(t)},zr=Math.max,Br=Math.min,Ur=function(e,t){var r=Fr(e);return r<0?zr(r+t,0):Br(r,t)},jr=Math.min,Vr=function(e){return e>0?jr(Fr(e),9007199254740991):0},Gr=function(e){return Vr(e.length)},Hr=function(e){return function(t,r,n){var i,a=at(t),o=Gr(a),s=Ur(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},Wr={includes:Hr(!0),indexOf:Hr(!1)},Yr=Wr.indexOf,Xr=qe([].push),Zr=function(e,t){var r,n=at(e),i=0,a=[];for(r in n)!Bt(wr,r)&&Bt(n,r)&&Xr(a,r);for(;t.length>i;)Bt(n,r=t[i++])&&(~Yr(a,r)||Xr(a,r));return a},qr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Kr=qr.concat("length","prototype"),Qr={f:Object.getOwnPropertyNames||function(e){return Zr(e,Kr)}},$r={f:Object.getOwnPropertySymbols},Jr=qe([].concat),en=pt("Reflect","ownKeys")||function(e){var t=Qr.f(sr(e)),r=$r.f;return r?Jr(t,r(e)):t},tn=function(e,t,r){for(var n=en(t),i=hr.f,a=nr.f,o=0;o<n.length;o++){var s=n[o];Bt(e,s)||r&&Bt(r,s)||i(e,s,a(t,s))}},rn=/#|\.prototype\./,nn=function(e,t){var r=on[an(e)];return r===un||r!==sn&&(ct(t)?Fe(t):!!t)},an=nn.normalize=function(e){return String(e).replace(rn,".").toLowerCase()},on=nn.data={},sn=nn.NATIVE="N",un=nn.POLYFILL="P",cn=nn,ln=nr.f,hn=function(e,t){var r,n,i,a,o,s=e.target,u=e.global,c=e.stat;if(r=u?De:c?De[s]||Rt(s,{}):(De[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=ln(r,n))&&o.value:r[n],!cn(u?n:s+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;tn(a,i)}(e.sham||i&&i.sham)&&fr(a,"sham",!0),Rr(r,n,a,e)}},fn={};fn[Xt("toStringTag")]="z";var pn,dn="[object z]"===String(fn),vn=Xt("toStringTag"),gn=Object,mn="Arguments"===$e(function(){return arguments}()),yn=dn?$e:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=gn(e),vn))?r:mn?$e(t):"Object"===(n=$e(t))&&ct(t.callee)?"Arguments":n},_n=String,bn=function(e){if("Symbol"===yn(e))throw new TypeError("Cannot convert a Symbol value to a string");return _n(e)},xn=Object.keys||function(e){return Zr(e,qr)},Sn={f:ze&&!ir?Object.defineProperties:function(e,t){sr(e);for(var r,n=at(t),i=xn(t),a=i.length,o=0;a>o;)hr.f(e,r=i[o++],n[r]);return e}},En=pt("document","documentElement"),An=Tr("IE_PROTO"),Tn=function(){},wn=function(e){return"<script>"+e+"<\/script>"},Cn=function(e){e.write(wn("")),e.close();var t=e.parentWindow.Object;return e=null,t},kn=function(){try{pn=new ActiveXObject("htmlfile")}catch(e){}var e,t;kn="undefined"!=typeof document?document.domain&&pn?Cn(pn):((t=er("iframe")).style.display="none",En.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(wn("document.F=Object")),e.close(),e.F):Cn(pn);for(var r=qr.length;r--;)delete kn.prototype[qr[r]];return kn()};wr[An]=!0;var Mn=Object.create||function(e,t){var r;return null!==e?(Tn.prototype=sr(e),r=new Tn,Tn.prototype=null,r[An]=e):r=kn(),void 0===t?r:Sn.f(r,t)},Pn=function(e,t,r){var n=Qt(t);n in e?hr.f(e,n,We(0,r)):e[n]=r},In=Array,On=Math.max,Rn=function(e,t,r){for(var n=Gr(e),i=Ur(t,n),a=Ur(void 0===r?n:r,n),o=In(On(a-i,0)),s=0;i<a;i++,s++)Pn(o,s,e[i]);return o.length=s,o},Ln=Qr.f,Nn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Dn={f:function(e){return Nn&&"Window"===$e(e)?function(e){try{return Ln(e)}catch(e){return Rn(Nn)}}(e):Ln(at(e))}},Fn=function(e,t,r){return r.get&&Or(r.get,t,{getter:!0}),r.set&&Or(r.set,t,{setter:!0}),hr.f(e,t,r)},zn={f:Xt},Bn=De,Un=hr.f,jn=hr.f,Vn=Xt("toStringTag"),Gn=function(e,t,r){e&&!r&&(e=e.prototype),e&&!Bt(e,Vn)&&jn(e,Vn,{configurable:!0,value:t})},Hn=function(e){if("Function"===$e(e))return qe(e)},Wn=Hn(Hn.bind),Yn=function(e,t){return Mt(e),void 0===t?e:Be?Wn(e,t):function(){return e.apply(t,arguments)}},Xn=Array.isArray||function(e){return"Array"===$e(e)},Zn=function(){},qn=[],Kn=pt("Reflect","construct"),Qn=/^\s*(?:class|function)\b/,$n=qe(Qn.exec),Jn=!Qn.test(Zn),ei=function(e){if(!ct(e))return!1;try{return Kn(Zn,qn,e),!0}catch(e){return!1}},ti=function(e){if(!ct(e))return!1;switch(yn(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Jn||!!$n(Qn,xr(e))}catch(e){return!0}};ti.sham=!0;var ri=!Kn||Fe((function(){var e;return ei(ei.call)||!ei(Object)||!ei((function(){e=!0}))||e}))?ti:ei,ni=Xt("species"),ii=Array,ai=function(e,t){return new(function(e){var t;return Xn(e)&&(t=e.constructor,(ri(t)&&(t===ii||Xn(t.prototype))||ht(t)&&null===(t=t[ni]))&&(t=void 0)),void 0===t?ii:t}(e))(0===t?0:t)},oi=qe([].push),si=function(e){var t=1===e,r=2===e,n=3===e,i=4===e,a=6===e,o=7===e,s=5===e||a;return function(u,c,l,h){for(var f,p,d=Ft(u),v=tt(d),g=Yn(c,l),m=Gr(v),y=0,_=h||ai,b=t?_(u,m):r||o?_(u,0):void 0;m>y;y++)if((s||y in v)&&(p=g(f=v[y],y,d),e))if(t)b[y]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:oi(b,f)}else switch(e){case 4:return!1;case 7:oi(b,f)}return a?-1:n||i?i:b}},ui={forEach:si(0),map:si(1),filter:si(2),some:si(3),every:si(4),find:si(5),findIndex:si(6),filterReject:si(7)},ci=ui.forEach,li=Tr("hidden"),hi=Ir.set,fi=Ir.getterFor("Symbol"),pi=Object.prototype,di=De.Symbol,vi=di&&di.prototype,gi=De.RangeError,mi=De.TypeError,yi=De.QObject,_i=nr.f,bi=hr.f,xi=Dn.f,Si=He.f,Ei=qe([].push),Ai=Nt("symbols"),Ti=Nt("op-symbols"),wi=Nt("wks"),Ci=!yi||!yi.prototype||!yi.prototype.findChild,ki=function(e,t,r){var n=_i(pi,t);n&&delete pi[t],bi(e,t,r),n&&e!==pi&&bi(pi,t,n)},Mi=ze&&Fe((function(){return 7!==Mn(bi({},"a",{get:function(){return bi(this,"a",{value:7}).a}})).a}))?ki:bi,Pi=function(e,t){var r=Ai[e]=Mn(vi);return hi(r,{type:"Symbol",tag:e,description:t}),ze||(r.description=t),r},Ii=function(e,t,r){e===pi&&Ii(Ti,t,r),sr(e);var n=Qt(t);return sr(r),Bt(Ai,n)?(r.enumerable?(Bt(e,li)&&e[li][n]&&(e[li][n]=!1),r=Mn(r,{enumerable:We(0,!1)})):(Bt(e,li)||bi(e,li,We(1,{})),e[li][n]=!0),Mi(e,n,r)):bi(e,n,r)},Oi=function(e,t){sr(e);var r=at(t),n=xn(r).concat(Di(r));return ci(n,(function(t){ze&&!je(Ri,r,t)||Ii(e,t,r[t])})),e},Ri=function(e){var t=Qt(e),r=je(Si,this,t);return!(this===pi&&Bt(Ai,t)&&!Bt(Ti,t))&&(!(r||!Bt(this,t)||!Bt(Ai,t)||Bt(this,li)&&this[li][t])||r)},Li=function(e,t){var r=at(e),n=Qt(t);if(r!==pi||!Bt(Ai,n)||Bt(Ti,n)){var i=_i(r,n);return!i||!Bt(Ai,n)||Bt(r,li)&&r[li][n]||(i.enumerable=!0),i}},Ni=function(e){var t=xi(at(e)),r=[];return ci(t,(function(e){Bt(Ai,e)||Bt(wr,e)||Ei(r,e)})),r},Di=function(e){var t=e===pi,r=xi(t?Ti:at(e)),n=[];return ci(r,(function(e){!Bt(Ai,e)||t&&!Bt(pi,e)||Ei(n,Ai[e])})),n};St||(vi=(di=function(){if(dt(vi,this))throw new mi("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?bn(arguments[0]):void 0,t=Gt(e),r=function(e){var n=void 0===this?De:this;n===pi&&je(r,Ti,e),Bt(n,li)&&Bt(n[li],t)&&(n[li][t]=!1);var i=We(1,e);try{Mi(n,t,i)}catch(e){if(!(e instanceof gi))throw e;ki(n,t,i)}};return ze&&Ci&&Mi(pi,t,{configurable:!0,set:r}),Pi(t,e)}).prototype,Rr(vi,"toString",(function(){return fi(this).tag})),Rr(di,"withoutSetter",(function(e){return Pi(Gt(e),e)})),He.f=Ri,hr.f=Ii,Sn.f=Oi,nr.f=Li,Qr.f=Dn.f=Ni,$r.f=Di,zn.f=function(e){return Pi(Xt(e),e)},ze&&(Fn(vi,"description",{configurable:!0,get:function(){return fi(this).description}}),Rr(pi,"propertyIsEnumerable",Ri,{unsafe:!0}))),hn({global:!0,constructor:!0,wrap:!0,forced:!St,sham:!St},{Symbol:di}),ci(xn(wi),(function(e){!function(e){var t=Bn.Symbol||(Bn.Symbol={});Bt(t,e)||Un(t,e,{value:zn.f(e)})}(e)})),hn({target:"Symbol",stat:!0,forced:!St},{useSetter:function(){Ci=!0},useSimple:function(){Ci=!1}}),hn({target:"Object",stat:!0,forced:!St,sham:!ze},{create:function(e,t){return void 0===t?Mn(e):Oi(Mn(e),t)},defineProperty:Ii,defineProperties:Oi,getOwnPropertyDescriptor:Li}),hn({target:"Object",stat:!0,forced:!St},{getOwnPropertyNames:Ni}),function(){var e=pt("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Xt("toPrimitive");t&&!t[n]&&Rr(t,n,(function(e){return je(r,this)}),{arity:1})}(),Gn(di,"Symbol"),wr[li]=!0;var Fi=St&&!!Symbol.for&&!!Symbol.keyFor,zi=Nt("string-to-symbol-registry"),Bi=Nt("symbol-to-string-registry");hn({target:"Symbol",stat:!0,forced:!Fi},{for:function(e){var t=bn(e);if(Bt(zi,t))return zi[t];var r=pt("Symbol")(t);return zi[t]=r,Bi[r]=t,r}});var Ui=Nt("symbol-to-string-registry");hn({target:"Symbol",stat:!0,forced:!Fi},{keyFor:function(e){if(!Tt(e))throw new TypeError(Ct(e)+" is not a symbol");if(Bt(Ui,e))return Ui[e]}});var ji=Function.prototype,Vi=ji.apply,Gi=ji.call,Hi="object"==typeof Reflect&&Reflect.apply||(Be?Gi.bind(Vi):function(){return Gi.apply(Vi,arguments)}),Wi=qe([].slice),Yi=qe([].push),Xi=function(e){if(ct(e))return e;if(Xn(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Yi(r,i):"number"!=typeof i&&"Number"!==$e(i)&&"String"!==$e(i)||Yi(r,bn(i))}var a=r.length,o=!0;return function(e,t){if(o)return o=!1,t;if(Xn(this))return t;for(var n=0;n<a;n++)if(r[n]===e)return t}}},Zi=String,qi=pt("JSON","stringify"),Ki=qe(/./.exec),Qi=qe("".charAt),$i=qe("".charCodeAt),Ji=qe("".replace),ea=qe(1..toString),ta=/[\uD800-\uDFFF]/g,ra=/^[\uD800-\uDBFF]$/,na=/^[\uDC00-\uDFFF]$/,ia=!St||Fe((function(){var e=pt("Symbol")("stringify detection");return"[null]"!==qi([e])||"{}"!==qi({a:e})||"{}"!==qi(Object(e))})),aa=Fe((function(){return'"\\udf06\\ud834"'!==qi("\udf06\ud834")||'"\\udead"'!==qi("\udead")})),oa=function(e,t){var r=Wi(arguments),n=Xi(t);if(ct(n)||void 0!==e&&!Tt(e))return r[1]=function(e,t){if(ct(n)&&(t=je(n,this,Zi(e),t)),!Tt(t))return t},Hi(qi,null,r)},sa=function(e,t,r){var n=Qi(r,t-1),i=Qi(r,t+1);return Ki(ra,e)&&!Ki(na,i)||Ki(na,e)&&!Ki(ra,n)?"\\u"+ea($i(e,0),16):e};qi&&hn({target:"JSON",stat:!0,arity:3,forced:ia||aa},{stringify:function(e,t,r){var n=Wi(arguments),i=Hi(ia?oa:qi,null,n);return aa&&"string"==typeof i?Ji(i,ta,sa):i}});var ua=!St||Fe((function(){$r.f(1)}));hn({target:"Object",stat:!0,forced:ua},{getOwnPropertySymbols:function(e){var t=$r.f;return t?t(Ft(e)):[]}});var ca=De.Symbol,la=ca&&ca.prototype;if(ze&&ct(ca)&&(!("description"in la)||void 0!==ca().description)){var ha={},fa=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:bn(arguments[0]),t=dt(la,this)?new ca(e):void 0===e?ca():ca(e);return""===e&&(ha[t]=!0),t};tn(fa,ca),fa.prototype=la,la.constructor=fa;var pa="Symbol(description detection)"===String(ca("description detection")),da=qe(la.valueOf),va=qe(la.toString),ga=/^Symbol\((.*)\)[^)]+$/,ma=qe("".replace),ya=qe("".slice);Fn(la,"description",{configurable:!0,get:function(){var e=da(this);if(Bt(ha,e))return"";var t=va(e),r=pa?ya(t,7,-1):ma(t,ga,"$1");return""===r?void 0:r}}),hn({global:!0,constructor:!0,forced:!0},{Symbol:fa})}var _a=dn?{}.toString:function(){return"[object "+yn(this)+"]"};dn||Rr(Object.prototype,"toString",_a,{unsafe:!0});var ba={IEventEmitter:Symbol.for("IEventEmitter"),ISceneService:Symbol.for("ISceneService"),IGlobalConfigService:Symbol.for("IGlobalConfigService"),ICameraService:Symbol.for("ICameraService"),ICoordinateSystemService:Symbol.for("ICoordinateSystemService"),ILayerService:Symbol.for("ILayerService"),IDebugService:Symbol.for("IDebugService"),ILayerMappingService:Symbol.for("ILayerMappingService"),ILayerStyleService:Symbol.for("ILayerStyleService"),IMapService:Symbol.for("IMapService"),IMarkerService:Symbol.for("IMarkerService"),IPopupService:Symbol.for("PopupService"),IFactoryMapService:Symbol.for("Factory<IMapService>"),IRendererService:Symbol.for("IRendererService"),IShaderModuleService:Symbol.for("IShaderModuleService"),IIconService:Symbol.for("IIconService"),IFontService:Symbol.for("IFontService"),IInteractionService:Symbol.for("IInteractionService"),IPickingService:Symbol.for("IPickingService"),IControlService:Symbol.for("IControlService"),IStyleAttributeService:Symbol.for("IStyleAttributeService"),ILayer:Symbol.for("ILayer"),ILayerPlugin:Symbol.for("ILayerPlugin"),INormalPass:Symbol.for("INormalPass"),IPostProcessor:Symbol.for("IPostProcessor"),IPostProcessingPass:Symbol.for("IPostProcessingPass"),IFactoryPostProcessingPass:Symbol.for("Factory<IPostProcessingPass>"),IFactoryNormalPass:Symbol.for("Factory<IFactoryNormalPass>"),IMultiPassRenderer:Symbol.for("IMultiPassRenderer"),SceneID:Symbol.for("SceneID"),MapConfig:Symbol.for("MapConfig")},xa=TypeError,Sa=function(e){if(e>9007199254740991)throw xa("Maximum allowed index exceeded");return e},Ea=Xt("species"),Aa=function(e){return bt>=51||!Fe((function(){var t=[];return(t.constructor={})[Ea]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ta=Xt("isConcatSpreadable"),wa=bt>=51||!Fe((function(){var e=[];return e[Ta]=!1,e.concat()[0]!==e})),Ca=function(e){if(!ht(e))return!1;var t=e[Ta];return void 0!==t?!!t:Xn(e)},ka=!wa||!Aa("concat");hn({target:"Array",proto:!0,arity:1,forced:ka},{concat:function(e){var t,r,n,i,a,o=Ft(this),s=ai(o,0),u=0;for(t=-1,n=arguments.length;t<n;t++)if(Ca(a=-1===t?o:arguments[t]))for(i=Gr(a),Sa(u+i),r=0;r<i;r++,u++)r in a&&Pn(s,u,a[r]);else Sa(u+1),Pn(s,u++,a);return s.length=u,s}});var Ma=hr.f,Pa=Xt("unscopables"),Ia=Array.prototype;void 0===Ia[Pa]&&Ma(Ia,Pa,{configurable:!0,value:Mn(null)});var Oa,Ra,La,Na=function(e){Ia[Pa][e]=!0},Da={},Fa=!Fe((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),za=Tr("IE_PROTO"),Ba=Object,Ua=Ba.prototype,ja=Fa?Ba.getPrototypeOf:function(e){var t=Ft(e);if(Bt(t,za))return t[za];var r=t.constructor;return ct(r)&&t instanceof r?r.prototype:t instanceof Ba?Ua:null},Va=Xt("iterator"),Ga=!1;[].keys&&("next"in(La=[].keys())?(Ra=ja(ja(La)))!==Object.prototype&&(Oa=Ra):Ga=!0),(!ht(Oa)||Fe((function(){var e={};return Oa[Va].call(e)!==e})))&&(Oa={}),ct(Oa[Va])||Rr(Oa,Va,(function(){return this}));var Ha={IteratorPrototype:Oa,BUGGY_SAFARI_ITERATORS:Ga},Wa=Ha.IteratorPrototype,Ya=function(){return this},Xa=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Mn(Wa,{next:We(+!n,r)}),Gn(e,i,!1),Da[i]=Ya,e},Za=String,qa=TypeError,Ka=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=function(e,t,r){try{return qe(Mt(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}(Object.prototype,"__proto__","set"))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return sr(r),function(e){if("object"==typeof e||ct(e))return e;throw new qa("Can't set "+Za(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Qa=gr.PROPER,$a=gr.CONFIGURABLE,Ja=Ha.IteratorPrototype,eo=Ha.BUGGY_SAFARI_ITERATORS,to=Xt("iterator"),ro=function(){return this},no=function(e,t,r,n,i,a,o){Xa(r,t,n);var s,u,c,l=function(e){if(e===i&&v)return v;if(!eo&&e&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",f=!1,p=e.prototype,d=p[to]||p["@@iterator"]||i&&p[i],v=!eo&&d||l(i),g="Array"===t&&p.entries||d;if(g&&(s=ja(g.call(new e)))!==Object.prototype&&s.next&&(ja(s)!==Ja&&(Ka?Ka(s,Ja):ct(s[to])||Rr(s,to,ro)),Gn(s,h,!0)),Qa&&"values"===i&&d&&"values"!==d.name&&($a?fr(p,"name","values"):(f=!0,v=function(){return je(d,this)})),i)if(u={values:l("values"),keys:a?v:l("keys"),entries:l("entries")},o)for(c in u)(eo||f||!(c in p))&&Rr(p,c,u[c]);else hn({target:t,proto:!0,forced:eo||f},u);return p[to]!==v&&Rr(p,to,v,{name:i}),Da[t]=v,u},io=function(e,t){return{value:e,done:t}},ao=hr.f,oo=Ir.set,so=Ir.getterFor("Array Iterator"),uo=no(Array,"Array",(function(e,t){oo(this,{type:"Array Iterator",target:at(e),index:0,kind:t})}),(function(){var e=so(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,io(void 0,!0);switch(e.kind){case"keys":return io(r,!1);case"values":return io(t[r],!1)}return io([r,t[r]],!1)}),"values"),co=Da.Arguments=Da.Array;if(Na("keys"),Na("values"),Na("entries"),ze&&"values"!==co.name)try{ao(co,"name",{value:"values"})}catch(e){}var lo=Fe((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),ho=Object.isExtensible,fo=Fe((function(){ho(1)}))||lo?function(e){return!!ht(e)&&((!lo||"ArrayBuffer"!==$e(e))&&(!ho||ho(e)))}:ho,po=!Fe((function(){return Object.isExtensible(Object.preventExtensions({}))})),vo=N((function(e){var t=hr.f,r=!1,n=Gt("meta"),i=0,a=function(e){t(e,n,{value:{objectID:"O"+i++,weakData:{}}})},o=e.exports={enable:function(){o.enable=function(){},r=!0;var e=Qr.f,t=qe([].splice),i={};i[n]=1,e(i).length&&(Qr.f=function(r){for(var i=e(r),a=0,o=i.length;a<o;a++)if(i[a]===n){t(i,a,1);break}return i},hn({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Dn.f}))},fastKey:function(e,t){if(!ht(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Bt(e,n)){if(!fo(e))return"F";if(!t)return"E";a(e)}return e[n].objectID},getWeakData:function(e,t){if(!Bt(e,n)){if(!fo(e))return!0;if(!t)return!1;a(e)}return e[n].weakData},onFreeze:function(e){return po&&r&&fo(e)&&!Bt(e,n)&&a(e),e}};wr[n]=!0})),go=(vo.enable,vo.fastKey,vo.getWeakData,vo.onFreeze,Xt("iterator")),mo=Array.prototype,yo=function(e){return void 0!==e&&(Da.Array===e||mo[go]===e)},_o=Xt("iterator"),bo=function(e){if(!rt(e))return Pt(e,_o)||Pt(e,"@@iterator")||Da[yn(e)]},xo=TypeError,So=function(e,t){var r=arguments.length<2?bo(e):t;if(Mt(r))return sr(je(r,e));throw new xo(Ct(e)+" is not iterable")},Eo=function(e,t,r){var n,i;sr(e);try{if(!(n=Pt(e,"return"))){if("throw"===t)throw r;return r}n=je(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return sr(n),r},Ao=TypeError,To=function(e,t){this.stopped=e,this.result=t},wo=To.prototype,Co=function(e,t,r){var n,i,a,o,s,u,c,l=r&&r.that,h=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),v=Yn(t,l),g=function(e){return n&&Eo(n,"normal",e),new To(!0,e)},m=function(e){return h?(sr(e),d?v(e[0],e[1],g):v(e[0],e[1])):d?v(e,g):v(e)};if(f)n=e.iterator;else if(p)n=e;else{if(!(i=bo(e)))throw new Ao(Ct(e)+" is not iterable");if(yo(i)){for(a=0,o=Gr(e);o>a;a++)if((s=m(e[a]))&&dt(wo,s))return s;return new To(!1)}n=So(e,i)}for(u=f?e.next:n.next;!(c=je(u,n)).done;){try{s=m(c.value)}catch(e){Eo(n,"throw",e)}if("object"==typeof s&&s&&dt(wo,s))return s}return new To(!1)},ko=TypeError,Mo=function(e,t){if(dt(t,e))return e;throw new ko("Incorrect invocation")},Po=Xt("iterator"),Io=!1;try{var Oo=0,Ro={next:function(){return{done:!!Oo++}},return:function(){Io=!0}};Ro[Po]=function(){return this},Array.from(Ro,(function(){throw 2}))}catch(e){}var Lo=function(e,t){try{if(!t&&!Io)return!1}catch(e){return!1}var r=!1;try{var n={};n[Po]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},No=function(e,t,r){var n,i;return Ka&&ct(n=t.constructor)&&n!==r&&ht(i=n.prototype)&&i!==r.prototype&&Ka(e,i),e},Do=function(e,t,r){var n=-1!==e.indexOf("Map"),i=-1!==e.indexOf("Weak"),a=n?"set":"add",o=De[e],s=o&&o.prototype,u=o,c={},l=function(e){var t=qe(s[e]);Rr(s,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(i&&!ht(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return i&&!ht(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(i&&!ht(e))&&t(this,0===e?0:e)}:function(e,r){return t(this,0===e?0:e,r),this})};if(cn(e,!ct(o)||!(i||s.forEach&&!Fe((function(){(new o).entries().next()})))))u=r.getConstructor(t,e,n,a),vo.enable();else if(cn(e,!0)){var h=new u,f=h[a](i?{}:-0,1)!==h,p=Fe((function(){h.has(1)})),d=Lo((function(e){new o(e)})),v=!i&&Fe((function(){for(var e=new o,t=5;t--;)e[a](t,t);return!e.has(-0)}));d||((u=t((function(e,t){Mo(e,s);var r=No(new o,e,u);return rt(t)||Co(t,r[a],{that:r,AS_ENTRIES:n}),r}))).prototype=s,s.constructor=u),(p||v)&&(l("delete"),l("has"),n&&l("get")),(v||f)&&l(a),i&&s.clear&&delete s.clear}return c[e]=u,hn({global:!0,constructor:!0,forced:u!==o},c),Gn(u,e),i||r.setStrong(u,e,n),u},Fo=function(e,t,r){for(var n in t)Rr(e,n,t[n],r);return e},zo=Xt("species"),Bo=function(e){var t=pt(e);ze&&t&&!t[zo]&&Fn(t,zo,{configurable:!0,get:function(){return this}})},Uo=vo.fastKey,jo=Ir.set,Vo=Ir.getterFor,Go={getConstructor:function(e,t,r,n){var i=e((function(e,i){Mo(e,a),jo(e,{type:t,index:Mn(null),first:void 0,last:void 0,size:0}),ze||(e.size=0),rt(i)||Co(i,e[n],{that:e,AS_ENTRIES:r})})),a=i.prototype,o=Vo(t),s=function(e,t,r){var n,i,a=o(e),s=u(e,t);return s?s.value=r:(a.last=s={index:i=Uo(t,!0),key:t,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=s),n&&(n.next=s),ze?a.size++:e.size++,"F"!==i&&(a.index[i]=s)),e},u=function(e,t){var r,n=o(e),i=Uo(t);if("F"!==i)return n.index[i];for(r=n.first;r;r=r.next)if(r.key===t)return r};return Fo(a,{clear:function(){for(var e=o(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,ze?e.size=0:this.size=0},delete:function(e){var t=o(this),r=u(this,e);if(r){var n=r.next,i=r.previous;delete t.index[r.index],r.removed=!0,i&&(i.next=n),n&&(n.previous=i),t.first===r&&(t.first=n),t.last===r&&(t.last=i),ze?t.size--:this.size--}return!!r},forEach:function(e){for(var t,r=o(this),n=Yn(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),Fo(a,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),ze&&Fn(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=Vo(t),a=Vo(n);no(e,t,(function(e,t){jo(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?io("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=void 0,io(void 0,!0))}),r?"entries":"values",!r,!0),Bo(t)}};Do("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Go);var Ho=qe("".charAt),Wo=qe("".charCodeAt),Yo=qe("".slice),Xo=function(e){return function(t,r){var n,i,a=bn(it(t)),o=Fr(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=Wo(a,o))<55296||n>56319||o+1===s||(i=Wo(a,o+1))<56320||i>57343?e?Ho(a,o):n:e?Yo(a,o,o+2):i-56320+(n-55296<<10)+65536}},Zo={codeAt:Xo(!1),charAt:Xo(!0)},qo=Zo.charAt,Ko=Ir.set,Qo=Ir.getterFor("String Iterator");no(String,"String",(function(e){Ko(this,{type:"String Iterator",string:bn(e),index:0})}),(function(){var e,t=Qo(this),r=t.string,n=t.index;return n>=r.length?io(void 0,!0):(e=qo(r,n),t.index+=e.length,io(e,!1))}));var $o={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},Jo=er("span").classList,es=Jo&&Jo.constructor&&Jo.constructor.prototype,ts=es===Object.prototype?void 0:es,rs=Xt("iterator"),ns=Xt("toStringTag"),is=uo.values,as=function(e,t){if(e){if(e[rs]!==is)try{fr(e,rs,is)}catch(t){e[rs]=is}if(e[ns]||fr(e,ns,t),$o[t])for(var r in uo)if(e[r]!==uo[r])try{fr(e,r,uo[r])}catch(t){e[r]=uo[r]}}};for(var os in $o)as(De[os]&&De[os].prototype,os);as(ts,"DOMTokenList");var ss=function(e,t){var r=[][e];return!!r&&Fe((function(){r.call(null,t||function(){return 1},1)}))},us=ui.forEach,cs=ss("forEach")?[].forEach:function(e){return us(this,e,arguments.length>1?arguments[1]:void 0)},ls=function(e){if(e&&e.forEach!==cs)try{fr(e,"forEach",cs)}catch(t){e.forEach=cs}};for(var hs in $o)$o[hs]&&ls(De[hs]&&De[hs].prototype);ls(ts);var fs=gr.EXISTS,ps=Function.prototype,ds=qe(ps.toString),vs=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,gs=qe(vs.exec);ze&&!fs&&Fn(ps,"name",{configurable:!0,get:function(){try{return gs(vs,ds(this))[1]}catch(e){return""}}});var ms=function(){var e=sr(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ys=De.RegExp,_s=Fe((function(){var e=ys("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),bs=_s||Fe((function(){return!ys("a","y").sticky})),xs={BROKEN_CARET:_s||Fe((function(){var e=ys("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:bs,UNSUPPORTED_Y:_s},Ss=De.RegExp,Es=Fe((function(){var e=Ss(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})),As=De.RegExp,Ts=Fe((function(){var e=As("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ws=Ir.get,Cs=Nt("native-string-replace",String.prototype.replace),ks=RegExp.prototype.exec,Ms=ks,Ps=qe("".charAt),Is=qe("".indexOf),Os=qe("".replace),Rs=qe("".slice),Ls=function(){var e=/a/,t=/b*/g;return je(ks,e,"a"),je(ks,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),Ns=xs.BROKEN_CARET,Ds=void 0!==/()??/.exec("")[1];(Ls||Ds||Ns||Es||Ts)&&(Ms=function(e){var t,r,n,i,a,o,s,u=this,c=ws(u),l=bn(e),h=c.raw;if(h)return h.lastIndex=u.lastIndex,t=je(Ms,h,l),u.lastIndex=h.lastIndex,t;var f=c.groups,p=Ns&&u.sticky,d=je(ms,u),v=u.source,g=0,m=l;if(p&&(d=Os(d,"y",""),-1===Is(d,"g")&&(d+="g"),m=Rs(l,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Ps(l,u.lastIndex-1))&&(v="(?: "+v+")",m=" "+m,g++),r=new RegExp("^(?:"+v+")",d)),Ds&&(r=new RegExp("^"+v+"$(?!\\s)",d)),Ls&&(n=u.lastIndex),i=je(ks,p?r:u,m),p?i?(i.input=Rs(i.input,g),i[0]=Rs(i[0],g),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:Ls&&i&&(u.lastIndex=u.global?i.index+i[0].length:n),Ds&&i&&i.length>1&&je(Cs,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&f)for(i.groups=o=Mn(null),a=0;a<f.length;a++)o[(s=f[a])[0]]=i[s[1]];return i});var Fs=Ms;hn({target:"RegExp",proto:!0,forced:/./.exec!==Fs},{exec:Fs});var zs=Xt("species"),Bs=RegExp.prototype,Us=function(e,t,r,n){var i=Xt(e),a=!Fe((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),o=a&&!Fe((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[zs]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=Hn(/./[i]),u=t(i,""[e],(function(e,t,r,n,i){var o=Hn(e),u=t.exec;return u===Fs||u===Bs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));Rr(String.prototype,e,u[0]),Rr(Bs,i,u[1])}n&&fr(Bs[i],"sham",!0)},js=Zo.charAt,Vs=function(e,t,r){return t+(r?js(e,t).length:1)},Gs=Math.floor,Hs=qe("".charAt),Ws=qe("".replace),Ys=qe("".slice),Xs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Zs=/\$([$&'`]|\d{1,2})/g,qs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,u=Zs;return void 0!==i&&(i=Ft(i),u=Xs),Ws(a,u,(function(a,u){var c;switch(Hs(u,0)){case"$":return"$";case"&":return e;case"`":return Ys(t,0,r);case"'":return Ys(t,o);case"<":c=i[Ys(u,1,-1)];break;default:var l=+u;if(0===l)return a;if(l>s){var h=Gs(l/10);return 0===h?a:h<=s?void 0===n[h-1]?Hs(u,1):n[h-1]+Hs(u,1):a}c=n[l-1]}return void 0===c?"":c}))},Ks=TypeError,Qs=function(e,t){var r=e.exec;if(ct(r)){var n=je(r,e,t);return null!==n&&sr(n),n}if("RegExp"===$e(e))return je(Fs,e,t);throw new Ks("RegExp#exec called on incompatible receiver")},$s=Xt("replace"),Js=Math.max,eu=Math.min,tu=qe([].concat),ru=qe([].push),nu=qe("".indexOf),iu=qe("".slice),au="$0"==="a".replace(/./,"$0"),ou=!!/./[$s]&&""===/./[$s]("a","$0");Us("replace",(function(e,t,r){var n=ou?"$":"$0";return[function(e,r){var n=it(this),i=rt(e)?void 0:Pt(e,$s);return i?je(i,e,n,r):je(t,bn(n),e,r)},function(e,i){var a=sr(this),o=bn(e);if("string"==typeof i&&-1===nu(i,n)&&-1===nu(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var u=ct(i);u||(i=bn(i));var c,l=a.global;l&&(c=a.unicode,a.lastIndex=0);for(var h,f=[];null!==(h=Qs(a,o))&&(ru(f,h),l);){""===bn(h[0])&&(a.lastIndex=Vs(o,Vr(a.lastIndex),c))}for(var p,d="",v=0,g=0;g<f.length;g++){for(var m,y=bn((h=f[g])[0]),_=Js(eu(Fr(h.index),o.length),0),b=[],x=1;x<h.length;x++)ru(b,void 0===(p=h[x])?p:String(p));var S=h.groups;if(u){var E=tu([y],b,_,o);void 0!==S&&ru(E,S),m=bn(Hi(i,void 0,E))}else m=qs(y,o,_,b,S,i);_>=v&&(d+=iu(o,v,_)+m,v=_+y.length)}return d+iu(o,v)}]}),!!Fe((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!au||ou),Do("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Go);var su=Fe((function(){xn(1)}));hn({target:"Object",stat:!0,forced:su},{keys:function(e){return xn(Ft(e))}});var uu=RegExp.prototype,cu=function(e){var t=e.flags;return void 0!==t||"flags"in uu||Bt(e,"flags")||!dt(uu,e)?t:je(ms,e)},lu=gr.PROPER,hu=RegExp.prototype.toString,fu=Fe((function(){return"/a/b"!==hu.call({source:"a",flags:"b"})})),pu=lu&&"toString"!==hu.name;(fu||pu)&&Rr(RegExp.prototype,"toString",(function(){var e=sr(this);return"/"+bn(e.source)+"/"+bn(cu(e))}),{unsafe:!0});var du,vu,gu,mu,yu="process"===$e(De.process),_u=TypeError,bu=function(e){if(ri(e))return e;throw new _u(Ct(e)+" is not a constructor")},xu=Xt("species"),Su=function(e,t){var r,n=sr(e).constructor;return void 0===n||rt(r=sr(n)[xu])?t:bu(r)},Eu=TypeError,Au=function(e,t){if(e<t)throw new Eu("Not enough arguments");return e},Tu=/(?:ipad|iphone|ipod).*applewebkit/i.test(vt),wu=De.setImmediate,Cu=De.clearImmediate,ku=De.process,Mu=De.Dispatch,Pu=De.Function,Iu=De.MessageChannel,Ou=De.String,Ru=0,Lu={};Fe((function(){du=De.location}));var Nu=function(e){if(Bt(Lu,e)){var t=Lu[e];delete Lu[e],t()}},Du=function(e){return function(){Nu(e)}},Fu=function(e){Nu(e.data)},zu=function(e){De.postMessage(Ou(e),du.protocol+"//"+du.host)};wu&&Cu||(wu=function(e){Au(arguments.length,1);var t=ct(e)?e:Pu(e),r=Wi(arguments,1);return Lu[++Ru]=function(){Hi(t,void 0,r)},vu(Ru),Ru},Cu=function(e){delete Lu[e]},yu?vu=function(e){ku.nextTick(Du(e))}:Mu&&Mu.now?vu=function(e){Mu.now(Du(e))}:Iu&&!Tu?(mu=(gu=new Iu).port2,gu.port1.onmessage=Fu,vu=Yn(mu.postMessage,mu)):De.addEventListener&&ct(De.postMessage)&&!De.importScripts&&du&&"file:"!==du.protocol&&!Fe(zu)?(vu=zu,De.addEventListener("message",Fu,!1)):vu="onreadystatechange"in er("script")?function(e){En.appendChild(er("script")).onreadystatechange=function(){En.removeChild(this),Nu(e)}}:function(e){setTimeout(Du(e),0)});var Bu={set:wu,clear:Cu},Uu=function(){this.head=null,this.tail=null};Uu.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var ju,Vu,Gu,Hu,Wu,Yu=Uu,Xu=/ipad|iphone|ipod/i.test(vt)&&"undefined"!=typeof Pebble,Zu=/web0s(?!.*chrome)/i.test(vt),qu=nr.f,Ku=Bu.set,Qu=De.MutationObserver||De.WebKitMutationObserver,$u=De.document,Ju=De.process,ec=De.Promise,tc=qu(De,"queueMicrotask"),rc=tc&&tc.value;if(!rc){var nc=new Yu,ic=function(){var e,t;for(yu&&(e=Ju.domain)&&e.exit();t=nc.get();)try{t()}catch(e){throw nc.head&&ju(),e}e&&e.enter()};Tu||yu||Zu||!Qu||!$u?!Xu&&ec&&ec.resolve?((Hu=ec.resolve(void 0)).constructor=ec,Wu=Yn(Hu.then,Hu),ju=function(){Wu(ic)}):yu?ju=function(){Ju.nextTick(ic)}:(Ku=Yn(Ku,De),ju=function(){Ku(ic)}):(Vu=!0,Gu=$u.createTextNode(""),new Qu(ic).observe(Gu,{characterData:!0}),ju=function(){Gu.data=Vu=!Vu}),rc=function(e){nc.head||ju(),nc.add(e)}}var ac,oc,sc,uc=rc,cc=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},lc=De.Promise,hc="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,fc=!hc&&!yu&&"object"==typeof window&&"object"==typeof document,pc=(lc&&lc.prototype,Xt("species")),dc=!1,vc=ct(De.PromiseRejectionEvent),gc={CONSTRUCTOR:cn("Promise",(function(){var e=xr(lc),t=e!==String(lc);if(!t&&66===bt)return!0;if(!bt||bt<51||!/native code/.test(e)){var r=new lc((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((r.constructor={})[pc]=n,!(dc=r.then((function(){}))instanceof n))return!0}return!t&&(fc||hc)&&!vc})),REJECTION_EVENT:vc,SUBCLASSING:dc},mc=TypeError,yc=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw new mc("Bad Promise constructor");t=e,r=n})),this.resolve=Mt(t),this.reject=Mt(r)},_c={f:function(e){return new yc(e)}},bc=Bu.set,xc=gc.CONSTRUCTOR,Sc=gc.REJECTION_EVENT,Ec=gc.SUBCLASSING,Ac=Ir.getterFor("Promise"),Tc=Ir.set,wc=lc&&lc.prototype,Cc=lc,kc=wc,Mc=De.TypeError,Pc=De.document,Ic=De.process,Oc=_c.f,Rc=Oc,Lc=!!(Pc&&Pc.createEvent&&De.dispatchEvent),Nc=function(e){var t;return!(!ht(e)||!ct(t=e.then))&&t},Dc=function(e,t){var r,n,i,a=t.value,o=1===t.state,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,l=e.domain;try{s?(o||(2===t.rejection&&jc(t),t.rejection=1),!0===s?r=a:(l&&l.enter(),r=s(a),l&&(l.exit(),i=!0)),r===e.promise?c(new Mc("Promise-chain cycle")):(n=Nc(r))?je(n,r,u,c):u(r)):c(a)}catch(e){l&&!i&&l.exit(),c(e)}},Fc=function(e,t){e.notified||(e.notified=!0,uc((function(){for(var r,n=e.reactions;r=n.get();)Dc(r,e);e.notified=!1,t&&!e.rejection&&Bc(e)})))},zc=function(e,t,r){var n,i;Lc?((n=Pc.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),De.dispatchEvent(n)):n={promise:t,reason:r},!Sc&&(i=De["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",r)},Bc=function(e){je(bc,De,(function(){var t,r=e.facade,n=e.value;if(Uc(e)&&(t=cc((function(){yu?Ic.emit("unhandledRejection",n,r):zc("unhandledrejection",r,n)})),e.rejection=yu||Uc(e)?2:1,t.error))throw t.value}))},Uc=function(e){return 1!==e.rejection&&!e.parent},jc=function(e){je(bc,De,(function(){var t=e.facade;yu?Ic.emit("rejectionHandled",t):zc("rejectionhandled",t,e.value)}))},Vc=function(e,t,r){return function(n){e(t,n,r)}},Gc=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Fc(e,!0))},Hc=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new Mc("Promise can't be resolved itself");var n=Nc(t);n?uc((function(){var r={done:!1};try{je(n,t,Vc(Hc,r,e),Vc(Gc,r,e))}catch(t){Gc(r,t,e)}})):(e.value=t,e.state=1,Fc(e,!1))}catch(t){Gc({done:!1},t,e)}}};if(xc&&(kc=(Cc=function(e){Mo(this,kc),Mt(e),je(ac,this);var t=Ac(this);try{e(Vc(Hc,t),Vc(Gc,t))}catch(e){Gc(t,e)}}).prototype,(ac=function(e){Tc(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Yu,rejection:!1,state:0,value:void 0})}).prototype=Rr(kc,"then",(function(e,t){var r=Ac(this),n=Oc(Su(this,Cc));return r.parent=!0,n.ok=!ct(e)||e,n.fail=ct(t)&&t,n.domain=yu?Ic.domain:void 0,0===r.state?r.reactions.add(n):uc((function(){Dc(n,r)})),n.promise})),oc=function(){var e=new ac,t=Ac(e);this.promise=e,this.resolve=Vc(Hc,t),this.reject=Vc(Gc,t)},_c.f=Oc=function(e){return e===Cc||void 0===e?new oc(e):Rc(e)},ct(lc)&&wc!==Object.prototype)){sc=wc.then,Ec||Rr(wc,"then",(function(e,t){var r=this;return new Cc((function(e,t){je(sc,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete wc.constructor}catch(e){}Ka&&Ka(wc,kc)}hn({global:!0,constructor:!0,wrap:!0,forced:xc},{Promise:Cc}),Gn(Cc,"Promise",!1),Bo("Promise");var Wc=gc.CONSTRUCTOR||!Lo((function(e){lc.all(e).then(void 0,(function(){}))}));hn({target:"Promise",stat:!0,forced:Wc},{all:function(e){var t=this,r=_c.f(t),n=r.resolve,i=r.reject,a=cc((function(){var r=Mt(t.resolve),a=[],o=0,s=1;Co(e,(function(e){var u=o++,c=!1;s++,je(r,t,e).then((function(e){c||(c=!0,a[u]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var Yc=gc.CONSTRUCTOR,Xc=lc&&lc.prototype;if(hn({target:"Promise",proto:!0,forced:Yc,real:!0},{catch:function(e){return this.then(void 0,e)}}),ct(lc)){var Zc=pt("Promise").prototype.catch;Xc.catch!==Zc&&Rr(Xc,"catch",Zc,{unsafe:!0})}hn({target:"Promise",stat:!0,forced:Wc},{race:function(e){var t=this,r=_c.f(t),n=r.reject,i=cc((function(){var i=Mt(t.resolve);Co(e,(function(e){je(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),hn({target:"Promise",stat:!0,forced:gc.CONSTRUCTOR},{reject:function(e){var t=_c.f(this);return je(t.reject,void 0,e),t.promise}});var qc=gc.CONSTRUCTOR;pt("Promise");hn({target:"Promise",stat:!0,forced:qc},{resolve:function(e){return function(e,t){if(sr(e),ht(t)&&t.constructor===e)return t;var r=_c.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});var Kc,Qc,$c,Jc="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,el=Ir.enforce,tl=Ir.get,rl=De.Int8Array,nl=rl&&rl.prototype,il=De.Uint8ClampedArray,al=il&&il.prototype,ol=rl&&ja(rl),sl=nl&&ja(nl),ul=Object.prototype,cl=De.TypeError,ll=Xt("toStringTag"),hl=Gt("TYPED_ARRAY_TAG"),fl=Jc&&!!Ka&&"Opera"!==yn(De.opera),pl=!1,dl={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},vl={BigInt64Array:8,BigUint64Array:8},gl=function(e){var t=ja(e);if(ht(t)){var r=tl(t);return r&&Bt(r,"TypedArrayConstructor")?r.TypedArrayConstructor:gl(t)}},ml=function(e){if(!ht(e))return!1;var t=yn(e);return Bt(dl,t)||Bt(vl,t)};for(Kc in dl)($c=(Qc=De[Kc])&&Qc.prototype)?el($c).TypedArrayConstructor=Qc:fl=!1;for(Kc in vl)($c=(Qc=De[Kc])&&Qc.prototype)&&(el($c).TypedArrayConstructor=Qc);if((!fl||!ct(ol)||ol===Function.prototype)&&(ol=function(){throw new cl("Incorrect invocation")},fl))for(Kc in dl)De[Kc]&&Ka(De[Kc],ol);if((!fl||!sl||sl===ul)&&(sl=ol.prototype,fl))for(Kc in dl)De[Kc]&&Ka(De[Kc].prototype,sl);if(fl&&ja(al)!==sl&&Ka(al,sl),ze&&!Bt(sl,ll))for(Kc in pl=!0,Fn(sl,ll,{configurable:!0,get:function(){return ht(this)?this[hl]:void 0}}),dl)De[Kc]&&fr(De[Kc],hl,Kc);var yl={NATIVE_ARRAY_BUFFER_VIEWS:fl,TYPED_ARRAY_TAG:pl&&hl,aTypedArray:function(e){if(ml(e))return e;throw new cl("Target is not a typed array")},aTypedArrayConstructor:function(e){if(ct(e)&&(!Ka||dt(ol,e)))return e;throw new cl(Ct(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(ze){if(r)for(var i in dl){var a=De[i];if(a&&Bt(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}sl[e]&&!r||Rr(sl,e,r?t:fl&&nl[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(ze){if(Ka){if(r)for(n in dl)if((i=De[n])&&Bt(i,e))try{delete i[e]}catch(e){}if(ol[e]&&!r)return;try{return Rr(ol,e,r?t:fl&&ol[e]||t)}catch(e){}}for(n in dl)!(i=De[n])||i[e]&&!r||Rr(i,e,t)}},getTypedArrayConstructor:gl,isView:function(e){if(!ht(e))return!1;var t=yn(e);return"DataView"===t||Bt(dl,t)||Bt(vl,t)},isTypedArray:ml,TypedArray:ol,TypedArrayPrototype:sl},_l=yl.NATIVE_ARRAY_BUFFER_VIEWS,bl=De.ArrayBuffer,xl=De.Int8Array,Sl=!_l||!Fe((function(){xl(1)}))||!Fe((function(){new xl(-1)}))||!Lo((function(e){new xl,new xl(null),new xl(1.5),new xl(e)}),!0)||Fe((function(){return 1!==new xl(new bl(2),1,void 0).length})),El=RangeError,Al=function(e){if(void 0===e)return 0;var t=Fr(e),r=Vr(t);if(t!==r)throw new El("Wrong length or index");return r},Tl=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1},wl=Math.abs,Cl=Math.fround||function(e){return function(e,t,r,n){var i=+e,a=wl(i),o=Tl(i);if(a<n)return o*function(e){return e+4503599627370496-4503599627370496}(a/n/t)*n*t;var s=(1+t/2220446049250313e-31)*a,u=s-(s-a);return u>r||u!=u?o*(1/0):o*u}(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},kl=Array,Ml=Math.abs,Pl=Math.pow,Il=Math.floor,Ol=Math.log,Rl=Math.LN2,Ll=function(e,t,r){var n,i,a,o=kl(r),s=8*r-t-1,u=(1<<s)-1,c=u>>1,l=23===t?Pl(2,-24)-Pl(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Ml(e))!=e||e===1/0?(i=e!=e?1:0,n=u):(n=Il(Ol(e)/Rl),e*(a=Pl(2,-n))<1&&(n--,a*=2),(e+=n+c>=1?l/a:l*Pl(2,1-c))*a>=2&&(n++,a/=2),n+c>=u?(i=0,n=u):n+c>=1?(i=(e*a-1)*Pl(2,t),n+=c):(i=e*Pl(2,c-1)*Pl(2,t),n=0));t>=8;)o[f++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},Nl=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)r=256*r+e[u--],s-=8;if(0===l)l=1-o;else{if(l===a)return r?NaN:c?-1/0:1/0;r+=Pl(2,t),l-=o}return(c?-1:1)*r*Pl(2,l-t)},Dl=function(e){for(var t=Ft(this),r=Gr(t),n=arguments.length,i=Ur(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:Ur(a,r);o>i;)t[i++]=e;return t},Fl=Qr.f,zl=gr.PROPER,Bl=gr.CONFIGURABLE,Ul=Ir.getterFor("ArrayBuffer"),jl=Ir.getterFor("DataView"),Vl=Ir.set,Gl=De.ArrayBuffer,Hl=Gl,Wl=Hl&&Hl.prototype,Yl=De.DataView,Xl=Yl&&Yl.prototype,Zl=Object.prototype,ql=De.Array,Kl=De.RangeError,Ql=qe(Dl),$l=qe([].reverse),Jl=Ll,eh=Nl,th=function(e){return[255&e]},rh=function(e){return[255&e,e>>8&255]},nh=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},ih=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},ah=function(e){return Jl(Cl(e),23,4)},oh=function(e){return Jl(e,52,8)},sh=function(e,t,r){Fn(e.prototype,t,{configurable:!0,get:function(){return r(this)[t]}})},uh=function(e,t,r,n){var i=jl(e),a=Al(r),o=!!n;if(a+t>i.byteLength)throw new Kl("Wrong index");var s=i.bytes,u=a+i.byteOffset,c=Rn(s,u,u+t);return o?c:$l(c)},ch=function(e,t,r,n,i,a){var o=jl(e),s=Al(r),u=n(+i),c=!!a;if(s+t>o.byteLength)throw new Kl("Wrong index");for(var l=o.bytes,h=s+o.byteOffset,f=0;f<t;f++)l[h+f]=u[c?f:t-f-1]};if(Jc){var lh=zl&&"ArrayBuffer"!==Gl.name;if(Fe((function(){Gl(1)}))&&Fe((function(){new Gl(-1)}))&&!Fe((function(){return new Gl,new Gl(1.5),new Gl(NaN),1!==Gl.length||lh&&!Bl})))lh&&Bl&&fr(Gl,"name","ArrayBuffer");else{(Hl=function(e){return Mo(this,Wl),new Gl(Al(e))}).prototype=Wl;for(var hh,fh=Fl(Gl),ph=0;fh.length>ph;)(hh=fh[ph++])in Hl||fr(Hl,hh,Gl[hh]);Wl.constructor=Hl}Ka&&ja(Xl)!==Zl&&Ka(Xl,Zl);var dh=new Yl(new Hl(2)),vh=qe(Xl.setInt8);dh.setInt8(0,2147483648),dh.setInt8(1,2147483649),!dh.getInt8(0)&&dh.getInt8(1)||Fo(Xl,{setInt8:function(e,t){vh(this,e,t<<24>>24)},setUint8:function(e,t){vh(this,e,t<<24>>24)}},{unsafe:!0})}else Wl=(Hl=function(e){Mo(this,Wl);var t=Al(e);Vl(this,{type:"ArrayBuffer",bytes:Ql(ql(t),0),byteLength:t}),ze||(this.byteLength=t,this.detached=!1)}).prototype,Xl=(Yl=function(e,t,r){Mo(this,Xl),Mo(e,Wl);var n=Ul(e),i=n.byteLength,a=Fr(t);if(a<0||a>i)throw new Kl("Wrong offset");if(a+(r=void 0===r?i-a:Vr(r))>i)throw new Kl("Wrong length");Vl(this,{type:"DataView",buffer:e,byteLength:r,byteOffset:a,bytes:n.bytes}),ze||(this.buffer=e,this.byteLength=r,this.byteOffset=a)}).prototype,ze&&(sh(Hl,"byteLength",Ul),sh(Yl,"buffer",jl),sh(Yl,"byteLength",jl),sh(Yl,"byteOffset",jl)),Fo(Xl,{getInt8:function(e){return uh(this,1,e)[0]<<24>>24},getUint8:function(e){return uh(this,1,e)[0]},getInt16:function(e){var t=uh(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=uh(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return ih(uh(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return ih(uh(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return eh(uh(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return eh(uh(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){ch(this,1,e,th,t)},setUint8:function(e,t){ch(this,1,e,th,t)},setInt16:function(e,t){ch(this,2,e,rh,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){ch(this,2,e,rh,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){ch(this,4,e,nh,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){ch(this,4,e,nh,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){ch(this,4,e,ah,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){ch(this,8,e,oh,t,arguments.length>2&&arguments[2])}});Gn(Hl,"ArrayBuffer"),Gn(Yl,"DataView");var gh={ArrayBuffer:Hl,DataView:Yl},mh=Math.floor,yh=Number.isInteger||function(e){return!ht(e)&&isFinite(e)&&mh(e)===e},_h=RangeError,bh=RangeError,xh=function(e,t){var r=function(e){var t=Fr(e);if(t<0)throw new _h("The argument can't be less than 0");return t}(e);if(r%t)throw new bh("Wrong offset");return r},Sh=Math.round,Eh=function(e){var t=yn(e);return"BigInt64Array"===t||"BigUint64Array"===t},Ah=TypeError,Th=function(e){var t=Kt(e,"number");if("number"==typeof t)throw new Ah("Can't convert number to bigint");return BigInt(t)},wh=yl.aTypedArrayConstructor,Ch=function(e){var t,r,n,i,a,o,s,u,c=bu(this),l=Ft(e),h=arguments.length,f=h>1?arguments[1]:void 0,p=void 0!==f,d=bo(l);if(d&&!yo(d))for(u=(s=So(l,d)).next,l=[];!(o=je(u,s)).done;)l.push(o.value);for(p&&h>2&&(f=Yn(f,arguments[2])),r=Gr(l),n=new(wh(c))(r),i=Eh(n),t=0;r>t;t++)a=p?f(l[t],t):l[t],n[t]=i?Th(a):+a;return n},kh=N((function(e){var t=Qr.f,r=ui.forEach,n=Ir.get,i=Ir.set,a=Ir.enforce,o=hr.f,s=nr.f,u=De.RangeError,c=gh.ArrayBuffer,l=c.prototype,h=gh.DataView,f=yl.NATIVE_ARRAY_BUFFER_VIEWS,p=yl.TYPED_ARRAY_TAG,d=yl.TypedArray,v=yl.TypedArrayPrototype,g=yl.aTypedArrayConstructor,m=yl.isTypedArray,y=function(e,t){g(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},_=function(e,t){Fn(e,t,{configurable:!0,get:function(){return n(this)[t]}})},b=function(e){var t;return dt(l,e)||"ArrayBuffer"===(t=yn(e))||"SharedArrayBuffer"===t},x=function(e,t){return m(e)&&!Tt(t)&&t in e&&yh(+t)&&t>=0},S=function(e,t){return t=Qt(t),x(e,t)?We(2,e[t]):s(e,t)},E=function(e,t,r){return t=Qt(t),!(x(e,t)&&ht(r)&&Bt(r,"value"))||Bt(r,"get")||Bt(r,"set")||r.configurable||Bt(r,"writable")&&!r.writable||Bt(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};ze?(f||(nr.f=S,hr.f=E,_(v,"buffer"),_(v,"byteOffset"),_(v,"byteLength"),_(v,"length")),hn({target:"Object",stat:!0,forced:!f},{getOwnPropertyDescriptor:S,defineProperty:E}),e.exports=function(e,s,l){var g=e.match(/\d+/)[0]/8,_=e+(l?"Clamped":"")+"Array",x="get"+e,S="set"+e,E=De[_],A=E,T=A&&A.prototype,w={},C=function(e,t,r){var i=n(e);i.view[S](t*g+i.byteOffset,l?function(e){var t=Sh(e);return t<0?0:t>255?255:255&t}(r):r,!0)},k=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[x](t*g+r.byteOffset,!0)}(this,t)},set:function(e){return C(this,t,e)},enumerable:!0})};f?Sl&&(A=s((function(e,t,r,n){return Mo(e,T),No(ht(t)?b(t)?void 0!==n?new E(t,xh(r,g),n):void 0!==r?new E(t,xh(r,g)):new E(t):m(t)?y(A,t):je(Ch,A,t):new E(Al(t)),e,A)})),Ka&&Ka(A,d),r(t(E),(function(e){e in A||fr(A,e,E[e])})),A.prototype=T):(A=s((function(e,t,r,n){Mo(e,T);var a,o,s,l=0,f=0;if(ht(t)){if(!b(t))return m(t)?y(A,t):je(Ch,A,t);a=t,f=xh(r,g);var p=t.byteLength;if(void 0===n){if(p%g)throw new u("Wrong length");if((o=p-f)<0)throw new u("Wrong length")}else if((o=Vr(n)*g)+f>p)throw new u("Wrong length");s=o/g}else s=Al(t),a=new c(o=s*g);for(i(e,{buffer:a,byteOffset:f,byteLength:o,length:s,view:new h(a)});l<s;)k(e,l++)})),Ka&&Ka(A,d),T=A.prototype=Mn(v)),T.constructor!==A&&fr(T,"constructor",A),a(T).TypedArrayConstructor=A,p&&fr(T,p,_);var M=A!==E;w[_]=A,hn({global:!0,constructor:!0,forced:M,sham:!f},w),"BYTES_PER_ELEMENT"in A||fr(A,"BYTES_PER_ELEMENT",g),"BYTES_PER_ELEMENT"in T||fr(T,"BYTES_PER_ELEMENT",g),Bo(_)}):e.exports=function(){}}));kh("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Mh=TypeError,Ph=function(e,t){if(!delete e[t])throw new Mh("Cannot delete property "+Ct(t)+" of "+Ct(e))},Ih=Math.min,Oh=qe([].copyWithin||function(e,t){var r=Ft(this),n=Gr(r),i=Ur(e,n),a=Ur(t,n),o=arguments.length>2?arguments[2]:void 0,s=Ih((void 0===o?n:Ur(o,n))-a,n-i),u=1;for(a<i&&i<a+s&&(u=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Ph(r,i),i+=u,a+=u;return r}),Rh=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("copyWithin",(function(e,t){return Oh(Rh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Lh=ui.every,Nh=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("every",(function(e){return Lh(Nh(this),e,arguments.length>1?arguments[1]:void 0)}));var Dh=yl.aTypedArray,Fh=yl.exportTypedArrayMethod,zh=qe("".slice);Fh("fill",(function(e){var t=arguments.length;Dh(this);var r="Big"===zh(yn(this),0,3)?Th(e):+e;return je(Dl,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),Fe((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Bh=yl.aTypedArrayConstructor,Uh=yl.getTypedArrayConstructor,jh=function(e){return Bh(Su(e,Uh(e)))},Vh=function(e,t){return function(e,t){for(var r=0,n=Gr(t),i=new e(n);n>r;)i[r]=t[r++];return i}(jh(e),t)},Gh=ui.filter,Hh=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("filter",(function(e){var t=Gh(Hh(this),e,arguments.length>1?arguments[1]:void 0);return Vh(this,t)}));var Wh=ui.find,Yh=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("find",(function(e){return Wh(Yh(this),e,arguments.length>1?arguments[1]:void 0)}));var Xh=ui.findIndex,Zh=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("findIndex",(function(e){return Xh(Zh(this),e,arguments.length>1?arguments[1]:void 0)}));var qh=ui.forEach,Kh=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("forEach",(function(e){qh(Kh(this),e,arguments.length>1?arguments[1]:void 0)}));var Qh=Wr.includes,$h=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("includes",(function(e){return Qh($h(this),e,arguments.length>1?arguments[1]:void 0)}));var Jh=Wr.indexOf,ef=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("indexOf",(function(e){return Jh(ef(this),e,arguments.length>1?arguments[1]:void 0)}));var tf=Xt("iterator"),rf=De.Uint8Array,nf=qe(uo.values),af=qe(uo.keys),of=qe(uo.entries),sf=yl.aTypedArray,uf=yl.exportTypedArrayMethod,cf=rf&&rf.prototype,lf=!Fe((function(){cf[tf].call([1])})),hf=!!cf&&cf.values&&cf[tf]===cf.values&&"values"===cf.values.name,ff=function(){return nf(sf(this))};uf("entries",(function(){return of(sf(this))}),lf),uf("keys",(function(){return af(sf(this))}),lf),uf("values",ff,lf||!hf,{name:"values"}),uf(tf,ff,lf||!hf,{name:"values"});var pf=yl.aTypedArray,df=yl.exportTypedArrayMethod,vf=qe([].join);df("join",(function(e){return vf(pf(this),e)}));var gf=Math.min,mf=[].lastIndexOf,yf=!!mf&&1/[1].lastIndexOf(1,-0)<0,_f=ss("lastIndexOf"),bf=yf||!_f?function(e){if(yf)return Hi(mf,this,arguments)||0;var t=at(this),r=Gr(t),n=r-1;for(arguments.length>1&&(n=gf(n,Fr(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:mf,xf=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return Hi(bf,xf(this),t>1?[e,arguments[1]]:[e])}));var Sf=ui.map,Ef=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("map",(function(e){return Sf(Ef(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(jh(e))(t)}))}));var Af=TypeError,Tf=function(e){return function(t,r,n,i){Mt(r);var a=Ft(t),o=tt(a),s=Gr(a),u=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(u in o){i=o[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw new Af("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in o&&(i=r(i,o[u],u,a));return i}},wf={left:Tf(!1),right:Tf(!0)},Cf=wf.left,kf=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Cf(kf(this),e,t,t>1?arguments[1]:void 0)}));var Mf=wf.right,Pf=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Mf(Pf(this),e,t,t>1?arguments[1]:void 0)}));var If=yl.aTypedArray,Of=yl.exportTypedArrayMethod,Rf=Math.floor;Of("reverse",(function(){for(var e,t=If(this).length,r=Rf(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Lf=De.RangeError,Nf=De.Int8Array,Df=Nf&&Nf.prototype,Ff=Df&&Df.set,zf=yl.aTypedArray,Bf=yl.exportTypedArrayMethod,Uf=!Fe((function(){var e=new Uint8ClampedArray(2);return je(Ff,e,{length:1,0:3},1),3!==e[1]})),jf=Uf&&yl.NATIVE_ARRAY_BUFFER_VIEWS&&Fe((function(){var e=new Nf(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Bf("set",(function(e){zf(this);var t=xh(arguments.length>1?arguments[1]:void 0,1),r=Ft(e);if(Uf)return je(Ff,this,r,t);var n=this.length,i=Gr(r),a=0;if(i+t>n)throw new Lf("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Uf||jf);var Vf=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("slice",(function(e,t){for(var r=Wi(Vf(this),e,t),n=jh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),Fe((function(){new Int8Array(1).slice()})));var Gf=ui.some,Hf=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("some",(function(e){return Gf(Hf(this),e,arguments.length>1?arguments[1]:void 0)}));var Wf=Math.floor,Yf=function(e,t){var r=e.length,n=Wf(r/2);return r<8?Xf(e,t):Zf(e,Yf(Rn(e,0,n),t),Yf(Rn(e,n),t),t)},Xf=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Zf=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},qf=Yf,Kf=vt.match(/firefox\/(\d+)/i),Qf=!!Kf&&+Kf[1],$f=/MSIE|Trident/.test(vt),Jf=vt.match(/AppleWebKit\/(\d+)\./),ep=!!Jf&&+Jf[1],tp=yl.aTypedArray,rp=yl.exportTypedArrayMethod,np=De.Uint16Array,ip=np&&Hn(np.prototype.sort),ap=!(!ip||Fe((function(){ip(new np(2),null)}))&&Fe((function(){ip(new np(2),{})}))),op=!!ip&&!Fe((function(){if(bt)return bt<74;if(Qf)return Qf<67;if($f)return!0;if(ep)return ep<602;var e,t,r=new np(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(ip(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));rp("sort",(function(e){return void 0!==e&&Mt(e),op?ip(this,e):qf(tp(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!op||ap);var sp=yl.aTypedArray;(0,yl.exportTypedArrayMethod)("subarray",(function(e,t){var r=sp(this),n=r.length,i=Ur(e,n);return new(jh(r))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,Vr((void 0===t?n:Ur(t,n))-i))}));var up=De.Int8Array,cp=yl.aTypedArray,lp=yl.exportTypedArrayMethod,hp=[].toLocaleString,fp=!!up&&Fe((function(){hp.call(new up(1))}));lp("toLocaleString",(function(){return Hi(hp,fp?Wi(cp(this)):cp(this),Wi(arguments))}),Fe((function(){return[1,2].toLocaleString()!==new up([1,2]).toLocaleString()}))||!Fe((function(){up.prototype.toLocaleString.call([1,2])})));var pp=yl.exportTypedArrayMethod,dp=De.Uint8Array,vp=dp&&dp.prototype||{},gp=[].toString,mp=qe([].join);Fe((function(){gp.call({})}))&&(gp=function(){return mp(this)});var yp=vp.toString!==gp;pp("toString",gp,yp);var _p=Aa("slice"),bp=Xt("species"),xp=Array,Sp=Math.max;hn({target:"Array",proto:!0,forced:!_p},{slice:function(e,t){var r,n,i,a=at(this),o=Gr(a),s=Ur(e,o),u=Ur(void 0===t?o:t,o);if(Xn(a)&&(r=a.constructor,(ri(r)&&(r===xp||Xn(r.prototype))||ht(r)&&null===(r=r[bp]))&&(r=void 0),r===xp||void 0===r))return Wi(a,s,u);for(n=new(void 0===r?xp:r)(Sp(u-s,0)),i=0;s<u;s++,i++)s in a&&Pn(n,i,a[s]);return n.length=i,n}});var Ep="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function Ap(e){this.message=e}function Tp(e){for(var t,r,n,i,a="",o=0,s=(e=String(e)).length%3;o<e.length;){if((r=e.charCodeAt(o++))>255||(n=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");a+=Ep.charAt((t=r<<16|n<<8|i)>>18&63)+Ep.charAt(t>>12&63)+Ep.charAt(t>>6&63)+Ep.charAt(63&t)}return s?a.slice(0,s-3)+"===".substring(s):a}Ap.prototype=new Error,Ap.prototype.name="InvalidCharacterError";var wp,Cp=function(){function e(t,r){u(this,e),this.buffers=t,this.type=r}return l(e,[{key:"arraybuffer",value:function(){return Promise.resolve(this.buffers[0])}},{key:"stream",value:function(){throw new Error("not implemented")}},{key:"text",value:function(){throw new Error("not implemented")}},{key:"slice",value:function(e,t,r){throw new Error("not implemented")}}]),e}();hn({global:!0,forced:De.globalThis!==De},{globalThis:De}),wp="undefined"==typeof window?{devicePixelRatio:1,navigator:{userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",browserLanguage:"zh-CN",language:"zh-CN",platform:""},location:"",document:{documentElement:{style:{}},createEvent:function(){return!0},getElementById:function(e){return!0},createElement:function(){return{className:"",classList:{add:function(){return""}}}},createElementNS:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},querySelector:function(){return!1}},performance:{mark:function(e){return null},clearMeasures:function(e){return null},clearMarks:function(e){return null},measure:function(e,t,r){return{duration:0}},now:function(){return(new Date).getTime()}},Blob:"",dispatchEvent:function(e){return!0},Event:function(e,t){return!0},createElement:function(){return!0},createElementNS:function(){return!0},XMLHttpRequest:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},requestAnimationFrame:function(){return!0},cancelAnimationFrame:function(){return!0},clearTimeout:function(){return!0}}:window;var kp="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM?my.getSystemInfoSync().pixelRatio:wp.devicePixelRatio,Mp=TypeError,Pp=Object.getOwnPropertyDescriptor,Ip=ze&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(Xn(e)&&!Pp(e,"length").writable)throw new Mp("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Op=Aa("splice"),Rp=Math.max,Lp=Math.min;hn({target:"Array",proto:!0,forced:!Op},{splice:function(e,t){var r,n,i,a,o,s,u=Ft(this),c=Gr(u),l=Ur(e,c),h=arguments.length;for(0===h?r=n=0:1===h?(r=0,n=c-l):(r=h-2,n=Lp(Rp(Fr(t),0),c-l)),Sa(c+r-n),i=ai(u,n),a=0;a<n;a++)(o=l+a)in u&&Pn(i,a,u[o]);if(i.length=n,r<n){for(a=l;a<c-n;a++)s=a+r,(o=a+n)in u?u[s]=u[o]:Ph(u,s);for(a=c;a>c-n+r;a--)Ph(u,a-1)}else if(r>n)for(a=c-n;a>l;a--)s=a+r-1,(o=a+n-1)in u?u[s]=u[o]:Ph(u,s);for(a=0;a<r;a++)u[a+l]=arguments[a+2];return Ip(u,c-n+r),i}});var Np=l((function e(t,r){u(this,e),h(this,"cancelBubble",void 0),h(this,"cancelable",void 0),h(this,"target",void 0),h(this,"currentTarget",void 0),h(this,"preventDefault",void 0),h(this,"stopPropagation",void 0),h(this,"type",void 0),h(this,"timeStamp",void 0),this.cancelBubble=!1,this.cancelable=!1,this.target=null,this.currentTarget=null,this.preventDefault=function(){},this.stopPropagation=function(){},this.type=t,this.timeStamp=Date.now()})),Dp=Object.assign,Fp=Object.defineProperty,zp=qe([].concat),Bp=!Dp||Fe((function(){if(ze&&1!==Dp({b:1},Dp(Fp({},"a",{enumerable:!0,get:function(){Fp(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection");return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!==Dp({},e)[r]||"abcdefghijklmnopqrst"!==xn(Dp({},t)).join("")}))?function(e,t){for(var r=Ft(e),n=arguments.length,i=1,a=$r.f,o=He.f;n>i;)for(var s,u=tt(arguments[i++]),c=a?zp(xn(u),a(u)):xn(u),l=c.length,h=0;l>h;)s=c[h++],ze&&!je(o,u,s)||(r[s]=u[s]);return r}:Dp;hn({target:"Object",stat:!0,arity:2,forced:Object.assign!==Bp},{assign:Bp});var Up=ui.findIndex,jp=!0;"findIndex"in[]&&Array(1).findIndex((function(){jp=!1})),hn({target:"Array",proto:!0,forced:jp},{findIndex:function(e){return Up(this,e,arguments.length>1?arguments[1]:void 0)}}),Na("findIndex");var Vp=vo.getWeakData,Gp=Ir.set,Hp=Ir.getterFor,Wp=ui.find,Yp=ui.findIndex,Xp=qe([].splice),Zp=0,qp=function(e){return e.frozen||(e.frozen=new Kp)},Kp=function(){this.entries=[]},Qp=function(e,t){return Wp(e.entries,(function(e){return e[0]===t}))};Kp.prototype={get:function(e){var t=Qp(this,e);if(t)return t[1]},has:function(e){return!!Qp(this,e)},set:function(e,t){var r=Qp(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=Yp(this.entries,(function(t){return t[0]===e}));return~t&&Xp(this.entries,t,1),!!~t}};var $p,Jp={getConstructor:function(e,t,r,n){var i=e((function(e,i){Mo(e,a),Gp(e,{type:t,id:Zp++,frozen:void 0}),rt(i)||Co(i,e[n],{that:e,AS_ENTRIES:r})})),a=i.prototype,o=Hp(t),s=function(e,t,r){var n=o(e),i=Vp(sr(t),!0);return!0===i?qp(n).set(t,r):i[n.id]=r,e};return Fo(a,{delete:function(e){var t=o(this);if(!ht(e))return!1;var r=Vp(e);return!0===r?qp(t).delete(e):r&&Bt(r,t.id)&&delete r[t.id]},has:function(e){var t=o(this);if(!ht(e))return!1;var r=Vp(e);return!0===r?qp(t).has(e):r&&Bt(r,t.id)}}),Fo(a,r?{get:function(e){var t=o(this);if(ht(e)){var r=Vp(e);return!0===r?qp(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),i}},ed=Ir.enforce,td=Object,rd=Array.isArray,nd=td.isExtensible,id=td.isFrozen,ad=td.isSealed,od=td.freeze,sd=td.seal,ud={},cd={},ld=!De.ActiveXObject&&"ActiveXObject"in De,hd=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},fd=Do("WeakMap",hd,Jp),pd=fd.prototype,dd=qe(pd.set);if(Er)if(ld){$p=Jp.getConstructor(hd,"WeakMap",!0),vo.enable();var vd=qe(pd.delete),gd=qe(pd.has),md=qe(pd.get);Fo(pd,{delete:function(e){if(ht(e)&&!nd(e)){var t=ed(this);return t.frozen||(t.frozen=new $p),vd(this,e)||t.frozen.delete(e)}return vd(this,e)},has:function(e){if(ht(e)&&!nd(e)){var t=ed(this);return t.frozen||(t.frozen=new $p),gd(this,e)||t.frozen.has(e)}return gd(this,e)},get:function(e){if(ht(e)&&!nd(e)){var t=ed(this);return t.frozen||(t.frozen=new $p),gd(this,e)?md(this,e):t.frozen.get(e)}return md(this,e)},set:function(e,t){if(ht(e)&&!nd(e)){var r=ed(this);r.frozen||(r.frozen=new $p),gd(this,e)?dd(this,e,t):r.frozen.set(e,t)}else dd(this,e,t);return this}})}else po&&Fe((function(){var e=od([]);return dd(new fd,e,1),!id(e)}))&&Fo(pd,{set:function(e,t){var r;return rd(e)&&(id(e)?r=ud:ad(e)&&(r=cd)),dd(this,e,t),r===ud&&od(e),r===cd&&sd(e),this}});var yd,_d,bd,xd,Sd=new WeakMap,Ed=function(){function e(){u(this,e),Sd.set(this,{})}return l(e,[{key:"addEventListener",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Sd.get(this);n||(n={}),n[e]||(n[e]=[]),n[e].push(t),Sd.set(this,n),r.capture,r.once,r.passive}},{key:"removeEventListener",value:function(e,t){var r=Sd.get(this);if(r){var n=r[e];if(n&&n.length>0)for(var i=n.length;i--;i>0)if(n[i]===t){n.splice(i,1);break}}}},{key:"dispatchEvent",value:function(e){var t=Sd.get(this)[e.type];if(t){var r,n=k(t);try{for(n.s();!(r=n.n()).done;){(0,r.value)(e)}}catch(e){n.e(e)}finally{n.f()}}}}]),e}(),Ad=function(e){f(r,e);var t=x(r);function r(){var e;return u(this,r),h(_(e=t.call(this)),"childNodes",void 0),e.childNodes=[],e}return l(r,[{key:"appendChild",value:function(e){this.childNodes.push(e)}},{key:"cloneNode",value:function(){var e=Object.create(this);return Object.assign(e,this),e}},{key:"removeChild",value:function(e){var t=this.childNodes.findIndex((function(t){return t===e}));return t>-1?this.childNodes.splice(t,1):null}}]),r}(Ed),Td=function(e){f(r,e);var t=x(r);function r(){var e;return u(this,r),h(_(e=t.call(this)),"className",void 0),h(_(e),"children",void 0),e.className="",e.children=[],e}return l(r,[{key:"setAttribute",value:function(e,t){this[e]=t}},{key:"getAttribute",value:function(e){return this[e]}},{key:"setAttributeNS",value:function(e,t){this[e]=t}},{key:"getAttributeNS",value:function(e){return this[e]}}]),r}(Ad);if("undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM){var wd=my.getSystemInfoSync();yd=wd.screenWidth,_d=wd.screenHeight,bd=wd.windowWidth,xd=wd.windowHeight}else{var Cd=wp.innerWidth,kd=wp.innerHeight;yd=Cd,_d=kd,bd=Cd,xd=kd}var Md={width:yd,height:_d,availWidth:bd,availHeight:xd,availLeft:0,availTop:0},Pd=Md.availWidth,Id=Md.availHeight,Od={style:[]};function Rd(e,t){var r,n;"parentNode"in e||(r=0===t?function(){return null}:1===t?function(){return Od}:function(){return null},Object.defineProperty(e,"parentNode",{enumerable:!0,get:r}));"parentElement"in e||(n=0===t?function(){return null}:1===t?function(){return Od}:function(){return null},Object.defineProperty(e,"parentElement",{enumerable:!0,get:n}))}function Ld(e){e.style=e.style||{},Object.assign(e.style,{top:"0px",left:"0px",width:Pd+"px",height:Id+"px",margin:"0px",padding:"0px"})}function Nd(e){"clientLeft"in e||(e.clientLeft=0,e.clientTop=0),"clientWidth"in e||(e.clientWidth=Pd,e.clientHeight=Id),"getBoundingClientRect"in e||(e.getBoundingClientRect=function(){return{x:0,y:0,top:0,left:0,width:this.clientWidth,height:this.clientHeight,right:this.clientWidth,bottom:this.clientHeight}})}function Dd(e){"offsetLeft"in e||(e.offsetLeft=0,e.offsetTop=0),"offsetWidth"in e||(e.offsetWidth=Pd,e.offsetHeight=Id)}function Fd(e){"scrollLeft"in e||(e.scrollLeft=0,e.scrollTop=0),"scrollWidth"in e||(e.scrollWidth=Pd,e.scrollHeight=Id)}function zd(e){var t=function(){return!0};e.classList=[],e.classList.add=t,e.classList.remove=t,e.classList.contains=t,e.classList.toggle=t}function Bd(){}var Ud=function(e){f(r,e);var t=x(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1?arguments[1]:void 0;return u(this,r),h(_(e=t.call(this)),"className",void 0),h(_(e),"children",void 0),h(_(e),"focus",void 0),h(_(e),"blur",void 0),h(_(e),"insertBefore",void 0),h(_(e),"appendChild",void 0),h(_(e),"removeChild",void 0),h(_(e),"remove",void 0),h(_(e),"innerHTML",void 0),h(_(e),"tagName",void 0),e.className="",e.children=[],e.focus=Bd,e.blur=Bd,e.insertBefore=Bd,e.appendChild=Bd,e.removeChild=Bd,e.remove=Bd,e.innerHTML="",e.tagName=n.toUpperCase(),Rd(_(e),i),Ld(_(e)),zd(_(e)),Nd(_(e)),Dd(_(e)),Fd(_(e)),e}return l(r)}(Td),jd=function(e){f(r,e);var t=x(r);function r(e){return u(this,r),t.call(this,e)}return l(r,[{key:"addTextTrack",value:function(){}},{key:"captureStream",value:function(){}},{key:"fastSeek",value:function(){}},{key:"load",value:function(){}},{key:"pause",value:function(){}},{key:"play",value:function(){}}]),r}(Ud),Vd=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.call(this,"video")}return l(r)}(jd),Gd={};function Hd(){return Gd}var Wd=l((function e(){u(this,e);var t=Hd(),r=t.createImage&&t.createImage()||{};return"tagName"in r||(r.tagName="IMG",r.__proto__=e.prototype),Rd(r),zd(r),Object.assign(r,{addEventListener:function(e,t){r["on".concat(e)]=t.bind(r)},removeEventListener:function(e){r["on".concat(e)]=null}}),r})),Yd={href:"",protocol:"",host:""},Xd=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.call(this,"body",0)}return l(r,[{key:"addEventListener",value:function(e,t){}},{key:"removeEventListener",value:function(e,t,r){}},{key:"dispatchEvent",value:function(e){}}]),r}(Ud),Zd=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.call(this,"html",0)}return l(r,[{key:"addEventListener",value:function(e,t){}},{key:"removeEventListener",value:function(e,t){}},{key:"dispatchEvent",value:function(e){}}]),r}(Ud),qd={},Kd={readyState:"complete",visibilityState:"visible",hidden:!1,fullscreen:!0,scripts:[],style:{},location:Yd,ontouchstart:null,ontouchmove:null,ontouchend:null,onvisibilitychange:null,parentNode:null,parentElement:null,head:null,body:null,documentElement:{style:[]},createElement:function(e){return"canvas"===(e=e.toLowerCase())?my.createOffscreenCanvas(1024,128,"2d"):"img"===e?new Wd:"video"===e?new Vd:new Ud(e)},createElementNS:function(e,t){return this.createElement(t)},createTextNode:function(e){return e},getElementById:function(e){return null},getElementsByTagName:function(e){return e=e.toLowerCase(),[]},getElementsByTagNameNS:function(e,t){return this.getElementsByTagName(t)},getElementsByName:function(e){return[]},querySelector:function(e){return null},querySelectorAll:function(e){return[]},addEventListener:function(e,t,r){qd[e]||(qd[e]=[]),qd[e].push(t)},removeEventListener:function(e,t){var r=qd[e];if(r&&r.length>0)for(var n=r.length;n--;n>0)if(r[n]===t){r.splice(n,1);break}},dispatchEvent:function(e){var t=e.type,r=qd[t];if(r)for(var n=0;n<r.length;n++)r[n](e);e.target&&"function"==typeof e.target["on"+t]&&e.target["on"+t](e)},createEvent:function(e){return new Np(e)}};Kd.documentElement=new Zd,Kd.head=new Ud("head"),Kd.body=new Xd;var Qd=Object;kh("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}),!0);var $d,Jd,ev,tv,rv=function(){function e(){u(this,e),h(this,"_w",void 0),h(this,"_h",void 0),h(this,"_data",void 0);var t=arguments.length;if(2===t){if("number"==typeof arguments[0]&&"number"==typeof arguments[1])return this._w=arguments[0],this._h=arguments[1],void(this._data=new Uint8ClampedArray(this._w*this._h*4))}else 3===t&&"object"===a(arguments[0])&&"number"==typeof arguments[1]&&"number"==typeof arguments[2]&&(this._data=arguments[0],this._w=arguments[1],this._h=arguments[2]);throw new Error("ImageData: params error")}return l(e,[{key:"width",get:function(){return this._w}},{key:"height",get:function(){return this._h}},{key:"data",get:function(){return this._data}}]),e}();if(Us("match",(function(e,t,r){return[function(t){var r=it(this),n=rt(t)?void 0:Pt(t,e);return n?je(n,t,r):new RegExp(t)[e](bn(r))},function(e){var n=sr(this),i=bn(e),a=r(t,n,i);if(a.done)return a.value;if(!n.global)return Qs(n,i);var o=n.unicode;n.lastIndex=0;for(var s,u=[],c=0;null!==(s=Qs(n,i));){var l=bn(s[0]);u[c]=l,""===l&&(n.lastIndex=Vs(i,Vr(n.lastIndex),o)),c++}return 0===c?null:u}]})),"undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM){var nv=my.getSystemInfoSync();$d=nv.system,Jd=nv.platform,ev=nv.language}else{var iv={versions:(tv=wp.navigator.userAgent,{trident:tv.indexOf("Trident")>-1,presto:tv.indexOf("Presto")>-1,webKit:tv.indexOf("AppleWebKit")>-1,gecko:tv.indexOf("Gecko")>-1&&-1===tv.indexOf("KHTML"),mobile:!!tv.match(/AppleWebKit.*Mobile.*/),ios:!!tv.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:tv.indexOf("Android")>-1||tv.indexOf("Linux")>-1,iPhone:tv.indexOf("iPhone")>-1,iPad:tv.indexOf("iPad")>-1,webApp:-1===tv.indexOf("Safari"),weixin:tv.indexOf("MicroMessenger")>-1,qq:" qq"===tv.match(/\sQQ/i)}),language:(wp.navigator.browserLanguage||wp.navigator.language).toLowerCase()};iv.versions.android?Jd="android":iv.versions.trident?Jd="IE":iv.versions.presto?Jd="Opera":iv.versions.webKit?Jd="webKit":iv.versions.gecko?Jd="Firefox":iv.versions.mobile?Jd="mobile":iv.versions.ios?Jd="ios":iv.versions.iPhone?Jd="iPhone":iv.versions.iPad?Jd="ipad":iv.versions.webApp?Jd="webApp":iv.versions.weixin?Jd="weixin":iv.versions.qq&&(Jd="qq"),$d=wp.navigator.userAgent,ev=iv.language}var av=-1!==$d.toLowerCase().indexOf("android")?"Android; CPU Android 6.0":"iPhone; CPU iPhone OS 10_3_1 like Mac OS X",ov="Mozilla/5.0 (".concat(av,") AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/").concat(ev),sv={platform:Jd,language:ev,appVersion:"5.0 (".concat(av,") AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"),userAgent:ov},uv=0;var cv=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";u(this,e),h(this,"href",void 0),0!=t.indexOf("http://")&&0!=t.indexOf("https://")?this.href=r+t:this.href=t}return l(e,null,[{key:"createObjectURL",value:function(e){var t=e.buffers[0],r=e.type,n=function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return Tp(t)}(t);return"data:".concat(r,";base64, ")+n}}]),e}();var lv=qe([].join),hv=tt!==Object||!ss("join",",");hn({target:"Array",proto:!0,forced:hv},{join:function(e){return lv(at(this),void 0===e?",":e)}});var fv=ui.map,pv=Aa("map");hn({target:"Array",proto:!0,forced:!pv},{map:function(e){return fv(this,e,arguments.length>1?arguments[1]:void 0)}});var dv=new Map,vv=new Map,gv=new Map,mv=function(e){f(r,e);var t=x(r);function r(){var e;return u(this,r),h(_(e=t.call(this)),"onabort",void 0),h(_(e),"onerror",void 0),h(_(e),"onload",void 0),h(_(e),"onloadstart",void 0),h(_(e),"onprogress",void 0),h(_(e),"ontimeout",void 0),h(_(e),"onloadend",void 0),h(_(e),"onreadystatechange",void 0),h(_(e),"readyState",void 0),h(_(e),"response",void 0),h(_(e),"responseText",void 0),h(_(e),"_responseType",void 0),h(_(e),"responseXML",void 0),h(_(e),"status",void 0),h(_(e),"statusText",void 0),h(_(e),"upload",void 0),h(_(e),"withCredentials",void 0),h(_(e),"timeout",void 0),h(_(e),"_url",void 0),h(_(e),"_method",void 0),e.onabort=null,e.onerror=null,e.onload=null,e.onloadstart=null,e.onprogress=null,e.ontimeout=null,e.onloadend=null,e.onreadystatechange=null,e.readyState=0,e.response=null,e.responseText=null,e._responseType="text",e.responseXML=null,e.status=0,e.statusText="",e.upload={},e.withCredentials=!1,dv.set("requestHeader",{"content-type":"application/x-www-form-urlencoded"}),e}return l(r,[{key:"responseType",set:function(e){this._responseType=e}},{key:"abort",value:function(){var e=gv.get("requestTask");e&&e.abort()}},{key:"getAllResponseHeaders",value:function(){var e=vv.get("responseHeader");return Object.keys(e).map((function(t){return"".concat(t,": ").concat(e[t])})).join("\n")}},{key:"getResponseHeader",value:function(e){return vv.get("responseHeader")[e]}},{key:"open",value:function(e,t,r){this._method=e,this._url=t}},{key:"overrideMimeType",value:function(){}},{key:"send",value:function(){}},{key:"setRequestHeader",value:function(e,t){var r=dv.get("requestHeader");r[e]=t,dv.set("requestHeader",r)}},{key:"addEventListener",value:function(e,t){var r=this;"function"==typeof t&&(this["on"+e]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.target=e.target||r,t.call(r,e)})}},{key:"removeEventListener",value:function(e,t){this["on"+e]===t&&(this["on"+e]=null)}}]),r}(Ed);function yv(e){return function(t){t.type=e,Kd.dispatchEvent(t)}}h(mv,"UNSEND",void 0),h(mv,"OPENED",void 0),h(mv,"HEADERS_RECEIVED",void 0),h(mv,"LOADING",void 0),h(mv,"DONE",void 0),mv.UNSEND=0,mv.OPENED=1,mv.HEADERS_RECEIVED=2,mv.LOADING=3,mv.DONE=4;var _v=yv("mousedown"),bv=yv("mousemove"),xv=yv("mouseup"),Sv=function(e){f(r,e);var t=x(r);function r(e){var n;return u(this,r),h(_(n=t.call(this,e)),"buttons",void 0),h(_(n),"which",void 0),h(_(n),"pointerId",void 0),h(_(n),"bubbles",void 0),h(_(n),"button",void 0),h(_(n),"width",void 0),h(_(n),"height",void 0),h(_(n),"pressure",void 0),h(_(n),"isPrimary",void 0),h(_(n),"pointerType",void 0),h(_(n),"altKey",void 0),h(_(n),"ctrlKey",void 0),h(_(n),"metaKey",void 0),h(_(n),"shiftKey",void 0),n.target=Hd(),n.currentTarget=Hd(),n}return l(r)}(Np),Ev=["bubbles","cancelable","view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget","pointerId","width","height","pressure","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","pageX","pageY","timeStamp"],Av=[!1,!1,null,null,0,0,0,0,!1,!1,!1,!1,0,null,0,0,0,0,0,0,0,"",0,!1,0,0,0];function Tv(e,t,r){for(var n=new Sv(e),i=0;i<Ev.length;i++){var a=Ev[i];n[a]=t[a]||Av[i]}return n.type=e,n.target=Hd(),n.currentTarget=Hd(),n.buttons=function(e){var t=0;"touchstart"!==e&&"touchmove"!==e&&"pointerdown"!==e&&"pointermove"!==e||(t=1);return t}(e),n.which=n.buttons,n.pointerId=(t.identifier||0)+2,n.bubbles=!0,n.cancelable=!0,n.button=0,n.width=2*(t.radiusX||.5),n.height=2*(t.radiusY||.5),n.pressure=t.force||.5,n.isPrimary=function(e){return wv===e.identifier}(t),n.pointerType="touch",n.altKey=r.altKey,n.ctrlKey=r.ctrlKey,n.metaKey=r.metaKey,n.shiftKey=r.shiftKey,r.preventDefault&&(n.preventDefault=function(){r.preventDefault()}),n}var wv=null;function Cv(e){null===wv&&(wv=e.identifier)}function kv(e){wv===e.identifier&&(wv=null)}function Mv(e){return function(t){for(var r=t.changedTouches,n=0;n<r.length;n++){var i=r[n];0===n&&"pointerdown"===e?Cv(i):"pointerup"!==e&&"pointercancel"!==e||kv(i);var a=Tv(e,i,t);Kd.dispatchEvent(a)}}}var Pv=Mv("pointerdown"),Iv=Mv("pointermove"),Ov=Mv("pointerup"),Rv=function(e){f(r,e);var t=x(r);function r(e){var n;return u(this,r),h(_(n=t.call(this,e)),"touches",void 0),h(_(n),"targetTouches",void 0),h(_(n),"changedTouches",void 0),n.touches=[],n.targetTouches=[],n.changedTouches=[],n.target=Hd(),n.currentTarget=Hd(),n}return l(r)}(Np);function Lv(e){var t=e||{},r=t.x,n=void 0===r?0:r,i=t.y,a=void 0===i?0:i,o=t.clientX,s=void 0===o?0:o,u=t.clientY,c=void 0===u?0:u;-1!==Object.keys(e).indexOf("x")?(e.pageX=e.clientX=n,e.pageY=e.clientY=a):(e.x=s,e.y=c)}function Nv(e){return function(t){var r=new Rv(e);r.changedTouches=t.changedTouches,r.touches=t.touches,r.targetTouches=Array.prototype.slice.call(t.touches),r.timeStamp=t.timeStamp,r.changedTouches.forEach((function(e){return Lv(e)})),r.touches.forEach((function(e){return Lv(e)})),r.targetTouches.forEach((function(e){return Lv(e)})),Kd.dispatchEvent(r)}}var Dv,Fv=Nv("touchstart"),zv=Nv("touchmove"),Bv=Nv("touchend"),Uv=(Dv="mapCameaParams",function(e){e.type=Dv,Kd.dispatchEvent(e)});function jv(t){e.isMiniScene=t}e.isMiniScene=!1;var Vv="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,Gv="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram),Hv=(Vv||Gv)&&e.isMiniScene,Wv={atob:function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Ap("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,n,i="",a=0,o=0;n=t.charAt(o++);~n&&(r=a%4?64*r+n:n,a++%4)?i+=String.fromCharCode(255&r>>(-2*a&6)):0)n=Ep.indexOf(n);return i},btoa:Tp,devicePixelRatio:kp,Blob:Cp,document:Kd,Element:Td,Event:Np,EventTarget:Ed,HTMLCanvasElement:Qd,HTMLElement:Ud,HTMLMediaElement:jd,HTMLVideoElement:Vd,Image:Wd,ImageData:rv,navigator:sv,Node:Ad,requestAnimationFrame:function(e){var t=Hd();return t.requestAnimationFrame?t.requestAnimationFrame(e):function(e){var t=Date.now(),r=Math.max(uv+23,t);return setTimeout((function(){e(uv=r)}),r-t)}(e)},cancelAnimationFrame:function(e){var t=Hd();return t.cancelAnimationFrame?t.cancelAnimationFrame(e):clearTimeout(e)},screen:Md,XMLHttpRequest:mv,performance:{mark:function(e){return null},clearMeasures:function(e){return null},clearMarks:function(e){return null},measure:function(e,t,r){return{duration:0}},now:function(){}},URL:cv,WebGLRenderingContext:{GCCSO_SHADER_BINARY_FJ:37472,_3DC_XY_AMD:34810,_3DC_X_AMD:34809,ACTIVE_ATTRIBUTES:35721,ACTIVE_ATTRIBUTE_MAX_LENGTH:35722,ACTIVE_PROGRAM_EXT:33369,ACTIVE_TEXTURE:34016,ACTIVE_UNIFORMS:35718,ACTIVE_UNIFORM_MAX_LENGTH:35719,ALIASED_LINE_WIDTH_RANGE:33902,ALIASED_POINT_SIZE_RANGE:33901,ALL_COMPLETED_NV:34034,ALL_SHADER_BITS_EXT:4294967295,ALPHA:6406,ALPHA16F_EXT:34844,ALPHA32F_EXT:34838,ALPHA8_EXT:32828,ALPHA8_OES:32828,ALPHA_BITS:3413,ALPHA_TEST_FUNC_QCOM:3009,ALPHA_TEST_QCOM:3008,ALPHA_TEST_REF_QCOM:3010,ALREADY_SIGNALED_APPLE:37146,ALWAYS:519,AMD_compressed_3DC_texture:1,AMD_compressed_ATC_texture:1,AMD_performance_monitor:1,AMD_program_binary_Z400:1,ANGLE_depth_texture:1,ANGLE_framebuffer_blit:1,ANGLE_framebuffer_multisample:1,ANGLE_instanced_arrays:1,ANGLE_pack_reverse_row_order:1,ANGLE_program_binary:1,ANGLE_texture_compression_dxt3:1,ANGLE_texture_compression_dxt5:1,ANGLE_texture_usage:1,ANGLE_translated_shader_source:1,ANY_SAMPLES_PASSED_CONSERVATIVE_EXT:36202,ANY_SAMPLES_PASSED_EXT:35887,APPLE_copy_texture_levels:1,APPLE_framebuffer_multisample:1,APPLE_rgb_422:1,APPLE_sync:1,APPLE_texture_format_BGRA8888:1,APPLE_texture_max_level:1,ARM_mali_program_binary:1,ARM_mali_shader_binary:1,ARM_rgba8:1,ARRAY_BUFFER:34962,ARRAY_BUFFER_BINDING:34964,ATC_RGBA_EXPLICIT_ALPHA_AMD:35987,ATC_RGBA_INTERPOLATED_ALPHA_AMD:34798,ATC_RGB_AMD:35986,ATTACHED_SHADERS:35717,BACK:1029,BGRA8_EXT:37793,BGRA_EXT:32993,BGRA_IMG:32993,BINNING_CONTROL_HINT_QCOM:36784,BLEND:3042,BLEND_COLOR:32773,BLEND_DST_ALPHA:32970,BLEND_DST_RGB:32968,BLEND_EQUATION:32777,BLEND_EQUATION_ALPHA:34877,BLEND_EQUATION_RGB:32777,BLEND_SRC_ALPHA:32971,BLEND_SRC_RGB:32969,BLUE_BITS:3412,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,BUFFER:33504,BUFFER_ACCESS_OES:35003,BUFFER_MAPPED_OES:35004,BUFFER_MAP_POINTER_OES:35005,BUFFER_OBJECT_EXT:37201,BUFFER_SIZE:34660,BUFFER_USAGE:34661,BYTE:5120,CCW:2305,CLAMP_TO_BORDER_NV:33069,CLAMP_TO_EDGE:33071,COLOR_ATTACHMENT0:36064,COLOR_ATTACHMENT0_NV:36064,COLOR_ATTACHMENT10_NV:36074,COLOR_ATTACHMENT11_NV:36075,COLOR_ATTACHMENT12_NV:36076,COLOR_ATTACHMENT13_NV:36077,COLOR_ATTACHMENT14_NV:36078,COLOR_ATTACHMENT15_NV:36079,COLOR_ATTACHMENT1_NV:36065,COLOR_ATTACHMENT2_NV:36066,COLOR_ATTACHMENT3_NV:36067,COLOR_ATTACHMENT4_NV:36068,COLOR_ATTACHMENT5_NV:36069,COLOR_ATTACHMENT6_NV:36070,COLOR_ATTACHMENT7_NV:36071,COLOR_ATTACHMENT8_NV:36072,COLOR_ATTACHMENT9_NV:36073,COLOR_ATTACHMENT_EXT:37104,COLOR_BUFFER_BIT:16384,COLOR_BUFFER_BIT0_QCOM:1,COLOR_BUFFER_BIT1_QCOM:2,COLOR_BUFFER_BIT2_QCOM:4,COLOR_BUFFER_BIT3_QCOM:8,COLOR_BUFFER_BIT4_QCOM:16,COLOR_BUFFER_BIT5_QCOM:32,COLOR_BUFFER_BIT6_QCOM:64,COLOR_BUFFER_BIT7_QCOM:128,COLOR_CLEAR_VALUE:3106,COLOR_EXT:6144,COLOR_WRITEMASK:3107,COMPARE_REF_TO_TEXTURE_EXT:34894,COMPILE_STATUS:35713,COMPRESSED_RGBA_ASTC_10x10_KHR:37819,COMPRESSED_RGBA_ASTC_10x5_KHR:37816,COMPRESSED_RGBA_ASTC_10x6_KHR:37817,COMPRESSED_RGBA_ASTC_10x8_KHR:37818,COMPRESSED_RGBA_ASTC_12x10_KHR:37820,COMPRESSED_RGBA_ASTC_12x12_KHR:37821,COMPRESSED_RGBA_ASTC_4x4_KHR:37808,COMPRESSED_RGBA_ASTC_5x4_KHR:37809,COMPRESSED_RGBA_ASTC_5x5_KHR:37810,COMPRESSED_RGBA_ASTC_6x5_KHR:37811,COMPRESSED_RGBA_ASTC_6x6_KHR:37812,COMPRESSED_RGBA_ASTC_8x5_KHR:37813,COMPRESSED_RGBA_ASTC_8x6_KHR:37814,COMPRESSED_RGBA_ASTC_8x8_KHR:37815,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGBA_PVRTC_2BPPV2_IMG:37175,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGBA_PVRTC_4BPPV2_IMG:37176,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_ANGLE:33778,COMPRESSED_RGBA_S3TC_DXT5_ANGLE:33779,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:37853,COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:37847,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_NV:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_NV:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_NV:35919,COMPRESSED_SRGB_S3TC_DXT1_NV:35916,COMPRESSED_TEXTURE_FORMATS:34467,CONDITION_SATISFIED_APPLE:37148,CONSTANT_ALPHA:32771,CONSTANT_COLOR:32769,CONTEXT_FLAG_DEBUG_BIT:2,CONTEXT_ROBUST_ACCESS_EXT:37107,COUNTER_RANGE_AMD:35777,COUNTER_TYPE_AMD:35776,COVERAGE_ALL_FRAGMENTS_NV:36565,COVERAGE_ATTACHMENT_NV:36562,COVERAGE_AUTOMATIC_NV:36567,COVERAGE_BUFFERS_NV:36563,COVERAGE_BUFFER_BIT_NV:32768,COVERAGE_COMPONENT4_NV:36561,COVERAGE_COMPONENT_NV:36560,COVERAGE_EDGE_FRAGMENTS_NV:36566,COVERAGE_SAMPLES_NV:36564,CPU_OPTIMIZED_QCOM:36785,CULL_FACE:2884,CULL_FACE_MODE:2885,CURRENT_PROGRAM:35725,CURRENT_QUERY_EXT:34917,CURRENT_VERTEX_ATTRIB:34342,CW:2304,DEBUG_CALLBACK_FUNCTION:33348,DEBUG_CALLBACK_USER_PARAM:33349,DEBUG_GROUP_STACK_DEPTH:33389,DEBUG_LOGGED_MESSAGES:37189,DEBUG_NEXT_LOGGED_MESSAGE_LENGTH:33347,DEBUG_OUTPUT:37600,DEBUG_OUTPUT_SYNCHRONOUS:33346,DEBUG_SEVERITY_HIGH:37190,DEBUG_SEVERITY_LOW:37192,DEBUG_SEVERITY_MEDIUM:37191,DEBUG_SEVERITY_NOTIFICATION:33387,DEBUG_SOURCE_API:33350,DEBUG_SOURCE_APPLICATION:33354,DEBUG_SOURCE_OTHER:33355,DEBUG_SOURCE_SHADER_COMPILER:33352,DEBUG_SOURCE_THIRD_PARTY:33353,DEBUG_SOURCE_WINDOW_SYSTEM:33351,DEBUG_TYPE_DEPRECATED_BEHAVIOR:33357,DEBUG_TYPE_ERROR:33356,DEBUG_TYPE_MARKER:33384,DEBUG_TYPE_OTHER:33361,DEBUG_TYPE_PERFORMANCE:33360,DEBUG_TYPE_POP_GROUP:33386,DEBUG_TYPE_PORTABILITY:33359,DEBUG_TYPE_PUSH_GROUP:33385,DEBUG_TYPE_UNDEFINED_BEHAVIOR:33358,DECR:7683,DECR_WRAP:34056,DELETE_STATUS:35712,DEPTH24_STENCIL8_OES:35056,DEPTH_ATTACHMENT:36096,DEPTH_STENCIL_ATTACHMENT:33306,DEPTH_BITS:3414,DEPTH_BUFFER_BIT:256,DEPTH_BUFFER_BIT0_QCOM:256,DEPTH_BUFFER_BIT1_QCOM:512,DEPTH_BUFFER_BIT2_QCOM:1024,DEPTH_BUFFER_BIT3_QCOM:2048,DEPTH_BUFFER_BIT4_QCOM:4096,DEPTH_BUFFER_BIT5_QCOM:8192,DEPTH_BUFFER_BIT6_QCOM:16384,DEPTH_BUFFER_BIT7_QCOM:32768,DEPTH_CLEAR_VALUE:2931,DEPTH_COMPONENT:6402,DEPTH_COMPONENT16:33189,DEPTH_COMPONENT16_NONLINEAR_NV:36396,DEPTH_COMPONENT16_OES:33189,DEPTH_COMPONENT24_OES:33190,DEPTH_COMPONENT32_OES:33191,DEPTH_EXT:6145,DEPTH_FUNC:2932,DEPTH_RANGE:2928,DEPTH_STENCIL:34041,DEPTH_STENCIL_OES:34041,DEPTH_TEST:2929,DEPTH_WRITEMASK:2930,DITHER:3024,DMP_shader_binary:1,DONT_CARE:4352,DRAW_BUFFER0_NV:34853,DRAW_BUFFER10_NV:34863,DRAW_BUFFER11_NV:34864,DRAW_BUFFER12_NV:34865,DRAW_BUFFER13_NV:34866,DRAW_BUFFER14_NV:34867,DRAW_BUFFER15_NV:34868,DRAW_BUFFER1_NV:34854,DRAW_BUFFER2_NV:34855,DRAW_BUFFER3_NV:34856,DRAW_BUFFER4_NV:34857,DRAW_BUFFER5_NV:34858,DRAW_BUFFER6_NV:34859,DRAW_BUFFER7_NV:34860,DRAW_BUFFER8_NV:34861,DRAW_BUFFER9_NV:34862,DRAW_BUFFER_EXT:3073,DRAW_FRAMEBUFFER_ANGLE:36009,DRAW_FRAMEBUFFER_APPLE:36009,DRAW_FRAMEBUFFER_BINDING_ANGLE:36006,DRAW_FRAMEBUFFER_BINDING_APPLE:36006,DRAW_FRAMEBUFFER_BINDING_NV:36006,DRAW_FRAMEBUFFER_NV:36009,DST_ALPHA:772,DST_COLOR:774,DYNAMIC_DRAW:35048,ELEMENT_ARRAY_BUFFER:34963,ELEMENT_ARRAY_BUFFER_BINDING:34965,EQUAL:514,ES_VERSION_2_0:1,ETC1_RGB8_OES:36196,ETC1_SRGB8_NV:35054,EXTENSIONS:7939,EXT_blend_minmax:1,EXT_color_buffer_half_float:1,EXT_debug_label:1,EXT_debug_marker:1,EXT_discard_framebuffer:1,EXT_map_buffer_range:1,EXT_multi_draw_arrays:1,EXT_multisampled_render_to_texture:1,EXT_multiview_draw_buffers:1,EXT_occlusion_query_boolean:1,EXT_read_format_bgra:1,EXT_robustness:1,EXT_sRGB:1,EXT_separate_shader_objects:1,EXT_shader_framebuffer_fetch:1,EXT_shader_texture_lod:1,EXT_shadow_samplers:1,EXT_texture_compression_dxt1:1,EXT_texture_filter_anisotropic:1,EXT_texture_format_BGRA8888:1,EXT_texture_rg:1,EXT_texture_storage:1,EXT_texture_type_2_10_10_10_REV:1,EXT_unpack_subimage:1,FALSE:0,FASTEST:4353,FENCE_CONDITION_NV:34036,FENCE_STATUS_NV:34035,FIXED:5132,FJ_shader_binary_GCCSO:1,FLOAT:5126,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,FRAGMENT_SHADER:35632,FRAGMENT_SHADER_BIT_EXT:2,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT:35410,FRAMEBUFFER:36160,FRAMEBUFFER_ATTACHMENT_ANGLE:37795,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES:36052,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT:36204,FRAMEBUFFER_BINDING:36006,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE:36182,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE:36182,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT:36182,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG:37172,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_NV:36182,FRAMEBUFFER_UNDEFINED_OES:33305,FRAMEBUFFER_UNSUPPORTED:36061,FRONT:1028,FRONT_AND_BACK:1032,FRONT_FACE:2886,FUNC_ADD:32774,FUNC_REVERSE_SUBTRACT:32779,FUNC_SUBTRACT:32778,GENERATE_MIPMAP_HINT:33170,GEQUAL:518,GPU_OPTIMIZED_QCOM:36786,GREATER:516,GREEN_BITS:3411,GUILTY_CONTEXT_RESET_EXT:33363,HALF_FLOAT_OES:36193,HIGH_FLOAT:36338,HIGH_INT:36341,IMG_multisampled_render_to_texture:1,IMG_program_binary:1,IMG_read_format:1,IMG_shader_binary:1,IMG_texture_compression_pvrtc:1,IMG_texture_compression_pvrtc2:1,IMPLEMENTATION_COLOR_READ_FORMAT:35739,IMPLEMENTATION_COLOR_READ_TYPE:35738,INCR:7682,INCR_WRAP:34055,INFO_LOG_LENGTH:35716,INNOCENT_CONTEXT_RESET_EXT:33364,INT:5124,INT_10_10_10_2_OES:36343,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,INVALID_ENUM:1280,INVALID_FRAMEBUFFER_OPERATION:1286,INVALID_OPERATION:1282,INVALID_VALUE:1281,INVERT:5386,KEEP:7680,KHR_debug:1,KHR_texture_compression_astc_ldr:1,LEFT:1030,LEQUAL:515,LESS:513,LINEAR:9729,LINEAR_MIPMAP_LINEAR:9987,LINEAR_MIPMAP_NEAREST:9985,LINES:1,LINE_LOOP:2,LINE_STRIP:3,LINE_WIDTH:2849,LINK_STATUS:35714,LOSE_CONTEXT_ON_RESET_EXT:33362,LOW_FLOAT:36336,LOW_INT:36339,LUMINANCE:6409,LUMINANCE16F_EXT:34846,LUMINANCE32F_EXT:34840,LUMINANCE4_ALPHA4_OES:32835,LUMINANCE8_ALPHA8_EXT:32837,LUMINANCE8_ALPHA8_OES:32837,LUMINANCE8_EXT:32832,LUMINANCE8_OES:32832,LUMINANCE_ALPHA:6410,LUMINANCE_ALPHA16F_EXT:34847,LUMINANCE_ALPHA32F_EXT:34841,MALI_PROGRAM_BINARY_ARM:36705,MALI_SHADER_BINARY_ARM:36704,MAP_FLUSH_EXPLICIT_BIT_EXT:16,MAP_INVALIDATE_BUFFER_BIT_EXT:8,MAP_INVALIDATE_RANGE_BIT_EXT:4,MAP_READ_BIT_EXT:1,MAP_UNSYNCHRONIZED_BIT_EXT:32,MAP_WRITE_BIT_EXT:2,MAX_3D_TEXTURE_SIZE_OES:32883,MAX_COLOR_ATTACHMENTS_NV:36063,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_CUBE_MAP_TEXTURE_SIZE:34076,MAX_DEBUG_GROUP_STACK_DEPTH:33388,MAX_DEBUG_LOGGED_MESSAGES:37188,MAX_DEBUG_MESSAGE_LENGTH:37187,MAX_DRAW_BUFFERS_NV:34852,MAX_EXT:32776,MAX_FRAGMENT_UNIFORM_VECTORS:36349,MAX_LABEL_LENGTH:33512,MAX_MULTIVIEW_BUFFERS_EXT:37106,MAX_RENDERBUFFER_SIZE:34024,MAX_SAMPLES_ANGLE:36183,MAX_SAMPLES_APPLE:36183,MAX_SAMPLES_EXT:36183,MAX_SAMPLES_IMG:37173,MAX_SAMPLES_NV:36183,MAX_SERVER_WAIT_TIMEOUT_APPLE:37137,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,MAX_TEXTURE_SIZE:3379,MAX_VARYING_VECTORS:36348,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VIEWPORT_DIMS:3386,MEDIUM_FLOAT:36337,MEDIUM_INT:36340,MIN_EXT:32775,MIRRORED_REPEAT:33648,MULTISAMPLE_BUFFER_BIT0_QCOM:16777216,MULTISAMPLE_BUFFER_BIT1_QCOM:33554432,MULTISAMPLE_BUFFER_BIT2_QCOM:67108864,MULTISAMPLE_BUFFER_BIT3_QCOM:134217728,MULTISAMPLE_BUFFER_BIT4_QCOM:268435456,MULTISAMPLE_BUFFER_BIT5_QCOM:536870912,MULTISAMPLE_BUFFER_BIT6_QCOM:1073741824,MULTISAMPLE_BUFFER_BIT7_QCOM:2147483648,MULTIVIEW_EXT:37105,NEAREST:9728,NEAREST_MIPMAP_LINEAR:9986,NEAREST_MIPMAP_NEAREST:9984,NEVER:512,NICEST:4354,NONE:0,NOTEQUAL:517,NO_ERROR:0,NO_RESET_NOTIFICATION_EXT:33377,NUM_COMPRESSED_TEXTURE_FORMATS:34466,NUM_PROGRAM_BINARY_FORMATS_OES:34814,NUM_SHADER_BINARY_FORMATS:36345,NV_coverage_sample:1,NV_depth_nonlinear:1,NV_draw_buffers:1,NV_draw_instanced:1,NV_fbo_color_attachments:1,NV_fence:1,NV_framebuffer_blit:1,NV_framebuffer_multisample:1,NV_generate_mipmap_sRGB:1,NV_instanced_arrays:1,NV_read_buffer:1,NV_read_buffer_front:1,NV_read_depth:1,NV_read_depth_stencil:1,NV_read_stencil:1,NV_sRGB_formats:1,NV_shadow_samplers_array:1,NV_shadow_samplers_cube:1,NV_texture_border_clamp:1,NV_texture_compression_s3tc_update:1,NV_texture_npot_2D_mipmap:1,OBJECT_TYPE_APPLE:37138,OES_EGL_image:1,OES_EGL_image_external:1,OES_compressed_ETC1_RGB8_texture:1,OES_compressed_paletted_texture:1,OES_depth24:1,OES_depth32:1,OES_depth_texture:1,OES_element_index_uint:1,OES_fbo_render_mipmap:1,OES_fragment_precision_high:1,OES_get_program_binary:1,OES_mapbuffer:1,OES_packed_depth_stencil:1,OES_required_internalformat:1,OES_rgb8_rgba8:1,OES_standard_derivatives:1,OES_stencil1:1,OES_stencil4:1,OES_surfaceless_context:1,OES_texture_3D:1,OES_texture_float:1,OES_texture_float_linear:1,OES_texture_half_float:1,OES_texture_half_float_linear:1,OES_texture_npot:1,OES_vertex_array_object:1,OES_vertex_half_float:1,OES_vertex_type_10_10_10_2:1,ONE:1,ONE_MINUS_CONSTANT_ALPHA:32772,ONE_MINUS_CONSTANT_COLOR:32770,ONE_MINUS_DST_ALPHA:773,ONE_MINUS_DST_COLOR:775,ONE_MINUS_SRC_ALPHA:771,ONE_MINUS_SRC_COLOR:769,OUT_OF_MEMORY:1285,PACK_ALIGNMENT:3333,PACK_REVERSE_ROW_ORDER_ANGLE:37796,PALETTE4_R5_G6_B5_OES:35730,PALETTE4_RGB5_A1_OES:35732,PALETTE4_RGB8_OES:35728,PALETTE4_RGBA4_OES:35731,PALETTE4_RGBA8_OES:35729,PALETTE8_R5_G6_B5_OES:35735,PALETTE8_RGB5_A1_OES:35737,PALETTE8_RGB8_OES:35733,PALETTE8_RGBA4_OES:35736,PALETTE8_RGBA8_OES:35734,PERCENTAGE_AMD:35779,PERFMON_GLOBAL_MODE_QCOM:36768,PERFMON_RESULT_AMD:35782,PERFMON_RESULT_AVAILABLE_AMD:35780,PERFMON_RESULT_SIZE_AMD:35781,POINTS:0,POLYGON_OFFSET_FACTOR:32824,POLYGON_OFFSET_FILL:32823,POLYGON_OFFSET_UNITS:10752,PROGRAM:33506,PROGRAM_BINARY_ANGLE:37798,PROGRAM_BINARY_FORMATS_OES:34815,PROGRAM_BINARY_LENGTH_OES:34625,PROGRAM_OBJECT_EXT:35648,PROGRAM_PIPELINE_BINDING_EXT:33370,PROGRAM_PIPELINE_OBJECT_EXT:35407,PROGRAM_SEPARABLE_EXT:33368,QCOM_alpha_test:1,QCOM_binning_control:1,QCOM_driver_control:1,QCOM_extended_get:1,QCOM_extended_get2:1,QCOM_perfmon_global_mode:1,QCOM_tiled_rendering:1,QCOM_writeonly_rendering:1,QUERY:33507,QUERY_OBJECT_EXT:37203,QUERY_RESULT_AVAILABLE_EXT:34919,QUERY_RESULT_EXT:34918,R16F_EXT:33325,R32F_EXT:33326,R8_EXT:33321,READ_BUFFER_EXT:3074,READ_BUFFER_NV:3074,READ_FRAMEBUFFER_ANGLE:36008,READ_FRAMEBUFFER_APPLE:36008,READ_FRAMEBUFFER_BINDING_ANGLE:36010,READ_FRAMEBUFFER_BINDING_APPLE:36010,READ_FRAMEBUFFER_BINDING_NV:36010,READ_FRAMEBUFFER_NV:36008,RED_BITS:3410,RED_EXT:6403,RENDERBUFFER:36161,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_BINDING:36007,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_SAMPLES_ANGLE:36011,RENDERBUFFER_SAMPLES_APPLE:36011,RENDERBUFFER_SAMPLES_EXT:36011,RENDERBUFFER_SAMPLES_IMG:37171,RENDERBUFFER_SAMPLES_NV:36011,RENDERBUFFER_STENCIL_SIZE:36181,RENDERBUFFER_WIDTH:36162,RENDERER:7937,RENDER_DIRECT_TO_FRAMEBUFFER_QCOM:36787,REPEAT:10497,REPLACE:7681,REQUIRED_TEXTURE_IMAGE_UNITS_OES:36200,RESET_NOTIFICATION_STRATEGY_EXT:33366,RG16F_EXT:33327,RG32F_EXT:33328,RG8_EXT:33323,RGB:6407,RGB10_A2_EXT:32857,RGB10_EXT:32850,RGB16F_EXT:34843,RGB32F_EXT:34837,RGB565:36194,RGB565_OES:36194,RGB5_A1:32855,RGB5_A1_OES:32855,RGB8_OES:32849,RGBA:6408,RGBA16F_EXT:34842,RGBA32F_EXT:34836,RGBA4:32854,RGBA4_OES:32854,RGBA8_OES:32856,RGB_422_APPLE:35359,RG_EXT:33319,RIGHT:1031,SAMPLER:33510,SAMPLER_2D:35678,SAMPLER_2D_ARRAY_SHADOW_NV:36292,SAMPLER_2D_SHADOW_EXT:35682,SAMPLER_3D_OES:35679,SAMPLER_CUBE:35680,SAMPLER_CUBE_SHADOW_NV:36293,SAMPLER_EXTERNAL_OES:36198,SAMPLES:32937,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_BUFFERS:32936,SAMPLE_COVERAGE:32928,SAMPLE_COVERAGE_INVERT:32939,SAMPLE_COVERAGE_VALUE:32938,SCISSOR_BOX:3088,SCISSOR_TEST:3089,SGX_BINARY_IMG:35850,SGX_PROGRAM_BINARY_IMG:37168,SHADER:33505,SHADER_BINARY_DMP:37456,SHADER_BINARY_FORMATS:36344,SHADER_BINARY_VIV:36804,SHADER_COMPILER:36346,SHADER_OBJECT_EXT:35656,SHADER_SOURCE_LENGTH:35720,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,SHORT:5122,SIGNALED_APPLE:37145,SLUMINANCE8_ALPHA8_NV:35909,SLUMINANCE8_NV:35911,SLUMINANCE_ALPHA_NV:35908,SLUMINANCE_NV:35910,SRC_ALPHA:770,SRC_ALPHA_SATURATE:776,SRC_COLOR:768,SRGB8_ALPHA8_EXT:35907,SRGB8_NV:35905,SRGB_ALPHA_EXT:35906,SRGB_EXT:35904,STACK_OVERFLOW:1283,STACK_UNDERFLOW:1284,STATE_RESTORE:35804,STATIC_DRAW:35044,STENCIL_ATTACHMENT:36128,STENCIL_BACK_FAIL:34817,STENCIL_BACK_FUNC:34816,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,STENCIL_BITS:3415,STENCIL_BUFFER_BIT:1024,STENCIL_BUFFER_BIT0_QCOM:65536,STENCIL_BUFFER_BIT1_QCOM:131072,STENCIL_BUFFER_BIT2_QCOM:262144,STENCIL_BUFFER_BIT3_QCOM:524288,STENCIL_BUFFER_BIT4_QCOM:1048576,STENCIL_BUFFER_BIT5_QCOM:2097152,STENCIL_BUFFER_BIT6_QCOM:4194304,STENCIL_BUFFER_BIT7_QCOM:8388608,STENCIL_CLEAR_VALUE:2961,STENCIL_EXT:6146,STENCIL_FAIL:2964,STENCIL_FUNC:2962,STENCIL_INDEX1_OES:36166,STENCIL_INDEX4_OES:36167,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_TEST:2960,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STREAM_DRAW:35040,SUBPIXEL_BITS:3408,SYNC_CONDITION_APPLE:37139,SYNC_FENCE_APPLE:37142,SYNC_FLAGS_APPLE:37141,SYNC_FLUSH_COMMANDS_BIT_APPLE:1,SYNC_GPU_COMMANDS_COMPLETE_APPLE:37143,SYNC_OBJECT_APPLE:35411,SYNC_STATUS_APPLE:37140,TEXTURE:5890,TEXTURE0:33984,TEXTURE1:33985,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE2:33986,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE3:33987,TEXTURE30:34014,TEXTURE31:34015,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE_2D:3553,TEXTURE_3D_OES:32879,TEXTURE_BINDING_2D:32873,TEXTURE_BINDING_3D_OES:32874,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_BINDING_EXTERNAL_OES:36199,TEXTURE_BORDER_COLOR_NV:4100,TEXTURE_COMPARE_FUNC_EXT:34893,TEXTURE_COMPARE_MODE_EXT:34892,TEXTURE_CUBE_MAP:34067,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_DEPTH_QCOM:35796,TEXTURE_EXTERNAL_OES:36197,TEXTURE_FORMAT_QCOM:35798,TEXTURE_HEIGHT_QCOM:35795,TEXTURE_IMAGE_VALID_QCOM:35800,TEXTURE_IMMUTABLE_FORMAT_EXT:37167,TEXTURE_INTERNAL_FORMAT_QCOM:35797,TEXTURE_MAG_FILTER:10240,TEXTURE_MAX_ANISOTROPY_EXT:34046,TEXTURE_MAX_LEVEL_APPLE:33085,TEXTURE_MIN_FILTER:10241,TEXTURE_NUM_LEVELS_QCOM:35801,TEXTURE_OBJECT_VALID_QCOM:35803,TEXTURE_SAMPLES_IMG:37174,TEXTURE_TARGET_QCOM:35802,TEXTURE_TYPE_QCOM:35799,TEXTURE_USAGE_ANGLE:37794,TEXTURE_WIDTH_QCOM:35794,TEXTURE_WRAP_R_OES:32882,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TIMEOUT_EXPIRED_APPLE:37147,TIMEOUT_IGNORED_APPLE:0x10000000000000000,TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE:37792,TRIANGLES:4,TRIANGLE_FAN:6,TRIANGLE_STRIP:5,TRUE:1,UNKNOWN_CONTEXT_RESET_EXT:33365,UNPACK_ALIGNMENT:3317,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_PIXELS:3316,UNPACK_SKIP_ROWS:3315,UNSIGNALED_APPLE:37144,UNSIGNED_BYTE:5121,UNSIGNED_INT:5125,UNSIGNED_INT64_AMD:35778,UNSIGNED_INT_10_10_10_2_OES:36342,UNSIGNED_INT_24_8_OES:34042,UNSIGNED_INT_2_10_10_10_REV_EXT:33640,UNSIGNED_NORMALIZED_EXT:35863,UNSIGNED_SHORT:5123,UNSIGNED_SHORT_1_5_5_5_REV_EXT:33638,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_4_4_4_4_REV_EXT:33637,UNSIGNED_SHORT_4_4_4_4_REV_IMG:33637,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,UNSIGNED_SHORT_8_8_APPLE:34234,UNSIGNED_SHORT_8_8_REV_APPLE:34235,VALIDATE_STATUS:35715,VENDOR:7936,VERSION:7938,VERTEX_ARRAY_BINDING_OES:34229,VERTEX_ARRAY_OBJECT_EXT:37204,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,VERTEX_ATTRIB_ARRAY_DIVISOR_NV:35070,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_SHADER:35633,VERTEX_SHADER_BIT_EXT:1,VIEWPORT:2978,VIV_shader_binary:1,WAIT_FAILED_APPLE:37149,WRITEONLY_RENDERING_QCOM:34851,WRITE_ONLY_OES:35001,Z400_BINARY_AMD:34624,ZERO:0,RASTERIZER_DISCARD:35977,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444},WebGL2RenderingContext:{},addEventListener:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Kd.addEventListener(e,t,r)},removeEventListener:function(e,t,r){Kd.removeEventListener(e,t)},dispatchEvent:function(e){Kd.dispatchEvent(e)},innerWidth:Md.availWidth,innerHeight:Md.availHeight,setTimeout:setTimeout,clearTimeout:clearTimeout,setInterval:setInterval,clearInterval:clearInterval},Yv=Hv?Wv:wp,Xv=Hv?mv:wp.XMLHttpRequest,Zv=Hv?Yd:wp.location,qv=function(e){f(r,e);var t=x(r);function r(e,n,i,a){var o;return u(this,r),h(_(o=t.call(this,"AJAXError: ".concat(n," (").concat(e,"): ").concat(i))),"status",void 0),h(_(o),"statusText",void 0),h(_(o),"url",void 0),h(_(o),"body",void 0),o.status=e,o.statusText=n,o.url=i,o.body=a,o}return l(r)}(m(Error));function Kv(e,t){var r=new Xv,n=Array.isArray(e.url)?e.url[0]:e.url;for(var i in r.open(e.method||"GET",n,!0),"arrayBuffer"===e.type&&(r.responseType="arraybuffer"),e.headers)e.headers.hasOwnProperty(i)&&r.setRequestHeader(i,e.headers[i]);return"json"===e.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===e.credentials,r.onerror=function(){t(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var i=r.response;if("json"===e.type)try{i=JSON.parse(r.response)}catch(e){return t(e)}t(null,i,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"),r)}else{var a=new Blob([r.response],{type:r.getResponseHeader("Content-Type")});t(new qv(r.status,r.statusText,n.toString(),a))}},r.send(e.body),r}function Qv(e){return new Promise((function(t,r){Kv(e,(function(e,n,i,a,o){e?r({err:e,data:null,xhr:o}):t({err:null,data:n,cacheControl:i,expires:a,xhr:o})}))}))}function $v(e,t){return Kv(e,t)}var Jv=function(e,t){return $v(n(n({},e),{},{type:"json"}),t)},eg=function(e,t){return $v(n(n({},e),{},{type:"arrayBuffer"}),t)};var tg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function rg(e,t){var r=new Yv.Image,n=Yv.URL||Yv.webkitURL;r.crossOrigin="anonymous",r.onload=function(){t(null,r),n.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame((function(){r.src=tg}))},r.onerror=function(){return t(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var i=new Blob([new Uint8Array(e)],{type:"image/png"});r.src=e.byteLength?n.createObjectURL(i):tg}function ng(e,t){var r=new Blob([new Uint8Array(e)],{type:"image/png"});createImageBitmap(r).then((function(e){t(null,e)})).catch((function(e){t(new Error("Could not load image because of ".concat(e.message,". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")))}))}var ig=function(e,t,r){var n=function(e,n){if(e)t(e);else if(n){var i="function"==typeof createImageBitmap,a=r?r(n):n;i?ng(a,t):rg(a,t)}};return"json"===e.type?Jv(e,n):eg(e,n)},ag=function(e,t){"function"==typeof createImageBitmap?ng(e,t):rg(e,t)},og=function(e){return e.CENTER="center",e.TOP="top",e["TOP-LEFT"]="top-left",e["TOP-RIGHT"]="top-right",e.BOTTOM="bottom",e["BOTTOM-LEFT"]="bottom-left",e["BOTTOM-RIGHT"]="bottom-right",e.LEFT="left",e.RIGHT="right",e}({}),sg={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ug(e,t,r){var n=e.classList;for(var i in sg)sg.hasOwnProperty(i)&&n.remove("l7-".concat(r,"-anchor-").concat(i));n.add("l7-".concat(r,"-anchor-").concat(t))}function cg(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function lg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function hg(){}hn({target:"Array",proto:!0},{fill:Dl}),Na("fill");var fg="\\s*([+-]?\\d+)\\s*",pg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",dg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vg=/^#([0-9a-f]{3,8})$/,gg=new RegExp("^rgb\\("+[fg,fg,fg]+"\\)$"),mg=new RegExp("^rgb\\("+[dg,dg,dg]+"\\)$"),yg=new RegExp("^rgba\\("+[fg,fg,fg,pg]+"\\)$"),_g=new RegExp("^rgba\\("+[dg,dg,dg,pg]+"\\)$"),bg=new RegExp("^hsl\\("+[pg,dg,dg]+"\\)$"),xg=new RegExp("^hsla\\("+[pg,dg,dg,pg]+"\\)$"),Sg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Eg(){return this.rgb().formatHex()}function Ag(){return this.rgb().formatRgb()}function Tg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=vg.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?wg(t):3===r?new Pg(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Cg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Cg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=gg.exec(e))?new Pg(t[1],t[2],t[3],1):(t=mg.exec(e))?new Pg(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=yg.exec(e))?Cg(t[1],t[2],t[3],t[4]):(t=_g.exec(e))?Cg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=bg.exec(e))?Lg(t[1],t[2]/100,t[3]/100,1):(t=xg.exec(e))?Lg(t[1],t[2]/100,t[3]/100,t[4]):Sg.hasOwnProperty(e)?wg(Sg[e]):"transparent"===e?new Pg(NaN,NaN,NaN,0):null}function wg(e){return new Pg(e>>16&255,e>>8&255,255&e,1)}function Cg(e,t,r,n){return n<=0&&(e=t=r=NaN),new Pg(e,t,r,n)}function kg(e){return e instanceof hg||(e=Tg(e)),e?new Pg((e=e.rgb()).r,e.g,e.b,e.opacity):new Pg}function Mg(e,t,r,n){return 1===arguments.length?kg(e):new Pg(e,t,r,null==n?1:n)}function Pg(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Ig(){return"#"+Rg(this.r)+Rg(this.g)+Rg(this.b)}function Og(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Rg(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Lg(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Dg(e,t,r,n)}function Ng(e){if(e instanceof Dg)return new Dg(e.h,e.s,e.l,e.opacity);if(e instanceof hg||(e=Tg(e)),!e)return new Dg;if(e instanceof Dg)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,u=(a+i)/2;return s?(o=t===a?(r-n)/s+6*(r<n):r===a?(n-t)/s+2:(t-r)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Dg(o,s,u,e.opacity)}function Dg(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Fg(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}function zg(e){var t=Tg(e),r=[0,0,0,0];return null!=t&&(r[0]=t.r/255,r[1]=t.g/255,r[2]=t.b/255,r[3]=t.opacity),r}function Bg(e){return(e&&e[0])+256*(e&&e[1])+65536*(e&&e[2])-1}function Ug(e){return[e+1&255,e+1>>8&255,e+1>>8>>8&255]}function jg(e){var t=Yv.document.createElement("canvas"),r=t.getContext("2d");t.width=256,t.height=1;for(var n=null,i=r.createLinearGradient(0,0,256,1),a=e.positions[0],o=e.positions[e.positions.length-1],s=0;s<e.colors.length;++s){var u=(e.positions[s]-a)/(o-a);i.addColorStop(u,e.colors[s])}if(r.fillStyle=i,r.fillRect(0,0,256,1),Hv)return n=new Uint8ClampedArray(r.getImageData(0,0,256,1).data),t=null,r=null,{data:n,width:256,height:1};n=r.getImageData(0,0,256,1).data;for(var c=r.createImageData(256,1),l=0;l<c.data.length;l+=4)c.data[l+0]=n[l+0],c.data[l+1]=n[l+1],c.data[l+2]=n[l+2],c.data[l+3]=n[l+3];return t=null,r=null,c}function Vg(e,t){var r=Yv.document.createElement("canvas"),n=r.getContext("2d");r.width=256,r.height=1;for(var i=n.createLinearGradient(0,0,256,1),a=t[1]-t[0],o=0;o<e.colors.length;++o){var s=Math.max((e.positions[o]-t[0])/a,0);i.addColorStop(s,e.colors[o])}n.fillStyle=i,n.fillRect(0,0,256,1);var u=n.getImageData(0,0,256,1).data,c=Yg(n,u);return r=null,n=null,c}function Gg(e){var t=Yv.document.createElement("canvas"),r=t.getContext("2d");t.width=256,t.height=1;var n=r.createImageData(256,1);return n.data.fill(0),e.positions.forEach((function(t,r){var i=zg(e.colors[r]);n.data[4*t+0]=255*i[0],n.data[4*t+1]=255*i[1],n.data[4*t+2]=255*i[2],n.data[4*t+3]=255*i[3]})),t=null,r=null,n}function Hg(e){var t=Yv.document.createElement("canvas"),r=t.getContext("2d");r.globalAlpha=1,t.width=256,t.height=1;for(var n=256/e.colors.length,i=0;i<e.colors.length;i++)r.beginPath(),r.lineWidth=2,r.strokeStyle=e.colors[i],r.moveTo(i*n,0),r.lineTo((i+1)*n,0),r.stroke();var a=r.getImageData(0,0,256,1).data,o=Yg(r,a);return t=null,r=null,o}function Wg(e,t){var r=Yv.document.createElement("canvas"),n=r.getContext("2d");n.globalAlpha=1,r.width=256,r.height=1;var i=t[1]-t[0];e.positions.length-e.colors.length!=1&&console.warn("positions 的数字个数应当比 colors 的样式多一个,poisitions 的首尾值一般为数据的最大最新值");for(var a=0;a<e.colors.length;a++)n.beginPath(),n.lineWidth=2,n.strokeStyle=e.colors[a],n.moveTo((e.positions[a]-t[0])/i*255,0),n.lineTo((e.positions[a+1]-t[0])/i*255,0),n.stroke();var o=n.getImageData(0,0,256,1).data,s=Yg(n,o);return r=null,n=null,s}function Yg(e,t){for(var r=e.createImageData(256,1),n=0;n<r.data.length;n+=4)r.data[n+0]=t[n+0],r.data[n+1]=t[n+1],r.data[n+2]=t[n+2],r.data[n+3]=t[n+3];return r}function Xg(e){switch(e.type){case"cat":return[0,255];default:return[0,1]}}cg(hg,Tg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Eg,formatHex:Eg,formatHsl:function(){return Ng(this).formatHsl()},formatRgb:Ag,toString:Ag}),cg(Pg,Mg,lg(hg,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Pg(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Pg(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ig,formatHex:Ig,formatRgb:Og,toString:Og})),cg(Dg,(function(e,t,r,n){return 1===arguments.length?Ng(e):new Dg(e,t,r,null==n?1:n)}),lg(hg,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Dg(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new Dg(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Pg(Fg(e>=240?e-240:e+120,i,n),Fg(e,i,n),Fg(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));var Zg=1029,qg=1028;function Kg(e){switch(e){case"GAODE1.x":case"GAODE2.x":return Zg;case"MAPBOX":case"MAPLIBRE":case"SIMPLE":return qg;case"GLOBEL":return Zg;case"DEBAULT":default:return qg}}var Qg=function(e){return e};var $g=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)},Jg=Math.max;var em=function(e,t,r){return t=Jg(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=Jg(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),$g(e,this,s)}};var tm=function(e){return function(){return e}},rm="object"==typeof R&&R&&R.Object===Object&&R,nm="object"==typeof self&&self&&self.Object===Object&&self,im=rm||nm||Function("return this")(),am=im.Symbol,om=Object.prototype,sm=om.hasOwnProperty,um=om.toString,cm=am?am.toStringTag:void 0;var lm=function(e){var t=sm.call(e,cm),r=e[cm];try{e[cm]=void 0;var n=!0}catch(e){}var i=um.call(e);return n&&(t?e[cm]=r:delete e[cm]),i},hm=Object.prototype.toString;var fm=function(e){return hm.call(e)},pm=am?am.toStringTag:void 0;var dm=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":pm&&pm in Object(e)?lm(e):fm(e)};var vm=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var gm=function(e){if(!vm(e))return!1;var t=dm(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},mm=im["__core-js_shared__"],ym=function(){var e=/[^.]+$/.exec(mm&&mm.keys&&mm.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var _m=function(e){return!!ym&&ym in e},bm=Function.prototype.toString;var xm=function(e){if(null!=e){try{return bm.call(e)}catch(e){}try{return e+""}catch(e){}}return""},Sm=/^\[object .+?Constructor\]$/,Em=Function.prototype,Am=Object.prototype,Tm=Em.toString,wm=Am.hasOwnProperty,Cm=RegExp("^"+Tm.call(wm).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var km=function(e){return!(!vm(e)||_m(e))&&(gm(e)?Cm:Sm).test(xm(e))};var Mm=function(e,t){return null==e?void 0:e[t]};var Pm=function(e,t){var r=Mm(e,t);return km(r)?r:void 0},Im=function(){try{var e=Pm(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Om=Im?function(e,t){return Im(e,"toString",{configurable:!0,enumerable:!1,value:tm(t),writable:!0})}:Qg,Rm=Date.now;var Lm=function(e){var t=0,r=0;return function(){var n=Rm(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Om);var Nm=function(e,t){return Lm(em(e,t,Qg),e+"")};var Dm=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i};var Fm=function(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1};var zm=function(e){return e!=e};var Bm=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1};var Um=function(e,t,r){return t==t?Bm(e,t,r):Fm(e,zm,r)};var jm=function(e,t,r,n){for(var i=r-1,a=e.length;++i<a;)if(n(e[i],t))return i;return-1};var Vm=function(e){return function(t){return e(t)}};var Gm=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t},Hm=Array.prototype.splice;var Wm=function(e,t,r,n){var i=n?jm:Um,a=-1,o=t.length,s=e;for(e===t&&(t=Gm(t)),r&&(s=Dm(e,Vm(r)));++a<o;)for(var u=0,c=t[a],l=r?r(c):c;(u=i(s,l,u,n))>-1;)s!==e&&Hm.call(s,u,1),Hm.call(e,u,1);return e};var Ym,Xm=Nm((function(e,t){return e&&e.length&&t&&t.length?Wm(e,t):e})),Zm="\t\n\v\f\r                 \u2028\u2029\ufeff",qm=qe("".replace),Km=RegExp("^["+Zm+"]+"),Qm=RegExp("(^|[^"+Zm+"])["+Zm+"]+$"),$m=function(e){return function(t){var r=bn(it(t));return 1&e&&(r=qm(r,Km,"")),2&e&&(r=qm(r,Qm,"$1")),r}},Jm={start:$m(1),end:$m(2),trim:$m(3)},ey=gr.PROPER,ty=Jm.trim;hn({target:"String",proto:!0,forced:(Ym="trim",Fe((function(){return!!Zm[Ym]()||"​…᠎"!=="​…᠎"[Ym]()||ey&&Zm[Ym].name!==Ym})))},{trim:function(){return ty(this)}});var ry=Xt("match"),ny=function(e){var t;return ht(e)&&(void 0!==(t=e[ry])?!!t:"RegExp"===$e(e))},iy=xs.UNSUPPORTED_Y,ay=Math.min,oy=[].push,sy=qe(/./.exec),uy=qe(oy),cy=qe("".slice);Us("split",(function(e,t,r){var n;return n="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var n=bn(it(this)),i=void 0===r?4294967295:r>>>0;if(0===i)return[];if(void 0===e)return[n];if(!ny(e))return je(t,n,e,i);for(var a,o,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,h=new RegExp(e.source,c+"g");(a=je(Fs,h,n))&&!((o=h.lastIndex)>l&&(uy(u,cy(n,l,a.index)),a.length>1&&a.index<n.length&&Hi(oy,u,Rn(a,1)),s=a[0].length,l=o,u.length>=i));)h.lastIndex===a.index&&h.lastIndex++;return l===n.length?!s&&sy(h,"")||uy(u,""):uy(u,cy(n,l)),u.length>i?Rn(u,0,i):u}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:je(t,this,e,r)}:t,[function(t,r){var i=it(this),a=rt(t)?void 0:Pt(t,e);return a?je(a,t,i,r):je(n,bn(i),t,r)},function(e,i){var a=sr(this),o=bn(e),s=r(n,a,o,i,n!==t);if(s.done)return s.value;var u=Su(a,RegExp),c=a.unicode,l=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(iy?"g":"y"),h=new u(iy?"^(?:"+a.source+")":a,l),f=void 0===i?4294967295:i>>>0;if(0===f)return[];if(0===o.length)return null===Qs(h,o)?[o]:[];for(var p=0,d=0,v=[];d<o.length;){h.lastIndex=iy?0:d;var g,m=Qs(h,iy?cy(o,d):o);if(null===m||(g=ay(Vr(h.lastIndex+(iy?d:0)),o.length))===p)d=Vs(o,d,c);else{if(uy(v,cy(o,p,d)),v.length===f)return v;for(var y=1;y<=m.length-1;y++)if(uy(v,m[y]),v.length===f)return v;d=p=g}}return uy(v,cy(o,p)),v}]}),!!Fe((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]})),iy);var ly=hr.f,hy=function(e,t,r){r in e||ly(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})},fy=Qr.f,py=Ir.enforce,dy=Xt("match"),vy=De.RegExp,gy=vy.prototype,yy=De.SyntaxError,_y=qe(gy.exec),by=qe("".charAt),xy=qe("".replace),Sy=qe("".indexOf),Ey=qe("".slice),Ay=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ty=/a/g,wy=/a/g,Cy=new vy(Ty)!==Ty,ky=xs.MISSED_STICKY,My=xs.UNSUPPORTED_Y,Py=ze&&(!Cy||ky||Es||Ts||Fe((function(){return wy[dy]=!1,vy(Ty)!==Ty||vy(wy)===wy||"/a/i"!==String(vy(Ty,"i"))})));if(cn("RegExp",Py)){for(var Iy=function(e,t){var r,n,i,a,o,s,u=dt(gy,this),c=ny(e),l=void 0===t,h=[],f=e;if(!u&&c&&l&&e.constructor===Iy)return e;if((c||dt(gy,e))&&(e=e.source,l&&(t=cu(f))),e=void 0===e?"":bn(e),t=void 0===t?"":bn(t),f=e,Es&&"dotAll"in Ty&&(n=!!t&&Sy(t,"s")>-1)&&(t=xy(t,/s/g,"")),r=t,ky&&"sticky"in Ty&&(i=!!t&&Sy(t,"y")>-1)&&My&&(t=xy(t,/y/g,"")),Ts&&(e=(a=function(e){for(var t,r=e.length,n=0,i="",a=[],o={},s=!1,u=!1,c=0,l="";n<=r;n++){if("\\"===(t=by(e,n)))t+=by(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:_y(Ay,Ey(e,n+1))&&(n+=2,u=!0),i+=t,c++;continue;case">"===t&&u:if(""===l||Bt(o,l))throw new yy("Invalid capture group name");o[l]=!0,a[a.length]=[l,c],u=!1,l="";continue}u?l+=t:i+=t}return[i,a]}(e))[0],h=a[1]),o=No(vy(e,t),u?this:gy,Iy),(n||i||h.length)&&(s=py(o),n&&(s.dotAll=!0,s.raw=Iy(function(e){for(var t,r=e.length,n=0,i="",a=!1;n<=r;n++)"\\"!==(t=by(e,n))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+by(e,++n);return i}(e),r)),i&&(s.sticky=!0),h.length&&(s.groups=h)),e!==f)try{fr(o,"source",""===f?"(?:)":f)}catch(e){}return o},Oy=fy(vy),Ry=0;Oy.length>Ry;)hy(Iy,vy,Oy[Ry++]);gy.constructor=Iy,Iy.prototype=gy,Rr(De,"RegExp",Iy,{constructor:!0})}Bo("RegExp");var Ly=ui.find,Ny=!0;"find"in[]&&Array(1).find((function(){Ny=!1})),hn({target:"Array",proto:!0,forced:Ny},{find:function(e){return Ly(this,e,arguments.length>1?arguments[1]:void 0)}}),Na("find");var Dy=ui.filter,Fy=Aa("filter");hn({target:"Array",proto:!0,forced:!Fy},{filter:function(e){return Dy(this,e,arguments.length>1?arguments[1]:void 0)}});var zy=He.f,By=qe(zy),Uy=qe([].push),jy=ze&&Fe((function(){var e=Object.create(null);return e[2]=2,!By(e,2)})),Vy=function(e){return function(t){for(var r,n=at(t),i=xn(n),a=jy&&null===ja(n),o=i.length,s=0,u=[];o>s;)r=i[s++],ze&&!(a?r in n:By(n,r))||Uy(u,e?[r,n[r]]:n[r]);return u}},Gy={entries:Vy(!0),values:Vy(!1)},Hy=Gy.entries;function Wy(e){var t=e;return"string"==typeof e&&(t=Yv.document.getElementById(e)),t}function Yy(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Xy(e){return Yy(e).split(/\s+/)}function Zy(e,t,r){var n=Yv.document.createElement(e);return t&&(n.className=t||""),r&&r.appendChild(n),n}function qy(e){var t=e.parentNode;t&&t.removeChild(e)}function Ky(e,t){if(void 0!==e.classList)for(var r=Xy(t),n=0,i=r.length;n<i;n++)e.classList.add(r[n]);else if(!$y(e,t)){var a=e_(e);Jy(e,(a?a+" ":"")+t)}}function Qy(e,t){void 0!==e.classList?Xy(t).forEach((function(t){e.classList.remove(t)})):Jy(e,Yy((" "+e_(e)+" ").replace(" "+t+" "," ")))}function $y(e,t){if(void 0!==e.classList)return e.classList.contains(t);var r=e_(e);return r.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)}function Jy(e,t){e instanceof HTMLElement?e.className=t:e.className.baseVal=t}function e_(e){return e instanceof SVGElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}hn({target:"Object",stat:!0},{entries:function(e){return Hy(e)}});var t_=function(e){var t,r,n=null==Yv||null===(t=Yv.document)||void 0===t||null===(r=t.documentElement)||void 0===r?void 0:r.style;if(!n)return e[0];for(var i in e)if(e[i]&&e[i]in n)return e[i];return e[0]}(["transform","WebkitTransform"]);function r_(e,t){e.style[t_]=t}function n_(){if("function"==typeof Event)Yv.dispatchEvent(new Event("resize"));else{var e=Yv.document.createEvent("UIEvents");e.initUIEvent("resize",!0,!1,Yv,0),Yv.dispatchEvent(e)}}function i_(){var e,t=Yv.document.querySelector('meta[name="viewport"]');if(!t)return 1;var r=(null===(e=t.content)||void 0===e?void 0:e.split(",")).find((function(e){return"initial-scale"===A(e.split("="),1)[0]}));return r?1*r.split("=")[1]:1}var a_=i_()<1?1:Yv.devicePixelRatio;function o_(e,t){e.setAttribute("style","".concat(e.style.cssText).concat(t))}function s_(e){return e.split(";").map((function(e){return e.trim()})).filter((function(e){return e}))}function u_(e){return Object.entries(e).map((function(e){var t=A(e,2),r=t[0],n=t[1];return"".concat(r,": ").concat(n)})).join(";")}function c_(e,t){return{left:e.left-t.left,top:e.top-t.top,right:t.left+t.width-e.left-e.width,bottom:t.top+t.height-e.top-e.height}}function l_(e,t){e.checked=t,t?e.setAttribute("checked","true"):e.removeAttribute("checked")}function h_(e){e.innerHTML=""}function f_(e){e.setAttribute("draggable","false")}function p_(e,t){if("string"==typeof t){var r=document.createElement("div");for(r.innerHTML=t;r.firstChild;)e.append(r.firstChild)}else Array.isArray(t)?e.append.apply(e,T(t)):e.append(t)}var d_,v_=Object.freeze({__proto__:null,getContainer:Wy,trim:Yy,splitWords:Xy,create:Zy,remove:qy,addClass:Ky,removeClass:Qy,hasClass:$y,setClass:Jy,getClass:e_,empty:function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)},setTransform:r_,triggerResize:n_,printCanvas:function(e){var t=["padding: "+(e.height/2-8)+"px "+e.width/2+"px;","line-height: "+e.height+"px;","background-image: url("+e.toDataURL()+");"];console.log("%c\n",t.join(""))},getViewPortScale:i_,DPR:a_,addStyle:o_,getStyleList:s_,removeStyle:function(e,t){var r,n=s_(null!==(r=e.getAttribute("style"))&&void 0!==r?r:""),i=s_(t),a=Xm.apply(void 0,[n].concat(T(i)));e.setAttribute("style",a.join(";"))},css2Style:u_,getDiffRect:c_,setChecked:l_,clearChildren:h_,setUnDraggable:f_,appendElementType:p_});function g_(e){return"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap}function m_(){return"function"==typeof importScripts}var y_=m_()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===window.location.protocol?window.parent:window).location.href},__=null===(d_=navigator)||void 0===d_?void 0:d_.userAgent,b_=!!__.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),x_=__.indexOf("Android")>-1||__.indexOf("Adr")>-1;function S_(){for(var e=__,t=!0,r=0,n=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];r<n.length;r++){var i=n[r];if(e.indexOf(i)>0){t=!1;break}}return t}function E_(e,t){e.forEach((function(e){t[e]&&(t[e]=t[e].bind(t))}))}var A_=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16;u(this,e),h(this,"duration",16),h(this,"timestamp",(new Date).getTime()),this.duration=t}return l(e,[{key:"run",value:function(e){var t=(new Date).getTime(),r=t-this.timestamp;this.timestamp=t,r>=this.duration&&e()}}]),e}(),T_=qe(1..valueOf),w_=Qr.f,C_=nr.f,k_=hr.f,M_=Jm.trim,P_=De.Number,I_=(Bn.Number,P_.prototype),O_=De.TypeError,R_=qe("".slice),L_=qe("".charCodeAt),N_=function(e){var t=Kt(e,"number");return"bigint"==typeof t?t:D_(t)},D_=function(e){var t,r,n,i,a,o,s,u,c=Kt(e,"number");if(Tt(c))throw new O_("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=M_(c),43===(t=L_(c,0))||45===t){if(88===(r=L_(c,2))||120===r)return NaN}else if(48===t){switch(L_(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(o=(a=R_(c,2)).length,s=0;s<o;s++)if((u=L_(a,s))<48||u>i)return NaN;return parseInt(a,n)}return+c},F_=cn("Number",!P_(" 0o1")||!P_("0b1")||P_("+0x1")),z_=function(e){return dt(I_,e)&&Fe((function(){T_(e)}))},B_=function(e){var t=arguments.length<1?0:P_(N_(e));return z_(this)?No(Object(t),this,B_):t};B_.prototype=I_,F_&&(I_.constructor=B_),hn({global:!0,constructor:!0,wrap:!0,forced:F_},{Number:B_});F_&&function(e,t){for(var r,n=ze?w_(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)Bt(t,r=n[i])&&!Bt(e,r)&&k_(e,r,C_(t,r))}(Bn.Number,P_);var U_=RangeError,j_=function(e){var t=bn(it(this)),r="",n=Fr(e);if(n<0||n===1/0)throw new U_("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},V_=RangeError,G_=String,H_=Math.floor,W_=qe(j_),Y_=qe("".slice),X_=qe(1..toFixed),Z_=function(e,t,r){return 0===t?r:t%2==1?Z_(e,t-1,r*e):Z_(e*e,t/2,r)},q_=function(e,t,r){for(var n=-1,i=r;++n<6;)i+=t*e[n],e[n]=i%1e7,i=H_(i/1e7)},K_=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=H_(n/t),n=n%t*1e7},Q_=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=G_(e[t]);r=""===r?n:r+W_("0",7-n.length)+n}return r},$_=Fe((function(){return"0.000"!==X_(8e-5,3)||"1"!==X_(.9,0)||"1.25"!==X_(1.255,2)||"1000000000000000128"!==X_(0xde0b6b3a7640080,0)}))||!Fe((function(){X_({})}));hn({target:"Number",proto:!0,forced:$_},{toFixed:function(e){var t,r,n,i,a=T_(this),o=Fr(e),s=[0,0,0,0,0,0],u="",c="0";if(o<0||o>20)throw new V_("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return G_(a);if(a<0&&(u="-",a=-a),a>1e-21)if(r=(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(a*Z_(2,69,1))-69)<0?a*Z_(2,-t,1):a/Z_(2,t,1),r*=4503599627370496,(t=52-t)>0){for(q_(s,0,r),n=o;n>=7;)q_(s,1e7,0),n-=7;for(q_(s,Z_(10,n,1),0),n=t-1;n>=23;)K_(s,1<<23),n-=23;K_(s,1<<n),q_(s,1,1),K_(s,2),c=Q_(s)}else q_(s,0,r),q_(s,1<<-t,0),c=Q_(s)+W_("0",o);return c=o>0?u+((i=c.length)<=o?"0."+W_("0",o-i)+c:Y_(c,0,i-o)+"."+Y_(c,i-o)):u+c}});var J_={centimeters:637100880,centimetres:637100880,degrees:6371008.8/111325,feet:20902260.511392,inches:6371008.8*39.37,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:6371008.8/1852,radians:1,yards:6371008.8*1.0936};function eb(e,t,r){void 0===r&&(r={});var n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function tb(e,t,r){void 0===r&&(r={});for(var n=0,i=e;n<i.length;n++){var a=i[n];if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var o=0;o<a[a.length-1].length;o++)if(a[a.length-1][o]!==a[0][o])throw new Error("First and last Position are not equivalent.")}return eb({type:"Polygon",coordinates:e},t,r)}function rb(e,t,r){if(void 0===r&&(r={}),e.length<2)throw new Error("coordinates must be an array of two or more positions");return eb({type:"LineString",coordinates:e},t,r)}function nb(e){return 180*(e%(2*Math.PI))/Math.PI}function ib(e){return e%360*Math.PI/180}function ab(e,t){!function(e,t){var r,n,i,a,o,s,u,c,l,h,f=0,p="FeatureCollection"===e.type,d="Feature"===e.type,v=p?e.features.length:1;for(r=0;r<v;r++){for(s=p?e.features[r].geometry:d?e.geometry:e,c=p?e.features[r].properties:d?e.properties:{},l=p?e.features[r].bbox:d?e.bbox:void 0,h=p?e.features[r].id:d?e.id:void 0,o=(u=!!s&&"GeometryCollection"===s.type)?s.geometries.length:1,i=0;i<o;i++)if(null!==(a=u?s.geometries[i]:s))switch(a.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===t(a,f,c,l,h))return!1;break;case"GeometryCollection":for(n=0;n<a.geometries.length;n++)if(!1===t(a.geometries[n],f,c,l,h))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===t(null,f,c,l,h))return!1;f++}}(e,(function(e,r,n,i,a){var o,s=null===e?null:e.type;switch(s){case null:case"Point":case"LineString":case"Polygon":return!1!==t(eb(e,n,{bbox:i,id:a}),r,0)&&void 0}switch(s){case"MultiPoint":o="Point";break;case"MultiLineString":o="LineString";break;case"MultiPolygon":o="Polygon"}for(var u=0;u<e.coordinates.length;u++){var c=e.coordinates[u];if(!1===t(eb({type:o,coordinates:c},n),r,u))return!1}}))}function ob(e){var t=[1/0,1/0,-1/0,-1/0];return function e(t,r,n){if(null!==t)for(var i,a,o,s,u,c,l,h,f=0,p=0,d=t.type,v="FeatureCollection"===d,g="Feature"===d,m=v?t.features.length:1,y=0;y<m;y++){u=(h=!!(l=v?t.features[y].geometry:g?t.geometry:t)&&"GeometryCollection"===l.type)?l.geometries.length:1;for(var _=0;_<u;_++){var b=0,x=0;if(null!==(s=h?l.geometries[_]:l)){c=s.coordinates;var S=s.type;switch(f=!n||"Polygon"!==S&&"MultiPolygon"!==S?0:1,S){case null:break;case"Point":if(!1===r(c,p,y,b,x))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(i=0;i<c.length;i++){if(!1===r(c[i],p,y,b,x))return!1;p++,"MultiPoint"===S&&b++}"LineString"===S&&b++;break;case"Polygon":case"MultiLineString":for(i=0;i<c.length;i++){for(a=0;a<c[i].length-f;a++){if(!1===r(c[i][a],p,y,b,x))return!1;p++}"MultiLineString"===S&&b++,"Polygon"===S&&x++}"Polygon"===S&&b++;break;case"MultiPolygon":for(i=0;i<c.length;i++){for(x=0,a=0;a<c[i].length;a++){for(o=0;o<c[i][a].length-f;o++){if(!1===r(c[i][a][o],p,y,b,x))return!1;p++}x++}b++}break;case"GeometryCollection":for(i=0;i<s.geometries.length;i++)if(!1===e(s.geometries[i],r,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}(e,(function(e){t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]<e[0]&&(t[2]=e[0]),t[3]<e[1]&&(t[3]=e[1])})),t}function sb(e){return"number"==typeof e}ob.default=ob;var ub=function(e){return e[e.LNGLAT=1]="LNGLAT",e[e.LNGLAT_OFFSET=2]="LNGLAT_OFFSET",e[e.VECTOR_TILE=3]="VECTOR_TILE",e[e.IDENTITY=4]="IDENTITY",e[e.P20=5]="P20",e[e.P20_OFFSET=6]="P20_OFFSET",e[e.METER_OFFSET=7]="METER_OFFSET",e[e.P20_2=8]="P20_2",e}({}),cb={CoordinateSystem:"u_CoordinateSystem",ViewportCenter:"u_ViewportCenter",ViewportCenterProjection:"u_ViewportCenterProjection",PixelsPerDegree:"u_PixelsPerDegree",PixelsPerDegree2:"u_PixelsPerDegree2",PixelsPerMeter:"u_PixelsPerMeter",MultiCoor:"u_isMultiCoor",Mvp:"u_Mvp"},lb=vo.onFreeze,hb=Object.freeze,fb=Fe((function(){hb(1)}));hn({target:"Object",stat:!0,forced:fb,sham:!po},{freeze:function(e){return hb&&ht(e)?hb(lb(e)):e}});var pb=De.isFinite,db=Number.isFinite||function(e){return"number"==typeof e&&pb(e)};hn({target:"Number",stat:!0},{isFinite:db});var vb="undefined"!=typeof Float32Array?Float32Array:Array,gb=Math.random;function mb(){var e=new vb(4);return vb!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0,e[3]=0),e}function yb(e,t,r,n){var i=new vb(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}function _b(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var bb;bb=mb();function xb(e,t){var r,n,i,a=_b([],t,e);return r=a,n=a,i=1/a[3],r[0]=n[0]*i,r[1]=n[1]*i,r[2]=n[2]*i,r[3]=n[3]*i,a}var Sb=Math.log,Eb=Math.LN2;function Ab(){var e=new vb(16);return vb!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function Tb(e){var t=new vb(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function wb(e,t,r,n,i,a,o,s,u,c,l,h,f,p,d,v){var g=new vb(16);return g[0]=e,g[1]=t,g[2]=r,g[3]=n,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=u,g[9]=c,g[10]=l,g[11]=h,g[12]=f,g[13]=p,g[14]=d,g[15]=v,g}function Cb(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function kb(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],p=t[11],d=t[12],v=t[13],g=t[14],m=t[15],y=r*s-n*o,_=r*u-i*o,b=r*c-a*o,x=n*u-i*s,S=n*c-a*s,E=i*c-a*u,A=l*v-h*d,T=l*g-f*d,w=l*m-p*d,C=h*g-f*v,k=h*m-p*v,M=f*m-p*g,P=y*M-_*k+b*C+x*w-S*T+E*A;return P?(P=1/P,e[0]=(s*M-u*k+c*C)*P,e[1]=(i*k-n*M-a*C)*P,e[2]=(v*E-g*S+m*x)*P,e[3]=(f*S-h*E-p*x)*P,e[4]=(u*w-o*M-c*T)*P,e[5]=(r*M-i*w+a*T)*P,e[6]=(g*b-d*E-m*_)*P,e[7]=(l*E-f*b+p*_)*P,e[8]=(o*k-s*w+c*A)*P,e[9]=(n*w-r*k-a*A)*P,e[10]=(d*S-v*b+m*y)*P,e[11]=(h*b-l*S-p*y)*P,e[12]=(s*T-o*C-u*A)*P,e[13]=(r*C-n*T+i*A)*P,e[14]=(v*_-d*x-g*y)*P,e[15]=(l*x-h*_+f*y)*P,e):null}function Mb(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=t[9],p=t[10],d=t[11],v=t[12],g=t[13],m=t[14],y=t[15],_=r[0],b=r[1],x=r[2],S=r[3];return e[0]=_*n+b*s+x*h+S*v,e[1]=_*i+b*u+x*f+S*g,e[2]=_*a+b*c+x*p+S*m,e[3]=_*o+b*l+x*d+S*y,_=r[4],b=r[5],x=r[6],S=r[7],e[4]=_*n+b*s+x*h+S*v,e[5]=_*i+b*u+x*f+S*g,e[6]=_*a+b*c+x*p+S*m,e[7]=_*o+b*l+x*d+S*y,_=r[8],b=r[9],x=r[10],S=r[11],e[8]=_*n+b*s+x*h+S*v,e[9]=_*i+b*u+x*f+S*g,e[10]=_*a+b*c+x*p+S*m,e[11]=_*o+b*l+x*d+S*y,_=r[12],b=r[13],x=r[14],S=r[15],e[12]=_*n+b*s+x*h+S*v,e[13]=_*i+b*u+x*f+S*g,e[14]=_*a+b*c+x*p+S*m,e[15]=_*o+b*l+x*d+S*y,e}function Pb(e,t,r){var n,i,a,o,s,u,c,l,h,f,p,d,v=r[0],g=r[1],m=r[2];return t===e?(e[12]=t[0]*v+t[4]*g+t[8]*m+t[12],e[13]=t[1]*v+t[5]*g+t[9]*m+t[13],e[14]=t[2]*v+t[6]*g+t[10]*m+t[14],e[15]=t[3]*v+t[7]*g+t[11]*m+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=t[9],p=t[10],d=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=u,e[6]=c,e[7]=l,e[8]=h,e[9]=f,e[10]=p,e[11]=d,e[12]=n*v+s*g+h*m+t[12],e[13]=i*v+u*g+f*m+t[13],e[14]=a*v+c*g+p*m+t[14],e[15]=o*v+l*g+d*m+t[15]),e}function Ib(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Ob(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*n,e[5]=o*i+l*n,e[6]=s*i+h*n,e[7]=u*i+f*n,e[8]=c*i-a*n,e[9]=l*i-o*n,e[10]=h*i-s*n,e[11]=f*i-u*n,e}function Rb(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],c=t[8],l=t[9],h=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*n,e[1]=o*i-l*n,e[2]=s*i-h*n,e[3]=u*i-f*n,e[8]=a*n+c*i,e[9]=o*n+l*i,e[10]=s*n+h*i,e[11]=u*n+f*i,e}function Lb(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],u=t[3],c=t[4],l=t[5],h=t[6],f=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+c*n,e[1]=o*i+l*n,e[2]=s*i+h*n,e[3]=u*i+f*n,e[4]=c*i-a*n,e[5]=l*i-o*n,e[6]=h*i-s*n,e[7]=f*i-u*n,e}function Nb(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function Db(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,u=i+i,c=a+a,l=n*s,h=n*u,f=n*c,p=i*u,d=i*c,v=a*c,g=o*s,m=o*u,y=o*c;return e[0]=1-(p+v),e[1]=h+y,e[2]=f-m,e[3]=0,e[4]=h-y,e[5]=1-(l+v),e[6]=d+g,e[7]=0,e[8]=f+m,e[9]=d-g,e[10]=1-(l+p),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function Fb(e,t){var r=t[0],n=t[1],i=t[2],a=t[4],o=t[5],s=t[6],u=t[8],c=t[9],l=t[10];return e[0]=Math.hypot(r,n,i),e[1]=Math.hypot(a,o,s),e[2]=Math.hypot(u,c,l),e}function zb(e,t,r,n,i){var a,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(n-i),e[10]=(i+n)*a,e[14]=2*i*n*a):(e[10]=-1,e[14]=-2*n),e}hn({target:"Math",stat:!0},{log2:function(e){return Sb(e)/Eb}});var Bb=zb;function Ub(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=(o+a)*c,e[15]=1,e}var jb=Ub;function Vb(e,t,r,n){var i,a,o,s,u,c,l,h,f,p,d=t[0],v=t[1],g=t[2],m=n[0],y=n[1],_=n[2],b=r[0],x=r[1],S=r[2];return Math.abs(d-b)<1e-6&&Math.abs(v-x)<1e-6&&Math.abs(g-S)<1e-6?Cb(e):(l=d-b,h=v-x,f=g-S,i=y*(f*=p=1/Math.hypot(l,h,f))-_*(h*=p),a=_*(l*=p)-m*f,o=m*h-y*l,(p=Math.hypot(i,a,o))?(i*=p=1/p,a*=p,o*=p):(i=0,a=0,o=0),s=h*o-f*a,u=f*i-l*o,c=l*a-h*i,(p=Math.hypot(s,u,c))?(s*=p=1/p,u*=p,c*=p):(s=0,u=0,c=0),e[0]=i,e[1]=s,e[2]=l,e[3]=0,e[4]=a,e[5]=u,e[6]=h,e[7]=0,e[8]=o,e[9]=c,e[10]=f,e[11]=0,e[12]=-(i*d+a*v+o*g),e[13]=-(s*d+u*v+c*g),e[14]=-(l*d+h*v+f*g),e[15]=1,e)}function Gb(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function Hb(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],p=e[11],d=e[12],v=e[13],g=e[14],m=e[15],y=t[0],_=t[1],b=t[2],x=t[3],S=t[4],E=t[5],A=t[6],T=t[7],w=t[8],C=t[9],k=t[10],M=t[11],P=t[12],I=t[13],O=t[14],R=t[15];return Math.abs(r-y)<=1e-6*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(n-_)<=1e-6*Math.max(1,Math.abs(n),Math.abs(_))&&Math.abs(i-b)<=1e-6*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=1e-6*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-S)<=1e-6*Math.max(1,Math.abs(o),Math.abs(S))&&Math.abs(s-E)<=1e-6*Math.max(1,Math.abs(s),Math.abs(E))&&Math.abs(u-A)<=1e-6*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(c-T)<=1e-6*Math.max(1,Math.abs(c),Math.abs(T))&&Math.abs(l-w)<=1e-6*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(h-C)<=1e-6*Math.max(1,Math.abs(h),Math.abs(C))&&Math.abs(f-k)<=1e-6*Math.max(1,Math.abs(f),Math.abs(k))&&Math.abs(p-M)<=1e-6*Math.max(1,Math.abs(p),Math.abs(M))&&Math.abs(d-P)<=1e-6*Math.max(1,Math.abs(d),Math.abs(P))&&Math.abs(v-I)<=1e-6*Math.max(1,Math.abs(v),Math.abs(I))&&Math.abs(g-O)<=1e-6*Math.max(1,Math.abs(g),Math.abs(O))&&Math.abs(m-R)<=1e-6*Math.max(1,Math.abs(m),Math.abs(R))}var Wb=Mb,Yb=Gb,Xb=Object.freeze({__proto__:null,create:Ab,clone:Tb,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},fromValues:wb,set:function(e,t,r,n,i,a,o,s,u,c,l,h,f,p,d,v,g){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=o,e[6]=s,e[7]=u,e[8]=c,e[9]=l,e[10]=h,e[11]=f,e[12]=p,e[13]=d,e[14]=v,e[15]=g,e},identity:Cb,transpose:function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e},invert:kb,adjoint:function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],u=t[6],c=t[7],l=t[8],h=t[9],f=t[10],p=t[11],d=t[12],v=t[13],g=t[14],m=t[15];return e[0]=s*(f*m-p*g)-h*(u*m-c*g)+v*(u*p-c*f),e[1]=-(n*(f*m-p*g)-h*(i*m-a*g)+v*(i*p-a*f)),e[2]=n*(u*m-c*g)-s*(i*m-a*g)+v*(i*c-a*u),e[3]=-(n*(u*p-c*f)-s*(i*p-a*f)+h*(i*c-a*u)),e[4]=-(o*(f*m-p*g)-l*(u*m-c*g)+d*(u*p-c*f)),e[5]=r*(f*m-p*g)-l*(i*m-a*g)+d*(i*p-a*f),e[6]=-(r*(u*m-c*g)-o*(i*m-a*g)+d*(i*c-a*u)),e[7]=r*(u*p-c*f)-o*(i*p-a*f)+l*(i*c-a*u),e[8]=o*(h*m-p*v)-l*(s*m-c*v)+d*(s*p-c*h),e[9]=-(r*(h*m-p*v)-l*(n*m-a*v)+d*(n*p-a*h)),e[10]=r*(s*m-c*v)-o*(n*m-a*v)+d*(n*c-a*s),e[11]=-(r*(s*p-c*h)-o*(n*p-a*h)+l*(n*c-a*s)),e[12]=-(o*(h*g-f*v)-l*(s*g-u*v)+d*(s*f-u*h)),e[13]=r*(h*g-f*v)-l*(n*g-i*v)+d*(n*f-i*h),e[14]=-(r*(s*g-u*v)-o*(n*g-i*v)+d*(n*u-i*s)),e[15]=r*(s*f-u*h)-o*(n*f-i*h)+l*(n*u-i*s),e},determinant:function(e){var t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11],p=e[12],d=e[13],v=e[14],g=e[15];return(t*o-r*a)*(h*g-f*v)-(t*s-n*a)*(l*g-f*d)+(t*u-i*a)*(l*v-h*d)+(r*s-n*o)*(c*g-f*p)-(r*u-i*o)*(c*v-h*p)+(n*u-i*s)*(c*d-l*p)},multiply:Mb,translate:Pb,scale:Ib,rotate:function(e,t,r,n){var i,a,o,s,u,c,l,h,f,p,d,v,g,m,y,_,b,x,S,E,A,T,w,C,k=n[0],M=n[1],P=n[2],I=Math.hypot(k,M,P);return I<1e-6?null:(k*=I=1/I,M*=I,P*=I,i=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],u=t[1],c=t[2],l=t[3],h=t[4],f=t[5],p=t[6],d=t[7],v=t[8],g=t[9],m=t[10],y=t[11],_=k*k*o+a,b=M*k*o+P*i,x=P*k*o-M*i,S=k*M*o-P*i,E=M*M*o+a,A=P*M*o+k*i,T=k*P*o+M*i,w=M*P*o-k*i,C=P*P*o+a,e[0]=s*_+h*b+v*x,e[1]=u*_+f*b+g*x,e[2]=c*_+p*b+m*x,e[3]=l*_+d*b+y*x,e[4]=s*S+h*E+v*A,e[5]=u*S+f*E+g*A,e[6]=c*S+p*E+m*A,e[7]=l*S+d*E+y*A,e[8]=s*T+h*w+v*C,e[9]=u*T+f*w+g*C,e[10]=c*T+p*w+m*C,e[11]=l*T+d*w+y*C,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)},rotateX:Ob,rotateY:Rb,rotateZ:Lb,fromTranslation:Nb,fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromRotation:function(e,t,r){var n,i,a,o=r[0],s=r[1],u=r[2],c=Math.hypot(o,s,u);return c<1e-6?null:(o*=c=1/c,s*=c,u*=c,n=Math.sin(t),a=1-(i=Math.cos(t)),e[0]=o*o*a+i,e[1]=s*o*a+u*n,e[2]=u*o*a-s*n,e[3]=0,e[4]=o*s*a-u*n,e[5]=s*s*a+i,e[6]=u*s*a+o*n,e[7]=0,e[8]=o*u*a+s*n,e[9]=s*u*a-o*n,e[10]=u*u*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)},fromXRotation:function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromYRotation:function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromRotationTranslation:Db,fromQuat2:function(e,t){var r=new vb(3),n=-t[0],i=-t[1],a=-t[2],o=t[3],s=t[4],u=t[5],c=t[6],l=t[7],h=n*n+i*i+a*a+o*o;return h>0?(r[0]=2*(s*o+l*n+u*a-c*i)/h,r[1]=2*(u*o+l*i+c*n-s*a)/h,r[2]=2*(c*o+l*a+s*i-u*n)/h):(r[0]=2*(s*o+l*n+u*a-c*i),r[1]=2*(u*o+l*i+c*n-s*a),r[2]=2*(c*o+l*a+s*i-u*n)),Db(e,t,r),e},getTranslation:function(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e},getScaling:Fb,getRotation:function(e,t){var r=new vb(3);Fb(r,t);var n=1/r[0],i=1/r[1],a=1/r[2],o=t[0]*n,s=t[1]*i,u=t[2]*a,c=t[4]*n,l=t[5]*i,h=t[6]*a,f=t[8]*n,p=t[9]*i,d=t[10]*a,v=o+l+d,g=0;return v>0?(g=2*Math.sqrt(v+1),e[3]=.25*g,e[0]=(h-p)/g,e[1]=(f-u)/g,e[2]=(s-c)/g):o>l&&o>d?(g=2*Math.sqrt(1+o-l-d),e[3]=(h-p)/g,e[0]=.25*g,e[1]=(s+c)/g,e[2]=(f+u)/g):l>d?(g=2*Math.sqrt(1+l-o-d),e[3]=(f-u)/g,e[0]=(s+c)/g,e[1]=.25*g,e[2]=(h+p)/g):(g=2*Math.sqrt(1+d-o-l),e[3]=(s-c)/g,e[0]=(f+u)/g,e[1]=(h+p)/g,e[2]=.25*g),e},fromRotationTranslationScale:function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3],u=i+i,c=a+a,l=o+o,h=i*u,f=i*c,p=i*l,d=a*c,v=a*l,g=o*l,m=s*u,y=s*c,_=s*l,b=n[0],x=n[1],S=n[2];return e[0]=(1-(d+g))*b,e[1]=(f+_)*b,e[2]=(p-y)*b,e[3]=0,e[4]=(f-_)*x,e[5]=(1-(h+g))*x,e[6]=(v+m)*x,e[7]=0,e[8]=(p+y)*S,e[9]=(v-m)*S,e[10]=(1-(h+d))*S,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e},fromRotationTranslationScaleOrigin:function(e,t,r,n,i){var a=t[0],o=t[1],s=t[2],u=t[3],c=a+a,l=o+o,h=s+s,f=a*c,p=a*l,d=a*h,v=o*l,g=o*h,m=s*h,y=u*c,_=u*l,b=u*h,x=n[0],S=n[1],E=n[2],A=i[0],T=i[1],w=i[2],C=(1-(v+m))*x,k=(p+b)*x,M=(d-_)*x,P=(p-b)*S,I=(1-(f+m))*S,O=(g+y)*S,R=(d+_)*E,L=(g-y)*E,N=(1-(f+v))*E;return e[0]=C,e[1]=k,e[2]=M,e[3]=0,e[4]=P,e[5]=I,e[6]=O,e[7]=0,e[8]=R,e[9]=L,e[10]=N,e[11]=0,e[12]=r[0]+A-(C*A+P*T+R*w),e[13]=r[1]+T-(k*A+I*T+L*w),e[14]=r[2]+w-(M*A+O*T+N*w),e[15]=1,e},fromQuat:function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,u=i+i,c=r*o,l=n*o,h=n*s,f=i*o,p=i*s,d=i*u,v=a*o,g=a*s,m=a*u;return e[0]=1-h-d,e[1]=l+m,e[2]=f-g,e[3]=0,e[4]=l-m,e[5]=1-c-d,e[6]=p+v,e[7]=0,e[8]=f+g,e[9]=p-v,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},frustum:function(e,t,r,n,i,a,o){var s=1/(r-t),u=1/(i-n),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*u,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*u,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e},perspectiveNO:zb,perspective:Bb,perspectiveZO:function(e,t,r,n,i){var a,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(n-i),e[10]=i*a,e[14]=i*n*a):(e[10]=-1,e[14]=-n),e},perspectiveFromFieldOfView:function(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),u=2/(o+s),c=2/(i+a);return e[0]=u,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-(o-s)*u*.5,e[9]=(i-a)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},orthoNO:Ub,ortho:jb,orthoZO:function(e,t,r,n,i,a,o){var s=1/(t-r),u=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*u,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*u,e[14]=a*c,e[15]=1,e},lookAt:Vb,targetTo:function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=n[0],u=n[1],c=n[2],l=i-r[0],h=a-r[1],f=o-r[2],p=l*l+h*h+f*f;p>0&&(l*=p=1/Math.sqrt(p),h*=p,f*=p);var d=u*f-c*h,v=c*l-s*f,g=s*h-u*l;return(p=d*d+v*v+g*g)>0&&(d*=p=1/Math.sqrt(p),v*=p,g*=p),e[0]=d,e[1]=v,e[2]=g,e[3]=0,e[4]=h*g-f*v,e[5]=f*d-l*g,e[6]=l*v-h*d,e[7]=0,e[8]=l,e[9]=h,e[10]=f,e[11]=0,e[12]=i,e[13]=a,e[14]=o,e[15]=1,e},str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},frob:function(e){return Math.hypot(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},subtract:Gb,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},equals:Hb,mul:Wb,sub:Yb});function Zb(){var e=new vb(2);return vb!=Float32Array&&(e[0]=0,e[1]=0),e}function qb(e,t){var r=new vb(2);return r[0]=e,r[1]=t,r}function Kb(e,t){return e[0]=t[0],e[1]=t[1],e}function Qb(e,t,r){return e[0]=t,e[1]=r,e}function $b(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e}function Jb(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function ex(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function tx(e,t){var r=t[0],n=t[1],i=r*r+n*n;return i>0&&(i=1/Math.sqrt(i)),e[0]=t[0]*i,e[1]=t[1]*i,e}function rx(e,t){return e[0]*t[0]+e[1]*t[1]}function nx(e,t,r,n){var i=t[0],a=t[1];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e}function ix(e,t,r){var n=t[0],i=t[1];return e[0]=r[0]*n+r[2]*i,e[1]=r[1]*n+r[3]*i,e}var ax=Jb;!function(){var e=Zb()}();function ox(){var e=new vb(3);return vb!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function sx(e){var t=e[0],r=e[1],n=e[2];return Math.hypot(t,r,n)}function ux(e,t,r){var n=new vb(3);return n[0]=e,n[1]=t,n[2]=r,n}function cx(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function lx(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function hx(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function fx(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function px(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.hypot(r,n,i)}function dx(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function vx(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function gx(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function mx(e,t){var r=t[0],n=t[1],i=t[2],a=r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e}function yx(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function _x(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],u=r[2];return e[0]=i*u-a*s,e[1]=a*o-n*u,e[2]=n*s-i*o,e}function bx(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e}function xx(e,t){var r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],s=t[2],u=Math.sqrt(r*r+n*n+i*i)*Math.sqrt(a*a+o*o+s*s),c=u&&yx(e,t)/u;return Math.acos(Math.min(Math.max(c,-1),1))}var Sx=cx,Ex=lx,Ax=hx,Tx=px,Cx=dx,kx=sx,Mx=vx,Px=function(){var e=ox();return function(t,r,n,i,a,o){var s,u;for(r||(r=3),n||(n=0),u=i?Math.min(i*r+n,t.length):t.length,s=n;s<u;s+=r)e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],a(e,e,o),t[s]=e[0],t[s+1]=e[1],t[s+2]=e[2];return t}}(),Ix=Object.freeze({__proto__:null,create:ox,clone:function(e){var t=new vb(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},length:sx,fromValues:ux,copy:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},set:function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e},add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e},subtract:cx,multiply:lx,divide:hx,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e},max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:fx,scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e},distance:px,squaredDistance:dx,squaredLength:vx,negate:gx,inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},normalize:mx,dot:yx,cross:_x,lerp:function(e,t,r,n){var i=t[0],a=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e},hermite:function(e,t,r,n,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),l=o*(3-2*a);return e[0]=t[0]*s+r[0]*u+n[0]*c+i[0]*l,e[1]=t[1]*s+r[1]*u+n[1]*c+i[1]*l,e[2]=t[2]*s+r[2]*u+n[2]*c+i[2]*l,e},bezier:function(e,t,r,n,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,l=3*a*s,h=3*u*o,f=u*a;return e[0]=t[0]*c+r[0]*l+n[0]*h+i[0]*f,e[1]=t[1]*c+r[1]*l+n[1]*h+i[1]*f,e[2]=t[2]*c+r[2]*l+n[2]*h+i[2]*f,e},random:function(e,t){t=t||1;var r=2*gb()*Math.PI,n=2*gb()-1,i=Math.sqrt(1-n*n)*t;return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e},transformMat4:bx,transformMat3:function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e},transformQuat:function(e,t,r){var n=r[0],i=r[1],a=r[2],o=r[3],s=t[0],u=t[1],c=t[2],l=i*c-a*u,h=a*s-n*c,f=n*u-i*s,p=i*f-a*h,d=a*l-n*f,v=n*h-i*l,g=2*o;return l*=g,h*=g,f*=g,p*=2,d*=2,v*=2,e[0]=s+l+p,e[1]=u+h+d,e[2]=c+f+v,e},rotateX:function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},rotateY:function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},rotateZ:function(e,t,r,n){var i=[],a=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},angle:xx,zero:function(e){return e[0]=0,e[1]=0,e[2]=0,e},str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]},equals:function(e,t){var r=e[0],n=e[1],i=e[2],a=t[0],o=t[1],s=t[2];return Math.abs(r-a)<=1e-6*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(n-o)<=1e-6*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=1e-6*Math.max(1,Math.abs(i),Math.abs(s))},sub:Sx,mul:Ex,div:Ax,dist:Tx,sqrDist:Cx,len:kx,sqrLen:Mx,forEach:Px});function Ox(e,t){if(!e)throw new Error(t||"viewport-mercator-project: assertion failed.")}var Rx=Math.PI,Lx=Rx/4,Nx=Rx/180,Dx=180/Rx;function Fx(e){return Math.pow(2,e)}function zx(e,t){var r=A(e,2),n=r[0],i=r[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3?arguments[3]:void 0;Ox(Number.isFinite(n)&&Number.isFinite(t)),Ox(Number.isFinite(i)&&i>=-90&&i<=90,"invalid latitude");var s,u=n*Nx,c=i*Nx,l=(t*=512)*(u+Rx)/(2*Rx);if(!0===a){var h=Jx([n,i],o,t);l=h[0],s=h[1]}else s=t*(Rx-Math.log(Math.tan(Lx+.5*c)))/(2*Rx);return[l,s]}function Bx(e){var t=Fx(e);return Ox(Number.isFinite(t)),512*t}function Ux(e,t,r){var n,i=A(e,2),a=i[0],o=i[1],s=a/(t*=512)*(2*Rx)-Rx;return n=!0===r?Rx-2*o*Rx/t:2*(Math.atan(Math.exp(Rx-o/t*(2*Rx)))-Lx),[s*Dx,n*Dx]}function jx(e){var t=e.latitude,r=e.longitude,n=e.zoom,i=e.lngLatExtent,a=e.scale,o=e.highPrecision,s=void 0!==o&&o,u=e.coordinateSystem,c=e.epsgCode;a=void 0!==a?a:Fx(n),Ox(Number.isFinite(t)&&Number.isFinite(r)&&Number.isFinite(a));var l={},h=512*a,f=Math.cos(t*Nx),p=h/(i[2]-i[0]),d=p;u&&u===ub.LNGLAT_OFFSET&&"EPSG:3857"===c&&(d/=f);var v=h/4003e4;if(l.pixelsPerMeter=[v,-v,v],l.metersPerPixel=[1/v,-1/v,1/v],l.pixelsPerDegree=[p,-d,v],l.degreesPerPixel=[1/p,-1/d,1/v],s){var g=Nx*Math.tan(t*Nx)/f,m=p*g/2,y=h/4003e4*g,_=y/d*v;l.pixelsPerDegree2=[0,-m,y],l.pixelsPerMeter2=[_,0,_]}return l}function Vx(e){var t=e.height,r=e.pitch,n=e.bearing,i=e.altitude,a=e.center,o=void 0===a?null:a,s=e.flipY,u=void 0!==s&&s,c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return Pb(c,c,[0,0,-i]),Ib(c,c,[1,1,1/t]),Ob(c,c,-r*Nx),Lb(c,c,n*Nx),u&&Ib(c,c,[1,-1,1]),o&&Pb(c,c,gx([],o)),c}function Gx(e){var t=e.width,r=e.height,n=e.pitch,i=function(e){var t=e.width,r=e.height,n=e.altitude,i=void 0===n?1.5:n,a=e.pitch,o=void 0===a?0:a,s=e.nearZMultiplier,u=void 0===s?1:s,c=e.farZMultiplier,l=void 0===c?1:c,h=o*Nx,f=Math.atan(.5/i),p=Math.sin(f)*i/Math.sin(Math.PI/2-h-f),d=Math.cos(Math.PI/2-h)*p+i;return{fov:2*Math.atan(r/2/i),aspect:t/r,focalDistance:i,near:u,far:d*l}}({width:t,height:r,altitude:e.altitude,pitch:n,nearZMultiplier:e.nearZMultiplier,farZMultiplier:e.farZMultiplier}),a=i.fov,o=i.aspect,s=i.near,u=i.far;return Bb([],a,o,s,u)}function Hx(e,t){var r=A(e,3),n=r[0],i=r[1],a=r[2],o=void 0===a?0:a;return Ox(Number.isFinite(n)&&Number.isFinite(i)&&Number.isFinite(o)),xb(t,[n,i,o,1])}function Wx(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=A(e,3),i=n[0],a=n[1],o=n[2];if(Ox(Number.isFinite(i)&&Number.isFinite(a),"invalid pixel coordinate"),Number.isFinite(o)){var s=xb(t,[i,a,o,1]);return s}var u=xb(t,[i,a,0,1]),c=xb(t,[i,a,1,1]),l=u[2],h=c[2],f=l===h?0:((r||0)-l)/(h-l);return nx([],u,c,f)}var Yx=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function Xx(e){var t=e.width,r=e.height,n=e.bounds,i=e.minExtent,a=void 0===i?0:i,o=e.maxZoom,s=void 0===o?24:o,u=e.padding,c=void 0===u?0:u,l=e.offset,h=void 0===l?[0,0]:l,f=A(n,2),p=A(f[0],2),d=p[0],v=p[1],g=A(f[1],2),m=g[0],y=g[1];if(Number.isFinite(c)){c={top:c,bottom:c,left:c,right:c}}else Ox(Number.isFinite(c.top)&&Number.isFinite(c.bottom)&&Number.isFinite(c.left)&&Number.isFinite(c.right));var _=new Zx({width:t,height:r,longitude:0,latitude:0,zoom:0}),b=_.project([d,y]),x=_.project([m,v]),S=[Math.max(Math.abs(x[0]-b[0]),a),Math.max(Math.abs(x[1]-b[1]),a)],E=[t-c.left-c.right-2*Math.abs(h[0]),r-c.top-c.bottom-2*Math.abs(h[1])];Ox(E[0]>0&&E[1]>0);var T=E[0]/S[0],w=E[1]/S[1],C=(c.right-c.left)/2/T,k=(c.bottom-c.top)/2/w,M=[(x[0]+b[0])/2+C,(x[1]+b[1])/2+k],P=_.unproject(M),I=_.zoom+Math.log2(Math.abs(Math.min(T,w)));return{longitude:P[0],latitude:P[1],zoom:Math.min(I,s)}}var Zx=function(e){f(r,e);var t=x(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.width,a=n.height,o=n.latitude,s=void 0===o?0:o,c=n.longitude,l=void 0===c?0:c,h=n.zoom,f=void 0===h?0:h,p=n.pitch,d=void 0===p?0:p,v=n.bearing,g=void 0===v?0:v,m=n.altitude,y=void 0===m?1.5:m,b=n.nearZMultiplier,x=n.farZMultiplier,S=n.isGeographicCoordinateSystem,E=n.coordinateSystem,A=n.map;u(this,r),i=i||1,a=a||1;var T=Fx(f);y=Math.max(.75,y);var w=zx([l,s],T,S,A);w[2]=0;var C=Gx({width:i,height:a,pitch:d,bearing:g,altitude:y,nearZMultiplier:b||1/a,farZMultiplier:x||1.01}),k=Vx({height:a,center:w,pitch:d,bearing:g,altitude:y,flipY:!0});return(e=t.call(this,{width:i,height:a,viewMatrix:k,projectionMatrix:C})).latitude=s,e.longitude=l,e.zoom=f,e.pitch=d,e.bearing=g,e.altitude=y,e.scale=T,e.center=w,e.lngLatExtent=S?"degree"===A.getCRS().unit?A.getCRS().extent:A.getCRS().getLngLatExtent():[],e.coordinateSystem=E,e.pixelsPerMeter=jx(_(e)).pixelsPerMeter[2],Object.freeze(_(e)),e}return l(r,[{key:"projectFlat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return zx(e,t,r,n)}},{key:"unprojectFlat",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale;return Ux(e,t)}},{key:"getMapCenterByLngLatPosition",value:function(e){var t,r,n=e.lngLat,i=Wx(e.pos,this.pixelUnprojectionMatrix),a=$b([],zx(n,this.scale),((t=[])[0]=-(r=i)[0],t[1]=-r[1],t));return Ux($b([],this.center,a),this.scale)}},{key:"getLocationAtPoint",value:function(e){var t=e.lngLat,r=e.pos;return this.getMapCenterByLngLatPosition({lngLat:t,pos:r})}},{key:"fitBounds",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.width,i=this.height,a=Xx(Object.assign({width:n,height:i,bounds:e},t)),o=a.longitude,s=a.latitude,u=a.zoom;return new r({width:n,height:i,longitude:o,latitude:s,zoom:u})}}]),r}(function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width,n=t.height,i=t.viewMatrix,a=void 0===i?Yx:i,o=t.projectionMatrix,s=void 0===o?Yx:o;u(this,e),this.width=r||1,this.height=n||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=a,this.projectionMatrix=s;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Mb(c,c,this.projectionMatrix),Mb(c,c,this.viewMatrix),this.viewProjectionMatrix=c;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Ib(l,l,[this.width/2,-this.height/2,1]),Pb(l,l,[1,-1,0]),Mb(l,l,this.viewProjectionMatrix);var h=kb([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],l);if(!h)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=l,this.pixelUnprojectionMatrix=h,this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}return l(e,[{key:"equals",value:function(t){return t instanceof e&&(t.width===this.width&&t.height===this.height&&Hb(t.projectionMatrix,this.projectionMatrix)&&Hb(t.viewMatrix,this.viewMatrix))}},{key:"project",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.topLeft,n=void 0===r||r,i=this.projectPosition(e),a=Hx(i,this.pixelProjectionMatrix),o=A(a,2),s=o[0],u=o[1],c=n?u:this.height-u;return 2===e.length?[s,c]:[s,c,a[2]]}},{key:"unproject",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.topLeft,n=void 0===r||r,i=t.targetZ,a=A(e,3),o=a[0],s=a[1],u=a[2],c=n?s:this.height-s,l=i&&i*this.pixelsPerMeter,h=Wx([o,c,u],this.pixelUnprojectionMatrix,l),f=this.unprojectPosition(h),p=A(f,3),d=p[0],v=p[1],g=p[2];return Number.isFinite(u)?[d,v,g]:Number.isFinite(i)?[d,v,i]:[d,v]}},{key:"projectPosition",value:function(e){var t=A(this.projectFlat(e),2);return[t[0],t[1],(e[2]||0)*this.pixelsPerMeter]}},{key:"unprojectPosition",value:function(e){var t=A(this.unprojectFlat(e),2);return[t[0],t[1],(e[2]||0)/this.pixelsPerMeter]}},{key:"projectFlat",value:function(e){arguments.length>1&&void 0!==arguments[1]||this.scale;return e}},{key:"unprojectFlat",value:function(e){arguments.length>1&&void 0!==arguments[1]||this.scale;return e}}]),e}());function qx(e,t){if(e){var r=A(e||[],2),n=r[0],i=r[1];return t.getCRS().fromWGS84([n,i])}}function Kx(e,t){if(e){var r=A(e||[],2),n=r[0],i=r[1];return t.getCRS().toWGS84([n,i])}}function Qx(e,t){if(e){var r=A(e||[],2),n=r[0],i=r[1],a=t.getCRS().toLngLat(n,i);return[a.lng,a.lat]}}function $x(e){return e.getCRS().getExtent()}function Jx(e,t,r){return eS(e,t,r)}function eS(e,t,r,n){var i=[e[0],e[1]],a=e.slice(2);if(!t)return e;var o=t.getZoom(),s=qx(i,t),u=$x(t),c=r||Bx(o),l=u[2]-u[0],h=u[3]-u[1],f=n?qx(n,t):[u[0],u[3]],p=(s[0]-f[0])/l;return i[0]>180&&(p+=1),i[0]<-180&&(p-=1),[p*c,(f[1]-s[1])/h*c].concat(T(a))}function tS(e,t,r,n){if(!t)return e;var i=t.getZoom(),a=r||Bx(i),o=$x(t),s=o[2]-o[0],u=o[3]-o[1],c=n?qx(n,t):[o[0],o[3]],l=c[1]-e[1]/a*u,h=e[0]/a,f=Kx([h*s+c[0],l],t);return h>1&&(f[0]+=360),h<0&&(f[0]-=360),f}function rS(e){return!!e}function nS(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e)return!1;if(e.getZoom()>12&&t){var r=e.getCRS();return!r||"degrees"!==r.unit&&"degree"!==r.unit&&"EPSG:3857"!==r.epsgCode?ub.METER_OFFSET:ub.LNGLAT_OFFSET}return ub.LNGLAT}function iS(e){return e?e.getCRS().epsgCode:""}function aS(e,t){var r=$x(t),n=r[2]-r[0],i=r[3]-r[1];return 512*(Math.max(n,i)/512/Math.pow(2,e))}function oS(e,t,r){var n=aS(t,r),i=$x(r),a=A(qx(e,r),2),o=a[0],s=a[1],u=(o-i[0])/n,c=(i[3]-s)/n;return[Math.floor(u),Math.floor(c)]}function sS(e,t,r,n){var i=aS(r,n),a=$x(n);return Kx([e*i+a[0],a[3]-t*i],n)}var uS={};function cS(e){uS.map=e}var lS=2*Math.PI*6378137/2;function hS(e,t){var r=A(t,4),n=r[0],i=r[1],a=r[2],o=r[3];return e.lng>n&&e.lng<=a&&e.lat>i&&e.lat<=o}function fS(e){var t=[1/0,1/0,-1/0,-1/0];return e.forEach((function(e){var r=e.coordinates;!function e(t,r){Array.isArray(r[0])?r.forEach((function(r){e(t,r)})):(t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1]));return t}(t,r)})),t}function pS(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{enable:!0,decimal:1},n=(e=gS(e,t))[0],i=e[1],a=n*lS/180,o=Math.log(Math.tan((90+i)*Math.PI/360))/(Math.PI/180);return o=o*lS/180,r.enable&&(a=Number(a.toFixed(r.decimal)),o=Number(o.toFixed(r.decimal))),3===e.length?[a,o,e[2]]:[a,o]}function dS(e){if(null==e)throw new Error("lng is required");return(e>180||e<-180)&&((e%=360)>180&&(e=-360+e),e<-180&&(e=360+e),0===e&&(e=0)),e}function vS(e){if(null==e)throw new Error("lat is required");return(e>90||e<-90)&&((e%=180)>90&&(e=-180+e),e<-90&&(e=180+e),0===e&&(e=0)),e}function gS(e,t){if(!1===t)return e;var r=dS(e[0]),n=vS(e[1]);return n>85&&(n=85),n<-85&&(n=-85),3===e.length?[r,n,e[2]]:[r,n]}function mS(e){return eS(e,uS.map,256*Math.pow(2,20))}function yS(e,t){var r=85.0511287798,n=Math.PI/180;return t=Math.max(Math.min(r,t),-r),t*=n,[6378137*(e*=n),6378137*(t=Math.log(Math.tan(Math.PI/4+t/2)))]}function _S(e,t){var r=Math.PI/180;return[e/6378137/r,2*(Math.atan(Math.exp(t/6378137))-Math.PI/4)/r]}function bS(e,t,r){var n=ib(t[1]-e[1]),i=ib(t[0]-e[0]),a=ib(e[1]),o=ib(t[1]),s=Math.pow(Math.sin(n/2),2)+Math.pow(Math.sin(i/2),2)*Math.cos(a)*Math.cos(o);return function(e,t){void 0===t&&(t="kilometers");var r=J_[t];if(!r)throw new Error(t+" units is invalid");return e*r}(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)),"meters")}function xS(e,t){var r=Math.abs(e[1][1]-e[0][1])*t,n=Math.abs(e[1][0]-e[0][0])*t;return[[e[0][0]-n,e[0][1]-r],[e[1][0]+n,e[1][1]+r]]}function SS(e,t){return e[0][0]<=t[0][0]&&e[0][1]<=t[0][1]&&e[1][0]>=t[1][0]&&e[1][1]>=t[1][1]}function ES(e){return[[e[0],e[1]],[e[2],e[3]]]}function AS(e){var t=TS(e,[0,0]);return[e[0]/t,e[1]/t]}function TS(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function wS(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function CS(e,t){return t[0]>0?t[1]>0?90-180*Math.atan(t[1]/t[0])/Math.PI:90+180*Math.atan(-t[1]/t[0])/Math.PI:t[1]<0?90-180*Math.atan(t[1]/t[0])/Math.PI+180:270+180*Math.atan(t[1]/-t[0])/Math.PI}function kS(e){if(sb(e[0]))return e;if(sb(e[0][0]))throw new Error("当前数据不支持标注");if(sb(e[0][0][0])){var t=0,r=0,n=0;return e.forEach((function(e){e.forEach((function(e){t+=e[0],r+=e[1],n++}))})),[t/n,r/n,0]}throw new Error("当前数据不支持标注")}function MS(e){for(var t=e[0],r=e[1],n=e[0],i=e[1],a=0,o=0,s=0,u=0;u<e.length;u+=2){var c=e[u],l=e[u+1];c&&l&&(t=Math.max(c,t),r=Math.max(l,r),n=Math.min(c,n),i=Math.min(l,i),a+=c,o+=l,s++)}return{center:[a/s,o/s],radius:Math.sqrt(Math.pow(t-n,2)+Math.pow(r-i,2))/2}}function PS(e){return ob(function(e,t){void 0===t&&(t={});var r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}([rb(e)]))}function IS(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}var OS=function(e){return e["GAODE1.x"]="GAODE1.x",e["GAODE2.x"]="GAODE2.x",e.MAPBOX="MAPBOX",e.DEFAULT="DEFAUlTMAP",e.SIMPLE="SIMPLE",e.GLOBEL="GLOBEL",e}({});function RS(e,t,r,n,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:30,o=arguments.length>6?arguments[6]:void 0,s=r;return o&&(s=Math.round(r*(a-1))/(a-1)),DS(e,t,s,n||.314,i)}function LS(e,t){var r=1-t;return(e[0]*r+e[1]*t)*r+(e[1]*r+e[2]*t)*t}function NS(e,t,r){var n,i,a=[t[0]-e[0],t[1]-e[1]],o=(n=a,i=[0,0],Math.sqrt(Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2))),s=Math.atan2(a[1],a[0]),u=o/2/Math.cos(r),c=s+r;return[u*Math.cos(c)+e[0],u*Math.sin(c)+e[1]]}function DS(e,t,r,n,i){if(i===OS["GAODE2.x"]){var a=yS(e[0],e[1]),o=yS(t[0],t[1]),s=NS(a,o,n),u=[a[0],s[0],o[0]],c=[a[1],s[1],o[1]];return[].concat(T(_S(LS(u,r),LS(c,r))),[0])}var l=NS(e,t,n),h=[e[0],l[0],t[0]],f=[e[1],l[1],t[1]];return[LS(h,r),LS(f,r),0]}function FS(e,t,r,n,i){var a=arguments.length>6?arguments[6]:void 0,o=r;return a&&(o=Math.round(29*r)/29),BS(e,t,o,i)}function zS(e,t){var r=1-t;return(e[0]*r+e[1]*t)*r+(e[1]*r+e[2]*t)*t}function BS(e,t,r,n){var i=[ib(e[0]),ib(e[1])],a=[ib(t[0]),ib(t[1])];if("GAODE2.x"===n){var o=function(e,t){var r=[t[0]-e[0],t[1]-e[1]],n=TS(r,[0,0]),i=Math.atan2(r[1],r[0]),a=n/2/Math.cos(.314),o=i+.314;return[a*Math.cos(o)+e[0],a*Math.sin(o)+e[1]]}(i,a),s=[i[0],o[0],a[0]],u=[i[1],o[1],a[1]];return[zS(s,r),zS(u,r),0]}var c=function(e,t){var r=[e[0]-t[0],e[1]-t[1]],n=[Math.sin(r[0]/2),Math.sin(r[1]/2)],i=n[1]*n[1]+Math.cos(e[1])*Math.cos(t[1])*n[0]*n[0];return 2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))}(i,a);if(Math.abs(c-Math.PI)<.001)return[(1-r)*i[0]+r*a[0],(1-r)*i[1]+r*a[1]];var l=Math.sin((1-r)*c)/Math.sin(c),h=Math.sin(r*c)/Math.sin(c),f=[Math.sin(i[0]),Math.sin(i[1])],p=[Math.cos(i[0]),Math.cos(i[1])],d=[Math.sin(a[0]),Math.sin(a[1])],v=[Math.cos(a[0]),Math.cos(a[1])],g=l*p[1]*p[0]+h*v[1]*v[0],m=l*p[1]*f[0]+h*v[1]*d[0],y=l*f[1]+h*d[1];return[nb(Math.atan2(m,g)),nb(Math.atan2(y,Math.sqrt(g*g+m*m)))]}function US(e,t,r){return[e[0]*r+t[0]*(1-r),e[1]*r+t[1]*(1-r)]}function jS(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function VS(e,t){var r=t.featureId,i=e.data.dataArray;return"number"==typeof r&&(i=i.filter((function(e){return e.id===r}))),i.map((function(e){var r=function(e,t){var r=t.offset,n=t.shape,i=t.thetaOffset,a=t.mapVersion,o=t.segmentNumber,s=void 0===o?30:o,u=t.autoFit,c=void 0===u||u,l=e.coordinates;if("line"===n)return function(e,t){for(var r=0,n=[],i=0;i<e.length-1;i++){var a=e[i],o=e[i+1],s=jS(a,o),u=r;r+=s,n.push({p1:a,p2:o,totalDistance:r,distance:s,lastTotalDistance:u})}for(var c,l,h=r*t,f=0,p=n;f<p.length;f++){var d=p[f];if(d.totalDistance>h){var v=d.p1,g=US(d.p2,v,(h-d.lastTotalDistance)/d.distance);c=g[0],l=g[1];break}}return{lng:c,lat:l,height:0}}(l,r);var h,f=l[0],p=l[1],d="string"==typeof i?e[i]||0:i;switch(n){case"arc":h=RS;break;case"greatcircle":h=FS;break;default:h=RS}var v=A(h(f,p,r,d,a,s,c),3),g=v[0],m=v[1],y=v[2];return{lng:g,lat:m,height:y}}(e,t);return n(n({},e),r)}))}var GS=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,r=arguments.length>1?arguments[1]:void 0;u(this,e),h(this,"limit",void 0),h(this,"cache",void 0),h(this,"destroy",void 0),h(this,"order",void 0),this.limit=t,this.destroy=r||this.defaultDestroy,this.order=[],this.clear()}return l(e,[{key:"clear",value:function(){var e=this;this.order.forEach((function(t){e.delete(t)})),this.cache={},this.order=[]}},{key:"get",value:function(e){var t=this.cache[e];return t&&(this.deleteOrder(e),this.appendOrder(e)),t}},{key:"set",value:function(e,t){this.cache[e]?(this.delete(e),this.cache[e]=t,this.appendOrder(e)):(Object.keys(this.cache).length===this.limit&&this.delete(this.order[0]),this.cache[e]=t,this.appendOrder(e))}},{key:"delete",value:function(e){var t=this.cache[e];t&&(this.deleteCache(e),this.deleteOrder(e),this.destroy(t,e))}},{key:"deleteCache",value:function(e){delete this.cache[e]}},{key:"deleteOrder",value:function(e){var t=this.order.findIndex((function(t){return t===e}));t>=0&&this.order.splice(t,1)}},{key:"appendOrder",value:function(e){this.order.push(e)}},{key:"defaultDestroy",value:function(e,t){return null}}]),e}(),HS=[],WS=qe(HS.sort),YS=qe(HS.push),XS=Fe((function(){HS.sort(void 0)})),ZS=Fe((function(){HS.sort(null)})),qS=ss("sort"),KS=!Fe((function(){if(bt)return bt<70;if(!(Qf&&Qf>3)){if($f)return!0;if(ep)return ep<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)HS.push({k:t+n,v:r})}for(HS.sort((function(e,t){return t.v-e.v})),n=0;n<HS.length;n++)t=HS[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function QS(e){if(0===e.length)throw new Error("max requires at least one data point");for(var t=e[0],r=1;r<e.length;r++)e[r]>t&&(t=e[r]);return 1*t}function $S(e){if(0===e.length)throw new Error("min requires at least one data point");for(var t=e[0],r=1;r<e.length;r++)e[r]<t&&(t=e[r]);return 1*t}function JS(e){if(0===e.length)return 0;for(var t=1*e[0],r=1;r<e.length;r++)t+=1*e[r];return t}function eE(e){if(0===e.length)throw new Error("mean requires at least one data point");return JS(e)/e.length}function tE(e){if(0===e.length)throw new Error("mean requires at least one data point");if(e.length<3)return e[0];e.sort();for(var t=e[0],r=NaN,n=0,i=1,a=1;a<e.length+1;a++)e[a]!==t?(i>n&&(n=i,r=t),i=1,t=e[a]):i++;return 1*r}hn({target:"Array",proto:!0,forced:XS||!ZS||!qS||!KS},{sort:function(e){void 0!==e&&Mt(e);var t=Ft(this);if(KS)return void 0===e?WS(t):WS(t,e);var r,n,i=[],a=Gr(t);for(n=0;n<a;n++)n in t&&YS(i,t[n]);for(qf(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:bn(t)>bn(r)?1:-1}}(e)),r=Gr(i),n=0;n<r;)t[n]=i[n++];for(;n<a;)Ph(t,n++);return t}});var rE={min:$S,max:QS,mean:eE,sum:JS,mode:tE};function nE(e,t){return e.map((function(e){return e[t]}))}function iE(e,t){return rE[e](t)}var aE=Object.freeze({__proto__:null,sum:JS,max:QS,min:$S,mean:eE,mode:tE,statMap:rE,getColumn:nE,getSatByColumn:iE}),oE=Wr.includes,sE=Fe((function(){return!Array(1).includes()}));hn({target:"Array",proto:!0,forced:sE},{includes:function(e){return oE(this,e,arguments.length>1?arguments[1]:void 0)}}),Na("includes");var uE=TypeError,cE=function(e){if(ny(e))throw new uE("The method doesn't accept regular expressions");return e},lE=Xt("match"),hE=qe("".indexOf);function fE(e,t){void 0===t&&(t={});var r=Number(e[0]),n=Number(e[1]),i=Number(e[2]),a=Number(e[3]);if(6===e.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var o=[r,n];return tb([[o,[i,n],[i,a],[r,a],o]],t.properties,{bbox:e,id:t.id})}hn({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[lE]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~hE(bn(it(this)),bn(cE(e)),arguments.length>1?arguments[1]:void 0)}});var pE,dE=function(e){return e.Realtime="realtime",e.Overlap="overlap",e.Replace="replace",e}({}),vE=function(e){return e.Loading="Loading",e.Loaded="Loaded",e.Failure="Failure",e.Cancelled="Cancelled",e}({});function gE(e){for(;e;){if(e.isLoaded)return e.properties.state|=2,!0;e=e.parent}return!1}function mE(e){e.children.forEach((function(e){e.isLoaded?e.properties.state|=2:mE(e)}))}var yE=[-1/0,-1/0,1/0,1/0],_E=(h(pE={},dE.Realtime,(function(e){e.forEach((function(e){e.isCurrent&&(e.isVisible=e.isLoaded)}))})),h(pE,dE.Overlap,(function(e){e.forEach((function(e){e.properties.state=0})),e.forEach((function(e){e.isCurrent&&!gE(e)&&mE(e)})),e.forEach((function(e){e.isVisible=Boolean(2&e.properties.state)}))})),h(pE,dE.Replace,(function(e){e.forEach((function(e){e.properties.state=0})),e.forEach((function(e){e.isCurrent&&gE(e)})),e.slice().sort((function(e,t){return e.z-t.z})).forEach((function(e){e.isVisible=Boolean(2&e.properties.state),e.children.length&&(e.isVisible||1&e.properties.state)?e.children.forEach((function(e){e.properties.state=1})):e.isCurrent&&mE(e)}))})),pE),bE=function(){};function xE(e,t,r){return[Math.floor((e+180)/360*Math.pow(2,r)),Math.floor((1-Math.log(Math.tan(t*Math.PI/180)+1/Math.cos(t*Math.PI/180))/Math.PI)/2*Math.pow(2,r))]}var SE=function(e,t,r,n){if(!n)return[];var i=A(sS(e,t,r,n),2),a=i[0],o=i[1],s=A(sS(e+1,t+1,r,n),2),u=s[0];return[a,s[1],u,o]};function EE(e){var t=e.zoom,r=e.latLonBounds,n=e.maxZoom,i=void 0===n?1/0:n,a=e.minZoom,o=void 0===a?0:a,s=e.zoomOffset,u=void 0===s?0:s,c=e.extent,l=void 0===c?yE:c,h=e.map,f=Math.ceil(t)+u;if(Number.isFinite(o)&&f<o)return[];Number.isFinite(i)&&f>i&&(f=i);for(var p=A(r,4),d=p[0],v=p[1],g=p[2],m=p[3],y=[Math.max(d,l[0]),Math.max(v,l[1]),Math.min(g,l[2]),Math.min(m,l[3])],_=[],b=A(oS([y[0],y[1]],f,h),2),x=b[0],S=b[1],E=A(oS([y[2],y[3]],f,h),2),T=E[0],w=E[1],C=x;C<=T;C++)for(var k=w;k<=S;k++)_.push({x:C,y:k,z:f});var M=(T+x)/2,P=(S+w)/2,I=function(e,t){return Math.abs(e-M)+Math.abs(t-P)};return _.sort((function(e,t){return I(e.x,e.y)-I(t.x,t.y)})),_}var AE=function(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=Math.pow(2,r),a=i-1,o=e;return n&&(o<0?o+=i:o>a&&(o%=i)),{warpX:o,warpY:t}},TE=function(e){f(n,e);var t,r=x(n);function n(e){var t;u(this,n),h(_(t=r.call(this)),"x",void 0),h(_(t),"y",void 0),h(_(t),"z",void 0),h(_(t),"version",void 0),h(_(t),"warp",void 0),h(_(t),"tileSize",256),h(_(t),"isVisible",!1),h(_(t),"isCurrent",!1),h(_(t),"isVisibleChange",!1),h(_(t),"loadedLayers",0),h(_(t),"isLayerLoaded",!1),h(_(t),"isLoad",!1),h(_(t),"isChildLoad",!1),h(_(t),"parent",null),h(_(t),"children",[]),h(_(t),"data",null),h(_(t),"properties",{}),h(_(t),"xhrCancel",void 0),h(_(t),"loadStatus",void 0),h(_(t),"abortController",void 0),h(_(t),"loadDataId",0);var i=e.x,a=e.y,o=e.z,s=e.tileSize,c=e.warp,l=void 0===c||c,f=e.map;return t.x=i,t.y=a,t.z=o,t.warp=l||!0,t.tileSize=s,t.map=f,t}return l(n,[{key:"isLoading",get:function(){return this.loadStatus===vE.Loading}},{key:"isLoaded",get:function(){return this.loadStatus===vE.Loaded}},{key:"isFailure",get:function(){return this.loadStatus===vE.Failure}},{key:"setTileLayerLoaded",value:function(){this.isLayerLoaded=!0}},{key:"isCancelled",get:function(){return this.loadStatus===vE.Cancelled}},{key:"isDone",get:function(){return[vE.Loaded,vE.Cancelled,vE.Failure].includes(this.loadStatus)}},{key:"bounds",get:function(){return SE(this.x,this.y,this.z,this.map)}},{key:"bboxPolygon",get:function(){var e=A(this.bounds,4),t=e[0],r=e[1],n=[(e[2]-t)/2,(e[3]-r)/2];return fE(this.bounds,{properties:{key:this.key,id:this.key,bbox:this.bounds,center:n,meta:"\n      ".concat(this.key,"\n      ")}})}},{key:"key",get:function(){return"".concat(this.x,"_").concat(this.y,"_").concat(this.z)}},{key:"layerLoad",value:function(){this.loadedLayers++,this.emit("layerLoaded")}},{key:"loadData",value:(t=s(i().mark((function e(t){var r,n,a,o,s,u,c,l,h,f,p,d,v,g,m,y,_,b;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.getData,n=t.onLoad,a=t.onError,o=t.version,this.loadDataId++,s=this.loadDataId,this.isLoading&&this.abortLoad(),this.version=o,this.abortController=new AbortController,this.loadStatus=vE.Loading,u=null,e.prev=8,l=this.x,h=this.y,f=this.z,p=this.bounds,d=this.tileSize,v=this.warp,g=AE(l,h,f,v),m=g.warpX,y=g.warpY,_=this.abortController.signal,b={x:m,y:y,z:f,bounds:p,tileSize:d,signal:_,warp:v},e.next=15,r(b,this);case 15:u=e.sent,e.next=21;break;case 18:e.prev=18,e.t0=e.catch(8),c=e.t0;case 21:if(s===this.loadDataId){e.next=23;break}return e.abrupt("return");case 23:if(!this.isCancelled||u){e.next=25;break}return e.abrupt("return");case 25:if(!c&&u){e.next=29;break}return this.loadStatus=vE.Failure,a(c,this),e.abrupt("return");case 29:this.loadStatus=vE.Loaded,this.data=u,n(this);case 32:case"end":return e.stop()}}),e,this,[[8,18]])}))),function(e){return t.apply(this,arguments)})},{key:"reloadData",value:function(e){this.isLoading&&this.abortLoad(),this.loadData(e)}},{key:"abortLoad",value:function(){this.isLoaded||this.isCancelled||(this.loadStatus=vE.Cancelled,this.abortController.abort(),this.xhrCancel&&this.xhrCancel())}}]),n}(F),wE=function(){return im.Date.now()},CE=/\s/;var kE=function(e){for(var t=e.length;t--&&CE.test(e.charAt(t)););return t},ME=/^\s+/;var PE=function(e){return e?e.slice(0,kE(e)+1).replace(ME,""):e};var IE=function(e){return null!=e&&"object"==typeof e};var OE=function(e){return"symbol"==typeof e||IE(e)&&"[object Symbol]"==dm(e)},RE=/^[-+]0x[0-9a-f]+$/i,LE=/^0b[01]+$/i,NE=/^0o[0-7]+$/i,DE=parseInt;var FE=function(e){if("number"==typeof e)return e;if(OE(e))return NaN;if(vm(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=vm(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=PE(e);var r=LE.test(e);return r||NE.test(e)?DE(e.slice(2),r?2:8):RE.test(e)?NaN:+e},zE=Math.max,BE=Math.min;var UE=function(e,t,r){var n,i,a,o,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var r=n,a=i;return n=i=void 0,c=t,o=e.apply(a,r)}function d(e){return c=e,s=setTimeout(g,t),l?p(e):o}function v(e){var r=e-u;return void 0===u||r>=t||r<0||h&&e-c>=a}function g(){var e=wE();if(v(e))return m(e);s=setTimeout(g,function(e){var r=t-(e-u);return h?BE(r,a-(e-c)):r}(e))}function m(e){return s=void 0,f&&n?p(e):(n=i=void 0,o)}function y(){var e=wE(),r=v(e);if(n=arguments,i=this,u=e,r){if(void 0===s)return d(u);if(h)return clearTimeout(s),s=setTimeout(g,t),p(u)}return void 0===s&&(s=setTimeout(g,t)),o}return t=FE(t)||0,vm(r)&&(l=!!r.leading,a=(h="maxWait"in r)?zE(FE(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=u=i=s=void 0},y.flush=function(){return void 0===s?o:m(wE())},y};var jE=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return vm(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),UE(e,t,{leading:n,maxWait:t,trailing:i})},VE=function(e,t,r,n){try{return n?t(sr(r)[0],r[1]):t(r)}catch(t){Eo(e,"throw",t)}},GE=Array,HE=function(e){var t=Ft(e),r=ri(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=Yn(i,n>2?arguments[2]:void 0));var o,s,u,c,l,h,f=bo(t),p=0;if(!f||this===GE&&yo(f))for(o=Gr(t),s=r?new this(o):GE(o);o>p;p++)h=a?i(t[p],p):t[p],Pn(s,p,h);else for(l=(c=So(t,f)).next,s=r?new this:[];!(u=je(l,c)).done;p++)h=a?VE(c,i,[u.value,p],!0):u.value,Pn(s,p,h);return s.length=p,s},WE=!Lo((function(e){Array.from(e)}));hn({target:"Array",stat:!0,forced:WE},{from:HE});var YE=function(e){return e.TilesLoadStart="tiles-load-start",e.TileLoaded="tile-loaded",e.TileError="tile-error",e.TileUnload="tile-unload",e.TileUpdate="tile-update",e.TilesLoadFinished="tiles-load-finished",e}({}),XE=function(e){f(r,e);var t=x(r);function r(e){var n;return u(this,r),h(_(n=t.call(this)),"currentZoom",void 0),h(_(n),"currentTiles",[]),h(_(n),"options",void 0),h(_(n),"cacheTiles",new Map),h(_(n),"lastViewStates",void 0),h(_(n),"map",void 0),h(_(n),"throttleUpdate",jE((function(e,t){n.update(e,t)}),16)),h(_(n),"onTileLoad",(function(e){n.emit(YE.TileLoaded,e),n.updateTileVisible(),n.loadFinished()})),h(_(n),"onTileError",(function(e,t){n.emit(YE.TileError,{error:e,tile:t}),n.updateTileVisible(),n.loadFinished()})),h(_(n),"onTileUnload",(function(e){n.emit(YE.TileUnload,e),n.loadFinished()})),n.options={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0,extent:yE,getTileData:bE,warp:!0,updateStrategy:dE.Overlap},n.updateOptions(e),n}return l(r,[{key:"isLoaded",get:function(){return this.currentTiles.every((function(e){return e.isDone}))}},{key:"tiles",get:function(){return Array.from(this.cacheTiles.values()).sort((function(e,t){return e.z-t.z}))}},{key:"updateOptions",value:function(e){var t=void 0===e.minZoom?this.options.minZoom:Math.ceil(e.minZoom),r=void 0===e.maxZoom?this.options.maxZoom:Math.floor(e.maxZoom);this.options=n(n(n({},this.options),e),{},{minZoom:t,maxZoom:r})}},{key:"update",value:function(e,t,r,n){var i=this,a=Math.max(0,Math.ceil(e));if(r&&(this.map=r,this.version=n),!this.lastViewStates||this.lastViewStates.zoom!==a||!function(e,t){return SS(ES(e),ES(t))}(this.lastViewStates.latLonBoundsBuffer,t)){var o=function(e,t){var r=xS(ES(e),t);return[Math.max(r[0][0],-900),Math.max(r[0][1],-85.0511287798065),Math.min(r[1][0],900),Math.min(r[1][1],85.0511287798065)]}(t,.2);this.lastViewStates={zoom:a,latLonBounds:t,latLonBoundsBuffer:o},this.currentZoom=a;var s=!1,u=this.getTileIndices(a,o).filter((function(e){return i.options.warp||e.x>=0&&e.x<Math.pow(2,a)}));this.emit(YE.TilesLoadStart),this.currentTiles=u.map((function(e){var t,r,n=e.x,a=e.y,o=e.z,u=i.getTile(n,a,o);return u?(((null===(t=u)||void 0===t?void 0:t.isFailure)||(null===(r=u)||void 0===r?void 0:r.isCancelled))&&u.loadData({getData:i.options.getTileData,onLoad:i.onTileLoad,onError:i.onTileError,version:i.version}),u):(u=i.createTile(n,a,o),s=!0,u)})),s&&this.resizeCacheTiles(),this.updateTileVisible(),this.pruneRequests()}}},{key:"reloadAll",value:function(){var e,t=k(this.cacheTiles);try{for(t.s();!(e=t.n()).done;){var r=A(e.value,2),n=r[0],i=r[1];if(!this.currentTiles.includes(i))return this.cacheTiles.delete(n),void this.onTileUnload(i);this.onTileUnload(i),i.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError,version:this.version})}}catch(e){t.e(e)}finally{t.f()}}},{key:"reloadTileById",value:function(e,t,r){var n=this.cacheTiles.get("".concat(t,",").concat(r,",").concat(e));n&&(this.onTileUnload(n),n.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError,version:this.version}))}},{key:"reloadTileByLnglat",value:function(e,t,r){var n=this.getTileByLngLat(e,t,r);n&&this.reloadTileById(n.z,n.x,n.y)}},{key:"reloadTileByExtent",value:function(e,t){var r=this;this.getTileIndices(t,e).forEach((function(e){r.reloadTileById(e.z,e.x,e.y)}))}},{key:"pruneRequests",value:function(){var e,t=[],r=k(this.cacheTiles.values());try{for(r.s();!(e=r.n()).done;){var n=e.value;n.isLoading&&(n.isCurrent||n.isVisible||t.push(n))}}catch(e){r.e(e)}finally{r.f()}for(;t.length>0;){t.shift().abortLoad()}}},{key:"getTileByLngLat",value:function(e,t,r){var n=this.options.zoomOffset,i=Math.ceil(r)+n,a=xE(e,t,i);return this.tiles.filter((function(e){return e.key==="".concat(a[0],"_").concat(a[1],"_").concat(i)}))[0]}},{key:"getTileExtent",value:function(e,t){return this.getTileIndices(t,e)}},{key:"getTileByZXY",value:function(e,t,r){return this.tiles.filter((function(n){return n.key==="".concat(t,"_").concat(r,"_").concat(e)}))[0]}},{key:"clear",value:function(){var e,t=k(this.cacheTiles.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;r.isLoading?r.abortLoad():this.onTileUnload(r)}}catch(e){t.e(e)}finally{t.f()}this.lastViewStates=void 0,this.cacheTiles.clear(),this.currentTiles=[]}},{key:"destroy",value:function(){this.clear(),this.removeAllListeners()}},{key:"updateTileVisible",value:function(){var e,t=this.options.updateStrategy,r=new Map,n=k(this.cacheTiles.values());try{for(n.s();!(e=n.n()).done;){var i=e.value;r.set(i.key,i.isVisible),i.isCurrent=!1,i.isVisible=!1}}catch(e){n.e(e)}finally{n.f()}var a,o=k(this.currentTiles);try{for(o.s();!(a=o.n()).done;){var s=a.value;s.isCurrent=!0,s.isVisible=!0}}catch(e){o.e(e)}finally{o.f()}var u=Array.from(this.cacheTiles.values());"function"==typeof t?t(u):_E[t](u);var c=!1;Array.from(this.cacheTiles.values()).forEach((function(e){e.isVisible!==r.get(e.key)?(e.isVisibleChange=!0,c=!0):e.isVisibleChange=!1})),c&&this.emit(YE.TileUpdate)}},{key:"getTileIndices",value:function(e,t){var r=this.options,n=r.tileSize,i=r.extent,a=r.zoomOffset;return EE({maxZoom:Math.floor(this.options.maxZoom),minZoom:Math.ceil(this.options.minZoom),zoomOffset:a,tileSize:n,zoom:e,latLonBounds:t,extent:i,map:this.map})}},{key:"getTileId",value:function(e,t,r){return"".concat(e,",").concat(t,",").concat(r)}},{key:"loadFinished",value:function(){var e=!this.currentTiles.some((function(e){return!e.isDone}));return e&&this.emit(YE.TilesLoadFinished),e}},{key:"getTile",value:function(e,t,r){var n=this.getTileId(e,t,r);return this.cacheTiles.get(n)}},{key:"createTile",value:function(e,t,r){var n=this.getTileId(e,t,r),i=new TE({x:e,y:t,z:r,tileSize:this.options.tileSize,warp:this.options.warp,map:this.map});return this.cacheTiles.set(n,i),i.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError,version:this.version}),i}},{key:"resizeCacheTiles",value:function(){var e=5*this.currentTiles.length;if(this.cacheTiles.size>e){var t,r=k(this.cacheTiles);try{for(r.s();!(t=r.n()).done;){var n=A(t.value,2),i=n[0],a=n[1];if(a.isVisible||this.currentTiles.includes(a)||(this.cacheTiles.delete(i),this.onTileUnload(a)),this.cacheTiles.size<=e)break}}catch(e){r.e(e)}finally{r.f()}}this.rebuildTileTree()}},{key:"rebuildTileTree",value:function(){var e,t=k(this.cacheTiles.values());try{for(t.s();!(e=t.n()).done;){var r=e.value;r.parent=null,r.children.length=0}}catch(e){t.e(e)}finally{t.f()}var n,i=k(this.cacheTiles.values());try{for(i.s();!(n=i.n()).done;){var a=n.value,o=this.getNearestAncestor(a.x,a.y,a.z);a.parent=o,null!=o&&o.children&&o.children.push(a)}}catch(e){i.e(e)}finally{i.f()}}},{key:"getNearestAncestor",value:function(e,t,r){for(;r>this.options.minZoom;){e=Math.floor(e/2),t=Math.floor(t/2),r-=1;var n=this.getTile(e,t,r);if(n)return n}return null}}]),r}(D);function ZE(e){var t=[],r=/\{([a-z])-([a-z])\}/.exec(e);if(r){var n,i=r[1].charCodeAt(0),a=r[2].charCodeAt(0);for(n=i;n<=a;++n)t.push(e.replace(r[0],String.fromCharCode(n)));return t}if(r=/\{(\d+)-(\d+)\}/.exec(e)){for(var o=parseInt(r[2],10),s=parseInt(r[1],10);s<=o;s++)t.push(e.replace(r[0],s.toString()));return t}return t.push(e),t}function qE(e,t){if(!e||!e.length)throw new Error("url is not allowed to be empty");var r=t.x,n=t.y,i=t.z,a=ZE(e);return a[Math.abs(r+n)%a.length].replace(/\{x\}/g,r.toString()).replace(/\{y\}/g,n.toString()).replace(/\{z\}/g,i.toString()).replace(/\{bbox\}/g,SE(r,n,i).join(",")).replace(/\{-y\}/g,(Math.pow(2,i)-n-1).toString())}function KE(e,t){var r=t.x,n=t.y,i=t.z,a=t.layer,o=t.version,s=void 0===o?"1.0.0":o,u=t.style,c=void 0===u?"default":u,l=t.format,h=t.service,f=void 0===h?"WMTS":h,p=t.tileMatrixset;return"".concat(e,"&SERVICE=").concat(f,"&REQUEST=GetTile&VERSION=").concat(s,"&LAYER=").concat(a,"&STYLE=").concat(c,"&TILEMATRIXSET=").concat(p,"&FORMAT=").concat(l,"&TILECOL=").concat(r,"&TILEROW=").concat(n,"&TILEMATRIX=").concat(i)}function QE(e,t){if(!e)throw new Error(t||"web worker helper assertion failed.")}var $E="undefined"!=typeof window&&void 0!==window.orientation,JE=function(){function e(e,t){var r=this;this.name=e,this.workerThread=t,this.isRunning=!0,this.resolve=function(){},this.reject=function(){},this.result=new Promise((function(e,t){r.resolve=e,r.reject=t}))}return e.prototype.postMessage=function(e,t){this.workerThread.postMessage({source:"Main thread",type:e,payload:t})},e.prototype.done=function(e){QE(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.resolve(e)},e.prototype.error=function(e){QE(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.reject(e)},e}(),eA=new Map;function tA(e){QE(e.source&&!e.url||!e.source&&e.url);var t=eA.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return rA((t=e,"try {\n  importScripts('"+t+"');\n} catch (error) {\n  console.error(error);\n  throw error;\n}"));var t}(e.url),eA.set(e.url,t)),e.source&&(t=rA(e.source),eA.set(e.source,t))),QE(t),t}function rA(e){var t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function nA(e,t,r){void 0===t&&(t=!0);var n=r||new Set;if(e){if(iA(e))n.add(e);else if(iA(e.buffer))n.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"==typeof e)for(var i in e)nA(e[i],t,n)}else;return void 0===r?Array.from(n):[]}function iA(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}var aA=function(){},oA=function(){function e(e){this.terminated=!1,this.loadableURL="";var t=e.name,r=e.source,n=e.url;QE(r||n),this.name=t,this.source=r,this.url=n,this.onMessage=aA,this.onError=function(e){return console.log(e)},this.worker=this.createBrowserWorker()}return e.isSupported=function(){return"undefined"!=typeof Worker},e.prototype.destroy=function(){this.onMessage=aA,this.onError=aA,this.worker.terminate(),this.terminated=!0},Object.defineProperty(e.prototype,"isRunning",{get:function(){return Boolean(this.onMessage)},enumerable:!1,configurable:!0}),e.prototype.postMessage=function(e,t){t=t||nA(e),this.worker.postMessage(e,t)},e.prototype.getErrorFromErrorEvent=function(e){var t="Failed to load ";return t+="worker "+this.name+" from "+this.url+". ",e.message&&(t+=e.message+" in "),e.lineno&&(t+=":"+e.lineno+":"+e.colno),new Error(t)},e.prototype.createBrowserWorker=function(){var e=this;this.loadableURL=tA({source:this.source,url:this.url});var t=new Worker(this.loadableURL,{name:this.name});return t.onmessage=function(t){t.data?e.onMessage(t.data):e.onError(new Error("No data received"))},t.onerror=function(t){e.onError(e.getErrorFromErrorEvent(t)),e.terminated=!0},t.onmessageerror=function(t){return console.error("worker "+e.name+", message error: "+t)},t},e}(),sA=function(){return(sA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},uA=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},cA=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},lA=function(){function e(e){this.name="unnamed",this.maxConcurrency=1,this.maxMobileConcurrency=1,this.onDebug=function(){},this.reuseWorkers=!0,this.props={},this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1,this.source=e.source,this.url=e.url,this.setProps(e)}return e.prototype.destroy=function(){this.idleQueue.forEach((function(e){return e.destroy()})),this.isDestroyed=!0},e.prototype.setProps=function(e){this.props=sA(sA({},this.props),e),void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)},e.prototype.startJob=function(e,t,r){return void 0===t&&(t=function(e,t,r){return e.done(r)}),void 0===r&&(r=function(e,t){return e.error(t)}),uA(this,void 0,void 0,(function(){var n,i=this;return cA(this,(function(a){switch(a.label){case 0:return n=new Promise((function(n){return i.jobQueue.push({name:e,onMessage:t,onError:r,onStart:n}),i})),this.startQueuedJob(),[4,n];case 1:return[2,a.sent()]}}))}))},e.prototype.startQueuedJob=function(){return uA(this,void 0,void 0,(function(){var e,t,r;return cA(this,(function(n){switch(n.label){case 0:if(!this.jobQueue.length)return[2];if(!(e=this.getAvailableWorker()))return[2];if(!(t=this.jobQueue.shift()))return[3,4];this.onDebug({message:"Starting job",name:t.name,backlog:this.jobQueue.length,workerThread:e}),r=new JE(t.name,e),e.onMessage=function(e){return t.onMessage(r,e.type,e.payload)},e.onError=function(e){return t.onError(r,e)},t.onStart(r),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,r.result];case 2:return n.sent(),[3,4];case 3:return this.returnWorkerToQueue(e),[7];case 4:return[2]}}))}))},e.prototype.returnWorkerToQueue=function(e){this.isDestroyed||!this.reuseWorkers||this.count>this.getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this.startQueuedJob()},e.prototype.getAvailableWorker=function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this.getMaxConcurrency()){this.count++;var e=this.name.toLowerCase()+" (#"+this.count+" of "+this.maxConcurrency+")";return new oA({name:e,source:this.source,url:this.url})}return null},e.prototype.getMaxConcurrency=function(){return $E?this.maxMobileConcurrency:this.maxConcurrency},e}(),hA=function(){return(hA=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},fA=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},pA={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},dA=function(){function e(e){this.workerPools=new Map,this.props=hA({},pA),this.setProps(e),this.workerPools=new Map}return e.isSupported=function(){return oA.isSupported()},e.getWorkerFarm=function(t){return void 0===t&&(t={}),e.workerFarm=e.workerFarm||new e({}),e.workerFarm.setProps(t),e.workerFarm},e.prototype.destroy=function(){var e,t;try{for(var r=fA(this.workerPools.values()),n=r.next();!n.done;n=r.next()){n.value.destroy()}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},e.prototype.setProps=function(e){var t,r;this.props=hA(hA({},this.props),e);try{for(var n=fA(this.workerPools.values()),i=n.next();!i.done;i=n.next()){i.value.setProps(this.getWorkerPoolProps())}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},e.prototype.getWorkerPool=function(e){var t=e.name,r=e.source,n=e.url,i=this.workerPools.get(t);return i||((i=new lA({name:t,source:r,url:n})).setProps(this.getWorkerPoolProps()),this.workerPools.set(t,i)),i},e.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}},e}(),vA=new Map,gA=function(){function e(){}return Object.defineProperty(e,"onmessage",{set:function(e){self.onmessage=function(t){if(mA(t)){var r=t.data,n=r.type,i=r.payload;e(n,i)}}},enumerable:!1,configurable:!0}),e.addEventListener=function(e){var t=vA.get(e);t||(t=function(t){if(mA(t)){var r=t.data,n=r.type,i=r.payload;e(n,i)}}),self.addEventListener("message",t)},e.removeEventListener=function(e){var t=vA.get(e);vA.delete(e),self.removeEventListener("message",t)},e.postMessage=function(e,t){if(self){var r={source:"Worker thread",type:e,payload:t},n=nA(t);self.postMessage(r,n)}},e}();function mA(e){var t=e.type,r=e.data;return"message"===t&&r&&"string"==typeof r.source&&"Main thread"===r.source}var yA,_A,bA=function(){function e(){this._values=[],this._settlers=[],this._closed=!1}return e.prototype[Symbol.asyncIterator]=function(){return this},e.prototype.push=function(e){return this.enqueue(e)},e.prototype.enqueue=function(e){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var t=this._settlers.shift();e instanceof Error?t.reject(e):t.resolve({value:e})}else this._values.push(e)},e.prototype.close=function(){for(;this._settlers.length>0;){this._settlers.shift().resolve({done:!0})}this._closed=!0},e.prototype.next=function(){var e=this;if(this._values.length>0){var t=this._values.shift();return t instanceof Error?Promise.reject(t):Promise.resolve({done:!1,value:t})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((function(t,r){e._settlers.push({resolve:t,reject:r})}))},e}(),xA=function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))},SA=function(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},EA=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}},AA=0;function TA(e,t){return void 0===t&&(t={}),new Promise((function(r,n){var i=AA++,a=function(e,t){if(t.id===i)switch(e){case"done":gA.removeEventListener(a),r(t.result);break;case"error":gA.removeEventListener(a),n(t.error)}};gA.addEventListener(a);var o={id:i,input:e,options:t};gA.postMessage("process",o)}))}function wA(e){var t=e.color;return t&&t.length?t:[1,1,1,1]}function CA(e,t,r){return 2===r.length?[r[0],r[1],0]:[r[0],r[1],r[2]]}function kA(e){return e.filter?[1]:[0]}function MA(e,t){return[t]}var PA=OA,IA=OA;function OA(e,t,r){r=r||2;var n,i,a,o,s,u,c,l=t&&t.length,h=l?t[0]*r:e.length,f=RA(e,0,h,r,!0),p=[];if(!f||f.next===f.prev)return p;if(l&&(f=function(e,t,r,n){var i,a,o,s,u,c=[];for(i=0,a=t.length;i<a;i++)o=t[i]*n,s=i<a-1?t[i+1]*n:e.length,(u=RA(e,o,s,n,!1))===u.next&&(u.steiner=!0),c.push(HA(u));for(c.sort(UA),i=0;i<c.length;i++)r=jA(c[i],r);return r}(e,t,f,r)),e.length>80*r){n=a=e[0],i=o=e[1];for(var d=r;d<h;d+=r)(s=e[d])<n&&(n=s),(u=e[d+1])<i&&(i=u),s>a&&(a=s),u>o&&(o=u);c=0!==(c=Math.max(a-n,o-i))?32767/c:0}return NA(f,p,r,n,i,c,0),p}function RA(e,t,r,n,i){var a,o;if(i===nT(e,t,r,n)>0)for(a=t;a<r;a+=n)o=eT(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=eT(a,e[a],e[a+1],o);return o&&ZA(o,o.next)&&(tT(o),o=o.next),o}function LA(e,t){if(!e)return e;t||(t=e);var r,n=e;do{if(r=!1,n.steiner||!ZA(n,n.next)&&0!==XA(n.prev,n,n.next))n=n.next;else{if(tT(n),(n=t=n.prev)===n.next)break;r=!0}}while(r||n!==t);return t}function NA(e,t,r,n,i,a,o){if(e){!o&&a&&function(e,t,r,n){var i=e;do{0===i.z&&(i.z=GA(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,u,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ);t++);for(u=c;s>0||u>0&&n;)0!==s&&(0===u||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,u--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(e,n,i,a);for(var s,u,c=e;e.prev!==e.next;)if(s=e.prev,u=e.next,a?FA(e,n,i,a):DA(e))t.push(s.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),tT(e),e=u.next,c=u.next;else if((e=u)===c){o?1===o?NA(e=zA(LA(e),t,r),t,r,n,i,a,2):2===o&&BA(e,t,r,n,i,a):NA(LA(e),t,r,n,i,a,1);break}}}function DA(e){var t=e.prev,r=e,n=e.next;if(XA(t,r,n)>=0)return!1;for(var i=t.x,a=r.x,o=n.x,s=t.y,u=r.y,c=n.y,l=i<a?i<o?i:o:a<o?a:o,h=s<u?s<c?s:c:u<c?u:c,f=i>a?i>o?i:o:a>o?a:o,p=s>u?s>c?s:c:u>c?u:c,d=n.next;d!==t;){if(d.x>=l&&d.x<=f&&d.y>=h&&d.y<=p&&WA(i,s,a,u,o,c,d.x,d.y)&&XA(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function FA(e,t,r,n){var i=e.prev,a=e,o=e.next;if(XA(i,a,o)>=0)return!1;for(var s=i.x,u=a.x,c=o.x,l=i.y,h=a.y,f=o.y,p=s<u?s<c?s:c:u<c?u:c,d=l<h?l<f?l:f:h<f?h:f,v=s>u?s>c?s:c:u>c?u:c,g=l>h?l>f?l:f:h>f?h:f,m=GA(p,d,t,r,n),y=GA(v,g,t,r,n),_=e.prevZ,b=e.nextZ;_&&_.z>=m&&b&&b.z<=y;){if(_.x>=p&&_.x<=v&&_.y>=d&&_.y<=g&&_!==i&&_!==o&&WA(s,l,u,h,c,f,_.x,_.y)&&XA(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,b.x>=p&&b.x<=v&&b.y>=d&&b.y<=g&&b!==i&&b!==o&&WA(s,l,u,h,c,f,b.x,b.y)&&XA(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;_&&_.z>=m;){if(_.x>=p&&_.x<=v&&_.y>=d&&_.y<=g&&_!==i&&_!==o&&WA(s,l,u,h,c,f,_.x,_.y)&&XA(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;b&&b.z<=y;){if(b.x>=p&&b.x<=v&&b.y>=d&&b.y<=g&&b!==i&&b!==o&&WA(s,l,u,h,c,f,b.x,b.y)&&XA(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function zA(e,t,r){var n=e;do{var i=n.prev,a=n.next.next;!ZA(i,a)&&qA(i,n,n.next,a)&&$A(i,a)&&$A(a,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),tT(n),tT(n.next),n=e=a),n=n.next}while(n!==e);return LA(n)}function BA(e,t,r,n,i,a){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&YA(o,s)){var u=JA(o,s);return o=LA(o,o.next),u=LA(u,u.next),NA(o,t,r,n,i,a,0),void NA(u,t,r,n,i,a,0)}s=s.next}o=o.next}while(o!==e)}function UA(e,t){return e.x-t.x}function jA(e,t){var r=function(e,t){var r,n=t,i=e.x,a=e.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o&&(o=s,r=n.x<n.next.x?n:n.next,s===i))return r}n=n.next}while(n!==t);if(!r)return null;var u,c=r,l=r.x,h=r.y,f=1/0;n=r;do{i>=n.x&&n.x>=l&&i!==n.x&&WA(a<h?i:o,a,l,h,a<h?o:i,a,n.x,n.y)&&(u=Math.abs(a-n.y)/(i-n.x),$A(n,e)&&(u<f||u===f&&(n.x>r.x||n.x===r.x&&VA(r,n)))&&(r=n,f=u)),n=n.next}while(n!==c);return r}(e,t);if(!r)return t;var n=JA(r,e);return LA(n,n.next),LA(r,r.next)}function VA(e,t){return XA(e.prev,e,t.prev)<0&&XA(t.next,e,e.next)<0}function GA(e,t,r,n,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function HA(e){var t=e,r=e;do{(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next}while(t!==e);return r}function WA(e,t,r,n,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function YA(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&qA(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(e,t)&&($A(e,t)&&$A(t,e)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==e);return n}(e,t)&&(XA(e.prev,e,t.prev)||XA(e,t.prev,t))||ZA(e,t)&&XA(e.prev,e,e.next)>0&&XA(t.prev,t,t.next)>0)}function XA(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function ZA(e,t){return e.x===t.x&&e.y===t.y}function qA(e,t,r,n){var i=QA(XA(e,t,r)),a=QA(XA(e,t,n)),o=QA(XA(r,n,e)),s=QA(XA(r,n,t));return i!==a&&o!==s||(!(0!==i||!KA(e,r,t))||(!(0!==a||!KA(e,n,t))||(!(0!==o||!KA(r,e,n))||!(0!==s||!KA(r,t,n)))))}function KA(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function QA(e){return e>0?1:e<0?-1:0}function $A(e,t){return XA(e.prev,e,e.next)<0?XA(e,t,e.next)>=0&&XA(e,e.prev,t)>=0:XA(e,t,e.prev)<0||XA(e,e.next,t)<0}function JA(e,t){var r=new rT(e.i,e.x,e.y),n=new rT(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function eT(e,t,r,n){var i=new rT(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function tT(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function rT(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function nT(e,t,r,n){for(var i=0,a=t,o=r-n;a<r;a+=n)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}OA.deviation=function(e,t,r,n){var i=t&&t.length,a=i?t[0]*r:e.length,o=Math.abs(nT(e,0,a,r));if(i)for(var s=0,u=t.length;s<u;s++){var c=t[s]*r,l=s<u-1?t[s+1]*r:e.length;o-=Math.abs(nT(e,c,l,r))}var h=0;for(s=0;s<n.length;s+=3){var f=n[s]*r,p=n[s+1]*r,d=n[s+2]*r;h+=Math.abs((e[f]-e[d])*(e[p+1]-e[f+1])-(e[f]-e[p])*(e[d+1]-e[f+1]))}return 0===o&&0===h?0:Math.abs((h-o)/o)},OA.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var a=0;a<e[i].length;a++)for(var o=0;o<t;o++)r.vertices.push(e[i][a][o]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r},PA.default=IA;var iT=/"/g,aT=qe("".replace),oT=function(e,t,r,n){var i=bn(it(e)),a="<"+t;return""!==r&&(a+=" "+r+'="'+aT(bn(n),iT,"&quot;")+'"'),a+">"+i+"</"+t+">"},sT=function(e){return Fe((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))};function uT(){var e=new vb(4);return vb!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}function cT(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=Math.sin(r),u=Math.cos(r);return e[0]=n*u+a*s,e[1]=i*u+o*s,e[2]=n*-s+a*u,e[3]=i*-s+o*u,e}hn({target:"String",proto:!0,forced:sT("sub")},{sub:function(){return oT(this,"sub","","")}});var lT=Zb(),hT=(Zb(),Zb()),fT=Zb(),pT=Zb();function dT(e,t,r,n,i){return $b(e,r,n),tx(e,e),[i/rx(t=qb(-e[1],e[0]),qb(-r[1],r[0])),t]}function vT(e,t){return Qb(e,-t[1],t[0])}function gT(e,t,r){return ax(e,t,r),tx(e,e),e}function mT(e,t){return e[0]===t[0]&&e[1]===t[1]}var yT=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),h(this,"complex",void 0),h(this,"join",void 0),h(this,"cap",void 0),h(this,"miterLimit",void 0),h(this,"thickness",void 0),h(this,"normal",void 0),h(this,"lastFlip",-1),h(this,"miter",qb(0,0)),h(this,"started",!1),h(this,"dash",!1),h(this,"totalDistance",0),h(this,"currentIndex",0),this.join=t.join||"miter",this.cap=t.cap||"butt",this.miterLimit=t.miterLimit||10,this.thickness=t.thickness||1,this.dash=t.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return l(e,[{key:"extrude_gaode2",value:function(e,t){var r=this.complex;if(e.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=e.length,i=r.startIndex,a=1;a<n;a++){var o,s,u,c=e[a-1];c.push(null!==(o=t[a-1][2])&&void 0!==o?o:0);var l=t[a-1],h=e[a];h.push(null!==(s=t[a][2])&&void 0!==s?s:0);var f=t[a],p=a<e.length-1?[].concat(T(e[a+1]),[null!==(u=t[a+1][2])&&void 0!==u?u:0]):null,d=a<t.length-1?t[a+1]:null;i+=this.segment_gaode2(r,i,c,h,p,l,f,d)}if(this.dash)for(var v=0;v<r.positions.length/6;v++)r.positions[6*v+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"simpleExtrude_gaode2",value:function(e,t){var r=this.complex;if(e.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=e.length,i=r.startIndex,a=1;a<n;a++){var o,s,u,c=e[a-1];c.push(null!==(o=t[a-1][2])&&void 0!==o?o:0);var l=t[a-1],h=e[a];h.push(null!==(s=t[a][2])&&void 0!==s?s:0);var f=t[a],p=a<e.length-1?[].concat(T(e[a+1]),[null!==(u=t[a+1][2])&&void 0!==u?u:0]):null,d=a<t.length-1?t[a+1]:null;i+=this.simpleSegment(r,i,c,h,p,l,f,d)}if(this.dash)for(var v=0;v<r.positions.length/6;v++)r.positions[6*v+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"extrude",value:function(e){var t=this.complex;if(e.length<=1)return t;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=e.length,n=t.startIndex,i=1;i<r;i++){var a=e[i-1],o=e[i],s=i<e.length-1?e[i+1]:null;n+=this.segment(t,n,a,o,s)}if(this.dash)for(var u=0;u<t.positions.length/6;u++)t.positions[6*u+5]=this.totalDistance;return t.startIndex=t.positions.length/6,t}},{key:"simpleExtrude",value:function(e){var t=this.complex;if(e.length<=1)return t;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=e.length,n=t.startIndex,i=1;i<r;i++){var a=e[i-1],o=e[i],s=i<e.length-1?e[i+1]:null;n+=this.simpleSegment(t,n,a,o,s)}if(this.dash)for(var u=0;u<t.positions.length/6;u++)t.positions[6*u+5]=this.totalDistance;return t.startIndex=t.positions.length/6,t}},{key:"segment_gaode2",value:function(e,t,r,n,i,a,o,s){var u=0,c=e.indices,l=e.positions,h=e.normals,f="square"===this.cap,p="bevel"===this.join,d=mS([o[0],o[1]]),v=mS([a[0],a[1]]);gT(hT,n,r);var g=0;if(this.dash&&(g=this.lineSegmentDistance(d,v),this.totalDistance+=g),this.normal||(this.normal=Zb(),vT(this.normal,hT)),!this.started)if(this.started=!0,f){var m=Zb(),y=Zb();$b(m,this.normal,hT),$b(y,this.normal,hT),h.push(y[0],y[1],0),h.push(m[0],m[1],0),l.push(r[0],r[1],0|r[2],this.totalDistance-g,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),l.push(r[0],r[1],0|r[2],this.totalDistance-g,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(l,h,r,this.normal,this.thickness,this.totalDistance-g);if(c.push(t+0,t+1,t+2),i){mT(n,i)&&$b(i,n,tx(i,Jb(i,n,r))),gT(fT,i,n);var _=A(dT(pT,Zb(),hT,fT,this.thickness),2),b=_[0],x=_[1],S=rx(pT,this.normal)<0?-1:1,E=p;if(!E&&"miter"===this.join)b>this.miterLimit&&(E=!0);E?(h.push(this.normal[0],this.normal[1],0),h.push(x[0],x[1],0),l.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*S,0|n[2]),this.complex.indexes.push(this.currentIndex),l.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*S,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c.push.apply(c,T(this.lastFlip!==-S?[t,t+2,t+3]:[t+2,t+1,t+3])),c.push(t+2,t+3,t+4),vT(lT,fT),Kb(this.normal,lT),h.push(this.normal[0],this.normal[1],0),l.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*S,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,u+=3):(this.extrusions(l,h,n,x,b,this.totalDistance),c.push.apply(c,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),S=-1,Kb(this.normal,x),u+=2),this.lastFlip=S}else{if(vT(this.normal,hT),f){var w=Zb(),C=Zb();ax(C,hT,this.normal),$b(w,hT,this.normal),h.push(C[0],C[1],0),h.push(w[0],w[1],0),l.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),l.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(l,h,n,this.normal,this.thickness,this.totalDistance);c.push.apply(c,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),u+=2}return u}},{key:"simpleSegment",value:function(e,t,r,n,i){var a=0,o=e.indices,s=e.positions,u=e.normals,c=mS([n[0],n[1]]),l=mS([r[0],r[1]]);gT(hT,c,l);var h=0;if(this.dash&&(h=this.lineSegmentDistance(c,l),this.totalDistance+=h),this.normal||(this.normal=Zb(),vT(this.normal,hT)),this.started||(this.started=!0,this.extrusions(s,u,r,this.normal,this.thickness,this.totalDistance-h)),o.push(t+0,t+1,t+2),i){var f=mS([i[0],i[1]]);mT(c,f)&&$b(f,c,tx(f,Jb(f,c,l))),gT(fT,f,c);var p=A(dT(pT,Zb(),hT,fT,this.thickness),2),d=p[0],v=p[1];rx(pT,this.normal);this.extrusions(s,u,n,v,d,this.totalDistance),o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),-1,Kb(this.normal,v),a+=2,this.lastFlip=-1}else vT(this.normal,hT),this.extrusions(s,u,n,this.normal,this.thickness,this.totalDistance),o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),a+=2;return a}},{key:"segment",value:function(e,t,r,n,i){var a=0,o=e.indices,s=e.positions,u=e.normals,c="square"===this.cap,l="bevel"===this.join,h=mS([n[0],n[1]]),f=mS([r[0],r[1]]);gT(hT,h,f);var p=0;if(this.dash&&(p=this.lineSegmentDistance(h,f),this.totalDistance+=p),this.normal||(this.normal=Zb(),vT(this.normal,hT)),!this.started)if(this.started=!0,c){var d=Zb(),v=Zb();$b(d,this.normal,hT),$b(v,this.normal,hT),u.push(v[0],v[1],0),u.push(d[0],d[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance-p,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),s.push(r[0],r[1],0|r[2],this.totalDistance-p,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(s,u,r,this.normal,this.thickness,this.totalDistance-p);if(o.push(t+0,t+1,t+2),i){var g=mS([i[0],i[1]]);mT(h,g)&&$b(g,h,tx(g,Jb(g,h,f))),gT(fT,g,h);var m=A(dT(pT,Zb(),hT,fT,this.thickness),2),y=m[0],_=m[1],b=rx(pT,this.normal)<0?-1:1,x=l;if(!x&&"miter"===this.join)y>this.miterLimit&&(x=!0);x?(u.push(this.normal[0],this.normal[1],0),u.push(_[0],_[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*b,0|n[2]),this.complex.indexes.push(this.currentIndex),s.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*b,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,o.push.apply(o,T(this.lastFlip!==-b?[t,t+2,t+3]:[t+2,t+1,t+3])),o.push(t+2,t+3,t+4),vT(lT,fT),Kb(this.normal,lT),u.push(this.normal[0],this.normal[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*b,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,a+=3):(this.extrusions(s,u,n,_,y,this.totalDistance),o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),b=-1,Kb(this.normal,_),a+=2),this.lastFlip=b}else{if(vT(this.normal,hT),c){var S=Zb(),E=Zb();ax(E,hT,this.normal),$b(S,hT,this.normal),u.push(E[0],E[1],0),u.push(S[0],S[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),s.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(s,u,n,this.normal,this.thickness,this.totalDistance);o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),a+=2}return a}},{key:"extrusions",value:function(e,t,r,n,i,a){t.push(n[0],n[1],0),t.push(n[0],n[1],0),e.push(r[0],r[1],0|r[2],a,-i,0|r[2]),this.complex.indexes.push(this.currentIndex),e.push(r[0],r[1],0|r[2],a,i,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}}]),e}();function _T(e){var t=e.coordinates,r=e.originCoordinates,n=e.version,i=new yT({dash:!0,join:"bevel"});if("GAODE2.x"===n||"MAPBOX"===n||"MAPLIBRE"===n){var a=t;Array.isArray(a[0][0])||(a=[t]);var o=r;Array.isArray(o[0][0])||(o=[r]);for(var s=0;s<a.length;s++){var u=a[s],c=o[s];i.extrude_gaode2(u,c)}}else{var l=t;l[0]&&!Array.isArray(l[0][0])&&(l=[t]),l.forEach((function(e){i.extrude(e)}))}var h=i.complex;return{vertices:h.positions,indices:h.indices,normals:h.normals,indexes:h.indexes,size:6}}function bT(e){var t=kS(e.coordinates);return{vertices:[].concat(T(t),T(t),T(t),T(t)),indices:[0,1,2,2,3,0],size:t.length}}function xT(e){var t=e.coordinates,r=PA.flatten(t),n=r.vertices,i=r.dimensions,a=r.holes;return{indices:PA(n,a,i),vertices:n,size:i}}var ST=function(){var e=s(i().mark((function e(t){var r,n,a,o,s,u,c,l,h;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.descriptors,n=t.features,a=t.enablePicking,o=t.iconMap,s={a_Color:wA,a_Position:CA,filter:kA,a_vertexId:MA,a_PickingColor:function(e){var t=e.id;return a?Ug(t):[0,0,0]},a_DistanceAndIndex:function(e,t,r,n,i,a){return void 0===a?[r[3],10]:[r[3],a]},a_Total_Distance:function(e,t,r){return[r[5]]},a_Size:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0],r[1]]:[r,0]},a_Normal:function(e,t,r,n,i){return i},a_Miter:function(e,t,r){return[r[4]]},a_iconMapUV:function(e){var t=e.texture,r=o[t]||{x:0,y:0};return[r.x,r.y]}},u={sizePerElement:0,elements:[]},c=0,l=[],h=3,n.forEach((function(e,t){var n=_T(e),i=n.indices,a=n.vertices,o=n.normals,f=n.size,p=n.indexes;i.forEach((function(e){l.push(e+c)})),h=f;var d=a.length/f;u.sizePerElement=h,u.elements.push({featureIdx:t,vertices:a,normals:o,offset:c}),c+=d;for(var v=function(n){var i=(null==o?void 0:o.slice(3*n,3*n+3))||[],u=a.slice(n*f,n*f+f),c=0;p&&void 0!==p[n]&&(c=p[n]),r.forEach((function(r){var a;r&&s[r.name]&&(a=r.buffer.data).push.apply(a,T(s[r.name](e,t,u,n,i,c)))}))},g=0;g<d;g++)v(g)})),e.abrupt("return",{descriptors:r,featureLayout:u,indices:l});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ET={pointFill:function(){var e=s(i().mark((function e(t){var r,n,a,o,s,u,c,l,h;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.descriptors,n=t.features,a=t.enablePicking,o=t.shape2d,s={a_Color:wA,a_Position:CA,filter:kA,a_vertexId:MA,a_PickingColor:function(e){var t=e.id;return a?Ug(t):[0,0,0]},a_Shape:function(e){var t=e.shape,r=void 0===t?2:t;return[o.indexOf(r)]},a_Extrude:function(e,t,r,n){var i=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],a=n%4*3;return[i[a],i[a+1],i[a+2]]},a_Size:function(e){var t=e.size,r=void 0===t?5:t;return Array.isArray(r)?[r[0]]:[r]}},u={sizePerElement:0,elements:[]},c=0,l=[],h=3,n.forEach((function(e,t){var n=bT(e),i=n.indices,a=n.vertices,o=n.normals,f=n.size,p=n.indexes;i.forEach((function(e){l.push(e+c)})),h=f;var d=a.length/f;u.sizePerElement=h,u.elements.push({featureIdx:t,vertices:a,normals:o,offset:c}),c+=d;for(var v=function(n){var i=(null==o?void 0:o.slice(3*n,3*n+3))||[],u=a.slice(n*f,n*f+f),c=0;p&&void 0!==p[n]&&(c=p[n]),r.forEach((function(r){var a;r&&s[r.name]&&(a=r.buffer.data).push.apply(a,T(s[r.name](e,t,u,n,i,c)))}))},g=0;g<d;g++)v(g)})),e.abrupt("return",{descriptors:r,featureLayout:u,indices:l});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),line:ST,polygonFill:function(){var e=s(i().mark((function e(t){var r,n,a,o,s,u,c,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.descriptors,n=t.features,a=t.enablePicking,o={a_Color:wA,a_Position:CA,filter:kA,a_vertexId:MA,a_PickingColor:function(e){var t=e.id;return a?Ug(t):[0,0,0]}},s={sizePerElement:0,elements:[]},u=0,c=[],l=3,n.forEach((function(e,t){var n=xT(e),i=n.indices,a=n.vertices,h=n.normals,f=n.size,p=n.indexes;i.forEach((function(e){c.push(e+u)})),l=f;var d=a.length/f;s.sizePerElement=l,s.elements.push({featureIdx:t,vertices:a,normals:h,offset:u}),u+=d;for(var v=function(n){var i=(null==h?void 0:h.slice(3*n,3*n+3))||[],s=a.slice(n*f,n*f+f),u=0;p&&void 0!==p[n]&&(u=p[n]),r.forEach((function(r){var a;r&&o[r.name]&&(a=r.buffer.data).push.apply(a,T(o[r.name](e,t,s,n,i,u)))}))},g=0;g<d;g++)v(g)})),e.abrupt("return",{descriptors:r,featureLayout:s,indices:c});case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},AT=n({},ET);function TT(){return(TT=s(i().mark((function e(t){var r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.workerType,n=t.data,!AT[r]){e.next=3;break}return e.abrupt("return",AT[r](n));case 3:return e.abrupt("return",Promise.reject(new Error('Worker with type "'.concat(r,'" non-existent.'))));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(e,t){var r=this;if("undefined"!=typeof self){var n={process:TA};gA.onmessage=function(i,a){return xA(r,void 0,void 0,(function(){var r,o,s,u,c,l,h,f,p,d;return SA(this,(function(v){switch(v.label){case 0:switch(v.trys.push([0,19,,20]),i){case"process":return[3,1];case"process-in-batches":return[3,3];case"input-batch":return[3,16];case"input-done":return[3,17]}return[3,18];case 1:if(!e)throw new Error("Worker does not support atomic processing");return[4,e(a.input,a.options||{},n)];case 2:return r=v.sent(),gA.postMessage("done",{result:r}),[3,18];case 3:if(!t)throw new Error("Worker does not support batched processing");yA=new bA,_A=a.options||{},o=t(yA,_A,n),v.label=4;case 4:v.trys.push([4,9,10,15]),s=EA(o),v.label=5;case 5:return[4,s.next()];case 6:if((u=v.sent()).done)return[3,8];c=u.value,gA.postMessage("output-batch",{result:c}),v.label=7;case 7:return[3,5];case 8:return[3,15];case 9:return l=v.sent(),p={error:l},[3,15];case 10:return v.trys.push([10,,13,14]),u&&!u.done&&(d=s.return)?[4,d.call(s)]:[3,12];case 11:v.sent(),v.label=12;case 12:return[3,14];case 13:if(p)throw p.error;return[7];case 14:return[7];case 15:return gA.postMessage("done",{}),[3,18];case 16:return yA.push(a.input),[3,18];case 17:return yA.close(),[3,18];case 18:return[3,20];case 19:return h=v.sent(),f=h instanceof Error?h.message:"",gA.postMessage("error",{error:f}),[3,20];case 20:return[2]}}))}))}}}((function(e){return TT.apply(this,arguments)}));var wT=new Map;function CT(e){!function(e,t){wT.set(e,t)}("l7-worker",e)}function kT(){var e,t=(e="l7-worker",wT.get(e));if(!t)throw new Error("get worker failed by workerName: ".concat("l7-worker","."));return t}function MT(){return(MT=s(i().mark((function e(t,r){var n,a,o,s,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=kT(),a=dA.getWorkerFarm({maxConcurrency:3,reuseWorkers:!0}),o=a.getWorkerPool({name:"l7-worker",source:n}),e.next=5,o.startJob("l7-worker",(function(e,t,r){return e.done(r)}));case 5:return(s=e.sent).postMessage("process",{input:{workerType:t,data:r}}),e.next=9,s.result;case 9:return u=e.sent,e.abrupt("return",u.result);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}CT('var L7=function(t){"use strict";function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(){r=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new P(n||[]);return i(a,"_invoke",{value:T(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",v="executing",d="completed",y={};function g(){}function m(){}function b(){}var x={};f(x,u,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(_([])));E&&E!==n&&o.call(E,u)&&(x=E);var A=b.prototype=g.prototype=Object.create(x);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(n,i,a,u){var s=h(t[n],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var n;i(this,"_invoke",{value:function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}})}function T(e,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=k(u,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var c=h(e,r,n);if("normal"===c.type){if(o=n.done?d:"suspendedYield",c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=d,n.method="throw",n.arg=c.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a \'"+n+"\' method")),y;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function _(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return m.prototype=b,i(A,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:m,configurable:!0}),m.displayName=f(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,c,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},O(S.prototype),f(S.prototype,s,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(A),f(A,c,"Generator"),f(A,u,(function(){return this})),f(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=_,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:_(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function n(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function u(t){n(a,o,i,u,s,"next",t)}function s(t){n(a,o,i,u,s,"throw",t)}u(void 0)}))}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function u(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(t){if(void 0===t)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return t}function p(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||g(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||g(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function b(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(t,e){return t(e={exports:{}},e.exports),e.exports}var E,A,O=function(t){return t&&t.Math===Math&&t},S=O("object"==typeof globalThis&&globalThis)||O("object"==typeof window&&window)||O("object"==typeof self&&self)||O("object"==typeof x&&x)||function(){return this}()||x||Function("return this")(),T=Object.defineProperty,k=function(t,e){try{T(S,t,{value:e,configurable:!0,writable:!0})}catch(r){S[t]=e}return e},I=S["__core-js_shared__"]||k("__core-js_shared__",{}),j=w((function(t){(t.exports=function(t,e){return I[t]||(I[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.33.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),P=function(t){try{return!!t()}catch(t){return!0}},_=!P((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),M=Function.prototype,L=M.call,R=_&&M.bind.bind(L,L),N=_?R:function(t){return function(){return L.apply(t,arguments)}},C=function(t){return null==t},D=TypeError,F=function(t){if(C(t))throw new D("Can\'t call method on "+t);return t},W=Object,B=function(t){return W(F(t))},z=N({}.hasOwnProperty),U=Object.hasOwn||function(t,e){return z(B(t),e)},G=0,V=Math.random(),H=N(1..toString),q=function(t){return"Symbol("+(void 0===t?"":t)+")_"+H(++G+V,36)},Z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Y=S.process,$=S.Deno,K=Y&&Y.versions||$&&$.version,Q=K&&K.v8;Q&&(A=(E=Q.split("."))[0]>0&&E[0]<4?1:+(E[0]+E[1])),!A&&Z&&(!(E=Z.match(/Edge\\/(\\d+)/))||E[1]>=74)&&(E=Z.match(/Chrome\\/(\\d+)/))&&(A=+E[1]);var X=A,J=S.String,tt=!!Object.getOwnPropertySymbols&&!P((function(){var t=Symbol("symbol detection");return!J(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&X&&X<41})),et=tt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,rt=S.Symbol,nt=j("wks"),ot=et?rt.for||rt:rt&&rt.withoutSetter||q,it=function(t){return U(nt,t)||(nt[t]=tt&&U(rt,t)?rt[t]:ot("Symbol."+t)),nt[t]},at={};at[it("toStringTag")]="z";var ut="[object z]"===String(at),st="object"==typeof document&&document.all,ct={all:st,IS_HTMLDDA:void 0===st&&void 0!==st},ft=ct.all,lt=ct.IS_HTMLDDA?function(t){return"function"==typeof t||t===ft}:function(t){return"function"==typeof t},ht=!P((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),pt=ct.all,vt=ct.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:lt(t)||t===pt}:function(t){return"object"==typeof t?null!==t:lt(t)},dt=S.document,yt=vt(dt)&&vt(dt.createElement),gt=function(t){return yt?dt.createElement(t):{}},mt=!ht&&!P((function(){return 7!==Object.defineProperty(gt("div"),"a",{get:function(){return 7}}).a})),bt=ht&&P((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),xt=String,wt=TypeError,Et=function(t){if(vt(t))return t;throw new wt(xt(t)+" is not an object")},At=Function.prototype.call,Ot=_?At.bind(At):function(){return At.apply(At,arguments)},St=function(t){return lt(t)?t:void 0},Tt=function(t,e){return arguments.length<2?St(S[t]):S[t]&&S[t][e]},kt=N({}.isPrototypeOf),It=Object,jt=et?function(t){return"symbol"==typeof t}:function(t){var e=Tt("Symbol");return lt(e)&&kt(e.prototype,It(t))},Pt=String,_t=function(t){try{return Pt(t)}catch(t){return"Object"}},Mt=TypeError,Lt=function(t){if(lt(t))return t;throw new Mt(_t(t)+" is not a function")},Rt=function(t,e){var r=t[e];return C(r)?void 0:Lt(r)},Nt=TypeError,Ct=TypeError,Dt=it("toPrimitive"),Ft=function(t,e){if(!vt(t)||jt(t))return t;var r,n=Rt(t,Dt);if(n){if(void 0===e&&(e="default"),r=Ot(n,t,e),!vt(r)||jt(r))return r;throw new Ct("Can\'t convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&lt(r=t.toString)&&!vt(n=Ot(r,t)))return n;if(lt(r=t.valueOf)&&!vt(n=Ot(r,t)))return n;if("string"!==e&&lt(r=t.toString)&&!vt(n=Ot(r,t)))return n;throw new Nt("Can\'t convert object to primitive value")}(t,e)},Wt=function(t){var e=Ft(t,"string");return jt(e)?e:e+""},Bt=TypeError,zt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Gt={f:ht?bt?function(t,e,r){if(Et(t),e=Wt(e),Et(r),"function"==typeof t&&"prototype"===e&&"value"in r&&"writable"in r&&!r.writable){var n=Ut(t,e);n&&n.writable&&(t[e]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return zt(t,e,r)}:zt:function(t,e,r){if(Et(t),e=Wt(e),Et(r),mt)try{return zt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new Bt("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},Vt=Function.prototype,Ht=ht&&Object.getOwnPropertyDescriptor,qt=U(Vt,"name"),Zt={EXISTS:qt,PROPER:qt&&"something"===function(){}.name,CONFIGURABLE:qt&&(!ht||ht&&Ht(Vt,"name").configurable)},Yt=N(Function.toString);lt(I.inspectSource)||(I.inspectSource=function(t){return Yt(t)});var $t,Kt,Qt,Xt=I.inspectSource,Jt=S.WeakMap,te=lt(Jt)&&/native code/.test(String(Jt)),ee=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},re=ht?function(t,e,r){return Gt.f(t,e,ee(1,r))}:function(t,e,r){return t[e]=r,t},ne=j("keys"),oe=function(t){return ne[t]||(ne[t]=q(t))},ie={},ae=S.TypeError,ue=S.WeakMap;if(te||I.state){var se=I.state||(I.state=new ue);se.get=se.get,se.has=se.has,se.set=se.set,$t=function(t,e){if(se.has(t))throw new ae("Object already initialized");return e.facade=t,se.set(t,e),e},Kt=function(t){return se.get(t)||{}},Qt=function(t){return se.has(t)}}else{var ce=oe("state");ie[ce]=!0,$t=function(t,e){if(U(t,ce))throw new ae("Object already initialized");return e.facade=t,re(t,ce,e),e},Kt=function(t){return U(t,ce)?t[ce]:{}},Qt=function(t){return U(t,ce)}}var fe={set:$t,get:Kt,has:Qt,enforce:function(t){return Qt(t)?Kt(t):$t(t,{})},getterFor:function(t){return function(e){var r;if(!vt(e)||(r=Kt(e)).type!==t)throw new ae("Incompatible receiver, "+t+" required");return r}}},le=w((function(t){var e=Zt.CONFIGURABLE,r=fe.enforce,n=fe.get,o=String,i=Object.defineProperty,a=N("".slice),u=N("".replace),s=N([].join),c=ht&&!P((function(){return 8!==i((function(){}),"length",{value:8}).length})),f=String(String).split("String"),l=t.exports=function(t,n,l){"Symbol("===a(o(n),0,7)&&(n="["+u(o(n),/^Symbol\\(([^)]*)\\)/,"$1")+"]"),l&&l.getter&&(n="get "+n),l&&l.setter&&(n="set "+n),(!U(t,"name")||e&&t.name!==n)&&(ht?i(t,"name",{value:n,configurable:!0}):t.name=n),c&&l&&U(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&U(l,"constructor")&&l.constructor?ht&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var h=r(t);return U(h,"source")||(h.source=s(f,"string"==typeof n?n:"")),t};Function.prototype.toString=l((function(){return lt(this)&&n(this).source||Xt(this)}),"toString")})),he=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(lt(r)&&le(r,i,n),n.global)o?t[e]=r:k(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Gt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},pe=N({}.toString),ve=N("".slice),de=function(t){return ve(pe(t),8,-1)},ye=it("toStringTag"),ge=Object,me="Arguments"===de(function(){return arguments}()),be=ut?de:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=ge(t),ye))?r:me?de(e):"Object"===(n=de(e))&&lt(e.callee)?"Arguments":n},xe=ut?{}.toString:function(){return"[object "+be(this)+"]"};ut||he(Object.prototype,"toString",xe,{unsafe:!0});var we={}.propertyIsEnumerable,Ee=Object.getOwnPropertyDescriptor,Ae={f:Ee&&!we.call({1:2},1)?function(t){var e=Ee(this,t);return!!e&&e.enumerable}:we},Oe=Object,Se=N("".split),Te=P((function(){return!Oe("z").propertyIsEnumerable(0)}))?function(t){return"String"===de(t)?Se(t,""):Oe(t)}:Oe,ke=function(t){return Te(F(t))},Ie=Object.getOwnPropertyDescriptor,je={f:ht?Ie:function(t,e){if(t=ke(t),e=Wt(e),mt)try{return Ie(t,e)}catch(t){}if(U(t,e))return ee(!Ot(Ae.f,t,e),t[e])}},Pe=Math.ceil,_e=Math.floor,Me=Math.trunc||function(t){var e=+t;return(e>0?_e:Pe)(e)},Le=function(t){var e=+t;return e!=e||0===e?0:Me(e)},Re=Math.max,Ne=Math.min,Ce=function(t,e){var r=Le(t);return r<0?Re(r+e,0):Ne(r,e)},De=Math.min,Fe=function(t){return t>0?De(Le(t),9007199254740991):0},We=function(t){return Fe(t.length)},Be=function(t){return function(e,r,n){var o,i=ke(e),a=We(i),u=Ce(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},ze={includes:Be(!0),indexOf:Be(!1)},Ue=ze.indexOf,Ge=N([].push),Ve=function(t,e){var r,n=ke(t),o=0,i=[];for(r in n)!U(ie,r)&&U(n,r)&&Ge(i,r);for(;e.length>o;)U(n,r=e[o++])&&(~Ue(i,r)||Ge(i,r));return i},He=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qe=He.concat("length","prototype"),Ze={f:Object.getOwnPropertyNames||function(t){return Ve(t,qe)}},Ye={f:Object.getOwnPropertySymbols},$e=N([].concat),Ke=Tt("Reflect","ownKeys")||function(t){var e=Ze.f(Et(t)),r=Ye.f;return r?$e(e,r(t)):e},Qe=function(t,e,r){for(var n=Ke(e),o=Gt.f,i=je.f,a=0;a<n.length;a++){var u=n[a];U(t,u)||r&&U(r,u)||o(t,u,i(e,u))}},Xe=/#|\\.prototype\\./,Je=function(t,e){var r=er[tr(t)];return r===nr||r!==rr&&(lt(e)?P(e):!!e)},tr=Je.normalize=function(t){return String(t).replace(Xe,".").toLowerCase()},er=Je.data={},rr=Je.NATIVE="N",nr=Je.POLYFILL="P",or=Je,ir=je.f,ar=function(t,e){var r,n,o,i,a,u=t.target,s=t.global,c=t.stat;if(r=s?S:c?S[u]||k(u,{}):(S[u]||{}).prototype)for(n in e){if(i=e[n],o=t.dontCallGetSet?(a=ir(r,n))&&a.value:r[n],!or(s?n:u+(c?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Qe(i,o)}(t.sham||o&&o.sham)&&re(i,"sham",!0),he(r,n,i,t)}},ur="process"===de(S.process),sr=String,cr=TypeError,fr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=function(t,e,r){try{return N(Lt(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}}(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Et(r),function(t){if("object"==typeof t||lt(t))return t;throw new cr("Can\'t set "+sr(t)+" as a prototype")}(n),e?t(r,n):r.__proto__=n,r}}():void 0),lr=Gt.f,hr=it("toStringTag"),pr=function(t,e,r){t&&!r&&(t=t.prototype),t&&!U(t,hr)&&lr(t,hr,{configurable:!0,value:e})},vr=function(t,e,r){return r.get&&le(r.get,e,{getter:!0}),r.set&&le(r.set,e,{setter:!0}),Gt.f(t,e,r)},dr=it("species"),yr=function(t){var e=Tt(t);ht&&e&&!e[dr]&&vr(e,dr,{configurable:!0,get:function(){return this}})},gr=TypeError,mr=function(t,e){if(kt(e,t))return t;throw new gr("Incorrect invocation")},br=function(){},xr=[],wr=Tt("Reflect","construct"),Er=/^\\s*(?:class|function)\\b/,Ar=N(Er.exec),Or=!Er.test(br),Sr=function(t){if(!lt(t))return!1;try{return wr(br,xr,t),!0}catch(t){return!1}},Tr=function(t){if(!lt(t))return!1;switch(be(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Or||!!Ar(Er,Xt(t))}catch(t){return!0}};Tr.sham=!0;var kr,Ir,jr,Pr,_r=!wr||P((function(){var t;return Sr(Sr.call)||!Sr(Object)||!Sr((function(){t=!0}))||t}))?Tr:Sr,Mr=TypeError,Lr=function(t){if(_r(t))return t;throw new Mr(_t(t)+" is not a constructor")},Rr=it("species"),Nr=function(t,e){var r,n=Et(t).constructor;return void 0===n||C(r=Et(n)[Rr])?e:Lr(r)},Cr=Function.prototype,Dr=Cr.apply,Fr=Cr.call,Wr="object"==typeof Reflect&&Reflect.apply||(_?Fr.bind(Dr):function(){return Fr.apply(Dr,arguments)}),Br=function(t){if("Function"===de(t))return N(t)},zr=Br(Br.bind),Ur=function(t,e){return Lt(t),void 0===e?t:_?zr(t,e):function(){return t.apply(e,arguments)}},Gr=Tt("document","documentElement"),Vr=N([].slice),Hr=TypeError,qr=function(t,e){if(t<e)throw new Hr("Not enough arguments");return t},Zr=/(?:ipad|iphone|ipod).*applewebkit/i.test(Z),Yr=S.setImmediate,$r=S.clearImmediate,Kr=S.process,Qr=S.Dispatch,Xr=S.Function,Jr=S.MessageChannel,tn=S.String,en=0,rn={};P((function(){kr=S.location}));var nn=function(t){if(U(rn,t)){var e=rn[t];delete rn[t],e()}},on=function(t){return function(){nn(t)}},an=function(t){nn(t.data)},un=function(t){S.postMessage(tn(t),kr.protocol+"//"+kr.host)};Yr&&$r||(Yr=function(t){qr(arguments.length,1);var e=lt(t)?t:Xr(t),r=Vr(arguments,1);return rn[++en]=function(){Wr(e,void 0,r)},Ir(en),en},$r=function(t){delete rn[t]},ur?Ir=function(t){Kr.nextTick(on(t))}:Qr&&Qr.now?Ir=function(t){Qr.now(on(t))}:Jr&&!Zr?(Pr=(jr=new Jr).port2,jr.port1.onmessage=an,Ir=Ur(Pr.postMessage,Pr)):S.addEventListener&&lt(S.postMessage)&&!S.importScripts&&kr&&"file:"!==kr.protocol&&!P(un)?(Ir=un,S.addEventListener("message",an,!1)):Ir="onreadystatechange"in gt("script")?function(t){Gr.appendChild(gt("script")).onreadystatechange=function(){Gr.removeChild(this),nn(t)}}:function(t){setTimeout(on(t),0)});var sn={set:Yr,clear:$r},cn=function(){this.head=null,this.tail=null};cn.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var fn,ln,hn,pn,vn,dn=cn,yn=/ipad|iphone|ipod/i.test(Z)&&"undefined"!=typeof Pebble,gn=/web0s(?!.*chrome)/i.test(Z),mn=je.f,bn=sn.set,xn=S.MutationObserver||S.WebKitMutationObserver,wn=S.document,En=S.process,An=S.Promise,On=mn(S,"queueMicrotask"),Sn=On&&On.value;if(!Sn){var Tn=new dn,kn=function(){var t,e;for(ur&&(t=En.domain)&&t.exit();e=Tn.get();)try{e()}catch(t){throw Tn.head&&fn(),t}t&&t.enter()};Zr||ur||gn||!xn||!wn?!yn&&An&&An.resolve?((pn=An.resolve(void 0)).constructor=An,vn=Ur(pn.then,pn),fn=function(){vn(kn)}):ur?fn=function(){En.nextTick(kn)}:(bn=Ur(bn,S),fn=function(){bn(kn)}):(ln=!0,hn=wn.createTextNode(""),new xn(kn).observe(hn,{characterData:!0}),fn=function(){hn.data=ln=!ln}),Sn=function(t){Tn.head||fn(),Tn.add(t)}}var In,jn,Pn,_n=Sn,Mn=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ln=S.Promise,Rn="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Nn=!Rn&&!ur&&"object"==typeof window&&"object"==typeof document,Cn=(Ln&&Ln.prototype,it("species")),Dn=!1,Fn=lt(S.PromiseRejectionEvent),Wn={CONSTRUCTOR:or("Promise",(function(){var t=Xt(Ln),e=t!==String(Ln);if(!e&&66===X)return!0;if(!X||X<51||!/native code/.test(t)){var r=new Ln((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Cn]=n,!(Dn=r.then((function(){}))instanceof n))return!0}return!e&&(Nn||Rn)&&!Fn})),REJECTION_EVENT:Fn,SUBCLASSING:Dn},Bn=TypeError,zn=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new Bn("Bad Promise constructor");e=t,r=n})),this.resolve=Lt(e),this.reject=Lt(r)},Un={f:function(t){return new zn(t)}},Gn=sn.set,Vn=Wn.CONSTRUCTOR,Hn=Wn.REJECTION_EVENT,qn=Wn.SUBCLASSING,Zn=fe.getterFor("Promise"),Yn=fe.set,$n=Ln&&Ln.prototype,Kn=Ln,Qn=$n,Xn=S.TypeError,Jn=S.document,to=S.process,eo=Un.f,ro=eo,no=!!(Jn&&Jn.createEvent&&S.dispatchEvent),oo=function(t){var e;return!(!vt(t)||!lt(e=t.then))&&e},io=function(t,e){var r,n,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&fo(e),e.rejection=1),!0===u?r=i:(f&&f.enter(),r=u(i),f&&(f.exit(),o=!0)),r===t.promise?c(new Xn("Promise-chain cycle")):(n=oo(r))?Ot(n,r,s,c):s(r)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},ao=function(t,e){t.notified||(t.notified=!0,_n((function(){for(var r,n=t.reactions;r=n.get();)io(r,t);t.notified=!1,e&&!t.rejection&&so(t)})))},uo=function(t,e,r){var n,o;no?((n=Jn.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),S.dispatchEvent(n)):n={promise:e,reason:r},!Hn&&(o=S["on"+t])?o(n):"unhandledrejection"===t&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",r)},so=function(t){Ot(Gn,S,(function(){var e,r=t.facade,n=t.value;if(co(t)&&(e=Mn((function(){ur?to.emit("unhandledRejection",n,r):uo("unhandledrejection",r,n)})),t.rejection=ur||co(t)?2:1,e.error))throw e.value}))},co=function(t){return 1!==t.rejection&&!t.parent},fo=function(t){Ot(Gn,S,(function(){var e=t.facade;ur?to.emit("rejectionHandled",e):uo("rejectionhandled",e,t.value)}))},lo=function(t,e,r){return function(n){t(e,n,r)}},ho=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,ao(t,!0))},po=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new Xn("Promise can\'t be resolved itself");var n=oo(e);n?_n((function(){var r={done:!1};try{Ot(n,e,lo(po,r,t),lo(ho,r,t))}catch(e){ho(r,e,t)}})):(t.value=e,t.state=1,ao(t,!1))}catch(e){ho({done:!1},e,t)}}};if(Vn&&(Qn=(Kn=function(t){mr(this,Qn),Lt(t),Ot(In,this);var e=Zn(this);try{t(lo(po,e),lo(ho,e))}catch(t){ho(e,t)}}).prototype,(In=function(t){Yn(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new dn,rejection:!1,state:0,value:void 0})}).prototype=he(Qn,"then",(function(t,e){var r=Zn(this),n=eo(Nr(this,Kn));return r.parent=!0,n.ok=!lt(t)||t,n.fail=lt(e)&&e,n.domain=ur?to.domain:void 0,0===r.state?r.reactions.add(n):_n((function(){io(n,r)})),n.promise})),jn=function(){var t=new In,e=Zn(t);this.promise=t,this.resolve=lo(po,e),this.reject=lo(ho,e)},Un.f=eo=function(t){return t===Kn||void 0===t?new jn(t):ro(t)},lt(Ln)&&$n!==Object.prototype)){Pn=$n.then,qn||he($n,"then",(function(t,e){var r=this;return new Kn((function(t,e){Ot(Pn,r,t,e)})).then(t,e)}),{unsafe:!0});try{delete $n.constructor}catch(t){}fr&&fr($n,Qn)}ar({global:!0,constructor:!0,wrap:!0,forced:Vn},{Promise:Kn}),pr(Kn,"Promise",!1),yr("Promise");var vo={},yo=it("iterator"),go=Array.prototype,mo=function(t){return void 0!==t&&(vo.Array===t||go[yo]===t)},bo=it("iterator"),xo=function(t){if(!C(t))return Rt(t,bo)||Rt(t,"@@iterator")||vo[be(t)]},wo=TypeError,Eo=function(t,e){var r=arguments.length<2?xo(t):e;if(Lt(r))return Et(Ot(r,t));throw new wo(_t(t)+" is not iterable")},Ao=function(t,e,r){var n,o;Et(t);try{if(!(n=Rt(t,"return"))){if("throw"===e)throw r;return r}n=Ot(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return Et(n),r},Oo=TypeError,So=function(t,e){this.stopped=t,this.result=e},To=So.prototype,ko=function(t,e,r){var n,o,i,a,u,s,c,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),d=Ur(e,f),y=function(t){return n&&Ao(n,"normal",t),new So(!0,t)},g=function(t){return l?(Et(t),v?d(t[0],t[1],y):d(t[0],t[1])):v?d(t,y):d(t)};if(h)n=t.iterator;else if(p)n=t;else{if(!(o=xo(t)))throw new Oo(_t(t)+" is not iterable");if(mo(o)){for(i=0,a=We(t);a>i;i++)if((u=g(t[i]))&&kt(To,u))return u;return new So(!1)}n=Eo(t,o)}for(s=h?t.next:n.next;!(c=Ot(s,n)).done;){try{u=g(c.value)}catch(t){Ao(n,"throw",t)}if("object"==typeof u&&u&&kt(To,u))return u}return new So(!1)},Io=it("iterator"),jo=!1;try{var Po=0,_o={next:function(){return{done:!!Po++}},return:function(){jo=!0}};_o[Io]=function(){return this},Array.from(_o,(function(){throw 2}))}catch(t){}var Mo=function(t,e){try{if(!e&&!jo)return!1}catch(t){return!1}var r=!1;try{var n={};n[Io]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Lo=Wn.CONSTRUCTOR||!Mo((function(t){Ln.all(t).then(void 0,(function(){}))}));ar({target:"Promise",stat:!0,forced:Lo},{all:function(t){var e=this,r=Un.f(e),n=r.resolve,o=r.reject,i=Mn((function(){var r=Lt(e.resolve),i=[],a=0,u=1;ko(t,(function(t){var s=a++,c=!1;u++,Ot(r,e,t).then((function(t){c||(c=!0,i[s]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Ro=Wn.CONSTRUCTOR,No=Ln&&Ln.prototype;if(ar({target:"Promise",proto:!0,forced:Ro,real:!0},{catch:function(t){return this.then(void 0,t)}}),lt(Ln)){var Co=Tt("Promise").prototype.catch;No.catch!==Co&&he(No,"catch",Co,{unsafe:!0})}ar({target:"Promise",stat:!0,forced:Lo},{race:function(t){var e=this,r=Un.f(e),n=r.reject,o=Mn((function(){var o=Lt(e.resolve);ko(t,(function(t){Ot(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}}),ar({target:"Promise",stat:!0,forced:Wn.CONSTRUCTOR},{reject:function(t){var e=Un.f(this);return Ot(e.reject,void 0,t),e.promise}});var Do=Wn.CONSTRUCTOR;Tt("Promise");function Fo(t,e){if(!t)throw new Error(e||"web worker helper assertion failed.")}ar({target:"Promise",stat:!0,forced:Do},{resolve:function(t){return function(t,e){if(Et(t),vt(e)&&e.constructor===t)return e;var r=Un.f(t);return(0,r.resolve)(e),r.promise}(this,t)}});var Wo="undefined"!=typeof window&&void 0!==window.orientation,Bo=function(){function t(t,e){var r=this;this.name=t,this.workerThread=e,this.isRunning=!0,this.resolve=function(){},this.reject=function(){},this.result=new Promise((function(t,e){r.resolve=t,r.reject=e}))}return t.prototype.postMessage=function(t,e){this.workerThread.postMessage({source:"Main thread",type:t,payload:e})},t.prototype.done=function(t){Fo(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.resolve(t)},t.prototype.error=function(t){Fo(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.reject(t)},t}(),zo=new Map;function Uo(t){Fo(t.source&&!t.url||!t.source&&t.url);var e=zo.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return Go((e=t,"try {\\n  importScripts(\'"+e+"\');\\n} catch (error) {\\n  console.error(error);\\n  throw error;\\n}"));var e}(t.url),zo.set(t.url,e)),t.source&&(e=Go(t.source),zo.set(t.source,e))),Fo(e),e}function Go(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Vo(t,e,r){void 0===e&&(e=!0);var n=r||new Set;if(t){if(Ho(t))n.add(t);else if(Ho(t.buffer))n.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"==typeof t)for(var o in t)Vo(t[o],e,n)}else;return void 0===r?Array.from(n):[]}function Ho(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}var qo=function(){},Zo=function(){function t(t){this.terminated=!1,this.loadableURL="";var e=t.name,r=t.source,n=t.url;Fo(r||n),this.name=e,this.source=r,this.url=n,this.onMessage=qo,this.onError=function(t){return console.log(t)},this.worker=this.createBrowserWorker()}return t.isSupported=function(){return"undefined"!=typeof Worker},t.prototype.destroy=function(){this.onMessage=qo,this.onError=qo,this.worker.terminate(),this.terminated=!0},Object.defineProperty(t.prototype,"isRunning",{get:function(){return Boolean(this.onMessage)},enumerable:!1,configurable:!0}),t.prototype.postMessage=function(t,e){e=e||Vo(t),this.worker.postMessage(t,e)},t.prototype.getErrorFromErrorEvent=function(t){var e="Failed to load ";return e+="worker "+this.name+" from "+this.url+". ",t.message&&(e+=t.message+" in "),t.lineno&&(e+=":"+t.lineno+":"+t.colno),new Error(e)},t.prototype.createBrowserWorker=function(){var t=this;this.loadableURL=Uo({source:this.source,url:this.url});var e=new Worker(this.loadableURL,{name:this.name});return e.onmessage=function(e){e.data?t.onMessage(e.data):t.onError(new Error("No data received"))},e.onerror=function(e){t.onError(t.getErrorFromErrorEvent(e)),t.terminated=!0},e.onmessageerror=function(e){return console.error("worker "+t.name+", message error: "+e)},e},t}(),Yo=self&&self.__assign||function(){return(Yo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},$o=self&&self.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((n=n.apply(t,e||[])).next())}))},Ko=self&&self.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Qo=function(){function t(t){this.name="unnamed",this.maxConcurrency=1,this.maxMobileConcurrency=1,this.onDebug=function(){},this.reuseWorkers=!0,this.props={},this.jobQueue=[],this.idleQueue=[],this.count=0,this.isDestroyed=!1,this.source=t.source,this.url=t.url,this.setProps(t)}return t.prototype.destroy=function(){this.idleQueue.forEach((function(t){return t.destroy()})),this.isDestroyed=!0},t.prototype.setProps=function(t){this.props=Yo(Yo({},this.props),t),void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)},t.prototype.startJob=function(t,e,r){return void 0===e&&(e=function(t,e,r){return t.done(r)}),void 0===r&&(r=function(t,e){return t.error(e)}),$o(this,void 0,void 0,(function(){var n,o=this;return Ko(this,(function(i){switch(i.label){case 0:return n=new Promise((function(n){return o.jobQueue.push({name:t,onMessage:e,onError:r,onStart:n}),o})),this.startQueuedJob(),[4,n];case 1:return[2,i.sent()]}}))}))},t.prototype.startQueuedJob=function(){return $o(this,void 0,void 0,(function(){var t,e,r;return Ko(this,(function(n){switch(n.label){case 0:if(!this.jobQueue.length)return[2];if(!(t=this.getAvailableWorker()))return[2];if(!(e=this.jobQueue.shift()))return[3,4];this.onDebug({message:"Starting job",name:e.name,backlog:this.jobQueue.length,workerThread:t}),r=new Bo(e.name,t),t.onMessage=function(t){return e.onMessage(r,t.type,t.payload)},t.onError=function(t){return e.onError(r,t)},e.onStart(r),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,r.result];case 2:return n.sent(),[3,4];case 3:return this.returnWorkerToQueue(t),[7];case 4:return[2]}}))}))},t.prototype.returnWorkerToQueue=function(t){this.isDestroyed||!this.reuseWorkers||this.count>this.getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this.startQueuedJob()},t.prototype.getAvailableWorker=function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this.getMaxConcurrency()){this.count++;var t=this.name.toLowerCase()+" (#"+this.count+" of "+this.maxConcurrency+")";return new Zo({name:t,source:this.source,url:this.url})}return null},t.prototype.getMaxConcurrency=function(){return Wo?this.maxMobileConcurrency:this.maxConcurrency},t}(),Xo=self&&self.__assign||function(){return(Xo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},Jo=self&&self.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ti={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},ei=(function(){function t(t){this.workerPools=new Map,this.props=Xo({},ti),this.setProps(t),this.workerPools=new Map}t.isSupported=function(){return Zo.isSupported()},t.getWorkerFarm=function(e){return void 0===e&&(e={}),t.workerFarm=t.workerFarm||new t({}),t.workerFarm.setProps(e),t.workerFarm},t.prototype.destroy=function(){var t,e;try{for(var r=Jo(this.workerPools.values()),n=r.next();!n.done;n=r.next()){n.value.destroy()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},t.prototype.setProps=function(t){var e,r;this.props=Xo(Xo({},this.props),t);try{for(var n=Jo(this.workerPools.values()),o=n.next();!o.done;o=n.next()){o.value.setProps(this.getWorkerPoolProps())}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.getWorkerPool=function(t){var e=t.name,r=t.source,n=t.url,o=this.workerPools.get(e);return o||((o=new Qo({name:e,source:r,url:n})).setProps(this.getWorkerPoolProps()),this.workerPools.set(e,o)),o},t.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}(),new Map),ri=function(){function t(){}return Object.defineProperty(t,"onmessage",{set:function(t){self.onmessage=function(e){if(ni(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}},enumerable:!1,configurable:!0}),t.addEventListener=function(t){var e=ei.get(t);e||(e=function(e){if(ni(e)){var r=e.data,n=r.type,o=r.payload;t(n,o)}}),self.addEventListener("message",e)},t.removeEventListener=function(t){var e=ei.get(t);ei.delete(t),self.removeEventListener("message",e)},t.postMessage=function(t,e){if(self){var r={source:"Worker thread",type:t,payload:e},n=Vo(e);self.postMessage(r,n)}},t}();function ni(t){var e=t.type,r=t.data;return"message"===e&&r&&"string"==typeof r.source&&"Main thread"===r.source}self&&self.__awaiter,self&&self.__generator;var oi,ii,ai=function(){function t(){this._values=[],this._settlers=[],this._closed=!1}return t.prototype[Symbol.asyncIterator]=function(){return this},t.prototype.push=function(t){return this.enqueue(t)},t.prototype.enqueue=function(t){if(this._closed)throw new Error("Closed");if(this._settlers.length>0){if(this._values.length>0)throw new Error("Illegal internal state");var e=this._settlers.shift();t instanceof Error?e.reject(t):e.resolve({value:t})}else this._values.push(t)},t.prototype.close=function(){for(;this._settlers.length>0;){this._settlers.shift().resolve({done:!0})}this._closed=!0},t.prototype.next=function(){var t=this;if(this._values.length>0){var e=this._values.shift();return e instanceof Error?Promise.reject(e):Promise.resolve({done:!1,value:e})}if(this._closed){if(this._settlers.length>0)throw new Error("Illegal internal state");return Promise.resolve({done:!0,value:void 0})}return new Promise((function(e,r){t._settlers.push({resolve:e,reject:r})}))},t}(),ui=self&&self.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{s(n.next(t))}catch(t){i(t)}}function u(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}s((n=n.apply(t,e||[])).next())}))},si=self&&self.__generator||function(t,e){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},ci=self&&self.__asyncValues||function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,o){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,o,(e=t[r](e)).done,e.value)}))}}},fi=0;function li(t,e){var r=this;if("undefined"!=typeof self){var n={process:hi};ri.onmessage=function(o,i){return ui(r,void 0,void 0,(function(){var r,a,u,s,c,f,l,h,p,v;return si(this,(function(d){switch(d.label){case 0:switch(d.trys.push([0,19,,20]),o){case"process":return[3,1];case"process-in-batches":return[3,3];case"input-batch":return[3,16];case"input-done":return[3,17]}return[3,18];case 1:if(!t)throw new Error("Worker does not support atomic processing");return[4,t(i.input,i.options||{},n)];case 2:return r=d.sent(),ri.postMessage("done",{result:r}),[3,18];case 3:if(!e)throw new Error("Worker does not support batched processing");oi=new ai,ii=i.options||{},a=e(oi,ii,n),d.label=4;case 4:d.trys.push([4,9,10,15]),u=ci(a),d.label=5;case 5:return[4,u.next()];case 6:if((s=d.sent()).done)return[3,8];c=s.value,ri.postMessage("output-batch",{result:c}),d.label=7;case 7:return[3,5];case 8:return[3,15];case 9:return f=d.sent(),p={error:f},[3,15];case 10:return d.trys.push([10,,13,14]),s&&!s.done&&(v=u.return)?[4,v.call(u)]:[3,12];case 11:d.sent(),d.label=12;case 12:return[3,14];case 13:if(p)throw p.error;return[7];case 14:return[7];case 15:return ri.postMessage("done",{}),[3,18];case 16:return oi.push(i.input),[3,18];case 17:return oi.close(),[3,18];case 18:return[3,20];case 19:return l=d.sent(),h=l instanceof Error?l.message:"",ri.postMessage("error",{error:h}),[3,20];case 20:return[2]}}))}))}}}function hi(t,e){return void 0===e&&(e={}),new Promise((function(r,n){var o=fi++,i=function(t,e){if(e.id===o)switch(t){case"done":ri.removeEventListener(i),r(e.result);break;case"error":ri.removeEventListener(i),n(e.error)}};ri.addEventListener(i);var a={id:o,input:t,options:e};ri.postMessage("process",a)}))}self&&self.__awaiter,self&&self.__generator;var pi={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},vi=gt("span").classList,di=vi&&vi.constructor&&vi.constructor.prototype,yi=di===Object.prototype?void 0:di,gi=Array.isArray||function(t){return"Array"===de(t)},mi=it("species"),bi=Array,xi=function(t,e){return new(function(t){var e;return gi(t)&&(e=t.constructor,(_r(e)&&(e===bi||gi(e.prototype))||vt(e)&&null===(e=e[mi]))&&(e=void 0)),void 0===e?bi:e}(t))(0===e?0:e)},wi=N([].push),Ei=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(s,c,f,l){for(var h,p,v=B(s),d=Te(v),y=Ur(c,f),g=We(d),m=0,b=l||xi,x=e?b(s,g):r||a?b(s,0):void 0;g>m;m++)if((u||m in d)&&(p=y(h=d[m],m,v),t))if(e)x[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:wi(x,h)}else switch(t){case 4:return!1;case 7:wi(x,h)}return i?-1:n||o?o:x}},Ai={forEach:Ei(0),map:Ei(1),filter:Ei(2),some:Ei(3),every:Ei(4),find:Ei(5),findIndex:Ei(6),filterReject:Ei(7)},Oi=function(t,e){var r=[][t];return!!r&&P((function(){r.call(null,e||function(){return 1},1)}))},Si=Ai.forEach,Ti=Oi("forEach")?[].forEach:function(t){return Si(this,t,arguments.length>1?arguments[1]:void 0)},ki=function(t){if(t&&t.forEach!==Ti)try{re(t,"forEach",Ti)}catch(e){t.forEach=Ti}};for(var Ii in pi)pi[Ii]&&ki(S[Ii]&&S[Ii].prototype);ki(yi);var ji=function(t,e,r){var n=Wt(e);n in t?Gt.f(t,n,ee(0,r)):t[n]=r},Pi=it("species"),_i=function(t){return X>=51||!P((function(){var e=[];return(e.constructor={})[Pi]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Mi=_i("slice"),Li=it("species"),Ri=Array,Ni=Math.max;ar({target:"Array",proto:!0,forced:!Mi},{slice:function(t,e){var r,n,o,i=ke(this),a=We(i),u=Ce(t,a),s=Ce(void 0===e?a:e,a);if(gi(i)&&(r=i.constructor,(_r(r)&&(r===Ri||gi(r.prototype))||vt(r)&&null===(r=r[Li]))&&(r=void 0),r===Ri||void 0===r))return Vr(i,u,s);for(n=new(void 0===r?Ri:r)(Ni(s-u,0)),o=0;u<s;u++,o++)u in i&&ji(n,o,i[u]);return n.length=o,n}});var Ci=Zt.EXISTS,Di=Function.prototype,Fi=N(Di.toString),Wi=/function\\b(?:\\s|\\/\\*[\\S\\s]*?\\*\\/|\\/\\/[^\\n\\r]*[\\n\\r]+)*([^\\s(/]*)/,Bi=N(Wi.exec);ht&&!Ci&&vr(Di,"name",{configurable:!0,get:function(){try{return Bi(Wi,Fi(this))[1]}catch(t){return""}}});var zi,Ui=Object.keys||function(t){return Ve(t,He)},Gi={f:ht&&!bt?Object.defineProperties:function(t,e){Et(t);for(var r,n=ke(e),o=Ui(e),i=o.length,a=0;i>a;)Gt.f(t,r=o[a++],n[r]);return t}},Vi=oe("IE_PROTO"),Hi=function(){},qi=function(t){return"<script>"+t+"<\\/script>"},Zi=function(t){t.write(qi("")),t.close();var e=t.parentWindow.Object;return t=null,e},Yi=function(){try{zi=new ActiveXObject("htmlfile")}catch(t){}var t,e;Yi="undefined"!=typeof document?document.domain&&zi?Zi(zi):((e=gt("iframe")).style.display="none",Gr.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(qi("document.F=Object")),t.close(),t.F):Zi(zi);for(var r=He.length;r--;)delete Yi.prototype[He[r]];return Yi()};ie[Vi]=!0;var $i=Object.create||function(t,e){var r;return null!==t?(Hi.prototype=Et(t),r=new Hi,Hi.prototype=null,r[Vi]=t):r=Yi(),void 0===e?r:Gi.f(r,e)},Ki=Gt.f,Qi=it("unscopables"),Xi=Array.prototype;void 0===Xi[Qi]&&Ki(Xi,Qi,{configurable:!0,value:$i(null)});var Ji,ta,ea,ra=function(t){Xi[Qi][t]=!0},na=!P((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),oa=oe("IE_PROTO"),ia=Object,aa=ia.prototype,ua=na?ia.getPrototypeOf:function(t){var e=B(t);if(U(e,oa))return e[oa];var r=e.constructor;return lt(r)&&e instanceof r?r.prototype:e instanceof ia?aa:null},sa=it("iterator"),ca=!1;[].keys&&("next"in(ea=[].keys())?(ta=ua(ua(ea)))!==Object.prototype&&(Ji=ta):ca=!0),(!vt(Ji)||P((function(){var t={};return Ji[sa].call(t)!==t})))&&(Ji={}),lt(Ji[sa])||he(Ji,sa,(function(){return this}));var fa={IteratorPrototype:Ji,BUGGY_SAFARI_ITERATORS:ca},la=fa.IteratorPrototype,ha=function(){return this},pa=Zt.PROPER,va=Zt.CONFIGURABLE,da=fa.IteratorPrototype,ya=fa.BUGGY_SAFARI_ITERATORS,ga=it("iterator"),ma=function(){return this},ba=function(t,e,r,n,o,i,a){!function(t,e,r,n){var o=e+" Iterator";t.prototype=$i(la,{next:ee(+!n,r)}),pr(t,o,!1),vo[o]=ha}(r,e,n);var u,s,c,f=function(t){if(t===o&&d)return d;if(!ya&&t&&t in p)return p[t];switch(t){case"keys":case"values":case"entries":return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",h=!1,p=t.prototype,v=p[ga]||p["@@iterator"]||o&&p[o],d=!ya&&v||f(o),y="Array"===e&&p.entries||v;if(y&&(u=ua(y.call(new t)))!==Object.prototype&&u.next&&(ua(u)!==da&&(fr?fr(u,da):lt(u[ga])||he(u,ga,ma)),pr(u,l,!0)),pa&&"values"===o&&v&&"values"!==v.name&&(va?re(p,"name","values"):(h=!0,d=function(){return Ot(v,this)})),o)if(s={values:f("values"),keys:i?d:f("keys"),entries:f("entries")},a)for(c in s)(ya||h||!(c in p))&&he(p,c,s[c]);else ar({target:e,proto:!0,forced:ya||h},s);return p[ga]!==d&&he(p,ga,d,{name:o}),vo[e]=d,s},xa=function(t,e){return{value:t,done:e}},wa=Gt.f,Ea=fe.set,Aa=fe.getterFor("Array Iterator"),Oa=ba(Array,"Array",(function(t,e){Ea(this,{type:"Array Iterator",target:ke(t),index:0,kind:e})}),(function(){var t=Aa(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,xa(void 0,!0);switch(t.kind){case"keys":return xa(r,!1);case"values":return xa(e[r],!1)}return xa([r,e[r]],!1)}),"values"),Sa=vo.Arguments=vo.Array;if(ra("keys"),ra("values"),ra("entries"),ht&&"values"!==Sa.name)try{wa(Sa,"name",{value:"values"})}catch(t){}var Ta,ka,Ia,ja="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Pa=fe.enforce,_a=fe.get,Ma=S.Int8Array,La=Ma&&Ma.prototype,Ra=S.Uint8ClampedArray,Na=Ra&&Ra.prototype,Ca=Ma&&ua(Ma),Da=La&&ua(La),Fa=Object.prototype,Wa=S.TypeError,Ba=it("toStringTag"),za=q("TYPED_ARRAY_TAG"),Ua=ja&&!!fr&&"Opera"!==be(S.opera),Ga=!1,Va={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ha={BigInt64Array:8,BigUint64Array:8},qa=function(t){var e=ua(t);if(vt(e)){var r=_a(e);return r&&U(r,"TypedArrayConstructor")?r.TypedArrayConstructor:qa(e)}},Za=function(t){if(!vt(t))return!1;var e=be(t);return U(Va,e)||U(Ha,e)};for(Ta in Va)(Ia=(ka=S[Ta])&&ka.prototype)?Pa(Ia).TypedArrayConstructor=ka:Ua=!1;for(Ta in Ha)(Ia=(ka=S[Ta])&&ka.prototype)&&(Pa(Ia).TypedArrayConstructor=ka);if((!Ua||!lt(Ca)||Ca===Function.prototype)&&(Ca=function(){throw new Wa("Incorrect invocation")},Ua))for(Ta in Va)S[Ta]&&fr(S[Ta],Ca);if((!Ua||!Da||Da===Fa)&&(Da=Ca.prototype,Ua))for(Ta in Va)S[Ta]&&fr(S[Ta].prototype,Da);if(Ua&&ua(Na)!==Da&&fr(Na,Da),ht&&!U(Da,Ba))for(Ta in Ga=!0,vr(Da,Ba,{configurable:!0,get:function(){return vt(this)?this[za]:void 0}}),Va)S[Ta]&&re(S[Ta],za,Ta);var Ya={NATIVE_ARRAY_BUFFER_VIEWS:Ua,TYPED_ARRAY_TAG:Ga&&za,aTypedArray:function(t){if(Za(t))return t;throw new Wa("Target is not a typed array")},aTypedArrayConstructor:function(t){if(lt(t)&&(!fr||kt(Ca,t)))return t;throw new Wa(_t(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,r,n){if(ht){if(r)for(var o in Va){var i=S[o];if(i&&U(i.prototype,t))try{delete i.prototype[t]}catch(r){try{i.prototype[t]=e}catch(t){}}}Da[t]&&!r||he(Da,t,r?e:Ua&&La[t]||e,n)}},exportTypedArrayStaticMethod:function(t,e,r){var n,o;if(ht){if(fr){if(r)for(n in Va)if((o=S[n])&&U(o,t))try{delete o[t]}catch(t){}if(Ca[t]&&!r)return;try{return he(Ca,t,r?e:Ua&&Ca[t]||e)}catch(t){}}for(n in Va)!(o=S[n])||o[t]&&!r||he(o,t,e)}},getTypedArrayConstructor:qa,isView:function(t){if(!vt(t))return!1;var e=be(t);return"DataView"===e||U(Va,e)||U(Ha,e)},isTypedArray:Za,TypedArray:Ca,TypedArrayPrototype:Da},$a=Ya.NATIVE_ARRAY_BUFFER_VIEWS,Ka=S.ArrayBuffer,Qa=S.Int8Array,Xa=!$a||!P((function(){Qa(1)}))||!P((function(){new Qa(-1)}))||!Mo((function(t){new Qa,new Qa(null),new Qa(1.5),new Qa(t)}),!0)||P((function(){return 1!==new Qa(new Ka(2),1,void 0).length})),Ja=function(t,e,r){for(var n in e)he(t,n,e[n],r);return t},tu=RangeError,eu=function(t){if(void 0===t)return 0;var e=Le(t),r=Fe(e);if(e!==r)throw new tu("Wrong length or index");return r},ru=Math.sign||function(t){var e=+t;return 0===e||e!=e?e:e<0?-1:1},nu=Math.abs,ou=Math.fround||function(t){return function(t,e,r,n){var o=+t,i=nu(o),a=ru(o);if(i<n)return a*function(t){return t+4503599627370496-4503599627370496}(i/n/e)*n*e;var u=(1+e/2220446049250313e-31)*i,s=u-(u-i);return s>r||s!=s?a*(1/0):a*s}(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},iu=Array,au=Math.abs,uu=Math.pow,su=Math.floor,cu=Math.log,fu=Math.LN2,lu=function(t,e,r){var n,o,i,a=iu(r),u=8*r-e-1,s=(1<<u)-1,c=s>>1,f=23===e?uu(2,-24)-uu(2,-77):0,l=t<0||0===t&&1/t<0?1:0,h=0;for((t=au(t))!=t||t===1/0?(o=t!=t?1:0,n=s):(n=su(cu(t)/fu),t*(i=uu(2,-n))<1&&(n--,i*=2),(t+=n+c>=1?f/i:f*uu(2,1-c))*i>=2&&(n++,i/=2),n+c>=s?(o=0,n=s):n+c>=1?(o=(t*i-1)*uu(2,e),n+=c):(o=t*uu(2,c-1)*uu(2,e),n=0));e>=8;)a[h++]=255&o,o/=256,e-=8;for(n=n<<e|o,u+=e;u>0;)a[h++]=255&n,n/=256,u-=8;return a[--h]|=128*l,a},hu=function(t,e){var r,n=t.length,o=8*n-e-1,i=(1<<o)-1,a=i>>1,u=o-7,s=n-1,c=t[s--],f=127&c;for(c>>=7;u>0;)f=256*f+t[s--],u-=8;for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;)r=256*r+t[s--],u-=8;if(0===f)f=1-a;else{if(f===i)return r?NaN:c?-1/0:1/0;r+=uu(2,e),f-=a}return(c?-1:1)*r*uu(2,f-e)},pu=function(t){for(var e=B(this),r=We(e),n=arguments.length,o=Ce(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:Ce(i,r);a>o;)e[o++]=t;return e},vu=Array,du=Math.max,yu=function(t,e,r){for(var n=We(t),o=Ce(e,n),i=Ce(void 0===r?n:r,n),a=vu(du(i-o,0)),u=0;o<i;o++,u++)ji(a,u,t[o]);return a.length=u,a},gu=Ze.f,mu=Zt.PROPER,bu=Zt.CONFIGURABLE,xu=fe.getterFor("ArrayBuffer"),wu=fe.getterFor("DataView"),Eu=fe.set,Au=S.ArrayBuffer,Ou=Au,Su=Ou&&Ou.prototype,Tu=S.DataView,ku=Tu&&Tu.prototype,Iu=Object.prototype,ju=S.Array,Pu=S.RangeError,_u=N(pu),Mu=N([].reverse),Lu=lu,Ru=hu,Nu=function(t){return[255&t]},Cu=function(t){return[255&t,t>>8&255]},Du=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},Fu=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},Wu=function(t){return Lu(ou(t),23,4)},Bu=function(t){return Lu(t,52,8)},zu=function(t,e,r){vr(t.prototype,e,{configurable:!0,get:function(){return r(this)[e]}})},Uu=function(t,e,r,n){var o=wu(t),i=eu(r),a=!!n;if(i+e>o.byteLength)throw new Pu("Wrong index");var u=o.bytes,s=i+o.byteOffset,c=yu(u,s,s+e);return a?c:Mu(c)},Gu=function(t,e,r,n,o,i){var a=wu(t),u=eu(r),s=n(+o),c=!!i;if(u+e>a.byteLength)throw new Pu("Wrong index");for(var f=a.bytes,l=u+a.byteOffset,h=0;h<e;h++)f[l+h]=s[c?h:e-h-1]};if(ja){var Vu=mu&&"ArrayBuffer"!==Au.name;if(P((function(){Au(1)}))&&P((function(){new Au(-1)}))&&!P((function(){return new Au,new Au(1.5),new Au(NaN),1!==Au.length||Vu&&!bu})))Vu&&bu&&re(Au,"name","ArrayBuffer");else{(Ou=function(t){return mr(this,Su),new Au(eu(t))}).prototype=Su;for(var Hu,qu=gu(Au),Zu=0;qu.length>Zu;)(Hu=qu[Zu++])in Ou||re(Ou,Hu,Au[Hu]);Su.constructor=Ou}fr&&ua(ku)!==Iu&&fr(ku,Iu);var Yu=new Tu(new Ou(2)),$u=N(ku.setInt8);Yu.setInt8(0,2147483648),Yu.setInt8(1,2147483649),!Yu.getInt8(0)&&Yu.getInt8(1)||Ja(ku,{setInt8:function(t,e){$u(this,t,e<<24>>24)},setUint8:function(t,e){$u(this,t,e<<24>>24)}},{unsafe:!0})}else Su=(Ou=function(t){mr(this,Su);var e=eu(t);Eu(this,{type:"ArrayBuffer",bytes:_u(ju(e),0),byteLength:e}),ht||(this.byteLength=e,this.detached=!1)}).prototype,ku=(Tu=function(t,e,r){mr(this,ku),mr(t,Su);var n=xu(t),o=n.byteLength,i=Le(e);if(i<0||i>o)throw new Pu("Wrong offset");if(i+(r=void 0===r?o-i:Fe(r))>o)throw new Pu("Wrong length");Eu(this,{type:"DataView",buffer:t,byteLength:r,byteOffset:i,bytes:n.bytes}),ht||(this.buffer=t,this.byteLength=r,this.byteOffset=i)}).prototype,ht&&(zu(Ou,"byteLength",xu),zu(Tu,"buffer",wu),zu(Tu,"byteLength",wu),zu(Tu,"byteOffset",wu)),Ja(ku,{getInt8:function(t){return Uu(this,1,t)[0]<<24>>24},getUint8:function(t){return Uu(this,1,t)[0]},getInt16:function(t){var e=Uu(this,2,t,arguments.length>1&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Uu(this,2,t,arguments.length>1&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return Fu(Uu(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return Fu(Uu(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return Ru(Uu(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return Ru(Uu(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,e){Gu(this,1,t,Nu,e)},setUint8:function(t,e){Gu(this,1,t,Nu,e)},setInt16:function(t,e){Gu(this,2,t,Cu,e,arguments.length>2&&arguments[2])},setUint16:function(t,e){Gu(this,2,t,Cu,e,arguments.length>2&&arguments[2])},setInt32:function(t,e){Gu(this,4,t,Du,e,arguments.length>2&&arguments[2])},setUint32:function(t,e){Gu(this,4,t,Du,e,arguments.length>2&&arguments[2])},setFloat32:function(t,e){Gu(this,4,t,Wu,e,arguments.length>2&&arguments[2])},setFloat64:function(t,e){Gu(this,8,t,Bu,e,arguments.length>2&&arguments[2])}});pr(Ou,"ArrayBuffer"),pr(Tu,"DataView");var Ku={ArrayBuffer:Ou,DataView:Tu},Qu=Math.floor,Xu=Number.isInteger||function(t){return!vt(t)&&isFinite(t)&&Qu(t)===t},Ju=RangeError,ts=RangeError,es=function(t,e){var r=function(t){var e=Le(t);if(e<0)throw new Ju("The argument can\'t be less than 0");return e}(t);if(r%e)throw new ts("Wrong offset");return r},rs=Math.round,ns=function(t){var e=be(t);return"BigInt64Array"===e||"BigUint64Array"===e},os=TypeError,is=function(t){var e=Ft(t,"number");if("number"==typeof e)throw new os("Can\'t convert number to bigint");return BigInt(e)},as=Ya.aTypedArrayConstructor,us=function(t){var e,r,n,o,i,a,u,s,c=Lr(this),f=B(t),l=arguments.length,h=l>1?arguments[1]:void 0,p=void 0!==h,v=xo(f);if(v&&!mo(v))for(s=(u=Eo(f,v)).next,f=[];!(a=Ot(s,u)).done;)f.push(a.value);for(p&&l>2&&(h=Ur(h,arguments[2])),r=We(f),n=new(as(c))(r),o=ns(n),e=0;r>e;e++)i=p?h(f[e],e):f[e],n[e]=o?is(i):+i;return n},ss=function(t,e,r){var n,o;return fr&&lt(n=e.constructor)&&n!==r&&vt(o=n.prototype)&&o!==r.prototype&&fr(t,o),t},cs=w((function(t){var e=Ze.f,r=Ai.forEach,n=fe.get,o=fe.set,i=fe.enforce,a=Gt.f,u=je.f,s=S.RangeError,c=Ku.ArrayBuffer,f=c.prototype,l=Ku.DataView,h=Ya.NATIVE_ARRAY_BUFFER_VIEWS,p=Ya.TYPED_ARRAY_TAG,v=Ya.TypedArray,d=Ya.TypedArrayPrototype,y=Ya.aTypedArrayConstructor,g=Ya.isTypedArray,m=function(t,e){y(t);for(var r=0,n=e.length,o=new t(n);n>r;)o[r]=e[r++];return o},b=function(t,e){vr(t,e,{configurable:!0,get:function(){return n(this)[e]}})},x=function(t){var e;return kt(f,t)||"ArrayBuffer"===(e=be(t))||"SharedArrayBuffer"===e},w=function(t,e){return g(t)&&!jt(e)&&e in t&&Xu(+e)&&e>=0},E=function(t,e){return e=Wt(e),w(t,e)?ee(2,t[e]):u(t,e)},A=function(t,e,r){return e=Wt(e),!(w(t,e)&&vt(r)&&U(r,"value"))||U(r,"get")||U(r,"set")||r.configurable||U(r,"writable")&&!r.writable||U(r,"enumerable")&&!r.enumerable?a(t,e,r):(t[e]=r.value,t)};ht?(h||(je.f=E,Gt.f=A,b(d,"buffer"),b(d,"byteOffset"),b(d,"byteLength"),b(d,"length")),ar({target:"Object",stat:!0,forced:!h},{getOwnPropertyDescriptor:E,defineProperty:A}),t.exports=function(t,u,f){var y=t.match(/\\d+/)[0]/8,b=t+(f?"Clamped":"")+"Array",w="get"+t,E="set"+t,A=S[b],O=A,T=O&&O.prototype,k={},I=function(t,e,r){var o=n(t);o.view[E](e*y+o.byteOffset,f?function(t){var e=rs(t);return e<0?0:e>255?255:255&e}(r):r,!0)},j=function(t,e){a(t,e,{get:function(){return function(t,e){var r=n(t);return r.view[w](e*y+r.byteOffset,!0)}(this,e)},set:function(t){return I(this,e,t)},enumerable:!0})};h?Xa&&(O=u((function(t,e,r,n){return mr(t,T),ss(vt(e)?x(e)?void 0!==n?new A(e,es(r,y),n):void 0!==r?new A(e,es(r,y)):new A(e):g(e)?m(O,e):Ot(us,O,e):new A(eu(e)),t,O)})),fr&&fr(O,v),r(e(A),(function(t){t in O||re(O,t,A[t])})),O.prototype=T):(O=u((function(t,e,r,n){mr(t,T);var i,a,u,f=0,h=0;if(vt(e)){if(!x(e))return g(e)?m(O,e):Ot(us,O,e);i=e,h=es(r,y);var p=e.byteLength;if(void 0===n){if(p%y)throw new s("Wrong length");if((a=p-h)<0)throw new s("Wrong length")}else if((a=Fe(n)*y)+h>p)throw new s("Wrong length");u=a/y}else u=eu(e),i=new c(a=u*y);for(o(t,{buffer:i,byteOffset:h,byteLength:a,length:u,view:new l(i)});f<u;)j(t,f++)})),fr&&fr(O,v),T=O.prototype=$i(d)),T.constructor!==O&&re(T,"constructor",O),i(T).TypedArrayConstructor=O,p&&re(T,p,b);var P=O!==A;k[b]=O,ar({global:!0,constructor:!0,forced:P,sham:!h},k),"BYTES_PER_ELEMENT"in O||re(O,"BYTES_PER_ELEMENT",y),"BYTES_PER_ELEMENT"in T||re(T,"BYTES_PER_ELEMENT",y),yr(b)}):t.exports=function(){}}));cs("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}),!0);var fs=TypeError,ls=function(t,e){if(!delete t[e])throw new fs("Cannot delete property "+_t(e)+" of "+_t(t))},hs=Math.min,ps=N([].copyWithin||function(t,e){var r=B(this),n=We(r),o=Ce(t,n),i=Ce(e,n),a=arguments.length>2?arguments[2]:void 0,u=hs((void 0===a?n:Ce(a,n))-i,n-o),s=1;for(i<o&&o<i+u&&(s=-1,i+=u-1,o+=u-1);u-- >0;)i in r?r[o]=r[i]:ls(r,o),o+=s,i+=s;return r}),vs=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("copyWithin",(function(t,e){return ps(vs(this),t,e,arguments.length>2?arguments[2]:void 0)}));var ds=Ai.every,ys=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("every",(function(t){return ds(ys(this),t,arguments.length>1?arguments[1]:void 0)}));var gs=Ya.aTypedArray,ms=Ya.exportTypedArrayMethod,bs=N("".slice);ms("fill",(function(t){var e=arguments.length;gs(this);var r="Big"===bs(be(this),0,3)?is(t):+t;return Ot(pu,this,r,e>1?arguments[1]:void 0,e>2?arguments[2]:void 0)}),P((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})));var xs=Ya.aTypedArrayConstructor,ws=Ya.getTypedArrayConstructor,Es=function(t){return xs(Nr(t,ws(t)))},As=function(t,e){return function(t,e){for(var r=0,n=We(e),o=new t(n);n>r;)o[r]=e[r++];return o}(Es(t),e)},Os=Ai.filter,Ss=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("filter",(function(t){var e=Os(Ss(this),t,arguments.length>1?arguments[1]:void 0);return As(this,e)}));var Ts=Ai.find,ks=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("find",(function(t){return Ts(ks(this),t,arguments.length>1?arguments[1]:void 0)}));var Is=Ai.findIndex,js=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("findIndex",(function(t){return Is(js(this),t,arguments.length>1?arguments[1]:void 0)}));var Ps=Ai.forEach,_s=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("forEach",(function(t){Ps(_s(this),t,arguments.length>1?arguments[1]:void 0)}));var Ms=ze.includes,Ls=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("includes",(function(t){return Ms(Ls(this),t,arguments.length>1?arguments[1]:void 0)}));var Rs=ze.indexOf,Ns=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("indexOf",(function(t){return Rs(Ns(this),t,arguments.length>1?arguments[1]:void 0)}));var Cs=it("iterator"),Ds=S.Uint8Array,Fs=N(Oa.values),Ws=N(Oa.keys),Bs=N(Oa.entries),zs=Ya.aTypedArray,Us=Ya.exportTypedArrayMethod,Gs=Ds&&Ds.prototype,Vs=!P((function(){Gs[Cs].call([1])})),Hs=!!Gs&&Gs.values&&Gs[Cs]===Gs.values&&"values"===Gs.values.name,qs=function(){return Fs(zs(this))};Us("entries",(function(){return Bs(zs(this))}),Vs),Us("keys",(function(){return Ws(zs(this))}),Vs),Us("values",qs,Vs||!Hs,{name:"values"}),Us(Cs,qs,Vs||!Hs,{name:"values"});var Zs=Ya.aTypedArray,Ys=Ya.exportTypedArrayMethod,$s=N([].join);Ys("join",(function(t){return $s(Zs(this),t)}));var Ks=Math.min,Qs=[].lastIndexOf,Xs=!!Qs&&1/[1].lastIndexOf(1,-0)<0,Js=Oi("lastIndexOf"),tc=Xs||!Js?function(t){if(Xs)return Wr(Qs,this,arguments)||0;var e=ke(this),r=We(e),n=r-1;for(arguments.length>1&&(n=Ks(n,Le(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in e&&e[n]===t)return n||0;return-1}:Qs,ec=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("lastIndexOf",(function(t){var e=arguments.length;return Wr(tc,ec(this),e>1?[t,arguments[1]]:[t])}));var rc=Ai.map,nc=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("map",(function(t){return rc(nc(this),t,arguments.length>1?arguments[1]:void 0,(function(t,e){return new(Es(t))(e)}))}));var oc=TypeError,ic=function(t){return function(e,r,n,o){Lt(r);var i=B(e),a=Te(i),u=We(i),s=t?u-1:0,c=t?-1:1;if(n<2)for(;;){if(s in a){o=a[s],s+=c;break}if(s+=c,t?s<0:u<=s)throw new oc("Reduce of empty array with no initial value")}for(;t?s>=0:u>s;s+=c)s in a&&(o=r(o,a[s],s,i));return o}},ac={left:ic(!1),right:ic(!0)},uc=ac.left,sc=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("reduce",(function(t){var e=arguments.length;return uc(sc(this),t,e,e>1?arguments[1]:void 0)}));var cc=ac.right,fc=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("reduceRight",(function(t){var e=arguments.length;return cc(fc(this),t,e,e>1?arguments[1]:void 0)}));var lc=Ya.aTypedArray,hc=Ya.exportTypedArrayMethod,pc=Math.floor;hc("reverse",(function(){for(var t,e=lc(this).length,r=pc(e/2),n=0;n<r;)t=this[n],this[n++]=this[--e],this[e]=t;return this}));var vc=S.RangeError,dc=S.Int8Array,yc=dc&&dc.prototype,gc=yc&&yc.set,mc=Ya.aTypedArray,bc=Ya.exportTypedArrayMethod,xc=!P((function(){var t=new Uint8ClampedArray(2);return Ot(gc,t,{length:1,0:3},1),3!==t[1]})),wc=xc&&Ya.NATIVE_ARRAY_BUFFER_VIEWS&&P((function(){var t=new dc(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));bc("set",(function(t){mc(this);var e=es(arguments.length>1?arguments[1]:void 0,1),r=B(t);if(xc)return Ot(gc,this,r,e);var n=this.length,o=We(r),i=0;if(o+e>n)throw new vc("Wrong length");for(;i<o;)this[e+i]=r[i++]}),!xc||wc);var Ec=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("slice",(function(t,e){for(var r=Vr(Ec(this),t,e),n=Es(this),o=0,i=r.length,a=new n(i);i>o;)a[o]=r[o++];return a}),P((function(){new Int8Array(1).slice()})));var Ac=Ai.some,Oc=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("some",(function(t){return Ac(Oc(this),t,arguments.length>1?arguments[1]:void 0)}));var Sc=Math.floor,Tc=function(t,e){var r=t.length,n=Sc(r/2);return r<8?kc(t,e):Ic(t,Tc(yu(t,0,n),e),Tc(yu(t,n),e),e)},kc=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},Ic=function(t,e,r,n){for(var o=e.length,i=r.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?n(e[a],r[u])<=0?e[a++]:r[u++]:a<o?e[a++]:r[u++];return t},jc=Tc,Pc=Z.match(/firefox\\/(\\d+)/i),_c=!!Pc&&+Pc[1],Mc=/MSIE|Trident/.test(Z),Lc=Z.match(/AppleWebKit\\/(\\d+)\\./),Rc=!!Lc&&+Lc[1],Nc=Ya.aTypedArray,Cc=Ya.exportTypedArrayMethod,Dc=S.Uint16Array,Fc=Dc&&Br(Dc.prototype.sort),Wc=!(!Fc||P((function(){Fc(new Dc(2),null)}))&&P((function(){Fc(new Dc(2),{})}))),Bc=!!Fc&&!P((function(){if(X)return X<74;if(_c)return _c<67;if(Mc)return!0;if(Rc)return Rc<602;var t,e,r=new Dc(516),n=Array(516);for(t=0;t<516;t++)e=t%4,r[t]=515-t,n[t]=t-2*e+3;for(Fc(r,(function(t,e){return(t/4|0)-(e/4|0)})),t=0;t<516;t++)if(r[t]!==n[t])return!0}));Cc("sort",(function(t){return void 0!==t&&Lt(t),Bc?Fc(this,t):jc(Nc(this),function(t){return function(e,r){return void 0!==t?+t(e,r)||0:r!=r?-1:e!=e?1:0===e&&0===r?1/e>0&&1/r<0?1:-1:e>r}}(t))}),!Bc||Wc);var zc=Ya.aTypedArray;(0,Ya.exportTypedArrayMethod)("subarray",(function(t,e){var r=zc(this),n=r.length,o=Ce(t,n);return new(Es(r))(r.buffer,r.byteOffset+o*r.BYTES_PER_ELEMENT,Fe((void 0===e?n:Ce(e,n))-o))}));var Uc=S.Int8Array,Gc=Ya.aTypedArray,Vc=Ya.exportTypedArrayMethod,Hc=[].toLocaleString,qc=!!Uc&&P((function(){Hc.call(new Uc(1))}));Vc("toLocaleString",(function(){return Wr(Hc,qc?Vr(Gc(this)):Gc(this),Vr(arguments))}),P((function(){return[1,2].toLocaleString()!==new Uc([1,2]).toLocaleString()}))||!P((function(){Uc.prototype.toLocaleString.call([1,2])})));var Zc=Ya.exportTypedArrayMethod,Yc=S.Uint8Array,$c=Yc&&Yc.prototype||{},Kc=[].toString,Qc=N([].join);P((function(){Kc.call({})}))&&(Kc=function(){return Qc(this)});var Xc=$c.toString!==Kc;Zc("toString",Kc,Xc),ar({target:"Array",proto:!0},{fill:pu}),ra("fill");var Jc,tf,ef=String,rf=function(t){if("Symbol"===be(t))throw new TypeError("Cannot convert a Symbol value to a string");return ef(t)},nf=function(){var t=Et(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},of=S.RegExp,af=P((function(){var t=of("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),uf=af||P((function(){return!of("a","y").sticky})),sf={BROKEN_CARET:af||P((function(){var t=of("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:uf,UNSUPPORTED_Y:af},cf=S.RegExp,ff=P((function(){var t=cf(".","s");return!(t.dotAll&&t.test("\\n")&&"s"===t.flags)})),lf=S.RegExp,hf=P((function(){var t=lf("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),pf=fe.get,vf=j("native-string-replace",String.prototype.replace),df=RegExp.prototype.exec,yf=df,gf=N("".charAt),mf=N("".indexOf),bf=N("".replace),xf=N("".slice),wf=(tf=/b*/g,Ot(df,Jc=/a/,"a"),Ot(df,tf,"a"),0!==Jc.lastIndex||0!==tf.lastIndex),Ef=sf.BROKEN_CARET,Af=void 0!==/()??/.exec("")[1];(wf||Af||Ef||ff||hf)&&(yf=function(t){var e,r,n,o,i,a,u,s=this,c=pf(s),f=rf(t),l=c.raw;if(l)return l.lastIndex=s.lastIndex,e=Ot(yf,l,f),s.lastIndex=l.lastIndex,e;var h=c.groups,p=Ef&&s.sticky,v=Ot(nf,s),d=s.source,y=0,g=f;if(p&&(v=bf(v,"y",""),-1===mf(v,"g")&&(v+="g"),g=xf(f,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\\n"!==gf(f,s.lastIndex-1))&&(d="(?: "+d+")",g=" "+g,y++),r=new RegExp("^(?:"+d+")",v)),Af&&(r=new RegExp("^"+d+"$(?!\\\\s)",v)),wf&&(n=s.lastIndex),o=Ot(df,p?r:s,g),p?o?(o.input=xf(o.input,y),o[0]=xf(o[0],y),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:wf&&o&&(s.lastIndex=s.global?o.index+o[0].length:n),Af&&o&&o.length>1&&Ot(vf,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&h)for(o.groups=a=$i(null),i=0;i<h.length;i++)a[(u=h[i])[0]]=o[u[1]];return o});var Of=yf;ar({target:"RegExp",proto:!0,forced:/./.exec!==Of},{exec:Of});var Sf,Tf=it("species"),kf=RegExp.prototype,If=function(t,e,r,n){var o=it(t),i=!P((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),a=i&&!P((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Tf]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var u=Br(/./[o]),s=e(o,""[t],(function(t,e,r,n,o){var a=Br(t),s=e.exec;return s===Of||s===kf.exec?i&&!o?{done:!0,value:u(e,r,n)}:{done:!0,value:a(r,e,n)}:{done:!1}}));he(String.prototype,t,s[0]),he(kf,o,s[1])}n&&re(kf[o],"sham",!0)},jf=N("".charAt),Pf=N("".charCodeAt),_f=N("".slice),Mf=function(t){return function(e,r){var n,o,i=rf(F(e)),a=Le(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Pf(i,a))<55296||n>56319||a+1===u||(o=Pf(i,a+1))<56320||o>57343?t?jf(i,a):n:t?_f(i,a,a+2):o-56320+(n-55296<<10)+65536}},Lf={codeAt:Mf(!1),charAt:Mf(!0)},Rf=Lf.charAt,Nf=function(t,e,r){return e+(r?Rf(t,e).length:1)},Cf=Math.floor,Df=N("".charAt),Ff=N("".replace),Wf=N("".slice),Bf=/\\$([$&\'`]|\\d{1,2}|<[^>]*>)/g,zf=/\\$([$&\'`]|\\d{1,2})/g,Uf=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,s=zf;return void 0!==o&&(o=B(o),s=Bf),Ff(i,s,(function(i,s){var c;switch(Df(s,0)){case"$":return"$";case"&":return t;case"`":return Wf(e,0,r);case"\'":return Wf(e,a);case"<":c=o[Wf(s,1,-1)];break;default:var f=+s;if(0===f)return i;if(f>u){var l=Cf(f/10);return 0===l?i:l<=u?void 0===n[l-1]?Df(s,1):n[l-1]+Df(s,1):i}c=n[f-1]}return void 0===c?"":c}))},Gf=TypeError,Vf=function(t,e){var r=t.exec;if(lt(r)){var n=Ot(r,t,e);return null!==n&&Et(n),n}if("RegExp"===de(t))return Ot(Of,t,e);throw new Gf("RegExp#exec called on incompatible receiver")},Hf=it("replace"),qf=Math.max,Zf=Math.min,Yf=N([].concat),$f=N([].push),Kf=N("".indexOf),Qf=N("".slice),Xf="$0"==="a".replace(/./,"$0"),Jf=!!/./[Hf]&&""===/./[Hf]("a","$0");function tl(t){this.message=t}If("replace",(function(t,e,r){var n=Jf?"$":"$0";return[function(t,r){var n=F(this),o=C(t)?void 0:Rt(t,Hf);return o?Ot(o,t,n,r):Ot(e,rf(n),t,r)},function(t,o){var i=Et(this),a=rf(t);if("string"==typeof o&&-1===Kf(o,n)&&-1===Kf(o,"$<")){var u=r(e,i,a,o);if(u.done)return u.value}var s=lt(o);s||(o=rf(o));var c,f=i.global;f&&(c=i.unicode,i.lastIndex=0);for(var l,h=[];null!==(l=Vf(i,a))&&($f(h,l),f);){""===rf(l[0])&&(i.lastIndex=Nf(a,Fe(i.lastIndex),c))}for(var p,v="",d=0,y=0;y<h.length;y++){for(var g,m=rf((l=h[y])[0]),b=qf(Zf(Le(l.index),a.length),0),x=[],w=1;w<l.length;w++)$f(x,void 0===(p=l[w])?p:String(p));var E=l.groups;if(s){var A=Yf([m],x,b,a);void 0!==E&&$f(A,E),g=rf(Wr(o,void 0,A))}else g=Uf(m,a,b,x,E,o);b>=d&&(v+=Qf(a,d,b)+g,d=b+m.length)}return v+Qf(a,d)}]}),!!P((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Xf||Jf),tl.prototype=new Error,tl.prototype.name="InvalidCharacterError",ar({global:!0,forced:S.globalThis!==S},{globalThis:S}),Sf="undefined"==typeof window?{devicePixelRatio:1,navigator:{userAgent:"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36",browserLanguage:"zh-CN",language:"zh-CN",platform:""},location:"",document:{documentElement:{style:{}},createEvent:function(){return!0},getElementById:function(t){return!0},createElement:function(){return{className:"",classList:{add:function(){return""}}}},createElementNS:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},querySelector:function(){return!1}},performance:{mark:function(t){return null},clearMeasures:function(t){return null},clearMarks:function(t){return null},measure:function(t,e,r){return{duration:0}},now:function(){return(new Date).getTime()}},Blob:"",dispatchEvent:function(t){return!0},Event:function(t,e){return!0},createElement:function(){return!0},createElementNS:function(){return!0},XMLHttpRequest:function(){return!0},addEventListener:function(){return!0},removeEventListener:function(){return!0},requestAnimationFrame:function(){return!0},cancelAnimationFrame:function(){return!0},clearTimeout:function(){return!0}}:window,"undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM?my.getSystemInfoSync().pixelRatio:Sf.devicePixelRatio;var el=TypeError,rl=Object.getOwnPropertyDescriptor,nl=ht&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(gi(t)&&!rl(t,"length").writable)throw new el("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},ol=TypeError,il=function(t){if(t>9007199254740991)throw ol("Maximum allowed index exceeded");return t},al=_i("splice"),ul=Math.max,sl=Math.min;ar({target:"Array",proto:!0,forced:!al},{splice:function(t,e){var r,n,o,i,a,u,s=B(this),c=We(s),f=Ce(t,c),l=arguments.length;for(0===l?r=n=0:1===l?(r=0,n=c-f):(r=l-2,n=sl(ul(Le(e),0),c-f)),il(c+r-n),o=xi(s,n),i=0;i<n;i++)(a=f+i)in s&&ji(o,i,s[a]);if(o.length=n,r<n){for(i=f;i<c-n;i++)u=i+r,(a=i+n)in s?s[u]=s[a]:ls(s,u);for(i=c;i>c-n+r;i--)ls(s,i-1)}else if(r>n)for(i=c-n;i>f;i--)u=i+r-1,(a=i+n-1)in s?s[u]=s[a]:ls(s,u);for(i=0;i<r;i++)s[i+f]=arguments[i+2];return nl(s,c-n+r),o}});var cl=u((function t(e,r){i(this,t),s(this,"cancelBubble",void 0),s(this,"cancelable",void 0),s(this,"target",void 0),s(this,"currentTarget",void 0),s(this,"preventDefault",void 0),s(this,"stopPropagation",void 0),s(this,"type",void 0),s(this,"timeStamp",void 0),this.cancelBubble=!1,this.cancelable=!1,this.target=null,this.currentTarget=null,this.preventDefault=function(){},this.stopPropagation=function(){},this.type=e,this.timeStamp=Date.now()})),fl=Object.assign,ll=Object.defineProperty,hl=N([].concat),pl=!fl||P((function(){if(ht&&1!==fl({b:1},fl(ll({},"a",{enumerable:!0,get:function(){ll(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol("assign detection");return t[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!==fl({},t)[r]||"abcdefghijklmnopqrst"!==Ui(fl({},e)).join("")}))?function(t,e){for(var r=B(t),n=arguments.length,o=1,i=Ye.f,a=Ae.f;n>o;)for(var u,s=Te(arguments[o++]),c=i?hl(Ui(s),i(s)):Ui(s),f=c.length,l=0;f>l;)u=c[l++],ht&&!Ot(a,s,u)||(r[u]=s[u]);return r}:fl;ar({target:"Object",stat:!0,arity:2,forced:Object.assign!==pl},{assign:pl});var vl=Ai.findIndex,dl=!0;"findIndex"in[]&&Array(1).findIndex((function(){dl=!1})),ar({target:"Array",proto:!0,forced:dl},{findIndex:function(t){return vl(this,t,arguments.length>1?arguments[1]:void 0)}}),ra("findIndex");var yl=Lf.charAt,gl=fe.set,ml=fe.getterFor("String Iterator");ba(String,"String",(function(t){gl(this,{type:"String Iterator",string:rf(t),index:0})}),(function(){var t,e=ml(this),r=e.string,n=e.index;return n>=r.length?xa(void 0,!0):(t=yl(r,n),e.index+=t.length,xa(t,!1))}));var bl=!P((function(){return Object.isExtensible(Object.preventExtensions({}))})),xl=Ze.f,wl="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],El={f:function(t){return wl&&"Window"===de(t)?function(t){try{return xl(t)}catch(t){return yu(wl)}}(t):xl(ke(t))}},Al=P((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ol=Object.isExtensible,Sl=P((function(){Ol(1)}))||Al?function(t){return!!vt(t)&&((!Al||"ArrayBuffer"!==de(t))&&(!Ol||Ol(t)))}:Ol,Tl=w((function(t){var e=Gt.f,r=!1,n=q("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},a=t.exports={enable:function(){a.enable=function(){},r=!0;var t=Ze.f,e=N([].splice),o={};o[n]=1,t(o).length&&(Ze.f=function(r){for(var o=t(r),i=0,a=o.length;i<a;i++)if(o[i]===n){e(o,i,1);break}return o},ar({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:El.f}))},fastKey:function(t,e){if(!vt(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!U(t,n)){if(!Sl(t))return"F";if(!e)return"E";i(t)}return t[n].objectID},getWeakData:function(t,e){if(!U(t,n)){if(!Sl(t))return!0;if(!e)return!1;i(t)}return t[n].weakData},onFreeze:function(t){return bl&&r&&Sl(t)&&!U(t,n)&&i(t),t}};ie[n]=!0})),kl=(Tl.enable,Tl.fastKey,Tl.getWeakData,Tl.onFreeze,function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",a=S[t],u=a&&a.prototype,s=a,c={},f=function(t){var e=N(u[t]);he(u,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!vt(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!vt(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!vt(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(or(t,!lt(a)||!(o||u.forEach&&!P((function(){(new a).entries().next()})))))s=r.getConstructor(e,t,n,i),Tl.enable();else if(or(t,!0)){var l=new s,h=l[i](o?{}:-0,1)!==l,p=P((function(){l.has(1)})),v=Mo((function(t){new a(t)})),d=!o&&P((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));v||((s=e((function(t,e){mr(t,u);var r=ss(new a,t,s);return C(e)||ko(e,r[i],{that:r,AS_ENTRIES:n}),r}))).prototype=u,u.constructor=s),(p||d)&&(f("delete"),f("has"),n&&f("get")),(d||h)&&f(i),o&&u.clear&&delete u.clear}return c[t]=s,ar({global:!0,constructor:!0,forced:s!==a},c),pr(s,t),o||r.setStrong(s,t,n),s}),Il=Tl.getWeakData,jl=fe.set,Pl=fe.getterFor,_l=Ai.find,Ml=Ai.findIndex,Ll=N([].splice),Rl=0,Nl=function(t){return t.frozen||(t.frozen=new Cl)},Cl=function(){this.entries=[]},Dl=function(t,e){return _l(t.entries,(function(t){return t[0]===e}))};Cl.prototype={get:function(t){var e=Dl(this,t);if(e)return e[1]},has:function(t){return!!Dl(this,t)},set:function(t,e){var r=Dl(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ml(this.entries,(function(e){return e[0]===t}));return~e&&Ll(this.entries,e,1),!!~e}};var Fl,Wl={getConstructor:function(t,e,r,n){var o=t((function(t,o){mr(t,i),jl(t,{type:e,id:Rl++,frozen:void 0}),C(o)||ko(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=Pl(e),u=function(t,e,r){var n=a(t),o=Il(Et(e),!0);return!0===o?Nl(n).set(e,r):o[n.id]=r,t};return Ja(i,{delete:function(t){var e=a(this);if(!vt(t))return!1;var r=Il(t);return!0===r?Nl(e).delete(t):r&&U(r,e.id)&&delete r[e.id]},has:function(t){var e=a(this);if(!vt(t))return!1;var r=Il(t);return!0===r?Nl(e).has(t):r&&U(r,e.id)}}),Ja(i,r?{get:function(t){var e=a(this);if(vt(t)){var r=Il(t);return!0===r?Nl(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return u(this,t,e)}}:{add:function(t){return u(this,t,!0)}}),o}},Bl=fe.enforce,zl=Object,Ul=Array.isArray,Gl=zl.isExtensible,Vl=zl.isFrozen,Hl=zl.isSealed,ql=zl.freeze,Zl=zl.seal,Yl={},$l={},Kl=!S.ActiveXObject&&"ActiveXObject"in S,Ql=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Xl=kl("WeakMap",Ql,Wl),Jl=Xl.prototype,th=N(Jl.set);if(te)if(Kl){Fl=Wl.getConstructor(Ql,"WeakMap",!0),Tl.enable();var eh=N(Jl.delete),rh=N(Jl.has),nh=N(Jl.get);Ja(Jl,{delete:function(t){if(vt(t)&&!Gl(t)){var e=Bl(this);return e.frozen||(e.frozen=new Fl),eh(this,t)||e.frozen.delete(t)}return eh(this,t)},has:function(t){if(vt(t)&&!Gl(t)){var e=Bl(this);return e.frozen||(e.frozen=new Fl),rh(this,t)||e.frozen.has(t)}return rh(this,t)},get:function(t){if(vt(t)&&!Gl(t)){var e=Bl(this);return e.frozen||(e.frozen=new Fl),rh(this,t)?nh(this,t):e.frozen.get(t)}return nh(this,t)},set:function(t,e){if(vt(t)&&!Gl(t)){var r=Bl(this);r.frozen||(r.frozen=new Fl),rh(this,t)?th(this,t,e):r.frozen.set(t,e)}else th(this,t,e);return this}})}else bl&&P((function(){var t=ql([]);return th(new Xl,t,1),!Vl(t)}))&&Ja(Jl,{set:function(t,e){var r;return Ul(t)&&(Vl(t)?r=Yl:Hl(t)&&(r=$l)),th(this,t,e),r===Yl&&ql(t),r===$l&&Zl(t),this}});var oh=it("iterator"),ih=it("toStringTag"),ah=Oa.values,uh=function(t,e){if(t){if(t[oh]!==ah)try{re(t,oh,ah)}catch(e){t[oh]=ah}if(t[ih]||re(t,ih,e),pi[e])for(var r in Oa)if(t[r]!==Oa[r])try{re(t,r,Oa[r])}catch(e){t[r]=Oa[r]}}};for(var sh in pi)uh(S[sh]&&S[sh].prototype,sh);uh(yi,"DOMTokenList");var ch,fh,lh,hh,ph=new WeakMap,vh=function(){function t(){i(this,t),ph.set(this,{})}return u(t,[{key:"addEventListener",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=ph.get(this);n||(n={}),n[t]||(n[t]=[]),n[t].push(e),ph.set(this,n),r.capture,r.once,r.passive}},{key:"removeEventListener",value:function(t,e){var r=ph.get(this);if(r){var n=r[t];if(n&&n.length>0)for(var o=n.length;o--;o>0)if(n[o]===e){n.splice(o,1);break}}}},{key:"dispatchEvent",value:function(t){var e=ph.get(this)[t.type];if(e){var r,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=g(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(n.s();!(r=n.n()).done;){(0,r.value)(t)}}catch(t){n.e(t)}finally{n.f()}}}}]),t}(),dh=function(t){c(r,t);var e=v(r);function r(){var t;return i(this,r),s(h(t=e.call(this)),"className",void 0),s(h(t),"children",void 0),t.className="",t.children=[],t}return u(r,[{key:"setAttribute",value:function(t,e){this[t]=e}},{key:"getAttribute",value:function(t){return this[t]}},{key:"setAttributeNS",value:function(t,e){this[t]=e}},{key:"getAttributeNS",value:function(t){return this[t]}}]),r}(function(t){c(r,t);var e=v(r);function r(){var t;return i(this,r),s(h(t=e.call(this)),"childNodes",void 0),t.childNodes=[],t}return u(r,[{key:"appendChild",value:function(t){this.childNodes.push(t)}},{key:"cloneNode",value:function(){var t=Object.create(this);return Object.assign(t,this),t}},{key:"removeChild",value:function(t){var e=this.childNodes.findIndex((function(e){return e===t}));return e>-1?this.childNodes.splice(e,1):null}}]),r}(vh));if("undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM){var yh=my.getSystemInfoSync();ch=yh.screenWidth,fh=yh.screenHeight,lh=yh.windowWidth,hh=yh.windowHeight}else{var gh=Sf.innerWidth,mh=Sf.innerHeight;ch=gh,fh=mh,lh=gh,hh=mh}var bh={width:ch,height:fh,availWidth:lh,availHeight:hh,availLeft:0,availTop:0},xh=bh.availWidth,wh=bh.availHeight,Eh={style:[]};function Ah(t,e){var r,n;"parentNode"in t||(r=0===e?function(){return null}:1===e?function(){return Eh}:function(){return null},Object.defineProperty(t,"parentNode",{enumerable:!0,get:r}));"parentElement"in t||(n=0===e?function(){return null}:1===e?function(){return Eh}:function(){return null},Object.defineProperty(t,"parentElement",{enumerable:!0,get:n}))}function Oh(t){t.style=t.style||{},Object.assign(t.style,{top:"0px",left:"0px",width:xh+"px",height:wh+"px",margin:"0px",padding:"0px"})}function Sh(t){"clientLeft"in t||(t.clientLeft=0,t.clientTop=0),"clientWidth"in t||(t.clientWidth=xh,t.clientHeight=wh),"getBoundingClientRect"in t||(t.getBoundingClientRect=function(){return{x:0,y:0,top:0,left:0,width:this.clientWidth,height:this.clientHeight,right:this.clientWidth,bottom:this.clientHeight}})}function Th(t){"offsetLeft"in t||(t.offsetLeft=0,t.offsetTop=0),"offsetWidth"in t||(t.offsetWidth=xh,t.offsetHeight=wh)}function kh(t){"scrollLeft"in t||(t.scrollLeft=0,t.scrollTop=0),"scrollWidth"in t||(t.scrollWidth=xh,t.scrollHeight=wh)}function Ih(t){var e=function(){return!0};t.classList=[],t.classList.add=e,t.classList.remove=e,t.classList.contains=e,t.classList.toggle=e}function jh(){}var Ph=function(t){c(r,t);var e=v(r);function r(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0;return i(this,r),s(h(t=e.call(this)),"className",void 0),s(h(t),"children",void 0),s(h(t),"focus",void 0),s(h(t),"blur",void 0),s(h(t),"insertBefore",void 0),s(h(t),"appendChild",void 0),s(h(t),"removeChild",void 0),s(h(t),"remove",void 0),s(h(t),"innerHTML",void 0),s(h(t),"tagName",void 0),t.className="",t.children=[],t.focus=jh,t.blur=jh,t.insertBefore=jh,t.appendChild=jh,t.removeChild=jh,t.remove=jh,t.innerHTML="",t.tagName=n.toUpperCase(),Ah(h(t),o),Oh(h(t)),Ih(h(t)),Sh(h(t)),Th(h(t)),kh(h(t)),t}return u(r)}(dh),_h=function(t){c(r,t);var e=v(r);function r(){return i(this,r),e.call(this,"video")}return u(r)}(function(t){c(r,t);var e=v(r);function r(t){return i(this,r),e.call(this,t)}return u(r,[{key:"addTextTrack",value:function(){}},{key:"captureStream",value:function(){}},{key:"fastSeek",value:function(){}},{key:"load",value:function(){}},{key:"pause",value:function(){}},{key:"play",value:function(){}}]),r}(Ph)),Mh={};function Lh(){return Mh}var Rh=u((function t(){i(this,t);var e=Lh(),r=e.createImage&&e.createImage()||{};return"tagName"in r||(r.tagName="IMG",r.__proto__=t.prototype),Ah(r),Ih(r),Object.assign(r,{addEventListener:function(t,e){r["on".concat(t)]=e.bind(r)},removeEventListener:function(t){r["on".concat(t)]=null}}),r})),Nh={href:"",protocol:"",host:""},Ch=function(t){c(r,t);var e=v(r);function r(){return i(this,r),e.call(this,"body",0)}return u(r,[{key:"addEventListener",value:function(t,e){}},{key:"removeEventListener",value:function(t,e,r){}},{key:"dispatchEvent",value:function(t){}}]),r}(Ph),Dh=function(t){c(r,t);var e=v(r);function r(){return i(this,r),e.call(this,"html",0)}return u(r,[{key:"addEventListener",value:function(t,e){}},{key:"removeEventListener",value:function(t,e){}},{key:"dispatchEvent",value:function(t){}}]),r}(Ph),Fh={},Wh={readyState:"complete",visibilityState:"visible",hidden:!1,fullscreen:!0,scripts:[],style:{},location:Nh,ontouchstart:null,ontouchmove:null,ontouchend:null,onvisibilitychange:null,parentNode:null,parentElement:null,head:null,body:null,documentElement:{style:[]},createElement:function(t){return"canvas"===(t=t.toLowerCase())?my.createOffscreenCanvas(1024,128,"2d"):"img"===t?new Rh:"video"===t?new _h:new Ph(t)},createElementNS:function(t,e){return this.createElement(e)},createTextNode:function(t){return t},getElementById:function(t){return null},getElementsByTagName:function(t){return t=t.toLowerCase(),[]},getElementsByTagNameNS:function(t,e){return this.getElementsByTagName(e)},getElementsByName:function(t){return[]},querySelector:function(t){return null},querySelectorAll:function(t){return[]},addEventListener:function(t,e,r){Fh[t]||(Fh[t]=[]),Fh[t].push(e)},removeEventListener:function(t,e){var r=Fh[t];if(r&&r.length>0)for(var n=r.length;n--;n>0)if(r[n]===e){r.splice(n,1);break}},dispatchEvent:function(t){var e=t.type,r=Fh[e];if(r)for(var n=0;n<r.length;n++)r[n](t);t.target&&"function"==typeof t.target["on"+e]&&t.target["on"+e](t)},createEvent:function(t){return new cl(t)}};Wh.documentElement=new Dh,Wh.head=new Ph("head"),Wh.body=new Ch,If("match",(function(t,e,r){return[function(e){var r=F(this),n=C(e)?void 0:Rt(e,t);return n?Ot(n,e,r):new RegExp(e)[t](rf(r))},function(t){var n=Et(this),o=rf(t),i=r(e,n,o);if(i.done)return i.value;if(!n.global)return Vf(n,o);var a=n.unicode;n.lastIndex=0;for(var u,s=[],c=0;null!==(u=Vf(n,o));){var f=rf(u[0]);s[c]=f,""===f&&(n.lastIndex=Nf(o,Fe(n.lastIndex),a)),c++}return 0===c?null:s}]}));var Bh,zh,Uh=it("isConcatSpreadable"),Gh=X>=51||!P((function(){var t=[];return t[Uh]=!1,t.concat()[0]!==t})),Vh=function(t){if(!vt(t))return!1;var e=t[Uh];return void 0!==e?!!e:gi(t)},Hh=!Gh||!_i("concat");if(ar({target:"Array",proto:!0,arity:1,forced:Hh},{concat:function(t){var e,r,n,o,i,a=B(this),u=xi(a,0),s=0;for(e=-1,n=arguments.length;e<n;e++)if(Vh(i=-1===e?a:arguments[e]))for(o=We(i),il(s+o),r=0;r<o;r++,s++)r in i&&ji(u,s,i[r]);else il(s+1),ji(u,s++,i);return u.length=s,u}}),"undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM){var qh=my.getSystemInfoSync();Bh=qh.system,qh.platform,qh.language}else{var Zh={versions:(zh=Sf.navigator.userAgent,{trident:zh.indexOf("Trident")>-1,presto:zh.indexOf("Presto")>-1,webKit:zh.indexOf("AppleWebKit")>-1,gecko:zh.indexOf("Gecko")>-1&&-1===zh.indexOf("KHTML"),mobile:!!zh.match(/AppleWebKit.*Mobile.*/),ios:!!zh.match(/\\(i[^;]+;( U;)? CPU.+Mac OS X/),android:zh.indexOf("Android")>-1||zh.indexOf("Linux")>-1,iPhone:zh.indexOf("iPhone")>-1,iPad:zh.indexOf("iPad")>-1,webApp:-1===zh.indexOf("Safari"),weixin:zh.indexOf("MicroMessenger")>-1,qq:" qq"===zh.match(/\\sQQ/i)}),language:(Sf.navigator.browserLanguage||Sf.navigator.language).toLowerCase()};Zh.versions.android?"android":Zh.versions.trident?"IE":Zh.versions.presto?"Opera":Zh.versions.webKit?"webKit":Zh.versions.gecko?"Firefox":Zh.versions.mobile?"mobile":Zh.versions.ios?"ios":Zh.versions.iPhone?"iPhone":Zh.versions.iPad?"ipad":Zh.versions.webApp?"webApp":Zh.versions.weixin?"weixin":Zh.versions.qq&&"qq",Bh=Sf.navigator.userAgent,Zh.language}Bh.toLowerCase().indexOf("android");cs("Uint8",(function(t){return function(e,r,n){return t(this,e,r,n)}}));var Yh=Tl.fastKey,$h=fe.set,Kh=fe.getterFor;kl("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,r,n){var o=t((function(t,o){mr(t,i),$h(t,{type:e,index:$i(null),first:void 0,last:void 0,size:0}),ht||(t.size=0),C(o)||ko(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=Kh(e),u=function(t,e,r){var n,o,i=a(t),u=s(t,e);return u?u.value=r:(i.last=u={index:o=Yh(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=u),n&&(n.next=u),ht?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},s=function(t,e){var r,n=a(t),o=Yh(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===e)return r};return Ja(i,{clear:function(){for(var t=a(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,ht?t.size=0:this.size=0},delete:function(t){var e=a(this),r=s(this,t);if(r){var n=r.next,o=r.previous;delete e.index[r.index],r.removed=!0,o&&(o.next=n),n&&(n.previous=o),e.first===r&&(e.first=n),e.last===r&&(e.last=o),ht?e.size--:this.size--}return!!r},forEach:function(t){for(var e,r=a(this),n=Ur(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!s(this,t)}}),Ja(i,r?{get:function(t){var e=s(this,t);return e&&e.value},set:function(t,e){return u(this,0===t?0:t,e)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),ht&&vr(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=Kh(e),i=Kh(n);ba(t,e,(function(t,e){$h(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?xa("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=void 0,xa(void 0,!0))}),r?"entries":"values",!r,!0),yr(e)}});var Qh=N([].join),Xh=Te!==Object||!Oi("join",",");ar({target:"Array",proto:!0,forced:Xh},{join:function(t){return Qh(ke(this),void 0===t?",":t)}});var Jh=Ai.map,tp=_i("map");ar({target:"Array",proto:!0,forced:!tp},{map:function(t){return Jh(this,t,arguments.length>1?arguments[1]:void 0)}});var ep=P((function(){Ui(1)}));ar({target:"Object",stat:!0,forced:ep},{keys:function(t){return Ui(B(t))}});var rp=new Map,np=new Map,op=new Map,ip=function(t){c(r,t);var e=v(r);function r(){var t;return i(this,r),s(h(t=e.call(this)),"onabort",void 0),s(h(t),"onerror",void 0),s(h(t),"onload",void 0),s(h(t),"onloadstart",void 0),s(h(t),"onprogress",void 0),s(h(t),"ontimeout",void 0),s(h(t),"onloadend",void 0),s(h(t),"onreadystatechange",void 0),s(h(t),"readyState",void 0),s(h(t),"response",void 0),s(h(t),"responseText",void 0),s(h(t),"_responseType",void 0),s(h(t),"responseXML",void 0),s(h(t),"status",void 0),s(h(t),"statusText",void 0),s(h(t),"upload",void 0),s(h(t),"withCredentials",void 0),s(h(t),"timeout",void 0),s(h(t),"_url",void 0),s(h(t),"_method",void 0),t.onabort=null,t.onerror=null,t.onload=null,t.onloadstart=null,t.onprogress=null,t.ontimeout=null,t.onloadend=null,t.onreadystatechange=null,t.readyState=0,t.response=null,t.responseText=null,t._responseType="text",t.responseXML=null,t.status=0,t.statusText="",t.upload={},t.withCredentials=!1,rp.set("requestHeader",{"content-type":"application/x-www-form-urlencoded"}),t}return u(r,[{key:"responseType",set:function(t){this._responseType=t}},{key:"abort",value:function(){var t=op.get("requestTask");t&&t.abort()}},{key:"getAllResponseHeaders",value:function(){var t=np.get("responseHeader");return Object.keys(t).map((function(e){return"".concat(e,": ").concat(t[e])})).join("\\n")}},{key:"getResponseHeader",value:function(t){return np.get("responseHeader")[t]}},{key:"open",value:function(t,e,r){this._method=t,this._url=e}},{key:"overrideMimeType",value:function(){}},{key:"send",value:function(){}},{key:"setRequestHeader",value:function(t,e){var r=rp.get("requestHeader");r[t]=e,rp.set("requestHeader",r)}},{key:"addEventListener",value:function(t,e){var r=this;"function"==typeof e&&(this["on"+t]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.target=t.target||r,e.call(r,t)})}},{key:"removeEventListener",value:function(t,e){this["on"+t]===e&&(this["on"+t]=null)}}]),r}(vh);s(ip,"UNSEND",void 0),s(ip,"OPENED",void 0),s(ip,"HEADERS_RECEIVED",void 0),s(ip,"LOADING",void 0),s(ip,"DONE",void 0),ip.UNSEND=0,ip.OPENED=1,ip.HEADERS_RECEIVED=2,ip.LOADING=3,ip.DONE=4;var ap="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,up="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram),sp=(ap||up)&&!1;sp||Sf.XMLHttpRequest,sp||Sf.location;function cp(t){return[t+1&255,t+1>>8&255,t+1>>8>>8&255]}var fp=Ai.filter,lp=_i("filter");function hp(t){var e=t.color;return e&&e.length?e:[1,1,1,1]}function pp(t,e,r){return 2===r.length?[r[0],r[1],0]:[r[0],r[1],r[2]]}function vp(t){return t.filter?[1]:[0]}function dp(t,e){return[e]}ar({target:"Array",proto:!0,forced:!lp},{filter:function(t){return fp(this,t,arguments.length>1?arguments[1]:void 0)}});var yp=mp,gp=mp;function mp(t,e,r){r=r||2;var n,o,i,a,u,s,c,f=e&&e.length,l=f?e[0]*r:t.length,h=bp(t,0,l,r,!0),p=[];if(!h||h.next===h.prev)return p;if(f&&(h=function(t,e,r,n){var o,i,a,u,s,c=[];for(o=0,i=e.length;o<i;o++)a=e[o]*n,u=o<i-1?e[o+1]*n:t.length,(s=bp(t,a,u,n,!1))===s.next&&(s.steiner=!0),c.push(Pp(s));for(c.sort(Tp),o=0;o<c.length;o++)r=kp(c[o],r);return r}(t,e,h,r)),t.length>80*r){n=i=t[0],o=a=t[1];for(var v=r;v<l;v+=r)(u=t[v])<n&&(n=u),(s=t[v+1])<o&&(o=s),u>i&&(i=u),s>a&&(a=s);c=0!==(c=Math.max(i-n,a-o))?32767/c:0}return wp(h,p,r,n,o,c,0),p}function bp(t,e,r,n,o){var i,a;if(o===Gp(t,e,r,n)>0)for(i=e;i<r;i+=n)a=Bp(i,t[i],t[i+1],a);else for(i=r-n;i>=e;i-=n)a=Bp(i,t[i],t[i+1],a);return a&&Rp(a,a.next)&&(zp(a),a=a.next),a}function xp(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!Rp(n,n.next)&&0!==Lp(n.prev,n,n.next))n=n.next;else{if(zp(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function wp(t,e,r,n,o,i,a){if(t){!a&&i&&function(t,e,r,n){var o=t;do{0===o.z&&(o.z=jp(o.x,o.y,e,r,n)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,r,n,o,i,a,u,s,c=1;do{for(r=t,t=null,i=null,a=0;r;){for(a++,n=r,u=0,e=0;e<c&&(u++,n=n.nextZ);e++);for(s=c;u>0||s>0&&n;)0!==u&&(0===s||!n||r.z<=n.z)?(o=r,r=r.nextZ,u--):(o=n,n=n.nextZ,s--),i?i.nextZ=o:t=o,o.prevZ=i,i=o;r=n}i.nextZ=null,c*=2}while(a>1)}(o)}(t,n,o,i);for(var u,s,c=t;t.prev!==t.next;)if(u=t.prev,s=t.next,i?Ap(t,n,o,i):Ep(t))e.push(u.i/r|0),e.push(t.i/r|0),e.push(s.i/r|0),zp(t),t=s.next,c=s.next;else if((t=s)===c){a?1===a?wp(t=Op(xp(t),e,r),e,r,n,o,i,2):2===a&&Sp(t,e,r,n,o,i):wp(xp(t),e,r,n,o,i,1);break}}}function Ep(t){var e=t.prev,r=t,n=t.next;if(Lp(e,r,n)>=0)return!1;for(var o=e.x,i=r.x,a=n.x,u=e.y,s=r.y,c=n.y,f=o<i?o<a?o:a:i<a?i:a,l=u<s?u<c?u:c:s<c?s:c,h=o>i?o>a?o:a:i>a?i:a,p=u>s?u>c?u:c:s>c?s:c,v=n.next;v!==e;){if(v.x>=f&&v.x<=h&&v.y>=l&&v.y<=p&&_p(o,u,i,s,a,c,v.x,v.y)&&Lp(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function Ap(t,e,r,n){var o=t.prev,i=t,a=t.next;if(Lp(o,i,a)>=0)return!1;for(var u=o.x,s=i.x,c=a.x,f=o.y,l=i.y,h=a.y,p=u<s?u<c?u:c:s<c?s:c,v=f<l?f<h?f:h:l<h?l:h,d=u>s?u>c?u:c:s>c?s:c,y=f>l?f>h?f:h:l>h?l:h,g=jp(p,v,e,r,n),m=jp(d,y,e,r,n),b=t.prevZ,x=t.nextZ;b&&b.z>=g&&x&&x.z<=m;){if(b.x>=p&&b.x<=d&&b.y>=v&&b.y<=y&&b!==o&&b!==a&&_p(u,f,s,l,c,h,b.x,b.y)&&Lp(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,x.x>=p&&x.x<=d&&x.y>=v&&x.y<=y&&x!==o&&x!==a&&_p(u,f,s,l,c,h,x.x,x.y)&&Lp(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;b&&b.z>=g;){if(b.x>=p&&b.x<=d&&b.y>=v&&b.y<=y&&b!==o&&b!==a&&_p(u,f,s,l,c,h,b.x,b.y)&&Lp(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;x&&x.z<=m;){if(x.x>=p&&x.x<=d&&x.y>=v&&x.y<=y&&x!==o&&x!==a&&_p(u,f,s,l,c,h,x.x,x.y)&&Lp(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Op(t,e,r){var n=t;do{var o=n.prev,i=n.next.next;!Rp(o,i)&&Np(o,n,n.next,i)&&Fp(o,i)&&Fp(i,o)&&(e.push(o.i/r|0),e.push(n.i/r|0),e.push(i.i/r|0),zp(n),zp(n.next),n=t=i),n=n.next}while(n!==t);return xp(n)}function Sp(t,e,r,n,o,i){var a=t;do{for(var u=a.next.next;u!==a.prev;){if(a.i!==u.i&&Mp(a,u)){var s=Wp(a,u);return a=xp(a,a.next),s=xp(s,s.next),wp(a,e,r,n,o,i,0),void wp(s,e,r,n,o,i,0)}u=u.next}a=a.next}while(a!==t)}function Tp(t,e){return t.x-e.x}function kp(t,e){var r=function(t,e){var r,n=e,o=t.x,i=t.y,a=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){var u=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(u<=o&&u>a&&(a=u,r=n.x<n.next.x?n:n.next,u===o))return r}n=n.next}while(n!==e);if(!r)return null;var s,c=r,f=r.x,l=r.y,h=1/0;n=r;do{o>=n.x&&n.x>=f&&o!==n.x&&_p(i<l?o:a,i,f,l,i<l?a:o,i,n.x,n.y)&&(s=Math.abs(i-n.y)/(o-n.x),Fp(n,t)&&(s<h||s===h&&(n.x>r.x||n.x===r.x&&Ip(r,n)))&&(r=n,h=s)),n=n.next}while(n!==c);return r}(t,e);if(!r)return e;var n=Wp(r,t);return xp(n,n.next),xp(r,r.next)}function Ip(t,e){return Lp(t.prev,t,e.prev)<0&&Lp(e.next,t,t.next)<0}function jp(t,e,r,n,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*o|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*o|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Pp(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function _p(t,e,r,n,o,i,a,u){return(o-a)*(e-u)>=(t-a)*(i-u)&&(t-a)*(n-u)>=(r-a)*(e-u)&&(r-a)*(i-u)>=(o-a)*(n-u)}function Mp(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Np(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(Fp(t,e)&&Fp(e,t)&&function(t,e){var r=t,n=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{r.y>i!=r.next.y>i&&r.next.y!==r.y&&o<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(Lp(t.prev,t,e.prev)||Lp(t,e.prev,e))||Rp(t,e)&&Lp(t.prev,t,t.next)>0&&Lp(e.prev,e,e.next)>0)}function Lp(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Rp(t,e){return t.x===e.x&&t.y===e.y}function Np(t,e,r,n){var o=Dp(Lp(t,e,r)),i=Dp(Lp(t,e,n)),a=Dp(Lp(r,n,t)),u=Dp(Lp(r,n,e));return o!==i&&a!==u||(!(0!==o||!Cp(t,r,e))||(!(0!==i||!Cp(t,n,e))||(!(0!==a||!Cp(r,t,n))||!(0!==u||!Cp(r,e,n)))))}function Cp(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Dp(t){return t>0?1:t<0?-1:0}function Fp(t,e){return Lp(t.prev,t,t.next)<0?Lp(t,e,t.next)>=0&&Lp(t,t.prev,e)>=0:Lp(t,e,t.prev)<0||Lp(t,t.next,e)<0}function Wp(t,e){var r=new Up(t.i,t.x,t.y),n=new Up(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,r.next=o,o.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function Bp(t,e,r,n){var o=new Up(t,e,r);return n?(o.next=n.next,o.prev=n,n.next.prev=o,n.next=o):(o.prev=o,o.next=o),o}function zp(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Up(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Gp(t,e,r,n){for(var o=0,i=e,a=r-n;i<r;i+=n)o+=(t[a]-t[i])*(t[i+1]+t[a+1]),a=i;return o}mp.deviation=function(t,e,r,n){var o=e&&e.length,i=o?e[0]*r:t.length,a=Math.abs(Gp(t,0,i,r));if(o)for(var u=0,s=e.length;u<s;u++){var c=e[u]*r,f=u<s-1?e[u+1]*r:t.length;a-=Math.abs(Gp(t,c,f,r))}var l=0;for(u=0;u<n.length;u+=3){var h=n[u]*r,p=n[u+1]*r,v=n[u+2]*r;l+=Math.abs((t[h]-t[v])*(t[p+1]-t[h+1])-(t[h]-t[p])*(t[v+1]-t[h+1]))}return 0===a&&0===l?0:Math.abs((l-a)/a)},mp.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},n=0,o=0;o<t.length;o++){for(var i=0;i<t[o].length;i++)for(var a=0;a<e;a++)r.vertices.push(t[o][i][a]);o>0&&(n+=t[o-1].length,r.holes.push(n))}return r},yp.default=gp;var Vp=S,Hp=N(1..valueOf),qp="\\t\\n\\v\\f\\r                 \\u2028\\u2029\\ufeff",Zp=N("".replace),Yp=RegExp("^["+qp+"]+"),$p=RegExp("(^|[^"+qp+"])["+qp+"]+$"),Kp=function(t){return function(e){var r=rf(F(e));return 1&t&&(r=Zp(r,Yp,"")),2&t&&(r=Zp(r,$p,"$1")),r}},Qp={start:Kp(1),end:Kp(2),trim:Kp(3)},Xp=Ze.f,Jp=je.f,tv=Gt.f,ev=Qp.trim,rv=S.Number,nv=(Vp.Number,rv.prototype),ov=S.TypeError,iv=N("".slice),av=N("".charCodeAt),uv=function(t){var e=Ft(t,"number");return"bigint"==typeof e?e:sv(e)},sv=function(t){var e,r,n,o,i,a,u,s,c=Ft(t,"number");if(jt(c))throw new ov("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=ev(c),43===(e=av(c,0))||45===e){if(88===(r=av(c,2))||120===r)return NaN}else if(48===e){switch(av(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=iv(c,2)).length,u=0;u<a;u++)if((s=av(i,u))<48||s>o)return NaN;return parseInt(i,n)}return+c},cv=or("Number",!rv(" 0o1")||!rv("0b1")||rv("+0x1")),fv=function(t){return kt(nv,t)&&P((function(){Hp(t)}))},lv=function(t){var e=arguments.length<1?0:rv(uv(t));return fv(this)?ss(Object(e),this,lv):e};lv.prototype=nv,cv&&(nv.constructor=lv),ar({global:!0,constructor:!0,wrap:!0,forced:cv},{Number:lv});cv&&function(t,e){for(var r,n=ht?Xp(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)U(e,r=n[o])&&!U(t,r)&&tv(t,r,Jp(e,r))}(Vp.Number,rv);var hv=RangeError,pv=RangeError,vv=String,dv=Math.floor,yv=N((function(t){var e=rf(F(this)),r="",n=Le(t);if(n<0||n===1/0)throw new hv("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r})),gv=N("".slice),mv=N(1..toFixed),bv=function(t,e,r){return 0===e?r:e%2==1?bv(t,e-1,r*t):bv(t*t,e/2,r)},xv=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=dv(o/1e7)},wv=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=dv(n/e),n=n%e*1e7},Ev=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=vv(t[e]);r=""===r?n:r+yv("0",7-n.length)+n}return r},Av=P((function(){return"0.000"!==mv(8e-5,3)||"1"!==mv(.9,0)||"1.25"!==mv(1.255,2)||"1000000000000000128"!==mv(0xde0b6b3a7640080,0)}))||!P((function(){mv({})}));function Ov(t){return"number"==typeof t}ar({target:"Number",proto:!0,forced:Av},{toFixed:function(t){var e,r,n,o,i=Hp(this),a=Le(t),u=[0,0,0,0,0,0],s="",c="0";if(a<0||a>20)throw new pv("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return vv(i);if(i<0&&(s="-",i=-i),i>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(i*bv(2,69,1))-69)<0?i*bv(2,-e,1):i/bv(2,e,1),r*=4503599627370496,(e=52-e)>0){for(xv(u,0,r),n=a;n>=7;)xv(u,1e7,0),n-=7;for(xv(u,bv(10,n,1),0),n=e-1;n>=23;)wv(u,1<<23),n-=23;wv(u,1<<n),xv(u,1,1),wv(u,2),c=Ev(u)}else xv(u,0,r),xv(u,1<<-e,0),c=Ev(u)+yv("0",a);return c=a>0?s+((o=c.length)<=a?"0."+yv("0",a-o)+c:gv(c,0,o-a)+"."+gv(c,o-a)):s+c}});var Sv=S.isFinite,Tv=Number.isFinite||function(t){return"number"==typeof t&&Sv(t)};ar({target:"Number",stat:!0},{isFinite:Tv});var kv="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Iv=Math.log,jv=Math.LN2;function Pv(){var t=new kv(2);return kv!=Float32Array&&(t[0]=0,t[1]=0),t}function _v(t,e){var r=new kv(2);return r[0]=t,r[1]=e,r}function Mv(t,e){return t[0]=e[0],t[1]=e[1],t}function Lv(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function Rv(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function Nv(t,e){var r=e[0],n=e[1],o=r*r+n*n;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t}function Cv(t,e){return t[0]*e[0]+t[1]*e[1]}ar({target:"Math",stat:!0},{log2:function(t){return Iv(t)/jv}});var Dv,Fv=Rv;Dv=Pv();function Wv(t){var e=function(t){return Math.pow(2,t)}(t);return function(t,e){if(!t)throw new Error(e||"viewport-mercator-project: assertion failed.")}(Number.isFinite(e)),512*e}function Bv(t,e){if(t){var r=d(t||[],2),n=r[0],o=r[1];return e.getCRS().fromWGS84([n,o])}}var zv={};function Uv(t){return function(t,e,r,n){var o=[t[0],t[1]],i=t.slice(2);if(!e)return t;var a=e.getZoom(),u=Bv(o,e),s=function(t){return t.getCRS().getExtent()}(e),c=r||Wv(a),f=s[2]-s[0],l=s[3]-s[1],h=n?Bv(n,e):[s[0],s[3]],p=(u[0]-h[0])/f;return o[0]>180&&(p+=1),o[0]<-180&&(p-=1),[p*c,(h[1]-u[1])/l*c].concat(y(i))}(t,zv.map,256*Math.pow(2,20))}var Gv,Vv=/"/g,Hv=N("".replace);ar({target:"String",proto:!0,forced:(Gv="sub",P((function(){var t=""[Gv](\'"\');return t!==t.toLowerCase()||t.split(\'"\').length>3})))},{sub:function(){return t="sub",e="",r="",n=rf(F(this)),o="<"+t,""!==e&&(o+=" "+e+\'="\'+Hv(rf(r),Vv,"&quot;")+\'"\'),o+">"+n+"</"+t+">";var t,e,r,n,o}});var qv=RegExp.prototype,Zv=Zt.PROPER,Yv=RegExp.prototype.toString,$v=P((function(){return"/a/b"!==Yv.call({source:"a",flags:"b"})})),Kv=Zv&&"toString"!==Yv.name;($v||Kv)&&he(RegExp.prototype,"toString",(function(){var t=Et(this);return"/"+rf(t.source)+"/"+rf(function(t){var e=t.flags;return void 0!==e||"flags"in qv||U(t,"flags")||!kt(qv,t)?e:Ot(nf,t)}(t))}),{unsafe:!0});var Qv=Pv(),Xv=(Pv(),Pv()),Jv=Pv(),td=Pv();function ed(t,e,r,n,o){return Lv(t,r,n),Nv(t,t),[o/Cv(e=_v(-t[1],t[0]),_v(-r[1],r[0])),e]}function rd(t,e){return function(t,e,r){return t[0]=e,t[1]=r,t}(t,-e[1],e[0])}function nd(t,e,r){return Fv(t,e,r),Nv(t,t),t}function od(t,e){return t[0]===e[0]&&t[1]===e[1]}var id=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),s(this,"complex",void 0),s(this,"join",void 0),s(this,"cap",void 0),s(this,"miterLimit",void 0),s(this,"thickness",void 0),s(this,"normal",void 0),s(this,"lastFlip",-1),s(this,"miter",_v(0,0)),s(this,"started",!1),s(this,"dash",!1),s(this,"totalDistance",0),s(this,"currentIndex",0),this.join=e.join||"miter",this.cap=e.cap||"butt",this.miterLimit=e.miterLimit||10,this.thickness=e.thickness||1,this.dash=e.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return u(t,[{key:"extrude_gaode2",value:function(t,e){var r=this.complex;if(t.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=t.length,o=r.startIndex,i=1;i<n;i++){var a,u,s,c=t[i-1];c.push(null!==(a=e[i-1][2])&&void 0!==a?a:0);var f=e[i-1],l=t[i];l.push(null!==(u=e[i][2])&&void 0!==u?u:0);var h=e[i],p=i<t.length-1?[].concat(y(t[i+1]),[null!==(s=e[i+1][2])&&void 0!==s?s:0]):null,v=i<e.length-1?e[i+1]:null;o+=this.segment_gaode2(r,o,c,l,p,f,h,v)}if(this.dash)for(var d=0;d<r.positions.length/6;d++)r.positions[6*d+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"simpleExtrude_gaode2",value:function(t,e){var r=this.complex;if(t.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=t.length,o=r.startIndex,i=1;i<n;i++){var a,u,s,c=t[i-1];c.push(null!==(a=e[i-1][2])&&void 0!==a?a:0);var f=e[i-1],l=t[i];l.push(null!==(u=e[i][2])&&void 0!==u?u:0);var h=e[i],p=i<t.length-1?[].concat(y(t[i+1]),[null!==(s=e[i+1][2])&&void 0!==s?s:0]):null,v=i<e.length-1?e[i+1]:null;o+=this.simpleSegment(r,o,c,l,p,f,h,v)}if(this.dash)for(var d=0;d<r.positions.length/6;d++)r.positions[6*d+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"extrude",value:function(t){var e=this.complex;if(t.length<=1)return e;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=t.length,n=e.startIndex,o=1;o<r;o++){var i=t[o-1],a=t[o],u=o<t.length-1?t[o+1]:null;n+=this.segment(e,n,i,a,u)}if(this.dash)for(var s=0;s<e.positions.length/6;s++)e.positions[6*s+5]=this.totalDistance;return e.startIndex=e.positions.length/6,e}},{key:"simpleExtrude",value:function(t){var e=this.complex;if(t.length<=1)return e;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=t.length,n=e.startIndex,o=1;o<r;o++){var i=t[o-1],a=t[o],u=o<t.length-1?t[o+1]:null;n+=this.simpleSegment(e,n,i,a,u)}if(this.dash)for(var s=0;s<e.positions.length/6;s++)e.positions[6*s+5]=this.totalDistance;return e.startIndex=e.positions.length/6,e}},{key:"segment_gaode2",value:function(t,e,r,n,o,i,a,u){var s=0,c=t.indices,f=t.positions,l=t.normals,h="square"===this.cap,p="bevel"===this.join,v=Uv([a[0],a[1]]),g=Uv([i[0],i[1]]);nd(Xv,n,r);var m=0;if(this.dash&&(m=this.lineSegmentDistance(v,g),this.totalDistance+=m),this.normal||(this.normal=Pv(),rd(this.normal,Xv)),!this.started)if(this.started=!0,h){var b=Pv(),x=Pv();Lv(b,this.normal,Xv),Lv(x,this.normal,Xv),l.push(x[0],x[1],0),l.push(b[0],b[1],0),f.push(r[0],r[1],0|r[2],this.totalDistance-m,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),f.push(r[0],r[1],0|r[2],this.totalDistance-m,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,l,r,this.normal,this.thickness,this.totalDistance-m);if(c.push(e+0,e+1,e+2),o){od(n,o)&&Lv(o,n,Nv(o,Rv(o,n,r))),nd(Jv,o,n);var w=d(ed(td,Pv(),Xv,Jv,this.thickness),2),E=w[0],A=w[1],O=Cv(td,this.normal)<0?-1:1,S=p;if(!S&&"miter"===this.join)E>this.miterLimit&&(S=!0);S?(l.push(this.normal[0],this.normal[1],0),l.push(A[0],A[1],0),f.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*O,0|n[2]),this.complex.indexes.push(this.currentIndex),f.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*O,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c.push.apply(c,y(this.lastFlip!==-O?[e,e+2,e+3]:[e+2,e+1,e+3])),c.push(e+2,e+3,e+4),rd(Qv,Jv),Mv(this.normal,Qv),l.push(this.normal[0],this.normal[1],0),f.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*O,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,s+=3):(this.extrusions(f,l,n,A,E,this.totalDistance),c.push.apply(c,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),O=-1,Mv(this.normal,A),s+=2),this.lastFlip=O}else{if(rd(this.normal,Xv),h){var T=Pv(),k=Pv();Fv(k,Xv,this.normal),Lv(T,Xv,this.normal),l.push(k[0],k[1],0),l.push(T[0],T[1],0),f.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),f.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(f,l,n,this.normal,this.thickness,this.totalDistance);c.push.apply(c,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),s+=2}return s}},{key:"simpleSegment",value:function(t,e,r,n,o){var i=0,a=t.indices,u=t.positions,s=t.normals,c=Uv([n[0],n[1]]),f=Uv([r[0],r[1]]);nd(Xv,c,f);var l=0;if(this.dash&&(l=this.lineSegmentDistance(c,f),this.totalDistance+=l),this.normal||(this.normal=Pv(),rd(this.normal,Xv)),this.started||(this.started=!0,this.extrusions(u,s,r,this.normal,this.thickness,this.totalDistance-l)),a.push(e+0,e+1,e+2),o){var h=Uv([o[0],o[1]]);od(c,h)&&Lv(h,c,Nv(h,Rv(h,c,f))),nd(Jv,h,c);var p=d(ed(td,Pv(),Xv,Jv,this.thickness),2),v=p[0],g=p[1];Cv(td,this.normal);this.extrusions(u,s,n,g,v,this.totalDistance),a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),-1,Mv(this.normal,g),i+=2,this.lastFlip=-1}else rd(this.normal,Xv),this.extrusions(u,s,n,this.normal,this.thickness,this.totalDistance),a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),i+=2;return i}},{key:"segment",value:function(t,e,r,n,o){var i=0,a=t.indices,u=t.positions,s=t.normals,c="square"===this.cap,f="bevel"===this.join,l=Uv([n[0],n[1]]),h=Uv([r[0],r[1]]);nd(Xv,l,h);var p=0;if(this.dash&&(p=this.lineSegmentDistance(l,h),this.totalDistance+=p),this.normal||(this.normal=Pv(),rd(this.normal,Xv)),!this.started)if(this.started=!0,c){var v=Pv(),g=Pv();Lv(v,this.normal,Xv),Lv(g,this.normal,Xv),s.push(g[0],g[1],0),s.push(v[0],v[1],0),u.push(r[0],r[1],0|r[2],this.totalDistance-p,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),u.push(r[0],r[1],0|r[2],this.totalDistance-p,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(u,s,r,this.normal,this.thickness,this.totalDistance-p);if(a.push(e+0,e+1,e+2),o){var m=Uv([o[0],o[1]]);od(l,m)&&Lv(m,l,Nv(m,Rv(m,l,h))),nd(Jv,m,l);var b=d(ed(td,Pv(),Xv,Jv,this.thickness),2),x=b[0],w=b[1],E=Cv(td,this.normal)<0?-1:1,A=f;if(!A&&"miter"===this.join)x>this.miterLimit&&(A=!0);A?(s.push(this.normal[0],this.normal[1],0),s.push(w[0],w[1],0),u.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*E,0|n[2]),this.complex.indexes.push(this.currentIndex),u.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*E,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,a.push.apply(a,y(this.lastFlip!==-E?[e,e+2,e+3]:[e+2,e+1,e+3])),a.push(e+2,e+3,e+4),rd(Qv,Jv),Mv(this.normal,Qv),s.push(this.normal[0],this.normal[1],0),u.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*E,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,i+=3):(this.extrusions(u,s,n,w,x,this.totalDistance),a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),E=-1,Mv(this.normal,w),i+=2),this.lastFlip=E}else{if(rd(this.normal,Xv),c){var O=Pv(),S=Pv();Fv(S,Xv,this.normal),Lv(O,Xv,this.normal),s.push(S[0],S[1],0),s.push(O[0],O[1],0),u.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),u.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(u,s,n,this.normal,this.thickness,this.totalDistance);a.push.apply(a,y(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),i+=2}return i}},{key:"extrusions",value:function(t,e,r,n,o,i){e.push(n[0],n[1],0),e.push(n[0],n[1],0),t.push(r[0],r[1],0|r[2],i,-o,0|r[2]),this.complex.indexes.push(this.currentIndex),t.push(r[0],r[1],0|r[2],i,o,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(t,e){var r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}}]),t}();function ad(t){var e=t.coordinates,r=t.originCoordinates,n=t.version,o=new id({dash:!0,join:"bevel"});if("GAODE2.x"===n||"MAPBOX"===n||"MAPLIBRE"===n){var i=e;Array.isArray(i[0][0])||(i=[e]);var a=r;Array.isArray(a[0][0])||(a=[r]);for(var u=0;u<i.length;u++){var s=i[u],c=a[u];o.extrude_gaode2(s,c)}}else{var f=e;f[0]&&!Array.isArray(f[0][0])&&(f=[e]),f.forEach((function(t){o.extrude(t)}))}var l=o.complex;return{vertices:l.positions,indices:l.indices,normals:l.normals,indexes:l.indexes,size:6}}function ud(t){var e=function(t){if(Ov(t[0]))return t;if(Ov(t[0][0]))throw new Error("当前数据不支持标注");if(Ov(t[0][0][0])){var e=0,r=0,n=0;return t.forEach((function(t){t.forEach((function(t){e+=t[0],r+=t[1],n++}))})),[e/n,r/n,0]}throw new Error("当前数据不支持标注")}(t.coordinates);return{vertices:[].concat(y(e),y(e),y(e),y(e)),indices:[0,1,2,2,3,0],size:e.length}}function sd(t){var e=t.coordinates,r=yp.flatten(e),n=r.vertices,o=r.dimensions,i=r.holes;return{indices:yp(n,i,o),vertices:n,size:o}}var cd=function(){var t=o(r().mark((function t(e){var n,o,i,a,u,s,c,f,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.descriptors,o=e.features,i=e.enablePicking,a=e.iconMap,u={a_Color:hp,a_Position:pp,filter:vp,a_vertexId:dp,a_PickingColor:function(t){var e=t.id;return i?cp(e):[0,0,0]},a_DistanceAndIndex:function(t,e,r,n,o,i){return void 0===i?[r[3],10]:[r[3],i]},a_Total_Distance:function(t,e,r){return[r[5]]},a_Size:function(t){var e=t.size,r=void 0===e?1:e;return Array.isArray(r)?[r[0],r[1]]:[r,0]},a_Normal:function(t,e,r,n,o){return o},a_Miter:function(t,e,r){return[r[4]]},a_iconMapUV:function(t){var e=t.texture,r=a[e]||{x:0,y:0};return[r.x,r.y]}},s={sizePerElement:0,elements:[]},c=0,f=[],l=3,o.forEach((function(t,e){var r=ad(t),o=r.indices,i=r.vertices,a=r.normals,h=r.size,p=r.indexes;o.forEach((function(t){f.push(t+c)})),l=h;var v=i.length/h;s.sizePerElement=l,s.elements.push({featureIdx:e,vertices:i,normals:a,offset:c}),c+=v;for(var d=function(r){var o=(null==a?void 0:a.slice(3*r,3*r+3))||[],s=i.slice(r*h,r*h+h),c=0;p&&void 0!==p[r]&&(c=p[r]),n.forEach((function(n){var i;n&&u[n.name]&&(i=n.buffer.data).push.apply(i,y(u[n.name](t,e,s,r,o,c)))}))},g=0;g<v;g++)d(g)})),t.abrupt("return",{descriptors:n,featureLayout:s,indices:f});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),fd={pointFill:function(){var t=o(r().mark((function t(e){var n,o,i,a,u,s,c,f,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.descriptors,o=e.features,i=e.enablePicking,a=e.shape2d,u={a_Color:hp,a_Position:pp,filter:vp,a_vertexId:dp,a_PickingColor:function(t){var e=t.id;return i?cp(e):[0,0,0]},a_Shape:function(t){var e=t.shape,r=void 0===e?2:e;return[a.indexOf(r)]},a_Extrude:function(t,e,r,n){var o=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],i=n%4*3;return[o[i],o[i+1],o[i+2]]},a_Size:function(t){var e=t.size,r=void 0===e?5:e;return Array.isArray(r)?[r[0]]:[r]}},s={sizePerElement:0,elements:[]},c=0,f=[],l=3,o.forEach((function(t,e){var r=ud(t),o=r.indices,i=r.vertices,a=r.normals,h=r.size;o.forEach((function(t){f.push(t+c)})),l=h;var p=i.length/h;s.sizePerElement=l,s.elements.push({featureIdx:e,vertices:i,normals:a,offset:c}),c+=p;for(var v=function(r){var o=[],a=i.slice(r*h,r*h+h);n.forEach((function(n){var i;n&&u[n.name]&&(i=n.buffer.data).push.apply(i,y(u[n.name](t,e,a,r,o,0)))}))},d=0;d<p;d++)v(d)})),t.abrupt("return",{descriptors:n,featureLayout:s,indices:f});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),line:cd,polygonFill:function(){var t=o(r().mark((function t(e){var n,o,i,a,u,s,c,f;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.descriptors,o=e.features,i=e.enablePicking,a={a_Color:hp,a_Position:pp,filter:vp,a_vertexId:dp,a_PickingColor:function(t){var e=t.id;return i?cp(e):[0,0,0]}},u={sizePerElement:0,elements:[]},s=0,c=[],f=3,o.forEach((function(t,e){var r=sd(t),o=r.indices,i=r.vertices,l=r.normals,h=r.size;o.forEach((function(t){c.push(t+s)})),f=h;var p=i.length/h;u.sizePerElement=f,u.elements.push({featureIdx:e,vertices:i,normals:l,offset:s}),s+=p;for(var v=function(r){var o=[],u=i.slice(r*h,r*h+h);n.forEach((function(n){var i;n&&a[n.name]&&(i=n.buffer.data).push.apply(i,y(a[n.name](t,e,u,r,o,0)))}))},d=0;d<p;d++)v(d)})),t.abrupt("return",{descriptors:n,featureLayout:u,indices:c});case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},ld=function(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},fd);function hd(t){return pd.apply(this,arguments)}function pd(){return(pd=o(r().mark((function t(e){var n,o;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.workerType,o=e.data,!ld[n]){t.next=3;break}return t.abrupt("return",ld[n](o));case 3:return t.abrupt("return",Promise.reject(new Error(\'Worker with type "\'.concat(n,\'" non-existent.\'))));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return li(hd),t.WorkerSourceMap=fd,t.createWorker=li,t.worker=hd,t}({});\n');var PT=RT,IT=RT,OT=1e20;function RT(e,t,r,n,i,a){this.fontSize=e||24,this.buffer=void 0===t?3:t,this.cutoff=n||.25,this.fontFamily=i||"sans-serif",this.fontWeight=a||"normal",this.radius=r||8;var o=this.size=this.fontSize+2*this.buffer,s=o+2*this.buffer,u="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM;u?this.canvas=my.createOffscreenCanvas(o,o,"2d"):(this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=o),this.ctx=this.canvas.getContext("2d",{willReadFrequently:!0}),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textAlign="left",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s),this.useMetrics=void 0!==this.ctx.measureText("A").actualBoundingBoxLeft,this.middle=u?Math.round(o/2*1):Math.round(o/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function LT(e,t,r,n,i,a){for(var o=0;o<t;o++)NT(e,o,t,r,n,i,a);for(var s=0;s<r;s++)NT(e,s*t,1,t,n,i,a)}function NT(e,t,r,n,i,a,o){var s,u,c,l;for(a[0]=0,o[0]=-OT,o[1]=OT,s=0;s<n;s++)i[s]=e[t+s*r];for(s=1,u=0,c=0;s<n;s++){do{l=a[u],c=(i[s]-i[l]+s*s-l*l)/(s-l)/2}while(c<=o[u]&&--u>-1);a[++u]=s,o[u]=c,o[u+1]=OT}for(s=0,u=0;s<n;s++){for(;o[u+1]<s;)u++;l=a[u],e[t+s*r]=i[l]+(s-l)*(s-l)}}RT.prototype._draw=function(e,t){var r,n,i,a,o,s,u,c,l,h=this.ctx.measureText(e),f=h.width,p=2*this.buffer;t&&this.useMetrics?(o=Math.floor(h.actualBoundingBoxAscent),c=this.buffer+Math.ceil(h.actualBoundingBoxAscent),s=this.buffer,u=this.buffer,r=(n=Math.min(this.size,Math.ceil(h.actualBoundingBoxRight-h.actualBoundingBoxLeft)))+p,i=(a=Math.min(this.size-s,Math.ceil(h.actualBoundingBoxAscent+h.actualBoundingBoxDescent)))+p,this.ctx.textBaseline="alphabetic"):(r=n=this.size,i=a=this.size,o=19*this.fontSize/24,s=u=0,c=this.middle,this.ctx.textBaseline="middle"),n&&a&&(this.ctx.clearRect(u,s,n,a),this.ctx.fillText(e,this.buffer,c),l=this.ctx.getImageData(u,s,n,a));var d=new Uint8ClampedArray(r*i);return function(e,t,r,n,i,a,o){a.fill(OT,0,t*r),o.fill(0,0,t*r);for(var s=(t-n)/2,u=0;u<i;u++)for(var c=0;c<n;c++){var l=(u+s)*t+c+s,h=e.data[4*(u*n+c)+3]/255;if(1===h)a[l]=0,o[l]=OT;else if(0===h)a[l]=OT,o[l]=0;else{var f=Math.max(0,.5-h),p=Math.max(0,h-.5);a[l]=f*f,o[l]=p*p}}}(l,r,i,n,a,this.gridOuter,this.gridInner),LT(this.gridOuter,r,i,this.f,this.v,this.z),LT(this.gridInner,r,i,this.f,this.v,this.z),function(e,t,r,n,i,a,o){for(var s=0;s<t*r;s++){var u=Math.sqrt(n[s])-Math.sqrt(i[s]);e[s]=Math.round(255-255*(u/a+o))}}(d,r,i,this.gridOuter,this.gridInner,this.radius,this.cutoff),{data:d,metrics:{width:n,height:a,sdfWidth:r,sdfHeight:i,top:o,left:0,advance:f}}},RT.prototype.draw=function(e){return this._draw(e,!1).data},RT.prototype.drawWithMetrics=function(e){return this._draw(e,!0)},PT.default=IT;var DT;function FT(e,t,r){var i,a=k(t);try{for(a.s();!(i=a.n()).done;){var o=i.value,s=o.icon,u=o.xOffset;e[s.id]=n(n({},s),{},{x:u,y:r,image:s.image,width:s.width,height:s.height})}}catch(e){a.e(e)}finally{a.f()}}function zT(e){return Math.pow(2,Math.ceil(Math.log2(e)))}var BT=function(){for(var e=[],t=32;t<128;t++)e.push(String.fromCharCode(t));return e}();function UT(e,t,r,n){e.font="".concat(n," ").concat(r,"px ").concat(t),e.fillStyle="black",e.textBaseline="middle"}function jT(e,t){for(var r=0;r<e.length;r++)t.data[4*r+3]=e[r]}var VT=Me()(DT=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"fontAtlas",void 0),h(_(e),"iconFontMap",void 0),h(_(e),"iconFontGlyphs",{}),h(_(e),"fontOptions",void 0),h(_(e),"key",void 0),h(_(e),"cache",new GS(3)),e}return l(r,[{key:"scale",get:function(){return 1}},{key:"canvas",get:function(){var e=this.cache.get(this.key);return e&&e.data}},{key:"mapping",get:function(){var e=this.cache.get(this.key);return e&&e.mapping||{}}},{key:"getCanvasByKey",value:function(e){var t=this.cache.get(e);return t&&t.data}},{key:"getMappingByKey",value:function(e){var t=this.cache.get(e);return t&&t.mapping||{}}},{key:"init",value:function(){this.cache.clear(),this.fontOptions={fontFamily:"sans-serif",fontWeight:"normal",characterSet:BT,fontSize:24,buffer:3,sdf:!0,cutoff:.25,radius:8,iconfont:!1},this.key="",this.iconFontMap=new Map}},{key:"addIconGlyphs",value:function(e){var t=this;e.forEach((function(e){t.iconFontGlyphs[e.name]=e.unicode}))}},{key:"addIconFont",value:function(e,t){this.iconFontMap.set(e,t)}},{key:"getIconFontKey",value:function(e){return this.iconFontMap.get(e)||e}},{key:"getGlyph",value:function(e){return this.iconFontGlyphs[e]?String.fromCharCode(parseInt(this.iconFontGlyphs[e],16)):""}},{key:"setFontOptions",value:function(e){this.fontOptions=n(n({},this.fontOptions),e),this.key=this.getKey();var t=this.getNewChars(this.key,this.fontOptions.characterSet),r=this.cache.get(this.key);if(!r||0!==t.length){var i=this.generateFontAtlas(this.key,t,r);this.fontAtlas=i,this.cache.set(this.key,i)}}},{key:"addFontFace",value:function(e,t){var r=this,n=document.createElement("style");n.type="text/css",n.innerText="\n        @font-face{\n            font-family: '".concat(e,"';\n            src: url('").concat(t,"') format('woff2'),\n            url('").concat(t,"') format('woff'),\n            url('").concat(t,"') format('truetype');\n        }"),n.onload=function(){if(document.fonts)try{document.fonts.load("24px ".concat(e),"L7text"),document.fonts.ready.then((function(){r.emit("fontloaded",{fontFamily:e})}))}catch(e){console.warn("当前环境不支持 document.fonts !"),console.warn("当前环境不支持 iconfont !"),console.warn(e)}},document.getElementsByTagName("head")[0].appendChild(n)}},{key:"destroy",value:function(){this.cache.clear(),this.iconFontMap.clear()}},{key:"generateFontAtlas",value:function(e,t,r){var i=this.fontOptions,a=i.fontFamily,o=i.fontWeight,s=i.fontSize,u=i.buffer,c=i.sdf,l=i.radius,h=i.cutoff,f=i.iconfont,p=r&&r.data;p||((p=Yv.document.createElement("canvas")).width=1024);var d=p.getContext("2d",{willReadFrequently:!0});UT(d,a,s,o);var v=function(e){var t=e.characterSet,r=e.getFontWidth,n=e.fontHeight,i=e.buffer,a=e.maxCanvasWidth,o=e.mapping,s=void 0===o?{}:o,u=e.xOffset,c=void 0===u?0:u,l=e.yOffset,h=void 0===l?0:l,f=0,p=c;Array.from(t).forEach((function(e,t){if(!s[e]){var n=r(e,t);p+30>a&&(p=0,f++),s[e]={x:p,y:h+30*f,width:30,height:30,advance:n},p+=30}}));var d=n+2*i;return{mapping:s,xOffset:p,yOffset:h+f*d,canvasHeight:zT(h+(f+1)*d)}}(n({getFontWidth:function(e){return d.measureText(e).width},fontHeight:1*s,buffer:u,characterSet:t,maxCanvasWidth:1024},r&&{mapping:r.mapping,xOffset:r.xOffset,yOffset:r.yOffset})),g=v.mapping,m=v.canvasHeight,y=v.xOffset,_=v.yOffset,b=d.getImageData(0,0,p.width,p.height);if(p.height=m,d.putImageData(b,0,0),UT(d,a,s,o),c){var x,S=new PT(s,u,l,h,a,o),E=d.getImageData(0,0,S.size,S.size),A=k(t);try{for(A.s();!(x=A.n()).done;){var T=x.value;if(f){var w=String.fromCharCode(parseInt(T.replace("&#x","").replace(";",""),16));jT(S.draw(w),E)}else jT(S.draw(T),E);d.putImageData(E,g[T].x,g[T].y)}}catch(e){A.e(e)}finally{A.f()}}else{var C,M=k(t);try{for(M.s();!(C=M.n()).done;){var P=C.value;d.fillText(P,g[P].x,g[P].y+1*s)}}catch(e){M.e(e)}finally{M.f()}}return{xOffset:y,yOffset:_,mapping:g,data:p,width:p.width,height:p.height}}},{key:"getKey",value:function(){var e=this.fontOptions,t=e.fontFamily,r=e.fontWeight;return"".concat(t,"_").concat(r)}},{key:"getNewChars",value:function(e,t){var r=this.cache.get(e);if(!r)return t;var n=[],i=r.mapping,a=new Set(Object.keys(i));return new Set(t).forEach((function(e){a.has(e)||n.push(e)})),n}}]),r}(F))||DT,GT=Xt("iterator"),HT=!Fe((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),r.delete("a",2),r.delete("b",void 0),!t.size&&!ze||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[GT]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),WT=/[^\0-\u007E]/,YT=/[.\u3002\uFF0E\uFF61]/g,XT="Overflow: input needs wider integers to process",ZT=RangeError,qT=qe(YT.exec),KT=Math.floor,QT=String.fromCharCode,$T=qe("".charCodeAt),JT=qe([].join),ew=qe([].push),tw=qe("".replace),rw=qe("".split),nw=qe("".toLowerCase),iw=function(e){return e+22+75*(e<26)},aw=function(e,t,r){var n=0;for(e=r?KT(e/700):e>>1,e+=KT(e/t);e>455;)e=KT(e/35),n+=36;return KT(n+36*e/(e+38))},ow=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=$T(e,r++);if(i>=55296&&i<=56319&&r<n){var a=$T(e,r++);56320==(64512&a)?ew(t,((1023&i)<<10)+(1023&a)+65536):(ew(t,i),r--)}else ew(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&ew(n,QT(r));var u=n.length,c=u;for(u&&ew(n,"-");c<i;){var l=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<l&&(l=r);var h=c+1;if(l-a>KT((2147483647-o)/h))throw new ZT(XT);for(o+=(l-a)*h,a=l,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw new ZT(XT);if(r===a){for(var f=o,p=36;;){var d=p<=s?1:p>=s+26?26:p-s;if(f<d)break;var v=f-d,g=36-d;ew(n,QT(iw(d+v%g))),f=KT(v/g),p+=36}ew(n,QT(iw(f))),s=aw(o,h,c===u),o=0,c++}}o++,a++}return JT(n,"")},sw=Xt("iterator"),uw=Ir.set,cw=Ir.getterFor("URLSearchParams"),lw=Ir.getterFor("URLSearchParamsIterator"),hw=Object.getOwnPropertyDescriptor,fw=function(e){if(!ze)return De[e];var t=hw(De,e);return t&&t.value},pw=fw("fetch"),dw=fw("Request"),vw=fw("Headers"),gw=dw&&dw.prototype,mw=vw&&vw.prototype,yw=De.RegExp,_w=De.TypeError,bw=De.decodeURIComponent,xw=De.encodeURIComponent,Sw=qe("".charAt),Ew=qe([].join),Aw=qe([].push),Tw=qe("".replace),ww=qe([].shift),Cw=qe([].splice),kw=qe("".split),Mw=qe("".slice),Pw=/\+/g,Iw=Array(4),Ow=function(e){return Iw[e-1]||(Iw[e-1]=yw("((?:%[\\da-f]{2}){"+e+"})","gi"))},Rw=function(e){try{return bw(e)}catch(t){return e}},Lw=function(e){var t=Tw(e,Pw," "),r=4;try{return bw(t)}catch(e){for(;r;)t=Tw(t,Ow(r--),Rw);return t}},Nw=/[!'()~]|%20/g,Dw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Fw=function(e){return Dw[e]},zw=function(e){return Tw(xw(e),Nw,Fw)},Bw=Xa((function(e,t){uw(this,{type:"URLSearchParamsIterator",target:cw(e).entries,index:0,kind:t})}),"URLSearchParams",(function(){var e=lw(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,io(void 0,!0);var n=t[r];switch(e.kind){case"keys":return io(n.key,!1);case"values":return io(n.value,!1)}return io([n.key,n.value],!1)}),!0),Uw=function(e){this.entries=[],this.url=null,void 0!==e&&(ht(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Sw(e,0)?Mw(e,1):e:bn(e)))};Uw.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,u=this.entries,c=bo(e);if(c)for(r=(t=So(e,c)).next;!(n=je(r,t)).done;){if(a=(i=So(sr(n.value))).next,(o=je(a,i)).done||(s=je(a,i)).done||!je(a,i).done)throw new _w("Expected sequence with length 2");Aw(u,{key:bn(o.value),value:bn(s.value)})}else for(var l in e)Bt(e,l)&&Aw(u,{key:l,value:bn(e[l])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,i=kw(e,"&"),a=0;a<i.length;)(t=i[a++]).length&&(r=kw(t,"="),Aw(n,{key:Lw(ww(r)),value:Lw(Ew(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Aw(r,zw(e.key)+"="+zw(e.value));return Ew(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var jw=function(){Mo(this,Vw);var e=arguments.length>0?arguments[0]:void 0,t=uw(this,new Uw(e));ze||(this.size=t.entries.length)},Vw=jw.prototype;if(Fo(Vw,{append:function(e,t){var r=cw(this);Au(arguments.length,2),Aw(r.entries,{key:bn(e),value:bn(t)}),ze||this.length++,r.updateURL()},delete:function(e){for(var t=cw(this),r=Au(arguments.length,1),n=t.entries,i=bn(e),a=r<2?void 0:arguments[1],o=void 0===a?a:bn(a),s=0;s<n.length;){var u=n[s];if(u.key!==i||void 0!==o&&u.value!==o)s++;else if(Cw(n,s,1),void 0!==o)break}ze||(this.size=n.length),t.updateURL()},get:function(e){var t=cw(this).entries;Au(arguments.length,1);for(var r=bn(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){var t=cw(this).entries;Au(arguments.length,1);for(var r=bn(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Aw(n,t[i].value);return n},has:function(e){for(var t=cw(this).entries,r=Au(arguments.length,1),n=bn(e),i=r<2?void 0:arguments[1],a=void 0===i?i:bn(i),o=0;o<t.length;){var s=t[o++];if(s.key===n&&(void 0===a||s.value===a))return!0}return!1},set:function(e,t){var r=cw(this);Au(arguments.length,1);for(var n,i=r.entries,a=!1,o=bn(e),s=bn(t),u=0;u<i.length;u++)(n=i[u]).key===o&&(a?Cw(i,u--,1):(a=!0,n.value=s));a||Aw(i,{key:o,value:s}),ze||(this.size=i.length),r.updateURL()},sort:function(){var e=cw(this);qf(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=cw(this).entries,n=Yn(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new Bw(this,"keys")},values:function(){return new Bw(this,"values")},entries:function(){return new Bw(this,"entries")}},{enumerable:!0}),Rr(Vw,sw,Vw.entries,{name:"entries"}),Rr(Vw,"toString",(function(){return cw(this).serialize()}),{enumerable:!0}),ze&&Fn(Vw,"size",{get:function(){return cw(this).entries.length},configurable:!0,enumerable:!0}),Gn(jw,"URLSearchParams"),hn({global:!0,constructor:!0,forced:!HT},{URLSearchParams:jw}),!HT&&ct(vw)){var Gw=qe(mw.has),Hw=qe(mw.set),Ww=function(e){if(ht(e)){var t,r=e.body;if("URLSearchParams"===yn(r))return t=e.headers?new vw(e.headers):new vw,Gw(t,"content-type")||Hw(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Mn(e,{body:We(0,bn(r)),headers:We(0,t)})}return e};if(ct(pw)&&hn({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return pw(e,arguments.length>1?Ww(arguments[1]):{})}}),ct(dw)){var Yw=function(e){return Mo(this,gw),new dw(e,arguments.length>1?Ww(arguments[1]):{})};gw.constructor=Yw,Yw.prototype=gw,hn({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Yw})}}var Xw,Zw={URLSearchParams:jw,getState:cw},qw=Zo.codeAt,Kw=Ir.set,Qw=Ir.getterFor("URL"),$w=Zw.URLSearchParams,Jw=Zw.getState,eC=De.URL,tC=De.TypeError,rC=De.parseInt,nC=Math.floor,iC=Math.pow,aC=qe("".charAt),oC=qe(/./.exec),sC=qe([].join),uC=qe(1..toString),cC=qe([].pop),lC=qe([].push),hC=qe("".replace),fC=qe([].shift),pC=qe("".split),dC=qe("".slice),vC=qe("".toLowerCase),gC=qe([].unshift),mC=/[a-z]/i,yC=/[\d+-.a-z]/i,_C=/\d/,bC=/^0x/i,xC=/^[0-7]+$/,SC=/^\d+$/,EC=/^[\da-f]+$/i,AC=/[\0\t\n\r #%/:<>?@[\\\]^|]/,TC=/[\0\t\n\r #/:<>?@[\\\]^|]/,wC=/^[\u0000-\u0020]+/,CC=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,kC=/[\t\n\r]/g,MC=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)gC(t,e%256),e=nC(e/256);return sC(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=uC(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},PC={},IC=Bp({},PC,{" ":1,'"':1,"<":1,">":1,"`":1}),OC=Bp({},IC,{"#":1,"?":1,"{":1,"}":1}),RC=Bp({},OC,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),LC=function(e,t){var r=qw(e,0);return r>32&&r<127&&!Bt(t,e)?e:encodeURIComponent(e)},NC={ftp:21,file:null,http:80,https:443,ws:80,wss:443},DC=function(e,t){var r;return 2===e.length&&oC(mC,aC(e,0))&&(":"===(r=aC(e,1))||!t&&"|"===r)},FC=function(e){var t;return e.length>1&&DC(dC(e,0,2))&&(2===e.length||"/"===(t=aC(e,2))||"\\"===t||"?"===t||"#"===t)},zC=function(e){return"."===e||"%2e"===vC(e)},BC={},UC={},jC={},VC={},GC={},HC={},WC={},YC={},XC={},ZC={},qC={},KC={},QC={},$C={},JC={},ek={},tk={},rk={},nk={},ik={},ak={},ok=function(e,t,r){var n,i,a,o=bn(e);if(t){if(i=this.parse(o))throw new tC(i);this.searchParams=null}else{if(void 0!==r&&(n=new ok(r,!0)),i=this.parse(o,null,n))throw new tC(i);(a=Jw(new $w)).bindURL(this),this.searchParams=a}};ok.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,u=this,c=t||BC,l=0,h="",f=!1,p=!1,d=!1;for(e=bn(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=hC(e,wC,""),e=hC(e,CC,"$1")),e=hC(e,kC,""),n=HE(e);l<=n.length;){switch(i=n[l],c){case BC:if(!i||!oC(mC,i)){if(t)return"Invalid scheme";c=jC;continue}h+=vC(i),c=UC;break;case UC:if(i&&(oC(yC,i)||"+"===i||"-"===i||"."===i))h+=vC(i);else{if(":"!==i){if(t)return"Invalid scheme";h="",c=jC,l=0;continue}if(t&&(u.isSpecial()!==Bt(NC,h)||"file"===h&&(u.includesCredentials()||null!==u.port)||"file"===u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&NC[u.scheme]===u.port&&(u.port=null));h="","file"===u.scheme?c=$C:u.isSpecial()&&r&&r.scheme===u.scheme?c=VC:u.isSpecial()?c=YC:"/"===n[l+1]?(c=GC,l++):(u.cannotBeABaseURL=!0,lC(u.path,""),c=nk)}break;case jC:if(!r||r.cannotBeABaseURL&&"#"!==i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"===i){u.scheme=r.scheme,u.path=Rn(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,c=ak;break}c="file"===r.scheme?$C:HC;continue;case VC:if("/"!==i||"/"!==n[l+1]){c=HC;continue}c=XC,l++;break;case GC:if("/"===i){c=ZC;break}c=rk;continue;case HC:if(u.scheme=r.scheme,i===Xw)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Rn(r.path),u.query=r.query;else if("/"===i||"\\"===i&&u.isSpecial())c=WC;else if("?"===i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Rn(r.path),u.query="",c=ik;else{if("#"!==i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Rn(r.path),u.path.length--,c=rk;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=Rn(r.path),u.query=r.query,u.fragment="",c=ak}break;case WC:if(!u.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,c=rk;continue}c=ZC}else c=XC;break;case YC:if(c=XC,"/"!==i||"/"!==aC(h,l+1))continue;l++;break;case XC:if("/"!==i&&"\\"!==i){c=ZC;continue}break;case ZC:if("@"===i){f&&(h="%40"+h),f=!0,a=HE(h);for(var v=0;v<a.length;v++){var g=a[v];if(":"!==g||d){var m=LC(g,RC);d?u.password+=m:u.username+=m}else d=!0}h=""}else if(i===Xw||"/"===i||"?"===i||"#"===i||"\\"===i&&u.isSpecial()){if(f&&""===h)return"Invalid authority";l-=HE(h).length+1,h="",c=qC}else h+=i;break;case qC:case KC:if(t&&"file"===u.scheme){c=ek;continue}if(":"!==i||p){if(i===Xw||"/"===i||"?"===i||"#"===i||"\\"===i&&u.isSpecial()){if(u.isSpecial()&&""===h)return"Invalid host";if(t&&""===h&&(u.includesCredentials()||null!==u.port))return;if(o=u.parseHost(h))return o;if(h="",c=tk,t)return;continue}"["===i?p=!0:"]"===i&&(p=!1),h+=i}else{if(""===h)return"Invalid host";if(o=u.parseHost(h))return o;if(h="",c=QC,t===KC)return}break;case QC:if(!oC(_C,i)){if(i===Xw||"/"===i||"?"===i||"#"===i||"\\"===i&&u.isSpecial()||t){if(""!==h){var y=rC(h,10);if(y>65535)return"Invalid port";u.port=u.isSpecial()&&y===NC[u.scheme]?null:y,h=""}if(t)return;c=tk;continue}return"Invalid port"}h+=i;break;case $C:if(u.scheme="file","/"===i||"\\"===i)c=JC;else{if(!r||"file"!==r.scheme){c=rk;continue}switch(i){case Xw:u.host=r.host,u.path=Rn(r.path),u.query=r.query;break;case"?":u.host=r.host,u.path=Rn(r.path),u.query="",c=ik;break;case"#":u.host=r.host,u.path=Rn(r.path),u.query=r.query,u.fragment="",c=ak;break;default:FC(sC(Rn(n,l),""))||(u.host=r.host,u.path=Rn(r.path),u.shortenPath()),c=rk;continue}}break;case JC:if("/"===i||"\\"===i){c=ek;break}r&&"file"===r.scheme&&!FC(sC(Rn(n,l),""))&&(DC(r.path[0],!0)?lC(u.path,r.path[0]):u.host=r.host),c=rk;continue;case ek:if(i===Xw||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&DC(h))c=rk;else if(""===h){if(u.host="",t)return;c=tk}else{if(o=u.parseHost(h))return o;if("localhost"===u.host&&(u.host=""),t)return;h="",c=tk}continue}h+=i;break;case tk:if(u.isSpecial()){if(c=rk,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==Xw&&(c=rk,"/"!==i))continue}else u.fragment="",c=ak;else u.query="",c=ik;break;case rk:if(i===Xw||"/"===i||"\\"===i&&u.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(s=vC(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"===i||"\\"===i&&u.isSpecial()||lC(u.path,"")):zC(h)?"/"===i||"\\"===i&&u.isSpecial()||lC(u.path,""):("file"===u.scheme&&!u.path.length&&DC(h)&&(u.host&&(u.host=""),h=aC(h,0)+":"),lC(u.path,h)),h="","file"===u.scheme&&(i===Xw||"?"===i||"#"===i))for(;u.path.length>1&&""===u.path[0];)fC(u.path);"?"===i?(u.query="",c=ik):"#"===i&&(u.fragment="",c=ak)}else h+=LC(i,OC);break;case nk:"?"===i?(u.query="",c=ik):"#"===i?(u.fragment="",c=ak):i!==Xw&&(u.path[0]+=LC(i,PC));break;case ik:t||"#"!==i?i!==Xw&&("'"===i&&u.isSpecial()?u.query+="%27":u.query+="#"===i?"%23":LC(i,PC)):(u.fragment="",c=ak);break;case ak:i!==Xw&&(u.fragment+=LC(i,IC))}l++}},parseHost:function(e){var t,r,n;if("["===aC(e,0)){if("]"!==aC(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,h=0,f=function(){return aC(e,h)};if(":"===f()){if(":"!==aC(e,1))return;h+=2,l=++c}for(;f();){if(8===c)return;if(":"!==f()){for(t=r=0;r<4&&oC(EC,f());)t=16*t+rC(f(),16),h++,r++;if("."===f()){if(0===r)return;if(h-=r,c>6)return;for(n=0;f();){if(i=null,n>0){if(!("."===f()&&n<4))return;h++}if(!oC(_C,f()))return;for(;oC(_C,f());){if(a=rC(f(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;h++}u[c]=256*u[c]+i,2!==++n&&4!==n||c++}if(4!==n)return;break}if(":"===f()){if(h++,!f())return}else if(f())return;u[c++]=t}else{if(null!==l)return;h++,l=++c}}if(null!==l)for(o=c-l,c=7;0!==c&&o>0;)s=u[c],u[c--]=u[l+o-1],u[l+--o]=s;else if(8!==c)return;return u}(dC(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=rw(tw(nw(e),YT,"."),".");for(t=0;t<i.length;t++)r=i[t],ew(n,qT(WT,r)?"xn--"+ow(r):r);return JT(n,".")}(e),oC(AC,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,u=pC(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(r=[],n=0;n<t;n++){if(""===(i=u[n]))return e;if(a=10,i.length>1&&"0"===aC(i,0)&&(a=oC(bC,i)?16:8,i=dC(i,8===a?1:2)),""===i)o=0;else{if(!oC(10===a?SC:8===a?xC:EC,i))return e;o=rC(i,a)}lC(r,o)}for(n=0;n<t;n++)if(o=r[n],n===t-1){if(o>=iC(256,5-t))return null}else if(o>255)return null;for(s=cC(r),n=0;n<r.length;n++)s+=r[n]*iC(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(oC(TC,e))return"Invalid host";for(t="",r=HE(e),n=0;n<r.length;n++)t+=LC(r[n],PC);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return Bt(NC,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&DC(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=MC(i),null!==a&&(c+=":"+a)):"file"===t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+sC(o,"/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},setHref:function(e){var t=this.parse(e);if(t)throw new tC(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new uk(e.path[0]).origin}catch(e){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+MC(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(bn(e)+":",BC)},getUsername:function(){return this.username},setUsername:function(e){var t=HE(bn(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=LC(t[r],RC)}},getPassword:function(){return this.password},setPassword:function(e){var t=HE(bn(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=LC(t[r],RC)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?MC(e):MC(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,qC)},getHostname:function(){var e=this.host;return null===e?"":MC(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,KC)},getPort:function(){var e=this.port;return null===e?"":bn(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=bn(e))?this.port=null:this.parse(e,QC))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+sC(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,tk))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=bn(e))?this.query=null:("?"===aC(e,0)&&(e=dC(e,1)),this.query="",this.parse(e,ik)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=bn(e))?("#"===aC(e,0)&&(e=dC(e,1)),this.fragment="",this.parse(e,ak)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var sk,uk=function(e){var t=Mo(this,ck),r=Au(arguments.length,1)>1?arguments[1]:void 0,n=Kw(t,new ok(e,!1,r));ze||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},ck=uk.prototype,lk=function(e,t){return{get:function(){return Qw(this)[e]()},set:t&&function(e){return Qw(this)[t](e)},configurable:!0,enumerable:!0}};if(ze&&(Fn(ck,"href",lk("serialize","setHref")),Fn(ck,"origin",lk("getOrigin")),Fn(ck,"protocol",lk("getProtocol","setProtocol")),Fn(ck,"username",lk("getUsername","setUsername")),Fn(ck,"password",lk("getPassword","setPassword")),Fn(ck,"host",lk("getHost","setHost")),Fn(ck,"hostname",lk("getHostname","setHostname")),Fn(ck,"port",lk("getPort","setPort")),Fn(ck,"pathname",lk("getPathname","setPathname")),Fn(ck,"search",lk("getSearch","setSearch")),Fn(ck,"searchParams",lk("getSearchParams")),Fn(ck,"hash",lk("getHash","setHash"))),Rr(ck,"toJSON",(function(){return Qw(this).serialize()}),{enumerable:!0}),Rr(ck,"toString",(function(){return Qw(this).serialize()}),{enumerable:!0}),eC){var hk=eC.createObjectURL,fk=eC.revokeObjectURL;hk&&Rr(uk,"createObjectURL",Yn(hk,eC)),fk&&Rr(uk,"revokeObjectURL",Yn(fk,eC))}Gn(uk,"URL"),hn({global:!0,constructor:!0,forced:!HT,sham:!ze},{URL:uk});var pk,dk=Me()(sk=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"canvasHeight",128),h(_(e),"texture",void 0),h(_(e),"canvas",void 0),h(_(e),"iconData",void 0),h(_(e),"iconMap",void 0),h(_(e),"ctx",void 0),h(_(e),"loadingImageCount",0),e}return l(n,[{key:"isLoading",value:function(){return 0===this.loadingImageCount}},{key:"init",value:function(){this.iconData=[],this.iconMap={},this.canvas=Yv.document.createElement("canvas"),this.canvas.width=128,this.canvas.height=128,this.ctx=this.canvas.getContext("2d")}},{key:"addImage",value:(t=s(i().mark((function e(t,r){var n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Image,this.loadingImageCount++,this.hasImage(t)?console.warn("Image Id already exists"):this.iconData.push({id:t,size:64}),this.updateIconMap(),e.next=6,this.loadImage(r);case 6:n=e.sent,(a=this.iconData.find((function(e){return e.id===t})))&&(a.image=n,a.width=n.width,a.height=n.height),this.update();case 10:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"addImageMini",value:function(e,t,r){var n=this,i=r.getSceneConfig().canvas,a=i.createImage();if(this.loadingImageCount++,this.hasImage(e))throw new Error("Image Id already exists");this.iconData.push({id:e,size:64}),this.updateIconMap(),this.loadImageMini(t,i).then((function(t){a=t;var r=n.iconData.find((function(t){return t.id===e}));r&&(r.image=a,r.width=a.width,r.height=a.height),n.update()}))}},{key:"getTexture",value:function(){return this.texture}},{key:"getIconMap",value:function(){return this.iconMap}},{key:"getCanvas",value:function(){return this.canvas}},{key:"hasImage",value:function(e){return this.iconMap.hasOwnProperty(e)}},{key:"removeImage",value:function(e){this.hasImage(e)&&(this.iconData=this.iconData.filter((function(t){return t.id!==e})),delete this.iconMap[e],this.update())}},{key:"destroy",value:function(){this.removeAllListeners("imageUpdate"),this.iconData=[],this.iconMap={}}},{key:"loadImage",value:function(e){return new Promise((function(t,r){if(e instanceof HTMLImageElement)t(e);else{var n=new Image;n.crossOrigin="anonymous",n.onload=function(){t(n)},n.onerror=function(){r(new Error("Could not load image at "+e))},n.src=e instanceof File?URL.createObjectURL(e):e}}))}},{key:"update",value:function(){this.updateIconMap(),this.updateIconAtlas(),this.loadingImageCount--,0===this.loadingImageCount&&this.emit("imageUpdate")}},{key:"updateIconAtlas",value:function(){var e=this;this.canvas.width=1024,this.canvas.height=this.canvasHeight,Object.keys(this.iconMap).forEach((function(t){var r=e.iconMap[t],n=r.x,i=r.y,a=r.image,o=r.width,s=void 0===o?64:o,u=r.height,c=void 0===u?64:u,l=Math.max(s,c)/64,h=c/l,f=s/l;a&&e.ctx.drawImage(a,n+(64-f)/2,i+(64-h)/2,f,h)}))}},{key:"updateIconMap",value:function(){var e=function(e,t,r){var n,i=0,a=0,o=0,s=[],u={},c=k(e);try{for(c.s();!(n=c.n()).done;){var l=n.value;if(!u[l.id]){var h=l.size;i+h+t>r&&(FT(u,s,a),i=0,a=o+a+t,o=0,s=[]),s.push({icon:l,xOffset:i}),i=i+h+t,o=Math.max(o,h)}}}catch(e){c.e(e)}finally{c.f()}return s.length>0&&FT(u,s,a),{mapping:u,canvasHeight:zT(o+a+t)}}(this.iconData,3,1024),t=e.mapping,r=e.canvasHeight;this.iconMap=t,this.canvasHeight=r}},{key:"loadImageMini",value:function(e,t){return new Promise((function(r,n){var i=t.createImage();i.crossOrigin="anonymous",i.onload=function(){r(i)},i.onerror=function(){n(new Error("Could not load image at "+e))},i.src=e}))}}]),n}(F))||sk,vk=Me()(pk=function(){function e(){u(this,e),h(this,"viewport",void 0),h(this,"overridedViewProjectionMatrix",void 0),h(this,"jitteredViewProjectionMatrix",void 0),h(this,"jitteredProjectionMatrix",void 0),h(this,"viewMatrixInverse",void 0),h(this,"cameraPosition",void 0)}return l(e,[{key:"init",value:function(){}},{key:"update",value:function(e){this.viewport=e,this.viewMatrixInverse=Ab(),kb(this.viewMatrixInverse,e.getViewMatrix()),this.cameraPosition=[this.viewMatrixInverse[12],this.viewMatrixInverse[13],this.viewMatrixInverse[14]]}},{key:"getProjectionMatrix",value:function(){return this.jitteredProjectionMatrix||this.viewport.getProjectionMatrix()}},{key:"getModelMatrix",value:function(){return this.viewport.getModelMatrix()}},{key:"getViewMatrix",value:function(){return this.viewport.getViewMatrix()}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.getViewMatrixUncentered()}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.getViewProjectionMatrixUncentered()}},{key:"getViewProjectionMatrix",value:function(){return this.overridedViewProjectionMatrix||this.jitteredViewProjectionMatrix||this.viewport.getViewProjectionMatrix()}},{key:"getZoom",value:function(){return this.viewport.getZoom()}},{key:"getZoomScale",value:function(){return this.viewport.getZoomScale()}},{key:"getCenter",value:function(){var e=A(this.viewport.getCenter(),2);return[e[0],e[1]]}},{key:"getFocalDistance",value:function(){return this.viewport.getFocalDistance()}},{key:"getCameraPosition",value:function(){return this.cameraPosition}},{key:"projectFlat",value:function(e,t){return this.viewport.projectFlat(e,t)}},{key:"setViewProjectionMatrix",value:function(e){this.overridedViewProjectionMatrix=e}},{key:"jitterProjectionMatrix",value:function(e,t){var r=Nb(Ab(),[e,t,0]);this.jitteredProjectionMatrix=Mb(Ab(),r,this.viewport.getProjectionMatrix()),this.jitteredViewProjectionMatrix=Mb(Ab(),this.jitteredProjectionMatrix,this.viewport.getViewMatrix())}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0,this.jitteredViewProjectionMatrix=void 0}}]),e}())||pk,gk=Gy.values;hn({target:"Object",stat:!0},{values:function(e){return gk(e)}});var mk,yk,_k,bk=function(e){return e.TOPRIGHT="topright",e.TOPLEFT="topleft",e.BOTTOMRIGHT="bottomright",e.BOTTOMLEFT="bottomleft",e.TOPCENTER="topcenter",e.BOTTOMCENTER="bottomcenter",e.LEFTCENTER="leftcenter",e.RIGHTCENTER="rightcenter",e.LEFTTOP="lefttop",e.RIGHTTOP="righttop",e.LEFTBOTTOM="leftbottom",e.RIGHTBOTTOM="rightbottom",e}({}),xk={topleft:"column",topright:"column",bottomright:"column",bottomleft:"column",leftcenter:"column",rightcenter:"column",topcenter:"row",bottomcenter:"row",lefttop:"row",righttop:"row",leftbottom:"row",rightbottom:"row"},Sk=Me()(mk=function(){function e(){u(this,e),h(this,"container",void 0),h(this,"controlCorners",void 0),h(this,"controlContainer",void 0),h(this,"scene",void 0),h(this,"mapsService",void 0),h(this,"controls",[]),h(this,"unAddControls",[])}return l(e,[{key:"init",value:function(e,t){this.container=e.container,this.scene=t,this.mapsService=t.get(ba.IMapService),this.initControlPos()}},{key:"addControl",value:function(e,t){t.get(ba.IMapService).map?(e.addTo(this.scene),this.controls.push(e)):this.unAddControls.push(e)}},{key:"getControlByName",value:function(e){return this.controls.find((function(t){return t.controlOption.name===e}))}},{key:"removeControl",value:function(e){var t=this.controls.indexOf(e);return t>-1&&this.controls.splice(t,1),e.remove(),this}},{key:"addControls",value:function(){var e=this;this.unAddControls.forEach((function(t){t.addTo(e.scene),e.controls.push(t)})),this.unAddControls=[]}},{key:"destroy",value:function(){var e,t=k(this.controls);try{for(t.s();!(e=t.n()).done;){e.value.remove()}}catch(e){t.e(e)}finally{t.f()}this.controls=[],this.clearControlPos()}},{key:"initControlPos",value:function(){var e=this.controlCorners={},t="l7-",r=this.controlContainer=Zy("div","l7-control-container",this.container);Object.values(bk).forEach((function(n){var i,a;!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=n.map((function(e){return t+e})).join(" ");e[n.filter((function(e){return!["row","column"].includes(e)})).join("")]=Zy("div",i,r)}((i=n,a=i.replace(/^(top|bottom|left|right|center)/,"$1-").split("-"),[].concat(T(a),[xk[i]])))})),this.checkCornerOverlap()}},{key:"clearControlPos",value:function(){for(var e in this.controlCorners)this.controlCorners[e]&&qy(this.controlCorners[e]);this.controlContainer&&qy(this.controlContainer)}},{key:"checkCornerOverlap",value:function(){var e=this,t=window.MutationObserver;if(t)for(var r=function(){var r=i[n].match(/^(top|bottom)(left|right)$/);if(r){var a=A(r,3),o=a[1],s=a[2],u=e.controlCorners["".concat(o).concat(s)];new t((function(e){var t=A(e,1)[0].target;u&&(u.style[o]=t.clientHeight+"px")})).observe(e.controlCorners["".concat(s).concat(o)],{childList:!0,attributes:!0})}},n=0,i=Object.keys(this.controlCorners);n<i.length;n++)r()}}]),e}())||mk,Ek=Me()(yk=function(){function e(){u(this,e),h(this,"container",void 0),h(this,"scene",void 0),h(this,"mapsService",void 0),h(this,"markers",[]),h(this,"markerLayers",[]),h(this,"unAddMarkers",[]),h(this,"unAddMarkerLayers",[])}return l(e,[{key:"addMarkerLayer",value:function(e){this.mapsService.map&&this.mapsService.getMarkerContainer()?(this.markerLayers.push(e),e.addTo(this.scene)):this.unAddMarkerLayers.push(e)}},{key:"removeMarkerLayer",value:function(e){e.destroy(),this.markerLayers.indexOf(e);var t=this.markerLayers.indexOf(e);t>-1&&this.markerLayers.splice(t,1)}},{key:"addMarker",value:function(e){this.mapsService.map&&this.mapsService.getMarkerContainer()?(this.markers.push(e),e.addTo(this.scene)):this.unAddMarkers.push(e)}},{key:"addMarkers",value:function(){var e=this;this.unAddMarkers.forEach((function(t){t.addTo(e.scene),e.markers.push(t)})),this.unAddMarkers=[]}},{key:"addMarkerLayers",value:function(){var e=this;this.unAddMarkerLayers.forEach((function(t){e.markerLayers.push(t),t.addTo(e.scene)})),this.unAddMarkers=[]}},{key:"removeMarker",value:function(e){e.remove(),this.markers.indexOf(e);var t=this.markers.indexOf(e);t>-1&&this.markers.splice(t,1)}},{key:"removeAllMarkers",value:function(){this.destroy()}},{key:"init",value:function(e){this.scene=e,this.mapsService=e.get(ba.IMapService)}},{key:"destroy",value:function(){this.markers.forEach((function(e){e.remove()})),this.markers=[],this.markerLayers.forEach((function(e){e.destroy()})),this.markerLayers=[]}},{key:"removeMakerLayerMarker",value:function(e){e.destroy()}}]),e}())||yk,Ak=Me()(_k=function(){function e(){u(this,e),h(this,"scene",void 0),h(this,"mapsService",void 0),h(this,"popups",[]),h(this,"unAddPopups",[])}return l(e,[{key:"isMarkerReady",get:function(){return this.mapsService.map&&this.mapsService.getMarkerContainer()}},{key:"removePopup",value:function(e){null!=e&&e.isOpen()&&e.remove();var t=this.popups.indexOf(e);t>-1&&this.popups.splice(t,1);var r=this.unAddPopups.indexOf(e);r>-1&&this.unAddPopups.splice(r,1)}},{key:"destroy",value:function(){this.popups.forEach((function(e){return e.remove()}))}},{key:"addPopup",value:function(e){var t=this;e&&e.getOptions().autoClose&&[].concat(T(this.popups),T(this.unAddPopups)).forEach((function(e){e.getOptions().autoClose&&t.removePopup(e)})),this.isMarkerReady?(e.addTo(this.scene),this.popups.push(e)):this.unAddPopups.push(e),e.on("close",(function(){t.removePopup(e)}))}},{key:"initPopup",value:function(){var e=this;this.unAddPopups.length&&this.unAddPopups.forEach((function(t){e.addPopup(t),e.unAddPopups=[]}))}},{key:"init",value:function(e){this.scene=e,this.mapsService=e.get(ba.IMapService)}}]),e}())||_k;var Tk=function(){this.__data__=[],this.size=0};var wk=function(e,t){return e===t||e!=e&&t!=t};var Ck=function(e,t){for(var r=e.length;r--;)if(wk(e[r][0],t))return r;return-1},kk=Array.prototype.splice;var Mk=function(e){var t=this.__data__,r=Ck(t,e);return!(r<0)&&(r==t.length-1?t.pop():kk.call(t,r,1),--this.size,!0)};var Pk=function(e){var t=this.__data__,r=Ck(t,e);return r<0?void 0:t[r][1]};var Ik=function(e){return Ck(this.__data__,e)>-1};var Ok=function(e,t){var r=this.__data__,n=Ck(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Rk(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Rk.prototype.clear=Tk,Rk.prototype.delete=Mk,Rk.prototype.get=Pk,Rk.prototype.has=Ik,Rk.prototype.set=Ok;var Lk=Rk;var Nk=function(){this.__data__=new Lk,this.size=0};var Dk=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var Fk=function(e){return this.__data__.get(e)};var zk=function(e){return this.__data__.has(e)},Bk=Pm(im,"Map"),Uk=Pm(Object,"create");var jk=function(){this.__data__=Uk?Uk(null):{},this.size=0};var Vk=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gk=Object.prototype.hasOwnProperty;var Hk=function(e){var t=this.__data__;if(Uk){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Gk.call(t,e)?t[e]:void 0},Wk=Object.prototype.hasOwnProperty;var Yk=function(e){var t=this.__data__;return Uk?void 0!==t[e]:Wk.call(t,e)};var Xk=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Uk&&void 0===t?"__lodash_hash_undefined__":t,this};function Zk(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Zk.prototype.clear=jk,Zk.prototype.delete=Vk,Zk.prototype.get=Hk,Zk.prototype.has=Yk,Zk.prototype.set=Xk;var qk=Zk;var Kk=function(){this.size=0,this.__data__={hash:new qk,map:new(Bk||Lk),string:new qk}};var Qk=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var $k=function(e,t){var r=e.__data__;return Qk(t)?r["string"==typeof t?"string":"hash"]:r.map};var Jk=function(e){var t=$k(this,e).delete(e);return this.size-=t?1:0,t};var eM=function(e){return $k(this,e).get(e)};var tM=function(e){return $k(this,e).has(e)};var rM=function(e,t){var r=$k(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function nM(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}nM.prototype.clear=Kk,nM.prototype.delete=Jk,nM.prototype.get=eM,nM.prototype.has=tM,nM.prototype.set=rM;var iM=nM;var aM=function(e,t){var r=this.__data__;if(r instanceof Lk){var n=r.__data__;if(!Bk||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new iM(n)}return r.set(e,t),this.size=r.size,this};function oM(e){var t=this.__data__=new Lk(e);this.size=t.size}oM.prototype.clear=Nk,oM.prototype.delete=Dk,oM.prototype.get=Fk,oM.prototype.has=zk,oM.prototype.set=aM;var sM=oM;var uM=function(e,t,r){"__proto__"==t&&Im?Im(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r};var cM=function(e,t,r){(void 0!==r&&!wk(e[t],r)||void 0===r&&!(t in e))&&uM(e,t,r)};var lM=function(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var u=o[e?s:++i];if(!1===r(a[u],u,a))break}return t}}(),hM=N((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r?im.Buffer:void 0,a=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=a?a(r):new e.constructor(r);return e.copy(n),n}})),fM=im.Uint8Array;var pM=function(e){var t=new e.constructor(e.byteLength);return new fM(t).set(new fM(e)),t};var dM=function(e,t){var r=t?pM(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)},vM=Object.create,gM=function(){function e(){}return function(t){if(!vm(t))return{};if(vM)return vM(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var mM=function(e,t){return function(r){return e(t(r))}},yM=mM(Object.getPrototypeOf,Object),_M=Object.prototype;var bM=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_M)};var xM=function(e){return"function"!=typeof e.constructor||bM(e)?{}:gM(yM(e))};var SM=function(e){return IE(e)&&"[object Arguments]"==dm(e)},EM=Object.prototype,AM=EM.hasOwnProperty,TM=EM.propertyIsEnumerable,wM=SM(function(){return arguments}())?SM:function(e){return IE(e)&&AM.call(e,"callee")&&!TM.call(e,"callee")},CM=Array.isArray;var kM=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var MM=function(e){return null!=e&&kM(e.length)&&!gm(e)};var PM=function(e){return IE(e)&&MM(e)};var IM=function(){return!1},OM=N((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r?im.Buffer:void 0,a=(i?i.isBuffer:void 0)||IM;e.exports=a})),RM=Function.prototype,LM=Object.prototype,NM=RM.toString,DM=LM.hasOwnProperty,FM=NM.call(Object);var zM=function(e){if(!IE(e)||"[object Object]"!=dm(e))return!1;var t=yM(e);if(null===t)return!0;var r=DM.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&NM.call(r)==FM},BM={};BM["[object Float32Array]"]=BM["[object Float64Array]"]=BM["[object Int8Array]"]=BM["[object Int16Array]"]=BM["[object Int32Array]"]=BM["[object Uint8Array]"]=BM["[object Uint8ClampedArray]"]=BM["[object Uint16Array]"]=BM["[object Uint32Array]"]=!0,BM["[object Arguments]"]=BM["[object Array]"]=BM["[object ArrayBuffer]"]=BM["[object Boolean]"]=BM["[object DataView]"]=BM["[object Date]"]=BM["[object Error]"]=BM["[object Function]"]=BM["[object Map]"]=BM["[object Number]"]=BM["[object Object]"]=BM["[object RegExp]"]=BM["[object Set]"]=BM["[object String]"]=BM["[object WeakMap]"]=!1;var UM=function(e){return IE(e)&&kM(e.length)&&!!BM[dm(e)]},jM=N((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,i=n&&n.exports===r&&rm.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=a})),VM=jM&&jM.isTypedArray,GM=VM?Vm(VM):UM;var HM=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},WM=Object.prototype.hasOwnProperty;var YM=function(e,t,r){var n=e[t];WM.call(e,t)&&wk(n,r)&&(void 0!==r||t in e)||uM(e,t,r)};var XM=function(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;void 0===u&&(u=e[s]),i?uM(r,s,u):YM(r,s,u)}return r};var ZM=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n},qM=/^(?:0|[1-9]\d*)$/;var KM=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&qM.test(e))&&e>-1&&e%1==0&&e<t},QM=Object.prototype.hasOwnProperty;var $M=function(e,t){var r=CM(e),n=!r&&wM(e),i=!r&&!n&&OM(e),a=!r&&!n&&!i&&GM(e),o=r||n||i||a,s=o?ZM(e.length,String):[],u=s.length;for(var c in e)!t&&!QM.call(e,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||KM(c,u))||s.push(c);return s};var JM=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t},eP=Object.prototype.hasOwnProperty;var tP=function(e){if(!vm(e))return JM(e);var t=bM(e),r=[];for(var n in e)("constructor"!=n||!t&&eP.call(e,n))&&r.push(n);return r};var rP=function(e){return MM(e)?$M(e,!0):tP(e)};var nP=function(e){return XM(e,rP(e))};var iP=function(e,t,r,n,i,a,o){var s=HM(e,r),u=HM(t,r),c=o.get(u);if(c)cM(e,r,c);else{var l=a?a(s,u,r+"",e,t,o):void 0,h=void 0===l;if(h){var f=CM(u),p=!f&&OM(u),d=!f&&!p&&GM(u);l=u,f||p||d?CM(s)?l=s:PM(s)?l=Gm(s):p?(h=!1,l=hM(u,!0)):d?(h=!1,l=dM(u,!0)):l=[]:zM(u)||wM(u)?(l=s,wM(s)?l=nP(s):vm(s)&&!gm(s)||(l=xM(u))):h=!1}h&&(o.set(u,l),i(l,u,n,a,o),o.delete(u)),cM(e,r,l)}};var aP=function e(t,r,n,i,a){t!==r&&lM(r,(function(o,s){if(a||(a=new sM),vm(o))iP(t,r,s,n,e,i,a);else{var u=i?i(HM(t,s),o,s+"",t,r,a):void 0;void 0===u&&(u=o),cM(t,s,u)}}),rP)};var oP=function(e,t,r){if(!vm(r))return!1;var n=typeof t;return!!("number"==n?MM(r)&&KM(t,r.length):"string"==n&&t in r)&&wk(r[t],e)};var sP,uP=function(e){return Nm((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&oP(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,a)}return t}))},cP=uP((function(e,t,r){aP(e,t,r)})),lP=function(e){return e.normal="normal",e.additive="additive",e.subtractive="subtractive",e.min="min",e.max="max",e.none="none",e}({}),hP=function(e){return e.MULTIPLE="MULTIPLE",e.SINGLE="SINGLE",e}({}),fP=function(e){return e.AND="and",e.OR="or",e}({}),pP=function(e){return e.INIT="init",e.UPDATE="update",e}({}),dP={MapToken:"您正在使用 Demo 测试 Token, 生产环境务必自行注册 Token 确保服务稳定",SDK:"请确认引入了mapbox-gl api且在L7之前引入"},vP={id:"map",logoPosition:"bottomleft",logoVisible:!0,antialias:!0,stencil:!0,isMini:!1,preserveDrawingBuffer:!1,pickBufferScale:1,fitBoundsOptions:{animate:!1}},gP={colors:["rgb(103,0,31)","rgb(178,24,43)","rgb(214,96,77)","rgb(244,165,130)","rgb(253,219,199)","rgb(247,247,247)","rgb(209,229,240)","rgb(146,197,222)","rgb(67,147,195)","rgb(33,102,172)","rgb(5,48,97)"],size:10,shape:"circle",scales:{},shape2d:["circle","triangle","square","pentagon","hexagon","octogon","hexagram","rhombus","vesica"],shape3d:["cylinder","triangleColumn","hexagonColumn","squareColumn"],minZoom:-1,maxZoom:24,visible:!0,autoFit:!1,pickingBuffer:0,enablePropagation:!1,zIndex:0,blend:"normal",maskLayers:[],enableMask:!0,maskOperation:fP.AND,pickedFeatureID:-1,enableMultiPassRenderer:!1,enablePicking:!0,active:!1,activeColor:"#2f54eb",enableHighlight:!1,enableSelect:!1,highlightColor:"#2f54eb",activeMix:0,selectColor:"blue",selectMix:0,enableTAA:!1,jitterScale:1,enableLighting:!1,animateOption:{enable:!1,interval:.2,duration:4,trailLength:.15},forward:!0},mP=Me()(sP=function(){function e(){u(this,e),h(this,"sceneConfigCache",{}),h(this,"layerConfigCache",{}),h(this,"layerAttributeConfigCache",{})}return l(e,[{key:"getSceneConfig",value:function(e){return this.sceneConfigCache[e]}},{key:"getSceneWarninfo",value:function(e){return dP[e]}},{key:"setSceneConfig",value:function(e,t){this.sceneConfigCache[e]=n(n({},vP),t)}},{key:"getLayerConfig",value:function(e){return this.layerConfigCache[e]}},{key:"setLayerConfig",value:function(e,t,r){this.layerConfigCache[t]=n({},cP({},this.sceneConfigCache[e],gP,r))}},{key:"getAttributeConfig",value:function(e){return this.layerAttributeConfigCache[e]}},{key:"setAttributeConfig",value:function(e,t){this.layerAttributeConfigCache[e]=n(n({},this.layerAttributeConfigCache[e]),t)}},{key:"clean",value:function(){this.sceneConfigCache={},this.layerConfigCache={}}}]),e}())||sP;hn({target:"Math",stat:!0},{fround:Cl});var yP,_P,bP,xP,SP,EP=Math.PI/180;function AP(e){var t=e.latitude,r=void 0===t?0:t,n=e.zoom,i=void 0===n?0:n,a=e.lngLatExtent,o=void 0===a?[]:a,s=e.scale,u=e.highPrecision,c=void 0!==u&&u,l=e.flipY,h=void 0!==l&&l,f=e.coordinateSystem,p=e.epsgCode,d={},v=512*(s=void 0!==s?s:Math.pow(2,i)),g=Math.cos(r*EP),m=v/(o[2]-o[0]),y=m;f&&f===ub.LNGLAT_OFFSET&&"EPSG:3857"===p&&(y/=g);var _=v/4003e4;if(d.pixelsPerMeter=[_,-_,_],d.metersPerPixel=[1/_,-1/_,1/_],d.pixelsPerDegree=[m,-y,_],d.degreesPerPixel=[1/m,-1/y,1/_],c){var b=EP*Math.tan(r*EP)/g,x=m*b/2,S=v/4003e4*b,E=S/y*_;d.pixelsPerDegree2=[0,-x,S],d.pixelsPerMeter2=[E,0,E],h&&(d.pixelsPerDegree2[1]=-d.pixelsPerDegree2[1],d.pixelsPerMeter2[1]=-d.pixelsPerMeter2[1])}return h&&(d.pixelsPerMeter[1]=-d.pixelsPerMeter[1],d.metersPerPixel[1]=-d.metersPerPixel[1],d.pixelsPerDegree[1]=-d.pixelsPerDegree[1],d.degreesPerPixel[1]=-d.degreesPerPixel[1]),d}var TP,wP,CP,kP,MP,PP,IP=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],OP=(yP=Me(),_P=ke(ba.ICameraService),yP((SP=I((xP=function(){function e(){u(this,e),h(this,"needRefresh",!0),P(this,"cameraService",SP,this),h(this,"coordinateSystem",void 0),h(this,"viewportCenter",void 0),h(this,"viewportCenterProjection",void 0),h(this,"pixelsPerDegree",void 0),h(this,"pixelsPerDegree2",void 0),h(this,"pixelsPerMeter",void 0),h(this,"offsetCenterTransform",void 0),h(this,"offsetCenter",void 0),h(this,"epsgCode",void 0)}return l(e,[{key:"refresh",value:function(e,t){var r=this.cameraService.getZoom(),n=this.cameraService.getZoomScale(),i=e||this.cameraService.getCenter(),a=AP({latitude:i[1],zoom:r,lngLatExtent:t,coordinateSystem:this.coordinateSystem,epsgCode:this.epsgCode}),o=a.pixelsPerMeter,s=a.pixelsPerDegree;this.viewportCenter=i,this.viewportCenterProjection=[0,0,0,0],this.pixelsPerMeter=o,this.pixelsPerDegree=s,this.pixelsPerDegree2=[0,0,0],this.coordinateSystem===ub.LNGLAT||this.coordinateSystem===ub.P20?this.cameraService.setViewProjectionMatrix(void 0):this.coordinateSystem===ub.LNGLAT_OFFSET||this.coordinateSystem===ub.METER_OFFSET?this.calculateLnglatOffset(i,r,t):this.coordinateSystem===ub.P20_OFFSET&&this.calculateLnglatOffset(i,r,t,n,!0),this.needRefresh=!1}},{key:"getCoordinateSystem",value:function(){return this.coordinateSystem}},{key:"setCoordinateSystem",value:function(e){this.coordinateSystem=e}},{key:"getEPSGCode",value:function(){return this.epsgCode}},{key:"setEPSGCode",value:function(e){this.epsgCode=e}},{key:"getViewportCenter",value:function(e){if(this.coordinateSystem===ub.METER_OFFSET&&this.offsetCenterTransform){var t=eS([Math.fround(this.viewportCenter[0]),Math.fround(this.viewportCenter[1])],e,512);return[t[0]-this.offsetCenterTransform[0],t[1]-this.offsetCenterTransform[1]]}return[this.viewportCenter[0],this.viewportCenter[1]]}},{key:"getViewportCenterProjection",value:function(){return this.viewportCenterProjection}},{key:"getPixelsPerDegree",value:function(){return this.pixelsPerDegree}},{key:"getPixelsPerDegree2",value:function(){return this.pixelsPerDegree2}},{key:"getPixelsPerMeter",value:function(){return this.pixelsPerMeter}},{key:"calculateLnglatOffset",value:function(e,t,r,n,i){var a=AP({latitude:e[1],lngLatExtent:r,zoom:t,scale:n,flipY:i,highPrecision:!0,coordinateSystem:this.coordinateSystem,epsgCode:this.epsgCode}),o=a.pixelsPerMeter,s=a.pixelsPerDegree,u=a.pixelsPerDegree2,c=this.cameraService.getViewMatrix(),l=this.cameraService.getProjectionMatrix(),h=Mb([],l,c),f=this.cameraService.projectFlat([Math.fround(e[0]),Math.fround(e[1])],Math.pow(2,t));this.viewportCenterProjection=_b([],[f[0],f[1],0,1],h),h=Mb([],l,c=this.cameraService.getViewMatrixUncentered()||c),h=Mb([],h,IP),this.cameraService.setViewProjectionMatrix(h),this.pixelsPerMeter=o,this.pixelsPerDegree=s,this.pixelsPerDegree2=u}}]),e}()).prototype,"cameraService",[_P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bP=xP))||bP),RP=Me()(TP=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"renderMap",new Map),h(_(e),"enable",!1),h(_(e),"renderEnable",!1),h(_(e),"cacheLogs",{}),e}return l(r,[{key:"setEnable",value:function(e){this.enable=!!e}},{key:"log",value:function(e,t){var r=this;if(this.enable){var i=e.split("."),a=null;i.forEach((function(e,o){null!==a?(a[e]||(a[e]={}),o!==i.length-1&&(a=a[e])):(r.cacheLogs[e]||(r.cacheLogs[e]={}),o!==i.length-1&&(a=r.cacheLogs[e])),o===i.length-1&&(a[e]=n(n({time:Date.now()},a[e]),t))}))}}},{key:"getLog",value:function(e){var t=this;switch(a(e)){case"string":return this.cacheLogs[e];case"object":return e.map((function(e){return t.cacheLogs[e]})).filter((function(e){return void 0!==e}));case"undefined":return this.cacheLogs}}},{key:"removeLog",value:function(e){delete this.cacheLogs[e]}},{key:"generateRenderUid",value:function(){return this.renderEnable?IS():""}},{key:"renderDebug",value:function(e){this.renderEnable=e}},{key:"renderStart",value:function(e){if(this.renderEnable&&this.enable){var t=this.renderMap.get(e)||{};this.renderMap.set(e,n(n({},t),{},{renderUid:e,renderStart:Date.now()}))}}},{key:"renderEnd",value:function(e){if(this.renderEnable&&this.enable){var t=this.renderMap.get(e);if(t){var r=t.renderStart,i=Date.now();this.emit("renderEnd",n(n({},t),{},{renderEnd:i,renderDuration:i-r})),this.renderMap.delete(e)}}}},{key:"destroy",value:function(){this.cacheLogs=null,this.renderMap.clear()}}]),r}(F))||TP,LP=N((function(e){
/*! Hammer.JS - v2.0.7 - 2016-04-22
   * http://hammerjs.github.io/
   *
   * Copyright (c) 2016 Jorik Tangelder;
   * Licensed under the MIT license */
!function(t,r,n,i){var a,o="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,s="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram),u=o||s,c=["","webkit","Moz","MS","ms","o"],l=u?"":r.createElement("div"),h=Math.round,f=Math.abs,p=Date.now;function d(e,t,r){return setTimeout(x(e,r),t)}function v(e,t,r){return!!Array.isArray(e)&&(g(e,r[t],r),!0)}function g(e,t,r){var n;if(e)if(e.forEach)e.forEach(t,r);else if(void 0!==e.length)for(n=0;n<e.length;)t.call(r,e[n],n,e),n++;else for(n in e)e.hasOwnProperty(n)&&t.call(r,e[n],n,e)}function m(e,r,n){var i="DEPRECATED METHOD: "+r+"\n"+n+" AT \n";return function(){var r=new Error("get-stack-trace"),n=r&&r.stack?r.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=t.console&&(t.console.warn||t.console.log);return a&&a.call(t.console,i,n),e.apply(this,arguments)}}a="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1;r<arguments.length;r++){var n=arguments[r];if(null!=n)for(var i in n)n.hasOwnProperty(i)&&(t[i]=n[i])}return t}:Object.assign;var y=m((function(e,t,r){for(var n=Object.keys(t),i=0;i<n.length;)(!r||r&&void 0===e[n[i]])&&(e[n[i]]=t[n[i]]),i++;return e}),"extend","Use `assign`."),_=m((function(e,t){return y(e,t,!0)}),"merge","Use `assign`.");function b(e,t,r){var n,i=t.prototype;(n=e.prototype=Object.create(i)).constructor=e,n._super=i,r&&a(n,r)}function x(e,t){return function(){return e.apply(t,arguments)}}function S(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function E(e,t){return void 0===e?t:e}function A(e,t,r){g(k(t),(function(t){e.addEventListener(t,r,!1)}))}function T(e,t,r){g(k(t),(function(t){e.removeEventListener(t,r,!1)}))}function w(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function C(e,t){return e.indexOf(t)>-1}function k(e){return e.trim().split(/\s+/g)}function M(e,t,r){if(e.indexOf&&!r)return e.indexOf(t);for(var n=0;n<e.length;){if(r&&e[n][r]==t||!r&&e[n]===t)return n;n++}return-1}function P(e){return Array.prototype.slice.call(e,0)}function I(e,t,r){for(var n=[],i=[],a=0;a<e.length;){var o=t?e[a][t]:e[a];M(i,o)<0&&n.push(e[a]),i[a]=o,a++}return r&&(n=t?n.sort((function(e,r){return e[t]>r[t]})):n.sort()),n}function O(e,t){for(var r,n,i=t[0].toUpperCase()+t.slice(1),a=0;a<c.length;){if((n=(r=c[a])?r+i:t)in e)return n;a++}}var R=1;function L(e){var r=e.ownerDocument||e;return r.defaultView||r.parentWindow||t}var N="ontouchstart"in t,D=void 0!==O(t,"PointerEvent"),F=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),z=["x","y"],B=["clientX","clientY"];function U(e,t){var r=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){S(e.options.enable,[e])&&r.handler(t)},this.init()}function j(e,t,r){var n=r.pointers.length,i=r.changedPointers.length,a=1&t&&n-i==0,o=12&t&&n-i==0;r.isFirst=!!a,r.isFinal=!!o,a&&(e.session={}),r.eventType=t,function(e,t){var r=e.session,n=t.pointers,i=n.length;r.firstInput||(r.firstInput=V(t));i>1&&!r.firstMultiple?r.firstMultiple=V(t):1===i&&(r.firstMultiple=!1);var a=r.firstInput,o=r.firstMultiple,s=o?o.center:a.center,u=t.center=G(n);t.timeStamp=p(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=X(s,u),t.distance=Y(s,u),function(e,t){var r=t.center,n=e.offsetDelta||{},i=e.prevDelta||{},a=e.prevInput||{};1!==t.eventType&&4!==a.eventType||(i=e.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=e.offsetDelta={x:r.x,y:r.y});t.deltaX=i.x+(r.x-n.x),t.deltaY=i.y+(r.y-n.y)}(r,t),t.offsetDirection=W(t.deltaX,t.deltaY);var c=H(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=c.x,t.overallVelocityY=c.y,t.overallVelocity=f(c.x)>f(c.y)?c.x:c.y,t.scale=o?(l=o.pointers,h=n,Y(h[0],h[1],B)/Y(l[0],l[1],B)):1,t.rotation=o?function(e,t){return X(t[1],t[0],B)+X(e[1],e[0],B)}(o.pointers,n):0,t.maxPointers=r.prevInput?t.pointers.length>r.prevInput.maxPointers?t.pointers.length:r.prevInput.maxPointers:t.pointers.length,function(e,t){var r,n,i,a,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;if(8!=t.eventType&&(s>25||void 0===o.velocity)){var u=t.deltaX-o.deltaX,c=t.deltaY-o.deltaY,l=H(s,u,c);n=l.x,i=l.y,r=f(l.x)>f(l.y)?l.x:l.y,a=W(u,c),e.lastInterval=t}else r=o.velocity,n=o.velocityX,i=o.velocityY,a=o.direction;t.velocity=r,t.velocityX=n,t.velocityY=i,t.direction=a}(r,t);var l,h;var d=e.element;w(t.srcEvent.target,d)&&(d=t.srcEvent.target);t.target=d}(e,r),e.emit("hammer.input",r),e.recognize(r),e.session.prevInput=r}function V(e){for(var t=[],r=0;r<e.pointers.length;)t[r]={clientX:h(e.pointers[r].clientX),clientY:h(e.pointers[r].clientY)},r++;return{timeStamp:p(),pointers:t,center:G(t),deltaX:e.deltaX,deltaY:e.deltaY}}function G(e){var t=e.length;if(1===t)return{x:h(e[0].clientX),y:h(e[0].clientY)};for(var r=0,n=0,i=0;i<t;)r+=e[i].clientX,n+=e[i].clientY,i++;return{x:h(r/t),y:h(n/t)}}function H(e,t,r){return{x:t/e||0,y:r/e||0}}function W(e,t){return e===t?1:f(e)>=f(t)?e<0?2:4:t<0?8:16}function Y(e,t,r){r||(r=z);var n=t[r[0]]-e[r[0]],i=t[r[1]]-e[r[1]];return Math.sqrt(n*n+i*i)}function X(e,t,r){r||(r=z);var n=t[r[0]]-e[r[0]],i=t[r[1]]-e[r[1]];return 180*Math.atan2(i,n)/Math.PI}U.prototype={handler:function(){},init:function(){this.evEl&&A(this.element,this.evEl,this.domHandler),this.evTarget&&A(this.target,this.evTarget,this.domHandler),this.evWin&&A(L(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(L(this.element),this.evWin,this.domHandler)}};var Z={mousedown:1,mousemove:2,mouseup:4};function q(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,U.apply(this,arguments)}b(q,U,{handler:function(e){var t=Z[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var K={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:"touch",3:"pen",4:"mouse",5:"kinect"},$="pointerdown",J="pointermove pointerup pointercancel";function ee(){this.evEl=$,this.evWin=J,U.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}u||!t.MSPointerEvent||t.PointerEvent||($="MSPointerDown",J="MSPointerMove MSPointerUp MSPointerCancel"),b(ee,U,{handler:function(e){var t=this.store,r=!1,n=e.type.toLowerCase().replace("ms",""),i=K[n],a=Q[e.pointerType]||e.pointerType,o="touch"==a,s=M(t,e.pointerId,"pointerId");1&i&&(0===e.button||o)?s<0&&(t.push(e),s=t.length-1):12&i&&(r=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:a,srcEvent:e}),r&&t.splice(s,1))}});var te={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function re(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,U.apply(this,arguments)}function ne(e,t){var r=P(e.touches),n=P(e.changedTouches);return 12&t&&(r=I(r.concat(n),"identifier",!0)),[r,n]}b(re,U,{handler:function(e){var t=te[e.type];if(1===t&&(this.started=!0),this.started){var r=ne.call(this,e,t);12&t&&r[0].length-r[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:r[0],changedPointers:r[1],pointerType:"touch",srcEvent:e})}}});var ie={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ae(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},U.apply(this,arguments)}function oe(e,t){var r=P(e.touches),n=this.targetIds;if(3&t&&1===r.length)return n[r[0].identifier]=!0,[r,r];var i,a,o=P(e.changedTouches),s=[],u=this.target;if(a=r.filter((function(e){return w(e.target,u)})),1===t)for(i=0;i<a.length;)n[a[i].identifier]=!0,i++;for(i=0;i<o.length;)n[o[i].identifier]&&s.push(o[i]),12&t&&delete n[o[i].identifier],i++;return s.length?[I(a.concat(s),"identifier",!0),s]:void 0}b(ae,U,{handler:function(e){var t=ie[e.type],r=oe.call(this,e,t);r&&this.callback(this.manager,t,{pointers:r[0],changedPointers:r[1],pointerType:"touch",srcEvent:e})}});function se(){U.apply(this,arguments);var e=x(this.handler,this);this.touch=new ae(this.manager,e),this.mouse=new q(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ue(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,ce.call(this,t)):12&e&&ce.call(this,t)}function ce(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var r={x:t.clientX,y:t.clientY};this.lastTouches.push(r);var n=this.lastTouches;setTimeout((function(){var e=n.indexOf(r);e>-1&&n.splice(e,1)}),2500)}}function le(e){for(var t=e.srcEvent.clientX,r=e.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var i=this.lastTouches[n],a=Math.abs(t-i.x),o=Math.abs(r-i.y);if(a<=25&&o<=25)return!0}return!1}b(se,U,{handler:function(e,t,r){var n="touch"==r.pointerType,i="mouse"==r.pointerType;if(!(i&&r.sourceCapabilities&&r.sourceCapabilities.firesTouchEvents)){if(n)ue.call(this,t,r);else if(i&&le.call(this,r))return;this.callback(e,t,r)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var he=u?void 0:O(l.style,"touchAction"),fe=void 0!==he,pe=function(){if(!fe)return!1;var e={};if(u)return e;var r=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!r||t.CSS.supports("touch-action",n)})),e}();function de(e,t){this.manager=e,this.set(t)}de.prototype={set:function(e){"compute"==e&&(e=this.compute()),fe&&this.manager.element.style&&pe[e]&&(this.manager.element.style[he]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return g(this.manager.recognizers,(function(t){S(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(C(e,"none"))return"none";var t=C(e,"pan-x"),r=C(e,"pan-y");if(t&&r)return"none";if(t||r)return t?"pan-x":"pan-y";if(C(e,"manipulation"))return"manipulation";return"auto"}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,r=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var n=this.actions,i=C(n,"none")&&!pe.none,a=C(n,"pan-y")&&!pe["pan-y"],o=C(n,"pan-x")&&!pe["pan-x"];if(i){var s=1===e.pointers.length,u=e.distance<2,c=e.deltaTime<250;if(s&&u&&c)return}if(!o||!a)return i||a&&6&r||o&&24&r?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};function ve(e){this.options=a({},this.defaults,e||{}),this.id=R++,this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function ge(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function me(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function ye(e,t){var r=t.manager;return r?r.get(e):e}function _e(){ve.apply(this,arguments)}function be(){_e.apply(this,arguments),this.pX=null,this.pY=null}function xe(){_e.apply(this,arguments)}function Se(){ve.apply(this,arguments),this._timer=null,this._input=null}function Ee(){_e.apply(this,arguments)}function Ae(){_e.apply(this,arguments)}function Te(){ve.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function we(e,t){return(t=t||{}).recognizers=E(t.recognizers,we.defaults.preset),new Ce(e,t)}ve.prototype={defaults:{},set:function(e){return a(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(v(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=ye(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return v(e,"dropRecognizeWith",this)||(e=ye(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(v(e,"requireFailure",this))return this;var t=this.requireFail;return-1===M(t,e=ye(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(v(e,"dropRequireFailure",this))return this;e=ye(e,this);var t=M(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,r=this.state;function n(r){t.manager.emit(r,e)}r<8&&n(t.options.event+ge(r)),n(t.options.event),e.additionalEvent&&n(e.additionalEvent),r>=8&&n(t.options.event+ge(r))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=a({},e);if(!S(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},b(_e,ve,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,r=e.eventType,n=6&t,i=this.attrTest(e);return n&&(8&r||!i)?16|t:n||i?4&r?8|t:2&t?4|t:2:32}}),b(be,_e,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push("pan-y"),24&e&&t.push("pan-x"),t},directionTest:function(e){var t=this.options,r=!0,n=e.distance,i=e.direction,a=e.deltaX,o=e.deltaY;return i&t.direction||(6&t.direction?(i=0===a?1:a<0?2:4,r=a!=this.pX,n=Math.abs(e.deltaX)):(i=0===o?1:o<0?8:16,r=o!=this.pY,n=Math.abs(e.deltaY))),e.direction=i,r&&n>t.threshold&&i&t.direction},attrTest:function(e){return _e.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=me(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),b(xe,_e,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),b(Se,ve,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,n=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!n||!r||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=d((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),b(Ee,_e,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),b(Ae,_e,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return be.prototype.getTouchAction.call(this)},attrTest:function(e){var t,r=this.options.direction;return 30&r?t=e.overallVelocity:6&r?t=e.overallVelocityX:24&r&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&r&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&f(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=me(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),b(Te,ve,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,r=e.pointers.length===t.pointers,n=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(n&&i&&r){if(4!=e.eventType)return this.failTimeout();var a=!this.pTime||e.timeStamp-this.pTime<t.interval,o=!this.pCenter||Y(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,o&&a?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=d((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return 32},failTimeout:function(){return this._timer=d((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),we.VERSION="2.0.7",we.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[Ee,{enable:!1}],[xe,{enable:!1},["rotate"]],[Ae,{direction:6}],[be,{direction:6},["swipe"]],[Te],[Te,{event:"doubletap",taps:2},["tap"]],[Se]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Ce(e,t){var r;this.options=a({},we.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((r=this).options.inputClass||(D?ee:F?ae:N?se:q))(r,j),this.touchAction=new de(this,this.options.touchAction),ke(this,!0),g(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function ke(e,t){var r,n=e.element;n.style&&(g(e.options.cssProps,(function(i,a){r=O(n.style,a),t?(e.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=e.oldCssProps[r]||""})),t||(e.oldCssProps={}))}(Ce.prototype={set:function(e){return a(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var r;this.touchAction.preventDefaults(e);var n=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var a=0;a<n.length;)r=n[a],2===t.stopped||i&&r!=i&&!r.canRecognizeWith(i)?r.reset():r.recognize(e),!i&&14&r.state&&(i=t.curRecognizer=r),a++}},get:function(e){if(e instanceof ve)return e;for(var t=this.recognizers,r=0;r<t.length;r++)if(t[r].options.event==e)return t[r];return null},add:function(e){if(v(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(v(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,r=M(t,e);-1!==r&&(t.splice(r,1),this.touchAction.update())}return this},on:function(e,t){if(void 0!==e&&void 0!==t){var r=this.handlers;return g(k(e),(function(e){r[e]=r[e]||[],r[e].push(t)})),this}},off:function(e,t){if(void 0!==e){var r=this.handlers;return g(k(e),(function(e){t?r[e]&&r[e].splice(M(r[e],t),1):delete r[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){if(u)return;var n=r.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&ke(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u)||(a(we,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Ce,Input:U,TouchAction:de,TouchInput:ae,MouseInput:q,PointerEventInput:ee,TouchMouseInput:se,SingleTouchInput:re,Recognizer:ve,AttrRecognizer:_e,Tap:Te,Pan:be,Swipe:Ae,Pinch:xe,Rotate:Ee,Press:Se,on:A,off:T,each:g,merge:_,extend:y,assign:a,inherit:b,bindFn:x,prefixed:O}),("undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Hammer=we,e.exports?e.exports=we:t.Hammer=we)}("undefined"!=typeof window?window:{console:null,MSPointerEvent:null,PointerEvent:null,CSS:null},document)})),NP=function(e){return e.Hover="hover",e.Click="click",e.Select="select",e.Active="active",e.Drag="drag",e}({}),DP={panstart:"dragstart",panmove:"dragging",panend:"dragend",pancancel:"dragcancel"},FP=(wP=Me(),CP=ke(ba.IMapService),wP((PP=I((MP=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"indragging",!1),P(_(e),"mapService",PP,_(e)),h(_(e),"hammertime",void 0),h(_(e),"lastClickTime",0),h(_(e),"lastClickXY",[-1,-1]),h(_(e),"clickTimer",void 0),h(_(e),"$containter",void 0),h(_(e),"onDrag",(function(t){var r=e.interactionEvent(t);r.type=DP[r.type],"dragging"===r.type?e.indragging=!0:e.indragging=!1,e.emit(NP.Drag,r)})),h(_(e),"onHammer",(function(t){t.srcEvent.stopPropagation();var r=e.interactionEvent(t);e.emit(NP.Hover,r)})),h(_(e),"onTouch",(function(t){var r=t.touches[0];e.onHover({x:r.pageX,y:r.pageY,type:"touch"})})),h(_(e),"onHover",(function(t){var r=t.clientX,n=t.clientY,i=t.type,a=e.mapService.getMapContainer();if(a)if(Hv)r=r-a.left-0,n=n-a.top-0;else{var o=a.getBoundingClientRect(),s=o.top;r=r-o.left-a.clientLeft,n=n-s-a.clientTop}var u=e.mapService.containerToLngLat([r,n]);if("click"!==i)"touch"!==i?"click"!==i&&"dblclick"!==i&&e.emit(NP.Hover,{x:r,y:n,lngLat:u,type:i,target:t}):e.isDoubleTap(r,n,u);else{if(!Hv&&"ontouchstart"in document.documentElement==!0)return;e.isDoubleTap(r,n,u)}})),e}return l(r,[{key:"init",value:function(){this.addEventListenerOnMap(),this.$containter=this.mapService.getMapContainer()}},{key:"destroy",value:function(){this.hammertime&&this.hammertime.destroy(),this.removeEventListenerOnMap(),this.off(NP.Hover)}},{key:"triggerHover",value:function(e){var t=e.x,r=e.y;this.emit(NP.Hover,{x:t,y:r})}},{key:"triggerSelect",value:function(e){this.emit(NP.Select,{featureId:e})}},{key:"triggerActive",value:function(e){this.emit(NP.Active,{featureId:e})}},{key:"handleMiniEvent",value:function(e){this.onHover({clientX:e.touches[0].pageX,clientY:e.touches[0].pageY,type:"touch"})}},{key:"addEventListenerOnMap",value:function(){var e=this.mapService.getMapCanvasContainer&&this.mapService.getMapCanvasContainer()||this.mapService.getMapContainer();if(e)if(Hv)Yv.document.addEventListener("touchstart",this.handleMiniEvent.bind(this));else{var t=new LP.Manager(e);t.add(new LP.Tap({event:"dblclick",taps:2})),t.add(new LP.Tap({event:"click"})),t.add(new LP.Pan({threshold:0,pointers:0})),t.add(new LP.Press({})),t.on("dblclick click",this.onHammer),t.on("panstart panmove panend pancancel",this.onDrag),e.addEventListener("mousemove",this.onHover),e.addEventListener("mousedown",this.onHover,!0),e.addEventListener("mouseup",this.onHover),e.addEventListener("contextmenu",this.onHover),this.hammertime=t}}},{key:"removeEventListenerOnMap",value:function(){if(Hv)Yv.document.removeEventListener("touchstart",this.handleMiniEvent.bind(this));else{var e=this.mapService.getMapContainer();e&&(e.removeEventListener("mousemove",this.onHover),this.hammertime.off("dblclick click",this.onHammer),this.hammertime.off("panstart panmove panend pancancel",this.onDrag),e.removeEventListener("mousedown",this.onHover),e.removeEventListener("mouseup",this.onHover),e.removeEventListener("contextmenu",this.onHover))}}},{key:"interactionEvent",value:function(e){var t,r,n=e.type;"touch"===e.pointerType?(r=Math.floor(e.pointers[0].clientY),t=Math.floor(e.pointers[0].clientX)):(r=Math.floor(e.srcEvent.y),t=Math.floor(e.srcEvent.x));var i=this.mapService.getMapContainer();if(i){var a=i.getBoundingClientRect(),o=a.top;t-=a.left,r-=o}return{x:t,y:r,lngLat:this.mapService.containerToLngLat([t,r]),type:n,target:e.srcEvent}}},{key:"isDoubleTap",value:function(e,t,r){var n=this,i=(new Date).getTime(),a="click";i-this.lastClickTime<400&&Math.abs(this.lastClickXY[0]-e)<10&&Math.abs(this.lastClickXY[1]-t)<10?(this.lastClickTime=0,this.lastClickXY=[-1,-1],this.clickTimer&&clearTimeout(this.clickTimer),a="dblclick",this.emit(NP.Hover,{x:e,y:t,lngLat:r,type:a})):(this.lastClickTime=i,this.lastClickXY=[e,t],this.clickTimer=setTimeout((function(){a="click",n.emit(NP.Hover,{x:e,y:t,lngLat:r,type:a})}),400))}}]),r}(D)).prototype,"mapService",[CP],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kP=MP))||kP);var zP=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e},BP=mM(Object.keys,Object),UP=Object.prototype.hasOwnProperty;var jP=function(e){if(!bM(e))return BP(e);var t=[];for(var r in Object(e))UP.call(e,r)&&"constructor"!=r&&t.push(r);return t};var VP=function(e){return MM(e)?$M(e):jP(e)};var GP=function(e,t){return e&&XM(t,VP(t),e)};var HP=function(e,t){return e&&XM(t,rP(t),e)};var WP=function(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a};var YP=function(){return[]},XP=Object.prototype.propertyIsEnumerable,ZP=Object.getOwnPropertySymbols,qP=ZP?function(e){return null==e?[]:(e=Object(e),WP(ZP(e),(function(t){return XP.call(e,t)})))}:YP;var KP=function(e,t){return XM(e,qP(e),t)};var QP=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e},$P=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)QP(t,qP(e)),e=yM(e);return t}:YP;var JP=function(e,t){return XM(e,$P(e),t)};var eI=function(e,t,r){var n=t(e);return CM(e)?n:QP(n,r(e))};var tI=function(e){return eI(e,VP,qP)};var rI=function(e){return eI(e,rP,$P)},nI=Pm(im,"DataView"),iI=Pm(im,"Promise"),aI=Pm(im,"Set"),oI=Pm(im,"WeakMap"),sI=xm(nI),uI=xm(Bk),cI=xm(iI),lI=xm(aI),hI=xm(oI),fI=dm;(nI&&"[object DataView]"!=fI(new nI(new ArrayBuffer(1)))||Bk&&"[object Map]"!=fI(new Bk)||iI&&"[object Promise]"!=fI(iI.resolve())||aI&&"[object Set]"!=fI(new aI)||oI&&"[object WeakMap]"!=fI(new oI))&&(fI=function(e){var t=dm(e),r="[object Object]"==t?e.constructor:void 0,n=r?xm(r):"";if(n)switch(n){case sI:return"[object DataView]";case uI:return"[object Map]";case cI:return"[object Promise]";case lI:return"[object Set]";case hI:return"[object WeakMap]"}return t});var pI=fI,dI=Object.prototype.hasOwnProperty;var vI=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&dI.call(e,"index")&&(r.index=e.index,r.input=e.input),r};var gI=function(e,t){var r=t?pM(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)},mI=/\w*$/;var yI=function(e){var t=new e.constructor(e.source,mI.exec(e));return t.lastIndex=e.lastIndex,t},_I=am?am.prototype:void 0,bI=_I?_I.valueOf:void 0;var xI=function(e){return bI?Object(bI.call(e)):{}};var SI=function(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return pM(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return gI(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return dM(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return yI(e);case"[object Set]":return new n;case"[object Symbol]":return xI(e)}};var EI=function(e){return IE(e)&&"[object Map]"==pI(e)},AI=jM&&jM.isMap,TI=AI?Vm(AI):EI;var wI=function(e){return IE(e)&&"[object Set]"==pI(e)},CI=jM&&jM.isSet,kI=CI?Vm(CI):wI,MI={};MI["[object Arguments]"]=MI["[object Array]"]=MI["[object ArrayBuffer]"]=MI["[object DataView]"]=MI["[object Boolean]"]=MI["[object Date]"]=MI["[object Float32Array]"]=MI["[object Float64Array]"]=MI["[object Int8Array]"]=MI["[object Int16Array]"]=MI["[object Int32Array]"]=MI["[object Map]"]=MI["[object Number]"]=MI["[object Object]"]=MI["[object RegExp]"]=MI["[object Set]"]=MI["[object String]"]=MI["[object Symbol]"]=MI["[object Uint8Array]"]=MI["[object Uint8ClampedArray]"]=MI["[object Uint16Array]"]=MI["[object Uint32Array]"]=!0,MI["[object Error]"]=MI["[object Function]"]=MI["[object WeakMap]"]=!1;var PI=function e(t,r,n,i,a,o){var s,u=1&r,c=2&r,l=4&r;if(n&&(s=a?n(t,i,a,o):n(t)),void 0!==s)return s;if(!vm(t))return t;var h=CM(t);if(h){if(s=vI(t),!u)return Gm(t,s)}else{var f=pI(t),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(OM(t))return hM(t,u);if("[object Object]"==f||"[object Arguments]"==f||p&&!a){if(s=c||p?{}:xM(t),!u)return c?JP(t,HP(s,t)):KP(t,GP(s,t))}else{if(!MI[f])return a?t:{};s=SI(t,f,u)}}o||(o=new sM);var d=o.get(t);if(d)return d;o.set(t,s),kI(t)?t.forEach((function(i){s.add(e(i,r,n,i,t,o))})):TI(t)&&t.forEach((function(i,a){s.set(a,e(i,r,n,a,t,o))}));var v=h?void 0:(l?c?rI:tI:c?rP:VP)(t);return zP(v||t,(function(i,a){v&&(i=t[a=i]),YM(s,a,e(i,r,n,a,t,o))})),s};var II=function(e){return PI(e,5)},OI=0;function RI(e){if(Hv)return null;var t=e;if("string"==typeof e&&(t=document.getElementById(e)),t){var r=document.createElement("div");return r.style.cssText+="\n      position: absolute;\n      z-index:2;\n      height: 100%;\n      width: 100%;\n      pointer-events: none;\n    ",r.id="l7-scene-".concat(OI++),r.classList.add("l7-scene"),t.appendChild(r),r}return null}var LI,NI,DI,FI,zI,BI,UI,jI,VI,GI,HI,WI,YI,XI,ZI,qI,KI,QI,$I,JI,eO,tO,rO=function(e){return e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT",e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.FUNC_ADD=32774]="FUNC_ADD",e[e.BLEND_EQUATION=32777]="BLEND_EQUATION",e[e.BLEND_EQUATION_RGB=32777]="BLEND_EQUATION_RGB",e[e.BLEND_EQUATION_ALPHA=34877]="BLEND_EQUATION_ALPHA",e[e.FUNC_SUBTRACT=32778]="FUNC_SUBTRACT",e[e.FUNC_REVERSE_SUBTRACT=32779]="FUNC_REVERSE_SUBTRACT",e[e.MAX_EXT=32776]="MAX_EXT",e[e.MIN_EXT=32775]="MIN_EXT",e[e.BLEND_DST_RGB=32968]="BLEND_DST_RGB",e[e.BLEND_SRC_RGB=32969]="BLEND_SRC_RGB",e[e.BLEND_DST_ALPHA=32970]="BLEND_DST_ALPHA",e[e.BLEND_SRC_ALPHA=32971]="BLEND_SRC_ALPHA",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",e[e.BLEND_COLOR=32773]="BLEND_COLOR",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER_BINDING=34964]="ARRAY_BUFFER_BINDING",e[e.ELEMENT_ARRAY_BUFFER_BINDING=34965]="ELEMENT_ARRAY_BUFFER_BINDING",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.BUFFER_SIZE=34660]="BUFFER_SIZE",e[e.BUFFER_USAGE=34661]="BUFFER_USAGE",e[e.CURRENT_VERTEX_ATTRIB=34342]="CURRENT_VERTEX_ATTRIB",e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK",e[e.CULL_FACE=2884]="CULL_FACE",e[e.BLEND=3042]="BLEND",e[e.DITHER=3024]="DITHER",e[e.STENCIL_TEST=2960]="STENCIL_TEST",e[e.DEPTH_TEST=2929]="DEPTH_TEST",e[e.SCISSOR_TEST=3089]="SCISSOR_TEST",e[e.POLYGON_OFFSET_FILL=32823]="POLYGON_OFFSET_FILL",e[e.SAMPLE_ALPHA_TO_COVERAGE=32926]="SAMPLE_ALPHA_TO_COVERAGE",e[e.SAMPLE_COVERAGE=32928]="SAMPLE_COVERAGE",e[e.NO_ERROR=0]="NO_ERROR",e[e.INVALID_ENUM=1280]="INVALID_ENUM",e[e.INVALID_VALUE=1281]="INVALID_VALUE",e[e.INVALID_OPERATION=1282]="INVALID_OPERATION",e[e.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",e[e.CW=2304]="CW",e[e.CCW=2305]="CCW",e[e.LINE_WIDTH=2849]="LINE_WIDTH",e[e.ALIASED_POINT_SIZE_RANGE=33901]="ALIASED_POINT_SIZE_RANGE",e[e.ALIASED_LINE_WIDTH_RANGE=33902]="ALIASED_LINE_WIDTH_RANGE",e[e.CULL_FACE_MODE=2885]="CULL_FACE_MODE",e[e.FRONT_FACE=2886]="FRONT_FACE",e[e.DEPTH_RANGE=2928]="DEPTH_RANGE",e[e.DEPTH_WRITEMASK=2930]="DEPTH_WRITEMASK",e[e.DEPTH_CLEAR_VALUE=2931]="DEPTH_CLEAR_VALUE",e[e.DEPTH_FUNC=2932]="DEPTH_FUNC",e[e.STENCIL_CLEAR_VALUE=2961]="STENCIL_CLEAR_VALUE",e[e.STENCIL_FUNC=2962]="STENCIL_FUNC",e[e.STENCIL_FAIL=2964]="STENCIL_FAIL",e[e.STENCIL_PASS_DEPTH_FAIL=2965]="STENCIL_PASS_DEPTH_FAIL",e[e.STENCIL_PASS_DEPTH_PASS=2966]="STENCIL_PASS_DEPTH_PASS",e[e.STENCIL_REF=2967]="STENCIL_REF",e[e.STENCIL_VALUE_MASK=2963]="STENCIL_VALUE_MASK",e[e.STENCIL_WRITEMASK=2968]="STENCIL_WRITEMASK",e[e.STENCIL_BACK_FUNC=34816]="STENCIL_BACK_FUNC",e[e.STENCIL_BACK_FAIL=34817]="STENCIL_BACK_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_FAIL=34818]="STENCIL_BACK_PASS_DEPTH_FAIL",e[e.STENCIL_BACK_PASS_DEPTH_PASS=34819]="STENCIL_BACK_PASS_DEPTH_PASS",e[e.STENCIL_BACK_REF=36003]="STENCIL_BACK_REF",e[e.STENCIL_BACK_VALUE_MASK=36004]="STENCIL_BACK_VALUE_MASK",e[e.STENCIL_BACK_WRITEMASK=36005]="STENCIL_BACK_WRITEMASK",e[e.VIEWPORT=2978]="VIEWPORT",e[e.SCISSOR_BOX=3088]="SCISSOR_BOX",e[e.COLOR_CLEAR_VALUE=3106]="COLOR_CLEAR_VALUE",e[e.COLOR_WRITEMASK=3107]="COLOR_WRITEMASK",e[e.UNPACK_ALIGNMENT=3317]="UNPACK_ALIGNMENT",e[e.PACK_ALIGNMENT=3333]="PACK_ALIGNMENT",e[e.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE",e[e.MAX_VIEWPORT_DIMS=3386]="MAX_VIEWPORT_DIMS",e[e.SUBPIXEL_BITS=3408]="SUBPIXEL_BITS",e[e.RED_BITS=3410]="RED_BITS",e[e.GREEN_BITS=3411]="GREEN_BITS",e[e.BLUE_BITS=3412]="BLUE_BITS",e[e.ALPHA_BITS=3413]="ALPHA_BITS",e[e.DEPTH_BITS=3414]="DEPTH_BITS",e[e.STENCIL_BITS=3415]="STENCIL_BITS",e[e.POLYGON_OFFSET_UNITS=10752]="POLYGON_OFFSET_UNITS",e[e.POLYGON_OFFSET_FACTOR=32824]="POLYGON_OFFSET_FACTOR",e[e.TEXTURE_BINDING_2D=32873]="TEXTURE_BINDING_2D",e[e.SAMPLE_BUFFERS=32936]="SAMPLE_BUFFERS",e[e.SAMPLES=32937]="SAMPLES",e[e.SAMPLE_COVERAGE_VALUE=32938]="SAMPLE_COVERAGE_VALUE",e[e.SAMPLE_COVERAGE_INVERT=32939]="SAMPLE_COVERAGE_INVERT",e[e.COMPRESSED_TEXTURE_FORMATS=34467]="COMPRESSED_TEXTURE_FORMATS",e[e.DONT_CARE=4352]="DONT_CARE",e[e.FASTEST=4353]="FASTEST",e[e.NICEST=4354]="NICEST",e[e.GENERATE_MIPMAP_HINT=33170]="GENERATE_MIPMAP_HINT",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER",e[e.MAX_VERTEX_ATTRIBS=34921]="MAX_VERTEX_ATTRIBS",e[e.MAX_VERTEX_UNIFORM_VECTORS=36347]="MAX_VERTEX_UNIFORM_VECTORS",e[e.MAX_VARYING_VECTORS=36348]="MAX_VARYING_VECTORS",e[e.MAX_COMBINED_TEXTURE_IMAGE_UNITS=35661]="MAX_COMBINED_TEXTURE_IMAGE_UNITS",e[e.MAX_VERTEX_TEXTURE_IMAGE_UNITS=35660]="MAX_VERTEX_TEXTURE_IMAGE_UNITS",e[e.MAX_TEXTURE_IMAGE_UNITS=34930]="MAX_TEXTURE_IMAGE_UNITS",e[e.MAX_FRAGMENT_UNIFORM_VECTORS=36349]="MAX_FRAGMENT_UNIFORM_VECTORS",e[e.SHADER_TYPE=35663]="SHADER_TYPE",e[e.DELETE_STATUS=35712]="DELETE_STATUS",e[e.LINK_STATUS=35714]="LINK_STATUS",e[e.VALIDATE_STATUS=35715]="VALIDATE_STATUS",e[e.ATTACHED_SHADERS=35717]="ATTACHED_SHADERS",e[e.ACTIVE_UNIFORMS=35718]="ACTIVE_UNIFORMS",e[e.ACTIVE_ATTRIBUTES=35721]="ACTIVE_ATTRIBUTES",e[e.SHADING_LANGUAGE_VERSION=35724]="SHADING_LANGUAGE_VERSION",e[e.CURRENT_PROGRAM=35725]="CURRENT_PROGRAM",e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP",e[e.VENDOR=7936]="VENDOR",e[e.RENDERER=7937]="RENDERER",e[e.VERSION=7938]="VERSION",e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR",e[e.TEXTURE_MAG_FILTER=10240]="TEXTURE_MAG_FILTER",e[e.TEXTURE_MIN_FILTER=10241]="TEXTURE_MIN_FILTER",e[e.TEXTURE_WRAP_S=10242]="TEXTURE_WRAP_S",e[e.TEXTURE_WRAP_T=10243]="TEXTURE_WRAP_T",e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE=5890]="TEXTURE",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_BINDING_CUBE_MAP=34068]="TEXTURE_BINDING_CUBE_MAP",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.MAX_CUBE_MAP_TEXTURE_SIZE=34076]="MAX_CUBE_MAP_TEXTURE_SIZE",e[e.TEXTURE0=33984]="TEXTURE0",e[e.TEXTURE1=33985]="TEXTURE1",e[e.TEXTURE2=33986]="TEXTURE2",e[e.TEXTURE3=33987]="TEXTURE3",e[e.TEXTURE4=33988]="TEXTURE4",e[e.TEXTURE5=33989]="TEXTURE5",e[e.TEXTURE6=33990]="TEXTURE6",e[e.TEXTURE7=33991]="TEXTURE7",e[e.TEXTURE8=33992]="TEXTURE8",e[e.TEXTURE9=33993]="TEXTURE9",e[e.TEXTURE10=33994]="TEXTURE10",e[e.TEXTURE11=33995]="TEXTURE11",e[e.TEXTURE12=33996]="TEXTURE12",e[e.TEXTURE13=33997]="TEXTURE13",e[e.TEXTURE14=33998]="TEXTURE14",e[e.TEXTURE15=33999]="TEXTURE15",e[e.TEXTURE16=34e3]="TEXTURE16",e[e.TEXTURE17=34001]="TEXTURE17",e[e.TEXTURE18=34002]="TEXTURE18",e[e.TEXTURE19=34003]="TEXTURE19",e[e.TEXTURE20=34004]="TEXTURE20",e[e.TEXTURE21=34005]="TEXTURE21",e[e.TEXTURE22=34006]="TEXTURE22",e[e.TEXTURE23=34007]="TEXTURE23",e[e.TEXTURE24=34008]="TEXTURE24",e[e.TEXTURE25=34009]="TEXTURE25",e[e.TEXTURE26=34010]="TEXTURE26",e[e.TEXTURE27=34011]="TEXTURE27",e[e.TEXTURE28=34012]="TEXTURE28",e[e.TEXTURE29=34013]="TEXTURE29",e[e.TEXTURE30=34014]="TEXTURE30",e[e.TEXTURE31=34015]="TEXTURE31",e[e.ACTIVE_TEXTURE=34016]="ACTIVE_TEXTURE",e[e.REPEAT=10497]="REPEAT",e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.VERTEX_ATTRIB_ARRAY_ENABLED=34338]="VERTEX_ATTRIB_ARRAY_ENABLED",e[e.VERTEX_ATTRIB_ARRAY_SIZE=34339]="VERTEX_ATTRIB_ARRAY_SIZE",e[e.VERTEX_ATTRIB_ARRAY_STRIDE=34340]="VERTEX_ATTRIB_ARRAY_STRIDE",e[e.VERTEX_ATTRIB_ARRAY_TYPE=34341]="VERTEX_ATTRIB_ARRAY_TYPE",e[e.VERTEX_ATTRIB_ARRAY_NORMALIZED=34922]="VERTEX_ATTRIB_ARRAY_NORMALIZED",e[e.VERTEX_ATTRIB_ARRAY_POINTER=34373]="VERTEX_ATTRIB_ARRAY_POINTER",e[e.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING=34975]="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",e[e.COMPILE_STATUS=35713]="COMPILE_STATUS",e[e.LOW_FLOAT=36336]="LOW_FLOAT",e[e.MEDIUM_FLOAT=36337]="MEDIUM_FLOAT",e[e.HIGH_FLOAT=36338]="HIGH_FLOAT",e[e.LOW_INT=36339]="LOW_INT",e[e.MEDIUM_INT=36340]="MEDIUM_INT",e[e.HIGH_INT=36341]="HIGH_INT",e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.RENDERBUFFER=36161]="RENDERBUFFER",e[e.RGBA4=32854]="RGBA4",e[e.RGB5_A1=32855]="RGB5_A1",e[e.RGB565=36194]="RGB565",e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX=6401]="STENCIL_INDEX",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.RENDERBUFFER_WIDTH=36162]="RENDERBUFFER_WIDTH",e[e.RENDERBUFFER_HEIGHT=36163]="RENDERBUFFER_HEIGHT",e[e.RENDERBUFFER_INTERNAL_FORMAT=36164]="RENDERBUFFER_INTERNAL_FORMAT",e[e.RENDERBUFFER_RED_SIZE=36176]="RENDERBUFFER_RED_SIZE",e[e.RENDERBUFFER_GREEN_SIZE=36177]="RENDERBUFFER_GREEN_SIZE",e[e.RENDERBUFFER_BLUE_SIZE=36178]="RENDERBUFFER_BLUE_SIZE",e[e.RENDERBUFFER_ALPHA_SIZE=36179]="RENDERBUFFER_ALPHA_SIZE",e[e.RENDERBUFFER_DEPTH_SIZE=36180]="RENDERBUFFER_DEPTH_SIZE",e[e.RENDERBUFFER_STENCIL_SIZE=36181]="RENDERBUFFER_STENCIL_SIZE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE=36048]="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",e[e.FRAMEBUFFER_ATTACHMENT_OBJECT_NAME=36049]="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL=36050]="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",e[e.FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE=36051]="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.DEPTH_ATTACHMENT=36096]="DEPTH_ATTACHMENT",e[e.STENCIL_ATTACHMENT=36128]="STENCIL_ATTACHMENT",e[e.DEPTH_STENCIL_ATTACHMENT=33306]="DEPTH_STENCIL_ATTACHMENT",e[e.NONE=0]="NONE",e[e.FRAMEBUFFER_COMPLETE=36053]="FRAMEBUFFER_COMPLETE",e[e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT=36054]="FRAMEBUFFER_INCOMPLETE_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT=36055]="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",e[e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS=36057]="FRAMEBUFFER_INCOMPLETE_DIMENSIONS",e[e.FRAMEBUFFER_UNSUPPORTED=36061]="FRAMEBUFFER_UNSUPPORTED",e[e.FRAMEBUFFER_BINDING=36006]="FRAMEBUFFER_BINDING",e[e.RENDERBUFFER_BINDING=36007]="RENDERBUFFER_BINDING",e[e.MAX_RENDERBUFFER_SIZE=34024]="MAX_RENDERBUFFER_SIZE",e[e.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",e[e.UNPACK_FLIP_Y_WEBGL=37440]="UNPACK_FLIP_Y_WEBGL",e[e.UNPACK_PREMULTIPLY_ALPHA_WEBGL=37441]="UNPACK_PREMULTIPLY_ALPHA_WEBGL",e[e.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL",e[e.UNPACK_COLORSPACE_CONVERSION_WEBGL=37443]="UNPACK_COLORSPACE_CONVERSION_WEBGL",e[e.BROWSER_DEFAULT_WEBGL=37444]="BROWSER_DEFAULT_WEBGL",e}({}),nO=(LI=Me(),NI=ke(ba.IMapService),DI=ke(ba.IRendererService),FI=ke(ba.IGlobalConfigService),zI=ke(ba.IInteractionService),BI=ke(ba.ILayerService),LI((VI=I((jI=function(){function e(){var t=this;u(this,e),h(this,"pickedColors",void 0),h(this,"pickedTileLayers",[]),P(this,"mapService",VI,this),P(this,"rendererService",GI,this),P(this,"configService",HI,this),P(this,"interactionService",WI,this),P(this,"layerService",YI,this),h(this,"pickingFBO",void 0),h(this,"width",0),h(this,"height",0),h(this,"alreadyInPicking",!1),h(this,"pickBufferScale",1),h(this,"pickFromPickingFBO",(function(e,r){var i=r.x,a=r.y,o=r.lngLat,s=r.type,u=r.target,c=!1,l=t.rendererService,h=l.readPixels,f=l.getContainer,p=t.getContainerSize(f()),d=p.width,v=p.height;d*=a_,v*=a_;var g=e.getLayerConfig(),m=g.enableHighlight,y=g.enableSelect,_=i*a_,b=a*a_;if(_>d-1*a_||_<0||b>v-1*a_||b<0)return!1;var x=h({x:Math.floor(_/t.pickBufferScale),y:Math.floor((v-(a+1)*a_)/t.pickBufferScale),width:1,height:1,data:new Uint8Array(4),framebuffer:t.pickingFBO});if(t.pickedColors=x,0!==x[0]||0!==x[1]||0!==x[2]){var S=Bg(x),E=e.layerPickService.getFeatureById(S);E=t.handleRawFeature(E)[0],S!==e.getCurrentPickId()&&"mousemove"===s&&(s="mouseenter");var A={x:i,y:a,type:s,lngLat:o,featureId:S,feature:E,target:u};E&&(c=!0,e.setCurrentPickId(S),t.triggerHoverOnLayer(e,A))}else{var T={x:i,y:a,lngLat:o,type:null!==e.getCurrentPickId()&&"mousemove"===s?"mouseout":"un"+s,featureId:null,target:u,feature:null};t.triggerHoverOnLayer(e,n(n({},T),{},{type:"unpick"})),t.triggerHoverOnLayer(e,T),e.setCurrentPickId(null)}if(m&&e.layerPickService.highlightPickedFeature(x),y&&"click"===s&&(null==x?void 0:x.toString())!==[0,0,0,0].toString()){var w=Bg(x);null===e.getCurrentSelectedId()||w!==e.getCurrentSelectedId()?(e.layerPickService.selectFeature(x),e.setCurrentSelectedId(w)):(e.layerPickService.selectFeature(new Uint8Array([0,0,0,0])),e.setCurrentSelectedId(null))}return c}))}var t,r,a;return l(e,[{key:"init",value:function(e){var t=this.rendererService,r=t.createTexture2D,n=t.createFramebuffer,i=t.getContainer,a=this.getContainerSize(i()),o=a.width,s=a.height;o*=a_,s*=a_,this.pickBufferScale=this.configService.getSceneConfig(e).pickBufferScale||1,this.pickingFBO=n({color:r({width:Math.round(o/this.pickBufferScale),height:Math.round(s/this.pickBufferScale),wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})}),this.interactionService.on(NP.Hover,this.pickingAllLayer.bind(this))}},{key:"boxPickLayer",value:(a=s(i().mark((function e(t,r,n){var a,o,s,u=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=this.rendererService,o=a.useFramebuffer,s=a.clear,this.resizePickingFBO(),o(this.pickingFBO,(function(){s({framebuffer:u.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),"function"==typeof t.layerPickService.pickBoxSelectTiles?t.layerPickService.pickBoxSelectTiles(r,u.mapService.map):(t.hooks.beforePickingEncode.call(),t.renderModels({ispick:!0}),t.hooks.afterPickingEncode.call());var e=u.pickBox(t,r);n(e)}));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return a.apply(this,arguments)})},{key:"pickBox",value:function(e,t){var r=this,n=A(t.map((function(e){var t=e<0?0:e;return Math.floor(t*a_/r.pickBufferScale)})),4),i=n[0],a=n[1],o=n[2],s=n[3],u=this.rendererService,c=u.readPixels,l=u.getContainer,h=this.getContainerSize(l()),f=h.width,p=h.height;if(p*=a_,i>((f*=a_)-1)*a_/this.pickBufferScale||o<0||a>(p-1)*a_/this.pickBufferScale||s<0)return[];for(var d=Math.min(f/this.pickBufferScale,o)-i,v=Math.min(p/this.pickBufferScale,s)-a,g=c({x:i,y:Math.floor(p/this.pickBufferScale-(s+1)),width:d,height:v,data:new Uint8Array(d*v*4),framebuffer:this.pickingFBO}),m=[],y={},_=e.getLayerConfig().featureId,b=0;b<g.length/4;b+=1){var x=Bg(g.slice(4*b,4*b+4));if(-1!==x&&!y[x]){var S=e.layerPickService.getFeatureById(x,_);S=this.handleRawFeature(S),m.push.apply(m,T(S)),y[x]=!0}}return m}},{key:"handleRawFeature",value:function(e){return(e=e instanceof Array?e:[e]).map((function(e){if("null"===e)return e;if("Feature"===e.type)return e;var t={type:"Feature",properties:{},geometry:{type:"",coordinates:[]}},r=II(e.coordinates),n=II(e);return delete n.coordinates,t.properties=n,r&&(t.geometry={type:"",coordinates:r}),t}))}},{key:"handleCursor",value:function(e,t){var r=e.getLayerConfig(),n=r.cursor,i=void 0===n?"":n;if(r.cursorEnabled){var a="GAODE2.x"===this.mapService.version?this.mapService.getMapContainer():this.mapService.getMarkerContainer(),o=null==a?void 0:a.style.getPropertyValue("cursor");"unmousemove"===t&&""!==o?null==a||a.style.setProperty("cursor",""):"mousemove"===t&&(null==a||a.style.setProperty("cursor",i))}}},{key:"destroy",value:function(){this.pickingFBO.destroy(),this.pickingFBO=null}},{key:"getContainerSize",value:function(e){return e.getContext?{width:e.width/a_,height:e.height/a_}:e.getBoundingClientRect()}},{key:"pickingAllLayer",value:(r=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.layerService.needPick(t.type)&&this.isPickingAllLayer()){e.next=2;break}return e.abrupt("return");case 2:return this.alreadyInPicking=!0,e.next=5,this.pickingLayers(t);case 5:this.layerService.renderLayers(),this.alreadyInPicking=!1;case 7:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"isPickingAllLayer",value:function(){return!this.alreadyInPicking&&(!this.layerService.alreadyInRendering&&(!this.interactionService.indragging&&!!this.layerService.getShaderPickStat()))}},{key:"resizePickingFBO",value:function(){var e=this.rendererService.getContainer,t=this.getContainerSize(e()),r=t.width,n=t.height;r*=a_,n*=a_,this.width===r&&this.height===n||(this.pickingFBO.resize({width:Math.round(r/this.pickBufferScale),height:Math.round(n/this.pickBufferScale)}),this.width=r,this.height=n)}},{key:"pickingLayers",value:(t=s(i().mark((function e(t){var r,n,a,o=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=this.rendererService,n=r.useFramebuffer,a=r.clear,this.resizePickingFBO(),n(this.pickingFBO,(function(){o.layerService.getRenderList().filter((function(e){return e.needPick(t.type)})).reverse().some((function(e){a({framebuffer:o.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),e.layerPickService.pickRender(t);var r=o.pickFromPickingFBO(e,t);return o.layerService.pickedLayerId=r?+e.id:-1,r&&!e.getLayerConfig().enablePropagation}))}));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"triggerHoverOnLayer",value:function(e,t){(function(e){var t,r=!0;if((null==e||null===(t=e.target)||void 0===t?void 0:t.target)instanceof HTMLElement)for(var n,i=null==e||null===(n=e.target)||void 0===n?void 0:n.target;i;){var a,o=Array.from(i.classList);if(o.includes("l7-marker")||o.includes("l7-popup")){r=!1;break}i=null===(a=i)||void 0===a?void 0:a.parentElement}return r})(t)&&(this.handleCursor(e,t.type),e.emit(t.type,t))}}]),e}()).prototype,"mapService",[NI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),GI=I(jI.prototype,"rendererService",[DI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),HI=I(jI.prototype,"configService",[FI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),WI=I(jI.prototype,"interactionService",[zI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),YI=I(jI.prototype,"layerService",[BI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),UI=jI))||UI),iO=function(){function e(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];u(this,e),h(this,"autoStart",void 0),h(this,"startTime",0),h(this,"oldTime",0),h(this,"running",!1),h(this,"elapsedTime",0),this.autoStart=t}return l(e,[{key:"start",value:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}},{key:"stop",value:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}},{key:"getElapsedTime",value:function(){return this.getDelta(),this.elapsedTime}},{key:"getDelta",value:function(){var e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var t=("undefined"==typeof performance?Date:performance).now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}]),e}(),aO=(XI=Me(),ZI=ke(ba.IRendererService),qI=ke(ba.IMapService),KI=ke(ba.IDebugService),XI((JI=I(($I=function(e){f(v,e);var t,r,n,a,o,c,p,d=x(v);function v(){var e;u(this,v);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=d.call.apply(d,[this].concat(r))),"pickedLayerId",-1),h(_(e),"clock",new iO),h(_(e),"alreadyInRendering",!1),h(_(e),"layers",[]),h(_(e),"layerList",[]),h(_(e),"layerRenderID",{}),h(_(e),"sceneInited",!1),h(_(e),"animateInstanceCount",0),h(_(e),"shaderPicking",!0),h(_(e),"enableRender",!0),P(_(e),"renderService",JI,_(e)),P(_(e),"mapService",eO,_(e)),P(_(e),"debugService",tO,_(e)),h(_(e),"reRender",jE((function(t){if(t){var r,n=null===(r=e.layerList)||void 0===r?void 0:r.find((function(e){return e.id===t}));if(!n)return;null==n||n.emit("re-render")}}),32)),h(_(e),"throttleRenderLayers",jE((function(){}),16)),e}return l(v,[{key:"needPick",value:function(e){return this.layerList.some((function(t){return t.needPick(e)}))}},{key:"add",value:function(e){var t=this;this.layers.push(e),this.sceneInited&&e.init().then((function(){t.renderLayers()}))}},{key:"addMask",value:function(e){var t=this;this.sceneInited&&e.init().then((function(){t.renderLayers()}))}},{key:"initLayers",value:(p=s(i().mark((function e(){var t=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.sceneInited=!0,this.layers.forEach(function(){var e=s(i().mark((function e(r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.startInit){e.next=4;break}return e.next=3,r.init();case 3:t.updateLayerRenderList();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 2:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"getSceneInited",value:function(){return this.sceneInited}},{key:"getRenderList",value:function(){return this.layerList}},{key:"getLayers",value:function(){return this.layers}},{key:"getLayer",value:function(e){return this.layers.find((function(t){return t.id===e}))}},{key:"getLayerByName",value:function(e){return this.layers.find((function(t){return t.name===e}))}},{key:"remove",value:(c=s(i().mark((function e(t,r){var n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r?(n=r.layerChildren.indexOf(t))>-1&&r.layerChildren.splice(n,1):(a=this.layers.indexOf(t))>-1&&this.layers.splice(a,1),this.updateLayerRenderList(),t.destroy(),this.emit("layerChange",this.layers);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"removeAllLayers",value:function(){this.destroy(),this.stopAllRender(),this.layerList=[]}},{key:"setEnableRender",value:function(e){this.enableRender=e}},{key:"renderLayers",value:(o=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"renderAllLayers",value:(a=s(i().mark((function e(){var t,r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRender){e.next=2;break}return e.abrupt("return");case 2:this.updateLayerRenderList(),t=k(this.layerList);try{for(t.s();!(r=t.n()).done;)n=r.value,this.renderLayer(n.id)}catch(e){t.e(e)}finally{t.f()}case 5:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"renderLayer",value:(n=s(i().mark((function e(t){var r,n,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRender){e.next=2;break}return e.abrupt("return");case 2:if(this.updateLayerRenderList(),r=this.layerList.find((function(e){return e.id===t}))){e.next=6;break}return e.abrupt("return");case 6:if(n=this.debugService.generateRenderUid(),this.debugService.renderStart(n),a=r.getLayerConfig(),o=a.enableMask,r.masks.filter((function(e){return e.inited})).length>0&&o&&this.renderMask(r.masks),!r.getLayerConfig().enableMultiPassRenderer){e.next=15;break}return e.next=13,r.renderMultiPass();case 13:e.next=17;break;case 15:return e.next=17,r.render();case 17:this.debugService.renderEnd(n);case 18:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"renderMask",value:function(e){var t=0;this.renderService.clear({stencil:0,depth:1,framebuffer:null});var r,n=e.length>1?hP.MULTIPLE:hP.SINGLE,i=k(e);try{for(i.s();!(r=i.n()).done;){r.value.render({isStencil:!0,stencilType:n,stencilIndex:t++})}}catch(e){i.e(e)}finally{i.f()}}},{key:"beforeRenderData",value:(r=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.hooks.beforeRenderData.promise();case 2:e.sent&&this.renderLayer(t.id);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"renderTileLayerMask",value:function(e){var t=0,r=e.getLayerConfig().enableMask,n=void 0===r||r,i=e.tileMask?1:0,a=e.masks.filter((function(e){return e.inited})),o=(i+=n?a.length:1)>1?hP.MULTIPLE:hP.SINGLE;if((e.tileMask||a.length&&n)&&this.renderService.clear({stencil:0,depth:1,framebuffer:null}),a.length&&n){var s,u=k(a);try{for(u.s();!(s=u.n()).done;){s.value.render({isStencil:!0,stencilType:o,stencilIndex:t++})}}catch(e){u.e(e)}finally{u.f()}}e.tileMask&&e.tileMask.render({isStencil:!0,stencilType:o,stencilIndex:t++,stencilOperation:fP.OR})}},{key:"renderTileLayer",value:(t=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.renderTileLayerMask(t),!t.getLayerConfig().enableMultiPassRenderer){e.next=6;break}return e.next=4,t.renderMultiPass();case 4:e.next=8;break;case 6:return e.next=8,t.render();case 8:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"updateLayerRenderList",value:function(){var e=this;this.layerList=[],this.layers.filter((function(e){return e.inited})).filter((function(e){return e.isVisible()})).sort((function(e,t){return e.zIndex-t.zIndex})).forEach((function(t){e.layerList.push(t)}))}},{key:"destroy",value:function(){this.layers.forEach((function(e){e.destroy()})),this.layers=[],this.layerList=[],this.emit("layerChange",this.layers)}},{key:"startAnimate",value:function(){0==this.animateInstanceCount++&&(this.clock.start(),this.runRender())}},{key:"stopAnimate",value:function(){0==--this.animateInstanceCount&&(this.stopRender(),this.clock.stop())}},{key:"getOESTextureFloat",value:function(){return this.renderService.extensionObject.OES_texture_float}},{key:"enableShaderPick",value:function(){this.shaderPicking=!0}},{key:"disableShaderPick",value:function(){this.shaderPicking=!1}},{key:"getShaderPickStat",value:function(){return this.shaderPicking}},{key:"clear",value:function(){var e=zg(this.mapService.bgColor);this.renderService.clear({color:e,depth:1,stencil:0,framebuffer:null})}},{key:"runRender",value:function(){var e=this;this.renderAllLayers(),this.layerRenderID=Yv.requestAnimationFrame((function(){e.runRender()}))}},{key:"stopRender",value:function(){Yv.cancelAnimationFrame(this.layerRenderID)}},{key:"stopAllRender",value:function(){this.stopRender(),this.animateInstanceCount=0}}]),v}(F)).prototype,"renderService",[ZI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),eO=I($I.prototype,"mapService",[qI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),tO=I($I.prototype,"debugService",[KI],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),QI=$I))||QI),oO=wf.left,sO=!yu&&bt>79&&bt<83||!ss("reduce");hn({target:"Array",proto:!0,forced:sO},{reduce:function(e){var t=arguments.length;return oO(this,e,t,t>1?arguments[1]:void 0)}});var uO,cO,lO,hO,fO,pO,dO=function(e){return null==e},vO=function(){function e(t){var r=this;u(this,e),h(this,"name",void 0),h(this,"type",void 0),h(this,"scale",void 0),h(this,"descriptor",void 0),h(this,"featureBufferLayout",[]),h(this,"needRescale",!1),h(this,"needRemapping",!1),h(this,"needRegenerateVertices",!1),h(this,"featureRange",{startIndex:0,endIndex:1/0}),h(this,"vertexAttribute",void 0),h(this,"defaultCallback",(function(e){var t;return 0===e.length?(null===(t=r.scale)||void 0===t?void 0:t.defaultValues)||[]:e.map((function(e,t){var n;return(null===(n=r.scale)||void 0===n?void 0:n.scalers[t].func)(e)}))})),this.setProps(t)}return l(e,[{key:"setProps",value:function(e){Object.assign(this,e)}},{key:"mapping",value:function(e){var t;if(null!==(t=this.scale)&&void 0!==t&&t.callback){var r,n=null===(r=this.scale)||void 0===r?void 0:r.callback.apply(r,T(e));if(!dO(n))return[n]}return this.defaultCallback(e)}},{key:"resetDescriptor",value:function(){this.descriptor&&(this.descriptor.buffer.data=[])}}]),e}(),gO=["buffer","update","name"],mO=["buffer","update","name"],yO=(h(uO={},rO.FLOAT,4),h(uO,rO.UNSIGNED_BYTE,1),h(uO,rO.UNSIGNED_SHORT,2),uO),_O=(cO=Me(),lO=ke(ba.IRendererService),cO((pO=I((fO=function(){function e(){u(this,e),h(this,"attributesAndIndices",void 0),P(this,"rendererService",pO,this),h(this,"attributes",[]),h(this,"triangulation",void 0),h(this,"featureLayout",{sizePerElement:0,elements:[]})}return l(e,[{key:"registerStyleAttribute",value:function(e){var t=this.getLayerStyleAttribute(e.name||"");return t?t.setProps(e):(t=new vO(e),this.attributes.push(t)),t}},{key:"unRegisterStyleAttribute",value:function(e){var t=this.attributes.findIndex((function(t){return t.name===e}));t>-1&&this.attributes.splice(t,1)}},{key:"updateScaleAttribute",value:function(e){this.attributes.forEach((function(t){var r,n=t.name,i=null===(r=t.scale)||void 0===r?void 0:r.field;(e[n]||i&&e[i])&&(t.needRescale=!0,t.needRemapping=!0,t.needRegenerateVertices=!0)}))}},{key:"updateStyleAttribute",value:function(e,t,r){var i=this.getLayerStyleAttribute(e);i||(i=this.registerStyleAttribute(n(n({},t),{},{name:e})));var a=t.scale;a&&i&&(i.scale=a,i.needRescale=!0,i.needRemapping=!0,i.needRegenerateVertices=!0,r&&r.featureRange&&(i.featureRange=r.featureRange))}},{key:"getLayerStyleAttributes",value:function(){return this.attributes}},{key:"getLayerStyleAttribute",value:function(e){return this.attributes.find((function(t){return t.name===e}))}},{key:"getLayerAttributeScale",value:function(e){var t,r=this.getLayerStyleAttribute(e),n=null==r||null===(t=r.scale)||void 0===t?void 0:t.scalers;return n&&n[0]?n[0].func:null}},{key:"updateAttributeByFeatureRange",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=this.attributes.find((function(t){return t.name===e}));if(a&&a.descriptor){var o=a.descriptor,s=o.update,u=o.buffer,c=o.size,l=void 0===c?0:c,h=yO[u.type||rO.FLOAT];if(s){var f=this.featureLayout,p=f.elements,d=f.sizePerElement,v=p.slice(r,n);if(!v.length)return;var g=v[0].offset,m=g*l*h,y=v.map((function(e,r){for(var n=e.featureIdx,i=e.vertices,a=e.normals,o=i.length/d,u=[],c=0;c<o;c++){var l=a?a.slice(3*c,3*c+3):[];u.push.apply(u,T(s(t[n],n,i.slice(c*d,c*d+d),r,l)))}return u})).reduce((function(e,t){return e.push.apply(e,T(t)),e}),[]);a.vertexAttribute.updateBuffer({data:y,offset:m}),null==i||i.emit("legend:".concat(e),{type:e,attr:a})}}}},{key:"createAttributesAndIndices",value:function(e,t,r){var i=this;this.featureLayout={sizePerElement:0,elements:[]},t&&(this.triangulation=t);var a=this.attributes.map((function(e){return e.resetDescriptor(),e.descriptor})),o=0,s=0,u=[],c=3;e.forEach((function(e,t){var n=i.triangulation(e,r),l=n.indices,h=n.vertices,f=n.normals,p=n.size,d=n.indexes,v=n.count;"number"==typeof v&&(s+=v),l.forEach((function(e){u.push(e+o)})),c=p;var g=h.length/p;i.featureLayout.sizePerElement=c,i.featureLayout.elements.push({featureIdx:t,vertices:h,normals:f,offset:o}),o+=g;for(var m=function(r){var n=(null==f?void 0:f.slice(3*r,3*r+3))||[],i=h.slice(r*p,r*p+p),o=0;d&&void 0!==d[r]&&(o=d[r]),a.forEach((function(a,s){var u;a&&a.update&&(u=a.buffer.data).push.apply(u,T(a.update(e,t,i,r,n,o)))}))},y=0;y<g;y++)m(y)}));var l=this.rendererService,h=l.createAttribute,f=l.createBuffer,p=l.createElements,d={};a.forEach((function(e,t){if(e){var r=e.buffer,a=(e.update,e.name,y(e,gO)),o=h(n({buffer:f(r)},a));d[e.name||""]=o,i.attributes[t].vertexAttribute=o}}));var v=p({data:u,type:rO.UNSIGNED_INT,count:u.length});return this.attributesAndIndices={attributes:d,elements:v,count:s},this.attributesAndIndices}},{key:"createAttributes",value:function(e,t){var r=this;this.featureLayout={sizePerElement:0,elements:[]},t&&(this.triangulation=t);var i=this.attributes.map((function(e){return e.resetDescriptor(),e.descriptor})),a=0,o=3;e.forEach((function(e,t){var n=r.triangulation(e),s=n.indices,u=n.vertices,c=n.normals,l=n.size,h=n.indexes;s.forEach((function(e){})),o=l;var f=u.length/l;r.featureLayout.sizePerElement=o,r.featureLayout.elements.push({featureIdx:t,vertices:u,normals:c,offset:a}),a+=f;for(var p=function(r){var n=(null==c?void 0:c.slice(3*r,3*r+3))||[],a=u.slice(r*l,r*l+l),o=0;h&&void 0!==h[r]&&(o=h[r]),i.forEach((function(i,s){var u;i&&i.update&&(u=i.buffer.data).push.apply(u,T(i.update(e,t,a,r,n,o)))}))},d=0;d<f;d++)p(d)}));var s=this.rendererService,u=s.createAttribute,c=s.createBuffer,l={};return i.forEach((function(e,t){if(e){var i=e.buffer,a=(e.update,e.name,y(e,mO)),o=u(n({buffer:c(i)},a));l[e.name||""]=o,r.attributes[t].vertexAttribute=o}})),{attributes:l}}},{key:"clearAllAttributes",value:function(){var e;this.attributes.forEach((function(e){e.vertexAttribute&&e.vertexAttribute.destroy()})),null===(e=this.attributesAndIndices)||void 0===e||e.elements.destroy(),this.attributes=[]}}]),e}()).prototype,"rendererService",[lO],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hO=fO))||hO);function bO(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{u(n.next(e))}catch(e){a(e)}}function s(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}u((n=n.apply(e,t||[])).next())}))}function xO(e,t){var r,n,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function SO(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o}function EO(e,t,r){if(r||2===arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function AO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var TO={exports:{}},wO={exports:{}},CO={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default}(CO,CO.exports);var kO={},MO={exports:{}},PO={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=t.pop();return e.call(this,t,n)}},e.exports=t.default}(PO,PO.exports);var IO={};Object.defineProperty(IO,"__esModule",{value:!0}),IO.fallback=DO,IO.wrap=FO;var OO,RO=IO.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,LO=IO.hasSetImmediate="function"==typeof setImmediate&&setImmediate,NO=IO.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function DO(e){setTimeout(e,0)}function FO(e){return function(t){for(var r=[],n=arguments.length-1;n-- >0;)r[n]=arguments[n+1];return e((function(){return t.apply(void 0,r)}))}}OO=RO?queueMicrotask:LO?setImmediate:NO?process.nextTick:DO,IO.default=FO(OO),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,i.isAsync)(e))return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];var n=t.pop(),i=e.apply(this,t);return o(i,n)};return(0,r.default)((function(t,r){var n;try{n=e.apply(this,t)}catch(e){return r(e)}if(n&&"function"==typeof n.then)return o(n,r);r(null,n)}))};var r=a(PO.exports),n=a(IO),i=kO;function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return e.then((function(e){s(t,null,e)}),(function(e){s(t,e&&e.message?e:new Error(e))}))}function s(e,t,r){try{e(t,r)}catch(e){(0,n.default)((function(e){throw e}),e)}}e.exports=t.default}(MO,MO.exports),Object.defineProperty(kO,"__esModule",{value:!0}),kO.isAsyncIterable=kO.isAsyncGenerator=kO.isAsync=void 0;var zO,BO=(zO=MO.exports)&&zO.__esModule?zO:{default:zO};function UO(e){return"AsyncFunction"===e[Symbol.toStringTag]}kO.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return UO(e)?(0,BO.default)(e):e},kO.isAsync=UO,kO.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},kO.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]};var jO={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===t&&(t=e.length);if(!t)throw new Error("arity is undefined");return function(){for(var r=this,n=[],i=arguments.length;i--;)n[i]=arguments[i];return"function"==typeof n[t-1]?e.apply(this,n):new Promise((function(i,a){n[t-1]=function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(e)return a(e);i(t.length>1?t:t[0])},e.apply(r,n)}))}},e.exports=t.default}(jO,jO.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=a(CO.exports),n=a(kO),i=a(jO.exports);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,i){var a=(0,r.default)(t)?[]:{};e(t,(function(e,t,r){(0,n.default)(e)((function(e){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];n.length<2&&(n=n[0]),a[t]=n,r(e)}))}),(function(e){return i(e,a)}))}),3),e.exports=t.default}(wO,wO.exports);var VO={exports:{}},GO={exports:{}},HO={exports:{}},WO={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default}(WO,WO.exports);var YO={exports:{}},XO={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default}(XO,XO.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(e))return function(e){var t=-1,r=e.length;return function(){return++t<r?{value:e[t],key:t}:null}}(e);var t=(0,n.default)(e);return t?function(e){var t=-1;return function(){var r=e.next();return r.done?null:(t++,{value:r.value,key:t})}}(t):function(e){var t=e?Object.keys(e):[],r=-1,n=t.length;return function i(){var a=t[++r];return"__proto__"===a?i():r<n?{value:e[a],key:a}:null}}(e)};var r=i(CO.exports),n=i(XO.exports);function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(YO,YO.exports);var ZO={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}},e.exports=t.default}(ZO,ZO.exports);var qO={exports:{}},KO={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.default={},e.exports=t.default}(KO,KO.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i){var a=!1,o=!1,s=!1,u=0,c=0;function l(){u>=t||s||a||(s=!0,e.next().then((function(e){var t=e.value,r=e.done;if(!o&&!a){if(s=!1,r)return a=!0,void(u<=0&&i(null));u++,n(t,c,h),c++,l()}})).catch(f))}function h(e,t){if(u-=1,!o)return e?f(e):!1===e?(a=!0,void(o=!0)):t===r.default||a&&u<=0?(a=!0,i(null)):void l()}function f(e){o||(s=!1,a=!0,i(e))}l()};var r=function(e){return e&&e.__esModule?e:{default:e}}(KO.exports);e.exports=t.default}(qO,qO.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=u(WO.exports),n=u(YO.exports),i=u(ZO.exports),a=kO,o=u(qO.exports),s=u(KO.exports);function u(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){return function(t,u,c){if(c=(0,r.default)(c),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return c(null);if((0,a.isAsyncGenerator)(t))return(0,o.default)(t,e,u,c);if((0,a.isAsyncIterable)(t))return(0,o.default)(t[Symbol.asyncIterator](),e,u,c);var l=(0,n.default)(t),h=!1,f=!1,p=0,d=!1;function v(e,t){if(!f)if(p-=1,e)h=!0,c(e);else if(!1===e)h=!0,f=!0;else{if(t===s.default||h&&p<=0)return h=!0,c(null);d||g()}}function g(){for(d=!0;p<e&&!h;){var t=l();if(null===t)return h=!0,void(p<=0&&c(null));p+=1,u(t.value,t.key,(0,i.default)(v))}d=!1}g()}},e.exports=t.default}(HO,HO.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=a(HO.exports),n=a(kO),i=a(jO.exports);function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,i,a){return(0,r.default)(t)(e,(0,n.default)(i),a)}),4),e.exports=t.default}(GO,GO.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=i(GO.exports),n=i(jO.exports);function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,n.default)((function(e,t,n){return(0,r.default)(e,1,t,n)}),3),e.exports=t.default}(VO,VO.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(n.default,e,t)};var r=i(wO.exports),n=i(VO.exports);function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(TO,TO.exports);var QO=AO(TO.exports),$O=function(){function e(){this.args=[],this.tasks=[]}return e.prototype.call=function(){for(var e=arguments,t=[],r=0;r<arguments.length;r++)t[r]=e[r];return this.args=t,QO(this.tasks)},e.prototype.tap=function(e,t){var r=this;this.tasks.push((function(n){t.apply(void 0,EO([],SO(r.args),!1)),n(null,e)}))},e}(),JO={exports:{}},eR={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=c(CO.exports),n=c(KO.exports),i=c(GO.exports),a=c(WO.exports),o=c(ZO.exports),s=c(kO),u=c(jO.exports);function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t,r){r=(0,a.default)(r);var i=0,s=0,u=e.length,c=!1;function l(e,t){!1===e&&(c=!0),!0!==c&&(e?r(e):++s!==u&&t!==n.default||r(null))}for(0===u&&r(null);i<u;i++)t(e[i],i,(0,o.default)(l))}function h(e,t,r){return(0,i.default)(e,1/0,t,r)}t.default=(0,u.default)((function(e,t,n){return((0,r.default)(e)?l:h)(e,(0,s.default)(t),n)}),3),e.exports=t.default}(eR,eR.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(r.default,e,t)};var r=i(eR.exports),n=i(wO.exports);function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default}(JO,JO.exports);var tR={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=o(WO.exports),n=o(ZO.exports),i=o(kO),a=o(jO.exports);function o(e){return e&&e.__esModule?e:{default:e}}t.default=(0,a.default)((function(e,t){if(t=(0,r.default)(t),!Array.isArray(e))return t(new Error("First argument to waterfall must be an array of functions"));if(!e.length)return t();var a=0;function o(t){(0,i.default)(e[a++]).apply(void 0,t.concat([(0,n.default)(s)]))}function s(r){for(var n=[],i=arguments.length-1;i-- >0;)n[i]=arguments[i+1];if(!1!==r)return r||a===e.length?t.apply(void 0,[r].concat(n)):void o(n)}o([])})),e.exports=t.default}(tR,tR.exports);var rR=AO(tR.exports),nR=function(){function e(){this.tasks=[]}return e.prototype.call=function(){return QO(this.tasks)},e.prototype.tap=function(e,t){this.tasks.push((function(r){r(t(),e)}))},e}(),iR=function(){function e(){this.args=[],this.tasks=[]}return e.prototype.promise=function(){for(var e=arguments,t=[],r=0;r<arguments.length;r++)t[r]=e[r];return this.args=t,QO(this.tasks)},e.prototype.tapPromise=function(e,t){var r=this;this.tasks.push((function(n){return bO(r,void 0,void 0,(function(){return xO(this,(function(r){switch(r.label){case 0:return[4,t.apply(void 0,EO([],SO(this.args),!1))];case 1:return r.sent(),n(null,e),[2]}}))}))}))},e}(),aR=function(){function e(){this.args=[],this.tasks=[]}return e.prototype.promise=function(){for(var e=arguments,t=[],r=0;r<arguments.length;r++)t[r]=e[r];return this.args=t,QO(this.tasks)},e.prototype.tapPromise=function(e,t){var r=this;this.tasks.push((function(n){return bO(r,void 0,void 0,(function(){var r;return xO(this,(function(i){switch(i.label){case 0:return[4,t.apply(void 0,EO([],SO(this.args),!1))];case 1:return r=i.sent(),n(r,e),[2]}}))}))}))},e}(),oR=function(){function e(){this.tasks=[]}return e.prototype.promise=function(){return rR(this.tasks)},e.prototype.tapPromise=function(e,t){0===this.tasks.length?this.tasks.push((function(e){t().then((function(t){e(null,t)}))})):this.tasks.push((function(e,r){t(e).then((function(e){r(null,e)}))}))},e}();function sR(e){var t=e.target||e.srcElement;t.__resizeRAF__&&cancelAnimationFrame(t.__resizeRAF__),t.__resizeRAF__=requestAnimationFrame((function(){var r=t.__resizeTrigger__,n=r&&r.__resizeListeners__;n&&n.forEach((function(t){t.call(r,e)}))}))}var uR,cR,lR,hR,fR,pR,dR,vR,gR,mR,yR,_R,bR,xR,SR,ER,AR,TR,wR,CR,kR,MR,PR,IR,OR,RR,LR,NR,DR,FR,zR,BR,UR,jR,VR,GR=function(e,t){var r,n=this.document,i=n.attachEvent;if("undefined"!=typeof navigator&&(r=navigator.userAgent.match(/Trident/)||navigator.userAgent.match(/Edge/)),!e.__resizeListeners__)if(e.__resizeListeners__=[],i)e.__resizeTrigger__=e,e.attachEvent("onresize",sR);else{"static"===getComputedStyle(e).position&&(e.style.position="relative");var a=e.__resizeTrigger__=n.createElement("object");a.setAttribute("style","position: absolute; top: 0; left: 0; height: 100%; width: 100%; pointer-events: none; z-index: -1; opacity: 0;"),a.setAttribute("class","resize-sensor"),a.setAttribute("tabindex","-1"),a.setAttribute("title",""),a.__resizeElement__=e,a.onload=function(){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__,this.contentDocument.defaultView.addEventListener("resize",sR)},a.type="text/html",r&&e.appendChild(a),a.data="about:blank",r||e.appendChild(a)}e.__resizeListeners__.push(t)},HR="undefined"==typeof window?GR:GR.bind(window),WR=function(e,t){var r=document.attachEvent,n=e.__resizeListeners__||[];if(t){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}else n=e.__resizeListeners__=[];if(!n.length){if(r)e.detachEvent("onresize",sR);else if(e.__resizeTrigger__){var a=e.__resizeTrigger__.contentDocument,o=a&&a.defaultView;o&&(o.removeEventListener("resize",sR),delete o.__resizeTrigger__),e.__resizeTrigger__=!e.removeChild(e.__resizeTrigger__)}delete e.__resizeListeners__}};HR.unbind=WR;var YR=(uR=Me(),cR=ke(ba.SceneID),lR=ke(ba.IIconService),hR=ke(ba.IFontService),fR=ke(ba.IControlService),pR=ke(ba.IGlobalConfigService),dR=ke(ba.IMapService),vR=ke(ba.ICoordinateSystemService),gR=ke(ba.IRendererService),mR=ke(ba.ILayerService),yR=ke(ba.IDebugService),_R=ke(ba.ICameraService),bR=ke(ba.IInteractionService),xR=ke(ba.IPickingService),SR=ke(ba.IShaderModuleService),ER=ke(ba.IMarkerService),AR=ke(ba.IPopupService),uR((CR=I((wR=function(e){f(a,e);var t,r,n=x(a);function a(){var e;return u(this,a),h(_(e=n.call(this)),"destroyed",!1),h(_(e),"loaded",!1),P(_(e),"id",CR,_(e)),P(_(e),"iconService",kR,_(e)),P(_(e),"fontService",MR,_(e)),P(_(e),"controlService",PR,_(e)),P(_(e),"configService",IR,_(e)),P(_(e),"map",OR,_(e)),P(_(e),"coordinateSystemService",RR,_(e)),P(_(e),"rendererService",LR,_(e)),P(_(e),"layerService",NR,_(e)),P(_(e),"debugService",DR,_(e)),P(_(e),"cameraService",FR,_(e)),P(_(e),"interactionService",zR,_(e)),P(_(e),"pickingService",BR,_(e)),P(_(e),"shaderModuleService",UR,_(e)),P(_(e),"markerService",jR,_(e)),P(_(e),"popupService",VR,_(e)),h(_(e),"inited",!1),h(_(e),"initPromise",void 0),h(_(e),"rendering",!1),h(_(e),"$container",void 0),h(_(e),"canvas",void 0),h(_(e),"markerContainer",void 0),h(_(e),"hooks",void 0),h(_(e),"handleWindowResized",(function(){e.emit("resize"),e.$container&&(e.initContainer(),n_(),e.coordinateSystemService.needRefresh=!0,e.render())})),h(_(e),"handleMapCameraChanged",(function(t){e.cameraService.update(t),e.layerService.layerList.forEach((function(t){e.layerService.renderLayer(t.id)}))})),e.hooks={init:new iR},e}return l(a,[{key:"init",value:function(e){var t=this;this.configService.setSceneConfig(this.id,e),this.shaderModuleService.registerBuiltinModules(),this.iconService.init(),this.iconService.on("imageUpdate",(function(){return t.render()})),this.fontService.init(),this.hooks.init.tapPromise("initMap",s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.debugService.log("map.mapInitStart",{type:t.map.version}),e.next=3,new Promise((function(e){t.map.onCameraChanged((function(r){t.cameraService.init(),t.cameraService.update(r),e()})),t.map.init()}));case 3:t.map.onCameraChanged(t.handleMapCameraChanged),t.map.addMarkerContainer(),t.markerService.addMarkers(),t.markerService.addMarkerLayers(),t.popupService.initPopup(),t.interactionService.init(),t.interactionService.on(NP.Drag,t.addSceneEvent.bind(t));case 10:case"end":return e.stop()}}),e)})))),this.hooks.init.tapPromise("initRenderer",s(i().mark((function r(){var n,a;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=t.map.getOverlayContainer(),t.$container=n||RI(t.configService.getSceneConfig(t.id).id||""),!t.$container){r.next=12;break}return t.canvas=t.map.map._canvas,r.next=6,t.rendererService.init(t.canvas,t.configService.getSceneConfig(t.id),e.gl);case 6:t.registerContextLost(),t.initContainer(),HR(t.$container,t.handleWindowResized),Yv.matchMedia&&(null===(a=Yv.matchMedia("screen and (-webkit-min-device-pixel-ratio: 1.5)"))||void 0===a||a.addListener(t.handleWindowResized)),r.next=13;break;case 12:console.error("容器 id 不存在");case 13:t.pickingService.init(t.id);case 14:case"end":return r.stop()}}),r)})))),this.render()}},{key:"registerContextLost",value:function(){var e=this,t=this.rendererService.getCanvas();t&&t.addEventListener("webglcontextlost",(function(){return e.emit("webglcontextlost")}))}},{key:"initMiniScene",value:function(e){var t=this;this.configService.setSceneConfig(this.id,e),this.shaderModuleService.registerBuiltinModules(),this.iconService.init(),this.iconService.on("imageUpdate",(function(){return t.render()})),this.fontService.init(),this.hooks.init.tapPromise("initMap",s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){t.map.onCameraChanged((function(r){t.cameraService.init(),t.cameraService.update(r),"GAODE2.x"!==t.map.version&&e()})),t.map.initMiniMap()}));case 2:t.map.onCameraChanged(t.handleMapCameraChanged),t.interactionService.init(),t.interactionService.on(NP.Drag,t.addSceneEvent.bind(t));case 5:case"end":return e.stop()}}),e)})))),this.hooks.init.tapPromise("initRenderer",s(i().mark((function r(){var n;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=e.canvas,t.$container=n||null,!t.$container){r.next=7;break}return r.next=5,t.rendererService.init(e.canvas,t.configService.getSceneConfig(t.id),void 0);case 5:r.next=8;break;case 7:console.error("容器 id 不存在");case 8:t.pickingService.init(t.id);case 9:case"end":return r.stop()}}),r)})))),this.initPromise=this.hooks.init.promise(),this.render()}},{key:"addLayer",value:function(e){this.layerService.sceneService=this,this.layerService.add(e)}},{key:"addMask",value:function(e){this.layerService.sceneService=this,this.layerService.addMask(e)}},{key:"render",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.rendering&&!this.destroyed){e.next=2;break}return e.abrupt("return");case 2:if(this.rendering=!0,this.inited){e.next=16;break}return e.next=6,this.hooks.init.promise();case 6:return this.destroyed&&this.destroy(),e.next=9,this.layerService.initLayers();case 9:this.layerService.renderLayers(),this.controlService.addControls(),this.loaded=!0,this.emit("loaded"),this.inited=!0,e.next=20;break;case 16:return e.next=18,this.layerService.initLayers();case 18:return e.next=20,this.layerService.renderLayers();case 20:this.rendering=!1;case 21:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"addFontFace",value:function(e,t){this.fontService.addFontFace(e,t)}},{key:"getSceneContainer",value:function(){return this.$container}},{key:"exportPng",value:(t=s(i().mark((function e(t){var r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null===(r=this.$container)||void 0===r?void 0:r.getElementsByTagName("canvas")[0],e.next=3,this.render();case 3:return a="jpg"===t?null==n?void 0:n.toDataURL("image/jpeg"):null==n?void 0:n.toDataURL("image/png"),e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getSceneConfig",value:function(){return this.configService.getSceneConfig(this.id)}},{key:"getPointSizeRange",value:function(){return this.rendererService.getPointSizeRange()}},{key:"addMarkerContainer",value:function(){var e=this.$container.parentElement;null!==e&&(this.markerContainer=Zy("div","l7-marker-container",e))}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"destroy",value:function(){var e,t,r=this;if(this.inited){var n;if(WR(this.$container,this.handleWindowResized),Yv.matchMedia)null===(n=Yv.matchMedia("screen and (min-resolution: 2dppx)"))||void 0===n||n.removeListener(this.handleWindowResized);this.pickingService.destroy(),this.layerService.destroy(),this.interactionService.destroy(),this.controlService.destroy(),this.markerService.destroy(),this.fontService.destroy(),this.iconService.destroy(),this.removeAllListeners(),this.inited=!1,this.map.destroy(),setTimeout((function(){var e;null===(e=r.$container)||void 0===e||e.removeChild(r.canvas),r.canvas=null,r.rendererService.destroy()})),null===(e=this.$container)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(this.$container),this.emit("destroy")}else this.destroyed=!0}},{key:"initContainer",value:function(){var e,t,r=a_,n=(null===(e=this.$container)||void 0===e?void 0:e.clientWidth)||400,i=(null===(t=this.$container)||void 0===t?void 0:t.clientHeight)||300,a=this.canvas;a&&(a.width=n*r,a.height=i*r),this.rendererService.viewport({x:0,y:0,width:r*n,height:r*i})}},{key:"setCanvas",value:function(){var e,t,r=a_,n=(null===(e=this.$container)||void 0===e?void 0:e.clientWidth)||400,i=(null===(t=this.$container)||void 0===t?void 0:t.clientHeight)||300,a=this.canvas;a.width=n*r,a.height=i*r,a.style.width="100%",a.style.height="100%"}},{key:"addSceneEvent",value:function(e){this.emit(e.type,e)}}]),a}(F)).prototype,"id",[cR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),kR=I(wR.prototype,"iconService",[lR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),MR=I(wR.prototype,"fontService",[hR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),PR=I(wR.prototype,"controlService",[fR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),IR=I(wR.prototype,"configService",[pR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),OR=I(wR.prototype,"map",[dR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),RR=I(wR.prototype,"coordinateSystemService",[vR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),LR=I(wR.prototype,"rendererService",[gR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),NR=I(wR.prototype,"layerService",[mR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),DR=I(wR.prototype,"debugService",[yR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),FR=I(wR.prototype,"cameraService",[_R],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zR=I(wR.prototype,"interactionService",[bR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),BR=I(wR.prototype,"pickingService",[xR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),UR=I(wR.prototype,"shaderModuleService",[SR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),jR=I(wR.prototype,"markerService",[ER],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),VR=I(wR.prototype,"popupService",[AR],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),TR=wR))||TR);var XR=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var ZR=function(e){return this.__data__.has(e)};function qR(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new iM;++t<r;)this.add(e[t])}qR.prototype.add=qR.prototype.push=XR,qR.prototype.has=ZR;var KR=qR;var QR=function(e,t){return!!(null==e?0:e.length)&&Um(e,t,0)>-1};var $R=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1};var JR=function(e,t){return e.has(t)};var eL=function(){};var tL=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r},rL=aI&&1/tL(new aI([,-0]))[1]==1/0?function(e){return new aI(e)}:eL;var nL=function(e,t,r){var n=-1,i=QR,a=e.length,o=!0,s=[],u=s;if(r)o=!1,i=$R;else if(a>=200){var c=t?null:rL(e);if(c)return tL(c);o=!1,i=JR,u=new KR}else u=t?[]:s;e:for(;++n<a;){var l=e[n],h=t?t(l):l;if(l=r||0!==l?l:0,o&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue e;t&&u.push(h),s.push(l)}else i(u,h,r)||(u!==s&&u.push(h),s.push(l))}return s};var iL=function(e){return e&&e.length?nL(e):[]};var aL=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\s\S]*?);/g;function oL(e){var t={};return{content:e=e.replace(aL,(function(e,r,n){var i=n.split(":"),a=i[0].trim(),o="";switch(i.length>1&&(o=i[1].trim()),r){case"bool":o="true"===o;break;case"float":case"int":o=Number(o);break;case"vec2":case"vec3":case"vec4":case"ivec2":case"ivec3":case"ivec4":case"mat2":case"mat3":case"mat4":o=o?o.replace("[","").replace("]","").split(",").reduce((function(e,t){return e.push(Number(t.trim())),e}),[]):new Array(function(e){var t=0;switch(e){case"vec2":case"ivec2":t=2;break;case"vec3":case"ivec3":t=3;break;case"vec4":case"ivec4":case"mat2":t=4;break;case"mat3":t=9;break;case"mat4":t=16}return t}(r)).fill(0)}return t[a]=o,"uniform ".concat(r," ").concat(a,";\n")})),uniforms:t}}var sL,uL,cL,lL,hL,fL,pL,dL,vL,gL="#define PI 3.14159265359",mL=/precision\s+(high|low|medium)p\s+float/,yL=/#pragma include (["^+"]?["[a-zA-Z_0-9](.*)"]*?)/g,_L=/void\s+main\s*\([^)]*\)\s*\{\n?/,bL=Me()(sL=function(){function e(){u(this,e),h(this,"moduleCache",{}),h(this,"rawContentCache",{})}return l(e,[{key:"registerBuiltinModules",value:function(){this.destroy(),this.registerModule("common",{vs:gL,fs:gL}),this.registerModule("decode",{vs:"#define SHIFT_RIGHT17 1.0 / 131072.0\r\n#define SHIFT_RIGHT18 1.0 / 262144.0\r\n#define SHIFT_RIGHT19 1.0 / 524288.0\r\n#define SHIFT_RIGHT20 1.0 / 1048576.0\r\n#define SHIFT_RIGHT21 1.0 / 2097152.0\r\n#define SHIFT_RIGHT22 1.0 / 4194304.0\r\n#define SHIFT_RIGHT23 1.0 / 8388608.0\r\n#define SHIFT_RIGHT24 1.0 / 16777216.0\r\n\r\n#define SHIFT_LEFT17 131072.0\r\n#define SHIFT_LEFT18 262144.0\r\n#define SHIFT_LEFT19 524288.0\r\n#define SHIFT_LEFT20 1048576.0\r\n#define SHIFT_LEFT21 2097152.0\r\n#define SHIFT_LEFT22 4194304.0\r\n#define SHIFT_LEFT23 8388608.0\r\n#define SHIFT_LEFT24 16777216.0\r\n\r\nvec2 unpack_float(float packedValue) {\r\n  int packedIntValue = int(packedValue);\r\n  int v0 = packedIntValue / 256;\r\n  return vec2(v0, packedIntValue - v0 * 256);\r\n}\r\n\r\nvec4 decode_color(vec2 encodedColor) {\r\n  return vec4(\r\n    unpack_float(encodedColor[0]) / 255.0,\r\n    unpack_float(encodedColor[1]) / 255.0\r\n  );\r\n}\r\n",fs:""}),this.registerModule("projection",{vs:"#define TILE_SIZE 512.0\r\n#define PI 3.1415926536\r\n#define WORLD_SCALE TILE_SIZE / (PI * 2.0)\r\n\r\n#define COORDINATE_SYSTEM_LNGLAT 1.0        // mapbox\r\n#define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0 // mapbox offset\r\n#define COORDINATE_SYSTEM_VECTOR_TILE 3.0\r\n#define COORDINATE_SYSTEM_IDENTITY 4.0\r\n#define COORDINATE_SYSTEM_P20 5.0           // amap\r\n#define COORDINATE_SYSTEM_P20_OFFSET 6.0    // amap offset\r\n#define COORDINATE_SYSTEM_METER_OFFSET 7.0\r\n\r\n#define COORDINATE_SYSTEM_P20_2 8.0         // amap2.0\r\n\r\nuniform mat4 u_ViewMatrix;\r\nuniform mat4 u_ProjectionMatrix;\r\nuniform mat4 u_ViewProjectionMatrix;\r\nuniform float u_Zoom : 1;\r\nuniform float u_ZoomScale : 1;\r\n\r\nuniform float u_CoordinateSystem;\r\nuniform vec2 u_ViewportCenter;\r\nuniform vec4 u_ViewportCenterProjection;\r\nuniform vec3 u_PixelsPerDegree;\r\nuniform vec3 u_PixelsPerDegree2;\r\nuniform vec3 u_PixelsPerMeter;\r\nuniform bool u_isMultiCoor: false;\r\n\r\nuniform vec2 u_ViewportSize;\r\nuniform float u_DevicePixelRatio;\r\nuniform float u_FocalDistance;\r\nuniform vec3 u_CameraPosition;\r\n\r\n// uniform mat4 u_Mvp;\r\n\r\n// web mercator coords -> world coords\r\nvec2 project_mercator(vec2 lnglat) {\r\n  float x = lnglat.x;\r\n  return vec2(\r\n    radians(x) + PI,\r\n    PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))\r\n  );\r\n}\r\n\r\nfloat project_scale(float meters) {\r\n  return meters * u_PixelsPerMeter.z;\r\n}\r\n\r\n\r\n// offset coords -> world coords\r\nvec4 project_offset(vec4 offset) {\r\n  float dy = offset.y;\r\n  dy = clamp(dy, -1., 1.);\r\n  vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy;\r\n  return vec4(offset.xyz * pixels_per_unit , offset.w);\r\n}\r\nvec4 project_offset_meter(vec4 offset) {\r\n  float dy = offset.y;\r\n  dy = clamp(dy, -1., 1.);\r\n  vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy;\r\n  return vec4(offset.xyz  , offset.w);\r\n}\r\n\r\nvec3 project_normal(vec3 normal) {\r\n  vec4 normal_modelspace = u_ModelMatrix * vec4(normal, 0.0);\r\n  return normalize(normal_modelspace.xyz * u_PixelsPerMeter);\r\n}\r\n\r\nvec3 project_offset_normal(vec3 vector) {\r\n  if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01\r\n    || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ) {\r\n    // normals generated by the polygon tesselator are in lnglat offsets instead of meters\r\n    return normalize(vector * u_PixelsPerDegree);\r\n  }\r\n  return project_normal(vector);\r\n}\r\n// || u_CoordinateSystem < COORDINATE_SYSTEM_P20_OFFSET + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_P20_OFFSET - 0.01\r\n// reverse Y\r\nvec3 reverse_offset_normal(vec3 vector) {\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 ||u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET ) {\r\n    return vector * vec3(1.0, -1.0, 1.0);\r\n  }\r\n\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.0\r\n    return vector;\r\n  }\r\n  return vector;\r\n}\r\n\r\nvec4 project_mvt_offset_position(vec4 position) {\r\n  float a = COORDINATE_SYSTEM_LNGLAT_OFFSET;\r\n  float b = COORDINATE_SYSTEM_P20_OFFSET;\r\n  float c = COORDINATE_SYSTEM_LNGLAT;\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n    return project_offset(vec4(0.0, 0.0, position.z, position.w));\r\n  }\r\n\r\n  if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) {\r\n    return vec4(\r\n      project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale,\r\n      project_scale(position.z),\r\n      position.w\r\n    );\r\n  }\r\n  return position;\r\n}\r\n\r\nvec4 project_position(vec4 position) {\r\n  float a = COORDINATE_SYSTEM_LNGLAT_OFFSET;\r\n  float b = COORDINATE_SYSTEM_P20_OFFSET;\r\n  float c = COORDINATE_SYSTEM_LNGLAT;\r\n \r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\r\n    || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n    float X = position.x - u_ViewportCenter.x ;\r\n    float Y = position.y - u_ViewportCenter.y ;\r\n    return project_offset(vec4(X, Y, position.z, position.w));\r\n  }\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n    float X = (position.x - u_ViewportCenter.x)* u_ZoomScale ;\r\n    float Y = ( position.y - u_ViewportCenter.y)* u_ZoomScale ;\r\n    return project_offset_meter(vec4(X, Y, project_scale(position.z), position.w));\r\n  }\r\n  if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) {\r\n     if (u_isMultiCoor) {\r\n      return vec4(\r\n        position.xy * u_ZoomScale,\r\n        project_scale(position.z),\r\n        position.w\r\n      );\r\n    }\r\n    return vec4(\r\n      project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale,\r\n      project_scale(position.z),\r\n      position.w\r\n    );\r\n  }\r\n\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) {\r\n    return vec4(\r\n      (project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale - vec2(215440491., 106744817.)) * vec2(1., -1.),\r\n      project_scale(position.z),\r\n      position.w\r\n    );\r\n  }\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    // return vec4(\r\n    //   (position.xy * WORLD_SCALE * u_ZoomScale) * vec2(1., -1.), \r\n    //   project_scale(position.z), \r\n    //   position.w);\r\n\r\n     return vec4(\r\n      position.xy, \r\n      project_scale(position.z), \r\n      position.w);\r\n  }\r\n  return position;\r\n\r\n  // TODO: 瓦片坐标系 & 常规世界坐标系\r\n}\r\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\r\n  vec2 offset = pixels / u_ViewportSize * u_DevicePixelRatio * 2.0;\r\n  return offset * u_FocalDistance;\r\n}\r\n\r\nfloat project_pixel_allmap(float pixel) {\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\r\n    return pixel * pow(2.0, u_Zoom);\r\n  }\r\n  return pixel * u_FocalDistance ;\r\n}\r\n\r\n// 适配纹理贴图的等像素大小\r\nfloat project_pixel_texture(float pixel) {\r\n  // mapbox zoom > 12\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n    return pixel * pow(0.5, u_Zoom) * u_FocalDistance ;\r\n  }\r\n\r\n  // amap2 zoom > 12\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ;\r\n  }\r\n\r\n  // amap zoom > 12\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n    return pixel * pow(0.5, u_Zoom)* u_FocalDistance ;\r\n  }\r\n  \r\n  // amap zoom < 12\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) {\r\n    return pixel * pow(2.0, (20.0 - u_Zoom))* u_FocalDistance ;\r\n  }\r\n  return pixel * 2.0 *  u_FocalDistance;;\r\n}\r\n\r\n// 在不论什么底图下需要统一处理的时候使用\r\nfloat project_float_pixel(float pixel) {\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n    // mapbox P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\r\n    return pixel * pow(2.0, (19.0 - u_Zoom))  * u_FocalDistance ;\r\n  }\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n    // amap P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\r\n    return pixel * pow(2.0, (19.0 - u_Zoom));\r\n  }\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    // amap2 P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\r\n    return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ;\r\n  }\r\n  return pixel * u_FocalDistance;\r\n}\r\n\r\nfloat project_pixel(float pixel) {\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n    // amap P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\r\n    return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;\r\n  }\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    // amap2 P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\r\n    return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;\r\n  }\r\n  return pixel * u_FocalDistance;\r\n}\r\nvec2 project_pixel(vec2 pixel) {\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n    // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\r\n    return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;\r\n  }\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\r\n    return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;\r\n  }\r\n  return pixel * -1. * u_FocalDistance;\r\n}\r\nvec3 project_pixel(vec3 pixel) {\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n    // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\r\n    return pixel * pow(2.0, (19.0 - u_Zoom)) *  u_FocalDistance ;\r\n  }\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\r\n    return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))  * u_FocalDistance ;\r\n  }\r\n  return pixel * -1. * u_FocalDistance;\r\n}\r\n\r\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||\r\n    u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n    // Needs to be divided with project_uCommonUnitsPerMeter\r\n    position.w *= u_PixelsPerMeter.z;\r\n  }\r\n\r\n  return viewProjectionMatrix * position + center;\r\n}\r\n\r\n// Projects from common space coordinates to clip space\r\nvec4 project_common_position_to_clipspace(vec4 position) {\r\n  return project_common_position_to_clipspace(\r\n    position,\r\n    u_ViewProjectionMatrix,\r\n    u_ViewportCenterProjection\r\n  );\r\n}\r\n\r\nvec4 unproject_clipspace_to_position(vec4 clipspacePos, mat4 u_InverseViewProjectionMatrix) {\r\n  vec4 pos = u_InverseViewProjectionMatrix * (clipspacePos - u_ViewportCenterProjection);\r\n\r\n  if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||\r\n    u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n    // Needs to be divided with project_uCommonUnitsPerMeter\r\n     pos.w = pos.w / u_PixelsPerMeter.z;\r\n  }\r\n  return pos;\r\n}\r\n\r\n\r\nbool isEqual( float a,  float b) {\r\n    return  a< b + 0.001 && a > b - 0.001;\r\n}",fs:""}),this.registerModule("project",{vs:"\r\n#define E 2.718281828459045\r\nvec2 ProjectFlat(vec2 lnglat){\r\n  float maxs=85.0511287798;\r\n  float lat=max(min(maxs,lnglat.y),-maxs);\r\n  float scale= 268435456.;\r\n  float d=PI/180.;\r\n  float x=lnglat.x*d;\r\n  float y=lat*d;\r\n  y=log(tan((PI/4.)+(y/2.)));\r\n\r\n  float a=.5/PI,\r\n  b=.5,\r\n  c=-.5/PI;\r\n  d=.5;\r\n  x=scale*(a*x+b);\r\n  y=scale*(c*y+d);\r\n  return vec2(x,y);\r\n}\r\n\r\nvec2 unProjectFlat(vec2 px){\r\n  float a=.5/PI;\r\n  float b=.5;\r\n  float c=-.5/PI;\r\n  float d=.5;\r\n  float scale = 268435456.;\r\n  float x=(px.x/scale-b)/a;\r\n  float y=(px.y/scale-d)/c;\r\n  y=(atan(pow(E,y))-(PI/4.))*2.;\r\n  d=PI/180.;\r\n  float lat=y/d;\r\n  float lng=x/d;\r\n  return vec2(lng,lat);\r\n}\r\n\r\nfloat pixelDistance(vec2 from, vec2 to) {\r\n vec2 a1 = ProjectFlat(from);\r\n vec2 b1 = ProjectFlat(to);\r\n return distance(a1, b1);\r\n}\r\n\r\n// gaode2.0\r\nvec2 customProject(vec2 lnglat) { // 经纬度 => 平面坐标\r\n  float t = lnglat.x;\r\n  float e = lnglat.y;\r\n  float Sm = 180.0 / PI;\r\n  float Tm = 6378137.0;\r\n  float Rm = PI / 180.0;\r\n  float r = 85.0511287798;\r\n  e = max(min(r, e), -r);\r\n  t *= Rm;\r\n  e *= Rm;\r\n  e = log(tan(PI / 4.0 + e / 2.0));\r\n  return vec2(t * Tm, e * Tm);\r\n}\r\n\r\nvec2 unProjCustomCoord(vec2 point) { // 平面坐标 => 经纬度\r\n  float Sm = 57.29577951308232; //180 / Math.PI\r\n  float Tm = 6378137.0;\r\n  float t = point.x;\r\n  float e = point.y;\r\n  return vec2(t / Tm * Sm, (2.0 * atan(exp(e / Tm)) - PI / 2.0) * Sm);\r\n}\r\n\r\n\r\nfloat customPixelDistance(vec2 from, vec2 to) {\r\n vec2 a1 = ProjectFlat(from);\r\n vec2 b1 = ProjectFlat(to);\r\n return distance(a1, b1);\r\n}",fs:""}),this.registerModule("sdf_2d",{vs:"",fs:"/**\r\n * 2D signed distance field functions\r\n * @see http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm\r\n */\r\n\r\nfloat ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; }\r\n\r\nfloat sdCircle(vec2 p, float r) {\r\n  return length(p) - r;\r\n}\r\n\r\nfloat sdEquilateralTriangle(vec2 p) {\r\n  float k = sqrt(3.0);\r\n  p.x = abs(p.x) - 1.0;\r\n  p.y = p.y + 1.0/k;\r\n  if( p.x + k*p.y > 0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0;\r\n  p.x -= clamp( p.x, -2.0, 0.0 );\r\n  return -length(p)*sign(p.y);\r\n}\r\n\r\nfloat sdBox(vec2 p, vec2 b) {\r\n  vec2 d = abs(p)-b;\r\n  return length(max(d,vec2(0))) + min(max(d.x,d.y),0.0);\r\n}\r\n\r\nfloat sdPentagon(vec2 p, float r) {\r\n  vec3 k = vec3(0.809016994,0.587785252,0.726542528);\r\n  p.x = abs(p.x);\r\n  p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);\r\n  p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);\r\n  p -= vec2(clamp(p.x,-r*k.z,r*k.z),r);\r\n  return length(p)*sign(p.y);\r\n}\r\n\r\nfloat sdHexagon(vec2 p, float r) {\r\n  vec3 k = vec3(-0.866025404,0.5,0.577350269);\r\n  p = abs(p);\r\n  p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;\r\n  p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);\r\n  return length(p)*sign(p.y);\r\n}\r\n\r\nfloat sdOctogon(vec2 p, float r) {\r\n  vec3 k = vec3(-0.9238795325, 0.3826834323, 0.4142135623 );\r\n  p = abs(p);\r\n  p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);\r\n  p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);\r\n  p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);\r\n  return length(p)*sign(p.y);\r\n}\r\n\r\nfloat sdHexagram(vec2 p, float r) {\r\n  vec4 k=vec4(-0.5,0.8660254038,0.5773502692,1.7320508076);\r\n  p = abs(p);\r\n  p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;\r\n  p -= 2.0*min(dot(k.yx,p),0.0)*k.yx;\r\n  p -= vec2(clamp(p.x,r*k.z,r*k.w),r);\r\n  return length(p)*sign(p.y);\r\n}\r\n\r\nfloat sdRhombus(vec2 p, vec2 b) {\r\n  vec2 q = abs(p);\r\n  float h = clamp((-2.0*ndot(q,b)+ndot(b,b))/dot(b,b),-1.0,1.0);\r\n  float d = length( q - 0.5*b*vec2(1.0-h,1.0+h) );\r\n  return d * sign( q.x*b.y + q.y*b.x - b.x*b.y );\r\n}\r\n\r\nfloat sdVesica(vec2 p, float r, float d) {\r\n  p = abs(p);\r\n  float b = sqrt(r*r-d*d); // can delay this sqrt\r\n  return ((p.y-b)*d>p.x*b)\r\n          ? length(p-vec2(0.0,b))\r\n          : length(p-vec2(-d,0.0))-r;\r\n}\r\n"}),this.registerModule("lighting",{vs:"// Blinn-Phong model\r\n// apply lighting in vertex shader instead of fragment shader\r\n// @see https://learnopengl.com/Advanced-Lighting/Advanced-Lighting\r\nuniform float u_Ambient : 1.0;\r\nuniform float u_Diffuse : 1.0;\r\nuniform float u_Specular : 1.0;\r\nuniform int u_NumOfDirectionalLights : 1;\r\nuniform int u_NumOfSpotLights : 0;\r\n\r\n#define SHININESS 32.0\r\n#define MAX_NUM_OF_DIRECTIONAL_LIGHTS 3\r\n#define MAX_NUM_OF_SPOT_LIGHTS 3\r\n\r\nstruct DirectionalLight {\r\n  vec3 direction;\r\n  vec3 ambient;\r\n  vec3 diffuse;\r\n  vec3 specular;\r\n};\r\n\r\nstruct SpotLight {\r\n  vec3 position;\r\n  vec3 direction;\r\n  vec3 ambient;\r\n  vec3 diffuse;\r\n  vec3 specular;\r\n  float constant;\r\n  float linear;\r\n  float quadratic;\r\n  float angle;\r\n  float blur;\r\n  float exponent;\r\n};\r\n\r\nuniform DirectionalLight u_DirectionalLights[MAX_NUM_OF_DIRECTIONAL_LIGHTS];\r\nuniform SpotLight u_SpotLights[MAX_NUM_OF_SPOT_LIGHTS];\r\n\r\nvec3 calc_directional_light(DirectionalLight light, vec3 normal, vec3 viewDir) {\r\n  vec3 lightDir = normalize(light.direction);\r\n  // diffuse shading\r\n  float diff = max(dot(normal, lightDir), 0.0);\r\n  // Blinn-Phong specular shading\r\n  vec3 halfwayDir = normalize(lightDir + viewDir);\r\n  float spec = pow(max(dot(normal, halfwayDir), 0.0), SHININESS);\r\n\r\n  vec3 ambient = light.ambient * u_Ambient;\r\n  vec3 diffuse = light.diffuse * diff * u_Diffuse;\r\n  vec3 specular = light.specular * spec * u_Specular;\r\n\r\n  return ambient + diffuse + specular;\r\n}\r\n\r\n// vec3 calc_spot_light(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir) {\r\n//   vec3 lightDir = normalize(light.position - fragPos);\r\n//   // diffuse shading\r\n//   float diff = max(dot(normal, lightDir), 0.0);\r\n//   // specular shading\r\n//   vec3 reflectDir = reflect(-lightDir, normal);\r\n//   float spec = pow(max(dot(viewDir, reflectDir), 0.0), SHININESS);\r\n//   // attenuation\r\n//   float distance = length(light.position - fragPos);\r\n//   float attenuation = 1.0 / (light.constant + light.linear * distance +\r\n//           light.quadratic * (distance * distance));\r\n\r\n//   vec3 ambient = light.ambient * u_Ambient;\r\n//   vec3 diffuse = light.diffuse * diff * u_Diffuse;\r\n//   vec3 specular = light.specular * spec * u_Specular;\r\n\r\n//   float spotEffect = dot(normalize(light.direction), -lightDir);\r\n//   float spotCosCutoff = cos(light.angle / 180.0 * PI);\r\n//   float spotCosOuterCutoff = cos((light.angle + light.blur) / 180.0 * PI);\r\n//   float spotCosInnerCutoff = cos((light.angle - light.blur) / 180.0 * PI);\r\n//   if (spotEffect > spotCosCutoff) {\r\n//     spotEffect = pow(smoothstep(spotCosOuterCutoff, spotCosInnerCutoff, spotEffect), light.exponent);\r\n//   } else {\r\n//     spotEffect = 0.0;\r\n//   }\r\n\r\n//   return ambient + attenuation * (spotEffect * diffuse + specular);\r\n// }\r\n\r\nvec3 calc_lighting(vec3 position, vec3 normal, vec3 viewDir) {\r\n  vec3 weight = vec3(0.0);\r\n  for (int i = 0; i < MAX_NUM_OF_DIRECTIONAL_LIGHTS; i++) {\r\n    if (i >= u_NumOfDirectionalLights) {\r\n      break;\r\n    }\r\n    weight += calc_directional_light(u_DirectionalLights[i], normal, viewDir);\r\n  }\r\n  // for (int i = 0; i < MAX_NUM_OF_SPOT_LIGHTS; i++) {\r\n  //   if (i >= u_NumOfSpotLights) {\r\n  //     break;\r\n  //   }\r\n  //   weight += calc_spot_light(u_SpotLights[i], normal, position, viewDir);\r\n  // }\r\n  return weight;\r\n}\r\n",fs:""}),this.registerModule("light",{vs:"#define ambientRatio 0.5\r\n#define diffuseRatio 0.3\r\n#define specularRatio 0.2\r\n\r\n\r\nfloat calc_lighting(vec4 pos) {\r\n\r\n    vec3 worldPos = vec3(pos * u_ModelMatrix);\r\n\r\n    vec3 worldNormal = a_Normal;\r\n      // //cal light weight\r\n    vec3 viewDir = normalize(u_CameraPosition - worldPos);\r\n\r\n    vec3 lightDir = normalize(vec3(1, -10.5, 12));\r\n\r\n    vec3 halfDir = normalize(viewDir+lightDir);\r\n      // //lambert\r\n    float lambert = dot(worldNormal, lightDir);\r\n        //specular\r\n    float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0);\r\n        //sum to light weight\r\n    float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular;\r\n\r\n    return lightWeight;\r\n}\r\n",fs:""}),this.registerModule("picking",{vs:"attribute vec3 a_PickingColor;\r\nvarying vec4 v_PickingResult;\r\n\r\nuniform vec3 u_PickingColor : [0, 0, 0];\r\nuniform vec3 u_CurrentSelectedId : [0, 0, 0];\r\nuniform vec4 u_HighlightColor : [0, 0, 0, 0];\r\nuniform vec4 u_SelectColor : [0, 0, 0, 0];\r\nuniform float u_PickingStage : 0.0;\r\nuniform float u_PickingThreshold : 1.0;\r\nuniform float u_PickingBuffer: 0.0;\r\nuniform float u_shaderPick;\r\nuniform float u_EnableSelect: 0.0;\r\n\r\n#define PICKING_NONE 0.0\r\n#define PICKING_ENCODE 1.0\r\n#define PICKING_HIGHLIGHT 2.0\r\n#define COLOR_SCALE 1. / 255.\r\n\r\n#define NORMAL 0.0\r\n#define HIGHLIGHT 1.0\r\n#define SELECT 2.0\r\n\r\nbool isVertexPicked(vec3 vertexColor) {\r\n  return\r\n    abs(vertexColor.r - u_PickingColor.r) < u_PickingThreshold &&\r\n    abs(vertexColor.g - u_PickingColor.g) < u_PickingThreshold &&\r\n    abs(vertexColor.b - u_PickingColor.b) < u_PickingThreshold;\r\n}\r\n\r\n// 判断当前点是否已经被 select 选中\r\nbool isVertexSelected(vec3 vertexColor) {\r\n  return\r\n    abs(vertexColor.r - u_CurrentSelectedId.r) < u_PickingThreshold &&\r\n    abs(vertexColor.g - u_CurrentSelectedId.g) < u_PickingThreshold &&\r\n    abs(vertexColor.b - u_CurrentSelectedId.b) < u_PickingThreshold;\r\n}\r\n\r\nvoid setPickingColor(vec3 pickingColor) {\r\n  if(u_shaderPick < 0.5) {\r\n    return;\r\n  }\r\n  // compares only in highlight stage\r\n\r\n  v_PickingResult.a = float((u_PickingStage == PICKING_HIGHLIGHT) && isVertexPicked(pickingColor));\r\n\r\n  // if (u_EnableSelect == 1.0 && u_PickingStage == PICKING_HIGHLIGHT && isVertexSelected(pickingColor)) {\r\n  //   // 选中态\r\n  //   v_PickingResult.a = SELECT;\r\n  // } else if (u_PickingStage == PICKING_HIGHLIGHT && isVertexPicked(pickingColor)) {\r\n  //   // 高亮态\r\n  //   v_PickingResult.a = HIGHLIGHT;\r\n  // } else {\r\n  //   v_PickingResult.a = NORMAL;\r\n  // }\r\n\r\n  // Stores the picking color so that the fragment shader can render it during picking\r\n  v_PickingResult.rgb = pickingColor * COLOR_SCALE;\r\n}\r\n\r\nfloat setPickingSize(float x) {\r\n   return u_PickingStage == PICKING_ENCODE ? x + u_PickingBuffer : x;\r\n}\r\n\r\nfloat setPickingOrder(float z) {\r\n   bool selected = bool(v_PickingResult.a);\r\n   return selected ? z + 1. : 0.;\r\n}\r\n",fs:"varying vec4 v_PickingResult;\r\nuniform vec4 u_HighlightColor : [0, 0, 0, 0];\r\nuniform vec4 u_SelectColor : [0, 0, 0, 0];\r\nuniform float u_PickingStage : 0.0;\r\nuniform float u_shaderPick;\r\n\r\nuniform float u_activeMix: 0;\r\n\r\n#define PICKING_NONE 0.0\r\n#define PICKING_ENCODE 1.0\r\n#define PICKING_HIGHLIGHT 2.0\r\n#define COLOR_SCALE 1. / 255.\r\n\r\n#define HIGHLIGHT 1.0\r\n#define SELECT 2.0\r\n\r\n/*\r\n * Returns highlight color if this item is selected.\r\n */\r\nvec4 filterHighlightColor(vec4 color, float weight) {\r\n  // float selected = v_PickingResult.a;\r\n  bool selected = bool(v_PickingResult.a);\r\n\r\n  // if (selected == SELECT) {\r\n  if (selected) {\r\n  //   // 点击选中状态\r\n  //   vec4 selectColor = u_SelectColor * COLOR_SCALE;\r\n  //   return selectColor;\r\n  // } else if (selected == HIGHLIGHT) {\r\n  //   // hover 高亮状态\r\n    vec4 highLightColor = u_HighlightColor * COLOR_SCALE;\r\n\r\n    float highLightAlpha = highLightColor.a;\r\n    float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha));\r\n\r\n    vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio);\r\n    return vec4(mix(resultRGB * weight, color.rgb, u_activeMix), color.a);\r\n  } else {\r\n    return color;\r\n  }\r\n}\r\n\r\n/*\r\n * Returns picking color if picking enabled else unmodified argument.\r\n */\r\nvec4 filterPickingColor(vec4 color) {\r\n  vec3 pickingColor = v_PickingResult.rgb;\r\n  if (u_PickingStage == PICKING_ENCODE && length(pickingColor) < 0.001) {\r\n    discard;\r\n  }\r\n  return u_PickingStage == PICKING_ENCODE ? vec4(pickingColor, step(0.001,color.a)): color;\r\n}\r\n\r\n/*\r\n * Returns picking color if picking is enabled if not\r\n * highlight color if this item is selected, otherwise unmodified argument.\r\n */\r\nvec4 filterColor(vec4 color) {\r\n  // 过滤多余的 shader 计算\r\n  // return color;\r\n  if(u_shaderPick < 0.5) {\r\n    return color; // 暂时去除 直接取消计算在选中时拖拽地图会有问题\r\n  } else {\r\n    return filterPickingColor(filterHighlightColor(color, 1.0));\r\n  }\r\n  \r\n}\r\n\r\nvec4 filterColorAlpha(vec4 color, float alpha) {\r\n  // 过滤多余的 shader 计算\r\n  // return color;\r\n  if(u_shaderPick < 0.5) {\r\n    return color; // 暂时去除 直接取消计算在选中时拖拽地图会有问题\r\n  } else {\r\n    return filterPickingColor(filterHighlightColor(color, alpha));\r\n  }\r\n}\r\n\r\n"}),this.registerModule("commom_attr_vert",{vs:"#ifdef USE_ATTRIBUTE_OPACITY\r\n  attribute float a_Opacity;\r\n#endif\r\n\r\n#ifdef USE_ATTRIBUTE_OFFSETS\r\n  attribute vec2 a_Offsets;\r\n#endif\r\n\r\n#ifdef USE_ATTRIBUTE_STROKE\r\n  attribute vec4 a_Stroke;\r\n#endif",fs:""}),this.registerModule("opacity_attr_vert",{vs:"float opacity = u_opacity;\r\n\r\n#ifdef USE_ATTRIBUTE_OPACITY\r\n    opacity = a_Opacity;\r\n#endif",fs:""})}},{key:"registerModule",value:function(e,t){var r=t.vs,i=t.fs,a=t.uniforms,o=t.inject,s=oL(r),u=s.content,c=s.uniforms,l=oL(i),h=l.content,f=l.uniforms;this.rawContentCache[e]={fs:h,inject:o,uniforms:n(n(n({},c),f),a),vs:u}}},{key:"destroy",value:function(){this.moduleCache={},this.rawContentCache={}}},{key:"getModule",value:function(e){var t=this,r=this.rawContentCache[e].vs,i=this.rawContentCache[e].fs,a=this.rawContentCache[e].inject,o={};null!=a&&a["vs:#decl"]&&(r=(null==a?void 0:a["vs:#decl"])+r,o=oL(null==a?void 0:a["vs:#decl"]).uniforms),null!=a&&a["vs:#main-start"]&&(r=r.replace(_L,(function(e){return e+(null==a?void 0:a["vs:#main-start"])})));var s=this.processModule(r,[],"vs"),u=s.content,c=s.includeList,l=this.processModule(i,[],"fs"),h=l.content,f=l.includeList,p="",d=iL(c.concat(f).concat(e)).reduce((function(e,r){return n(n({},e),t.rawContentCache[r].uniforms)}),n({},o));return mL.test(h)||(p+="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n#endif\n"),p+=h,this.moduleCache[e]={fs:p.trim(),uniforms:d,vs:u.trim()},this.moduleCache[e]}},{key:"processModule",value:function(e,t,r){var n=this;return{content:e.replace(yL,(function(e,i){var a=i.split(" ")[0].replace(/"/g,"");if(t.indexOf(a)>-1)return"";var o=n.rawContentCache[a][r];return t.push(a),n.processModule(o,t,r).content})),includeList:t}}},{key:"injectDefines",value:function(e){return Object.keys(e).reduce((function(t,r){return t+"#define ".concat(r.toUpperCase()," ").concat(e[r],";\n")}),"\n")}}]),e}())||sL,xL=function(e){return e.Normal="normal",e.PostProcessing="post-processing",e}({}),SL=Me()(uL=function(){function e(){u(this,e),h(this,"shaderModuleService",void 0),h(this,"rendererService",void 0),h(this,"cameraService",void 0),h(this,"mapService",void 0),h(this,"interactionService",void 0),h(this,"layerService",void 0),h(this,"config",void 0)}return l(e,[{key:"getName",value:function(){return""}},{key:"getType",value:function(){return xL.Normal}},{key:"init",value:function(e,t){this.config=t,this.rendererService=e.getContainer().get(ba.IRendererService),this.cameraService=e.getContainer().get(ba.ICameraService),this.mapService=e.getContainer().get(ba.IMapService),this.interactionService=e.getContainer().get(ba.IInteractionService),this.layerService=e.getContainer().get(ba.ILayerService),this.shaderModuleService=e.getContainer().get(ba.IShaderModuleService)}},{key:"render",value:function(e){}}]),e}())||uL,EL=Me()(cL=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"getName",value:function(){return"clear"}},{key:"init",value:function(e,t){E(p(r.prototype),"init",this).call(this,e,t)}},{key:"render",value:function(){this.rendererService.clear({color:[0,0,0,0],depth:1,framebuffer:null})}}]),r}(SL))||cL,AL=(lL=Me(),hL=ke(ba.IPostProcessor),lL((dL=I((pL=function(){function e(){u(this,e),h(this,"passes",[]),P(this,"postProcessor",dL,this),h(this,"layer",void 0),h(this,"renderFlag",void 0),h(this,"width",0),h(this,"height",0)}var t;return l(e,[{key:"setLayer",value:function(e){this.layer=e}},{key:"setRenderFlag",value:function(e){this.renderFlag=e}},{key:"getRenderFlag",value:function(){return this.renderFlag}},{key:"getPostProcessor",value:function(){return this.postProcessor}},{key:"render",value:(t=s(i().mark((function e(){var t,r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=k(this.passes),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=r.value,e.next=7,n.render(this.layer);case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:return e.next=19,this.postProcessor.render(this.layer);case 19:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))),function(){return t.apply(this,arguments)})},{key:"resize",value:function(e,t){this.width===e&&this.height===t||(this.postProcessor.resize(e,t),this.width=e,this.height=t)}},{key:"add",value:function(e,t){e.getType()===xL.PostProcessing?this.postProcessor.add(e,this.layer,t):(e.init(this.layer,t),this.passes.push(e))}},{key:"insert",value:function(e,t,r){e.init(this.layer,t),this.passes.splice(r,0,e)}},{key:"destroy",value:function(){this.passes.length=0}}]),e}()).prototype,"postProcessor",[hL],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),fL=pL))||fL),TL=Me()(vL=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return h(_(e=t.call.apply(t,[this].concat(a))),"pickingFBO",void 0),h(_(e),"layer",void 0),h(_(e),"width",0),h(_(e),"height",0),h(_(e),"alreadyInRendering",!1),h(_(e),"pickFromPickingFBO",(function(t){var r=t.x,i=t.y,a=t.lngLat,o=t.type;if(e.layer.isVisible()&&e.layer.needPick(o)){var s,u=e.rendererService,c=u.getViewportSize,l=u.readPixels,h=u.useFramebuffer,f=c(),p=f.width,d=f.height,v=e.layer.getLayerConfig(),g=v.enableHighlight,m=v.enableSelect,y=r*a_,_=i*a_;if(!(y>p||y<0||_>d||_<0))h(e.pickingFBO,(function(){var t;if(0!==(s=l({x:Math.round(y),y:Math.round(d-(i+1)*a_),width:1,height:1,data:new Uint8Array(4),framebuffer:e.pickingFBO}))[0]||0!==s[1]||0!==s[2]){var u=Bg(s),c=e.layer.getSource().getFeatureById(u),h={x:r,y:i,type:o,lngLat:a,featureId:u,feature:c};c&&(e.layer.setCurrentPickId(u),e.triggerHoverOnLayer(h))}else{var f={x:r,y:i,lngLat:a,type:null===e.layer.getCurrentPickId()?"un"+o:"mouseout",featureId:null,feature:null};e.triggerHoverOnLayer(n(n({},f),{},{type:"unpick"})),e.triggerHoverOnLayer(f),e.layer.setCurrentPickId(null)}g&&e.highlightPickedFeature(s),m&&"click"===o&&(null===(t=s)||void 0===t?void 0:t.toString())!==[0,0,0,0].toString()&&e.selectFeature(s)}))}})),e}return l(r,[{key:"getType",value:function(){return xL.Normal}},{key:"getName",value:function(){return"pixelPicking"}},{key:"init",value:function(e,t){E(p(r.prototype),"init",this).call(this,e,t),this.layer=e;var n=this.rendererService,i=n.createTexture2D,a=n.createFramebuffer,o=(0,n.getViewportSize)(),s=o.width,u=o.height;this.pickingFBO=a({color:i({width:s,height:u,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})}),this.interactionService.on(NP.Hover,this.pickFromPickingFBO),this.interactionService.on(NP.Select,this.selectFeatureHandle.bind(this)),this.interactionService.on(NP.Active,this.highlightFeatureHandle.bind(this))}},{key:"render",value:function(e){var t=this;if(!this.alreadyInRendering){var r=this.rendererService,n=r.getViewportSize,i=r.useFramebuffer,a=r.clear,o=n(),s=o.width,u=o.height;this.alreadyInRendering=!0,this.width===s&&this.height===u||(this.pickingFBO.resize({width:s,height:u}),this.width=s,this.height=u),i(this.pickingFBO,(function(){a({framebuffer:t.pickingFBO,color:[0,0,0,0],stencil:0,depth:1});var r=t.layer.multiPassRenderer.getRenderFlag();t.layer.multiPassRenderer.setRenderFlag(!1),e.hooks.beforePickingEncode.call(),e.render(),e.hooks.afterPickingEncode.call(),t.layer.multiPassRenderer.setRenderFlag(r),t.alreadyInRendering=!1}))}}},{key:"triggerHoverOnLayer",value:function(e){this.layer.emit(e.type,e)}},{key:"highlightPickedFeature",value:function(e){var t=A(e,3),r=t[0],n=t[1],i=t[2];this.layer.hooks.beforeHighlight.call([r,n,i])}},{key:"selectFeature",value:function(e){var t=A(e,3),r=t[0],n=t[1],i=t[2];this.layer.hooks.beforeSelect.call([r,n,i])}},{key:"selectFeatureHandle",value:function(e){var t=Ug(e.featureId);this.selectFeature(new Uint8Array(t))}},{key:"highlightFeatureHandle",value:function(e){var t=Ug(e.featureId);this.highlightPickedFeature(new Uint8Array(t))}}]),r}(SL))||vL,wL="attribute vec2 a_Position;\r\n\r\nvarying vec2 v_UV;\r\n\r\nvoid main() {\r\n  v_UV = 0.5 * (a_Position + 1.0);\r\n  gl_Position = vec4(a_Position, 0., 1.);\r\n}";var CL=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a};var kL=function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:CL(e,t,r)},ML=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var PL=function(e){return ML.test(e)};var IL=function(e){return e.split("")},OL="[\\ud800-\\udfff]",RL="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",LL="\\ud83c[\\udffb-\\udfff]",NL="[^\\ud800-\\udfff]",DL="(?:\\ud83c[\\udde6-\\uddff]){2}",FL="[\\ud800-\\udbff][\\udc00-\\udfff]",zL="(?:"+RL+"|"+LL+")"+"?",BL="[\\ufe0e\\ufe0f]?"+zL+("(?:\\u200d(?:"+[NL,DL,FL].join("|")+")[\\ufe0e\\ufe0f]?"+zL+")*"),UL="(?:"+[NL+RL+"?",RL,DL,FL,OL].join("|")+")",jL=RegExp(LL+"(?="+LL+")|"+UL+BL,"g");var VL=function(e){return e.match(jL)||[]};var GL=function(e){return PL(e)?VL(e):IL(e)},HL=am?am.prototype:void 0,WL=HL?HL.toString:void 0;var YL=function e(t){if("string"==typeof t)return t;if(CM(t))return Dm(t,e)+"";if(OE(t))return WL?WL.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r};var XL=function(e){return null==e?"":YL(e)};var ZL=function(e){return function(t){t=XL(t);var r=PL(t)?GL(t):void 0,n=r?r[0]:t.charAt(0),i=r?kL(r,1).join(""):t.slice(1);return n[e]()+i}}("toUpperCase");var qL=function(e){return ZL(XL(e).toLowerCase())};var KL=function(e,t,r,n){var i=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r};var QL=function(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),$L=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,JL=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var eN=function(e){return(e=XL(e))&&e.replace($L,QL).replace(JL,"")},tN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var rN=function(e){return e.match(tN)||[]},nN=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var iN=function(e){return nN.test(e)},aN="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",oN="["+aN+"]",sN="\\d+",uN="[\\u2700-\\u27bf]",cN="[a-z\\xdf-\\xf6\\xf8-\\xff]",lN="[^\\ud800-\\udfff"+aN+sN+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",hN="(?:\\ud83c[\\udde6-\\uddff]){2}",fN="[\\ud800-\\udbff][\\udc00-\\udfff]",pN="[A-Z\\xc0-\\xd6\\xd8-\\xde]",dN="(?:"+cN+"|"+lN+")",vN="(?:"+pN+"|"+lN+")",gN="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",mN="[\\ufe0e\\ufe0f]?"+gN+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",hN,fN].join("|")+")[\\ufe0e\\ufe0f]?"+gN+")*"),yN="(?:"+[uN,hN,fN].join("|")+")"+mN,_N=RegExp([pN+"?"+cN+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[oN,pN,"$"].join("|")+")",vN+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[oN,pN+dN,"$"].join("|")+")",pN+"?"+dN+"+(?:['’](?:d|ll|m|re|s|t|ve))?",pN+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sN,yN].join("|"),"g");var bN=function(e){return e.match(_N)||[]};var xN=function(e,t,r){return e=XL(e),void 0===(t=r?void 0:t)?iN(e)?bN(e):rN(e):e.match(t)||[]},SN=RegExp("['’]","g");var EN,AN,TN,wN,CN,kN,MN,PN,IN,ON,RN,LN,NN,DN,FN,zN,BN,UN,jN,VN,GN=function(e){return function(t){return KL(xN(eN(t).replace(SN,"")),e,"")}}((function(e,t,r){return t=t.toLowerCase(),e+(r?qL(t):t)})),HN=(EN=Me(),AN=ke(ba.IShaderModuleService),EN((CN=I((wN=function(){function e(){u(this,e),P(this,"shaderModuleService",CN,this),h(this,"rendererService",void 0),h(this,"config",void 0),h(this,"quad",wL),h(this,"enabled",!0),h(this,"renderToScreen",!1),h(this,"model",void 0),h(this,"name",void 0),h(this,"optionsToUpdate",{})}return l(e,[{key:"getName",value:function(){return this.name}},{key:"setName",value:function(e){this.name=e}},{key:"getType",value:function(){return xL.PostProcessing}},{key:"init",value:function(e,t){this.config=t,this.rendererService=e.getContainer().get(ba.IRendererService),this.shaderModuleService=e.getContainer().get(ba.IShaderModuleService);var r=this.rendererService,i=r.createAttribute,a=r.createBuffer,o=r.createModel,s=this.setupShaders(),u=s.vs,c=s.fs,l=s.uniforms;this.model=o({vs:u,fs:c,attributes:{a_Position:i({buffer:a({data:[-4,-4,4,-4,0,4],type:rO.FLOAT}),size:2})},uniforms:n(n({u_Texture:null},l),this.config&&this.convertOptionsToUniforms(this.config)),depth:{enable:!1},count:3,blend:{enable:"copy"===this.getName()}})}},{key:"render",value:function(e,t){var r=this,i=e.multiPassRenderer.getPostProcessor(),a=this.rendererService,o=a.useFramebuffer,s=a.getViewportSize,u=a.clear,c=s(),l=c.width,h=c.height;o(this.renderToScreen?null:i.getWriteFBO(),(function(){u({framebuffer:i.getWriteFBO(),color:[0,0,0,0],depth:1,stencil:0});var e=n({u_BloomFinal:0,u_Texture:i.getReadFBO(),u_ViewportSize:[l,h]},r.convertOptionsToUniforms(r.optionsToUpdate));t&&(e.u_BloomFinal=1,e.u_Texture2=t),r.model.draw({uniforms:e})}))}},{key:"isEnabled",value:function(){return this.enabled}},{key:"setEnabled",value:function(e){this.enabled=e}},{key:"setRenderToScreen",value:function(e){this.renderToScreen=e}},{key:"updateOptions",value:function(e){this.optionsToUpdate=n(n({},this.optionsToUpdate),e)}},{key:"setupShaders",value:function(){throw new Error("Method not implemented.")}},{key:"convertOptionsToUniforms",value:function(e){var t={};return Object.keys(e).forEach((function(r){dO(e[r])||(t["u_".concat(ZL(GN(r)))]=e[r])})),t}}]),e}()).prototype,"shaderModuleService",[AN],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),TN=wN))||TN),WN=Me()(kN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:wL,fs:"varying vec2 v_UV;\r\n\r\nuniform float u_BloomFinal: 0.0;\r\nuniform sampler2D u_Texture;\r\nuniform sampler2D u_Texture2;\r\n\r\nuniform vec2 u_ViewportSize: [1.0, 1.0];\r\nuniform float u_radius: 5.0;\r\nuniform float u_intensity: 0.3;\r\nuniform float u_baseRadio: 0.5;\r\n\r\n// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl\r\nvec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {\r\n  vec4 color = vec4(0.0);\r\n  vec2 off1 = vec2(1.3846153846) * direction;\r\n  vec2 off2 = vec2(3.2307692308) * direction;\r\n  color += texture2D(image, uv) * 0.2270270270;\r\n  color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;\r\n  color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;\r\n  color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;\r\n  color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;\r\n  return color;\r\n}\r\n\r\nfloat luminance(vec4 color) {\r\n  return  0.2125 * color.r + 0.7154 * color.g + 0.0721 * color.b;\r\n}\r\n\r\nvoid main() {\r\n  // vec4 baseColor = texture2D(u_Texture, v_UV);\r\n\r\n  float r = sqrt(u_radius);\r\n\r\n  vec4 c1 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(u_radius, 0.0));\r\n  // c1 *= luminance(c1);\r\n  vec4 c2 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(0.0, u_radius));\r\n  // c2 *= luminance(c2);\r\n  vec4 c3 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, r));\r\n  // c3 *= luminance(c3);\r\n  vec4 c4 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, -r));\r\n  // c4 *= luminance(c4);\r\n  vec4 inbloomColor = (c1 + c2 + c3 + c4) * 0.25;\r\n\r\n  // float lum = luminance(inbloomColor);\r\n  // inbloomColor.rgb *= lum;\r\n\r\n  if(u_BloomFinal > 0.0) {\r\n    vec4 baseColor = texture2D(u_Texture2, v_UV);\r\n    float baselum = luminance(baseColor);\r\n    gl_FragColor = mix(inbloomColor, baseColor, u_baseRadio);\r\n    if(baselum <= 0.2) {\r\n      gl_FragColor = inbloomColor * u_intensity;\r\n    }\r\n  } else {\r\n    gl_FragColor = inbloomColor;\r\n  }\r\n}"});var e=this.shaderModuleService.getModule("blur-pass"),t=e.vs,r=e.fs,i=e.uniforms,a=this.rendererService.getViewportSize(),o=a.width,s=a.height;return{vs:t,fs:r,uniforms:n(n({},i),{},{u_ViewportSize:[o,s]})}}},{key:"convertOptionsToUniforms",value:function(e){var t={};return dO(e.bloomRadius)||(t.u_radius=e.bloomRadius),dO(e.bloomIntensity)||(t.u_intensity=e.bloomIntensity),dO(e.bloomBaseRadio)||(t.u_baseRadio=e.bloomBaseRadio),t}}]),r}(HN))||kN,YN="varying vec2 v_UV;\r\n\r\nuniform sampler2D u_Texture;\r\n\r\nuniform vec2 u_ViewportSize: [1.0, 1.0];\r\nuniform vec2 u_BlurDir: [1.0, 0.0];\r\n\r\n// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl\r\nvec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {\r\n  vec4 color = vec4(0.0);\r\n  vec2 off1 = vec2(1.3846153846) * direction;\r\n  vec2 off2 = vec2(3.2307692308) * direction;\r\n  color += texture2D(image, uv) * 0.2270270270;\r\n  color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;\r\n  color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;\r\n  color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;\r\n  color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;\r\n  return color;\r\n}\r\n\r\nvoid main() {\r\n  gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir);\r\n}",XN=Me()(MN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:wL,fs:YN});var e=this.shaderModuleService.getModule("blur-pass"),t=e.vs,r=e.fs,i=e.uniforms,a=this.rendererService.getViewportSize(),o=a.width,s=a.height;return{vs:t,fs:r,uniforms:n(n({},i),{},{u_ViewportSize:[o,s]})}}},{key:"convertOptionsToUniforms",value:function(e){var t={};return dO(e.blurRadius)||(t.u_BlurDir=[e.blurRadius,0]),t}}]),r}(HN))||MN,ZN=Me()(PN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:wL,fs:YN});var e=this.shaderModuleService.getModule("blur-pass"),t=e.vs,r=e.fs,i=e.uniforms,a=this.rendererService.getViewportSize(),o=a.width,s=a.height;return{vs:t,fs:r,uniforms:n(n({},i),{},{u_ViewportSize:[o,s]})}}},{key:"convertOptionsToUniforms",value:function(e){var t={};return dO(e.blurRadius)||(t.u_BlurDir=[0,e.blurRadius]),t}}]),r}(HN))||PN,qN=Me()(IN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("colorhalftone-pass",{vs:wL,fs:'varying vec2 v_UV;\r\n\r\nuniform sampler2D u_Texture;\r\nuniform vec2 u_ViewportSize: [1.0, 1.0];\r\nuniform vec2 u_Center : [0.5, 0.5];\r\nuniform float u_Angle : 0;\r\nuniform float u_Size : 8;\r\n\r\n#pragma include "common"\r\n\r\nfloat scale = PI / u_Size;\r\n\r\nfloat pattern(float u_Angle, vec2 texSize, vec2 texCoord) {\r\n  float s = sin(u_Angle), c = cos(u_Angle);\r\n  vec2 tex = texCoord * texSize - u_Center * texSize;\r\n  vec2 point = vec2(\r\n    c * tex.x - s * tex.y,\r\n    s * tex.x + c * tex.y\r\n  ) * scale;\r\n  return (sin(point.x) * sin(point.y)) * 4.0;\r\n}\r\n\r\n// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/colorhalftone.js\r\nvec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\r\n  vec3 cmy = 1.0 - color.rgb;\r\n  float k = min(cmy.x, min(cmy.y, cmy.z));\r\n  cmy = (cmy - k) / (1.0 - k);\r\n  cmy = clamp(\r\n    cmy * 10.0 - 3.0 + vec3(\r\n      pattern(u_Angle + 0.26179, texSize, texCoord),\r\n      pattern(u_Angle + 1.30899, texSize, texCoord),\r\n      pattern(u_Angle, texSize, texCoord)\r\n    ),\r\n    0.0,\r\n    1.0\r\n  );\r\n  k = clamp(k * 10.0 - 5.0 + pattern(u_Angle + 0.78539, texSize, texCoord), 0.0, 1.0);\r\n  return vec4(1.0 - cmy - k, color.a);\r\n}\r\n\r\nvoid main() {\r\n  gl_FragColor = vec4(texture2D(u_Texture, v_UV));\r\n  gl_FragColor = colorHalftone_filterColor(gl_FragColor, u_ViewportSize, v_UV);\r\n}'});var e=this.shaderModuleService.getModule("colorhalftone-pass"),t=e.vs,r=e.fs,i=e.uniforms,a=this.rendererService.getViewportSize(),o=a.width,s=a.height;return{vs:t,fs:r,uniforms:n(n({},i),{},{u_ViewportSize:[o,s]})}}}]),r}(HN))||IN,KN="varying vec2 v_UV;\r\n\r\nuniform sampler2D u_Texture;\r\n\r\nvoid main() {\r\n  gl_FragColor = vec4(texture2D(u_Texture, v_UV));\r\n}",QN=Me()(ON=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("copy-pass",{vs:wL,fs:KN}),this.shaderModuleService.getModule("copy-pass")}}]),r}(HN))||ON,$N=Me()(RN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("hexagonalpixelate-pass",{vs:wL,fs:"varying vec2 v_UV;\r\n\r\nuniform sampler2D u_Texture;\r\nuniform vec2 u_ViewportSize: [1.0, 1.0];\r\nuniform vec2 u_Center : [0.5, 0.5];\r\nuniform float u_Scale : 10;\r\n\r\n// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/hexagonalpixelate.js\r\nvec4 hexagonalPixelate_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\r\n  vec2 tex = (texCoord * texSize - u_Center * texSize) / u_Scale;\r\n  tex.y /= 0.866025404;\r\n  tex.x -= tex.y * 0.5;\r\n  vec2 a;\r\n  if (tex.x + tex.y - floor(tex.x) - floor(tex.y) < 1.0) {\r\n    a = vec2(floor(tex.x), floor(tex.y));\r\n  }\r\n  else a = vec2(ceil(tex.x), ceil(tex.y));\r\n  vec2 b = vec2(ceil(tex.x), floor(tex.y));\r\n  vec2 c = vec2(floor(tex.x), ceil(tex.y));\r\n  vec3 TEX = vec3(tex.x, tex.y, 1.0 - tex.x - tex.y);\r\n  vec3 A = vec3(a.x, a.y, 1.0 - a.x - a.y);\r\n  vec3 B = vec3(b.x, b.y, 1.0 - b.x - b.y);\r\n  vec3 C = vec3(c.x, c.y, 1.0 - c.x - c.y);\r\n  float alen = length(TEX - A);\r\n  float blen = length(TEX - B);\r\n  float clen = length(TEX - C);\r\n  vec2 choice;\r\n  if (alen < blen) {\r\n    if (alen < clen) choice = a;\r\n    else choice = c;\r\n  } else {\r\n    if (blen < clen) choice = b;\r\n    else choice = c;\r\n  }\r\n  choice.x += choice.y * 0.5;\r\n  choice.y *= 0.866025404;\r\n  choice *= u_Scale / texSize;\r\n  return texture2D(texture, choice + u_Center);\r\n}\r\n\r\nvoid main() {\r\n  gl_FragColor = vec4(texture2D(u_Texture, v_UV));\r\n  gl_FragColor = hexagonalPixelate_sampleColor(u_Texture, u_ViewportSize, v_UV);\r\n}"});var e=this.shaderModuleService.getModule("hexagonalpixelate-pass"),t=e.vs,r=e.fs,i=e.uniforms,a=this.rendererService.getViewportSize(),o=a.width,s=a.height;return{vs:t,fs:r,uniforms:n(n({},i),{},{u_ViewportSize:[o,s]})}}}]),r}(HN))||RN,JN=Me()(LN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("ink-pass",{vs:wL,fs:"varying vec2 v_UV;\r\n\r\nuniform sampler2D u_Texture;\r\nuniform vec2 u_ViewportSize: [1.0, 1.0];\r\nuniform float u_Strength : 0.6;\r\n\r\nvec4 ink_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\r\n  vec2 dx = vec2(1.0 / texSize.x, 0.0);\r\n  vec2 dy = vec2(0.0, 1.0 / texSize.y);\r\n  vec4 color = texture2D(texture, texCoord);\r\n  float bigTotal = 0.0;\r\n  float smallTotal = 0.0;\r\n  vec3 bigAverage = vec3(0.0);\r\n  vec3 smallAverage = vec3(0.0);\r\n  for (float x = -2.0; x <= 2.0; x += 1.0) {\r\n    for (float y = -2.0; y <= 2.0; y += 1.0) {\r\n      vec3 sample = texture2D(texture, texCoord + dx * x + dy * y).rgb;\r\n      bigAverage += sample;\r\n      bigTotal += 1.0;\r\n      if (abs(x) + abs(y) < 2.0) {\r\n        smallAverage += sample;\r\n        smallTotal += 1.0;\r\n      }\r\n    }\r\n  }\r\n  vec3 edge = max(vec3(0.0), bigAverage / bigTotal - smallAverage / smallTotal);\r\n  float power = u_Strength * u_Strength * u_Strength * u_Strength * u_Strength;\r\n  return vec4(color.rgb - dot(edge, edge) * power * 100000.0, color.a);\r\n}\r\n\r\nvoid main() {\r\n  gl_FragColor = vec4(texture2D(u_Texture, v_UV));\r\n  gl_FragColor = ink_sampleColor(u_Texture, u_ViewportSize, v_UV);\r\n}"});var e=this.shaderModuleService.getModule("ink-pass"),t=e.vs,r=e.fs,i=e.uniforms,a=this.rendererService.getViewportSize(),o=a.width,s=a.height;return{vs:t,fs:r,uniforms:n(n({},i),{},{u_ViewportSize:[o,s]})}}}]),r}(HN))||LN,eD=Me()(NN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("noise-pass",{vs:wL,fs:"varying vec2 v_UV;\r\n\r\nuniform sampler2D u_Texture;\r\nuniform float u_Amount : 0.5;\r\n\r\nfloat rand(vec2 co) {\r\n  return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\r\n}\r\n\r\n// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js\r\nvec4 noise_filterColor(vec4 color, vec2 texCoord) {\r\n  float diff = (rand(texCoord) - 0.5) * u_Amount;\r\n  color.r += diff;\r\n  color.g += diff;\r\n  color.b += diff;\r\n  return color;\r\n}\r\n\r\nvoid main() {\r\n  gl_FragColor = vec4(texture2D(u_Texture, v_UV));\r\n  gl_FragColor = noise_filterColor(gl_FragColor, v_UV);\r\n}"}),this.shaderModuleService.getModule("noise-pass")}}]),r}(HN))||NN,tD=Me()(DN=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("sepia-pass",{vs:wL,fs:"varying vec2 v_UV;\r\n\r\nuniform sampler2D u_Texture;\r\n\r\nuniform float u_Amount : 0.5;\r\n\r\n// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/sepia.js\r\nvec4 sepia_filterColor(vec4 color) {\r\n  float r = color.r;\r\n  float g = color.g;\r\n  float b = color.b;\r\n  color.r =\r\n    min(1.0, (r * (1.0 - (0.607 * u_Amount))) + (g * (0.769 * u_Amount)) + (b * (0.189 * u_Amount)));\r\n  color.g = min(1.0, (r * 0.349 * u_Amount) + (g * (1.0 - (0.314 * u_Amount))) + (b * 0.168 * u_Amount));\r\n  color.b = min(1.0, (r * 0.272 * u_Amount) + (g * 0.534 * u_Amount) + (b * (1.0 - (0.869 * u_Amount))));\r\n  return color;\r\n}\r\n\r\nvoid main() {\r\n  gl_FragColor = vec4(texture2D(u_Texture, v_UV));\r\n  gl_FragColor = sepia_filterColor(gl_FragColor);\r\n}"}),this.shaderModuleService.getModule("sepia-pass")}}]),r}(HN))||DN,rD=nr.f,nD=!ze||Fe((function(){rD(1)}));hn({target:"Object",stat:!0,forced:nD,sham:!ze},{getOwnPropertyDescriptor:function(e,t){return rD(at(e),t)}});var iD,aD,oD,sD,uD,cD,lD=(FN=Me(),zN=ke(ba.IRendererService),BN=Ce(),FN((VN=I((jN=function(){function e(){u(this,e),P(this,"rendererService",VN,this),h(this,"passes",[]),h(this,"readFBO",void 0),h(this,"writeFBO",void 0)}var t,r;return l(e,[{key:"getReadFBO",value:function(){return this.readFBO}},{key:"getWriteFBO",value:function(){return this.writeFBO}},{key:"getCurrentFBOTex",value:function(){var e=this.rendererService,t=e.getViewportSize,r=e.createTexture2D,n=t();return r({x:0,y:0,width:n.width,height:n.height,copy:!0})}},{key:"getReadFBOTex",value:function(){var e=this,t=this.rendererService.useFramebuffer;return new Promise((function(r){t(e.readFBO,s(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r(e.getCurrentFBOTex());case 1:case"end":return t.stop()}}),t)}))))}))}},{key:"renderBloomPass",value:(r=s(i().mark((function e(t,r){var n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getReadFBOTex();case 2:n=e.sent,a=0;case 4:if(!(a<4)){e.next=11;break}return e.next=7,r.render(t,n);case 7:this.swap(),a++,e.next=4;break;case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"render",value:(t=s(i().mark((function e(t){var r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=0;case 1:if(!(r<this.passes.length)){e.next=15;break}if((n=this.passes[r]).setRenderToScreen(this.isLastEnabledPass(r)),"bloom"!==n.getName()){e.next=9;break}return e.next=7,this.renderBloomPass(t,n);case 7:e.next=12;break;case 9:return e.next=11,n.render(t);case 11:r!==this.passes.length-1&&this.swap();case 12:r++,e.next=1;break;case 15:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"resize",value:function(e,t){this.readFBO.resize({width:e,height:t}),this.writeFBO.resize({width:e,height:t})}},{key:"add",value:function(e,t,r){e.init(t,r),this.passes.push(e)}},{key:"insert",value:function(e,t,r,n){e.init(r,n),this.passes.splice(t,0,e)}},{key:"getPostProcessingPassByName",value:function(e){return this.passes.find((function(t){return t.getName()===e}))}},{key:"init",value:function(){var e=this.rendererService,t=e.createFramebuffer,r=e.createTexture2D;this.readFBO=t({color:r({width:1,height:1,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})}),this.writeFBO=t({color:r({width:1,height:1,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})})}},{key:"isLastEnabledPass",value:function(e){for(var t=e+1;t<this.passes.length;t++)if(this.passes[t].isEnabled())return!1;return!0}},{key:"swap",value:function(){var e=this.readFBO;this.readFBO=this.writeFBO,this.writeFBO=e}}]),e}()).prototype,"rendererService",[zN],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),I(jN.prototype,"init",[BN],Object.getOwnPropertyDescriptor(jN.prototype,"init"),jN.prototype),UN=jN))||UN),hD=Me()(iD=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"getType",value:function(){return xL.Normal}},{key:"getName",value:function(){return"render"}},{key:"init",value:function(e,t){E(p(r.prototype),"init",this).call(this,e,t)}},{key:"render",value:function(e){var t=this.rendererService,r=t.useFramebuffer,n=t.clear,i=e.multiPassRenderer.getPostProcessor().getReadFBO();r(i,(function(){n({color:[0,0,0,0],depth:1,stencil:0,framebuffer:i}),e.multiPassRenderer.setRenderFlag(!1),e.models.forEach((function(t){t.draw({uniforms:e.layerModel.getUninforms()})})),e.multiPassRenderer.setRenderFlag(!0)}))}}]),r}(SL))||iD;function fD(e,t){for(var r=0,n=1/t,i=e;i>0;)r+=n*(i%t),i=Math.floor(i/t),n/=t;return r}var pD=1,dD=(aD=Me(),oD=ke(ba.IShaderModuleService),aD((cD=I((uD=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return P(_(e=t.call.apply(t,[this].concat(i))),"shaderModuleService",cD,_(e)),h(_(e),"haltonSequence",[]),h(_(e),"accumulatingId",0),h(_(e),"frame",0),h(_(e),"timer",void 0),h(_(e),"sampleRenderTarget",void 0),h(_(e),"prevRenderTarget",void 0),h(_(e),"outputRenderTarget",void 0),h(_(e),"copyRenderTarget",void 0),h(_(e),"blendModel",void 0),h(_(e),"outputModel",void 0),h(_(e),"copyModel",void 0),e}return l(r,[{key:"getType",value:function(){return xL.Normal}},{key:"getName",value:function(){return"taa"}},{key:"init",value:function(e,t){E(p(r.prototype),"init",this).call(this,e,t);var n=this.rendererService,i=n.createFramebuffer,a=n.createTexture2D;this.sampleRenderTarget=i({color:a({width:1,height:1,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})}),this.prevRenderTarget=i({color:a({width:1,height:1,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})}),this.outputRenderTarget=i({color:a({width:1,height:1,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})}),this.copyRenderTarget=i({color:a({width:1,height:1,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE})});for(var o=0;o<30;o++)this.haltonSequence.push([fD(o,2),fD(o,3)]);this.blendModel=this.createTriangleModel("blend-pass","uniform float u_opacity : 1.0;\r\nuniform float u_MixRatio : 0.5;\r\n\r\nuniform sampler2D u_Diffuse1;\r\nuniform sampler2D u_Diffuse2;\r\n\r\nvarying vec2 v_UV;\r\n\r\nvoid main() {\r\n  vec4 texel1 = texture2D(u_Diffuse1, v_UV);\r\n  vec4 texel2 = texture2D(u_Diffuse2, v_UV);\r\n  gl_FragColor = u_opacity * mix(texel1, texel2, u_MixRatio);\r\n}\r\n"),this.outputModel=this.createTriangleModel("copy-pass",KN,{blend:{enable:!0,func:{srcRGB:rO.ONE,dstRGB:rO.ONE_MINUS_SRC_ALPHA,srcAlpha:rO.ONE,dstAlpha:rO.ONE_MINUS_SRC_ALPHA},equation:{rgb:rO.FUNC_ADD,alpha:rO.FUNC_ADD}}}),this.copyModel=this.createTriangleModel("copy-pass",KN)}},{key:"render",value:function(e){var t=this,r=this.rendererService,n=r.clear,i=r.getViewportSize,a=r.useFramebuffer,o=i(),s=o.width,u=o.height;this.sampleRenderTarget.resize({width:s,height:u}),this.prevRenderTarget.resize({width:s,height:u}),this.outputRenderTarget.resize({width:s,height:u}),this.copyRenderTarget.resize({width:s,height:u}),this.resetFrame(),this.stopAccumulating();var c=e.multiPassRenderer.getPostProcessor().getReadFBO();a(c,(function(){n({color:[0,0,0,0],depth:1,stencil:0,framebuffer:c}),e.multiPassRenderer.setRenderFlag(!1),e.render(),e.multiPassRenderer.setRenderFlag(!0)}));this.accumulatingId=pD++,this.timer=Yv.setTimeout((function(){!function r(n){t.accumulatingId&&n===t.accumulatingId&&(t.isFinished()||(t.doRender(e),Yv.requestAnimationFrame((function(){r(n)}))))}(t.accumulatingId)}),50)}},{key:"doRender",value:function(e){var t=this,r=this.rendererService,n=r.clear,i=r.getViewportSize,a=r.useFramebuffer,o=i(),s=o.width,u=o.height,c=e.getLayerConfig().jitterScale,l=void 0===c?1:c,h=this.haltonSequence[this.frame%this.haltonSequence.length];this.cameraService.jitterProjectionMatrix((2*h[0]-1)/s*l,(2*h[1]-1)/u*l),e.multiPassRenderer.setRenderFlag(!1),e.hooks.beforeRender.call(),a(this.sampleRenderTarget,(function(){n({color:[0,0,0,0],depth:1,stencil:0,framebuffer:t.sampleRenderTarget}),e.render()})),e.hooks.afterRender.call(),e.multiPassRenderer.setRenderFlag(!0);var f=e.getLayerConfig();a(this.outputRenderTarget,(function(){t.blendModel.draw({uniforms:{u_opacity:f.opacity||1,u_MixRatio:0===t.frame?1:.9,u_Diffuse1:t.sampleRenderTarget,u_Diffuse2:0===t.frame?e.multiPassRenderer.getPostProcessor().getReadFBO():t.prevRenderTarget}})})),0===this.frame&&n({color:[0,0,0,0],depth:1,stencil:0,framebuffer:this.copyRenderTarget}),this.frame>=1&&(a(this.copyRenderTarget,(function(){t.outputModel.draw({uniforms:{u_Texture:t.outputRenderTarget}})})),a(e.multiPassRenderer.getPostProcessor().getReadFBO(),(function(){t.copyModel.draw({uniforms:{u_Texture:t.copyRenderTarget}})})),e.multiPassRenderer.getPostProcessor().render(e));var p=this.prevRenderTarget;this.prevRenderTarget=this.outputRenderTarget,this.outputRenderTarget=p,this.frame++,this.cameraService.clearJitterProjectionMatrix()}},{key:"isFinished",value:function(){return this.frame>=this.haltonSequence.length}},{key:"resetFrame",value:function(){this.frame=0}},{key:"stopAccumulating",value:function(){this.accumulatingId=0,Yv.clearTimeout(this.timer)}},{key:"createTriangleModel",value:function(e,t,r){this.shaderModuleService.registerModule(e,{vs:wL,fs:t});var i=this.shaderModuleService.getModule(e),a=i.vs,o=i.fs,s=i.uniforms,u=this.rendererService,c=u.createAttribute,l=u.createBuffer;return(0,u.createModel)(n({vs:a,fs:o,attributes:{a_Position:c({buffer:l({data:[-4,-4,4,-4,0,4],type:rO.FLOAT}),size:2})},uniforms:n({},s),depth:{enable:!1},count:3},r))}}]),r}(SL)).prototype,"shaderModuleService",[oD],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sD=uD))||sD),vD=new Pe;vD.bind(ba.IGlobalConfigService).to(mP).inSingletonScope(),we(Me(),F),vD.bind(ba.IEventEmitter).to(F);var gD=Le(vD,!1),mD=function(e){var t=gD.lazyInject(e);return function(e,r,n){t.call(this,e,r),n&&(n.initializer=function(){return e[r]})}},yD=0;function _D(){var e=new Pe;return e.parent=vD,e.bind(ba.SceneID).toConstantValue("".concat(yD++)),e.bind(ba.IShaderModuleService).to(bL).inSingletonScope(),e.bind(ba.ILayerService).to(aO).inSingletonScope(),e.bind(ba.IDebugService).to(RP).inSingletonScope(),e.bind(ba.ISceneService).to(YR).inSingletonScope(),e.bind(ba.ICameraService).to(vk).inSingletonScope(),e.bind(ba.ICoordinateSystemService).to(OP).inSingletonScope(),e.bind(ba.IInteractionService).to(FP).inSingletonScope(),e.bind(ba.IPickingService).to(nO).inSingletonScope(),e.bind(ba.IControlService).to(Sk).inSingletonScope(),e.bind(ba.IMarkerService).to(Ek).inSingletonScope(),e.bind(ba.IIconService).to(dk).inSingletonScope(),e.bind(ba.IFontService).to(VT).inSingletonScope(),e.bind(ba.IPopupService).to(Ak).inSingletonScope(),e.bind(ba.INormalPass).to(EL).whenTargetNamed("clear"),e.bind(ba.INormalPass).to(TL).whenTargetNamed("pixelPicking"),e.bind(ba.INormalPass).to(hD).whenTargetNamed("render"),e.bind(ba.INormalPass).to(dD).whenTargetNamed("taa"),e.bind(ba.IFactoryNormalPass).toFactory((function(e){return function(t){return e.container.getNamed(ba.INormalPass,t)}})),e.bind(ba.IPostProcessingPass).to(QN).whenTargetNamed("copy"),e.bind(ba.IPostProcessingPass).to(WN).whenTargetNamed("bloom"),e.bind(ba.IPostProcessingPass).to(XN).whenTargetNamed("blurH"),e.bind(ba.IPostProcessingPass).to(ZN).whenTargetNamed("blurV"),e.bind(ba.IPostProcessingPass).to(eD).whenTargetNamed("noise"),e.bind(ba.IPostProcessingPass).to(tD).whenTargetNamed("sepia"),e.bind(ba.IPostProcessingPass).to(qN).whenTargetNamed("colorHalftone"),e.bind(ba.IPostProcessingPass).to($N).whenTargetNamed("hexagonalPixelate"),e.bind(ba.IPostProcessingPass).to(JN).whenTargetNamed("ink"),e.bind(ba.IFactoryPostProcessingPass).toFactory((function(e){return function(t){var r=e.container.getNamed(ba.IPostProcessingPass,t);return r.setName(t),r}})),e}function bD(e){var t=new Pe;return t.parent=e,t.bind(ba.IStyleAttributeService).to(_O).inSingletonScope(),t.bind(ba.IMultiPassRenderer).to(AL).inSingletonScope(),t.bind(ba.IPostProcessor).to(lD).inSingletonScope(),t}var xD=function(e,t,r){return e==e&&(void 0!==r&&(e=e<=r?e:r),void 0!==t&&(e=e>=t?e:t)),e};var SD=function(e,t,r){return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=(r=FE(r))==r?r:0),void 0!==t&&(t=(t=FE(t))==t?t:0),xD(FE(e),t,r)},ED=["circle","triangle","square","pentagon","hexagon","octogon","hexagram","rhombus","vesica"];function AD(e){return ED.indexOf(e)}function TD(e,t){return 256*(e=SD(Math.floor(e),0,255))+(t=SD(Math.floor(t),0,255))}var wD={ProjectionMatrix:"u_ProjectionMatrix",ViewMatrix:"u_ViewMatrix",ViewProjectionMatrix:"u_ViewProjectionMatrix",Zoom:"u_Zoom",ZoomScale:"u_ZoomScale",FocalDistance:"u_FocalDistance",CameraPosition:"u_CameraPosition"};const CD={MapInitStart:"mapInitStart",LayerInitStart:"layerInitStart",LayerInitEnd:"layerInitEnd",SourceInitStart:"sourceInitStart",SourceInitEnd:"sourceInitEnd",ScaleInitStart:"scaleInitStart",ScaleInitEnd:"scaleInitEnd",MappingStart:"mappingStart",MappingEnd:"mappingEnd",BuildModelStart:"buildModelStart",BuildModelEnd:"buildModelEnd"};var kD,MD,PD,ID=function(e){return e.LINEAR="linear",e.SEQUENTIAL="sequential",e.POWER="power",e.LOG="log",e.IDENTITY="identity",e.TIME="time",e.QUANTILE="quantile",e.QUANTIZE="quantize",e.THRESHOLD="threshold",e.CAT="cat",e.DIVERGING="diverging",e}({}),OD=function(e){return e.CONSTANT="constant",e.VARIABLE="variable",e}({}),RD=function(e){return e[e.Attribute=0]="Attribute",e[e.InstancedAttribute=1]="InstancedAttribute",e[e.Uniform=2]="Uniform",e}({}),LD=["mapload","mapchange","mapAfterFrameChange"],ND=["loaded","fontloaded","maploaded","resize","destroy","dragstart","dragging","dragend","dragcancel"],DD=function(e){return e.IMAGE="image",e.CUSTOMIMAGE="customImage",e.ARRAYBUFFER="arraybuffer",e.RGB="rgb",e.TERRAINRGB="terrainRGB",e.CUSTOMRGB="customRGB",e.CUSTOMARRAYBUFFER="customArrayBuffer",e.CUSTOMTERRAINRGB="customTerrainRGB",e}({}),FD=(kD=mD(ba.IGlobalConfigService),PD=I((MD=function(){function e(t){u(this,e),P(this,"configService",PD,this),h(this,"config",void 0),this.config=t}return l(e,[{key:"setContainer",value:function(e,t,r,i){e.bind(ba.MapConfig).toConstantValue(n(n({},this.config),{},{id:t,canvas:r,hasBaseMap:i})),e.bind(ba.IMapService).to(this.getServiceConstructor()).inSingletonScope()}},{key:"getServiceConstructor",value:function(){throw new Error("Method not implemented.")}}]),e}()).prototype,"configService",[kD],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),MD);function zD(e,t){void 0===t&&(t={});var r=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===r&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}zD(".maplibregl-map{-webkit-tap-highlight-color:rgb(0 0 0/0);font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (-ms-high-contrast:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E\")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-9z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E\")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3h1zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16h1zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5H13zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1V7.5z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1h-5.5zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1v-5.5zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1v5.5zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1h5.5z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E\")}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23999' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8h-8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8h-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (-ms-high-contrast:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1 9-9z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (-ms-high-contrast:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.255 1.255 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.255 1.255 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5.11 5.11 0 0 1 .314-.787l.009-.016a4.623 4.623 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.548 4.548 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4.314.319.566.676.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.416 2.416 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.448 2.448 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675c.211.2.381.43.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.76 4.76 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.407 3.407 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.255 1.255 0 0 1 .689 1.004 4.73 4.73 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528 0 .343-.02.694-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.815 5.815 0 0 1-.548-2.512c0-.286.017-.567.053-.843a1.255 1.255 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.778 4.778 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.47 4.47 0 0 1-1.935-.424 1.252 1.252 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.402 2.402 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.703 4.703 0 0 1-1.782 1.884 4.767 4.767 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.47 4.47 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a4.983 4.983 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.255 1.255 0 0 1-1.115.676h-.098a1.255 1.255 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15c.329-.237.574-.499.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267c-.088-.22-.264-.438-.526-.658l-.032-.028a3.16 3.16 0 0 0-.668-.428l-.27-.12a3.293 3.293 0 0 0-1.235-.23c-.757 0-1.415.163-1.974.493a3.36 3.36 0 0 0-1.3 1.382c-.297.593-.444 1.284-.444 2.074 0 .8.17 1.503.51 2.107a3.795 3.795 0 0 0 1.382 1.381 3.883 3.883 0 0 0 1.893.477c.53 0 1.015-.11 1.455-.33zm-2.789-5.38c-.384.45-.575 1.038-.575 1.762 0 .735.186 1.332.559 1.794.384.45.933.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.17 2.17 0 0 0 .468-.29l.178-.161a2.163 2.163 0 0 0 .397-.561c.163-.333.244-.717.244-1.15v-.115c0-.472-.098-.894-.296-1.267l-.043-.077a2.211 2.211 0 0 0-.633-.709l-.13-.086-.047-.028a2.099 2.099 0 0 0-1.073-.285c-.702 0-1.244.231-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.958.958 0 0 0-.353-.389.851.851 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.626 2.626 0 0 0 .331.423c.213.22.464.402.755.548l.173.074c.433.17.93.255 1.49.255.68 0 1.295-.165 1.844-.493a3.447 3.447 0 0 0 1.316-1.4c.329-.603.493-1.299.493-2.089 0-1.273-.33-2.243-.988-2.913-.658-.68-1.52-1.02-2.584-1.02-.598 0-1.124.115-1.575.347a2.807 2.807 0 0 0-.415.262l-.199.166a3.35 3.35 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138c.137.193.297.36.48.5l.155.11.053.034c.34.197.713.297 1.119.297.714 0 1.262-.225 1.645-.675.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.29 0-.569.053-.835.16a2.366 2.366 0 0 0-.284.136 1.99 1.99 0 0 0-.363.254 2.237 2.237 0 0 0-.46.569l-.082.162a2.56 2.56 0 0 0-.213 1.072v.115c0 .471.098.894.296 1.267l.135.211zm.964-.818a1.11 1.11 0 0 0 .367.385.937.937 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a.995.995 0 0 0-.503.135l-.012.007a.859.859 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.43 1.43 0 0 0 .14.66zm15.7-6.222c.232-.23.346-.516.346-.856a1.053 1.053 0 0 0-.345-.79 1.175 1.175 0 0 0-.84-.329c-.34 0-.625.11-.855.33a1.053 1.053 0 0 0-.346.79c0 .34.115.625.346.855.23.23.516.346.856.346.34 0 .62-.115.839-.346zm4.337 9.314.033-1.332c.128.269.324.518.59.747l.098.081a3.727 3.727 0 0 0 .316.224l.223.122a3.21 3.21 0 0 0 1.44.322 3.785 3.785 0 0 0 1.875-.477 3.52 3.52 0 0 0 1.382-1.366c.352-.593.526-1.29.526-2.09 0-.79-.147-1.48-.444-2.073a3.235 3.235 0 0 0-1.283-1.399c-.549-.34-1.195-.51-1.942-.51a3.476 3.476 0 0 0-1.527.344l-.086.043-.165.09a3.412 3.412 0 0 0-.33.214c-.288.21-.507.446-.656.707a1.893 1.893 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.482 2.482 0 0 0 .566.7c.078.065.159.125.245.18l.144.08a2.105 2.105 0 0 0 .975.232c.713 0 1.262-.225 1.645-.675.384-.46.576-1.053.576-1.778 0-.734-.192-1.327-.576-1.777-.373-.46-.921-.692-1.645-.692a2.18 2.18 0 0 0-1.015.235c-.147.075-.285.17-.415.282l-.15.142a2.086 2.086 0 0 0-.42.594c-.149.32-.223.685-.223 1.1v.115c0 .47.097.89.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.868.868 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.13 1.13 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013c.23-.087.472-.134.724-.14l.069-.002c.329 0 .542.033.642.099l.247-1.794c-.13-.066-.37-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2.086 2.086 0 0 0-.411.148 2.18 2.18 0 0 0-.4.249 2.482 2.482 0 0 0-.485.499 2.659 2.659 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884c0-.364.053-.678.159-.943a1.49 1.49 0 0 1 .466-.636 2.52 2.52 0 0 1 .399-.253 2.19 2.19 0 0 1 .224-.099zm9.784 2.656.05-.922c0-1.162-.285-2.062-.856-2.698-.559-.647-1.42-.97-2.584-.97-.746 0-1.415.163-2.007.493a3.462 3.462 0 0 0-1.4 1.382c-.329.604-.493 1.306-.493 2.106 0 .714.143 1.371.428 1.975.285.593.73 1.07 1.332 1.432.604.351 1.355.526 2.255.526.649 0 1.204-.062 1.668-.185l.044-.012.135-.04c.409-.122.736-.263.984-.421l-.542-1.267c-.2.108-.415.199-.642.274l-.297.087c-.34.088-.773.131-1.3.131-.636 0-1.135-.147-1.497-.444a1.573 1.573 0 0 1-.192-.193c-.244-.294-.415-.705-.512-1.234l-.004-.021h5.43zm-5.427-1.256-.003.022h3.752v-.138c-.007-.485-.104-.857-.288-1.118a1.056 1.056 0 0 0-.156-.176c-.307-.285-.746-.428-1.316-.428-.657 0-1.155.202-1.494.604-.253.3-.417.712-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81c-.68 0-1.311-.16-1.893-.478a3.795 3.795 0 0 1-1.381-1.382c-.34-.604-.51-1.306-.51-2.106 0-.79.147-1.482.444-2.074a3.364 3.364 0 0 1 1.3-1.382c.559-.33 1.217-.494 1.974-.494a3.293 3.293 0 0 1 1.234.231 3.341 3.341 0 0 1 .97.575c.264.22.44.439.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332c-.186.395-.526.746-1.02 1.053a3.167 3.167 0 0 1-1.662.444zm.296-1.482c.626 0 1.152-.214 1.58-.642.428-.44.642-1.01.642-1.711v-.115c0-.472-.098-.894-.296-1.267a2.211 2.211 0 0 0-.807-.872 2.098 2.098 0 0 0-1.119-.313c-.702 0-1.245.231-1.629.692-.384.45-.575 1.037-.575 1.76 0 .736.186 1.333.559 1.795.384.45.933.675 1.645.675zm6.521-6.237h1.711v1.4c.604-1.065 1.547-1.597 2.83-1.597 1.064 0 1.926.34 2.584 1.02.659.67.988 1.641.988 2.914 0 .79-.164 1.487-.493 2.09a3.456 3.456 0 0 1-1.316 1.399 3.51 3.51 0 0 1-1.844.493c-.636 0-1.19-.11-1.662-.329a2.665 2.665 0 0 1-1.086-.97l.017 5.134h-1.728V9.242zm4.048 6.22c.714 0 1.262-.224 1.645-.674.385-.46.576-1.048.576-1.762 0-.746-.192-1.338-.576-1.777-.372-.45-.92-.675-1.645-.675-.395 0-.768.098-1.12.296-.34.187-.613.46-.822.823-.197.351-.296.763-.296 1.234v.115c0 .472.098.894.296 1.267.209.362.483.647.823.855.34.197.713.297 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.159 1.159 0 0 1-.856-.346 1.165 1.165 0 0 1-.346-.856 1.053 1.053 0 0 1 .346-.79c.23-.219.516-.329.856-.329.329 0 .609.11.839.33a1.053 1.053 0 0 1 .345.79 1.159 1.159 0 0 1-.345.855c-.22.23-.5.346-.84.346zm7.875 9.133a3.167 3.167 0 0 1-1.662-.444c-.482-.307-.817-.658-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283c.186-.438.548-.812 1.086-1.119a3.486 3.486 0 0 1 1.778-.477c.746 0 1.393.17 1.942.51a3.235 3.235 0 0 1 1.283 1.4c.297.592.444 1.282.444 2.072 0 .8-.175 1.498-.526 2.09a3.52 3.52 0 0 1-1.382 1.366 3.785 3.785 0 0 1-1.876.477zm-.296-1.481c.713 0 1.26-.225 1.645-.675.384-.46.577-1.053.577-1.778 0-.734-.193-1.327-.577-1.776-.373-.46-.921-.692-1.645-.692a2.115 2.115 0 0 0-1.58.659c-.428.428-.642.992-.642 1.694v.115c0 .473.098.895.296 1.267a2.385 2.385 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481c.176-.505.46-.91.856-1.217a2.14 2.14 0 0 1 1.349-.46c.351 0 .593.032.724.098l-.247 1.794c-.099-.066-.313-.099-.642-.099-.516 0-.988.164-1.416.494-.417.329-.626.855-.626 1.58v3.883h-1.777V9.242zm9.534 7.718c-.9 0-1.651-.175-2.255-.526-.603-.362-1.047-.84-1.332-1.432a4.567 4.567 0 0 1-.428-1.975c0-.8.164-1.502.493-2.106a3.462 3.462 0 0 1 1.4-1.382c.592-.33 1.262-.494 2.007-.494 1.163 0 2.024.324 2.584.97.57.637.856 1.537.856 2.7 0 .296-.017.603-.05.92h-5.43c.12.67.356 1.153.708 1.45.362.296.86.443 1.497.443.526 0 .96-.044 1.3-.131a4.123 4.123 0 0 0 .938-.362l.542 1.267c-.274.175-.647.329-1.119.46-.472.132-1.042.197-1.711.197zm1.596-4.558c.01-.68-.137-1.158-.444-1.432-.307-.285-.746-.428-1.316-.428-1.152 0-1.815.62-1.991 1.86h3.752z'/%3E%3Cg fill-rule='evenodd' stroke-width='1.036'%3E%3Cpath fill='%23000' fill-opacity='.4' d='m8.166 16.146-.002.002a1.54 1.54 0 0 1-2.009 0l-.002-.002-.043-.034-.002-.002-.199-.162H4.377a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659H8.411l-.202.164zm-1.121-.905a.29.29 0 0 0 .113.023.286.286 0 0 0 .189-.07l.077-.063c.634-.508 4.672-3.743 4.672-7.575 0-2.55-2.215-4.625-4.938-4.625S2.221 5.006 2.221 7.556c0 3.225 2.86 6.027 4.144 7.137h.004l.04.038.484.4.077.063a.628.628 0 0 0 .074.047zm-2.52-.548a16.898 16.898 0 0 1-1.183-1.315C2.187 11.942.967 9.897.967 7.555c0-3.319 2.855-5.88 6.192-5.88 3.338 0 6.193 2.561 6.193 5.881 0 2.34-1.22 4.387-2.376 5.822a16.898 16.898 0 0 1-1.182 1.315h.15a1.912 1.912 0 0 1 1.914 1.914v1.84a1.912 1.912 0 0 1-1.914 1.914H4.377a1.912 1.912 0 0 1-1.914-1.914v-1.84a1.912 1.912 0 0 1 1.914-1.914zm3.82-6.935c0 .692-.55 1.222-1.187 1.222s-1.185-.529-1.185-1.222.548-1.222 1.185-1.222c.638 0 1.186.529 1.186 1.222zm-1.186 2.477c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477zm2.048 7.71H5.114v-.838h4.093z'/%3E%3Cpath fill='%23e1e3e9' d='M2.222 7.555c0-2.55 2.214-4.625 4.937-4.625 2.723 0 4.938 2.075 4.938 4.625 0 3.832-4.038 7.068-4.672 7.575l-.077.063a.286.286 0 0 1-.189.07.286.286 0 0 1-.188-.07l-.077-.063c-.634-.507-4.672-3.743-4.672-7.575zm4.937 2.68c1.348 0 2.442-1.11 2.442-2.478S8.507 5.28 7.159 5.28 4.72 6.39 4.72 7.758s1.092 2.477 2.44 2.477z'/%3E%3Cpath fill='%23fff' d='M4.377 15.948a.657.657 0 0 0-.659.659v1.84a.657.657 0 0 0 .659.659h5.565a.657.657 0 0 0 .659-.659v-1.84a.657.657 0 0 0-.659-.659zm4.83 1.16H5.114v.838h4.093z'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (-ms-high-contrast:black-on-white){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}");var BD,UD,jD,VD,GD,HD,WD,YD,XD,ZD,qD,KD,QD=function(e){return e["GAODE1.x"]="GAODE1.x",e["GAODE2.x"]="GAODE2.x",e.MAPBOX="MAPBOX",e.DEFUALT="DEFUALTMAP",e.MAPLIBRE="MAPLIBRE",e.SIMPLE="SIMPLE",e.GLOBEL="GLOBEL",e}({}),$D=function(){function e(t){u(this,e),h(this,"size",1e4),this.size=t||1e4}return l(e,[{key:"setSize",value:function(e){this.size=e}},{key:"getSize",value:function(){return[this.size,this.size]}},{key:"mercatorXfromLng",value:function(e){return(180+e)/360*this.size}},{key:"mercatorYfromLat",value:function(e){return(1-(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360)*this.size}},{key:"lngFromMercatorX",value:function(e){return e/this.size*360-180}},{key:"latFromMercatorY",value:function(e){var t=180-360*(1-e/this.size);return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}},{key:"project",value:function(e){return[this.mercatorXfromLng(e[0]),this.mercatorYfromLat(e[1])]}},{key:"unproject",value:function(e){return[this.lngFromMercatorX(e[0]),this.latFromMercatorY(e[1])]}}]),e}(),JD={light:"mapbox://styles/zcxduo/ck2ypyb1r3q9o1co1766dex29",dark:"mapbox://styles/zcxduo/ck241p6413s0b1cpayzldv7x7",normal:"mapbox://styles/mapbox/streets-v11",blank:{version:8,sources:{},layers:[{id:"background",type:"background",layout:{visibility:"none"}}]}},eF={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},tF=(BD=Me(),UD=ke(ba.MapConfig),jD=ke(ba.IGlobalConfigService),VD=ke(ba.ICoordinateSystemService),GD=ke(ba.IEventEmitter),BD((YD=I((WD=function(){function e(){var t=this;u(this,e),h(this,"version",QD.DEFUALT),h(this,"map",void 0),h(this,"simpleMapCoord",new $D),h(this,"bgColor","rgba(0.0, 0.0, 0.0, 0.0)"),h(this,"viewport",void 0),P(this,"config",YD,this),P(this,"configService",XD,this),P(this,"coordinateSystemService",ZD,this),P(this,"eventEmitter",qD,this),h(this,"markerContainer",void 0),h(this,"cameraChangedCallback",void 0),h(this,"$mapContainer",void 0),h(this,"handleCameraChanged",(function(e){var r=t.map.getCenter(),n=r.lat,i=r.lng;t.emit("mapchange"),t.viewport.syncWithMapCamera({bearing:t.map.getBearing(),center:[i,n],viewportHeight:t.map.transform.height,pitch:t.map.getPitch(),viewportWidth:t.map.transform.width,zoom:t.map.getZoom(),cameraHeight:0,map:t.map}),t.updateCoordinateSystemService(),t.cameraChangedCallback(t.viewport)}))}return l(e,[{key:"setBgColor",value:function(e){this.bgColor=e}},{key:"addMarkerContainer",value:function(){var e=this.map.getCanvasContainer();this.markerContainer=Zy("div","l7-marker-container",e),this.markerContainer.setAttribute("tabindex","-1")}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"getOverlayContainer",value:function(){}},{key:"on",value:function(e,t){-1!==LD.indexOf(e)?this.eventEmitter.on(e,t):this.map.on(eF[e]||e,t)}},{key:"off",value:function(e,t){this.map.off(eF[e]||e,t),this.eventEmitter.off(e,t)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){if(this.version===QD.SIMPLE)return this.simpleMapCoord.getSize();var e=this.map.transform;return[e.width,e.height]}},{key:"getType",value:function(){return"default"}},{key:"getZoom",value:function(){return this.map.getZoom()}},{key:"setZoom",value:function(e){return this.map.setZoom(e)}},{key:"getCenter",value:function(){return this.map.getCenter()}},{key:"setCenter",value:function(e){this.map.setCenter(e)}},{key:"getPitch",value:function(){return this.map.getPitch()}},{key:"getRotation",value:function(){return this.map.getBearing()}},{key:"getBounds",value:function(){return this.map.getBounds().toArray()}},{key:"getMinZoom",value:function(){return this.map.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.map.getMaxZoom()}},{key:"setRotation",value:function(e){this.map.setBearing(e)}},{key:"zoomIn",value:function(e,t){this.map.zoomIn(e,t)}},{key:"zoomOut",value:function(e,t){this.map.zoomOut(e,t)}},{key:"setPitch",value:function(e){return this.map.setPitch(e)}},{key:"isMapBoxMapLibre",value:function(){return this.version===QD.MAPLIBRE||this.version===QD.MAPBOX}},{key:"panTo",value:function(e){this.map.panTo(e)}},{key:"panBy",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.map.panBy([e,t])}},{key:"fitBounds",value:function(e,t){this.map.fitBounds(e,t)}},{key:"setMaxZoom",value:function(e){this.map.setMaxZoom(e)}},{key:"setMinZoom",value:function(e){this.map.setMinZoom(e)}},{key:"setMapStatus",value:function(e){!0===e.doubleClickZoom&&this.map.doubleClickZoom.enable(),!1===e.doubleClickZoom&&this.map.doubleClickZoom.disable(),!1===e.dragEnable&&this.map.dragPan.disable(),!0===e.dragEnable&&this.map.dragPan.enable(),!1===e.rotateEnable&&this.map.dragRotate.disable(),!0===e.dragEnable&&this.map.dragRotate.enable(),!1===e.keyboardEnable&&this.map.keyboard.disable(),!0===e.keyboardEnable&&this.map.keyboard.enable(),!1===e.zoomEnable&&this.map.scrollZoom.disable(),!0===e.zoomEnable&&this.map.scrollZoom.enable()}},{key:"setZoomAndCenter",value:function(e,t){this.map.flyTo({zoom:e,center:t})}},{key:"setMapStyle",value:function(e){this.map.setStyle(this.getMapStyleValue(e))}},{key:"meterToCoord",value:function(e,t){return 1}},{key:"pixelToLngLat",value:function(e){return this.map.unproject(e)}},{key:"lngLatToPixel",value:function(e){return this.map.project(e)}},{key:"containerToLngLat",value:function(e){return this.map.unproject(e)}},{key:"lngLatToContainer",value:function(e){return this.map.project(e)}},{key:"getMapStyle",value:function(){try{var e,t=null!==(e=this.map.getStyle().sprite)&&void 0!==e?e:"";return/^mapbox:\/\/sprites\/zcxduo\/\w+\/\w+$/.test(t)?null==t?void 0:t.replace(/\/\w+$/,"").replace(/sprites/,"styles"):t}catch(e){return""}}},{key:"getMapStyleConfig",value:function(){return JD}},{key:"getMapStyleValue",value:function(e){var t;return null!==(t=this.getMapStyleConfig()[e])&&void 0!==t?t:e}},{key:"destroy",value:function(){this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(t=this.eventEmitter).emit.apply(t,[e].concat(n))}},{key:"once",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(t=this.eventEmitter).once.apply(t,[e].concat(n))}},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"exportMap",value:function(e){var t=this.map.getCanvas();return"jpg"===e?null==t?void 0:t.toDataURL("image/jpeg"):null==t?void 0:t.toDataURL("image/png")}},{key:"onCameraChanged",value:function(e){this.cameraChangedCallback=e}},{key:"creatMapContainer",value:function(e){var t=e;return"string"==typeof e&&(t=document.getElementById(e)),t}},{key:"updateView",value:function(e){this.emit("mapchange"),this.viewport.syncWithMapCamera({bearing:e.bearing,center:e.center,viewportHeight:e.viewportHeight,pitch:e.pitch,viewportWidth:e.viewportWidth,zoom:e.zoom,cameraHeight:0,map:this.map}),this.updateCoordinateSystemService(),this.cameraChangedCallback(this.viewport)}},{key:"updateCoordinateSystemService",value:function(){var e=this.config.offsetCoordinate,t=void 0===e||e;this.coordinateSystemService.setCoordinateSystem(nS(this.map,t)),this.coordinateSystemService.setEPSGCode(iS(this.map))}}]),e}()).prototype,"config",[UD],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),XD=I(WD.prototype,"configService",[jD],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ZD=I(WD.prototype,"coordinateSystemService",[VD],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qD=I(WD.prototype,"eventEmitter",[GD],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),HD=WD))||HD),rF=function(){function e(){u(this,e),h(this,"viewport",void 0),h(this,"map",void 0)}return l(e,[{key:"syncWithMapCamera",value:function(e){var t=e.center,r=e.zoom,n=e.pitch,i=e.bearing,a=e.viewportHeight,o=e.viewportWidth,s=e.map;this.map=s,this.viewport=new Zx({width:o,height:a,longitude:t&&t[0],latitude:t&&t[1],zoom:r,pitch:n,bearing:i,isGeographicCoordinateSystem:rS(s),coordinateSystem:nS(s),epsgCode:iS(s),map:s})}},{key:"getZoom",value:function(){return this.viewport.zoom}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[this.viewport.longitude,this.viewport.latitude]}},{key:"getProjectionMatrix",value:function(){return this.viewport.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewport.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.viewMatrixUncentered}},{key:"getViewProjectionMatrix",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(e,t){return this.viewport.projectFlat(e,t,rS(this.map),this.map)}}]),e}(),nF=["id","attributionControl","style","token","rotation","mapInstance"];window.maplibregl=t;var iF=0,aF=Me()(KD=function(e){f(o,e);var r,a=x(o);function o(){var e;u(this,o);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=a.call.apply(a,[this].concat(r))),"version",QD.MAPLIBRE),h(_(e),"viewport",void 0),e}return l(o,[{key:"getType",value:function(){return"maplibre"}},{key:"lngLatToCoord",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0,z:0},r=this.lngLatToMercator(e,0),n=r.x,i=r.y;return[n-t.x,i-t.y]}},{key:"lngLatToMercator",value:function(e,t){var r=window.maplibregl.MercatorCoordinate.fromLngLat(e,t),n=r.x,i=void 0===n?0:n,a=r.y,o=void 0===a?0:a,s=r.z;return{x:i,y:o,z:void 0===s?0:s}}},{key:"getModelMatrix",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1,1],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{x:0,y:0,z:0},a=window.maplibregl.MercatorCoordinate.fromLngLat(e,t),o=a.meterInMercatorCoordinateUnits(),s=Ab();return Pb(s,s,ux(a.x-i.x,a.y-i.y,a.z||0-i.z)),Ib(s,s,ux(o*n[0],-o*n[1],o*n[2])),Ob(s,s,r[0]),Rb(s,s,r[1]),Lb(s,s,r[2]),s}},{key:"init",value:(r=s(i().mark((function e(){var t,r,a,o,s,u,c,l,h,f,p,d=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.config,r=t.id,a=void 0===r?"map":r,o=t.attributionControl,s=void 0!==o&&o,u=t.style,c=void 0===u?"light":u,t.token,l=t.rotation,h=void 0===l?0:l,f=t.mapInstance,p=y(t,nF),this.viewport=new rF,f||window.maplibregl||console.error(this.configService.getSceneWarninfo("SDK")),f?(this.map=f,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(a),this.map=new window.maplibregl.Map(n({container:this.$mapContainer,style:this.getMapStyleValue(c),attributionControl:s,bearing:h},p))),cS(this.map),this.map.on("load",(function(){d.handleCameraChanged()})),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged();case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"destroy",value:function(){var e,t;null===(e=this.$mapContainer)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(t=this.eventEmitter).emit.apply(t,[e].concat(n))}},{key:"once",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(t=this.eventEmitter).once.apply(t,[e].concat(n))}},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"getMapCanvasContainer",value:function(){return this.$mapContainer?this.$mapContainer.getElementsByClassName("maplibregl-canvas-container")[0]:this.$mapContainer}},{key:"meterToCoord",value:function(e,r){var n=new t.LngLat(e[0],e[1]),i=new t.LngLat(r[0],r[1]),a=n.distanceTo(i),o=t.MercatorCoordinate.fromLngLat({lng:e[0],lat:e[1]}),s=t.MercatorCoordinate.fromLngLat({lng:r[0],lat:r[1]}),u=o.x,c=o.y,l=s.x,h=s.y;return 4194304*Math.sqrt(Math.pow(u-l,2)+Math.pow(c-h,2))*2/a}},{key:"exportMap",value:function(e){var t=this.map.getCanvas();return"jpg"===e?null==t?void 0:t.toDataURL("image/jpeg"):null==t?void 0:t.toDataURL("image/png")}},{key:"creatMapContainer",value:function(e){var t=e;"string"==typeof e&&(t=document.getElementById(e));var r=document.createElement("div");return r.style.cssText+="\n      position: absolute;\n      top: 0;\n      height: 100%;\n      width: 100%;\n    ",r.id="l7_mapbox_div"+iF++,t.appendChild(r),r}}]),o}(tF))||KD,oF=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"getServiceConstructor",value:function(){return aF}}]),r}(FD),sF={},uF={},cF=function(e){return uF[e]},lF=function(e,t){uF[e]=t},hF=function(e,t){sF[e]=t},fF={},pF={};function dF(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function vF(e){var t=Object.create(null),r=[];return e.forEach((function(e){for(var n in e)n in t||r.push(t[n]=n)})),r}function gF(e,t){var r=e+"",n=r.length;return n<t?new Array(t-n+1).join(0)+r:r}function mF(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":function(e){return e<0?"-"+gF(-e,6):e>9999?"+"+gF(e,6):gF(e,4)}(e.getUTCFullYear())+"-"+gF(e.getUTCMonth()+1,2)+"-"+gF(e.getUTCDate(),2)+(i?"T"+gF(t,2)+":"+gF(r,2)+":"+gF(n,2)+"."+gF(i,3)+"Z":n?"T"+gF(t,2)+":"+gF(r,2)+":"+gF(n,2)+"Z":r||t?"T"+gF(t,2)+":"+gF(r,2)+"Z":"")}var yF=function(e){var t=new RegExp('["'+e+"\n\r]"),r=e.charCodeAt(0);function n(e,t){var n,i=[],a=e.length,o=0,s=0,u=a<=0,c=!1;function l(){if(u)return pF;if(c)return c=!1,fF;var t,n,i=o;if(34===e.charCodeAt(i)){for(;o++<a&&34!==e.charCodeAt(o)||34===e.charCodeAt(++o););return(t=o)>=a?u=!0:10===(n=e.charCodeAt(o++))?c=!0:13===n&&(c=!0,10===e.charCodeAt(o)&&++o),e.slice(i+1,t-1).replace(/""/g,'"')}for(;o<a;){if(10===(n=e.charCodeAt(t=o++)))c=!0;else if(13===n)c=!0,10===e.charCodeAt(o)&&++o;else if(n!==r)continue;return e.slice(i,t)}return u=!0,e.slice(i,a)}for(10===e.charCodeAt(a-1)&&--a,13===e.charCodeAt(a-1)&&--a;(n=l())!==pF;){for(var h=[];n!==fF&&n!==pF;)h.push(n),n=l();t&&null==(h=t(h,s++))||i.push(h)}return i}function i(t,r){return t.map((function(t){return r.map((function(e){return o(t[e])})).join(e)}))}function a(t){return t.map(o).join(e)}function o(e){return null==e?"":e instanceof Date?mF(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var r,i,a=n(e,(function(e,n){if(r)return r(e,n-1);i=e,r=t?function(e,t){var r=dF(e);return function(n,i){return t(r(n),i,e)}}(e,t):dF(e)}));return a.columns=i||[],a},parseRows:n,format:function(t,r){return null==r&&(r=vF(t)),[r.map(o).join(e)].concat(i(t,r)).join("\n")},formatBody:function(e,t){return null==t&&(t=vF(e)),i(e,t).join("\n")},formatRows:function(e){return e.map(a).join("\n")},formatRow:a,formatValue:o}}(",").parse,_F=function e(t,r){var n,i=t&&t.type;if("FeatureCollection"===i)for(n=0;n<t.features.length;n++)e(t.features[n],r);else if("GeometryCollection"===i)for(n=0;n<t.geometries.length;n++)e(t.geometries[n],r);else if("Feature"===i)e(t.geometry,r);else if("Polygon"===i)bF(t.coordinates,r);else if("MultiPolygon"===i)for(n=0;n<t.coordinates.length;n++)bF(t.coordinates[n],r);return t};function bF(e,t){if(0!==e.length){xF(e[0],t);for(var r=1;r<e.length;r++)xF(e[r],!t)}}function xF(e,t){for(var r=0,n=0,i=0,a=e.length,o=a-1;i<a;o=i++){var s=(e[i][0]-e[o][0])*(e[o][1]+e[i][1]),u=r+s;n+=Math.abs(r)>=Math.abs(s)?r-u+s:s-u+r,r=u}r+n>=0!=!!t&&e.reverse()}function SF(e){if(Array.isArray(e))return e;if("Feature"===e.type){if(null!==e.geometry)return e.geometry.coordinates}else if(e.coordinates)return e.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function EF(e){return"Feature"===e.type?e.geometry:e}function AF(e,t){var r=t.x,i=t.y,a=t.x1,o=t.y1,s=t.coordinates,u=t.geometry,c=[];if(!Array.isArray(e))return{dataArray:[]};if(u)return e.filter((function(e){return e[u]&&e[u].type&&e[u].coordinates&&e[u].coordinates.length>0})).forEach((function(e,t){ab(_F(n({},e[u]),!0),(function(r){var i=SF(r),a=n(n({},e),{},{_id:t,coordinates:i});c.push(a)}))})),{dataArray:c};for(var l=0;l<e.length;l++){var h=e[l],f=[];if(s){var p="Polygon";Array.isArray(s[0])||(p="Point"),Array.isArray(s[0])&&!Array.isArray(s[0][0])&&(p="LineString"),f=_F({type:p,coordinates:T(h[s])},!0).coordinates}else if(r&&i&&a&&o){f=[[parseFloat(h[r]),parseFloat(h[i])],[parseFloat(h[a]),parseFloat(h[o])]]}else r&&i&&(f=[parseFloat(h[r]),parseFloat(h[i])]);var d=n(n({},h),{},{_id:l,coordinates:f});c.push(d)}return{dataArray:c}}function TF(e,t,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var u=((e-r)*o+(t-n)*s)/(o*o+s*s);u>1?(r=i,n=a):u>0&&(r+=o*u,n+=s*u)}return(o=e-r)*o+(s=t-n)*s}function wF(e,t,r,n){var i={id:void 0===e?null:e,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(e){var t=e.geometry,r=e.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)CF(e,t);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n<t.length;n++)CF(e,t[n]);else if("MultiPolygon"===r)for(n=0;n<t.length;n++)for(var i=0;i<t[n].length;i++)CF(e,t[n][i])}(i),i}function CF(e,t){for(var r=0;r<t.length;r+=3)e.minX=Math.min(e.minX,t[r]),e.minY=Math.min(e.minY,t[r+1]),e.maxX=Math.max(e.maxX,t[r]),e.maxY=Math.max(e.maxY,t[r+1])}function kF(e,t,r,n){if(t.geometry){var i=t.geometry.coordinates,a=t.geometry.type,o=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],u=t.id;if(r.promoteId?u=t.properties[r.promoteId]:r.generateId&&(u=n||0),"Point"===a)MF(i,s);else if("MultiPoint"===a)for(var c=0;c<i.length;c++)MF(i[c],s);else if("LineString"===a)PF(i,s,o,!1);else if("MultiLineString"===a){if(r.lineMetrics){for(c=0;c<i.length;c++)s=[],PF(i[c],s,o,!1),e.push(wF(u,"LineString",s,t.properties));return}IF(i,s,o,!1)}else if("Polygon"===a)IF(i,s,o,!0);else{if("MultiPolygon"!==a){if("GeometryCollection"===a){for(c=0;c<t.geometry.geometries.length;c++)kF(e,{id:u,geometry:t.geometry.geometries[c],properties:t.properties},r,n);return}throw new Error("Input data is not a valid GeoJSON object.")}for(c=0;c<i.length;c++){var l=[];IF(i[c],l,o,!0),s.push(l)}}e.push(wF(u,a,s,t.properties))}}function MF(e,t){t.push(OF(e[0])),t.push(RF(e[1])),t.push(0)}function PF(e,t,r,n){for(var i,a,o=0,s=0;s<e.length;s++){var u=OF(e[s][0]),c=RF(e[s][1]);t.push(u),t.push(c),t.push(0),s>0&&(o+=n?(i*c-u*a)/2:Math.sqrt(Math.pow(u-i,2)+Math.pow(c-a,2))),i=u,a=c}var l=t.length-3;t[2]=1,function e(t,r,n,i){for(var a,o=i,s=n-r>>1,u=n-r,c=t[r],l=t[r+1],h=t[n],f=t[n+1],p=r+3;p<n;p+=3){var d=TF(t[p],t[p+1],c,l,h,f);if(d>o)a=p,o=d;else if(d===o){var v=Math.abs(p-s);v<u&&(a=p,u=v)}}o>i&&(a-r>3&&e(t,r,a,i),t[a+2]=o,n-a>3&&e(t,a,n,i))}(t,0,l,r),t[l+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function IF(e,t,r,n){for(var i=0;i<e.length;i++){var a=[];PF(e[i],a,r,n),t.push(a)}}function OF(e){return e/360+.5}function RF(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function LF(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o<n)return e;if(o<r||a>=n)return null;for(var u=[],c=0;c<e.length;c++){var l=e[c],h=l.geometry,f=l.type,p=0===i?l.minX:l.minY,d=0===i?l.maxX:l.maxY;if(p>=r&&d<n)u.push(l);else if(!(d<r||p>=n)){var v=[];if("Point"===f||"MultiPoint"===f)NF(h,v,r,n,i);else if("LineString"===f)DF(h,v,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===f)zF(h,v,r,n,i,!1);else if("Polygon"===f)zF(h,v,r,n,i,!0);else if("MultiPolygon"===f)for(var g=0;g<h.length;g++){var m=[];zF(h[g],m,r,n,i,!0),m.length&&v.push(m)}if(v.length){if(s.lineMetrics&&"LineString"===f){for(g=0;g<v.length;g++)u.push(wF(l.id,f,v[g],l.tags));continue}"LineString"!==f&&"MultiLineString"!==f||(1===v.length?(f="LineString",v=v[0]):f="MultiLineString"),"Point"!==f&&"MultiPoint"!==f||(f=3===v.length?"Point":"MultiPoint"),u.push(wF(l.id,f,v,l.tags))}}}return u.length?u:null}function NF(e,t,r,n,i){for(var a=0;a<e.length;a+=3){var o=e[a+i];o>=r&&o<=n&&(t.push(e[a]),t.push(e[a+1]),t.push(e[a+2]))}}function DF(e,t,r,n,i,a,o){for(var s,u,c=FF(e),l=0===i?UF:jF,h=e.start,f=0;f<e.length-3;f+=3){var p=e[f],d=e[f+1],v=e[f+2],g=e[f+3],m=e[f+4],y=0===i?p:d,_=0===i?g:m,b=!1;o&&(s=Math.sqrt(Math.pow(p-g,2)+Math.pow(d-m,2))),y<r?_>r&&(u=l(c,p,d,g,m,r),o&&(c.start=h+s*u)):y>n?_<n&&(u=l(c,p,d,g,m,n),o&&(c.start=h+s*u)):BF(c,p,d,v),_<r&&y>=r&&(u=l(c,p,d,g,m,r),b=!0),_>n&&y<=n&&(u=l(c,p,d,g,m,n),b=!0),!a&&b&&(o&&(c.end=h+s*u),t.push(c),c=FF(e)),o&&(h+=s)}var x=e.length-3;p=e[x],d=e[x+1],v=e[x+2],(y=0===i?p:d)>=r&&y<=n&&BF(c,p,d,v),x=c.length-3,a&&x>=3&&(c[x]!==c[0]||c[x+1]!==c[1])&&BF(c,c[0],c[1],c[2]),c.length&&t.push(c)}function FF(e){var t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function zF(e,t,r,n,i,a){for(var o=0;o<e.length;o++)DF(e[o],t,r,n,i,a,!1)}function BF(e,t,r,n){e.push(t),e.push(r),e.push(n)}function UF(e,t,r,n,i,a){var o=(a-t)/(n-t);return e.push(a),e.push(r+(i-r)*o),e.push(1),o}function jF(e,t,r,n,i,a){var o=(a-r)/(i-r);return e.push(t+(n-t)*o),e.push(a),e.push(1),o}function VF(e,t){for(var r=[],n=0;n<e.length;n++){var i,a=e[n],o=a.type;if("Point"===o||"MultiPoint"===o||"LineString"===o)i=GF(a.geometry,t);else if("MultiLineString"===o||"Polygon"===o){i=[];for(var s=0;s<a.geometry.length;s++)i.push(GF(a.geometry[s],t))}else if("MultiPolygon"===o)for(i=[],s=0;s<a.geometry.length;s++){for(var u=[],c=0;c<a.geometry[s].length;c++)u.push(GF(a.geometry[s][c],t));i.push(u)}r.push(wF(a.id,o,i,a.tags))}return r}function GF(e,t){var r=[];r.size=e.size,void 0!==e.start&&(r.start=e.start,r.end=e.end);for(var n=0;n<e.length;n+=3)r.push(e[n]+t,e[n+1],e[n+2]);return r}function HF(e,t){if(e.transformed)return e;var r,n,i,a=1<<e.z,o=e.x,s=e.y;for(r=0;r<e.features.length;r++){var u=e.features[r],c=u.geometry,l=u.type;if(u.geometry=[],1===l)for(n=0;n<c.length;n+=2)u.geometry.push(WF(c[n],c[n+1],t,a,o,s));else for(n=0;n<c.length;n++){var h=[];for(i=0;i<c[n].length;i+=2)h.push(WF(c[n][i],c[n][i+1],t,a,o,s));u.geometry.push(h)}}return e.transformed=!0,e}function WF(e,t,r,n,i,a){return[Math.round(r*(e*n-i)),Math.round(r*(t*n-a))]}function YF(e,t,r,n,i){for(var a=t===i.maxZoom?0:i.tolerance/((1<<t)*i.extent),o={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:n,z:t,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<e.length;s++){o.numFeatures++,XF(o,e[s],a,i);var u=e[s].minX,c=e[s].minY,l=e[s].maxX,h=e[s].maxY;u<o.minX&&(o.minX=u),c<o.minY&&(o.minY=c),l>o.maxX&&(o.maxX=l),h>o.maxY&&(o.maxY=h)}return o}function XF(e,t,r,n){var i=t.geometry,a=t.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s<i.length;s+=3)o.push(i[s]),o.push(i[s+1]),e.numPoints++,e.numSimplified++;else if("LineString"===a)ZF(o,i,e,r,!1,!1);else if("MultiLineString"===a||"Polygon"===a)for(s=0;s<i.length;s++)ZF(o,i[s],e,r,"Polygon"===a,0===s);else if("MultiPolygon"===a)for(var u=0;u<i.length;u++){var c=i[u];for(s=0;s<c.length;s++)ZF(o,c[s],e,r,!0,0===s)}if(o.length){var l=t.tags||null;if("LineString"===a&&n.lineMetrics){for(var h in l={},t.tags)l[h]=t.tags[h];l.mapbox_clip_start=i.start/i.size,l.mapbox_clip_end=i.end/i.size}var f={geometry:o,type:"Polygon"===a||"MultiPolygon"===a?3:"LineString"===a||"MultiLineString"===a?2:1,tags:l};null!==t.id&&(f.id=t.id),e.features.push(f)}}function ZF(e,t,r,n,i,a){var o=n*n;if(n>0&&t.size<(i?o:n))r.numPoints+=t.length/3;else{for(var s=[],u=0;u<t.length;u+=3)(0===n||t[u+2]>o)&&(r.numSimplified++,s.push(t[u]),s.push(t[u+1])),r.numPoints++;i&&function(e,t){for(var r=0,n=0,i=e.length,a=i-2;n<i;a=n,n+=2)r+=(e[n]-e[a])*(e[n+1]+e[a+1]);if(r>0===t)for(n=0,i=e.length;n<i/2;n+=2){var o=e[n],s=e[n+1];e[n]=e[i-2-n],e[n+1]=e[i-1-n],e[i-2-n]=o,e[i-1-n]=s}}(s,a),e.push(s)}}function qF(e,t){var r=(t=this.options=function(e,t){for(var r in t)e[r]=t[r];return e}(Object.create(this.options),t)).debug;if(r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(e,t){var r=[];if("FeatureCollection"===e.type)for(var n=0;n<e.features.length;n++)kF(r,e.features[n],t,n);else"Feature"===e.type?kF(r,e,t):kF(r,{geometry:e},t);return r}(e,t);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(n=function(e,t){var r=t.buffer/t.extent,n=e,i=LF(e,1,-1-r,r,0,-1,2,t),a=LF(e,1,1-r,2+r,0,-1,2,t);return(i||a)&&(n=LF(e,1,-r,1+r,0,-1,2,t)||[],i&&(n=VF(i,1).concat(n)),a&&(n=n.concat(VF(a,-1)))),n}(n,t)).length&&this.splitTile(n,0,0,0),r&&(n.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function KF(e,t,r){return 32*((1<<e)*r+t)+e}qF.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},qF.prototype.splitTile=function(e,t,r,n,i,a,o){for(var s=[e,t,r,n],u=this.options,c=u.debug;s.length;){n=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();var l=1<<t,h=KF(t,r,n),f=this.tiles[h];if(!f&&(c>1&&console.time("creation"),f=this.tiles[h]=YF(e,t,r,n,u),this.tileCoords.push({z:t,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));var p="z"+t;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(f.source=e,i){if(t===u.maxZoom||t===i)continue;var d=1<<i-t;if(r!==Math.floor(a/d)||n!==Math.floor(o/d))continue}else if(t===u.indexMaxZoom||f.numPoints<=u.indexMaxPoints)continue;if(f.source=null,0!==e.length){c>1&&console.time("clipping");var v,g,m,y,_,b,x=.5*u.buffer/u.extent,S=.5-x,E=.5+x,A=1+x;v=g=m=y=null,_=LF(e,l,r-x,r+E,0,f.minX,f.maxX,u),b=LF(e,l,r+S,r+A,0,f.minX,f.maxX,u),e=null,_&&(v=LF(_,l,n-x,n+E,1,f.minY,f.maxY,u),g=LF(_,l,n+S,n+A,1,f.minY,f.maxY,u),_=null),b&&(m=LF(b,l,n-x,n+E,1,f.minY,f.maxY,u),y=LF(b,l,n+S,n+A,1,f.minY,f.maxY,u),b=null),c>1&&console.timeEnd("clipping"),s.push(v||[],t+1,2*r,2*n),s.push(g||[],t+1,2*r,2*n+1),s.push(m||[],t+1,2*r+1,2*n),s.push(y||[],t+1,2*r+1,2*n+1)}}},qF.prototype.getTile=function(e,t,r){var n=this.options,i=n.extent,a=n.debug;if(e<0||e>24)return null;var o=1<<e,s=KF(e,t=(t%o+o)%o,r);if(this.tiles[s])return HF(this.tiles[s],i);a>1&&console.log("drilling down to z%d-%d-%d",e,t,r);for(var u,c=e,l=t,h=r;!u&&c>0;)c--,l=Math.floor(l/2),h=Math.floor(h/2),u=this.tiles[KF(c,l,h)];return u&&u.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,l,h),a>1&&console.time("drilling down"),this.splitTile(u.source,c,l,h,e,t,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?HF(this.tiles[s],i):null):null};var QF=function(){function e(t,r,n,i){u(this,e),h(this,"vectorTile",void 0),h(this,"vectorLayerCache",{}),h(this,"x",void 0),h(this,"y",void 0),h(this,"z",void 0),this.x=r,this.y=n,this.z=i,this.vectorTile=t}return l(e,[{key:"getTileData",value:function(e){return e&&this.vectorTile.layers[e]?this.vectorLayerCache[e]?this.vectorLayerCache[e]:this.vectorTile.layers[e].features:[]}},{key:"getFeatureById",value:function(){throw new Error("Method not implemented.")}}]),e}(),$F={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0};function JF(e){for(var t,r,n=0,i=0,a=e.length,o=a-1;i<a;o=i++)t=e[i],n+=((r=e[o]).x-t.x)*(t.y+r.y);return n}var ez=["Unknown","Point","LineString","Polygon"];function tz(e,t,r,n,i){var a,o,s=i.geometry,u=i.type,c=i.tags,l=i.id,h=e*Math.pow(2,n),f=e*t,p=e*r,d=ez[u];function v(e){for(var t=0;t<e.length;t++){var r=e[t];if(r[3])break;var n=180-360*(r[1]+p)/h,i=360*(r[0]+f)/h-180,a=360/Math.PI*Math.atan(Math.exp(n*Math.PI/180))-90;e[t]=[i,a,0,1]}}switch(u){case 1:var g=[];for(a=0;a<s.length;a++)g[a]=s[a][0];v(s=g);break;case 2:for(a=0;a<s.length;a++)v(s[a]);break;case 3:for(s=function(e){var t=e.length;if(t<=1)return[e];for(var r,n,i=[],a=0;a<t;a++){var o=JF(e[a]);0!==o&&(void 0===n&&(n=o<0),n===o<0?(r&&i.push(r),r=[e[a]]):r.push(e[a]))}return r&&i.push(r),i}(s),a=0;a<s.length;a++)for(o=0;o<s[a].length;o++)v(s[a][o])}return 1===s.length?s=s[0]:d="Multi"+d,{type:"Feature",geometry:{type:d,coordinates:s},properties:c,id:l,tileOrigin:[0,0],coord:""}}var rz=function(){var e=s(i().mark((function e(t,r,n,a){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var i=r.getTile(t.z,t.x,t.y),o=i?i.features.map((function(e){return tz(a,n.x,n.y,n.z,e)})):[];e(new QF({layers:{defaultLayer:{features:o}}},t.x,t.y,t.z))})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}();function nz(e,t){var r=t.extent,n=void 0===r?[121.168,30.2828,121.384,30.4219]:r,i=new Promise((function(t){e instanceof HTMLImageElement||g_(e)?t([e]):function(e,t){var r=e,n=[];if("string"==typeof r)ig({url:r},(function(e,r){r&&(n.push(r),t(n))}));else{var i=r.length,a=0;r.forEach((function(e){ig({url:e},(function(e,r){a++,r&&n.push(r),a===i&&t(n)}))}))}}
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */(e,(function(e){t(e)}))}));return{originData:e,images:i,_id:1,dataArray:[{_id:0,coordinates:[[n[0],n[1]],[n[2],n[3]]]}]}}var iz=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,a=p&(1<<-l)-1,p>>=-l,l+=s;l>0;a=256*a+e[t+h],h+=f,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+h],h+=f,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},az=function(e,t,r,n,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(o++,u/=2),o+h>=l?(s=0,o=l):o+h>=1?(s=(t*u-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[r+p]=255&o,p+=d,o/=256,c-=8);e[r+p-d]|=128*v},oz=sz;function sz(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}sz.Varint=0,sz.Fixed64=1,sz.Bytes=2,sz.Fixed32=5;var uz="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function cz(e){return e.type===sz.Bytes?e.readVarint()+e.pos:e.pos+1}function lz(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function hz(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function fz(e,t){for(var r=0;r<e.length;r++)t.writeVarint(e[r])}function pz(e,t){for(var r=0;r<e.length;r++)t.writeSVarint(e[r])}function dz(e,t){for(var r=0;r<e.length;r++)t.writeFloat(e[r])}function vz(e,t){for(var r=0;r<e.length;r++)t.writeDouble(e[r])}function gz(e,t){for(var r=0;r<e.length;r++)t.writeBoolean(e[r])}function mz(e,t){for(var r=0;r<e.length;r++)t.writeFixed32(e[r])}function yz(e,t){for(var r=0;r<e.length;r++)t.writeSFixed32(e[r])}function _z(e,t){for(var r=0;r<e.length;r++)t.writeFixed64(e[r])}function bz(e,t){for(var r=0;r<e.length;r++)t.writeSFixed64(e[r])}function xz(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+16777216*e[t+3]}function Sz(e,t,r){e[r]=t,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function Ez(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}sz.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos<r;){var n=this.readVarint(),i=n>>3,a=this.pos;this.type=7&n,e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=xz(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=Ez(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=xz(this.buf,this.pos)+4294967296*xz(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=xz(this.buf,this.pos)+4294967296*Ez(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=iz(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=iz(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,i,a=r.buf;if(i=a[r.pos++],n=(112&i)>>4,i<128)return lz(e,n,t);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return lz(e,n,t);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return lz(e,n,t);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return lz(e,n,t);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return lz(e,n,t);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return lz(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&uz?function(e,t,r){return uz.decode(e.subarray(t,r))}(this.buf,t,e):function(e,t,r){var n="",i=t;for(;i<r;){var a,o,s,u=e[i],c=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l>r)break;1===l?u<128&&(c=u):2===l?128==(192&(a=e[i+1]))&&(c=(31&u)<<6|63&a)<=127&&(c=null):3===l?(a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&((c=(15&u)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===l&&(a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((c=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,l=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=l}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==sz.Bytes)return e.push(this.readVarint(t));var r=cz(this);for(e=e||[];this.pos<r;)e.push(this.readVarint(t));return e},readPackedSVarint:function(e){if(this.type!==sz.Bytes)return e.push(this.readSVarint());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readSVarint());return e},readPackedBoolean:function(e){if(this.type!==sz.Bytes)return e.push(this.readBoolean());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readBoolean());return e},readPackedFloat:function(e){if(this.type!==sz.Bytes)return e.push(this.readFloat());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readFloat());return e},readPackedDouble:function(e){if(this.type!==sz.Bytes)return e.push(this.readDouble());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readDouble());return e},readPackedFixed32:function(e){if(this.type!==sz.Bytes)return e.push(this.readFixed32());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readFixed32());return e},readPackedSFixed32:function(e){if(this.type!==sz.Bytes)return e.push(this.readSFixed32());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed32());return e},readPackedFixed64:function(e){if(this.type!==sz.Bytes)return e.push(this.readFixed64());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readFixed64());return e},readPackedSFixed64:function(e){if(this.type!==sz.Bytes)return e.push(this.readSFixed64());var t=cz(this);for(e=e||[];this.pos<t;)e.push(this.readSFixed64());return e},skip:function(e){var t=7&e;if(t===sz.Varint)for(;this.buf[this.pos++]>127;);else if(t===sz.Bytes)this.pos=this.readVarint()+this.pos;else if(t===sz.Fixed32)this.pos+=4;else{if(t!==sz.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t<this.pos+e;)t*=2;if(t!==this.length){var r=new Uint8Array(t);r.set(this.buf),this.buf=r,this.length=t}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(e){this.realloc(4),Sz(this.buf,e,this.pos),this.pos+=4},writeSFixed32:function(e){this.realloc(4),Sz(this.buf,e,this.pos),this.pos+=4},writeFixed64:function(e){this.realloc(8),Sz(this.buf,-1&e,this.pos),Sz(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(e){this.realloc(8),Sz(this.buf,-1&e,this.pos),Sz(this.buf,Math.floor(e*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(e){(e=+e||0)>268435455||e<0?function(e,t){var r,n;e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}(r,0,t),function(e,t){var r=(7&e)<<4;if(t.buf[t.pos++]|=r|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,i,a=0;a<t.length;a++){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&hz(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),az(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),az(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r<t;r++)this.buf[this.pos++]=e[r]},writeRawMessage:function(e,t){this.pos++;var r=this.pos;e(t,this);var n=this.pos-r;n>=128&&hz(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,sz.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,fz,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,pz,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,gz,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,dz,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,vz,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,mz,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,yz,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,_z,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,bz,t)},writeBytesField:function(e,t){this.writeTag(e,sz.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,sz.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,sz.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,sz.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,sz.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,sz.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,sz.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,sz.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,sz.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,sz.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}};var Az=function(){function e(t,r,n,i,a){u(this,e),h(this,"vectorTile",void 0),h(this,"vectorLayerCache",{}),h(this,"x",void 0),h(this,"y",void 0),h(this,"z",void 0),h(this,"version",void 0),this.x=r,this.y=n,this.z=i,this.version=a;var o=("MAPLIBRE"===this.version?window.maplibregl:window.mapboxgl).mapbox.VectorTile;this.vectorTile=new o(new oz(t))}return l(e,[{key:"getTileData",value:function(e){if(!e||!this.vectorTile.layers[e])return[];if(this.vectorLayerCache[e])return this.vectorLayerCache[e];var t=this.vectorTile.layers[e];if(Array.isArray(t.features))return this.vectorLayerCache[e]=t.features,t.features;for(var r=[],i=0;i<t.length;i++){var a=t.feature(i).toGeoJSON(this.x,this.y,this.z,(function(e,t){return Qx([e,t],uS.map)}));r.push(n(n({},a),{},{properties:n({id:a.id},a.properties)}))}return this.vectorLayerCache[e]=r,r}},{key:"getFeatureById",value:function(){throw new Error("Method not implemented.")}}]),e}(),Tz={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0,warp:!0},wz=function(){var e=s(i().mark((function e(t,r,a,o,s){var u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=qE(t,r),e.abrupt("return",new Promise((function(e){if(s)s({x:a.x,y:a.y,z:a.z},(function(t,r){if(t||!r)e(void 0);else{var n=new Az(r,a.x,a.y,a.z,a.version);e(n)}}));else{var t=eg(n(n({},o),{},{url:u}),(function(t,r){if(t||!r)e(void 0);else{var n=new Az(r,a.x,a.y,a.z,a.version);e(n)}}));a.xhrCancel=function(){return t.abort()}}})));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n,i,a){return e.apply(this,arguments)}}();function Cz(e,t){for(var r=t[0],n=r.width,i=r.height,a=t.map((function(e){return e.rasterData})),o=n*i,s=[],u=JSON.stringify(e),c=0;c<o;c++){var l=JSON.parse(u),h=kz(l,a,c);if("number"==typeof h)s.push(h);else{var f=Mz(l);s.push(f)}}return s}function kz(e,t,r){if(2===e.length&&"band"===e[0]&&"number"==typeof e[1])try{return t[e[1]][r]}catch(e){return console.warn("Raster Data err!"),0}e.map((function(n,i){if(Array.isArray(n)&&n.length>0)switch(n[0]){case"band":try{e[i]=t[n[1]][r]}catch(t){console.warn("Raster Data err!"),e[i]=0}break;default:kz(n,t,r)}}))}function Mz(e){var t=function(e){var t=A(e,3),r=t[0],n=t[1],i=void 0===n?-1:n,a=t[2],o=void 0===a?-1:a;return void 0===r?(console.warn("Express err!"),["+",0,0]):[r.replace(/\s+/g,""),i,o]}(e),r=t[0],n=t[1],i=t[2];return Array.isArray(n)&&(n=Mz(e[1])),Array.isArray(i)&&(i=Mz(e[2])),function(e,t,r){switch(e){case"+":return t+r;case"-":return t-r;case"*":return t*r;case"/":return t/r;case"%":return t%r;case"^":return Math.pow(t,r);case"abs":return Math.abs(t);case"floor":return Math.floor(t);case"round":return Math.round(t);case"ceil":return Math.ceil(t);case"sin":return Math.sin(t);case"cos":return Math.cos(t);case"atan":return-1===r?Math.atan(t):Math.atan2(t,r);case"min":return Math.min(t,r);case"max":return Math.max(t,r);case"log10":return Math.log(t);case"log2":return Math.log2(t);default:return console.warn("Calculate symbol err! Return default 0"),0}}(r,n,i)}var Pz={nd:{type:"operation",expression:["/",["-",["band",1],["band",0]],["+",["band",1],["band",0]]]},rgb:{type:"function",method:function(e,t){for(var r=e[0].rasterData,n=e[1].rasterData,i=e[2].rasterData,a=[],o=A((null==t?void 0:t.countCut)||[2,98],2),s=o[0],u=o[1],c=(null==t?void 0:t.RMinMax)||Iz(r,s,u),l=(null==t?void 0:t.GMinMax)||Iz(n,s,u),h=(null==t?void 0:t.BMinMax)||Iz(i,s,u),f=0;f<r.length;f++)a.push(Math.max(0,r[f]-c[0])),a.push(Math.max(0,n[f]-l[0])),a.push(Math.max(0,i[f]-h[0]));return{rasterData:a,rMinMax:c,gMinMax:l,bMinMax:h}}}};function Iz(e,t,r){var n=e.slice().sort((function(e,t){return e-t})),i=n.length;return[n[Math.ceil(i*t/100)],n[Math.ceil(i*r/100)]]}function Oz(e,t,r){return Rz.apply(this,arguments)}function Rz(){return(Rz=s(i().mark((function e(t,r,o){var s,u,c,l,h,f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==t.length){e.next=2;break}return e.abrupt("return",{rasterData:[0],width:1,heigh:1});case 2:return e.next=4,Promise.all(t.map((function(e){var t=e.data,n=e.bands;return r(t,void 0===n?[0]:n)})));case 4:s=e.sent,u=[],s.forEach((function(e){Array.isArray(e)?u.push.apply(u,T(e)):u.push(e)})),c=u[0],l=c.width,h=c.height,e.t0=a(o),e.next="function"===e.t0?11:"object"===e.t0?13:15;break;case 11:return f=o(u),e.abrupt("break",16);case 13:return f=Array.isArray(o)?{rasterData:Cz(o,u)}:Lz(o,u),e.abrupt("break",16);case 15:f={rasterData:u[0].rasterData};case 16:return e.abrupt("return",n(n({},f),{},{width:l,height:h}));case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lz(e,t){var r=Pz[e.type];return"function"===r.type?r.method(t,null==e?void 0:e.options):"operation"===r.type?"rgb"===e.type?function(e,t){void 0===e.r&&console.warn("Channel R lost in Operation! Use band[0] to fill!");void 0===e.g&&console.warn("Channel G lost in Operation! Use band[0] to fill!");void 0===e.b&&console.warn("Channel B lost in Operation! Use band[0] to fill!");var r=Cz(e.r||["band",0],t),n=Cz(e.g||["band",0],t),i=Cz(e.b||["band",0],t);return[r,n,i]}(r.expression,t):{rasterData:Cz(r.expression,t)}:void 0}function Nz(e,t,r,n){return Dz.apply(this,arguments)}function Dz(){return(Dz=s(i().mark((function e(t,r,n,a){var o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Oz(t,r,n);case 2:o=e.sent,a(null,{data:o});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fz(e){return!!Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}var zz=gh.ArrayBuffer,Bz=De.ArrayBuffer;hn({global:!0,constructor:!0,forced:Bz!==zz},{ArrayBuffer:zz}),Bo("ArrayBuffer");var Uz=function(){var e=s(i().mark((function e(t,r,n,a){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,i){r({x:t.x,y:t.y,z:t.z},(function(t,r){t||0===r.length?i(t):r&&Nz([{data:r,bands:[0]}],n,a,(function(t,r){t?i(t):r&&e(r)}))}))})));case 1:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),jz=function(){var e=s(i().mark((function e(t,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){r({x:t.x,y:t.y,z:t.z},(function(t,r){!t&&r?r instanceof ArrayBuffer?ag(r,(function(t,r){t&&n(t),e(r)})):r instanceof HTMLImageElement?e(r):n(t):n(t)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}();function Vz(e,t){return Array.isArray(e)?"string"==typeof e[0]?e.map((function(e){return qE(e,t)})):e.map((function(e){return{url:qE(e.url,t),bands:e.bands||[0]}})):qE(e,t)}function Gz(e,t){e.xhrCancel=function(){t.map((function(e){e.abort()}))}}var Hz=function(){var e=s(i().mark((function e(t,r,n,a,o){var s,u,c,l,h,f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=r.url,!((s="string"==typeof i?[{url:i,bands:[0]}]:"string"==typeof i[0]?i.map((function(e){return{url:e,bands:[0]}})):i).length>1)){e.next=15;break}return e.next=4,Wz(s,r);case 4:if(u=e.sent,c=u.rasterFiles,l=u.xhrList,h=u.errList,Gz(t,l),!(h.length>0)){e.next=12;break}return n(h,null),e.abrupt("return");case 12:Nz(c,a,o,n),e.next=17;break;case 15:f=eg(r,(function(e,t){if(e)n(e);else if(t){Nz([{data:t,bands:s[0].bands}],a,o,n)}})),Gz(t,[f]);case 17:case"end":return e.stop()}var i}),e)})));return function(t,r,n,i,a){return e.apply(this,arguments)}}();function Wz(e,t){return Yz.apply(this,arguments)}function Yz(){return(Yz=s(i().mark((function e(t,r){var a,o,s,u,c,l,h,f,p,d,v;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=[],o=[],s=[],u=0;case 4:if(!(u<t.length)){e.next=20;break}return c=t[u],l=n(n({},r),{},{url:c.url}),h=c.bands,e.next=10,Qv(n(n({},l),{},{type:"arrayBuffer"}));case 10:f=e.sent,p=f.err,d=f.data,v=f.xhr,p&&s.push(p),o.push(v),a.push({data:d,bands:h});case 17:u++,e.next=4;break;case 20:return e.abrupt("return",{rasterFiles:a,xhrList:o,errList:s});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Xz=function(){var e=s(i().mark((function e(t,r,n,a,o){var s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s={url:Vz(t,r)},e.abrupt("return",new Promise((function(e,t){Hz(n,s,(function(r,n){r?t(r):n&&e(n)}),a,o)})));case 2:case"end":return e.stop()}}),e)})));return function(t,r,n,i,a){return e.apply(this,arguments)}}(),Zz=function(){var e=s(i().mark((function e(t,r,a,o){var s,u,c,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=Array.isArray(t)?t[0]:t,o.wmtsOptions?(c=(null==o?void 0:o.getURLFromTemplate)||KE,s=c(u,n(n({},r),o.wmtsOptions))):(l=(null==o?void 0:o.getURLFromTemplate)||qE,s=l(u,r)),e.abrupt("return",new Promise((function(e,t){var r,n=ig({url:s,type:(null==o||null===(r=o.requestParameters)||void 0===r?void 0:r.type)||"arrayBuffer"},(function(r,n){r?t(r):n&&e(n)}),o.transformResponse);a.xhrCancel=function(){return n.abort()}})));case 3:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),qz=function(){return{rasterData:new Uint8Array([0]),width:1,height:1}},Kz={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0,warp:!0};DD.ARRAYBUFFER,DD.RGB;function Qz(e){return!(!Array.isArray(e)||0!==e.length)||!Array.isArray(e)&&"string"!=typeof e}var $z=["extent","min","max","width","height","format","operation"];var Jz={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0},eB=function(){var e=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var r=A(t.bounds,4),n=r[0],i=r[1],a=r[2],o=r[3];e({layers:{testTile:{features:[{type:"Feature",properties:{key:t.x+"/"+t.y+"/"+t.z,x:(n+a)/2,y:(i+o)/2},geometry:{type:"LineString",coordinates:[[a,o],[a,i],[n,i],[n,i]]}}]}}})})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var tB=uP((function(e,t,r,n){aP(e,t,r,n)}));var rB=function(e){return"string"==typeof e||!CM(e)&&IE(e)&&"[object String]"==dm(e)},nB=N((function(e,t){e.exports=function(){function e(r,n,i,a,o,s){if(!(o-a<=i)){var u=a+o>>1;!function e(r,n,i,a,o,s){for(;o>a;){if(o-a>600){var u=o-a+1,c=i-a+1,l=Math.log(u),h=.5*Math.exp(2*l/3),f=.5*Math.sqrt(l*h*(u-h)/u)*(c-u/2<0?-1:1),p=Math.max(a,Math.floor(i-c*h/u+f)),d=Math.min(o,Math.floor(i+(u-c)*h/u+f));e(r,n,i,p,d,s)}var v=n[2*i+s],g=a,m=o;for(t(r,n,a,i),n[2*o+s]>v&&t(r,n,a,o);g<m;){for(t(r,n,g,m),g++,m--;n[2*g+s]<v;)g++;for(;n[2*m+s]>v;)m--}n[2*a+s]===v?t(r,n,a,m):(m++,t(r,n,m,o)),m<=i&&(a=m+1),i<=m&&(o=m-1)}}(r,n,u,a,o,s%2),e(r,n,i,a,u-1,s+1),e(r,n,i,u+1,o,s+1)}}function t(e,t,n,i){r(e,n,i),r(t,2*n,2*i),r(t,2*n+1,2*i+1)}function r(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function n(e,t,r,n){var i=e-r,a=t-n;return i*i+a*a}var i=function(e){return e[0]},a=function(e){return e[1]},o=function(t,r,n,o,s){void 0===r&&(r=i),void 0===n&&(n=a),void 0===o&&(o=64),void 0===s&&(s=Float64Array),this.nodeSize=o,this.points=t;for(var u=t.length<65536?Uint16Array:Uint32Array,c=this.ids=new u(t.length),l=this.coords=new s(2*t.length),h=0;h<t.length;h++)c[h]=h,l[2*h]=r(t[h]),l[2*h+1]=n(t[h]);e(c,l,o,0,c.length-1,0)};o.prototype.range=function(e,t,r,n){return function(e,t,r,n,i,a,o){for(var s,u,c=[0,e.length-1,0],l=[];c.length;){var h=c.pop(),f=c.pop(),p=c.pop();if(f-p<=o)for(var d=p;d<=f;d++)s=t[2*d],u=t[2*d+1],s>=r&&s<=i&&u>=n&&u<=a&&l.push(e[d]);else{var v=Math.floor((p+f)/2);s=t[2*v],u=t[2*v+1],s>=r&&s<=i&&u>=n&&u<=a&&l.push(e[v]);var g=(h+1)%2;(0===h?r<=s:n<=u)&&(c.push(p),c.push(v-1),c.push(g)),(0===h?i>=s:a>=u)&&(c.push(v+1),c.push(f),c.push(g))}}return l}(this.ids,this.coords,e,t,r,n,this.nodeSize)},o.prototype.within=function(e,t,r){return function(e,t,r,i,a,o){for(var s=[0,e.length-1,0],u=[],c=a*a;s.length;){var l=s.pop(),h=s.pop(),f=s.pop();if(h-f<=o)for(var p=f;p<=h;p++)n(t[2*p],t[2*p+1],r,i)<=c&&u.push(e[p]);else{var d=Math.floor((f+h)/2),v=t[2*d],g=t[2*d+1];n(v,g,r,i)<=c&&u.push(e[d]);var m=(l+1)%2;(0===l?r-a<=v:i-a<=g)&&(s.push(f),s.push(d-1),s.push(m)),(0===l?r+a>=v:i+a>=g)&&(s.push(d+1),s.push(h),s.push(m))}}return u}(this.ids,this.coords,e,t,r,this.nodeSize)};var s={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(e){return e}},u=Math.fround||function(e){return function(t){return e[0]=+t,e[0]}}(new Float32Array(1)),c=function(e){this.options=g(Object.create(s),e),this.trees=new Array(this.options.maxZoom+1)};function l(e,t,r,n,i){return{x:u(e),y:u(t),zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function h(e,t){var r=e.geometry.coordinates,n=r[0],i=r[1];return{x:u(d(n)),y:u(v(i)),zoom:1/0,index:t,parentId:-1}}function f(e){return{type:"Feature",id:e.id,properties:p(e),geometry:{type:"Point",coordinates:[(n=e.x,360*(n-.5)),(t=e.y,r=(180-360*t)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var t,r,n}function p(e){var t=e.numPoints,r=t>=1e4?Math.round(t/1e3)+"k":t>=1e3?Math.round(t/100)/10+"k":t;return g(g({},e.properties),{cluster:!0,cluster_id:e.id,point_count:t,point_count_abbreviated:r})}function d(e){return e/360+.5}function v(e){var t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function g(e,t){for(var r in t)e[r]=t[r];return e}function m(e){return e.x}function y(e){return e.y}return c.prototype.load=function(e){var t=this.options,r=t.log,n=t.minZoom,i=t.maxZoom,a=t.nodeSize;r&&console.time("total time");var s="prepare "+e.length+" points";r&&console.time(s),this.points=e;for(var u=[],c=0;c<e.length;c++)e[c].geometry&&u.push(h(e[c],c));this.trees[i+1]=new o(u,m,y,a,Float32Array),r&&console.timeEnd(s);for(var l=i;l>=n;l--){var f=+Date.now();u=this._cluster(u,l),this.trees[l]=new o(u,m,y,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",l,u.length,+Date.now()-f)}return r&&console.timeEnd("total time"),this},c.prototype.getClusters=function(e,t){var r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],t),s=this.getClusters([-180,n,i,a],t);return o.concat(s)}for(var u=this.trees[this._limitZoom(t)],c=[],l=0,h=u.range(d(r),v(a),d(i),v(n));l<h.length;l+=1){var p=h[l],g=u.points[p];c.push(g.numPoints?f(g):this.points[g.index])}return c},c.prototype.getChildren=function(e){var t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",i=this.trees[r];if(!i)throw new Error(n);var a=i.points[t];if(!a)throw new Error(n);for(var o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],u=0,c=i.within(a.x,a.y,o);u<c.length;u+=1){var l=c[u],h=i.points[l];h.parentId===e&&s.push(h.numPoints?f(h):this.points[h.index])}if(0===s.length)throw new Error(n);return s},c.prototype.getLeaves=function(e,t,r){t=t||10,r=r||0;var n=[];return this._appendLeaves(n,e,t,r,0),n},c.prototype.getTile=function(e,t,r){var n=this.trees[this._limitZoom(e)],i=Math.pow(2,e),a=this.options,o=a.extent,s=a.radius/o,u=(r-s)/i,c=(r+1+s)/i,l={features:[]};return this._addTileFeatures(n.range((t-s)/i,u,(t+1+s)/i,c),n.points,t,r,i,l),0===t&&this._addTileFeatures(n.range(1-s/i,u,1,c),n.points,i,r,i,l),t===i-1&&this._addTileFeatures(n.range(0,u,s/i,c),n.points,-1,r,i,l),l.features.length?l:null},c.prototype.getClusterExpansionZoom=function(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var r=this.getChildren(e);if(t++,1!==r.length)break;e=r[0].properties.cluster_id}return t},c.prototype._appendLeaves=function(e,t,r,n,i){for(var a=0,o=this.getChildren(t);a<o.length;a+=1){var s=o[a],u=s.properties;if(u&&u.cluster?i+u.point_count<=n?i+=u.point_count:i=this._appendLeaves(e,u.cluster_id,r,n,i):i<n?i++:e.push(s),e.length===r)break}return i},c.prototype._addTileFeatures=function(e,t,r,n,i,a){for(var o=0,s=e;o<s.length;o+=1){var u=t[s[o]],c=u.numPoints,l=void 0,h=void 0,f=void 0;if(c)l=p(u),h=u.x,f=u.y;else{var g=this.points[u.index];l=g.properties,h=d(g.geometry.coordinates[0]),f=v(g.geometry.coordinates[1])}var m={type:1,geometry:[[Math.round(this.options.extent*(h*i-r)),Math.round(this.options.extent*(f*i-n))]],tags:l},y=void 0;c?y=u.id:this.options.generateId?y=u.index:this.points[u.index].id&&(y=this.points[u.index].id),void 0!==y&&(m.id=y),a.features.push(m)}},c.prototype._limitZoom=function(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))},c.prototype._cluster=function(e,t){for(var r=[],n=this.options,i=n.radius,a=n.extent,o=n.reduce,s=n.minPoints,u=i/(a*Math.pow(2,t)),c=0;c<e.length;c++){var h=e[c];if(!(h.zoom<=t)){h.zoom=t;for(var f=this.trees[t+1],p=f.within(h.x,h.y,u),d=h.numPoints||1,v=d,g=0,m=p;g<m.length;g+=1){var y=m[g],_=f.points[y];_.zoom>t&&(v+=_.numPoints||1)}if(v>d&&v>=s){for(var b=h.x*d,x=h.y*d,S=o&&d>1?this._map(h,!0):null,E=(c<<5)+(t+1)+this.points.length,A=0,T=p;A<T.length;A+=1){var w=T[A],C=f.points[w];if(!(C.zoom<=t)){C.zoom=t;var k=C.numPoints||1;b+=C.x*k,x+=C.y*k,C.parentId=E,o&&(S||(S=this._map(h,!0)),o(S,this._map(C)))}}h.parentId=E,r.push(l(b/v,x/v,E,v,S))}else if(r.push(h),v>1)for(var M=0,P=p;M<P.length;M+=1){var I=P[M],O=f.points[I];O.zoom<=t||(O.zoom=t,r.push(O))}}}return r},c.prototype._getOriginId=function(e){return e-this.points.length>>5},c.prototype._getOriginZoom=function(e){return(e-this.points.length)%32},c.prototype._map=function(e,t){if(e.numPoints)return t?g({},e.properties):e.properties;var r=this.points[e.index].properties,n=this.options.map(r);return t&&n===r?g({},n):n},c}()}));function iB(e,t){var r=t.radius,i=void 0===r?40:r,a=t.maxZoom,o=void 0===a?18:a,s=t.minZoom,u=void 0===s?0:s,c=t.zoom,l=void 0===c?2:c;if(e.pointIndex){var h=e.pointIndex.getClusters(e.extent,Math.floor(l));return e.dataArray=h.map((function(e,t){return n({coordinates:e.geometry.coordinates,_id:t+1},e.properties)})),e}var f=new nB({radius:i,minZoom:u,maxZoom:o}),p={type:"FeatureCollection",features:[]};return p.features=e.dataArray.map((function(e){return{type:"Feature",geometry:{type:"Point",coordinates:e.coordinates},properties:n({},e)}})),f.load(p.features),f}function aB(e){if(0===e.length)return 0;for(var t,r=e[0],n=0,i=1;i<e.length;i++)t=r+1*e[i],Math.abs(r)>=Math.abs(e[i])?n+=r-t+e[i]:n+=e[i]-t+r,r=t;return r+1*n}var oB={min:function(e){if(0===e.length)throw new Error("min requires at least one data point");for(var t=e[0],r=1;r<e.length;r++)e[r]<t&&(t=e[r]);return t},max:function(e){if(0===e.length)throw new Error("max requires at least one data point");for(var t=e[0],r=1;r<e.length;r++)e[r]>t&&(t=e[r]);return t},mean:function(e){if(0===e.length)throw new Error("mean requires at least one data point");return aB(e)/e.length},sum:aB};function sB(e,t){if(Array.isArray(t))return t}var uB=function(e){f(o,e);var t,r,a=x(o);function o(e,t){var r;return u(this,o),h(_(r=a.call(this)),"type","source"),h(_(r),"isTile",!1),h(_(r),"inited",!1),h(_(r),"data",void 0),h(_(r),"center",void 0),h(_(r),"extent",void 0),h(_(r),"hooks",{init:new $O}),h(_(r),"parser",{type:"geojson"}),h(_(r),"transforms",[]),h(_(r),"cluster",!1),h(_(r),"clusterOptions",{enable:!1,radius:40,maxZoom:20,zoom:-99,method:"count"}),h(_(r),"tileset",void 0),h(_(r),"invalidExtent",!1),h(_(r),"dataArrayChanged",!1),h(_(r),"originData",void 0),h(_(r),"rawData",void 0),h(_(r),"cfg",{autoRender:!0}),h(_(r),"clusterIndex",void 0),r.originData=e,r.initCfg(t),r.init().then((function(){r.inited=!0,r.emit("update",{type:"inited"})})),r}return l(o,[{key:"getSourceCfg",value:function(){return this.cfg}},{key:"getClusters",value:function(e){return this.clusterIndex.getClusters(this.caculClusterExtent(2),e)}},{key:"getClustersLeaves",value:function(e){return this.clusterIndex.getLeaves(e,1/0)}},{key:"getParserType",value:function(){return this.parser.type}},{key:"updateClusterData",value:function(e){var t=this,r=this.clusterOptions,n=r.method,i=void 0===n?"sum":n,a=r.field,o=this.clusterIndex.getClusters(this.caculClusterExtent(2),Math.floor(e));this.clusterOptions.zoom=e,o.forEach((function(e){e.id||(e.properties.point_count=1)})),(a||gm(i))&&(o=o.map((function(e){var r=e.id;if(r){var n,o=t.clusterIndex.getLeaves(r,1/0).map((function(e){return e.properties}));if(rB(i)&&a){var s=function(e,t){return e.map((function(e){return 1*e[t]}))}(o,a);n=oB[i](s)}gm(i)&&(n=i(o)),e.properties.stat=n}else e.properties.point_count=1;return e}))),this.data=cF("geojson")({type:"FeatureCollection",features:o}),this.executeTrans()}},{key:"getFeatureById",value:function(e){var t=this.parser,r=t.type,n=void 0===r?"geojson":r,i=t.geometry;if("geojson"!==n||this.cluster)return"json"===n&&i?this.data.dataArray.find((function(t){return t._id===e})):e<this.data.dataArray.length?this.data.dataArray[e]:"null";var a=e<this.originData.features.length?this.originData.features[e]:"null",o=II(a);if(null!=o&&o.properties&&(0!==this.transforms.length||this.dataArrayChanged)){var s=this.data.dataArray.find((function(t){return t._id===e}));o.properties=s}return o}},{key:"updateFeaturePropertiesById",value:function(e,t){this.data.dataArray=this.data.dataArray.map((function(r){return r._id===e?n(n({},r),t):r})),this.dataArrayChanged=!0,this.emit("update",{type:"update"})}},{key:"getFeatureId",value:function(e,t){var r=this.data.dataArray.find((function(r){return r[e]===t}));return null==r?void 0:r._id}},{key:"setData",value:function(e,t){var r=this;this.originData=e,this.dataArrayChanged=!1,this.initCfg(t),this.init().then((function(){r.emit("update",{type:"update"})}))}},{key:"reloadAllTile",value:function(){var e;null===(e=this.tileset)||void 0===e||e.reloadAll()}},{key:"reloadTilebyId",value:function(e,t,r){var n;null===(n=this.tileset)||void 0===n||n.reloadTileById(e,t,r)}},{key:"reloadTileByLnglat",value:function(e,t,r){var n;null===(n=this.tileset)||void 0===n||n.reloadTileByLnglat(e,t,r)}},{key:"getTileExtent",value:function(e,t){var r;return null===(r=this.tileset)||void 0===r?void 0:r.getTileExtent(e,t)}},{key:"getTileByZXY",value:function(e,t,r){var n;return null===(n=this.tileset)||void 0===n?void 0:n.getTileByZXY(e,t,r)}},{key:"reloadTileByExtent",value:function(e,t){var r;null===(r=this.tileset)||void 0===r||r.reloadTileByExtent(e,t)}},{key:"destroy",value:function(){var e;this.removeAllListeners(),this.originData=null,this.clusterIndex=null,this.data=null,null===(e=this.tileset)||void 0===e||e.destroy()}},{key:"processData",value:(r=s(i().mark((function e(){var t=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,r){try{t.excuteParser(),t.initCluster(),t.executeTrans(),e({})}catch(e){r(e)}})));case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"initCfg",value:function(e){this.cfg=tB(this.cfg,e,sB);var t=this.cfg;t&&(t.parser&&(this.parser=t.parser),t.transforms&&(this.transforms=t.transforms),this.cluster=t.cluster||!1,t.clusterOptions&&(this.cluster=!0,this.clusterOptions=n(n({},this.clusterOptions),t.clusterOptions)))}},{key:"init",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.inited=!1,e.next=3,this.processData();case 3:this.inited=!0;case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"excuteParser",value:function(){var e=this.parser,t=e.type||"geojson",r=cF(t);this.data=r(this.originData,e),this.tileset=this.initTileset(),e.cancelExtent||(this.extent=fS(this.data.dataArray),this.setCenter(this.extent),this.invalidExtent=this.extent[0]===this.extent[2]||this.extent[1]===this.extent[3])}},{key:"setCenter",value:function(e){this.center=[(e[0]+e[2])/2,(e[1]+e[3])/2],(isNaN(this.center[0])||isNaN(this.center[1]))&&(this.center=[108.92361111111111,34.54083333333333])}},{key:"initTileset",value:function(){var e=this.data.tilesetOptions;if(e)return this.isTile=!0,this.tileset?(this.tileset.updateOptions(e),this.tileset):new XE(n({},e))}},{key:"executeTrans",value:function(){var e=this;this.transforms.forEach((function(t){var r=function(e){return sF[e]}(t.type)(e.data,t);Object.assign(e.data,r)}))}},{key:"initCluster",value:function(){if(this.cluster){var e=this.clusterOptions||{};this.clusterIndex=iB(this.data,e)}}},{key:"caculClusterExtent",value:function(e){var t=[[-1/0,-1/0],[1/0,1/0]];return this.invalidExtent||(t=xS(ES(this.extent),e)),t[0].concat(t[1])}}]),o}(F);var cB=Math.PI/3,lB=[0,cB,2*cB,3*cB,4*cB,5*cB];function hB(e){return e[0]}function fB(e){return e[1]}lF("rasterTile",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Qz(e))throw new Error("tile server url is error");var r=(null==t?void 0:t.dataType)||DD.IMAGE;r===DD.RGB&&(r=DD.ARRAYBUFFER);var i=function(n,i){switch(r){case DD.IMAGE:return Zz(e,n,i,t);case DD.CUSTOMIMAGE:case DD.CUSTOMTERRAINRGB:return jz(i,null==t?void 0:t.getCustomData);case DD.ARRAYBUFFER:return Xz(e,n,i,(null==t?void 0:t.format)||qz,null==t?void 0:t.operation);case DD.CUSTOMARRAYBUFFER:case DD.CUSTOMRGB:return Uz(i,null==t?void 0:t.getCustomData,(null==t?void 0:t.format)||qz,null==t?void 0:t.operation);default:return Zz(e,n,i,t)}},a=n(n(n({},Kz),t),{},{getTileData:i});return{data:e,dataArray:[],tilesetOptions:a,isTile:!0}})),lF("mvt",(function(e,t){var r=Array.isArray(e)?e[0]:e,i=n(n(n({},Tz),t),{},{getTileData:function(e,n){return wz(r,e,n,null==t?void 0:t.requestParameters,null==t?void 0:t.getCustomData)}});return{data:r,dataArray:[],tilesetOptions:i,isTile:!0}})),lF("geojsonvt",(function(e,t){var r=function(e){var t={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!0,debug:0};return void 0===e||void 0===e.geojsonvtOptions?t:n(n({},t),e.geojsonvtOptions)}(t),i=r.extent||4096,a=function(e,t){return new qF(e,t)}(e,r);return{data:e,dataArray:[],tilesetOptions:n(n(n({},$F),t),{},{getTileData:function(e,t){return rz(t,a,e,i)}}),isTile:!0}})),lF("testTile",(function(e,t){return{data:e,dataArray:[],tilesetOptions:n(n(n({},Jz),t),{},{getTileData:function(e){return eB(e)}}),isTile:!0}})),lF("geojson",(function(e,t){var r=[],i={};return e.features?(e.features=e.features.filter((function(e){var t=e.geometry;return null!=e&&t&&t.type&&t.coordinates&&t.coordinates.length>0})),_F(e,!0),0===e.features.length?{dataArray:[],featureKeys:i}:(ab(e,(function(e,i){var o=function(e,t){return void 0===t?null:1*a(e.properties[t])==="number"?1*e.properties[t]:e.properties&&e.properties[t]?function(e){for(var t=e.toString(),r=5381,n=t.length;n;)r=33*r^t.charCodeAt(--n);return r>>>0}(e.properties[t]+"")%1000019:null}(e,null==t?void 0:t.featureId);null===o&&(o=i);var s=o,u=SF(e),c=n(n({},e.properties),{},{coordinates:u,_id:s});r.push(c)})),{dataArray:r,featureKeys:i})):(e.features=[],{dataArray:[]})})),lF("image",nz),lF("csv",(function(e,t){return AF(yF(e),t)})),lF("json",AF),lF("raster",(function(e,t){var r,n,i,a=t.extent,o=t.width,s=t.height,u=t.min,c=t.max,l=t.format,h=t.operation;return void 0===l||Fz(e)?(r=Array.from(e),n=o,i=s):r=Oz(Array.isArray(e)?e:[e],l,h),{_id:1,dataArray:[{_id:1,data:r,width:n,height:i,min:u,max:c,coordinates:[[a[0],a[1]],[a[2],a[3]]]}]}})),lF("rasterRgb",(function(e,t){var r=t.extent,i=t.min,a=t.max,o=t.width,s=t.height,u=t.format,c=t.operation,l=y(t,$z);return{_id:1,dataArray:[n(n({_id:1,data:void 0===u||Fz(e)?Array.from(e):Oz(Array.isArray(e)?e:[e],u,c),width:o,height:s},l),{},{min:i,max:a,coordinates:[[r[0],r[1]],[r[2],r[3]]]})]}})),hF("cluster",iB),hF("filter",(function(e,t){var r=t.callback;return r&&(e.dataArray=e.dataArray.filter(r)),e})),hF("join",(function(e,t){var r=t.sourceField,i=t.targetField,a=t.data,o={};return a.forEach((function(e){o[e[r]]=e})),e.dataArray=e.dataArray.map((function(e){var t=e[i];return n(n({},e),o[t])})),e})),hF("map",(function(e,t){var r=t.callback;return r&&(e.dataArray=e.dataArray.map(r)),e})),hF("grid",(function(e,t){var r=e.dataArray,n=t.size,i=void 0===n?10:n,a=i/(2*Math.PI*6378e3)*(256<<20)/2,o=function(e,t){var r,n,i=1/0,a=-1/0,o=k(e);try{for(o.s();!(n=o.n()).done;){var s=n.value;r=s.coordinates[1],Number.isFinite(r)&&(i=r<i?r:i,a=r>a?r:a)}}catch(e){o.e(e)}finally{o.f()}var u=function(e,t){var r=(i=e,i/6378e3*(180/Math.PI)),n=function(e,t){return t/6378e3*(180/Math.PI)/Math.cos(e*Math.PI/180)}(t,e);var i;return{yOffset:r,xOffset:n}}(t,(i+a)/2);if(u.xOffset<=0||u.yOffset<=0)return{gridHash:{},gridOffset:u};var c,l={},h=k(e);try{for(h.s();!(c=h.n()).done;){var f=c.value,p=f.coordinates[1],d=f.coordinates[0];if(Number.isFinite(p)&&Number.isFinite(d)){var v=Math.floor((p+90)/u.yOffset),g=Math.floor((d+180)/u.xOffset),m="".concat(v,"-").concat(g);l[m]=l[m]||{count:0,points:[]},l[m].count+=1,l[m].points.push(f)}}}catch(e){h.e(e)}finally{h.f()}return{gridHash:l,gridOffset:u}}(r,i);return{yOffset:a,xOffset:a,radius:a,type:"grid",dataArray:function(e,t,r){return Object.keys(e).reduce((function(n,i,a){var o=i.split("-"),s=parseInt(o[0],10),u=parseInt(o[1],10),c={};if(r.field&&r.method){var l=nE(e[i].points,r.field);c[r.method]=rE[r.method](l)}return Object.assign(c,{_id:a,originCoordinates:[t.xOffset*(u+.5)-180,t.yOffset*(s+.5)-90],coordinates:mS([t.xOffset*(u+.5)-180,t.yOffset*(s+.5)-90]),rawData:e[i].points,count:e[i].count}),n.push(c),n}),[])}(o.gridHash,o.gridOffset,t)}})),hF("hexagon",(function(e,t){var r=e.dataArray,i=t.size,a=void 0===i?10:i,o=t.method,s=void 0===o?"sum":o,u=a/(2*Math.PI*6378e3)*(256<<20)/2,c=r.map((function(e){var t=e.coordinates,r=A(mS(e.coordinates),2),i=r[0],a=r[1];return n(n({},e),{},{originCoordinates:t,coordinates:[i,a]})}));return{dataArray:function(){var e,t,r,n=0,i=0,a=1,o=1,s=hB,u=fB;function c(e){var n,i={},a=[],o=e.length;for(n=0;n<o;++n)if(!isNaN(l=+s.call(null,c=e[n],n,e))&&!isNaN(h=+u.call(null,c,n,e))){var c,l,h,f=Math.round(h/=r),p=Math.round(l=l/t-(1&f)/2),d=h-f;if(3*Math.abs(d)>1){var v=l-p,g=p+(l<p?-1:1)/2,m=f+(h<f?-1:1),y=l-g,_=h-m;v*v+d*d>y*y+_*_&&(p=g+(1&f?1:-1)/2,f=m)}var b=p+"-"+f,x=i[b];x?x.push(c):(a.push(x=i[b]=[c]),x.x=(p+(1&f)/2)*t,x.y=f*r)}return a}function l(e){var t=0,r=0;return lB.map((function(n){var i=Math.sin(n)*e,a=-Math.cos(n)*e,o=i-t,s=a-r;return t=i,r=a,[o,s]}))}return c.hexagon=function(t){return"m"+l(null==t?e:+t).join("l")+"z"},c.centers=function(){for(var s=[],u=Math.round(i/r),c=Math.round(n/t),l=u*r;l<o+e;l+=r,++u)for(var h=c*t+(1&u)*t/2;h<a+t/2;h+=t)s.push([h,l]);return s},c.mesh=function(){var t=l(e).slice(0,4).join("l");return c.centers().map((function(e){return"M"+e+"m"+t})).join("")},c.x=function(e){return arguments.length?(s=e,c):s},c.y=function(e){return arguments.length?(u=e,c):u},c.radius=function(n){return arguments.length?(t=2*(e=+n)*Math.sin(cB),r=1.5*e,c):e},c.size=function(e){return arguments.length?(n=i=0,a=+e[0],o=+e[1],c):[a-n,o-i]},c.extent=function(e){return arguments.length?(n=+e[0][0],i=+e[0][1],a=+e[1][0],o=+e[1][1],c):[[n,i],[a,o]]},c.radius(1)}().radius(u).x((function(e){return e.coordinates[0]})).y((function(e){return e.coordinates[1]}))(c).map((function(e,r){var n;if(t.field&&s){var i=nE(e,t.field);e[s]=rE[s](i)}return h(n={},t.method,e[s]),h(n,"count",e.length),h(n,"rawData",e),h(n,"originCoordinates",e[0]?e[0].originCoordinates:[e.x,e.y]),h(n,"coordinates",[e.x,e.y]),h(n,"_id",r),n})),radius:u,xOffset:u,yOffset:u,type:"hexagon"}})),hn({target:"String",proto:!0,forced:sT("anchor")},{anchor:function(e){return oT(this,"a","name",e)}});var pB=function(e){f(r,e);var t=x(r);function r(e){var i;return u(this,r),h(_(i=t.call(this)),"markerOption",void 0),h(_(i),"defaultMarker",void 0),h(_(i),"popup",void 0),h(_(i),"mapsService",void 0),h(_(i),"sceneSerive",void 0),h(_(i),"lngLat",void 0),h(_(i),"scene",void 0),h(_(i),"added",!1),h(_(i),"eventHandle",(function(e){i.polyfillEvent(e),i.emit(e.type,{target:e,data:i.markerOption.extData,lngLat:i.lngLat})})),h(_(i),"touchStartTime",void 0),i.markerOption=n(n({},i.getDefault()),e),E_(["update","onMove","onMapClick"],_(i)),i.init(),i}return l(r,[{key:"getMarkerLayerContainerSize",value:function(){}},{key:"getDefault",value:function(){return{element:void 0,anchor:og.BOTTOM,offsets:[0,0],color:"#5B8FF9",draggable:!1}}},{key:"addTo",value:function(e){this.scene=e,this.mapsService=e.get(ba.IMapService),this.sceneSerive=e.get(ba.ISceneService);var t=this.markerOption.element;return this.mapsService.getMarkerContainer().appendChild(t),this.registerMarkerEvent(t),this.mapsService.on("camerachange",this.update),this.update(),this.added=!0,this.emit("added"),this}},{key:"remove",value:function(){this.mapsService&&(this.mapsService.off("click",this.onMapClick),this.mapsService.off("move",this.update),this.mapsService.off("moveend",this.update),this.mapsService.off("camerachange",this.update)),this.unRegisterMarkerEvent(),this.removeAllListeners();var e=this.markerOption.element;return e&&qy(e),this.popup&&this.popup.remove(),this}},{key:"setLnglat",value:function(e){return this.lngLat=e,Array.isArray(e)&&(this.lngLat={lng:e[0],lat:e[1]}),this.popup&&this.popup.setLnglat(this.lngLat),this.update(),this}},{key:"getLnglat",value:function(){return this.lngLat}},{key:"getElement",value:function(){return this.markerOption.element}},{key:"setElement",value:function(e){var t=this;if(!this.added)return this.once("added",(function(){t.setElement(e)})),this;var r=this.markerOption.element;return r&&qy(r),this.markerOption.element=e,this.init(),this.mapsService.getMarkerContainer().appendChild(e),this.registerMarkerEvent(e),this.update(),this}},{key:"openPopup",value:function(){var e=this;if(!this.added)return this.once("added",(function(){e.openPopup()})),this;var t=this.popup;return t?(t.isOpen()||t.addTo(this.scene),this):this}},{key:"closePopup",value:function(){var e=this;this.added||this.once("added",(function(){e.closePopup()}));var t=this.popup;return t&&t.remove(),this}},{key:"setPopup",value:function(e){return this.popup=e,this.lngLat&&this.popup.setLnglat(this.lngLat),this}},{key:"togglePopup",value:function(){var e=this.popup;return e?(e.isOpen()?e.remove():e.addTo(this.scene),this):this}},{key:"getPopup",value:function(){return this.popup}},{key:"getOffset",value:function(){return this.markerOption.offsets}},{key:"setDraggable",value:function(e){throw new Error("Method not implemented.")}},{key:"isDraggable",value:function(){return this.markerOption.draggable}},{key:"getExtData",value:function(){return this.markerOption.extData}},{key:"setExtData",value:function(e){this.markerOption.extData=e}},{key:"update",value:function(){if(this.mapsService){var e=this.markerOption,t=e.element,r=e.anchor;this.updatePosition(),r_(t,"".concat(sg[r]))}}},{key:"onMapClick",value:function(e){var t=this.markerOption.element;this.popup&&t&&this.togglePopup()}},{key:"getCurrentContainerSize",value:function(){var e=this.mapsService.getContainer();return{containerHeight:(null==e?void 0:e.scrollHeight)||0,containerWidth:(null==e?void 0:e.scrollWidth)||0,bounds:this.mapsService.getBounds()}}},{key:"updatePosition",value:function(){if(this.mapsService){var e=this.markerOption,t=e.element,r=e.offsets,n=this.lngLat,i=n.lng,a=n.lat,o=this.mapsService.lngLatToContainer([i,a]);if(t){t.style.display="block",t.style.whiteSpace="nowrap";var s=this.getMarkerLayerContainerSize()||this.getCurrentContainerSize(),u=s.containerHeight,c=s.containerWidth,l=s.bounds;if(!l)return;if(Math.abs(l[0][0])>180||Math.abs(l[1][0])>180){if(o.x>c){var h=this.mapsService.lngLatToContainer([i-360,a]);o.x=h.x}if(o.x<0){var f=this.mapsService.lngLatToContainer([i+360,a]);o.x=f.x}}(o.x>c||o.x<0||o.y>u||o.y<0)&&(t.style.display="none"),t.style.left=o.x+r[0]+"px",t.style.top=o.y-r[1]+"px"}}}},{key:"init",value:function(){var e=this,t=this.markerOption.element,r=this.markerOption,n=r.color,i=r.anchor;if(!t){this.defaultMarker=!0,t=Zy("div"),this.markerOption.element=t;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","48px"),a.setAttributeNS(null,"width","48px"),a.setAttributeNS(null,"viewBox","0 0 1024 1024");var o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttributeNS(null,"d","M512 490.666667C453.12 490.666667 405.333333 442.88 405.333333 384 405.333333 325.12 453.12 277.333333 512 277.333333 570.88 277.333333 618.666667 325.12 618.666667 384 618.666667 442.88 570.88 490.666667 512 490.666667M512 85.333333C346.88 85.333333 213.333333 218.88 213.333333 384 213.333333 608 512 938.666667 512 938.666667 512 938.666667 810.666667 608 810.666667 384 810.666667 218.88 677.12 85.333333 512 85.333333Z"),o.setAttributeNS(null,"fill",n),a.appendChild(o),t.appendChild(a)}Ky(t,"l7-marker"),Object.keys(this.markerOption.style||{}).forEach((function(r){var n,i,a=(null===(n=e.markerOption)||void 0===n?void 0:n.style)&&(null===(i=e.markerOption)||void 0===i?void 0:i.style[r]);t&&(t.style[r]=a)})),ug(t,i,"marker")}},{key:"registerMarkerEvent",value:function(e){e.addEventListener("click",this.onMapClick),e.addEventListener("mousemove",this.eventHandle),e.addEventListener("click",this.eventHandle),e.addEventListener("mousedown",this.eventHandle),e.addEventListener("mouseup",this.eventHandle),e.addEventListener("dblclick",this.eventHandle),e.addEventListener("contextmenu",this.eventHandle),e.addEventListener("mouseover",this.eventHandle),e.addEventListener("mouseout",this.eventHandle),e.addEventListener("touchstart",this.eventHandle),e.addEventListener("touchend",this.eventHandle)}},{key:"unRegisterMarkerEvent",value:function(){var e=this.getElement();e.removeEventListener("click",this.onMapClick),e.removeEventListener("mousemove",this.eventHandle),e.removeEventListener("click",this.eventHandle),e.removeEventListener("mousedown",this.eventHandle),e.removeEventListener("mouseup",this.eventHandle),e.removeEventListener("dblclick",this.eventHandle),e.removeEventListener("contextmenu",this.eventHandle),e.removeEventListener("mouseover",this.eventHandle),e.removeEventListener("mouseout",this.eventHandle),e.removeEventListener("touchstart",this.eventHandle),e.removeEventListener("touchend",this.eventHandle)}},{key:"polyfillEvent",value:function(e){this.mapsService&&"GAODE2.x"===this.mapsService.version&&(S_()||("touchstart"===e.type&&(this.touchStartTime=Date.now()),"touchend"===e.type&&Date.now()-this.touchStartTime<300&&this.emit("click",{target:e,data:this.markerOption.extData,lngLat:this.lngLat})))}},{key:"addDragHandler",value:function(e){return null}},{key:"onUp",value:function(e){throw new Error("Method not implemented.")}}]),r}(F),dB=function(e){f(r,e);var t=x(r);function r(e){var n,i;return u(this,r),h(_(i=t.call(this)),"markers",[]),h(_(i),"markerLayerOption",void 0),h(_(i),"clusterIndex",void 0),h(_(i),"points",[]),h(_(i),"clusterMarkers",[]),h(_(i),"mapsService",void 0),h(_(i),"scene",void 0),h(_(i),"zoom",void 0),h(_(i),"bbox",void 0),h(_(i),"inited",void 0),h(_(i),"containerSize",void 0),i.markerLayerOption=cP(i.getDefault(),e),E_(["update"],_(i)),i.zoom=(null===(n=i.markerLayerOption.clusterOption)||void 0===n?void 0:n.zoom)||-99,i}return l(r,[{key:"getDefault",value:function(){return{cluster:!1,clusterOption:{radius:80,maxZoom:20,minZoom:0,zoom:-99,style:{},className:""}}}},{key:"addTo",value:function(e){return this.scene=e,this.mapsService=e.get(ba.IMapService),this.markerLayerOption.cluster&&(this.initCluster(),this.update(),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update)),this.mapsService.on("camerachange",this.setContainerSize.bind(this)),this.mapsService.on("viewchange",this.setContainerSize.bind(this)),this.addMarkers(),this.inited=!0,this}},{key:"setContainerSize",value:function(){if(this.mapsService){var e=this.mapsService.getContainer();this.containerSize={containerWidth:(null==e?void 0:e.scrollWidth)||0,containerHeight:(null==e?void 0:e.scrollHeight)||0,bounds:this.mapsService.getBounds()}}}},{key:"getContainerSize",value:function(){return this.containerSize}},{key:"addMarker",value:function(e){var t=this.markerLayerOption.cluster;if(e.getMarkerLayerContainerSize=this.getContainerSize.bind(this),t&&(this.addPoint(e,this.markers.length),this.mapsService)){var r=this.mapsService.getZoom(),n=this.mapsService.getBounds();this.bbox=xS(n,.5),this.zoom=Math.floor(r),this.getClusterMarker(this.bbox,this.zoom)}this.markers.push(e),this.inited&&e.addTo(this.scene)}},{key:"removeMarker",value:function(e){this.markers.indexOf(e);var t=this.markers.indexOf(e);t>-1&&this.markers.splice(t,1)}},{key:"hide",value:function(){this.markers.map((function(e){e.getElement().style.opacity="0"})),this.clusterMarkers.map((function(e){e.getElement().style.opacity="0"}))}},{key:"show",value:function(){this.markers.map((function(e){e.getElement().style.opacity="1"})),this.clusterMarkers.map((function(e){e.getElement().style.opacity="1"}))}},{key:"getMarkers",value:function(){return this.markerLayerOption.cluster?this.clusterMarkers:this.markers}},{key:"addMarkers",value:function(){var e=this;this.getMarkers().forEach((function(t){t.addTo(e.scene)}))}},{key:"clear",value:function(){this.markers.forEach((function(e){e.remove()})),this.clusterMarkers.forEach((function(e){e.remove()})),this.markers=[],this.points=[],this.clusterMarkers=[]}},{key:"destroy",value:function(){this.clear(),this.removeAllListeners(),this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.mapsService.off("camerachange",this.setContainerSize.bind(this)),this.mapsService.off("viewchange",this.setContainerSize.bind(this))}},{key:"addPoint",value:function(e,t){var r=e.getLnglat(),i={geometry:{type:"Point",coordinates:[r.lng,r.lat]},properties:n(n({},e.getExtData()),{},{marker_id:t})};this.points.push(i),this.clusterIndex&&this.clusterIndex.load(this.points)}},{key:"initCluster",value:function(){if(this.markerLayerOption.cluster){var e=this.markerLayerOption.clusterOption,t=e.radius,r=e.minZoom,n=void 0===r?0:r,i=e.maxZoom;this.clusterIndex=new nB({radius:t,minZoom:n,maxZoom:i}),this.clusterIndex.load(this.points)}}},{key:"getClusterMarker",value:function(e,t){var r=this,n=e[0].concat(e[1]),i=this.clusterIndex.getClusters(n,t);this.clusterMarkers.forEach((function(e){e.remove()})),this.clusterMarkers=[],i.forEach((function(e){var t,n=r.markerLayerOption.clusterOption,i=n.field,a=n.method;if(null!==(t=e.properties)&&void 0!==t&&t.cluster_id){var o,s=r.getLeaves(null===(o=e.properties)||void 0===o?void 0:o.cluster_id);if(e.properties.clusterData=s,i&&a){var u=iE(a,nE(null==s?void 0:s.map((function(e){return h({},i,e.properties[i])})),i)),c="point_"+a;e.properties[c]=u.toFixed(2)}}var l=r.clusterMarker(e);r.clusterMarkers.push(l),l.addTo(r.scene)}))}},{key:"getLeaves",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e?this.clusterIndex.getLeaves(e,t,r):null}},{key:"clusterMarker",value:function(e){var t=this.markerLayerOption.clusterOption.element,r=void 0===t?this.generateElement.bind(this):t;return new pB({element:r(e)}).setLnglat({lng:e.geometry.coordinates[0],lat:e.geometry.coordinates[1]})}},{key:"normalMarker",value:function(e){var t=e.properties.marker_id;return this.markers[t]}},{key:"update",value:function(){if(this.mapsService&&0!==this.markers.length){var e=this.mapsService.getZoom(),t=this.mapsService.getBounds();(!this.bbox||Math.abs(e-this.zoom)>=1||!SS(this.bbox,t))&&(this.bbox=xS(t,.5),this.zoom=Math.floor(e),this.getClusterMarker(this.bbox,this.zoom))}}},{key:"generateElement",value:function(e){var t=Zy("div","l7-marker-cluster"),r=Zy("div","",t),n=Zy("span","",r),i=this.markerLayerOption.clusterOption,a=i.field,o=i.method;e.properties.point_count=e.properties.point_count||1;var s=a&&o?e.properties["point_"+o]||e.properties[a]:e.properties.point_count;return n.textContent=s,t}}]),r}(F);window._iconfont_svg_string_3580659='<svg><symbol id="l7-icon-area1" viewBox="0 0 1024 1024"><path d="M796.444444 56.888889a113.777778 113.777778 0 0 1 43.064889 219.136l38.798223 466.261333a113.777778 113.777778 0 1 1-133.518223 145.237334H279.210667a113.777778 113.777778 0 1 1-60.302223-137.272889L697.856 227.555556A113.777778 113.777778 0 0 1 796.444444 56.888889z m56.888889 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-682.666666 0a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m577.592889-534.072889L269.198222 796.444444c4.152889 7.168 7.509333 14.791111 10.012445 22.812445h465.578666a114.119111 114.119111 0 0 1 65.479111-71.224889l-38.798222-466.261333a112.924444 112.924444 0 0 1-23.210666-7.964445zM796.444444 125.155556a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z"  ></path></symbol><symbol id="l7-icon-area" viewBox="0 0 1024 1024"><path d="M796.444444 56.888889a113.777778 113.777778 0 0 1 43.008 219.136l38.855112 466.261333a113.777778 113.777778 0 0 1-16.497778 224.540445L853.333333 967.111111a113.777778 113.777778 0 0 1-108.544-79.644444H279.210667a113.834667 113.834667 0 0 1-100.067556 79.36L170.666667 967.111111a113.777778 113.777778 0 0 1-17.066667-226.304l30.492444-351.175111a113.777778 113.777778 0 0 1 34.986667-218.680889L227.555556 170.666667a113.777778 113.777778 0 0 1 99.896888 59.221333l355.84-71.395556a113.777778 113.777778 0 0 1 104.675556-101.262222L796.444444 56.888889z m56.888889 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-682.666666 0a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m526.051555-582.314666L340.650667 296.903111a113.891556 113.891556 0 0 1-88.462223 98.645333l-30.947555 355.84c27.477333 13.653333 48.64 38.115556 58.026667 67.754667h465.521777a114.119111 114.119111 0 0 1 65.536-71.168l-38.855111-466.261333a113.948444 113.948444 0 0 1-74.752-56.206222zM227.555556 238.933333a45.511111 45.511111 0 1 0 0 91.022223 45.511111 45.511111 0 0 0 0-91.022223z m568.888888-113.777777a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z"  ></path></symbol><symbol id="l7-icon-delete" viewBox="0 0 1024 1024"><path d="M705.422222 85.333333a34.133333 34.133333 0 0 1 34.133334 34.133334V227.555556h136.533333a34.133333 34.133333 0 0 1 0 68.266666h-25.543111l-24.348445 610.076445a34.133333 34.133333 0 0 1-34.133333 32.768H231.936a34.133333 34.133333 0 0 1-34.076444-32.768L173.340444 295.822222H147.911111a34.133333 34.133333 0 1 1 0-68.266666H284.444444V119.466667a34.133333 34.133333 0 0 1 34.133334-34.133334h386.844444zM241.720889 295.822222l22.983111 574.577778h494.535111l23.04-574.577778H241.720889zM671.288889 153.6H352.711111V227.555556h318.577778V153.6z"  ></path></symbol><symbol id="l7-icon-color" viewBox="0 0 1024 1024"><path d="M512 56.888889c9.841778 0 19.626667 0.341333 29.354667 0.910222 69.176889 4.437333 119.068444 62.577778 124.302222 131.072l0.455111 9.386667c0.739556 44.600889 15.303111 84.935111 44.999111 114.631111 27.022222 27.022222 62.805333 41.528889 102.570667 44.430222l12.060444 0.568889c72.476444 1.194667 135.793778 52.451556 140.458667 124.757333 1.137778 18.261333 1.251556 36.807111 0.170667 55.637334-13.198222 233.585778-211.399111 424.220444-445.326223 428.714666L512 967.111111a455.111111 455.111111 0 0 1-455.054222-464.156444c4.551111-233.927111 195.185778-432.128 428.771555-445.326223C494.535111 57.116444 503.296 56.888889 512 56.888889z m0 68.266667a385.706667 385.706667 0 0 0-22.414222 0.625777C291.726222 136.988444 129.080889 305.948444 125.155556 504.263111c-4.152889 212.366222 163.100444 387.185778 372.508444 394.353778l13.425778 0.227555 8.533333-0.113777c198.371556-3.811556 367.331556-166.456889 378.538667-364.373334a396.174222 396.174222 0 0 0-0.170667-47.331555c-1.991111-31.232-29.127111-56.604444-67.128889-60.472889l-8.248889-0.455111-14.051555-0.682667c-56.547556-4.209778-107.406222-25.884444-145.806222-64.284444-38.855111-38.798222-60.416-90.225778-64.284445-145.749334l-0.910222-21.333333c-2.901333-38.001778-28.785778-66.048-60.302222-68.096A433.891556 433.891556 0 0 0 512 125.155556zM438.044444 682.666667a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z m-170.666666-227.555556a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z m142.222222-227.555555a68.266667 68.266667 0 1 1 0 136.533333 68.266667 68.266667 0 0 1 0-136.533333z"  ></path></symbol><symbol id="l7-icon-base-map" viewBox="0 0 1024 1024"><path d="M923.761778 115.029333A34.133333 34.133333 0 0 1 967.111111 147.911111v624.128a34.133333 34.133333 0 0 1-22.186667 32.028445l-278.755555 103.992888a34.133333 34.133333 0 0 1-23.665778 0.056889L381.724444 812.714667a34.133333 34.133333 0 0 0-23.665777 0.113777L102.968889 908.060444a34.133333 34.133333 0 0 1-45.738667-26.965333L56.888889 876.088889V251.960889a34.133333 34.133333 0 0 1 22.186667-32.028445l278.755555-103.992888a34.133333 34.133333 0 0 1 20.992-0.967112l266.183111 72.988445a34.133333 34.133333 0 0 0 18.204445 0zM403.911111 192.625778v555.576889l216.177778 79.075555V251.960889l-216.177778-59.335111z m-68.266667 4.380444L125.155556 275.569778v551.310222l210.432-78.506667V197.006222zM898.844444 192.853333l-210.545777 58.936889v575.089778l210.545777-78.563556V192.853333z"  ></path></symbol><symbol id="l7-icon-dot" viewBox="0 0 1024 1024"><path d="M341.333333 739.555556a113.777778 113.777778 0 0 1 8.533334 227.271111L341.333333 967.111111a113.777778 113.777778 0 0 1-8.533333-227.271111L341.333333 739.555556z m0 68.266666a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM910.222222 341.333333a113.777778 113.777778 0 0 1 8.533334 227.271111L910.222222 568.888889a113.777778 113.777778 0 0 1-8.533333-227.271111L910.222222 341.333333z m0 68.266667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM227.555556 56.888889a113.777778 113.777778 0 0 1 8.533333 227.271111L227.555556 284.444444a113.777778 113.777778 0 0 1-8.533334-227.271111L227.555556 56.888889z m0 68.266667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z"  ></path></symbol><symbol id="l7-icon-display" viewBox="0 0 1024 1024"><path d="M512 170.666667c284.444444 0 455.111111 227.555556 455.111111 341.333333s-170.666667 341.333333-455.111111 341.333333-455.111111-227.555556-455.111111-341.333333 170.666667-341.333333 455.111111-341.333333z m0 68.266666C303.729778 238.933333 125.155556 401.237333 125.155556 512c0 110.762667 178.574222 273.066667 386.844444 273.066667s386.844444-162.304 386.844444-273.066667c0-110.762667-178.574222-273.066667-386.844444-273.066667zM512 341.333333a170.666667 170.666667 0 1 1 0 341.333334 170.666667 170.666667 0 0 1 0-341.333334z m0 68.266667a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z"  ></path></symbol><symbol id="l7-icon-enlarge" viewBox="0 0 1024 1024"><path d="M546.133333 147.911111l-0.056889 329.955556H876.088889a34.133333 34.133333 0 0 1 0 68.266666H546.076444v329.955556a34.133333 34.133333 0 0 1-68.266666 0V546.133333H147.911111a34.133333 34.133333 0 1 1 0-68.266666h329.898667V147.911111a34.133333 34.133333 0 0 1 68.266666 0z"  ></path></symbol><symbol id="l7-icon-export-picture" viewBox="0 0 1024 1024"><path d="M883.873684 161.684211a32.336842 32.336842 0 0 1 32.336842 32.336842v582.063158a32.336842 32.336842 0 0 1-32.336842 32.336842H86.231579a32.336842 32.336842 0 0 1-32.336842-32.336842V194.021053a32.336842 32.336842 0 0 1 32.336842-32.336842h797.642105z m-32.336842 64.673684H118.568421v517.389473h170.792421a32.175158 32.175158 0 0 1 0.431158-0.646736l3.772632-4.473264 330.320842-330.374736a32.336842 32.336842 0 0 1 38.588631-5.389474l4.473263 3.018105 184.589474 147.725474V226.357895z m-202.428631 248.131368L379.850105 743.747368H851.536842v-107.304421l-202.428631-161.953684zM323.368421 323.368421a107.789474 107.789474 0 1 1 0 215.578947 107.789474 107.789474 0 0 1 0-215.578947z m0 64.673684a43.115789 43.115789 0 1 0 0 86.231579 43.115789 43.115789 0 0 0 0-86.231579z"  ></path></symbol><symbol id="l7-icon-exit-fullscreen" viewBox="0 0 1024 1024"><path d="M841.955556 591.644444a34.133333 34.133333 0 0 1 5.518222 67.811556l-5.518222 0.455111h-133.745778l192 192.056889a34.133333 34.133333 0 0 1-38.343111 55.182222l-5.176889-2.958222-4.721778-3.982222L659.911111 708.266667V841.955556a34.133333 34.133333 0 0 1-28.615111 33.678222L625.777778 876.088889a34.133333 34.133333 0 0 1-33.678222-28.615111L591.644444 841.955556V625.777778a34.133333 34.133333 0 0 1 28.615112-33.678222L625.777778 591.644444h216.177778z m-443.733334 0a34.133333 34.133333 0 0 1 33.678222 28.615112L432.355556 625.777778v216.177778a34.133333 34.133333 0 0 1-67.811556 5.518222L364.088889 841.955556v-133.745778l-192.056889 192a34.133333 34.133333 0 0 1-52.224-43.52l3.982222-4.721778L315.847111 659.911111H182.044444a34.133333 34.133333 0 0 1-33.678222-28.615111L147.911111 625.777778a34.133333 34.133333 0 0 1 28.615111-33.678222L182.044444 591.644444H398.222222zM167.310222 119.808l4.721778 3.982222L364.088889 315.847111V182.044444a34.133333 34.133333 0 0 1 28.615111-33.678222L398.222222 147.911111a34.133333 34.133333 0 0 1 33.678222 28.615111L432.355556 182.044444V398.222222a34.133333 34.133333 0 0 1-28.615112 33.678222L398.222222 432.355556H182.044444a34.133333 34.133333 0 0 1-5.518222-67.811556L182.044444 364.088889h133.802667L123.790222 172.032a34.133333 34.133333 0 0 1 43.52-52.224z m732.899556 3.982222a34.133333 34.133333 0 0 1 3.982222 43.52l-3.982222 4.721778L708.266667 364.088889H841.955556a34.133333 34.133333 0 0 1 33.678222 28.615111L876.088889 398.222222a34.133333 34.133333 0 0 1-28.615111 33.678222L841.955556 432.355556H625.777778a34.133333 34.133333 0 0 1-33.678222-28.615112L591.644444 398.222222V182.044444a34.133333 34.133333 0 0 1 67.811556-5.518222l0.455111 5.518222v133.802667l192.056889-192.056889a34.133333 34.133333 0 0 1 48.241778 0z"  ></path></symbol><symbol id="l7-icon-line" viewBox="0 0 1024 1024"><path d="M853.333333 56.888889a113.777778 113.777778 0 0 1 8.533334 227.271111L853.333333 284.444444c-19.000889 0-36.864-4.664889-52.622222-12.856888l-529.123555 529.066666a113.777778 113.777778 0 0 1-92.387556 166.115556L170.666667 967.111111a113.777778 113.777778 0 0 1-8.533334-227.271111L170.666667 739.555556c19.000889 0 36.864 4.664889 52.622222 12.856888l529.123555-529.066666a113.777778 113.777778 0 0 1 92.387556-166.115556L853.333333 56.888889zM170.666667 807.822222a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m682.666666-682.666666a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z"  ></path></symbol><symbol id="l7-icon-layer" viewBox="0 0 1024 1024"><path d="M767.089778 625.777778l180.167111 82.773333a34.133333 34.133333 0 0 1 4.892444 59.278222l-4.892444 2.730667-420.977778 193.422222a34.133333 34.133333 0 0 1-22.983111 1.991111l-5.575111-1.991111-420.977778-193.422222a34.133333 34.133333 0 0 1-4.892444-59.278222l4.892444-2.730667L256.853333 625.777778l81.749334 37.546666L172.771556 739.555556 512 895.374222 851.171556 739.555556l-165.831112-76.231112 81.749334-37.546666z m0-227.555556l180.167111 82.773334a34.133333 34.133333 0 0 1 4.892444 59.278222l-4.892444 2.730666-420.977778 193.422223a34.133333 34.133333 0 0 1-22.983111 1.991111l-5.575111-1.991111-420.977778-193.422223a34.133333 34.133333 0 0 1-4.892444-59.278222l4.892444-2.730666L256.853333 398.222222l81.749334 37.546667-165.831111 76.174222L512 667.818667l339.171556-155.875556-165.831112-76.174222L767.089778 398.222222zM497.720889 60.017778a34.133333 34.133333 0 0 1 28.558222 0l420.977778 193.422222a34.133333 34.133333 0 0 1 0 62.008889l-420.977778 193.422222a34.133333 34.133333 0 0 1-28.558222 0l-420.977778-193.422222a34.133333 34.133333 0 0 1 0-62.008889zM512 128.568889L172.771556 284.387556 512 440.263111l339.171556-155.875555L512 128.568889z"  ></path></symbol><symbol id="l7-icon-narrow" viewBox="0 0 1024 1024"><path d="M910.222222 512a34.133333 34.133333 0 0 1-34.133333 34.133333H147.911111a34.133333 34.133333 0 1 1 0-68.266666h728.177778a34.133333 34.133333 0 0 1 34.133333 34.133333z"  ></path></symbol><symbol id="l7-icon-fullscreen" viewBox="0 0 1024 1024"><path d="M645.176889 597.674667l4.721778 3.982222L841.955556 793.6l0.056888-133.688889a34.133333 34.133333 0 0 1 28.615112-33.678222L876.088889 625.777778a34.133333 34.133333 0 0 1 33.678222 28.615111L910.222222 659.911111v216.177778a34.133333 34.133333 0 0 1-28.615111 33.678222L876.088889 910.222222h-216.177778a34.133333 34.133333 0 0 1-5.518222-67.811555l5.518222-0.455111h133.745778l-192-192.056889a34.133333 34.133333 0 0 1 43.52-52.224z m-222.833778 3.982222a34.133333 34.133333 0 0 1 3.982222 43.52l-3.982222 4.721778L230.286222 841.955556H364.088889a34.133333 34.133333 0 0 1 33.678222 28.615111L398.222222 876.088889a34.133333 34.133333 0 0 1-28.615111 33.678222L364.088889 910.222222H147.911111a34.133333 34.133333 0 0 1-33.678222-28.615111L113.777778 876.088889v-216.177778a34.133333 34.133333 0 0 1 67.811555-5.518222l0.455111 5.518222-0.056888 133.745778 192.113777-192a34.133333 34.133333 0 0 1 48.241778 0zM364.088889 113.777778a34.133333 34.133333 0 0 1 5.518222 67.811555L364.088889 182.044444H230.343111l192 192.056889a34.133333 34.133333 0 0 1-43.52 52.224l-4.721778-3.982222-192.113777-192.056889L182.044444 364.088889a34.133333 34.133333 0 0 1-28.615111 33.678222L147.911111 398.222222a34.133333 34.133333 0 0 1-33.678222-28.615111L113.777778 364.088889V147.911111a34.133333 34.133333 0 0 1 28.615111-33.678222L147.911111 113.777778h216.177778z m512 0a34.133333 34.133333 0 0 1 33.678222 28.615111L910.222222 147.911111v216.177778a34.133333 34.133333 0 0 1-67.811555 5.518222L841.955556 364.088889l-0.056889-133.745778-192 192a34.133333 34.133333 0 0 1-52.224-43.52l3.982222-4.721778L793.6 182.044444H659.911111a34.133333 34.133333 0 0 1-33.678222-28.615111L625.777778 147.911111a34.133333 34.133333 0 0 1 28.615111-33.678222L659.911111 113.777778h216.177778z"  ></path></symbol><symbol id="l7-icon-hide" viewBox="0 0 1024 1024"><path d="M875.52 87.836444a34.133333 34.133333 0 0 1 7.281778 43.121778l-3.527111 5.006222-682.666667 796.444445a34.133333 34.133333 0 0 1-55.409778-39.367111l3.527111-5.006222 97.166223-113.379556C123.164444 697.969778 56.888889 582.940444 56.888889 512c0-113.777778 170.666667-341.333333 455.111111-341.333333a496.64 496.64 0 0 1 208.952889 45.112889l106.439111-124.188445a34.133333 34.133333 0 0 1 48.128-3.754667z m-38.684444 202.524445C921.031111 362.951111 967.111111 452.835556 967.111111 512c0 113.777778-170.666667 341.333333-455.111111 341.333333-50.631111 0-97.678222-7.224889-140.8-19.740444l50.232889-58.595556A417.393778 417.393778 0 0 0 512 785.066667c208.270222 0 386.844444-162.304 386.844444-273.066667 0-52.849778-40.675556-117.418667-105.813333-170.496l43.804445-51.2zM512 238.933333C303.729778 238.933333 125.155556 401.237333 125.155556 512c0 66.787556 64.853333 152.291556 162.133333 209.692444L377.173333 616.675556a170.666667 170.666667 0 0 1 217.713778-253.895112l78.620445-91.704888A432.924444 432.924444 0 0 0 512 238.933333z m166.684444 236.088889a170.666667 170.666667 0 0 1-177.664 207.303111l177.607112-207.303111zM512 409.6a102.4 102.4 0 0 0-88.746667 153.486222L548.864 416.426667A102.172444 102.172444 0 0 0 512 409.6z"  ></path></symbol><symbol id="l7-icon-rectangle" viewBox="0 0 1024 1024"><path d="M170.666667 56.888889a113.777778 113.777778 0 0 1 108.544 79.644444H853.333333a34.133333 34.133333 0 0 1 33.678223 28.615111L887.466667 170.666667v574.122666a113.777778 113.777778 0 1 1-142.677334 142.734223L170.666667 887.466667a34.133333 34.133333 0 0 1-33.678223-28.615111L136.533333 853.333333V279.210667A113.777778 113.777778 0 0 1 170.666667 56.888889z m682.666666 750.933333a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z m-34.133333-603.022222H279.210667a114.062222 114.062222 0 0 1-74.353778 74.410667L204.8 819.2h539.989333a114.062222 114.062222 0 0 1 74.410667-74.410667V204.8zM170.666667 125.155556a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z"  ></path></symbol><symbol id="l7-icon-ranging" viewBox="0 0 1024 1024"><path d="M723.171556 50.403556l250.424888 250.424888a31.061333 31.061333 0 0 1 0 43.918223L344.746667 973.596444a31.061333 31.061333 0 0 1-43.918223 0L50.403556 723.171556a31.061333 31.061333 0 0 1 0-43.918223L679.253333 50.403556a31.061333 31.061333 0 0 1 43.918223 0z m-21.959112 74.524444l-39.765333 39.822222 98.986667 98.872889a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-63.886222 63.886222 62.179556 62.122667a34.133333 34.133333 0 0 1-44.088889 51.882667L563.2 387.242667 501.077333 325.063111 437.191111 388.949333l98.986667 98.929778a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-63.886222 63.886222L387.242667 563.2a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.584-62.122667-62.179556-63.886222 63.886222 98.986667 98.929778a34.133333 34.133333 0 0 1-44.088889 51.882667l-4.209778-3.640889-98.929778-98.929778-39.765333 39.822222 197.802667 197.745778 576.284444-576.284444-197.802667-197.745778z"  ></path></symbol><symbol id="l7-icon-reposition" viewBox="0 0 1024 1024"><path d="M512 56.888889a34.133333 34.133333 0 0 1 34.133333 34.133333v24.177778A398.336 398.336 0 0 1 908.856889 477.866667h24.177778a34.133333 34.133333 0 0 1 0 68.266666h-24.177778A398.336 398.336 0 0 1 546.133333 908.856889L546.133333 932.977778a34.133333 34.133333 0 0 1-68.266666 0v-24.177778A398.336 398.336 0 0 1 115.2 546.133333L91.022222 546.133333a34.133333 34.133333 0 1 1 0-68.266666h24.177778A398.336 398.336 0 0 1 477.866667 115.2V91.022222A34.133333 34.133333 0 0 1 512 56.888889z m34.190222 126.862222L546.133333 193.422222a34.133333 34.133333 0 1 1-68.266666 0v-9.671111A330.069333 330.069333 0 0 0 183.751111 477.866667h9.671111a34.133333 34.133333 0 1 1 0 68.266666l-9.671111 0.056889A330.069333 330.069333 0 0 0 477.866667 840.248889V830.577778a34.133333 34.133333 0 0 1 68.266666 0l0.056889 9.671111A330.069333 330.069333 0 0 0 840.248889 546.133333L830.577778 546.133333a34.133333 34.133333 0 0 1 0-68.266666h9.671111A330.069333 330.069333 0 0 0 546.133333 183.751111zM512 341.333333a170.666667 170.666667 0 1 1 0 341.333334 170.666667 170.666667 0 0 1 0-341.333334z m0 68.266667a102.4 102.4 0 1 0 0 204.8 102.4 102.4 0 0 0 0-204.8z"  ></path></symbol><symbol id="l7-icon-round" viewBox="0 0 1024 1024"><path d="M512 56.888889a455.111111 455.111111 0 0 1 391.395556 687.502222 113.777778 113.777778 0 0 1-159.061334 158.890667A455.111111 455.111111 0 0 1 120.604444 279.608889 113.777778 113.777778 0 0 1 279.608889 120.604444 452.835556 452.835556 0 0 1 512 56.888889z m0 68.266667a384.910222 384.910222 0 0 0-191.715556 50.744888A113.777778 113.777778 0 0 1 175.957333 320.284444a386.844444 386.844444 0 0 0 527.815111 527.758223 113.777778 113.777778 0 0 1 144.270223-144.440889A386.844444 386.844444 0 0 0 512 125.155556z m299.406222 640.739555a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222zM212.593778 167.082667a45.511111 45.511111 0 1 0 0 91.022222 45.511111 45.511111 0 0 0 0-91.022222z"  ></path></symbol><symbol id="l7-icon-guanbi" viewBox="0 0 1024 1024"><path d="M576 512l277.333333 277.333333-64 64-277.333333-277.333333L234.666667 853.333333 170.666667 789.333333l277.333333-277.333333L170.666667 234.666667 234.666667 170.666667l277.333333 277.333333L789.333333 170.666667 853.333333 234.666667 576 512z"  ></path></symbol></svg>',function(e){try{var t,r=(t=(t=document.getElementsByTagName("script"))[t.length-1]).getAttribute("data-injectcss");if(!(t=t.getAttribute("data-disable-injectsvg"))){var n,i,a,o,s;if(r&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(t){console&&console.log(t)}}n=function(){var t,r=document.createElement("div");r.innerHTML=e._iconfont_svg_string_3580659,(r=r.getElementsByTagName("svg")[0])&&(r.setAttribute("aria-hidden","true"),r.style.position="absolute",r.style.width=0,r.style.height=0,r.style.overflow="hidden",r=r,(t=document.body).firstChild?function(e,t){t.parentNode.insertBefore(e,t)}(r,t.firstChild):t.appendChild(r))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(n,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),n()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(a=n,o=e.document,s=!1,function e(){try{o.documentElement.doScroll("left")}catch(t){return void setTimeout(e,50)}u()}(),o.onreadystatechange=function(){"complete"==o.readyState&&(o.onreadystatechange=null,u())})}function u(){s||(s=!0,a())}}catch(e){}}(window);zD(".l7-marker-container {\r\n  position: absolute;\r\n  width: 100%;\r\n  height: 100%;\r\n  overflow: hidden;\r\n  pointer-events: none;\r\n  z-index: 1;\r\n}\r\n.l7-marker-container > *{\r\n  pointer-events: auto;\r\n}\r\n.l7-marker {\r\n  position: absolute !important;\r\n  top: 0;\r\n  left: 0;\r\n  z-index: 5;\r\n  cursor: pointer;\r\n}\r\n.l7-marker-cluster {\r\n  width: 40px;\r\n  height: 40px;\r\n  background-color: rgba(181, 226, 140, 0.6);\r\n  background-clip: padding-box;\r\n  border-radius: 20px;\r\n}\r\n.l7-marker-cluster div {\r\n  width: 30px;\r\n  height: 30px;\r\n  margin-top: 5px;\r\n  margin-left: 5px;\r\n  font: 12px 'Helvetica Neue', Arial, Helvetica, sans-serif;\r\n  text-align: center;\r\n  background-color: rgba(110, 204, 57, 0.6);\r\n  border-radius: 15px;\r\n}\r\n.l7-marker-cluster span {\r\n  line-height: 30px;\r\n}\r\n.l7-touch .l7-control-attribution,\r\n.l7-touch .l7-control-layers,\r\n.l7-touch .l7-bar {\r\n  box-shadow: none;\r\n}\r\n.l7-touch .l7-control-layers,\r\n.l7-touch .l7-bar {\r\n  background-clip: padding-box;\r\n  border: 2px solid rgba(0, 0, 0, 0.2);\r\n}\r\n.mapboxgl-ctrl-logo,\r\n.amap-logo {\r\n  display: none !important;\r\n}\r\n.l7-select-box {\r\n  border: 3px dashed gray;\r\n  border-radius: 2px;\r\n  position: absolute;\r\n  z-index: 1000;\r\n  box-sizing: border-box;\r\n}\r\n.l7-control-container {\r\n  font: 12px/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;\r\n}\r\n.l7-control-container .l7-control {\r\n  position: relative;\r\n  z-index: 800;\r\n  float: left;\r\n  clear: both;\r\n  color: #595959;\r\n  font-size: 12px;\r\n  pointer-events: visiblePainted;\r\n  /* IE 9-10 doesn't have auto */\r\n  pointer-events: auto;\r\n}\r\n.l7-control-container .l7-control.l7-control--hide {\r\n  display: none;\r\n}\r\n.l7-control-container .l7-top {\r\n  top: 0;\r\n  display: flex;\r\n  position: absolute;\r\n  z-index: 1000;\r\n  pointer-events: none;\r\n}\r\n.l7-control-container .l7-top .l7-control:not(.l7-control--hide) {\r\n  margin-top: 8px;\r\n}\r\n.l7-control-container .l7-right {\r\n  right: 0;\r\n  display: flex;\r\n  position: absolute;\r\n  z-index: 1000;\r\n  pointer-events: none;\r\n}\r\n.l7-control-container .l7-right .l7-control:not(.l7-control--hide) {\r\n  margin-right: 8px;\r\n}\r\n.l7-control-container .l7-bottom {\r\n  bottom: 0;\r\n  display: flex;\r\n  position: absolute;\r\n  z-index: 1000;\r\n  pointer-events: none;\r\n}\r\n.l7-control-container .l7-bottom .l7-control:not(.l7-control--hide) {\r\n  margin-bottom: 8px;\r\n}\r\n.l7-control-container .l7-left {\r\n  left: 0;\r\n  display: flex;\r\n  position: absolute;\r\n  z-index: 1000;\r\n  pointer-events: none;\r\n}\r\n.l7-control-container .l7-left .l7-control:not(.l7-control--hide) {\r\n  margin-left: 8px;\r\n}\r\n.l7-control-container .l7-center {\r\n  position: absolute;\r\n  display: flex;\r\n  justify-content: center;\r\n}\r\n.l7-control-container .l7-center.l7-top,\r\n.l7-control-container .l7-center.l7-bottom {\r\n  width: 100%;\r\n}\r\n.l7-control-container .l7-center.l7-left,\r\n.l7-control-container .l7-center.l7-right {\r\n  height: 100%;\r\n}\r\n.l7-control-container .l7-center .l7-control {\r\n  margin-right: 8px;\r\n  margin-bottom: 8px;\r\n}\r\n.l7-control-container .l7-row {\r\n  flex-direction: row;\r\n}\r\n.l7-control-container .l7-row.l7-top {\r\n  align-items: flex-start;\r\n}\r\n.l7-control-container .l7-row.l7-bottom {\r\n  align-items: flex-end;\r\n}\r\n.l7-control-container .l7-column {\r\n  flex-direction: column;\r\n}\r\n.l7-control-container .l7-column.l7-left {\r\n  align-items: flex-start;\r\n}\r\n.l7-control-container .l7-column.l7-right {\r\n  align-items: flex-end;\r\n}\r\n.l7-button-control {\r\n  min-width: 28px;\r\n  height: 28px;\r\n  background-color: #fff;\r\n  border-width: 0;\r\n  border-radius: 2px;\r\n  outline: 0;\r\n  cursor: pointer;\r\n  transition: all 0.2s;\r\n  display: flex;\r\n  justify-content: center;\r\n  align-items: center;\r\n  padding: 0 6px;\r\n  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\r\n  line-height: 16px;\r\n}\r\n.l7-button-control .l7-iconfont {\r\n  fill: #595959;\r\n  color: #595959;\r\n  width: 16px;\r\n  height: 16px;\r\n}\r\n.l7-button-control.l7-button-control--row {\r\n  padding: 0 16px 0 13px;\r\n}\r\n.l7-button-control.l7-button-control--row * + .l7-button-control__text {\r\n  margin-left: 8px;\r\n}\r\n.l7-button-control.l7-button-control--column {\r\n  height: 44px;\r\n  flex-direction: column;\r\n}\r\n.l7-button-control.l7-button-control--column .l7-iconfont {\r\n  margin-top: 3px;\r\n}\r\n.l7-button-control.l7-button-control--column .l7-button-control__text {\r\n  margin-top: 3px;\r\n  font-size: 10px;\r\n  transform: scale(0.83333);\r\n}\r\n.l7-button-control:not(:disabled):hover {\r\n  background-color: #f3f3f3;\r\n}\r\n.l7-button-control:not(:disabled):active {\r\n  background-color: #f3f3f3;\r\n}\r\n.l7-button-control:disabled {\r\n  background-color: #fafafa;\r\n  color: #bdbdbd;\r\n  cursor: not-allowed;\r\n}\r\n.l7-button-control:disabled .l7-iconfont {\r\n  fill: #bdbdbd;\r\n  color: #bdbdbd;\r\n}\r\n.l7-button-control:disabled:hover {\r\n  background-color: #fafafa;\r\n}\r\n.l7-button-control:disabled:active {\r\n  background-color: #fafafa;\r\n}\r\n.l7-popper {\r\n  position: absolute;\r\n  display: flex;\r\n  justify-content: center;\r\n  align-items: center;\r\n  z-index: 5;\r\n  color: #595959;\r\n}\r\n.l7-popper.l7-popper-hide {\r\n  display: none;\r\n}\r\n.l7-popper .l7-popper-content {\r\n  min-height: 28px;\r\n  background: #fff;\r\n  border-radius: 2px;\r\n  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\r\n}\r\n.l7-popper .l7-popper-arrow {\r\n  width: 0;\r\n  height: 0;\r\n  border-width: 4px;\r\n  border-style: solid;\r\n  border-top-color: transparent;\r\n  border-bottom-color: transparent;\r\n  border-left-color: transparent;\r\n  border-right-color: transparent;\r\n  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\r\n}\r\n.l7-popper.l7-popper-left {\r\n  flex-direction: row;\r\n}\r\n.l7-popper.l7-popper-left .l7-popper-arrow {\r\n  border-left-color: #fff;\r\n  margin: 10px 0;\r\n}\r\n.l7-popper.l7-popper-right {\r\n  flex-direction: row-reverse;\r\n}\r\n.l7-popper.l7-popper-right .l7-popper-arrow {\r\n  border-right-color: #fff;\r\n  margin: 10px 0;\r\n}\r\n.l7-popper.l7-popper-top {\r\n  flex-direction: column;\r\n}\r\n.l7-popper.l7-popper-top .l7-popper-arrow {\r\n  border-top-color: #fff;\r\n  margin: 0 10px;\r\n}\r\n.l7-popper.l7-popper-bottom {\r\n  flex-direction: column-reverse;\r\n}\r\n.l7-popper.l7-popper-bottom .l7-popper-arrow {\r\n  border-bottom-color: #fff;\r\n  margin: 0 10px;\r\n}\r\n.l7-popper.l7-popper-start {\r\n  align-items: flex-start;\r\n}\r\n.l7-popper.l7-popper-end {\r\n  align-items: flex-end;\r\n}\r\n.l7-select-control--normal {\r\n  padding: 4px 0;\r\n}\r\n.l7-select-control--normal .l7-select-control-item {\r\n  height: 24px;\r\n  line-height: 24px;\r\n  display: flex;\r\n  align-items: center;\r\n  padding: 0 16px;\r\n  font-size: 12px;\r\n}\r\n.l7-select-control--normal .l7-select-control-item > * + * {\r\n  margin-left: 6px;\r\n}\r\n.l7-select-control--normal .l7-select-control-item input[type='checkbox'] {\r\n  height: 14px;\r\n  width: 14px;\r\n}\r\n.l7-select-control--normal .l7-select-control-item:hover {\r\n  background-color: #f3f3f3;\r\n}\r\n.l7-select-control--image {\r\n  padding: 12px 12px 0 12px;\r\n  width: 474px;\r\n  height: 320px;\r\n  overflow: auto;\r\n  display: flex;\r\n  flex-wrap: wrap;\r\n  box-sizing: border-box;\r\n  align-items: flex-start;\r\n}\r\n.l7-select-control--image .l7-select-control-item {\r\n  margin-right: 12px;\r\n  border-radius: 2px;\r\n  overflow: hidden;\r\n  border: 1px solid #fff;\r\n  box-sizing: content-box;\r\n  width: calc((100% - 36px) / 3);\r\n  display: flex;\r\n  flex-direction: column;\r\n  justify-content: center;\r\n  margin-bottom: 12px;\r\n  position: relative;\r\n  font-size: 12px;\r\n}\r\n.l7-select-control--image .l7-select-control-item img {\r\n  width: 142px;\r\n  height: 80px;\r\n}\r\n.l7-select-control--image .l7-select-control-item input[type='checkbox'] {\r\n  position: absolute;\r\n  right: 0;\r\n  top: 0;\r\n}\r\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row {\r\n  display: flex;\r\n  justify-content: center;\r\n  align-items: center;\r\n  line-height: 26px;\r\n}\r\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row > * + * {\r\n  margin-left: 8px;\r\n}\r\n.l7-select-control--image .l7-select-control-item.l7-select-control-item-active {\r\n  border-color: #0370fe;\r\n}\r\n.l7-select-control--image .l7-select-control-item:nth-child(3n) {\r\n  margin-right: 0;\r\n}\r\n.l7-select-control-item {\r\n  cursor: pointer;\r\n}\r\n.l7-select-control-item input[type='checkbox'] {\r\n  margin: 0;\r\n  cursor: pointer;\r\n}\r\n.l7-select-control--multiple .l7-select-control-item:hover {\r\n  background-color: transparent;\r\n}\r\n.l7-control-logo {\r\n  width: 89px;\r\n  height: 16px;\r\n  user-select: none;\r\n}\r\n.l7-control-logo img {\r\n  height: 100%;\r\n  width: 100%;\r\n}\r\n.l7-control-logo .l7-control-logo-link {\r\n  display: block;\r\n  cursor: pointer;\r\n}\r\n.l7-control-logo .l7-control-logo-link img {\r\n  cursor: pointer;\r\n}\r\n.l7-control-mouse-location {\r\n  background-color: #fff;\r\n  border-radius: 2px;\r\n  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\r\n  padding: 2px 4px;\r\n  min-width: 130px;\r\n}\r\n.l7-control-zoom {\r\n  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\r\n  border-radius: 2px;\r\n  overflow: hidden;\r\n}\r\n.l7-control-zoom .l7-button-control {\r\n  box-shadow: 0 0 0;\r\n  border-radius: 0;\r\n  font-size: 16px;\r\n}\r\n.l7-control-zoom .l7-button-control .l7-iconfont {\r\n  width: 14px;\r\n  height: 14px;\r\n}\r\n.l7-control-zoom .l7-button-control:first-child {\r\n  border-bottom: 1px solid #f0f0f0;\r\n}\r\n.l7-control-scale {\r\n  display: flex;\r\n  flex-direction: column;\r\n}\r\n.l7-control-scale .l7-control-scale-line {\r\n  box-sizing: border-box;\r\n  padding: 2px 5px 1px;\r\n  overflow: hidden;\r\n  color: #595959;\r\n  font-size: 10px;\r\n  line-height: 1.1;\r\n  white-space: nowrap;\r\n  background: #fff;\r\n  border: 2px solid #000;\r\n  border-top: 0;\r\n  transition: width 0.1s;\r\n}\r\n.l7-control-scale .l7-control-scale-line + .l7-control-scale .l7-control-scale-line {\r\n  margin-top: -2px;\r\n  border-top: 2px solid #777;\r\n  border-bottom: none;\r\n}\r\n.l7-right .l7-control-scale {\r\n  display: flex;\r\n  align-items: flex-end;\r\n}\r\n.l7-right .l7-control-scale .l7-control-scale-line {\r\n  text-align: right;\r\n}\r\n.l7-popup {\r\n  position: absolute;\r\n  top: 0;\r\n  left: 0;\r\n  z-index: 5;\r\n  display: -webkit-flex;\r\n  display: flex;\r\n  will-change: transform;\r\n  pointer-events: none;\r\n}\r\n.l7-popup.l7-popup-hide {\r\n  display: none;\r\n}\r\n.l7-popup .l7-popup-content {\r\n  position: relative;\r\n  padding: 16px;\r\n  font-size: 14px;\r\n  background: #fff;\r\n  border-radius: 3px;\r\n  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\r\n}\r\n.l7-popup .l7-popup-content .l7-popup-content__title {\r\n  margin-bottom: 8px;\r\n  font-weight: bold;\r\n}\r\n.l7-popup .l7-popup-content .l7-popup-close-button,\r\n.l7-popup .l7-popup-content .l7-popup-content__title,\r\n.l7-popup .l7-popup-content .l7-popup-content__panel {\r\n  white-space: normal;\r\n  user-select: text;\r\n  pointer-events: initial;\r\n}\r\n.l7-popup .l7-popup-content .l7-popup-close-button {\r\n  position: absolute;\r\n  top: 0;\r\n  right: 0;\r\n  width: 18px;\r\n  height: 18px;\r\n  padding: 0;\r\n  font-size: 14px;\r\n  line-height: 18px;\r\n  text-align: center;\r\n  background-color: transparent;\r\n  border: 0;\r\n  border-radius: 0 3px 0 0;\r\n  cursor: pointer;\r\n}\r\n.l7-popup .l7-popup-tip {\r\n  position: relative;\r\n  z-index: 1;\r\n  width: 0;\r\n  height: 0;\r\n  border: 10px solid transparent;\r\n}\r\n.l7-popup.l7-popup-anchor-bottom,\r\n.l7-popup.l7-popup-anchor-bottom-left,\r\n.l7-popup.l7-popup-anchor-bottom-right {\r\n  -webkit-flex-direction: column-reverse;\r\n  flex-direction: column-reverse;\r\n}\r\n.l7-popup.l7-popup-anchor-bottom .l7-popup-tip,\r\n.l7-popup.l7-popup-anchor-bottom-left .l7-popup-tip,\r\n.l7-popup.l7-popup-anchor-bottom-right .l7-popup-tip {\r\n  bottom: 1px;\r\n}\r\n.l7-popup.l7-popup-anchor-top,\r\n.l7-popup.l7-popup-anchor-top-left,\r\n.l7-popup.l7-popup-anchor-top-right {\r\n  -webkit-flex-direction: column;\r\n  flex-direction: column;\r\n}\r\n.l7-popup.l7-popup-anchor-top .l7-popup-tip,\r\n.l7-popup.l7-popup-anchor-top-left .l7-popup-tip,\r\n.l7-popup.l7-popup-anchor-top-right .l7-popup-tip {\r\n  top: 1px;\r\n}\r\n.l7-popup.l7-popup-anchor-left {\r\n  -webkit-flex-direction: row;\r\n  flex-direction: row;\r\n}\r\n.l7-popup.l7-popup-anchor-right {\r\n  -webkit-flex-direction: row-reverse;\r\n  flex-direction: row-reverse;\r\n}\r\n.l7-popup-anchor-top .l7-popup-tip {\r\n  position: relative;\r\n  -webkit-align-self: center;\r\n  align-self: center;\r\n  border-top: none;\r\n  border-bottom-color: #fff;\r\n}\r\n.l7-popup-anchor-top-left .l7-popup-tip {\r\n  -webkit-align-self: flex-start;\r\n  align-self: flex-start;\r\n  border-top: none;\r\n  border-bottom-color: #fff;\r\n  border-left: none;\r\n}\r\n.l7-popup-anchor-top-right .l7-popup-tip {\r\n  -webkit-align-self: flex-end;\r\n  align-self: flex-end;\r\n  border-top: none;\r\n  border-right: none;\r\n  border-bottom-color: #fff;\r\n}\r\n.l7-popup-anchor-bottom .l7-popup-tip {\r\n  -webkit-align-self: center;\r\n  align-self: center;\r\n  border-top-color: #fff;\r\n  border-bottom: none;\r\n}\r\n.l7-popup-anchor-bottom-left .l7-popup-tip {\r\n  -webkit-align-self: flex-start;\r\n  align-self: flex-start;\r\n  border-top-color: #fff;\r\n  border-bottom: none;\r\n  border-left: none;\r\n}\r\n.l7-popup-anchor-bottom-right .l7-popup-tip {\r\n  -webkit-align-self: flex-end;\r\n  align-self: flex-end;\r\n  border-top-color: #fff;\r\n  border-right: none;\r\n  border-bottom: none;\r\n}\r\n.l7-popup-anchor-left .l7-popup-tip {\r\n  -webkit-align-self: center;\r\n  align-self: center;\r\n  border-right-color: #fff;\r\n  border-left: none;\r\n}\r\n.l7-popup-anchor-right .l7-popup-tip {\r\n  right: 1px;\r\n  -webkit-align-self: center;\r\n  align-self: center;\r\n  border-right: none;\r\n  border-left-color: #fff;\r\n}\r\n.l7-popup-anchor-top-left .l7-popup-content {\r\n  border-top-left-radius: 0;\r\n}\r\n.l7-popup-anchor-top-right .l7-popup-content {\r\n  border-top-right-radius: 0;\r\n}\r\n.l7-popup-anchor-bottom-left .l7-popup-content {\r\n  border-bottom-left-radius: 0;\r\n}\r\n.l7-popup-anchor-bottom-right .l7-popup-content {\r\n  border-bottom-right-radius: 0;\r\n}\r\n.l7-popup-track-pointer {\r\n  display: none;\r\n}\r\n.l7-popup-track-pointer * {\r\n  user-select: none;\r\n  pointer-events: none;\r\n}\r\n.l7-map:hover .l7-popup-track-pointer {\r\n  display: flex;\r\n}\r\n.l7-map:active .l7-popup-track-pointer {\r\n  display: none;\r\n}\r\n.l7-layer-popup__row {\r\n  font-size: 12px;\r\n}\r\n.l7-layer-popup__row + .l7-layer-popup__row {\r\n  margin-top: 4px;\r\n}\r\n");var vB=function(e){f(r,e);var t=x(r);function r(e){var i;return u(this,r),h(_(i=t.call(this)),"controlOption",void 0),h(_(i),"container",void 0),h(_(i),"isShow",void 0),h(_(i),"sceneContainer",void 0),h(_(i),"scene",void 0),h(_(i),"mapsService",void 0),h(_(i),"renderService",void 0),h(_(i),"layerService",void 0),h(_(i),"controlService",void 0),h(_(i),"configService",void 0),r.controlCount++,i.controlOption=n(n({},i.getDefault(e)),e||{}),i}return l(r,[{key:"getOptions",value:function(){return this.controlOption}},{key:"setOptions",value:function(e){var t=this.getDefault(e);Object.entries(e).forEach((function(r){var n=A(r,2),i=n[0];void 0===n[1]&&(e[i]=t[i])})),"position"in e&&this.setPosition(e.position),"className"in e&&this.setClassName(e.className),"style"in e&&this.setStyle(e.style),this.controlOption=n(n({},this.controlOption),e)}},{key:"addTo",value:function(e){this.mapsService=e.get(ba.IMapService),this.renderService=e.get(ba.IRendererService),this.layerService=e.get(ba.ILayerService),this.controlService=e.get(ba.IControlService),this.configService=e.get(ba.IGlobalConfigService),this.scene=e.get(ba.ISceneService),this.sceneContainer=e,this.isShow=!0,this.container=this.onAdd(),Ky(this.container,"l7-control");var t=this.controlOption,r=t.className,n=t.style;return r&&this.setClassName(r),n&&this.setStyle(n),this.insertContainer(),this.emit("add",this),this}},{key:"remove",value:function(){if(!this.mapsService)return this;qy(this.container),this.onRemove(),this.emit("remove",this)}},{key:"onAdd",value:function(){return Zy("div")}},{key:"onRemove",value:function(){}},{key:"show",value:function(){Qy(this.container,"l7-control--hide"),this.isShow=!0,this.emit("show",this)}},{key:"hide",value:function(){Ky(this.container,"l7-control--hide"),this.isShow=!1,this.emit("hide",this)}},{key:"getDefault",value:function(e){return{position:bk.TOPRIGHT,name:"".concat(r.controlCount)}}},{key:"getContainer",value:function(){return this.container}},{key:"getIsShow",value:function(){return this.isShow}},{key:"_refocusOnMap",value:function(e){if(this.mapsService&&e&&e.screenX>0&&e.screenY>0){var t=this.mapsService.getContainer();null!==t&&t.focus()}}},{key:"setPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bk.TOPLEFT,t=this.controlService;return t&&t.removeControl(this),this.controlOption.position=e,t&&t.addControl(this,this.sceneContainer),this}},{key:"setClassName",value:function(e){var t=this.container,r=this.controlOption.className;r&&Qy(t,r),e&&Ky(t,e)}},{key:"setStyle",value:function(e){var t=this.container;e?t.setAttribute("style",e):t.removeAttribute("style")}},{key:"insertContainer",value:function(){var e=this.controlOption.position,t=this.container;if(e instanceof Element)e.appendChild(t);else{var r=this.controlService.controlCorners[e];["bottomleft","bottomright","righttop","rightbottom"].includes(e)?r.insertBefore(t,r.firstChild):r.appendChild(t)}}},{key:"checkUpdateOption",value:function(e,t){return t.some((function(t){return t in e}))}}]),r}(D);h(vB,"controlCount",0);var gB=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"isDisable",!1),h(_(e),"button",void 0),h(_(e),"buttonText",void 0),h(_(e),"buttonIcon",void 0),e}return l(r,[{key:"setIsDisable",value:function(e){var t,r;(this.isDisable=e,e)?null===(t=this.button)||void 0===t||t.setAttribute("disabled","true"):null===(r=this.button)||void 0===r||r.removeAttribute("disabled")}},{key:"createButton",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Zy("button","l7-button-control ".concat(e))}},{key:"onAdd",value:function(){this.button=this.createButton(),this.isDisable=!1;var e=this.controlOption,t=e.title,r=e.btnText,n=e.btnIcon;return this.setBtnTitle(t),this.setBtnText(r),this.setBtnIcon(n),this.button}},{key:"onRemove",value:function(){this.button=this.buttonIcon=this.buttonText=void 0,this.isDisable=!1}},{key:"setOptions",value:function(e){var t=e.title,n=e.btnText,i=e.btnIcon;this.checkUpdateOption(e,["title"])&&this.setBtnTitle(t),this.checkUpdateOption(e,["btnIcon"])&&this.setBtnIcon(i),this.checkUpdateOption(e,["btnText"])&&this.setBtnText(n),E(p(r.prototype),"setOptions",this).call(this,e)}},{key:"setBtnTitle",value:function(e){var t;null===(t=this.button)||void 0===t||t.setAttribute("title",null!=e?e:"")}},{key:"setBtnIcon",value:function(e){if(this.buttonIcon&&qy(this.buttonIcon),e){var t,r,n,i=null===(t=this.button)||void 0===t?void 0:t.firstChild;if(i)null===(r=this.button)||void 0===r||r.insertBefore(e,i);else null===(n=this.button)||void 0===n||n.appendChild(e);this.buttonIcon=e}}},{key:"setBtnText",value:function(e){if(this.button)if(Qy(this.button,"l7-button-control--row"),Qy(this.button,"l7-button-control--column"),e){var t,r=this.buttonText;if(!r)r=Zy("div","l7-button-control__text"),null===(t=this.button)||void 0===t||t.appendChild(r),this.buttonText=r;r.innerText=e,Ky(this.button,this.controlOption.vertical?"l7-button-control--column":"l7-button-control--row")}else!e&&this.buttonText&&(qy(this.buttonText),this.buttonText=void 0)}}]),r}(vB),mB=function(e){f(r,e);var t=x(r);function r(e,n){var i;return u(this,r),h(_(i=t.call(this)),"popperDOM",void 0),h(_(i),"contentDOM",void 0),h(_(i),"button",void 0),h(_(i),"option",void 0),h(_(i),"isShow",!1),h(_(i),"content",void 0),h(_(i),"timeout",null),h(_(i),"show",(function(){return i.isShow||!i.contentDOM.innerHTML||(i.resetPopperPosition(),Qy(i.popperDOM,"l7-popper-hide"),i.isShow=!0,i.option.unique&&r.conflictPopperList.forEach((function(e){e!==_(i)&&e.isShow&&e.hide()})),i.emit("show")),_(i)})),h(_(i),"hide",(function(){return i.isShow?(Ky(i.popperDOM,"l7-popper-hide"),i.isShow=!1,i.emit("hide"),_(i)):_(i)})),h(_(i),"setHideTimeout",(function(){i.timeout||(i.timeout=window.setTimeout((function(){i.isShow&&(i.hide(),i.timeout=null)}),300))})),h(_(i),"clearHideTimeout",(function(){i.timeout&&(window.clearTimeout(i.timeout),i.timeout=null)})),h(_(i),"onBtnClick",(function(){i.isShow?i.hide():i.show()})),h(_(i),"onBtnMouseLeave",(function(){i.setHideTimeout()})),h(_(i),"onBtnMouseMove",(function(){i.clearHideTimeout(),i.isShow||i.show()})),i.button=e,i.option=n,i.init(),n.unique&&r.conflictPopperList.push(_(i)),i}return l(r,[{key:"buttonRect",get:function(){return this.button.getBoundingClientRect()}},{key:"getPopperDOM",value:function(){return this.popperDOM}},{key:"getIsShow",value:function(){return this.isShow}},{key:"getContent",value:function(){return this.content}},{key:"setContent",value:function(e){"string"==typeof e?this.contentDOM.innerHTML=e:e instanceof HTMLElement&&(h_(this.contentDOM),this.contentDOM.appendChild(e)),this.content=e}},{key:"init",value:function(){var e=this.option.trigger;this.popperDOM=this.createPopper(),"click"===e?this.button.addEventListener("click",this.onBtnClick):(this.button.addEventListener("mousemove",this.onBtnMouseMove),this.button.addEventListener("mouseleave",this.onBtnMouseLeave),this.popperDOM.addEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.addEventListener("mouseleave",this.onBtnMouseLeave))}},{key:"destroy",value:function(){this.button.removeEventListener("click",this.onBtnClick),this.button.removeEventListener("mousemove",this.onBtnMouseMove),this.button.removeEventListener("mousemove",this.onBtnMouseLeave),this.popperDOM.removeEventListener("mousemove",this.onBtnMouseMove),this.popperDOM.removeEventListener("mouseleave",this.onBtnMouseLeave),qy(this.popperDOM)}},{key:"resetPopperPosition",value:function(){var e={},t=this.option,r=t.container,n=t.offset,i=void 0===n?[0,0]:n,a=t.placement,o=A(i,2),s=o[0],u=o[1],c=this.button.getBoundingClientRect(),l=c_(c,r.getBoundingClientRect()),h=l.left,f=l.right,p=l.top,d=l.bottom,v=!1,g=!1;/^(left|right)/.test(a)?(a.includes("left")?e.right="".concat(c.width+f,"px"):a.includes("right")&&(e.left="".concat(c.width+h,"px")),a.includes("start")?e.top="".concat(p,"px"):a.includes("end")?e.bottom="".concat(d,"px"):(e.top="".concat(p+c.height/2,"px"),g=!0,e.transform="translate(".concat(s,"px, calc(").concat(u,"px - 50%))"))):/^(top|bottom)/.test(a)&&(a.includes("top")?e.bottom="".concat(c.height+d,"px"):a.includes("bottom")&&(e.top="".concat(c.height+p,"px")),a.includes("start")?e.left="".concat(h,"px"):a.includes("end")?e.right="".concat(f,"px"):(e.left="".concat(h+c.width/2,"px"),v=!0,e.transform="translate(calc(".concat(s,"px - 50%), ").concat(u,"px)"))),e.transform="translate(calc(".concat(s,"px - ").concat(v?"50%":"0%","), calc(").concat(u,"px - ").concat(g?"50%":"0%",")");var m=a.split("-");m.length&&Ky(this.popperDOM,m.map((function(e){return"l7-popper-".concat(e)})).join(" ")),o_(this.popperDOM,u_(e))}},{key:"createPopper",value:function(){var e=this.option,t=e.container,r=e.className,n=void 0===r?"":r,i=e.content,a=Zy("div","l7-popper l7-popper-hide ".concat(n)),o=Zy("div","l7-popper-content"),s=Zy("div","l7-popper-arrow");return a.appendChild(o),a.appendChild(s),t.appendChild(a),this.popperDOM=a,this.contentDOM=o,i&&this.setContent(i),a}}]),r}(F);h(mB,"conflictPopperList",[]);var yB={topleft:"right-start",topcenter:"bottom",topright:"left-start",bottomleft:"right-end",bottomcenter:"top",bottomright:"left-end",lefttop:"bottom-start",leftcenter:"right",leftbottom:"top-start",righttop:"bottom-end",rightcenter:"left",rightbottom:"top-end"},_B=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"popper",void 0),e}return l(r,[{key:"getPopper",value:function(){return this.popper}},{key:"hide",value:function(){this.popper.hide(),E(p(r.prototype),"hide",this).call(this)}},{key:"getDefault",value:function(e){var t,i=E(p(r.prototype),"getDefault",this).call(this,e),a=null!==(t=null==e?void 0:e.position)&&void 0!==t?t:i.position;return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{popperPlacement:a instanceof Element?"bottom":yB[a],popperTrigger:"click"})}},{key:"onAdd",value:function(){var e=E(p(r.prototype),"onAdd",this).call(this);return this.initPopper(),e}},{key:"onRemove",value:function(){this.popper.destroy()}},{key:"initPopper",value:function(){var e=this,t=this.controlOption,r=t.popperClassName,n=t.popperPlacement,i=t.popperTrigger,a=this.mapsService.getMapContainer();return this.popper=new mB(this.button,{className:r,placement:n,trigger:i,container:a,unique:!0}),this.popper.on("show",(function(){e.emit("popperShow",e)})).on("hide",(function(){e.emit("popperHide",e)})),this.popper}},{key:"setOptions",value:function(e){if(E(p(r.prototype),"setOptions",this).call(this,e),this.checkUpdateOption(e,["popperPlacement","popperTrigger","popperClassName"])){var t=this.popper.getContent();this.popper.destroy(),this.initPopper(),this.popper.setContent(t)}}}]),r}(gB),bB=function(e){return e.ActiveOptionClassName="l7-select-control-item-active",e.OptionValueAttrKey="data-option-value",e.OptionIndexAttrKey="data-option-index",e}(bB||{}),xB=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"selectValue",[]),h(_(e),"optionDOMList",void 0),h(_(e),"createNormalOption",(function(t){var r=e.selectValue.includes(t.value),n=Zy("div","l7-select-control-item ".concat(r?bB.ActiveOptionClassName:""));e.getIsMultiple()&&n.appendChild(e.createCheckbox(r)),t.icon&&n.appendChild(t.icon);var i=Zy("span");return i.innerText=t.text,n.appendChild(i),n})),h(_(e),"onItemClick",(function(t){if(e.getIsMultiple()){var r=e.selectValue.findIndex((function(e){return e===t.value}));r>-1?e.selectValue.splice(r,1):e.selectValue=[].concat(T(e.selectValue),[t.value])}else e.selectValue=[t.value];e.setSelectValue(e.selectValue)})),e}return l(r,[{key:"setOptions",value:function(e){E(p(r.prototype),"setOptions",this).call(this,e);var t=e.options;t&&this.popper.setContent(this.getPopperContent(t))}},{key:"onAdd",value:function(){var e=E(p(r.prototype),"onAdd",this).call(this),t=this.controlOption.defaultValue;return t&&(this.selectValue=this.transSelectValue(t)),this.popper.setContent(this.getPopperContent(this.controlOption.options)),e}},{key:"getSelectValue",value:function(){return this.getIsMultiple()?this.selectValue:this.selectValue[0]}},{key:"setSelectValue",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.transSelectValue(e);this.optionDOMList.forEach((function(e){var r=e.getAttribute(bB.OptionValueAttrKey),i=t.getIsMultiple()?e.querySelector("input[type=checkbox]"):void 0;n.includes(r)?(Ky(e,bB.ActiveOptionClassName),i&&l_(i,!0)):(Qy(e,bB.ActiveOptionClassName),i&&l_(i,!1))})),this.selectValue=n,r&&this.emit("selectChange",this.getIsMultiple()?n:n[0])}},{key:"getIsMultiple",value:function(){return!1}},{key:"getPopperContent",value:function(e){var t=this,r=this.isImageOptions(),n=Zy("div",r?"l7-select-control--image":"l7-select-control--normal");this.getIsMultiple()&&Ky(n,"l7-select-control--multiple");var i=e.map((function(e,n){var i=r?t.createImageOption(e):t.createNormalOption(e);return i.setAttribute(bB.OptionValueAttrKey,e.value),i.setAttribute(bB.OptionIndexAttrKey,window.String(n)),i.addEventListener("click",t.onItemClick.bind(t,e)),i}));return n.append.apply(n,T(i)),this.optionDOMList=i,n}},{key:"createImageOption",value:function(e){var t=this.selectValue.includes(e.value),r=Zy("div","l7-select-control-item ".concat(t?bB.ActiveOptionClassName:"")),n=Zy("img");n.setAttribute("src",e.img),f_(n),r.appendChild(n);var i=Zy("div","l7-select-control-item-row");this.getIsMultiple()&&r.appendChild(this.createCheckbox(t));var a=Zy("span");return a.innerText=e.text,i.appendChild(a),r.appendChild(i),r}},{key:"createCheckbox",value:function(e){var t=Zy("input");return t.setAttribute("type","checkbox"),e&&l_(t,!0),t}},{key:"isImageOptions",value:function(){return!!this.controlOption.options.find((function(e){return e.img}))}},{key:"transSelectValue",value:function(e){return Array.isArray(e)?e:[e]}}]),r}(_B),SB=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.classList.add("l7-iconfont"),t.setAttribute("aria-hidden","true");var r=document.createElementNS("http://www.w3.org/2000/svg","use");return r.setAttributeNS("http://www.w3.org/1999/xlink","href","#".concat(e)),t.appendChild(r),t},EB=function(e){f(a,e);var t,r=x(a);function a(){var e;u(this,a);for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return h(_(e=r.call.apply(r,[this].concat(n))),"onClick",s(i().mark((function t(){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null!=(r=e.controlOption.onExport)){t.next=5;break}t.next=10;break;case 5:return t.t0=r,t.next=8,e.getImage();case 8:t.t1=t.sent,(0,t.t0)(t.t1);case 10:case"end":return t.stop()}}),t)})))),h(_(e),"mergeImage",s(i().mark((function t(){var r,n,a,o,s,u,c,l,h,f,p,d,v,g=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(a=e.controlOption.imageType,o=null!==(r=null===(n=e.mapsService.getContainer())||void 0===n?void 0:n.getBoundingClientRect())&&void 0!==r?r:{},s=o.width,u=void 0===s?0:s,c=o.height,l=void 0===c?0:c,(h=document.createElement("canvas")).width=u,h.height=l,f=h.getContext("2d"),p=g.length,d=new Array(p),v=0;v<p;v++)d[v]=g[v];return t.next=9,Promise.all(d.map((function(e){return new Promise((function(t){var r=new Image;r.onload=function(){t(r)},r.src=e}))})));case 9:return t.sent.forEach((function(e){null==f||f.drawImage(e,0,0,u,l)})),t.abrupt("return",h.toDataURL("image/".concat(a)));case 12:case"end":return t.stop()}}),t)})))),e}return l(a,[{key:"onAdd",value:function(){var e=E(p(a.prototype),"onAdd",this).call(this);return e.addEventListener("click",this.onClick),e}},{key:"getDefault",value:function(e){return n(n({},E(p(a.prototype),"getDefault",this).call(this,e)),{},{title:"导出图片",btnIcon:SB("l7-icon-export-picture"),imageType:"png"})}},{key:"getImage",value:(t=s(i().mark((function e(){var t,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mapsService.exportMap("png");case 2:return t=e.sent,e.next=5,this.scene.exportPng("png");case 5:return r=e.sent,e.abrupt("return",this.mergeImage.apply(this,T([t,r].filter((function(e){return e})))));case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),a}(gB),AB=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],TB=function(){if("undefined"==typeof document)return!1;for(var e=AB[0],t={},r=0,n=AB;r<n.length;r++){var i=n[r];if((null==i?void 0:i[1])in document){var a,o=k(i.entries());try{for(o.s();!(a=o.n()).done;){var s=A(a.value,2),u=s[0],c=s[1];t[e[u]]=c}}catch(e){o.e(e)}finally{o.f()}return t}}return!1}(),wB={change:TB.fullscreenchange,error:TB.fullscreenerror},CB={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r,n){var i=function e(){CB.off("change",e),r()};CB.on("change",i);var a=e[TB.requestFullscreen](t);a instanceof Promise&&a.then(i).catch(n)}))},exit:function(){return new Promise((function(e,t){if(CB.isFullscreen){var r=function t(){CB.off("change",t),e()};CB.on("change",r);var n=document[TB.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)}else e()}))},toggle:function(e,t){return CB.isFullscreen?CB.exit():CB.request(e,t)},onchange:function(e){CB.on("change",e)},onerror:function(e){CB.on("error",e)},on:function(e,t){var r=wB[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=wB[e];r&&document.removeEventListener(r,t,!1)},raw:TB};Object.defineProperties(CB,{isFullscreen:{get:function(){return Boolean(document[TB.fullscreenElement])}},element:{enumerable:!0,get:function(){var e;return null!==(e=document[TB.fullscreenElement])&&void 0!==e?e:void 0}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[TB.fullscreenEnabled])}}}),TB||(CB={isEnabled:!1});var kB=CB,MB=function(e){f(r,e);var t=x(r);function r(e){var n;return u(this,r),h(_(n=t.call(this,e)),"isFullscreen",!1),h(_(n),"mapContainer",void 0),h(_(n),"toggleFullscreen",s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!kB.isEnabled){e.next=3;break}return e.next=3,kB.toggle(n.mapContainer);case 3:case"end":return e.stop()}}),e)})))),h(_(n),"onClick",(function(){n.toggleFullscreen()})),h(_(n),"onFullscreenChange",(function(){n.isFullscreen=!!document.fullscreenElement;var e=n.controlOption,t=e.btnText,r=e.btnIcon,i=e.title,a=e.exitBtnText,o=e.exitBtnIcon,s=e.exitTitle;n.isFullscreen?(n.setBtnTitle(s),n.setBtnText(a),n.setBtnIcon(o)):(n.setBtnTitle(i),n.setBtnText(t),n.setBtnIcon(r)),n.emit("fullscreenChange",n.isFullscreen)})),kB.isEnabled||console.warn("当前浏览器环境不支持对地图全屏化"),n}return l(r,[{key:"setOptions",value:function(e){var t=e.exitBtnText,n=e.exitBtnIcon,i=e.exitTitle;this.isFullscreen&&(this.checkUpdateOption(e,["exitBtnIcon"])&&this.setBtnIcon(n),this.checkUpdateOption(e,["exitBtnText"])&&this.setBtnText(t),this.checkUpdateOption(e,["exitTitle"])&&this.setBtnTitle(i)),E(p(r.prototype),"setOptions",this).call(this,e)}},{key:"onAdd",value:function(){var e=E(p(r.prototype),"onAdd",this).call(this);return e.addEventListener("click",this.onClick),this.mapContainer=Wy(this.scene.getSceneConfig().id),this.mapContainer.addEventListener("fullscreenchange",this.onFullscreenChange),e}},{key:"onRemove",value:function(){E(p(r.prototype),"onRemove",this).call(this),this.mapContainer.removeEventListener("fullscreenchange",this.onFullscreenChange)}},{key:"getDefault",value:function(e){return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{title:"全屏",btnIcon:SB("l7-icon-fullscreen"),exitTitle:"退出全屏",exitBtnIcon:SB("l7-icon-exit-fullscreen")})}}]),r}(gB);var PB=function(e){return"number"==typeof e||IE(e)&&"[object Number]"==dm(e)};var IB=function(e){return PB(e)&&e!=+e},OB=function(e){f(r,e);var t=x(r);function r(e){var n;return u(this,r),h(_(n=t.call(this,e)),"getGeoLocation",(function(){return new Promise((function(e,t){window.navigator.geolocation.getCurrentPosition((function(r){var n=r.coords,i=null!=n?n:{},a=i.longitude,o=i.latitude;IB(a)||IB(o)?t():e([a,o])}),(function(e){t(e)}))}))})),h(_(n),"onClick",s(i().mark((function e(){var t,r,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(window.navigator.geolocation){e.next=2;break}return e.abrupt("return");case 2:return t=n.controlOption.transform,e.next=5,n.getGeoLocation();case 5:if(r=e.sent,a=n.mapsService.getZoom(),e.t0=n.mapsService,e.t1=a>15?a:15,!t){e.next=15;break}return e.next=12,t(r);case 12:e.t2=e.sent,e.next=16;break;case 15:e.t2=r;case 16:e.t3=e.t2,e.t0.setZoomAndCenter.call(e.t0,e.t1,e.t3);case 18:case"end":return e.stop()}}),e)})))),window.navigator.geolocation||console.warn("当前浏览器环境不支持获取地理定位"),n}return l(r,[{key:"getDefault",value:function(e){return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{title:"定位",btnIcon:SB("l7-icon-reposition")})}},{key:"onAdd",value:function(){var e=E(p(r.prototype),"onAdd",this).call(this);return e.addEventListener("click",this.onClick),e}}]),r}(gB),RB=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"onLayerChange",(function(){var t;null!==(t=e.controlOption.layers)&&void 0!==t&&t.length||(e.selectValue=e.getLayerVisible(),e.setOptions({options:e.getLayerOptions()}))})),h(_(e),"onLayerVisibleChane",(function(){e.setSelectValue(e.getLayerVisible())})),h(_(e),"onSelectChange",(function(){e.layers.forEach((function(t){var r=e.selectValue.includes(t.name),n=t.isVisible();r&&!n&&t.show(),!r&&n&&t.hide()}))})),e}return l(r,[{key:"layers",get:function(){var e=this.layerService,t=this.controlOption.layers;if(Array.isArray(t)&&t.length){var r=[];return t.forEach((function(t){if(t instanceof Object&&r.push(t),"string"==typeof t){var n=e.getLayer(t)||e.getLayerByName(t);n&&r.push(n)}})),r}return e.getLayers()||[]}},{key:"getDefault",value:function(e){return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{title:"图层控制",btnIcon:SB("l7-icon-layer"),options:[]})}},{key:"getLayerVisible",value:function(){return this.layers.filter((function(e){return e.isVisible()})).map((function(e){return e.name}))}},{key:"getLayerOptions",value:function(){return this.layers.map((function(e){return{text:e.name,value:e.name}}))}},{key:"setOptions",value:function(e){var t=this.checkUpdateOption(e,["layers"]);E(p(r.prototype),"setOptions",this).call(this,e),t&&(this.selectValue=this.getLayerVisible(),this.controlOption.options=this.getLayerOptions(),this.popper.setContent(this.getPopperContent(this.controlOption.options)))}},{key:"onAdd",value:function(){var e;return null!==(e=this.controlOption.options)&&void 0!==e&&e.length||(this.controlOption.options=this.getLayerOptions()),this.controlOption.defaultValue||(this.controlOption.defaultValue=this.getLayerVisible()),this.on("selectChange",this.onSelectChange),this.layerService.on("layerChange",this.onLayerChange),E(p(r.prototype),"onAdd",this).call(this)}},{key:"onRemove",value:function(){this.off("selectChange",this.onSelectChange),this.layerService.off("layerChange",this.onLayerChange)}},{key:"getIsMultiple",value:function(){return!0}}]),r}(xB),LB=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"getDefault",value:function(){return{position:bk.BOTTOMLEFT,name:"logo",href:"https://l7.antv.antgroup.com/",img:"https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*GRb1TKp4HcMAAAAAAAAAAAAAARQnAQ"}}},{key:"onAdd",value:function(){var e=Zy("div","l7-control-logo");return this.setLogoContent(e),e}},{key:"onRemove",value:function(){return null}},{key:"setOptions",value:function(e){E(p(r.prototype),"setOptions",this).call(this,e),this.checkUpdateOption(e,["img","href"])&&(h_(this.container),this.setLogoContent(this.container))}},{key:"setLogoContent",value:function(e){var t=this.controlOption,r=t.href,n=t.img,i=Zy("img");if(i.setAttribute("src",n),i.setAttribute("aria-label","AntV logo"),f_(i),r){var a=Zy("a","l7-control-logo-link");a.target="_blank",a.href=r,a.rel="noopener nofollow",a.setAttribute("rel","noopener nofollow"),a.appendChild(i),e.appendChild(a)}else e.appendChild(i)}}]),r}(vB),NB={normal:{text:"标准",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*qdFDSbvIalgAAAAAAAAAAAAADmJ7AQ/original"},light:{text:"月光银",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*d-vcRLzu8WIAAAAAAAAAAAAADmJ7AQ/original"},dark:{text:"幻影黑",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*HMbRTI3XnpIAAAAAAAAAAAAADmJ7AQ/original"},fresh:{text:"草色青",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*kqaGQ5kjSiAAAAAAAAAAAAAADmJ7AQ/original"},grey:{text:"雅士灰",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*XegrTpZIbqAAAAAAAAAAAAAADmJ7AQ/original"},graffiti:{text:"涂鸦",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*G5g9SZ_Jg4cAAAAAAAAAAAAADmJ7AQ/original"},macaron:{text:"马卡龙",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*irVvQbDpQMwAAAAAAAAAAAAADmJ7AQ/original"},darkblue:{text:"极夜蓝",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*lKRzQYB4iR0AAAAAAAAAAAAADmJ7AQ/original"},wine:{text:"酱籽",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*orY0T7QL-lwAAAAAAAAAAAAADmJ7AQ/original"}},DB={normal:{text:"标准",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*kIyZTok4Uk0AAAAAAAAAAAAADmJ7AQ/original"},light:{text:"亮",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*Z3JRQKDI-cIAAAAAAAAAAAAADmJ7AQ/original"},dark:{text:"暗",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*d7HCQbfmyaoAAAAAAAAAAAAADmJ7AQ/original"},satellite:{text:"卫星",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*TytUT6pS9okAAAAAAAAAAAAADmJ7AQ/original"},outdoors:{text:"户外",img:"https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*hWwFSYJEFWsAAAAAAAAAAAAADmJ7AQ/original"}},FB=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"onMapThemeChange",(function(){e.mapsService.setMapStyle(e.selectValue[0])})),e}return l(r,[{key:"getDefault",value:function(e){return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{title:"地图样式",btnIcon:SB("l7-icon-color"),options:[]})}},{key:"getStyleOptions",value:function(){var e="mapbox"===this.mapsService.getType()?DB:NB;return Object.entries(this.mapsService.getMapStyleConfig()).filter((function(e){var t=A(e,2),r=t[0];return"string"==typeof t[1]&&"blank"!==r})).map((function(t){var r,n=A(t,2),i=n[0],a=n[1],o=null!==(r=e[i])&&void 0!==r?r:{},s=o.text;return{text:null!=s?s:i,value:a,img:o.img,key:i}}))}},{key:"getMapStyle",value:function(){return this.mapsService.getMapStyle()}},{key:"onAdd",value:function(){var e,t=this;if(null!==(e=this.controlOption.options)&&void 0!==e&&e.length||(this.controlOption.options=this.getStyleOptions()),this.controlOption.defaultValue){var n,i,a=this.controlOption.defaultValue;this.controlOption.defaultValue=null!==(n=null===(i=this.controlOption.options.find((function(e){return e.key===a})))||void 0===i?void 0:i.value)&&void 0!==n?n:a}else{var o=this.getMapStyle();o?this.controlOption.defaultValue=o:this.mapsService.map.once("styledata",(function(){var e=t.mapsService.getMapStyle();t.controlOption.defaultValue=e,t.setSelectValue(e,!1)}))}return this.on("selectChange",this.onMapThemeChange),E(p(r.prototype),"onAdd",this).call(this)}},{key:"getIsMultiple",value:function(){return!1}}]),r}(xB),zB=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"location",[0,0]),h(_(e),"onMouseMove",(function(t){var r=e.location,n=t.lngLat||t.lnglat,i=e.controlOption.transform;n&&(r=[n.lng,n.lat]),e.location=r,i&&(r=i(r)),e.insertLocation2HTML(r),e.emit("locationChange",r)})),e}return l(r,[{key:"getLocation",value:function(){return this.location}},{key:"getDefault",value:function(e){return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{position:bk.BOTTOMLEFT,transform:function(e){var t=A(e,2),r=t[0],n=t[1];return[+(+r).toFixed(6),+(+n).toFixed(6)]}})}},{key:"onAdd",value:function(){var e=Zy("div","l7-control-mouse-location");return e.innerHTML="&nbsp;",this.mapsService.on("mousemove",this.onMouseMove),e}},{key:"onRemove",value:function(){this.mapsService.off("mousemove",this.onMouseMove)}},{key:"insertLocation2HTML",value:function(e){this.container.innerText=e.join(", ")}}]),r}(vB),BB=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"mScale",void 0),h(_(e),"iScale",void 0),h(_(e),"update",(function(){var t=e.mapsService,r=e.controlOption.maxWidth,n=t.getSize()[1]/2,i=t.containerToLngLat([0,n]),a=t.containerToLngLat([r,n]),o=bS([i.lng,i.lat],[a.lng,a.lat]);e.updateScales(o)})),e}return l(r,[{key:"getDefault",value:function(e){return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{name:"scale",position:bk.BOTTOMLEFT,maxWidth:100,metric:!0,updateWhenIdle:!1,imperial:!1,lockWidth:!0})}},{key:"onAdd",value:function(){var e=Zy("div","l7-control-scale");this.resetScaleLines(e);var t=this.controlOption.updateWhenIdle;return this.mapsService.on(t?"moveend":"mapmove",this.update),this.mapsService.on(t?"zoomend":"zoomchange",this.update),e}},{key:"onRemove",value:function(){var e=this.controlOption.updateWhenIdle;this.mapsService.off(e?"zoomend":"zoomchange",this.update),this.mapsService.off(e?"moveend":"mapmove",this.update)}},{key:"setOptions",value:function(e){E(p(r.prototype),"setOptions",this).call(this,e),this.checkUpdateOption(e,["lockWidth","maxWidth","metric","updateWhenIdle","imperial"])&&this.resetScaleLines(this.container)}},{key:"updateScales",value:function(e){var t=this.controlOption,r=t.metric,n=t.imperial;r&&e&&this.updateMetric(e),n&&e&&this.updateImperial(e)}},{key:"resetScaleLines",value:function(e){h_(e);var t=this.controlOption,r=t.metric,n=t.imperial,i=t.maxWidth;t.lockWidth&&o_(e,"width: ".concat(i,"px")),r&&(this.mScale=Zy("div","l7-control-scale-line",e)),n&&(this.iScale=Zy("div","l7-control-scale-line",e)),this.update()}},{key:"updateScale",value:function(e,t,r){var n=this.controlOption.maxWidth;e.style.width=Math.round(n*r)+"px",e.innerHTML=t}},{key:"getRoundNum",value:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),r=e/t;return t*(r=r>=10?10:r>=5?5:r>=3?3:r>=2?2:1)}},{key:"updateMetric",value:function(e){var t=this.getRoundNum(e),r=t<1e3?t+" m":t/1e3+" km";this.updateScale(this.mScale,r,t/e)}},{key:"updateImperial",value:function(e){var t,r,n,i=3.2808399*e;i>5280?(t=i/5280,r=this.getRoundNum(t),this.updateScale(this.iScale,r+" mi",r/t)):(n=this.getRoundNum(i),this.updateScale(this.iScale,n+" ft",n/i))}}]),r}(vB),UB=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"disabled",void 0),h(_(e),"zoomInButton",void 0),h(_(e),"zoomOutButton",void 0),h(_(e),"zoomIn",(function(){!e.disabled&&e.mapsService.getZoom()<e.mapsService.getMaxZoom()&&e.mapsService.zoomIn()})),h(_(e),"zoomOut",(function(){!e.disabled&&e.mapsService.getZoom()>e.mapsService.getMinZoom()&&e.mapsService.zoomOut()})),h(_(e),"updateDisabled",(function(){var t=e.mapsService;e.zoomInButton.removeAttribute("disabled"),e.zoomOutButton.removeAttribute("disabled"),(e.disabled||t.getZoom()<=t.getMinZoom())&&e.zoomOutButton.setAttribute("disabled","true"),(e.disabled||t.getZoom()>=t.getMaxZoom())&&e.zoomInButton.setAttribute("disabled","true")})),e}return l(r,[{key:"getDefault",value:function(e){return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{position:bk.BOTTOMRIGHT,name:"zoom",zoomInText:SB("l7-icon-enlarge"),zoomInTitle:"Zoom in",zoomOutText:SB("l7-icon-narrow"),zoomOutTitle:"Zoom out"})}},{key:"setOptions",value:function(e){E(p(r.prototype),"setOptions",this).call(this,e),this.checkUpdateOption(e,["zoomInText","zoomInTitle","zoomOutText","zoomOutTitle"])&&this.resetButtonGroup(this.container)}},{key:"onAdd",value:function(){var e=Zy("div","l7-control-zoom");return this.resetButtonGroup(e),this.mapsService.on("zoomend",this.updateDisabled),this.mapsService.on("zoomchange",this.updateDisabled),e}},{key:"onRemove",value:function(){this.mapsService.off("zoomend",this.updateDisabled),this.mapsService.off("zoomchange",this.updateDisabled)}},{key:"disable",value:function(){return this.disabled=!0,this.updateDisabled(),this}},{key:"enable",value:function(){return this.disabled=!1,this.updateDisabled(),this}},{key:"resetButtonGroup",value:function(e){h_(e),this.zoomInButton=this.createButton(this.controlOption.zoomInText,this.controlOption.zoomInTitle,"l7-button-control",e,this.zoomIn),this.zoomOutButton=this.createButton(this.controlOption.zoomOutText,this.controlOption.zoomOutTitle,"l7-button-control",e,this.zoomOut),this.updateDisabled()}},{key:"createButton",value:function(e,t,r,n,i){var a=Zy("button",r,n);return"string"==typeof e?a.innerHTML=e:a.append(e),a.title=t,a.addEventListener("click",i),a}}]),r}(vB),jB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VB=/^\w*$/;var GB=function(e,t){if(CM(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!OE(e))||(VB.test(e)||!jB.test(e)||null!=t&&e in Object(t))};function HB(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(HB.Cache||iM),r}HB.Cache=iM;var WB=HB;var YB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XB=/\\(\\)?/g,ZB=function(e){var t=WB(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(YB,(function(e,r,n,i){t.push(n?i.replace(XB,"$1"):r||e)})),t}));var qB=function(e,t){return CM(e)?e:GB(e,t)?[e]:ZB(XL(e))};var KB=function(e){if("string"==typeof e||OE(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var QB=function(e,t){for(var r=0,n=(t=qB(t,e)).length;null!=e&&r<n;)e=e[KB(t[r++])];return r&&r==n?e:void 0};var $B=function(e,t,r){var n=null==e?void 0:QB(e,t);return void 0===n?r:n},JB=function(e){f(r,e);var t=x(r);function r(e){var i;u(this,r),h(_(i=t.call(this)),"popupOption",void 0),h(_(i),"mapsService",void 0),h(_(i),"sceneService",void 0),h(_(i),"layerService",void 0),h(_(i),"scene",void 0),h(_(i),"closeButton",void 0),h(_(i),"container",void 0),h(_(i),"content",void 0),h(_(i),"contentTitle",void 0),h(_(i),"contentPanel",void 0),h(_(i),"tip",void 0),h(_(i),"isShow",!0),h(_(i),"onMouseMove",(function(e){var t,r=i.mapsService.getMapContainer(),n=null!==(t=null==r?void 0:r.getBoundingClientRect())&&void 0!==t?t:{},a=n.left,o=void 0===a?0:a,s=n.top,u=void 0===s?0:s;i.setPopupPosition(e.clientX-o,e.clientY-u)})),h(_(i),"updateLngLatPosition",(function(){if(i.mapsService&&!i.popupOption.followCursor){var e=i.lngLat,t=e.lng,r=e.lat,n=i.mapsService.lngLatToContainer([t,r]),a=n.x,o=n.y;i.setPopupPosition(a,o)}})),h(_(i),"onKeyDown",(function(e){27===e.keyCode&&i.remove()})),h(_(i),"onCloseButtonClick",(function(e){e.stopPropagation&&e.stopPropagation(),i.hide()})),h(_(i),"update",(function(){var e=!!i.lngLat,t=i.popupOption,r=t.className,n=t.style,a=t.maxWidth,o=t.anchor,s=t.stopPropagation;if(i.mapsService&&e&&i.content){var u=i.mapsService.getMarkerContainer();if(!i.container&&u&&(i.container=Zy("div","l7-popup ".concat(null!=r?r:""," ").concat(i.isShow?"":"l7-popup-hide"),u),n&&i.container.setAttribute("style",n),i.tip=Zy("div","l7-popup-tip",i.container),i.container.appendChild(i.content),s&&["mousemove","mousedown","mouseup","click","dblclick"].forEach((function(e){i.container.addEventListener(e,(function(e){e.stopPropagation()}))})),i.container.style.whiteSpace="nowrap"),i.updateLngLatPosition(),r_(i.container,"".concat(sg[o])),ug(i.container,o,"popup"),a)i.container.getBoundingClientRect().width>parseFloat(a)&&(i.container.style.width=a);else i.container.style.removeProperty("width")}})),i.popupOption=n(n({},i.getDefault(null!=e?e:{})),e);var a=i.popupOption.lngLat;return a&&(i.lngLat=a),i}return l(r,[{key:"lngLat",get:function(){var e;return null!==(e=this.popupOption.lngLat)&&void 0!==e?e:{lng:0,lat:0}},set:function(e){this.popupOption.lngLat=e}},{key:"getIsShow",value:function(){return this.isShow}},{key:"addTo",value:function(e){this.mapsService=e.get(ba.IMapService),this.sceneService=e.get(ba.ISceneService),this.layerService=e.get(ba.ILayerService),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update),this.scene=e,this.update(),this.updateCloseOnClick(),this.updateCloseOnEsc(),this.updateFollowCursor();var t=this.popupOption,r=t.html,n=t.text,i=t.title;return r?this.setHTML(r):n&&this.setText(n),i&&this.setTitle(i),this.emit("open"),this}},{key:"remove",value:function(){if(null!=this&&this.isOpen())return this.content&&qy(this.content),this.container&&(qy(this.container),delete this.container),this.mapsService&&(this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.updateCloseOnClick(!0),this.updateCloseOnEsc(!0),this.updateFollowCursor(!0),delete this.mapsService),this.emit("close"),this}},{key:"getOptions",value:function(){return this.popupOption}},{key:"setOptions",value:function(e){return this.show(),this.popupOption=n(n({},this.popupOption),e),this.checkUpdateOption(e,["html","text","title","closeButton","closeButtonOffsets","maxWidth","anchor","stopPropagation","className","style","lngLat","offsets"])&&(this.container&&(qy(this.container),this.container=void 0),this.popupOption.html?this.setHTML(this.popupOption.html):this.popupOption.text&&this.setText(this.popupOption.text),this.popupOption.title&&this.setTitle(this.popupOption.title)),this.checkUpdateOption(e,["closeOnEsc"])&&this.updateCloseOnEsc(),this.checkUpdateOption(e,["closeOnClick"])&&this.updateCloseOnClick(),this.checkUpdateOption(e,["followCursor"])&&this.updateFollowCursor(),this.checkUpdateOption(e,["html"])&&e.html?this.setHTML(e.html):this.checkUpdateOption(e,["text"])&&e.text&&this.setText(e.text),this.checkUpdateOption(e,["lngLat"])&&e.lngLat&&this.setLnglat(e.lngLat),this}},{key:"open",value:function(){return this.addTo(this.scene),this}},{key:"close",value:function(){return this.remove(),this}},{key:"show",value:function(){if(!this.isShow)return this.container&&Qy(this.container,"l7-popup-hide"),this.isShow=!0,this.emit("show"),this}},{key:"hide",value:function(){if(this.isShow)return this.container&&Ky(this.container,"l7-popup-hide"),this.isShow=!1,this.emit("hide"),this}},{key:"setHTML",value:function(e){return this.popupOption.html=e,this.setDOMContent(e)}},{key:"setText",value:function(e){return this.popupOption.text=e,this.setDOMContent(window.document.createTextNode(e))}},{key:"setTitle",value:function(e){this.show(),this.popupOption.title=e,e?(this.contentTitle||(this.contentTitle=Zy("div","l7-popup-content__title"),this.content.firstChild?this.content.insertBefore(this.contentTitle,this.content.firstChild):this.content.append(this.contentTitle)),h_(this.contentTitle),p_(this.contentTitle,e)):this.contentTitle&&(qy(this.contentTitle),this.contentTitle=void 0)}},{key:"panToPopup",value:function(){var e=this.lngLat,t=e.lng,r=e.lat;return this.popupOption.autoPan&&this.mapsService.panTo([t,r]),this}},{key:"setLngLat",value:function(e){return this.setLnglat(e)}},{key:"setLnglat",value:function(e){var t=this;return this.show(),this.lngLat=e,Array.isArray(e)&&(this.lngLat={lng:e[0],lat:e[1]}),this.mapsService&&(this.mapsService.off("camerachange",this.update),this.mapsService.off("viewchange",this.update),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update)),this.update(),this.popupOption.autoPan&&setTimeout((function(){t.panToPopup()}),0),this}},{key:"getLnglat",value:function(){return this.lngLat}},{key:"setMaxWidth",value:function(e){return this.popupOption.maxWidth=e,this.update(),this}},{key:"isOpen",value:function(){return!!this.mapsService}},{key:"getDefault",value:function(e){return{closeButton:!0,closeOnClick:!1,maxWidth:"240px",offsets:[0,0],anchor:og.BOTTOM,stopPropagation:!0,autoPan:!1,autoClose:!0,closeOnEsc:!1,followCursor:!1}}},{key:"setDOMContent",value:function(e){return this.show(),this.createContent(),p_(this.contentPanel,e),this.update(),this}},{key:"updateCloseOnClick",value:function(e){var t=this,r=this.mapsService;r&&(null==r||r.off("click",this.onCloseButtonClick),this.popupOption.closeOnClick&&!e&&requestAnimationFrame((function(){null==r||r.on("click",t.onCloseButtonClick)})))}},{key:"updateCloseOnEsc",value:function(e){window.removeEventListener("keydown",this.onKeyDown),this.popupOption.closeOnEsc&&!e&&window.addEventListener("keydown",this.onKeyDown)}},{key:"updateFollowCursor",value:function(e){var t,r=null===(t=this.mapsService)||void 0===t?void 0:t.getContainer();r&&(null==r||r.removeEventListener("mousemove",this.onMouseMove),this.popupOption.followCursor&&!e&&(null==r||r.addEventListener("mousemove",this.onMouseMove)))}},{key:"createContent",value:function(){var e=this;if(this.content&&qy(this.content),this.contentTitle=void 0,this.content=Zy("div","l7-popup-content",this.container),this.setTitle(this.popupOption.title),this.popupOption.closeButton){var t=SB("l7-icon-guanbi");Ky(t,"l7-popup-close-button"),this.content.appendChild(t),this.popupOption.closeButtonOffsets&&(t.style.right=this.popupOption.closeButtonOffsets[0]+"px",t.style.top=this.popupOption.closeButtonOffsets[1]+"px"),t.setAttribute("aria-label","Close popup"),t.addEventListener("click",(function(){e.hide()})),this.closeButton=t}else this.closeButton=void 0;this.contentPanel=Zy("div","l7-popup-content__panel",this.content)}},{key:"setPopupPosition",value:function(e,t){if(this.container){var r=this.popupOption.offsets;this.container.style.left=e+r[0]+"px",this.container.style.top=t-r[1]+"px"}}},{key:"checkUpdateOption",value:function(e,t){return t.some((function(t){return t in e}))}}]),r}(F),eU=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"layerConfigMap",new WeakMap),h(_(e),"displayFeatureInfo",void 0),e}return l(r,[{key:"layerConfigItems",get:function(){var e,t=this.popupOption,r=t.config,n=t.items;return null!==(e=null!=r?r:n)&&void 0!==e?e:[]}},{key:"addTo",value:function(e){return E(p(r.prototype),"addTo",this).call(this,e),this.bindLayerEvent(),this.hide(),this}},{key:"remove",value:function(){return E(p(r.prototype),"remove",this).call(this),this.unbindLayerEvent(),this}},{key:"setOptions",value:function(e){return this.unbindLayerEvent(),E(p(r.prototype),"setOptions",this).call(this,e),this.bindLayerEvent(),this}},{key:"getDefault",value:function(e){var t="click"===e.trigger;return n(n({},E(p(r.prototype),"getDefault",this).call(this,e)),{},{trigger:"hover",followCursor:!t,lngLat:{lng:0,lat:0},offsets:[0,10],closeButton:!1,closeOnClick:!1,autoClose:!1,closeOnEsc:!1})}},{key:"bindLayerEvent",value:function(){var e=this,t=this.popupOption.trigger;this.layerConfigItems.forEach((function(r){var i,a=e.getLayerByConfig(r);if(a){var o=n({},r);if("hover"===t){var s=e.onLayerMouseMove.bind(e,a),u=e.onLayerMouseOut.bind(e,a);o.onMouseMove=s,o.onMouseOut=u,null==a||a.on("mousemove",s),null==a||a.on("mouseout",u)}else{var c=e.onLayerClick.bind(e,a);o.onClick=c,null==a||a.on("click",c)}var l=null==a||null===(i=a.getSource)||void 0===i?void 0:i.call(a),h=e.onSourceUpdate.bind(e,a);null==l||l.on("update",h),o.onSourceUpdate=h,e.layerConfigMap.set(a,o)}}))}},{key:"unbindLayerEvent",value:function(){var e=this;this.layerConfigItems.forEach((function(t){var r=e.getLayerByConfig(t),n=r&&e.layerConfigMap.get(r);if(n){var i,a=n.onMouseMove,o=n.onMouseOut,s=n.onClick,u=n.onSourceUpdate;if(a&&r.off("mousemove",a),o&&r.off("mouseout",o),s&&r.off("click",s),u)null==r||null===(i=r.getSource())||void 0===i||i.off("update",u)}}))}},{key:"onLayerMouseMove",value:function(e,t){if(!this.isSameFeature(e,t.featureId)){var r=this.getLayerInfoFrag(e,t),n=r.title,i=r.content;this.setDOMContent(i),this.setTitle(n),this.displayFeatureInfo={layer:e,featureId:t.featureId},this.show()}}},{key:"onLayerMouseOut",value:function(e,t){this.displayFeatureInfo=void 0,this.isShow&&this.hide()}},{key:"onLayerClick",value:function(e,t){if(this.isShow&&this.isSameFeature(e,t.featureId))this.hide();else{var r=this.getLayerInfoFrag(e,t),n=r.title,i=r.content;this.setDOMContent(i),this.setLnglat(t.lngLat),this.setTitle(n),this.displayFeatureInfo={layer:e,featureId:t.featureId},this.show()}}},{key:"onSourceUpdate",value:function(e){this.hide(),this.displayFeatureInfo=void 0}},{key:"getLayerInfoFrag",value:function(e,t){var r,n=this.layerConfigMap.get(e),i=document.createDocumentFragment();if(n){var a=t.feature;"Feature"===a.type&&"properties"in a&&"geometry"in a&&(a=a.properties);var o=n.title,s=n.fields,u=n.customContent;if(o)p_(r=document.createDocumentFragment(),o instanceof Function?o(a):o);if(u){var c=u instanceof Function?u(a):u;p_(i,c)}else null!=s&&s.length&&(null==s||s.forEach((function(e){var r,n,o="string"==typeof e?{field:e}:e,s=o.field,u=o.formatField,c=o.formatValue,l=o.getValue,h=Zy("div","l7-layer-popup__row"),f=l?l(t.feature):$B(a,s),p=null!==(r=u instanceof Function?u(s,a):u)&&void 0!==r?r:s,d=null!==(n=c instanceof Function?c(f,a):c)&&void 0!==n?n:f,v=Zy("span","l7-layer-popup__key",h);p_(v,p),p_(v,document.createTextNode(":"));var g=Zy("span","l7-layer-popup__value",h);Array.isArray(d)&&d.every((function(e){return!(e instanceof Object)}))&&(d=d.map((function(e){return String(e)})).join(",")),p_(g,d),i.appendChild(h)})))}return{title:r,content:i}}},{key:"getLayerByConfig",value:function(e){var t=e.layer;return t instanceof Object?t:"string"==typeof t?this.layerService.getLayer(t)||this.layerService.getLayerByName(t):void 0}},{key:"isSameFeature",value:function(e,t){var r=this.displayFeatureInfo;return r&&e===r.layer&&t===r.featureId}}]),r}(JB);var tU=function(e){return void 0===e};var rU=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1};var nU=function(e,t,r,n,i,a){var o=1&r,s=e.length,u=t.length;if(s!=u&&!(o&&u>s))return!1;var c=a.get(e),l=a.get(t);if(c&&l)return c==t&&l==e;var h=-1,f=!0,p=2&r?new KR:void 0;for(a.set(e,t),a.set(t,e);++h<s;){var d=e[h],v=t[h];if(n)var g=o?n(v,d,h,t,e,a):n(d,v,h,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!rU(t,(function(e,t){if(!JR(p,t)&&(d===e||i(d,e,r,n,a)))return p.push(t)}))){f=!1;break}}else if(d!==v&&!i(d,v,r,n,a)){f=!1;break}}return a.delete(e),a.delete(t),f};var iU=function(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r},aU=am?am.prototype:void 0,oU=aU?aU.valueOf:void 0;var sU=function(e,t,r,n,i,a,o){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new fM(e),new fM(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return wk(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=iU;case"[object Set]":var u=1&n;if(s||(s=tL),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=2,o.set(e,t);var l=nU(s(e),s(t),n,i,a,o);return o.delete(e),l;case"[object Symbol]":if(oU)return oU.call(e)==oU.call(t)}return!1},uU=Object.prototype.hasOwnProperty;var cU=function(e,t,r,n,i,a){var o=1&r,s=tI(e),u=s.length;if(u!=tI(t).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in t:uU.call(t,l)))return!1}var h=a.get(e),f=a.get(t);if(h&&f)return h==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var d=o;++c<u;){var v=e[l=s[c]],g=t[l];if(n)var m=o?n(g,v,l,t,e,a):n(v,g,l,e,t,a);if(!(void 0===m?v===g||i(v,g,r,n,a):m)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var y=e.constructor,_=t.constructor;y==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _||(p=!1)}return a.delete(e),a.delete(t),p},lU=Object.prototype.hasOwnProperty;var hU=function(e,t,r,n,i,a){var o=CM(e),s=CM(t),u=o?"[object Array]":pI(e),c=s?"[object Array]":pI(t),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&OM(e)){if(!OM(t))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new sM),o||GM(e)?nU(e,t,r,n,i,a):sU(e,t,u,r,n,i,a);if(!(1&r)){var p=l&&lU.call(e,"__wrapped__"),d=h&&lU.call(t,"__wrapped__");if(p||d){var v=p?e.value():e,g=d?t.value():t;return a||(a=new sM),i(v,g,r,n,a)}}return!!f&&(a||(a=new sM),cU(e,t,r,n,i,a))};var fU=function e(t,r,n,i,a){return t===r||(null==t||null==r||!IE(t)&&!IE(r)?t!=t&&r!=r:hU(t,r,n,i,e,a))};var pU,dU=function(e,t){return fU(e,t)},vU=(h(pU={},lP.additive,{enable:!0,func:{srcRGB:rO.ONE,dstRGB:rO.ONE,srcAlpha:1,dstAlpha:1}}),h(pU,lP.none,{enable:!1}),h(pU,lP.normal,{enable:!0,func:{srcRGB:rO.SRC_ALPHA,dstRGB:rO.ONE_MINUS_SRC_ALPHA,srcAlpha:1,dstAlpha:1}}),h(pU,lP.subtractive,{enable:!0,func:{srcRGB:rO.ONE,dstRGB:rO.ONE,srcAlpha:rO.ZERO,dstAlpha:rO.ONE_MINUS_SRC_COLOR},equation:{rgb:rO.FUNC_SUBTRACT,alpha:rO.FUNC_SUBTRACT}}),h(pU,lP.max,{enable:!0,func:{srcRGB:rO.ONE,dstRGB:rO.ONE},equation:{rgb:rO.MAX_EXT}}),h(pU,lP.min,{enable:!0,func:{srcRGB:rO.ONE,dstRGB:rO.ONE},equation:{rgb:rO.MIN_EXT}}),pU);hn({target:"Math",stat:!0},{sign:Tl});var gU,mU=yU;function yU(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=n,this.p2x=r,this.p2y=n}function _U(e,t,r){var n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function bU(e,t,r){return Math.min(r,Math.max(t,e))}function xU(e,t,r){return e*(1-r)+t*r}function SU(e,t,r,n){var i=new mU(e,t,r,n);return function(e){return i.solve(e)}}yU.prototype.sampleCurveX=function(e){return((this.ax*e+this.bx)*e+this.cx)*e},yU.prototype.sampleCurveY=function(e){return((this.ay*e+this.by)*e+this.cy)*e},yU.prototype.sampleCurveDerivativeX=function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},yU.prototype.solveCurveX=function(e,t){var r,n,i,a,o;for(void 0===t&&(t=1e-6),i=e,o=0;o<8;o++){if(a=this.sampleCurveX(i)-e,Math.abs(a)<t)return i;var s=this.sampleCurveDerivativeX(i);if(Math.abs(s)<1e-6)break;i-=a/s}if((i=e)<(r=0))return r;if(i>(n=1))return n;for(;r<n;){if(a=this.sampleCurveX(i),Math.abs(a-e)<t)return i;e>a?r=i:n=i,i=.5*(n-r)+r}return i},yU.prototype.solve=function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))};var EU=SU(.25,.1,.25,1);function AU(){return!(Hv||!Yv.matchMedia)&&(null==gU&&(gU=Yv.matchMedia("(prefers-reduced-motion: reduce)")),gU.matches)}function TU(e,t){var r,n={},i=k(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;a in e&&(n[a]=e[a])}}catch(e){i.e(e)}finally{i.f()}return n}var wU=Hv?Date.now.bind(Date):Yv.performance&&Yv.performance.now?Yv.performance.now.bind(Yv.performance):Date.now.bind(Date),CU=Yv.requestAnimationFrame||Yv.mozRequestAnimationFrame||Yv.webkitRequestAnimationFrame||Yv.msRequestAnimationFrame,kU=Yv.cancelAnimationFrame||Yv.mozCancelAnimationFrame||Yv.webkitCancelAnimationFrame||Yv.msCancelAnimationFrame;function MU(e){var t=CU(e);return{cancel:function(){return kU(t)}}}var PU=function(){function e(t,r){if(u(this,e),h(this,"lng",void 0),h(this,"lat",void 0),isNaN(t)||isNaN(r))throw new Error("Invalid LngLat object: (".concat(t,", ").concat(r,")"));if(this.lng=+t,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}return l(e,[{key:"wrap",value:function(){return new e(_U(this.lng,-180,180),this.lat)}},{key:"toArray",value:function(){return[this.lng,this.lat]}},{key:"toString",value:function(){return"LngLat(".concat(this.lng,", ").concat(this.lat,")")}},{key:"distanceTo",value:function(e){var t=Math.PI/180,r=this.lat*t,n=e.lat*t,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t);return 6371008.8*Math.acos(Math.min(i,1))}}],[{key:"convert",value:function(t){if(t instanceof e)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new e(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"===a(t)&&null!==t){var r="lng"in t?t.lng:t.lon;return new e(Number(r),Number(t.lat))}throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}]),e}(),IU=function(){function e(t,r){u(this,e),h(this,"ne",void 0),h(this,"sw",void 0),t&&(r?this.setSouthWest(t).setNorthEast(r):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))}return l(e,[{key:"setNorthEast",value:function(e){return this.ne=e instanceof PU?new PU(e.lng,e.lat):PU.convert(e),this}},{key:"setSouthWest",value:function(e){return this.sw=e instanceof PU?new PU(e.lng,e.lat):PU.convert(e),this}},{key:"extend",value:function(t){var r,n,i=this.sw,a=this.ne;if(t instanceof PU)r=t,n=t;else{if(!(t instanceof e)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var o=t;return this.extend(e.convert(o))}var s=t;return this.extend(PU.convert(s))}return this}if(r=t.sw,n=t.ne,!r||!n)return this}return i||a?(i.lng=Math.min(r.lng,i.lng),i.lat=Math.min(r.lat,i.lat),a.lng=Math.max(n.lng,a.lng),a.lat=Math.max(n.lat,a.lat)):(this.sw=new PU(r.lng,r.lat),this.ne=new PU(n.lng,n.lat)),this}},{key:"getCenter",value:function(){return new PU((this.sw.lng+this.ne.lng)/2,(this.sw.lat+this.ne.lat)/2)}},{key:"getSouthWest",value:function(){return this.sw}},{key:"getNorthEast",value:function(){return this.ne}},{key:"getNorthWest",value:function(){return new PU(this.getWest(),this.getNorth())}},{key:"getSouthEast",value:function(){return new PU(this.getEast(),this.getSouth())}},{key:"getWest",value:function(){return this.sw.lng}},{key:"getSouth",value:function(){return this.sw.lat}},{key:"getEast",value:function(){return this.ne.lng}},{key:"getNorth",value:function(){return this.ne.lat}},{key:"toArray",value:function(){return[this.sw.toArray(),this.ne.toArray()]}},{key:"toString",value:function(){return"LngLatBounds(".concat(this.sw.toString(),", ").concat(this.ne.toString(),")")}},{key:"isEmpty",value:function(){return!(this.sw&&this.ne)}},{key:"contains",value:function(e){var t=PU.convert(e),r=t.lng,n=t.lat,i=this.sw.lat<=n&&n<=this.ne.lat,a=this.sw.lng<=r&&r<=this.ne.lng;return this.sw.lng>this.ne.lng&&(a=this.sw.lng>=r&&r>=this.ne.lng),i&&a}}],[{key:"convert",value:function(t){return t instanceof e?t:new e(t)}}]),e}(),OU=function(){function e(t,r){u(this,e),h(this,"x",void 0),h(this,"y",void 0),this.x=t,this.y=r}return l(e,[{key:"clone",value:function(){return new e(this.x,this.y)}},{key:"_add",value:function(e){return this.x+=e.x,this.y+=e.y,this}},{key:"add",value:function(e){return this.clone()._add(e)}},{key:"_sub",value:function(e){return this.x-=e.x,this.y-=e.y,this}},{key:"sub",value:function(e){return this.clone()._sub(e)}},{key:"_multByPoint",value:function(e){return this.x*=e.x,this.y*=e.y,this}},{key:"multByPoint",value:function(e){return this.clone()._multByPoint(e)}},{key:"_divByPoint",value:function(e){return this.x/=e.x,this.y/=e.y,this}},{key:"divByPoint",value:function(e){return this.clone()._divByPoint(e)}},{key:"_mult",value:function(e){return this.x*=e,this.y*=e,this}},{key:"mult",value:function(e){return this.clone()._mult(e)}},{key:"_div",value:function(e){return this.x/=e,this.y/=e,this}},{key:"div",value:function(e){return this.clone()._div(e)}},{key:"_rotate",value:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,i=r*this.x+t*this.y;return this.x=n,this.y=i,this}},{key:"rotate",value:function(e){return this.clone()._rotate(e)}},{key:"_rotateAround",value:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.x+r*(this.x-t.x)-n*(this.y-t.y),a=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=i,this.y=a,this}},{key:"roateAround",value:function(e,t){return this.clone()._rotateAround(e,t)}},{key:"_matMult",value:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this}},{key:"matMult",value:function(e){return this.clone()._matMult(e)}},{key:"_unit",value:function(){return this.div(this.mag()),this}},{key:"unit",value:function(){return this.clone()._unit()}},{key:"_perp",value:function(){var e=this.y;return this.y=this.x,this.x=-e,this}},{key:"perp",value:function(){return this.clone()._perp()}},{key:"_round",value:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},{key:"round",value:function(){return this.clone()._round()}},{key:"mag",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"equals",value:function(e){return this.x===e.x&&this.y===e.y}},{key:"dist",value:function(e){return Math.sqrt(this.distSqr(e))}},{key:"distSqr",value:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r}},{key:"angle",value:function(){return Math.atan2(this.y,this.x)}},{key:"angleTo",value:function(e){return Math.atan2(this.y-e.y,this.x-e.x)}},{key:"angleWith",value:function(e){return this.angleWithSep(e.x,e.y)}},{key:"angleWithSep",value:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)}}],[{key:"convert",value:function(t){return t instanceof e?t:Array.isArray(t)?new e(t[0],t[1]):t}}]),e}();hn({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return je(URL.prototype.toString,this)}}),kh("Float64",(function(e){return function(t,r,n){return e(this,t,r,n)}})),kh("Float32",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var RU=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(u(this,e),h(this,"top",void 0),h(this,"bottom",void 0),h(this,"left",void 0),h(this,"right",void 0),isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=r,this.left=n,this.right=i}return l(e,[{key:"interpolate",value:function(e,t,r){return null!=t.top&&null!=e.top&&(this.top=xU(e.top,t.top,r)),null!=t.bottom&&null!=e.bottom&&(this.bottom=xU(e.bottom,t.bottom,r)),null!=t.left&&null!=e.left&&(this.left=xU(e.left,t.left,r)),null!=t.right&&null!=e.right&&(this.right=xU(e.right,t.right,r)),this}},{key:"getCenter",value:function(e,t){var r=bU((this.left+e-this.right)/2,0,e),n=bU((this.top+t-this.bottom)/2,0,t);return new OU(r,n)}},{key:"equals",value:function(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}},{key:"clone",value:function(){return new e(this.top,this.bottom,this.left,this.right)}},{key:"toJSON",value:function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}]),e}(),LU=2*Math.PI*6371008.8;function NU(e){return LU*Math.cos(e*Math.PI/180)}function DU(e){return(180+e)/360}function FU(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function zU(e,t){return e/NU(t)}function BU(e){var t=180-360*e;return 360/Math.PI*Math.atan(Math.exp(t*Math.PI/180))-90}var UU=function(){function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;u(this,e),h(this,"x",void 0),h(this,"y",void 0),h(this,"z",void 0),this.x=+t,this.y=+r,this.z=+n}return l(e,[{key:"toLngLat",value:function(){return new PU(360*this.x-180,BU(this.y))}},{key:"toAltitude",value:function(){return e=this.z,t=this.y,e*NU(BU(t));var e,t}},{key:"meterInMercatorCoordinateUnits",value:function(){return 1/LU*(e=BU(this.y),1/Math.cos(e*Math.PI/180));var e}}],[{key:"fromLngLat",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=PU.convert(t);return new e(DU(n.lng),FU(n.lat),zU(r,n.lat))}}]),e}(),jU=function(){function e(t,r,n,i,a){u(this,e),h(this,"tileSize",void 0),h(this,"tileZoom",void 0),h(this,"lngRange",void 0),h(this,"latRange",void 0),h(this,"maxValidLatitude",void 0),h(this,"scale",void 0),h(this,"width",void 0),h(this,"height",void 0),h(this,"angle",void 0),h(this,"rotationMatrix",void 0),h(this,"pixelsToGLUnits",void 0),h(this,"cameraToCenterDistance",void 0),h(this,"mercatorMatrix",void 0),h(this,"projMatrix",void 0),h(this,"invProjMatrix",void 0),h(this,"alignedProjMatrix",void 0),h(this,"pixelMatrix",void 0),h(this,"pixelMatrixInverse",void 0),h(this,"glCoordMatrix",void 0),h(this,"labelPlaneMatrix",void 0),h(this,"_fov",void 0),h(this,"_pitch",void 0),h(this,"_zoom",void 0),h(this,"_renderWorldCopies",void 0),h(this,"_minZoom",void 0),h(this,"_maxZoom",void 0),h(this,"_minPitch",void 0),h(this,"_maxPitch",void 0),h(this,"_center",void 0),h(this,"zoomFraction",void 0),h(this,"unmodified",void 0),h(this,"edgeInsets",void 0),h(this,"constraining",void 0),h(this,"posMatrixCache",void 0),h(this,"alignedPosMatrixCache",void 0),this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=t||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new PU(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this.unmodified=!0,this.edgeInsets=new RU,this.posMatrixCache={},this.alignedPosMatrixCache={}}return l(e,[{key:"minZoom",get:function(){return this._minZoom},set:function(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}},{key:"maxZoom",get:function(){return this._maxZoom},set:function(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}},{key:"minPitch",get:function(){return this._minPitch},set:function(e){this._minPitch!==e&&(this._minPitch=e,this._pitch=Math.max(this._pitch,e))}},{key:"maxPitch",get:function(){return this._maxPitch},set:function(e){this._maxPitch!==e&&(this._maxPitch=e,this._pitch=Math.min(this._pitch,e))}},{key:"renderWorldCopies",get:function(){return this._renderWorldCopies},set:function(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}},{key:"worldSize",get:function(){return this.tileSize*this.scale}},{key:"centerOffset",get:function(){return this.centerPoint._sub(this.size._div(2))}},{key:"size",get:function(){return new OU(this.width,this.height)}},{key:"bearing",get:function(){return-this.angle/Math.PI*180},set:function(e){var t=-_U(e,-180,180)*Math.PI/180;this.angle!==t&&(this.unmodified=!1,this.angle=t,this.calcMatrices(),this.rotationMatrix=uT(),cT(this.rotationMatrix,this.rotationMatrix,this.angle))}},{key:"pitch",get:function(){return this._pitch/Math.PI*180},set:function(e){var t=bU(e,this._minPitch,this._maxPitch)/180*Math.PI;this._pitch!==t&&(this.unmodified=!1,this._pitch=t,this.calcMatrices())}},{key:"fov",get:function(){return this._fov/Math.PI*180},set:function(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this.unmodified=!1,this._fov=e/180*Math.PI,this.calcMatrices())}},{key:"zoom",get:function(){return this._zoom},set:function(e){var t=Math.min(Math.max(e,this._minZoom),this._maxZoom);this._zoom!==t&&(this.unmodified=!1,this._zoom=t,this.scale=this.zoomScale(t),this.tileZoom=Math.floor(t),this.zoomFraction=t-this.tileZoom,this.constrain(),this.calcMatrices())}},{key:"center",get:function(){return this._center},set:function(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this.unmodified=!1,this._center=e,this.constrain(),this.calcMatrices())}},{key:"padding",get:function(){return this.edgeInsets.toJSON()},set:function(e){this.edgeInsets.equals(e)||(this.unmodified=!1,this.edgeInsets.interpolate(this.edgeInsets,e,1),this.calcMatrices())}},{key:"centerPoint",get:function(){return this.edgeInsets.getCenter(this.width,this.height)}},{key:"point",get:function(){return this.project(this.center)}},{key:"clone",value:function(){var t=new e(this._minZoom,this._maxZoom,this._minPitch,this._maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t.center=this._center,t.zoom=this.zoom,t.angle=this.angle,t.fov=this._fov,t.pitch=this._pitch,t.unmodified=this.unmodified,t.edgeInsets=this.edgeInsets.clone(),t.calcMatrices(),t}},{key:"isPaddingEqual",value:function(e){return this.edgeInsets.equals(e)}},{key:"interpolatePadding",value:function(e,t,r){this.unmodified=!1,this.edgeInsets.interpolate(e,t,r),this.constrain(),this.calcMatrices()}},{key:"coveringZoomLevel",value:function(e){var t=(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize));return Math.max(0,t)}},{key:"resize",value:function(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this.constrain(),this.calcMatrices()}},{key:"zoomScale",value:function(e){return Math.pow(2,e)}},{key:"scaleZoom",value:function(e){return Math.log(e)/Math.LN2}},{key:"project",value:function(e){var t=bU(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new OU(DU(e.lng)*this.worldSize,FU(t)*this.worldSize)}},{key:"unproject",value:function(e){return new UU(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}},{key:"setLocationAtPoint",value:function(e,t){var r=this.pointCoordinate(t),n=this.pointCoordinate(this.centerPoint),i=this.locationCoordinate(e),a=new UU(i.x-(r.x-n.x),i.y-(r.y-n.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())}},{key:"pointCoordinate",value:function(e){var t=new Float64Array([e.x,e.y,0,1]),r=new Float64Array([e.x,e.y,1,1]);_b(t,t,this.pixelMatrixInverse),_b(r,r,this.pixelMatrixInverse);var n=t[3],i=r[3],a=t[0]/n,o=r[0]/i,s=t[1]/n,u=r[1]/i,c=t[2]/n,l=r[2]/i,h=c===l?0:(0-c)/(l-c);return new UU(xU(a,o,h)/this.worldSize,xU(s,u,h)/this.worldSize)}},{key:"getBounds",value:function(){return(new IU).extend(this.pointLocation(new OU(0,0))).extend(this.pointLocation(new OU(this.width,0))).extend(this.pointLocation(new OU(this.width,this.height))).extend(this.pointLocation(new OU(0,this.height)))}},{key:"getMaxBounds",value:function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new IU([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}},{key:"setMaxBounds",value:function(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this.constrain()):(this.lngRange=void 0,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}},{key:"customLayerMatrix",value:function(){return this.mercatorMatrix.slice()}},{key:"maxPitchScaleFactor",value:function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new OU(0,0)),t=new Float32Array([e.x*this.worldSize,e.y*this.worldSize,0,1]);return _b(t,t,this.pixelMatrix)[3]/this.cameraToCenterDistance}},{key:"getCameraPoint",value:function(){var e=this._pitch,t=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new OU(0,t))}},{key:"getCameraQueryGeometry",value:function(e){var t=this.getCameraPoint();if(1===e.length)return[e[0],t];var r,n=t.x,i=t.y,a=t.x,o=t.y,s=k(e);try{for(s.s();!(r=s.n()).done;){var u=r.value;n=Math.min(n,u.x),i=Math.min(i,u.y),a=Math.max(a,u.x),o=Math.max(o,u.y)}}catch(e){s.e(e)}finally{s.f()}return[new OU(n,i),new OU(a,i),new OU(a,o),new OU(n,o),new OU(n,i)]}},{key:"coordinatePoint",value:function(e){var t=yb(e.x*this.worldSize,e.y*this.worldSize,0,1);return _b(t,t,this.pixelMatrix),new OU(t[0]/t[3],t[1]/t[3])}},{key:"locationPoint",value:function(e){return this.coordinatePoint(this.locationCoordinate(e))}},{key:"pointLocation",value:function(e){return this.coordinateLocation(this.pointCoordinate(e))}},{key:"locationCoordinate",value:function(e){return UU.fromLngLat(e)}},{key:"coordinateLocation",value:function(e){return e.toLngLat()}},{key:"getProjectionMatrix",value:function(){return this.projMatrix}},{key:"constrain",value:function(){if(this.center&&this.width&&this.height&&!this.constraining){this.constraining=!0;var e,t,r,n,i=-90,a=90,o=-180,s=180,u=this.size,c=this.unmodified;if(this.latRange){var l=this.latRange;i=FU(l[1])*this.worldSize,e=(a=FU(l[0])*this.worldSize)-i<u.y?u.y/(a-i):0}if(this.lngRange){var h=this.lngRange;o=DU(h[0])*this.worldSize,t=(s=DU(h[1])*this.worldSize)-o<u.x?u.x/(s-o):0}var f=this.point,p=Math.max(t||0,e||0);if(p)return this.center=this.unproject(new OU(t?(s+o)/2:f.x,e?(a+i)/2:f.y)),Hv?this.zoom=Math.max(this.zoom,Math.max(-1,this.minZoom)):this.zoom+=this.scaleZoom(p),this.unmodified=c,void(this.constraining=!1);if(this.latRange){var d=f.y,v=u.y/2;d-v<i&&(n=i+v),d+v>a&&(n=a-v)}if(this.lngRange){var g=f.x,m=u.x/2;g-m<o&&(r=o+m),g+m>s&&(r=s-m)}void 0===r&&void 0===n||(this.center=this.unproject(new OU(void 0!==r?r:f.x,void 0!==n?n:f.y))),this.unmodified=c,this.constraining=!1}}},{key:"calcMatrices",value:function(){if(this.height){var e=this._fov/2,t=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var r=Math.PI/2+this._pitch,n=this._fov*(.5+t.y/this.height),i=Math.sin(n)*this.cameraToCenterDistance/Math.sin(bU(Math.PI-r-n,.01,Math.PI-.01)),a=this.point,o=a.x,s=a.y,u=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),c=this.height/50,l=new Float64Array(16);Bb(l,this._fov,this.width/this.height,c,u),l[8]=2*-t.x/this.width,l[9]=2*t.y/this.height,Ib(l,l,[1,-1,1]),Pb(l,l,[0,0,-this.cameraToCenterDistance]),Ob(l,l,this._pitch),Lb(l,l,this.angle),Pb(l,l,[-o,-s,0]),this.mercatorMatrix=Ib([],l,[this.worldSize,this.worldSize,this.worldSize]),Ib(l,l,[1,1,zU(1,this.center.lat)*this.worldSize,1]),this.projMatrix=l,this.invProjMatrix=kb([],this.projMatrix);var h=this.width%2/2,f=this.height%2/2,p=Math.cos(this.angle),d=Math.sin(this.angle),v=o-Math.round(o)+p*h+d*f,g=s-Math.round(s)+p*f+d*h,m=new Float64Array(l);if(Pb(m,m,[v>.5?v-1:v,g>.5?g-1:g,0]),this.alignedProjMatrix=m,Ib(l=Ab(),l,[this.width/2,-this.height/2,1]),Pb(l,l,[1,-1,0]),this.labelPlaneMatrix=l,Ib(l=Ab(),l,[1,-1,1]),Pb(l,l,[-1,-1,0]),Ib(l,l,[2/this.width,2/this.height,1]),this.glCoordMatrix=l,this.pixelMatrix=Mb(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(l=kb(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=l,this.posMatrixCache={},this.alignedPosMatrixCache={}}}}]),e}(),VU=l((function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),h(this,"type",void 0),cP(this,r),this.type=t})),GU=function(e){f(r,e);var t=x(r);function r(e){var n;u(this,r),h(_(n=t.call(this)),"transform",void 0),h(_(n),"options",void 0),h(_(n),"moving",void 0),h(_(n),"zooming",void 0),h(_(n),"rotating",void 0),h(_(n),"pitching",void 0),h(_(n),"padding",void 0),h(_(n),"bearingSnap",void 0),h(_(n),"easeEndTimeoutID",void 0),h(_(n),"easeStart",void 0),h(_(n),"easeOptions",void 0),h(_(n),"easeId",void 0),h(_(n),"onEaseFrame",void 0),h(_(n),"onEaseEnd",void 0),h(_(n),"easeFrameId",void 0),h(_(n),"pitchEnabled",void 0),h(_(n),"rotateEnabled",void 0),h(_(n),"renderFrameCallback",(function(){var e=Math.min((wU()-n.easeStart)/n.easeOptions.duration,1);n.onEaseFrame(n.easeOptions.easing(e)),e<1?n.easeFrameId=n.requestRenderFrame(n.renderFrameCallback):n.stop()})),n.options=e;var i=e.minZoom,a=e.maxZoom,o=e.minPitch,s=e.maxPitch,c=e.renderWorldCopies;return n.moving=!1,n.zooming=!1,n.bearingSnap=e.bearingSnap,n.pitchEnabled=e.pitchEnabled,n.rotateEnabled=e.rotateEnabled,n.transform=new jU(i,a,o,s,c),n}return l(r,[{key:"requestRenderFrame",value:function(e){return 0}},{key:"cancelRenderFrame",value:function(e){}},{key:"getCenter",value:function(){var e=this.transform.center,t=e.lng,r=e.lat;return new PU(t,r)}},{key:"getZoom",value:function(){return this.transform.zoom}},{key:"getPitch",value:function(){return this.transform.pitch}},{key:"setCenter",value:function(e,t){return this.jumpTo({center:e},t)}},{key:"setPitch",value:function(e,t){return this.jumpTo({pitch:e},t),this}},{key:"getBearing",value:function(){return this.transform.bearing}},{key:"panTo",value:function(e,t,r){return this.easeTo(cP({center:e},t),r)}},{key:"panBy",value:function(e,t,r){return e=OU.convert(e).mult(-1),this.panTo(this.transform.center,function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var i=0,a=r;i<a.length;i++){var o=a[i];for(var s in o)void 0!==o[s]&&(e[s]=o[s])}return e}({offset:e},t||{}),r)}},{key:"zoomOut",value:function(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}},{key:"setBearing",value:function(e,t){return this.jumpTo({bearing:e},t),this}},{key:"setZoom",value:function(e,t){return this.jumpTo({zoom:e},t),this}},{key:"zoomIn",value:function(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}},{key:"zoomTo",value:function(e,t,r){return this.easeTo(cP({zoom:e},t),r)}},{key:"getPadding",value:function(){return this.transform.padding}},{key:"setPadding",value:function(e,t){return this.jumpTo({padding:e},t),this}},{key:"rotateTo",value:function(e,t,r){return this.easeTo(cP({bearing:e},t),r)}},{key:"resetNorth",value:function(e,t){return this.rotateTo(0,cP({duration:1e3},e),t),this}},{key:"resetNorthPitch",value:function(e,t){return this.easeTo(cP({bearing:0,pitch:0,duration:1e3},e),t),this}},{key:"fitBounds",value:function(e,t,r){return this.fitInternal(this.cameraForBounds(e,t),t,r)}},{key:"cameraForBounds",value:function(e,t){return e=IU.convert(e),this.cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,t)}},{key:"snapToNorth",value:function(e,t){return Math.abs(this.getBearing())<this.bearingSnap?this.resetNorth(e,t):this}},{key:"jumpTo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;this.stop();var r=this.transform,n=!1,i=!1,a=!1;return void 0!==e.zoom&&r.zoom!==+e.zoom&&(n=!0,r.zoom=+e.zoom),void 0!==e.center&&(r.center=PU.convert(e.center)),void 0!==e.bearing&&r.bearing!==+e.bearing&&(i=!0,r.bearing=+e.bearing),void 0!==e.pitch&&r.pitch!==+e.pitch&&(a=!0,r.pitch=+e.pitch),void 0===e.padding||r.isPaddingEqual(e.padding)||(r.padding=e.padding),this.emit("movestart",new VU("movestart",t)),this.emit("move",new VU("move",t)),n&&(this.emit("zoomstart",new VU("zoomstart",t)),this.emit("zoom",new VU("zoom",t)),this.emit("zoomend",new VU("zoomend",t))),i&&(this.emit("rotatestart",new VU("rotatestart",t)),this.emit("rotate",new VU("rotate",t)),this.emit("rotateend",new VU("rotateend",t))),a&&(this.emit("pitchstart",new VU("pitchstart",t)),this.emit("pitch",new VU("pitch",t)),this.emit("pitchend",new VU("pitchend",t))),this.emit("moveend",new VU("moveend",t))}},{key:"easeTo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;(!1===(t=cP({offset:[0,0],duration:500,easing:EU},t)).animate||!t.essential&&AU())&&(t.duration=0);var n=this.transform,i=this.getZoom(),a=this.getBearing(),o=this.getPitch(),s=this.getPadding(),u=t.zoom?+t.zoom:i,c=t.bearing?this.normalizeBearing(t.bearing,a):a,l=t.pitch?+t.pitch:o,h=t.padding?t.padding:n.padding,f=OU.convert(t.offset),p=n.centerPoint.add(f),d=n.pointLocation(p),v=PU.convert(t.center||d);this.normalizeCenter(v);var g,m,y=n.project(d),_=n.project(v).sub(y),b=n.zoomScale(u-i);t.around&&(g=PU.convert(t.around),m=n.locationPoint(g));var x={moving:this.moving,zooming:this.zooming,rotating:this.rotating,pitching:this.pitching};return this.zooming=this.zooming||u!==i,this.rotating=this.rotating||a!==c,this.pitching=this.pitching||l!==o,this.padding=!n.isPaddingEqual(h),this.easeId=t.easeId,this.prepareEase(r,t.noMoveStart,x),clearTimeout(this.easeEndTimeoutID),this.ease((function(t){if(e.zooming&&(n.zoom=xU(i,u,t)),e.rotating&&e.rotateEnabled&&(n.bearing=xU(a,c,t)),e.pitching&&e.pitchEnabled&&(n.pitch=xU(o,l,t)),e.padding&&(n.interpolatePadding(s,h,t),p=n.centerPoint.add(f)),g)n.setLocationAtPoint(g,m);else{var d=n.zoomScale(n.zoom-i),v=u>i?Math.min(2,b):Math.max(.5,b),x=Math.pow(v,1-t),S=n.unproject(y.add(_.mult(t*x)).mult(d));n.setLocationAtPoint(n.renderWorldCopies?S.wrap():S,p)}e.fireMoveEvents(r)}),(function(t){e.afterEase(r,t)}),t),this}},{key:"flyTo",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(!t.essential&&AU()){var n=TU(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),t=cP({offset:[0,0],speed:1.2,curve:1.42,easing:EU},t);var i=this.transform,a=this.getZoom(),o=this.getBearing(),s=this.getPitch(),u=this.getPadding(),c=t.zoom?bU(+t.zoom,i.minZoom,i.maxZoom):a,l=t.bearing?this.normalizeBearing(t.bearing,o):o,h=t.pitch?+t.pitch:s,f="padding"in t?t.padding:i.padding,p=i.zoomScale(c-a),d=OU.convert(t.offset),v=i.centerPoint.add(d),g=i.pointLocation(v),m=PU.convert(t.center||g);this.normalizeCenter(m);var y=i.project(g),_=i.project(m).sub(y),b=t.curve,x=Math.max(i.width,i.height),S=x/p,E=_.mag();if("minZoom"in t){var A=bU(Math.min(t.minZoom,a,c),i.minZoom,i.maxZoom),T=x/i.zoomScale(A-a);b=Math.sqrt(T/E*2)}var w=b*b;function C(e){var t=(S*S-x*x+(e?-1:1)*w*w*E*E)/(2*(e?S:x)*w*E);return Math.log(Math.sqrt(t*t+1)-t)}function k(e){return(Math.exp(e)-Math.exp(-e))/2}function M(e){return(Math.exp(e)+Math.exp(-e))/2}function P(e){return k(e)/M(e)}var I=C(0),O=function(e){return M(I)/M(I+b*e)},R=function(e){return x*((M(I)*P(I+b*e)-k(I))/w)/E},L=(C(1)-I)/b;if(Math.abs(E)<1e-6||!isFinite(L)){if(Math.abs(x-S)<1e-6)return this.easeTo(t,r);var N=S<x?-1:1;L=Math.abs(Math.log(S/x))/b,R=function(){return 0},O=function(e){return Math.exp(N*b*e)}}if("duration"in t)t.duration=+t.duration;else{var D="screenSpeed"in t?+t.screenSpeed/b:+t.speed;t.duration=1e3*L/D}return t.maxDuration&&t.duration>t.maxDuration&&(t.duration=0),this.zooming=!0,this.rotating=o!==l,this.pitching=h!==s,this.padding=!i.isPaddingEqual(f),this.prepareEase(r,!1),this.ease((function(t){var n=t*L,p=1/O(n);i.zoom=1===t?c:a+i.scaleZoom(p),e.rotating&&(i.bearing=xU(o,l,t)),e.pitching&&(i.pitch=xU(s,h,t)),e.padding&&(i.interpolatePadding(u,f,t),v=i.centerPoint.add(d));var g=1===t?m:i.unproject(y.add(_.mult(R(n))).mult(p));i.setLocationAtPoint(i.renderWorldCopies?g.wrap():g,v),e.fireMoveEvents(r)}),(function(){return e.afterEase(r)}),t),this}},{key:"fitScreenCoordinates",value:function(e,t,r,n,i){return this.fitInternal(this.cameraForBoxAndBearing(this.transform.pointLocation(OU.convert(e)),this.transform.pointLocation(OU.convert(t)),r,n),n,i)}},{key:"stop",value:function(e,t){if(this.easeFrameId&&(this.cancelRenderFrame(this.easeFrameId),delete this.easeFrameId,delete this.onEaseFrame),this.onEaseEnd){var r=this.onEaseEnd;delete this.onEaseEnd,r.call(this,t)}return this}},{key:"normalizeBearing",value:function(e,t){e=_U(e,-180,180);var r=Math.abs(e-t);return Math.abs(e-360-t)<r&&(e-=360),Math.abs(e+360-t)<r&&(e+=360),e}},{key:"normalizeCenter",value:function(e){var t=this.transform;if(t.renderWorldCopies&&!t.lngRange){var r=e.lng-t.center.lng;e.lng+=r>180?-360:r<-180?360:0}}},{key:"fireMoveEvents",value:function(e){this.emit("move",new VU("move",e)),this.zooming&&this.emit("zoom",new VU("zoom",e)),this.rotating&&this.emit("rotate",new VU("rotate",e)),this.pitching&&this.emit("rotate",new VU("pitch",e))}},{key:"prepareEase",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.moving=!0,t||r.moving||this.emit("movestart",new VU("movestart",e)),this.zooming&&!r.zooming&&this.emit("zoomstart",new VU("zoomstart",e)),this.rotating&&!r.rotating&&this.emit("rotatestart",new VU("rotatestart",e)),this.pitching&&!r.pitching&&this.emit("pitchstart",new VU("pitchstart",e))}},{key:"afterEase",value:function(e,t){if(!this.easeId||!t||this.easeId!==t){delete this.easeId;var r=this.zooming,n=this.rotating,i=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,this.padding=!1,r&&this.emit("zoomend",new VU("zoomend",e)),n&&this.emit("rotateend",new VU("rotateend",e)),i&&this.emit("pitchend",new VU("pitchend",e)),this.emit("moveend",new VU("moveend",e))}}},{key:"ease",value:function(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this.easeStart=wU(),this.easeOptions=r,this.onEaseFrame=e,this.onEaseEnd=t,this.easeFrameId=this.requestRenderFrame(this.renderFrameCallback))}},{key:"cameraForBoxAndBearing",value:function(e,t,r,n){var i={top:0,bottom:0,right:0,left:0};if("number"==typeof(n=cP({padding:i,offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var a=n.padding;n.padding={top:a,bottom:a,right:a,left:a}}n.padding=cP(i,n.padding);var o=this.transform,s=o.padding,u=o.project(PU.convert(e)),c=o.project(PU.convert(t)),l=u.rotate(-r*Math.PI/180),h=c.rotate(-r*Math.PI/180),f=new OU(Math.max(l.x,h.x),Math.max(l.y,h.y)),p=new OU(Math.min(l.x,h.x),Math.min(l.y,h.y)),d=f.sub(p),v=(o.width-(s.left+s.right+n.padding.left+n.padding.right))/d.x,g=(o.height-(s.top+s.bottom+n.padding.top+n.padding.bottom))/d.y;if(!(g<0||v<0)){var m=Math.min(o.scaleZoom(o.scale*Math.min(v,g)),n.maxZoom),y=OU.convert(n.offset),_=(n.padding.left-n.padding.right)/2,b=(n.padding.top-n.padding.bottom)/2,x=new OU(y.x+_,y.y+b).mult(o.scale/o.zoomScale(m));return{center:o.unproject(u.add(c).div(2).sub(x)),zoom:m,bearing:r}}}},{key:"fitInternal",value:function(e,t,r){return e?(delete(t=cP(e,t)).padding,t.linear?this.easeTo(t,r):this.flyTo(t,r)):this}}]),r}(F);zD(".l7-map {\r\n  font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;\r\n  overflow: hidden;\r\n  position: relative;\r\n  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\r\n}\r\n\r\n.l7-canvas {\r\n  position: absolute;\r\n  left: 0;\r\n  top: 0;\r\n}\r\n\r\n.l7-map:-webkit-full-screen {\r\n  width: 100%;\r\n  height: 100%;\r\n}\r\n\r\n.l7-canary {\r\n  background-color: salmon;\r\n}\r\n\r\n.l7-canvas-container.l7-interactive,\r\n.l7-ctrl-group button.l7-ctrl-compass {\r\n  cursor: -webkit-grab;\r\n  cursor: -moz-grab;\r\n  cursor: grab;\r\n  -moz-user-select: none;\r\n  -webkit-user-select: none;\r\n  -ms-user-select: none;\r\n  user-select: none;\r\n}\r\n\r\n.l7-canvas-container.l7-interactive.l7-track-pointer {\r\n  cursor: pointer;\r\n}\r\n\r\n.l7-canvas-container.l7-interactive:active,\r\n.l7-ctrl-group button.l7-ctrl-compass:active {\r\n  cursor: -webkit-grabbing;\r\n  cursor: -moz-grabbing;\r\n  cursor: grabbing;\r\n}\r\n\r\n.l7-canvas-container.l7-touch-zoom-rotate,\r\n.l7-canvas-container.l7-touch-zoom-rotate .l7-canvas {\r\n  touch-action: pan-x pan-y;\r\n}\r\n\r\n.l7-canvas-container.l7-touch-drag-pan,\r\n.l7-canvas-container.l7-touch-drag-pan .l7-canvas {\r\n  touch-action: pinch-zoom;\r\n}\r\n\r\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan,\r\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan .l7-canvas {\r\n  touch-action: none;\r\n}\r\n\r\n.l7-ctrl-top-left,\r\n.l7-ctrl-top-right,\r\n.l7-ctrl-bottom-left,\r\n.l7-ctrl-bottom-right { position: absolute; pointer-events: none; z-index: 2; }\r\n.l7-ctrl-top-left     { top: 0; left: 0; }\r\n.l7-ctrl-top-right    { top: 0; right: 0; }\r\n.l7-ctrl-bottom-left  { bottom: 0; left: 0; }\r\n.l7-ctrl-bottom-right { right: 0; bottom: 0; }\r\n\r\n.l7-ctrl {\r\n  clear: both;\r\n  pointer-events: auto;\r\n\r\n  /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */\r\n  transform: translate(0, 0);\r\n}\r\n.l7-ctrl-top-left .l7-ctrl     { margin: 10px 0 0 10px; float: left; }\r\n.l7-ctrl-top-right .l7-ctrl    { margin: 10px 10px 0 0; float: right; }\r\n.l7-ctrl-bottom-left .l7-ctrl  { margin: 0 0 10px 10px; float: left; }\r\n.l7-ctrl-bottom-right .l7-ctrl { margin: 0 10px 10px 0; float: right; }\r\n\r\n\r\n.l7-crosshair,\r\n.l7-crosshair .l7-interactive,\r\n.l7-crosshair .l7-interactive:active {\r\n    cursor: crosshair;\r\n}\r\n\r\n.l7-boxzoom {\r\n    position: absolute;\r\n    top: 0;\r\n    left: 0;\r\n    width: 0;\r\n    height: 0;\r\n    background: #fff;\r\n    border: 2px dotted #202020;\r\n    opacity: 0.5;\r\n    z-index: 10;\r\n}\r\n");var HU={create:function(e,t,r){var n=Yv.document.createElement(e);return void 0!==t&&(n.className=t),r&&r.appendChild(n),n},createNS:function(e,t){return Yv.document.createElementNS(e,t)}},WU=Yv.document&&Yv.document.documentElement.style;function YU(e){if(!WU)return e[0];var t,r=k(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n in WU)return n}}catch(e){r.e(e)}finally{r.f()}return e[0]}var XU,ZU=YU(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);HU.disableDrag=function(){WU&&ZU&&(XU=WU[ZU],WU[ZU]="none")},HU.enableDrag=function(){WU&&ZU&&(WU[ZU]=XU)};var qU=YU(["transform","WebkitTransform"]);HU.setTransform=function(e,t){e.style[qU]=t};var KU=!1;try{var QU=Object.defineProperty({},"passive",{get:function(){KU=!0}});Yv.addEventListener("test",QU,QU),Yv.removeEventListener("test",QU,QU)}catch(e){KU=!1}HU.addEventListener=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"passive"in n&&KU?e.addEventListener(t,r,n):e.addEventListener(t,r,n.capture)},HU.removeEventListener=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"passive"in n&&KU?e.removeEventListener(t,r,n):e.removeEventListener(t,r,n.capture)};var $U=function e(t){t.preventDefault(),t.stopPropagation(),Yv.removeEventListener("click",e,!0)};HU.suppressClick=function(){Hv||(Yv.addEventListener("click",$U,!0),setTimeout((function(){Yv.removeEventListener("click",$U,!0)}),0))},HU.mousePos=function(e,t){if(Hv)return new OU(t.clientX-e.left-0,t.clientY-e.top-0);var r=e.getBoundingClientRect();return new OU(t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop)},HU.touchPos=function(e,t){if(Hv){var r,n=[],i=k(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;n.push(new OU(a.clientX-e.left,a.clientY-e.top))}}catch(e){i.e(e)}finally{i.f()}return n}var o,s=e.getBoundingClientRect(),u=[],c=k(t);try{for(c.s();!(o=c.n()).done;){var l=o.value;u.push(new OU(l.clientX-s.left-e.clientLeft,l.clientY-s.top-e.clientTop))}}catch(e){c.e(e)}finally{c.f()}return u},HU.mouseButton=function(e){return Hv&&void 0!==Yv.InstallTrigger&&2===e.button&&e.ctrlKey&&Yv.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},HU.remove=function(e){e.parentNode&&e.parentNode.removeChild(e)};var JU=function(e){f(r,e);var t=x(r);function r(e,n,i){var a,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};u(this,r);var s=HU.mousePos(n.getCanvasContainer(),i),c=n.unproject(s);return h(_(a=t.call(this,e,cP({point:s,lngLat:c,originalEvent:i},o))),"type",void 0),h(_(a),"target",void 0),h(_(a),"originalEvent",void 0),h(_(a),"point",void 0),h(_(a),"lngLat",void 0),h(_(a),"defaultPrevented",void 0),a.defaultPrevented=!1,a.target=n,a}return l(r,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),r}(VU),ej=function(e){f(r,e);var t=x(r);function r(e,n,i){var a;u(this,r);var o="touchend"===e?i.changedTouches:i.touches,s=HU.touchPos(n.getCanvasContainer(),o),c=s.map((function(e){return n.unproject(e)})),l=s.reduce((function(e,t,r,n){return e.add(t.div(n.length))}),new OU(0,0)),f=n.unproject(l);return h(_(a=t.call(this,e,{points:s,point:l,lngLats:c,lngLat:f,originalEvent:i})),"type",void 0),h(_(a),"target",void 0),h(_(a),"originalEvent",void 0),h(_(a),"lngLat",void 0),h(_(a),"point",void 0),h(_(a),"points",void 0),h(_(a),"lngLats",void 0),h(_(a),"defaultPrevented",void 0),a.defaultPrevented=!1,a}return l(r,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),r}(VU),tj=function(e){f(r,e);var t=x(r);function r(e,n,i){var a;return u(this,r),h(_(a=t.call(this,e,{originalEvent:i})),"type",void 0),h(_(a),"originalEvent",void 0),h(_(a),"defaultPrevented",void 0),h(_(a),"target",void 0),a.defaultPrevented=!1,a}return l(r,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),r}(VU),rj=function(){function e(t){u(this,e),h(this,"map",void 0),h(this,"delayContextMenu",void 0),h(this,"contextMenuEvent",void 0),this.map=t}return l(e,[{key:"reset",value:function(){this.delayContextMenu=!1,delete this.contextMenuEvent}},{key:"mousemove",value:function(e){this.map.emit(e.type,new JU(e.type,this.map,e))}},{key:"mousedown",value:function(){this.delayContextMenu=!0}},{key:"mouseup",value:function(){this.delayContextMenu=!1,this.contextMenuEvent&&(this.map.emit("contextmenu",new JU("contextmenu",this.map,this.contextMenuEvent)),delete this.contextMenuEvent)}},{key:"contextmenu",value:function(e){this.delayContextMenu?this.contextMenuEvent=e:this.map.emit(e.type,new JU(e.type,this.map,e)),this.map.listeners("contextmenu")&&e.preventDefault()}},{key:"isEnabled",value:function(){return!0}},{key:"isActive",value:function(){return!1}},{key:"enable",value:function(){return!0}},{key:"disable",value:function(){return!1}}]),e}(),nj=function(){function e(t,r){u(this,e),h(this,"map",void 0),h(this,"el",void 0),h(this,"container",void 0),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"startPos",void 0),h(this,"lastPos",void 0),h(this,"box",void 0),h(this,"clickTolerance",void 0),this.map=t,this.el=t.getCanvasContainer(),this.container=t.getContainer(),this.clickTolerance=r.clickTolerance||1}return l(e,[{key:"isEnabled",value:function(){return!!this.enabled}},{key:"isActive",value:function(){return!!this.active}},{key:"enable",value:function(){this.isEnabled()||(this.enabled=!0)}},{key:"disable",value:function(){this.isEnabled()&&(this.enabled=!1)}},{key:"mousedown",value:function(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(HU.disableDrag(),this.startPos=this.lastPos=t,this.active=!0)}},{key:"mousemoveWindow",value:function(e,t){if(this.active){var r=t;if(!(this.lastPos.equals(r)||!this.box&&r.dist(this.startPos)<this.clickTolerance)){var n=this.startPos;this.lastPos=r,this.box||(this.box=HU.create("div","l7-boxzoom",this.container),this.container.classList.add("l7-crosshair"),this.fireEvent("boxzoomstart",e));var i=Math.min(n.x,r.x),a=Math.max(n.x,r.x),o=Math.min(n.y,r.y),s=Math.max(n.y,r.y);HU.setTransform(this.box,"translate(".concat(i,"px,").concat(o,"px)")),this.box&&(this.box.style.width="".concat(a-i,"px"),this.box.style.height="".concat(s-o,"px"))}}}},{key:"mouseupWindow",value:function(e,t){var r=this;if(this.active&&0===e.button){var n=this.startPos,i=t;if(this.reset(),HU.suppressClick(),n.x!==i.x||n.y!==i.y)return this.map.emit("boxzoomend",new VU("boxzoomend",{originalEvent:e})),{cameraAnimation:function(e){return e.fitScreenCoordinates(n,i,r.map.getBearing(),{linear:!0})}};this.fireEvent("boxzoomcancel",e)}}},{key:"keydown",value:function(e){this.active&&27===e.keyCode&&(this.reset(),this.fireEvent("boxzoomcancel",e))}},{key:"reset",value:function(){this.active=!1,this.container.classList.remove("l7-crosshair"),this.box&&(HU.remove(this.box),this.box=null),HU.enableDrag(),delete this.startPos,delete this.lastPos}},{key:"fireEvent",value:function(e,t){return this.map.emit(e,new VU(e,{originalEvent:t}))}}]),e}(),ij=function(){function e(){u(this,e),h(this,"enabled",void 0),h(this,"active",void 0),this.reset()}return l(e,[{key:"reset",value:function(){this.active=!1}},{key:"dblclick",value:function(e,t){return e.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(e.shiftKey?-1:1),around:r.unproject(t)},{originalEvent:e})}}}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}}]),e}(),aj=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"type","renderFrame"),h(_(e),"timeStamp",void 0),e}return l(r)}(VU),oj={linearity:.3,easing:SU(0,0,.3,1)},sj=cP({deceleration:2500,maxSpeed:1400},oj),uj=cP({deceleration:20,maxSpeed:1400},oj),cj=cP({deceleration:1e3,maxSpeed:360},oj),lj=cP({deceleration:1e3,maxSpeed:90},oj),hj=function(){function e(t){u(this,e),h(this,"map",void 0),h(this,"inertiaBuffer",void 0),this.map=t,this.clear()}return l(e,[{key:"clear",value:function(){this.inertiaBuffer=[]}},{key:"record",value:function(e){this.drainInertiaBuffer(),this.inertiaBuffer.push({time:wU(),settings:e})}},{key:"drainInertiaBuffer",value:function(){for(var e=this.inertiaBuffer,t=wU();e.length>0&&t-e[0].time>160;)e.shift()}},{key:"onMoveEnd",value:function(e){if(this.drainInertiaBuffer(),!(this.inertiaBuffer.length<2)){var t,r={zoom:0,bearing:0,pitch:0,pan:new OU(0,0),pinchAround:void 0,around:void 0},n=k(this.inertiaBuffer);try{for(n.s();!(t=n.n()).done;){var i=t.value.settings;r.zoom+=i.zoomDelta||0,r.bearing+=i.bearingDelta||0,r.pitch+=i.pitchDelta||0,i.panDelta&&r.pan._add(i.panDelta),i.around&&(r.around=i.around),i.pinchAround&&(r.pinchAround=i.pinchAround)}}catch(e){n.e(e)}finally{n.f()}var a=this.inertiaBuffer[this.inertiaBuffer.length-1].time-this.inertiaBuffer[0].time,o={};if(r.pan.mag()){var s=pj(r.pan.mag(),a,cP({},sj,e||{}));o.offset=r.pan.mult(s.amount/r.pan.mag()),o.center=this.map.transform.center,fj(o,s)}if(r.zoom){var u=pj(r.zoom,a,uj);o.zoom=this.map.transform.zoom+u.amount,fj(o,u)}if(r.bearing){var c=pj(r.bearing,a,cj);o.bearing=this.map.transform.bearing+bU(c.amount,-179,179),fj(o,c)}if(r.pitch){var l=pj(r.pitch,a,lj);o.pitch=this.map.transform.pitch+l.amount,fj(o,l)}if(o.zoom||o.bearing){var h=void 0===r.pinchAround?r.around:r.pinchAround;o.around=h?this.map.unproject(h):this.map.getCenter()}return this.clear(),cP(o,{noMoveStart:!0})}}}]),e}();function fj(e,t){(!e.duration||e.duration<t.duration)&&(e.duration=t.duration,e.easing=t.easing)}function pj(e,t,r){var n=r.maxSpeed,i=r.linearity,a=r.deceleration,o=bU(e*i/(t/1e3),-n,n),s=Math.abs(o)/(a*i);return{easing:r.easing,duration:1e3*s,amount:o*(s/2)}}var dj={panStep:100,bearingStep:15,pitchStep:10},vj=function(){function e(){u(this,e),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"panStep",void 0),h(this,"bearingStep",void 0),h(this,"pitchStep",void 0);var t=dj;this.panStep=t.panStep,this.bearingStep=t.bearingStep,this.pitchStep=t.pitchStep}return l(e,[{key:"reset",value:function(){this.active=!1}},{key:"keydown",value:function(e){var t=this;if(!(e.altKey||e.ctrlKey||e.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?n=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?n=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?i=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?i=-1:(e.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var u=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:gj,zoom:r?Math.round(u)+r*(e.shiftKey?2:1):u,bearing:s.getBearing()+n*t.bearingStep,pitch:s.getPitch()+i*t.pitchStep,offset:[-a*t.panStep,-o*t.panStep],center:s.getCenter()},{originalEvent:e})}}}}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}}]),e}();function gj(e){return e*(2-e)}var mj,yj=function(){function e(t,r){u(this,e),h(this,"mousedownPos",void 0),h(this,"clickTolerance",void 0),h(this,"map",void 0),this.map=t,this.clickTolerance=r.clickTolerance}return l(e,[{key:"reset",value:function(){delete this.mousedownPos}},{key:"wheel",value:function(e){return this.firePreventable(new tj(e.type,this.map,e))}},{key:"mousedown",value:function(e,t){return this.mousedownPos=t,this.firePreventable(new JU(e.type,this.map,e))}},{key:"mouseup",value:function(e){this.map.emit(e.type,new JU(e.type,this.map,e))}},{key:"click",value:function(e,t){this.mousedownPos&&this.mousedownPos.dist(t)>=this.clickTolerance||this.map.emit(e.type,new JU(e.type,this.map,e))}},{key:"dblclick",value:function(e){return this.firePreventable(new JU(e.type,this.map,e))}},{key:"mouseover",value:function(e){this.map.emit(e.type,new JU(e.type,this.map,e))}},{key:"mouseout",value:function(e){this.map.emit(e.type,new JU(e.type,this.map,e))}},{key:"touchstart",value:function(e){return this.firePreventable(new ej(e.type,this.map,e))}},{key:"touchmove",value:function(e){this.map.emit(e.type,new ej(e.type,this.map,e))}},{key:"touchend",value:function(e){this.map.emit(e.type,new ej(e.type,this.map,e))}},{key:"touchcancel",value:function(e){this.map.emit(e.type,new ej(e.type,this.map,e))}},{key:"firePreventable",value:function(e){if(this.map.emit(e.type,e),e.defaultPrevented)return{}}},{key:"isEnabled",value:function(){return!0}},{key:"isActive",value:function(){return!1}},{key:"enable",value:function(){return!1}},{key:"disable",value:function(){return!1}}]),e}(),_j=(h(mj={},0,1),h(mj,2,2),mj);var bj=function(){function e(t){u(this,e),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"lastPoint",void 0),h(this,"eventButton",void 0),h(this,"moved",void 0),h(this,"clickTolerance",void 0),this.reset(),this.clickTolerance=t.clickTolerance||1}return l(e,[{key:"reset",value:function(){this.active=!1,this.moved=!1,delete this.lastPoint,delete this.eventButton}},{key:"mousedown",value:function(e,t){if(!this.lastPoint){var r=HU.mouseButton(e);this.correctButton(e,r)&&(this.lastPoint=t,this.eventButton=r)}}},{key:"mousemoveWindow",value:function(e,t){var r=this.lastPoint;if(r)if(e.preventDefault(),function(e,t){var r=_j[t];return void 0===e.buttons||(e.buttons&r)!==r}(e,this.eventButton))this.reset();else if(this.moved||!(t.dist(r)<this.clickTolerance))return this.moved=!0,this.lastPoint=t,this.move(r,t)}},{key:"mouseupWindow",value:function(e){this.lastPoint&&(HU.mouseButton(e)===this.eventButton&&(this.moved&&HU.suppressClick(),this.reset()))}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}},{key:"correctButton",value:function(e,t){return!1}},{key:"move",value:function(e,t){}}]),e}(),xj=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"mousedown",value:function(e,t){E(p(r.prototype),"mousedown",this).call(this,e,t),this.lastPoint&&(this.active=!0)}},{key:"move",value:function(e,t){return{around:t,panDelta:t.sub(e)}}},{key:"correctButton",value:function(e,t){return 0===t&&!e.ctrlKey}}]),r}(bj),Sj=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"correctButton",value:function(e,t){return 0===t&&e.ctrlKey||2===t}},{key:"move",value:function(e,t){var r=-.5*(t.y-e.y);if(r)return this.active=!0,{pitchDelta:r}}},{key:"contextmenu",value:function(e){e.preventDefault()}}]),r}(bj),Ej=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"contextmenu",value:function(e){e.preventDefault()}},{key:"correctButton",value:function(e,t){return 0===t&&e.ctrlKey||2===t}},{key:"move",value:function(e,t){var r=.8*(t.x-e.x);if(r)return this.active=!0,{bearingDelta:r}}}]),r}(bj),Aj=function(){function e(t,r){var n=this;u(this,e),h(this,"map",void 0),h(this,"el",void 0),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"zooming",void 0),h(this,"aroundCenter",void 0),h(this,"around",void 0),h(this,"aroundPoint",void 0),h(this,"type",void 0),h(this,"lastValue",void 0),h(this,"timeout",void 0),h(this,"finishTimeout",void 0),h(this,"lastWheelEvent",void 0),h(this,"lastWheelEventTime",void 0),h(this,"startZoom",void 0),h(this,"targetZoom",void 0),h(this,"delta",void 0),h(this,"easing",void 0),h(this,"prevEase",void 0),h(this,"frameId",void 0),h(this,"handler",void 0),h(this,"defaultZoomRate",void 0),h(this,"wheelZoomRate",void 0),h(this,"onScrollFrame",(function(){if(n.frameId&&(n.frameId=null,n.isActive())){var e=n.map.transform;if(0!==n.delta){var t="wheel"===n.type&&Math.abs(n.delta)>4.000244140625?n.wheelZoomRate:n.defaultZoomRate,r=2/(1+Math.exp(-Math.abs(n.delta*t)));n.delta<0&&0!==r&&(r=1/r);var i="number"==typeof n.targetZoom?e.zoomScale(n.targetZoom):e.scale;n.targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(i*r))),"wheel"===n.type&&(n.startZoom=e.zoom,n.easing=n.smoothOutEasing(200)),n.delta=0}var a,o="number"==typeof n.targetZoom?n.targetZoom:e.zoom,s=n.startZoom,u=n.easing,c=!1;if("wheel"===n.type&&s&&u){var l=Math.min((wU()-n.lastWheelEventTime)/200,1);a=xU(s,o,u(l)),l<1?n.frameId||(n.frameId=!0):c=!0}else a=o,c=!0;return n.active=!0,c&&(n.active=!1,n.finishTimeout=setTimeout((function(){n.zooming=!1,n.handler.triggerRenderFrame(),delete n.targetZoom,delete n.finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-e.zoom,around:n.aroundPoint,originalEvent:n.lastWheelEvent}}})),this.map=t,this.el=t.getCanvasContainer(),this.handler=r,this.delta=0,this.defaultZoomRate=.01,this.wheelZoomRate=1/450}return l(e,[{key:"setZoomRate",value:function(e){this.defaultZoomRate=e}},{key:"setWheelZoomRate",value:function(e){this.wheelZoomRate=e}},{key:"isEnabled",value:function(){return!!this.enabled}},{key:"isActive",value:function(){return!!this.active||void 0!==this.finishTimeout}},{key:"isZooming",value:function(){return!!this.zooming}},{key:"enable",value:function(e){this.isEnabled()||(this.enabled=!0,this.aroundCenter=e&&"center"===e.around)}},{key:"disable",value:function(){this.isEnabled()&&(this.enabled=!1)}},{key:"wheel",value:function(e){if(this.isEnabled()){var t=e.deltaMode===window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=wU(),n=r-(this.lastWheelEventTime||0);this.lastWheelEventTime=r,0!==t&&t%4.000244140625==0?this.type="wheel":0!==t&&Math.abs(t)<4?this.type="trackpad":n>400?(this.type=null,this.lastValue=t,this.timeout=setTimeout(this.onTimeout,40,e)):this.type||(this.type=Math.abs(n*t)<200?"trackpad":"wheel",this.timeout&&(clearTimeout(this.timeout),this.timeout=null,t+=this.lastValue)),e.shiftKey&&t&&(t/=4),this.type&&(this.lastWheelEvent=e,this.delta-=t,this.active||this.start(e)),e.preventDefault()}}},{key:"renderFrame",value:function(){return this.onScrollFrame()}},{key:"reset",value:function(){this.active=!1}},{key:"onTimeout",value:function(e){this.type="wheel",this.delta-=this.lastValue,!this.active&&this.start&&this.start(e)}},{key:"start",value:function(e){if(this.delta){this.frameId&&(this.frameId=null),this.active=!0,this.isZooming()||(this.zooming=!0),this.finishTimeout&&(clearTimeout(this.finishTimeout),delete this.finishTimeout);var t=HU.mousePos(this.el,e);this.around=PU.convert(this.aroundCenter?this.map.getCenter():this.map.unproject(t)),this.aroundPoint=this.map.transform.locationPoint(this.around),this.frameId||(this.frameId=!0,this.handler.triggerRenderFrame())}}},{key:"smoothOutEasing",value:function(e){var t=EU;if(this.prevEase){var r=this.prevEase,n=(wU()-r.start)/r.duration,i=r.easing(n+.01)-r.easing(n),a=.27/Math.sqrt(i*i+1e-4)*.01;t=SU(a,Math.sqrt(.0729-a*a),.25,1)}return this.prevEase={start:wU(),duration:e,easing:t},t}}]),e}(),Tj=function(){function e(t,r){u(this,e),h(this,"clickZoom",void 0),h(this,"tapZoom",void 0),this.clickZoom=t,this.tapZoom=r}return l(e,[{key:"enable",value:function(){this.clickZoom.enable(),this.tapZoom.enable()}},{key:"disable",value:function(){this.clickZoom.disable(),this.tapZoom.disable()}},{key:"isEnabled",value:function(){return this.clickZoom.isEnabled()&&this.tapZoom.isEnabled()}},{key:"isActive",value:function(){return this.clickZoom.isActive()||this.tapZoom.isActive()}}]),e}(),wj=function(){function e(t,r,n){u(this,e),h(this,"inertiaOptions",void 0),h(this,"el",void 0),h(this,"mousePan",void 0),h(this,"touchPan",void 0),this.el=t,this.mousePan=r,this.touchPan=n}return l(e,[{key:"enable",value:function(e){this.inertiaOptions=e||{},this.mousePan.enable(),this.touchPan.enable(),Hv||this.el.classList.add("l7-touch-drag-pan")}},{key:"disable",value:function(){this.mousePan.disable(),this.touchPan.disable(),Hv||this.el.classList.remove("l7-touch-drag-pan")}},{key:"isEnabled",value:function(){return this.mousePan.isEnabled()&&this.touchPan.isEnabled()}},{key:"isActive",value:function(){return this.mousePan.isActive()||this.touchPan.isActive()}}]),e}(),Cj=function(){function e(t,r,n){u(this,e),h(this,"mouseRotate",void 0),h(this,"mousePitch",void 0),h(this,"pitchWithRotate",void 0),this.pitchWithRotate=t.pitchWithRotate,this.mouseRotate=r,this.mousePitch=n}return l(e,[{key:"enable",value:function(){this.mouseRotate.enable(),this.pitchWithRotate&&this.mousePitch.enable()}},{key:"disable",value:function(){this.mouseRotate.disable(),this.mousePitch.disable()}},{key:"isEnabled",value:function(){return this.mouseRotate.isEnabled()&&(!this.pitchWithRotate||this.mousePitch.isEnabled())}},{key:"isActive",value:function(){return this.mouseRotate.isActive()||this.mousePitch.isActive()}}]),e}(),kj=function(){function e(t,r,n,i){u(this,e),h(this,"el",void 0),h(this,"touchZoom",void 0),h(this,"touchRotate",void 0),h(this,"tapDragZoom",void 0),h(this,"rotationDisabled",void 0),h(this,"enabled",void 0),this.el=t,this.touchZoom=r,this.touchRotate=n,this.tapDragZoom=i,this.rotationDisabled=!1,this.enabled=!0}return l(e,[{key:"enable",value:function(e){this.touchZoom.enable(e),this.rotationDisabled||this.touchRotate.enable(e),this.tapDragZoom.enable(),Hv||this.el.classList.add("l7-touch-zoom-rotate")}},{key:"disable",value:function(){this.touchZoom.disable(),this.touchRotate.disable(),this.tapDragZoom.disable(),Hv||this.el.classList.remove("l7-touch-zoom-rotate")}},{key:"isEnabled",value:function(){return this.touchZoom.isEnabled()&&(this.rotationDisabled||this.touchRotate.isEnabled())&&this.tapDragZoom.isEnabled()}},{key:"isActive",value:function(){return this.touchZoom.isActive()||this.touchRotate.isActive()||this.tapDragZoom.isActive()}},{key:"disableRotation",value:function(){this.rotationDisabled=!0,this.touchRotate.disable()}},{key:"enableRotation",value:function(){this.rotationDisabled=!1,this.touchZoom.isEnabled()&&this.touchRotate.enable()}}]),e}();function Mj(e,t){for(var r={},n=0;n<e.length;n++)r[e[n].identifier]=t[n];return r}var Pj=function(){function e(t){u(this,e),h(this,"numTouches",void 0),h(this,"centroid",void 0),h(this,"startTime",void 0),h(this,"aborted",void 0),h(this,"touches",void 0),this.reset(),this.numTouches=t.numTouches}return l(e,[{key:"reset",value:function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}},{key:"touchstart",value:function(e,t,r){(this.centroid||r.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),r.length===this.numTouches&&(this.centroid=function(e){var t,r=new OU(0,0),n=k(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;r._add(i)}}catch(e){n.e(e)}finally{n.f()}return r.div(e.length)}(t),this.touches=Mj(r,t)))}},{key:"touchmove",value:function(e,t,r){if(!this.aborted&&this.centroid){var n=Mj(r,t);for(var i in this.touches)if(this.touches[i]){var a=this.touches[i],o=n[i];(!o||o.dist(a)>30)&&(this.aborted=!0)}}}},{key:"touchend",value:function(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}}}]),e}(),Ij=function(){function e(t){u(this,e),h(this,"singleTap",void 0),h(this,"numTaps",void 0),h(this,"lastTime",void 0),h(this,"lastTap",void 0),h(this,"count",void 0),this.singleTap=new Pj(t),this.numTaps=t.numTaps,this.reset()}return l(e,[{key:"reset",value:function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}},{key:"touchstart",value:function(e,t,r){this.singleTap.touchstart(e,t,r)}},{key:"touchmove",value:function(e,t,r){this.singleTap.touchmove(e,t,r)}},{key:"touchend",value:function(e,t,r){var n=this.singleTap.touchend(e,t,r);if(n){var i=e.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}}}]),e}(),Oj=function(){function e(){u(this,e),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"swipePoint",void 0),h(this,"swipeTouch",void 0),h(this,"tapTime",void 0),h(this,"tap",void 0),this.tap=new Ij({numTouches:1,numTaps:1}),this.reset()}return l(e,[{key:"reset",value:function(){this.active=!1,delete this.swipePoint,delete this.swipeTouch,delete this.tapTime,this.tap.reset()}},{key:"touchstart",value:function(e,t,r){this.swipePoint||(this.tapTime&&e.timeStamp-this.tapTime>500&&this.reset(),this.tapTime?r.length>0&&(this.swipePoint=t[0],this.swipeTouch=r[0].identifier):this.tap.touchstart(e,t,r))}},{key:"touchmove",value:function(e,t,r){if(this.tapTime){if(this.swipePoint){if(r[0].identifier!==this.swipeTouch)return;var n=t[0],i=n.y-this.swipePoint.y;return this.swipePoint=n,e.preventDefault(),this.active=!0,{zoomDelta:i/128}}}else this.tap.touchmove(e,t,r)}},{key:"touchend",value:function(e,t,r){this.tapTime?this.swipePoint&&0===r.length&&this.reset():this.tap.touchend(e,t,r)&&(this.tapTime=e.timeStamp)}},{key:"touchcancel",value:function(){this.reset()}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}}]),e}(),Rj=function(){function e(){u(this,e),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"zoomIn",void 0),h(this,"zoomOut",void 0),this.zoomIn=new Ij({numTouches:1,numTaps:2}),this.zoomOut=new Ij({numTouches:2,numTaps:1}),this.reset()}return l(e,[{key:"reset",value:function(){this.active=!1,this.zoomIn.reset(),this.zoomOut.reset()}},{key:"touchstart",value:function(e,t,r){this.zoomIn.touchstart(e,t,r),this.zoomOut.touchstart(e,t,r)}},{key:"touchmove",value:function(e,t,r){this.zoomIn.touchmove(e,t,r),this.zoomOut.touchmove(e,t,r)}},{key:"touchend",value:function(e,t,r){var n=this,i=this.zoomIn.touchend(e,t,r),a=this.zoomOut.touchend(e,t,r);return i?(this.active=!0,e.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()+1,around:t.unproject(i)},{originalEvent:e})}}):a?(this.active=!0,e.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(t){return t.easeTo({duration:300,zoom:t.getZoom()-1,around:t.unproject(a)},{originalEvent:e})}}):void 0}},{key:"touchcancel",value:function(){this.reset()}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}}]),e}(),Lj=function(){function e(t){u(this,e),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"touches",void 0),h(this,"minTouches",void 0),h(this,"clickTolerance",void 0),h(this,"sum",void 0),this.minTouches=1,this.clickTolerance=t.clickTolerance||1,this.reset()}return l(e,[{key:"reset",value:function(){this.active=!1,this.touches={},this.sum=new OU(0,0)}},{key:"touchstart",value:function(e,t,r){return this.calculateTransform(e,t,r)}},{key:"touchmove",value:function(e,t,r){if(this.active)return e.preventDefault(),this.calculateTransform(e,t,r)}},{key:"touchend",value:function(e,t,r){this.calculateTransform(e,t,r),this.active&&r.length<this.minTouches&&this.reset()}},{key:"touchcancel",value:function(){this.reset()}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}},{key:"calculateTransform",value:function(e,t,r){r.length>0&&(this.active=!0);var n=Mj(r,t),i=new OU(0,0),a=new OU(0,0),o=0;for(var s in n)if(n[s]){var u=n[s],c=this.touches[s];c&&(i._add(u),a._add(u.sub(c)),o++,n[s]=u)}if(this.touches=n,!(o<this.minTouches)&&a.mag()){var l=a.div(o);if(this.sum._add(l),!(this.sum.mag()<this.clickTolerance))return{around:i.div(o),panDelta:l}}}}]),e}(),Nj=function(){function e(){u(this,e),h(this,"enabled",void 0),h(this,"active",void 0),h(this,"firstTwoTouches",void 0),h(this,"vector",void 0),h(this,"startVector",void 0),h(this,"aroundCenter",void 0),this.reset()}return l(e,[{key:"reset",value:function(){this.active=!1,delete this.firstTwoTouches}},{key:"start",value:function(e){}},{key:"move",value:function(e,t,r){}},{key:"touchstart",value:function(e,t,r){this.firstTwoTouches||r.length<2||(this.firstTwoTouches=[r[0].identifier,r[1].identifier],this.start([t[0],t[1]]))}},{key:"touchmove",value:function(e,t,r){if(this.firstTwoTouches){e.preventDefault();var n=A(this.firstTwoTouches,2),i=n[0],a=n[1],o=Dj(r,t,i),s=Dj(r,t,a);if(o&&s){var u=this.aroundCenter?null:o.add(s).div(2);return this.move([o,s],u,e)}}}},{key:"touchend",value:function(e,t,r){if(this.firstTwoTouches){var n=A(this.firstTwoTouches,2),i=n[0],a=n[1],o=Dj(r,t,i),s=Dj(r,t,a);o&&s||(this.active&&HU.suppressClick(),this.reset())}}},{key:"touchcancel",value:function(){this.reset()}},{key:"enable",value:function(e){this.enabled=!0,this.aroundCenter=!!e&&"center"===e.around}},{key:"disable",value:function(){this.enabled=!1,this.reset()}},{key:"isEnabled",value:function(){return this.enabled}},{key:"isActive",value:function(){return this.active}}]),e}();function Dj(e,t,r){for(var n=0;n<e.length;n++)if(e[n].identifier===r)return t[n]}function Fj(e){return Math.abs(e.y)>Math.abs(e.x)}var zj=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"valid",void 0),h(_(e),"firstMove",void 0),h(_(e),"lastPoints",void 0),e}return l(r,[{key:"reset",value:function(){E(p(r.prototype),"reset",this).call(this),this.valid=void 0,delete this.firstMove,delete this.lastPoints}},{key:"start",value:function(e){this.lastPoints=e,Fj(e[0].sub(e[1]))&&(this.valid=!1)}},{key:"move",value:function(e,t,r){var n=e[0].sub(this.lastPoints[0]),i=e[1].sub(this.lastPoints[1]);if(this.valid=this.gestureBeginsVertically(n,i,r.timeStamp),this.valid){this.lastPoints=e,this.active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}}},{key:"gestureBeginsVertically",value:function(e,t,r){if(void 0!==this.valid)return this.valid;var n=e.mag()>=2,i=t.mag()>=2;if(n||i){if(!n||!i)return void 0===this.firstMove&&(this.firstMove=r),r-this.firstMove<100&&void 0;var a=e.y>0==t.y>0;return Fj(e)&&Fj(t)&&a}}}]),r}(Nj);function Bj(e,t){return 180*e.angleWith(t)/Math.PI}var Uj=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"minDiameter",void 0),e}return l(r,[{key:"reset",value:function(){E(p(r.prototype),"reset",this).call(this),delete this.minDiameter,delete this.startVector,delete this.vector}},{key:"start",value:function(e){this.startVector=this.vector=e[0].sub(e[1]),this.minDiameter=e[0].dist(e[1])}},{key:"move",value:function(e,t){var r=this.vector;if(this.vector=e[0].sub(e[1]),this.active||!this.isBelowThreshold(this.vector))return this.active=!0,{bearingDelta:Bj(this.vector,r),pinchAround:t}}},{key:"isBelowThreshold",value:function(e){this.minDiameter=Math.min(this.minDiameter,e.mag());var t=25/(Math.PI*this.minDiameter)*360,r=Bj(e,this.startVector);return Math.abs(r)<t}}]),r}(Nj);function jj(e,t){return Math.log(e/t)/Math.LN2}var Vj=function(e){f(r,e);var t=x(r);function r(){var e;u(this,r);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return h(_(e=t.call.apply(t,[this].concat(i))),"distance",void 0),h(_(e),"startDistance",void 0),e}return l(r,[{key:"reset",value:function(){E(p(r.prototype),"reset",this).call(this),delete this.distance,delete this.startDistance}},{key:"start",value:function(e){this.startDistance=this.distance=e[0].dist(e[1])}},{key:"move",value:function(e,t){var r=this.distance;if(this.distance=e[0].dist(e[1]),this.active||!(Math.abs(jj(this.distance,this.startDistance))<.1))return this.active=!0,{zoomDelta:jj(this.distance,r),pinchAround:t}}}]),r}(Nj),Gj=function(e){return e.zoom||e.drag||e.pitch||e.rotate};function Hj(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}var Wj,Yj,Xj=function(){function e(t,r){var n=this;u(this,e),h(this,"map",void 0),h(this,"el",void 0),h(this,"handlers",void 0),h(this,"eventsInProgress",void 0),h(this,"frameId",void 0),h(this,"inertia",void 0),h(this,"bearingSnap",void 0),h(this,"handlersById",void 0),h(this,"updatingCamera",void 0),h(this,"changes",void 0),h(this,"previousActiveHandlers",void 0),h(this,"bearingChanged",void 0),h(this,"rotateEnabled",void 0),h(this,"pitchEnabled",void 0),h(this,"listeners",void 0),h(this,"handleWindowEvent",(function(e){n.handleEvent(e,"".concat(e.type,"Window"))})),h(this,"handleEvent",(function(e,t){if("blur"!==e.type){n.updatingCamera=!0;var r,i="renderFrame"===e.type?void 0:e,a={needsRenderFrame:!1},o={},s={},u=e.touches?n.getMapTouches(e.touches):void 0,c=u?HU.touchPos(n.el,u):HU.mousePos(n.el,e),l=k(n.handlers);try{for(l.s();!(r=l.n()).done;){var h=r.value,f=h.handlerName,p=h.handler,d=h.allowed;if(p.isEnabled()){var v=void 0;if(n.blockedByActive(s,d,f))p.reset();else{var g=t||e.type;p&&p[g]&&(v=p[g](e,c,u),n.mergeIHandlerResult(a,o,v,f,i),v&&v.needsRenderFrame&&n.triggerRenderFrame())}(v||p.isActive())&&(s[f]=p)}}}catch(e){l.e(e)}finally{l.f()}var m={};for(var y in n.previousActiveHandlers)s[y]||(m[y]=i);n.previousActiveHandlers=s,(Object.keys(m).length||Hj(a))&&(n.changes.push([a,o,m]),n.triggerRenderFrame()),(Object.keys(s).length||Hj(a))&&n.map.stop(!0),n.updatingCamera=!1;var _=a.cameraAnimation;_&&(n.inertia.clear(),n.fireEvents({},{}),n.changes=[],_(n.map))}else n.stop()})),this.map=t,this.el=this.map.getCanvasContainer(),this.handlers=[],this.handlersById={},this.changes=[],this.inertia=new hj(t),this.bearingSnap=r.bearingSnap,this.rotateEnabled=r.rotateEnabled,this.pitchEnabled=r.pitchEnabled,this.previousActiveHandlers={},this.eventsInProgress={},this.addDefaultHandlers(r);var i=this.el;if(this.listeners=[],Hv)Yv.document.addEventListener("touchstart",(function(e){n.handleEvent(e)}),{}),Yv.document.addEventListener("touchmove",(function(e){n.handleEvent(e)}),{}),Yv.document.addEventListener("touchend",(function(e){n.handleEvent(e)}),{}),Yv.document.addEventListener("touchcancel",(function(e){n.handleEvent(e)}),{});else{this.listeners=[[i,"touchstart",{passive:!1}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[window.document,"mousemove",{capture:!0}],[window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[window,"blur",void 0]];var a,o=k(this.listeners);try{for(o.s();!(a=o.n()).done;){var s=A(a.value,3),c=s[0],l=s[1],f=s[2];HU.addEventListener(c,l,c===window.document?this.handleWindowEvent:this.handleEvent,f)}}catch(e){o.e(e)}finally{o.f()}}}return l(e,[{key:"destroy",value:function(){var e,t=k(this.listeners);try{for(t.s();!(e=t.n()).done;){var r=A(e.value,3),n=r[0],i=r[1],a=r[2];HU.removeEventListener(n,i,n===window.document?this.handleWindowEvent:this.handleEvent,a)}}catch(e){t.e(e)}finally{t.f()}}},{key:"stop",value:function(){if(!this.updatingCamera){var e,t=k(this.handlers);try{for(t.s();!(e=t.n()).done;){e.value.handler.reset()}}catch(e){t.e(e)}finally{t.f()}this.inertia.clear(),this.fireEvents({},{}),this.changes=[]}}},{key:"isActive",value:function(){var e,t=k(this.handlers);try{for(t.s();!(e=t.n()).done;){if(e.value.handler.isActive())return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"isZooming",value:function(){return!!this.eventsInProgress.zoom||this.map.scrollZoom.isZooming()}},{key:"isRotating",value:function(){return!!this.eventsInProgress.rotate}},{key:"isMoving",value:function(){return Boolean(Gj(this.eventsInProgress))||this.isZooming()}},{key:"mergeIHandlerResult",value:function(e,t,r,n,i){if(r){cP(e,r);var a={handlerName:n,originalEvent:r.originalEvent||i};void 0!==r.zoomDelta&&(t.zoom=a),void 0!==r.panDelta&&(t.drag=a),void 0!==r.pitchDelta&&(t.pitch=a),void 0!==r.bearingDelta&&(t.rotate=a)}}},{key:"triggerRenderFrame",value:function(){var e=this;void 0===this.frameId&&(this.frameId=this.map.requestRenderFrame((function(t){delete e.frameId,e.handleEvent(new aj("renderFrame",{timeStamp:t})),e.applyChanges()})))}},{key:"addDefaultHandlers",value:function(e){var t=this.map,r=t.getCanvasContainer();this.add("mapEvent",new yj(t,e));var n=t.boxZoom=new nj(t,e);this.add("boxZoom",n);var i=new Rj,a=new ij;t.doubleClickZoom=new Tj(a,i),this.add("tapZoom",i),this.add("clickZoom",a);var o=new Oj;this.add("tapDragZoom",o);var s=t.touchPitch=new zj;this.add("touchPitch",s);var u=new Sj(e),c=new Ej(e);t.dragRotate=new Cj(e,u,c),this.add("mouseRotate",u,["mousePitch"]),this.add("mousePitch",c,["mouseRotate"]);var l=new xj(e),h=new Lj(e);t.dragPan=new wj(r,l,h),this.add("mousePan",l),this.add("touchPan",h,["touchZoom","touchRotate"]);var f=new Uj,p=new Vj;t.touchZoomRotate=new kj(r,p,f,o),this.add("touchRotate",f,["touchPan","touchZoom"]),this.add("touchZoom",p,["touchPan","touchRotate"]);var d=t.scrollZoom=new Aj(t,this);this.add("scrollZoom",d,["mousePan"]);var v=t.keyboard=new vj;this.add("keyboard",v),this.add("blockableMapEvent",new rj(t));for(var g=0,m=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];g<m.length;g++){var y=m[g];e.interactive&&e[y]&&t[y].enable(e[y])}}},{key:"add",value:function(e,t,r){this.handlers.push({handlerName:e,handler:t,allowed:r}),this.handlersById[e]=t}},{key:"blockedByActive",value:function(e,t,r){for(var n in e)if(n!==r&&(!t||t.indexOf(n)<0))return!0;return!1}},{key:"getMapTouches",value:function(e){var t,r=[],n=k(e);try{for(n.s();!(t=n.n()).done;){var i=t.value,a=i.target;(Hv||this.el.contains(a))&&r.push(i)}}catch(e){n.e(e)}finally{n.f()}return r}},{key:"applyChanges",value:function(){var e,t={},r={},n={},i=k(this.changes);try{for(i.s();!(e=i.n()).done;){var a=A(e.value,3),o=a[0],s=a[1],u=a[2];o.panDelta&&(t.panDelta=(t.panDelta||new OU(0,0))._add(o.panDelta)),o.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+o.zoomDelta),o.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+o.bearingDelta),o.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+o.pitchDelta),void 0!==o.around&&(t.around=o.around),void 0!==o.pinchAround&&(t.pinchAround=o.pinchAround),o.noInertia&&(t.noInertia=o.noInertia),cP(r,s),cP(n,u)}}catch(e){i.e(e)}finally{i.f()}this.updateMapTransform(t,r,n),this.changes=[]}},{key:"updateMapTransform",value:function(e,t,r){var n=this.map,i=n.transform;if(!Hj(e))return this.fireEvents(t,r);var a=e.panDelta,o=e.zoomDelta,s=e.bearingDelta,u=e.pitchDelta,c=e.pinchAround,l=e.around;void 0!==c&&(l=c),n.stop(!0),l=l||n.transform.centerPoint;var h=i.pointLocation(a?l.sub(a):l);s&&this.rotateEnabled&&(i.bearing+=s),u&&this.pitchEnabled&&(i.pitch+=u),o&&(i.zoom+=o),i.setLocationAtPoint(h,l),this.map.update(),e.noInertia||this.inertia.record(e),this.fireEvents(t,r)}},{key:"fireEvents",value:function(e,t){var r=this,n=Gj(this.eventsInProgress),i=Gj(e),a={};for(var o in e)if(e[o]){var s=e[o].originalEvent;this.eventsInProgress[o]||(a["".concat(o,"start")]=s),this.eventsInProgress[o]=e[o]}for(var u in!n&&i&&this.fireEvent("movestart",i.originalEvent),a)a[u]&&this.fireEvent(u,a[u]);for(var c in e.rotate&&(this.bearingChanged=!0),i&&this.fireEvent("move",i.originalEvent),e)if(e[c]){var l=e[c].originalEvent;this.fireEvent(c,l)}var h,f={};for(var p in this.eventsInProgress)if(this.eventsInProgress[p]){var d=this.eventsInProgress[p],v=d.handlerName,g=d.originalEvent;this.handlersById[v].isActive()||(delete this.eventsInProgress[p],h=t[v]||g,f["".concat(p,"end")]=h)}for(var m in f)f[m]&&this.fireEvent(m,f[m]);var y=Gj(this.eventsInProgress);if((n||i)&&!y){this.updatingCamera=!0;var _=this.inertia.onMoveEnd(this.map.dragPan.inertiaOptions),b=function(e){return 0!==e&&-r.bearingSnap<e&&e<r.bearingSnap};_?(b(_.bearing||this.map.getBearing())&&(_.bearing=0),this.map.easeTo(_,{originalEvent:h})):(this.map.emit("moveend",new VU("moveend",{originalEvent:h})),b(this.map.getBearing())&&this.map.resetNorth()),this.bearingChanged=!1,this.updatingCamera=!1}}},{key:"fireEvent",value:function(e,t){this.map.emit(e,new VU(e,t?{originalEvent:t}:{}))}}]),e}(),Zj=null,qj=[],Kj=(Yv.performance,function(e){var t=e;if(null!=Zj){var r=t-Zj;qj.push(r)}Zj=t}),Qj=function(){function e(){u(this,e),h(this,"queue",void 0),h(this,"id",void 0),h(this,"cleared",void 0),h(this,"currentlyRunning",void 0),this.queue=[],this.id=0,this.cleared=!1,this.currentlyRunning=!1}return l(e,[{key:"add",value:function(e){var t=++this.id;return this.queue.push({callback:e,id:t,cancelled:!1}),t}},{key:"remove",value:function(e){var t,r=this.currentlyRunning,n=k(r?this.queue.concat(r):this.queue);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.id===e)return void(i.cancelled=!0)}}catch(e){n.e(e)}finally{n.f()}}},{key:"run",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.currentlyRunning=this.queue;this.queue=[];var r,n=k(t);try{for(n.s();!(r=n.n()).done;){var i=r.value;if(!i.cancelled&&(i.callback(e),this.cleared))break}}catch(e){n.e(e)}finally{n.f()}this.cleared=!1,this.currentlyRunning=!1}},{key:"clear",value:function(){this.currentlyRunning&&(this.cleared=!0),this.queue=[]}}]),e}(),$j={hash:!1,zoom:-1,center:[112,32],pitch:0,bearing:0,interactive:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,trackResize:!0,renderWorldCopies:!0,pitchEnabled:!0,rotateEnabled:!0},Jj=function(e){f(r,e);var t=x(r);function r(e){var n;return u(this,r),h(_(n=t.call(this,cP({},$j,e))),"doubleClickZoom",void 0),h(_(n),"dragRotate",void 0),h(_(n),"dragPan",void 0),h(_(n),"touchZoomRotate",void 0),h(_(n),"scrollZoom",void 0),h(_(n),"keyboard",void 0),h(_(n),"touchPitch",void 0),h(_(n),"boxZoom",void 0),h(_(n),"handlers",void 0),h(_(n),"container",void 0),h(_(n),"canvas",void 0),h(_(n),"canvasContainer",void 0),h(_(n),"renderTaskQueue",new Qj),h(_(n),"frame",void 0),h(_(n),"trackResize",!0),h(_(n),"onWindowOnline",(function(){n.update()})),h(_(n),"onWindowResize",(function(e){n.trackResize&&n.resize({originalEvent:e}).update()})),n.initContainer(),n.resize(),n.handlers=new Xj(_(n),n.options),"undefined"!=typeof window&&(window.addEventListener("online",n.onWindowOnline,!1),window.addEventListener("resize",n.onWindowResize,!1),window.addEventListener("orientationchange",n.onWindowResize,!1)),n}return l(r,[{key:"resize",value:function(e){var t=this.containerDimensions(),r=t[0],n=t[1];this.transform.resize(r,n);var i=!this.moving;return i&&(this.stop(),this.emit("movestart",new Event("movestart",e)),this.emit("move",new Event("move",e))),this.emit("resize",new Event("resize",e)),i&&this.emit("moveend",new Event("moveend",e)),this}},{key:"getContainer",value:function(){return this.container}},{key:"getCanvas",value:function(){return this.canvas}},{key:"getCanvasContainer",value:function(){return this.canvasContainer}},{key:"project",value:function(e){return this.transform.locationPoint(PU.convert(e))}},{key:"unproject",value:function(e){return this.transform.pointLocation(OU.convert(e))}},{key:"getBounds",value:function(){return this.transform.getBounds()}},{key:"getMaxBounds",value:function(){return this.transform.getMaxBounds()}},{key:"setMaxBounds",value:function(e){this.transform.setMaxBounds(IU.convert(e))}},{key:"setStyle",value:function(e){}},{key:"setMinZoom",value:function(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this.getZoom()<e&&this.setZoom(e),this;throw new Error("minZoom must be between ".concat(-2," and the current maxZoom, inclusive"))}},{key:"getMinZoom",value:function(){return this.transform.minZoom}},{key:"setMaxZoom",value:function(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.maxZoom=e,this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"setMinPitch",value:function(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to ".concat(0));if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this.getPitch()<e&&this.setPitch(e),this;throw new Error("minPitch must be between ".concat(0," and the current maxPitch, inclusive"))}},{key:"getMinPitch",value:function(){return this.transform.minPitch}},{key:"setMaxPitch",value:function(e){if((e=null==e?60:e)>60)throw new Error("maxPitch must be less than or equal to ".concat(60));if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}},{key:"getMaxPitch",value:function(){return this.transform.maxPitch}},{key:"getRenderWorldCopies",value:function(){return this.transform.renderWorldCopies}},{key:"setRenderWorldCopies",value:function(e){this.transform.renderWorldCopies=!!e}},{key:"remove",value:function(){this.frame&&(this.frame.cancel(),this.frame=null),this.renderTaskQueue.clear()}},{key:"requestRenderFrame",value:function(e){return this.update(),this.renderTaskQueue.add(e)}},{key:"cancelRenderFrame",value:function(e){return this.renderTaskQueue.remove(e)}},{key:"triggerRepaint",value:function(){var e=this;this.frame||(this.frame=MU((function(t){Kj(t),e.frame=null,e.update(t)})))}},{key:"update",value:function(e){var t=this;this.frame||(this.frame=MU((function(r){Kj(r),t.frame=null,t.renderTaskQueue.run(e)})))}},{key:"initContainer",value:function(){if("string"==typeof this.options.container){if(this.container=window.document.getElementById(this.options.container),!this.container)throw new Error("Container '".concat(this.options.container,"' not found."))}else{if(!(this.options.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this.container=this.options.container}var e=this.container;e.classList.add("l7-map");var t=this.canvasContainer=Zy("div","l7-canvas-container",e);this.options.interactive&&t.classList.add("l7-interactive")}},{key:"containerDimensions",value:function(){var e=0,t=0;return this.container&&(e=this.container.clientWidth||400,t=this.container.clientHeight||300),[e,t]}},{key:"resizeCanvas",value:function(e,t){var r=a_||1;this.canvas.width=r*e,this.canvas.height=r*t,this.canvas.style.width="".concat(e,"px"),this.canvas.style.height="".concat(t,"px")}}]),r}(GU),eV=function(){function e(t){var r=this;u(this,e),h(this,"map",void 0),h(this,"updateHash",void 0),h(this,"hashName",void 0),h(this,"onHashChange",(function(){var e=r.getCurrentHash();if(e.length>=3&&!e.some((function(e){return isNaN(+e)}))){var t=r.map.dragRotate.isEnabled()&&r.map.touchZoomRotate.isEnabled()?+(e[3]||0):r.map.getBearing();return r.map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1})),h(this,"getCurrentHash",(function(){var e,t=window.location.hash.replace("#","");return r.hashName?(t.split("&").map((function(e){return e.split("=")})).forEach((function(t){t[0]===r.hashName&&(e=t)})),(e&&e[1]||"").split("/")):t.split("/")})),h(this,"updateHashUnthrottled",(function(){var e=r.getHashString();try{window.history.replaceState(window.history.state,"",e)}catch(e){}})),this.hashName=t&&encodeURIComponent(t),this.updateHash=jE(this.updateHashUnthrottled,300)}return l(e,[{key:"addTo",value:function(e){return this.map=e,Yv.addEventListener("hashchange",this.onHashChange,!1),this.map.on("moveend",this.updateHash),this}},{key:"remove",value:function(){return Yv.removeEventListener("hashchange",this.onHashChange,!1),this.map.off("moveend",this.updateHash),delete this.map,this}},{key:"getHashString",value:function(e){var t=this.map.getCenter(),r=Math.round(100*this.map.getZoom())/100,n=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,n),a=Math.round(t.lng*i)/i,o=Math.round(t.lat*i)/i,s=this.map.getBearing(),u=this.map.getPitch(),c="";if(c+=e?"/".concat(a,"/").concat(o,"/").concat(r):"".concat(r,"/").concat(o,"/").concat(a),(s||u)&&(c+="/".concat(Math.round(10*s)/10)),u&&(c+="/".concat(Math.round(u))),this.hashName){var l=this.hashName,h=!1,f=window.location.hash.slice(1).split("&").map((function(e){var t=e.split("=")[0];return t===l?(h=!0,"".concat(t,"=").concat(c)):e})).filter((function(e){return e}));return h||f.push("".concat(l,"=").concat(c)),"#".concat(f.join("&"))}return"#".concat(c)}}]),e}(),tV={hash:!1,zoom:-1,center:[112,32],pitch:0,bearing:0,interactive:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,trackResize:!0,renderWorldCopies:!0,pitchEnabled:!0,rotateEnabled:!0},rV=function(e){f(r,e);var t=x(r);function r(e){var n;if(u(this,r),h(_(n=t.call(this,cP({},tV,e))),"doubleClickZoom",void 0),h(_(n),"dragRotate",void 0),h(_(n),"dragPan",void 0),h(_(n),"touchZoomRotate",void 0),h(_(n),"scrollZoom",void 0),h(_(n),"keyboard",void 0),h(_(n),"touchPitch",void 0),h(_(n),"boxZoom",void 0),h(_(n),"handlers",void 0),h(_(n),"container",void 0),h(_(n),"canvas",void 0),h(_(n),"canvasContainer",void 0),h(_(n),"renderTaskQueue",new Qj),h(_(n),"frame",void 0),h(_(n),"trackResize",!0),h(_(n),"hash",void 0),h(_(n),"onWindowOnline",(function(){n.update()})),h(_(n),"onWindowResize",(function(e){n.trackResize&&n.resize({originalEvent:e}).update()})),Hv?n.initMiniContainer():n.initContainer(),n.resize(),n.handlers=new Xj(_(n),n.options),"undefined"!=typeof window&&(window.addEventListener("online",n.onWindowOnline,!1),window.addEventListener("resize",n.onWindowResize,!1),window.addEventListener("orientationchange",n.onWindowResize,!1)),!Hv){var i="string"==typeof e.hash&&e.hash||void 0;e.hash&&(n.hash=new eV(i).addTo(_(n)))}return n.hash&&n.hash.onHashChange()||(n.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(n.resize(),n.fitBounds(e.bounds,cP({},e.fitBoundsOptions,{duration:0})))),n}return l(r,[{key:"resize",value:function(e){var t=A(this.containerDimensions(),2),r=t[0],n=t[1];if(this.transform.resize(r,n),Hv)return this;var i=!this.moving;return i&&(this.stop(),this.emit("movestart",new Yv.Event("movestart",e)),this.emit("move",new Yv.Event("move",e))),this.emit("resize",new Yv.Event("resize",e)),i&&this.emit("moveend",new Yv.Event("moveend",e)),this}},{key:"getContainer",value:function(){return this.container}},{key:"getCanvas",value:function(){return this.canvas}},{key:"getCanvasContainer",value:function(){return this.canvasContainer}},{key:"project",value:function(e){return this.transform.locationPoint(PU.convert(e))}},{key:"unproject",value:function(e){return this.transform.pointLocation(OU.convert(e))}},{key:"getBounds",value:function(){return this.transform.getBounds()}},{key:"getMaxBounds",value:function(){return this.transform.getMaxBounds()}},{key:"setMaxBounds",value:function(e){this.transform.setMaxBounds(IU.convert(e))}},{key:"setStyle",value:function(e){}},{key:"setMinZoom",value:function(e){if((e=null==e?-2:e)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this.getZoom()<e&&this.setZoom(e),this;throw new Error("minZoom must be between ".concat(-2," and the current maxZoom, inclusive"))}},{key:"getMinZoom",value:function(){return this.transform.minZoom}},{key:"setMaxZoom",value:function(e){if((e=null==e?22:e)>=this.transform.minZoom)return this.transform.maxZoom=e,this.getZoom()>e&&this.setZoom(e),this;throw new Error("maxZoom must be greater than the current minZoom")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"setMinPitch",value:function(e){if((e=null==e?0:e)<0)throw new Error("minPitch must be greater than or equal to ".concat(0));if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this.getPitch()<e&&this.setPitch(e),this;throw new Error("minPitch must be between ".concat(0," and the current maxPitch, inclusive"))}},{key:"getMinPitch",value:function(){return this.transform.minPitch}},{key:"setMaxPitch",value:function(e){if((e=null==e?60:e)>60)throw new Error("maxPitch must be less than or equal to ".concat(60));if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this.getPitch()>e&&this.setPitch(e),this;throw new Error("maxPitch must be greater than the current minPitch")}},{key:"getMaxPitch",value:function(){return this.transform.maxPitch}},{key:"getRenderWorldCopies",value:function(){return this.transform.renderWorldCopies}},{key:"setRenderWorldCopies",value:function(e){this.transform.renderWorldCopies=!!e}},{key:"remove",value:function(){this.container.removeChild(this.canvasContainer),this.canvasContainer=null,this.frame&&(this.frame.cancel(),this.frame=null),this.renderTaskQueue.clear()}},{key:"requestRenderFrame",value:function(e){return this.update(),this.renderTaskQueue.add(e)}},{key:"cancelRenderFrame",value:function(e){return this.renderTaskQueue.remove(e)}},{key:"triggerRepaint",value:function(){var e=this;this.frame||(this.frame=MU((function(t){Kj(t),e.frame=null,e.update(t)})))}},{key:"update",value:function(e){var t=this;this.frame||(this.frame=MU((function(r){Kj(r),t.frame=null,t.renderTaskQueue.run(e)})))}},{key:"initContainer",value:function(){if("string"==typeof this.options.container){if(this.container=window.document.getElementById(this.options.container),!this.container)throw new Error("Container '".concat(this.options.container,"' not found."))}else{if(!(this.options.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this.container=this.options.container}var e=this.container;e.classList.add("l7-map");var t=this.canvasContainer=Zy("div","l7-canvas-container",e);this.options.interactive&&t.classList.add("l7-interactive")}},{key:"initMiniContainer",value:function(){this.container=this.options.canvas,this.canvasContainer=this.container}},{key:"containerDimensions",value:function(){var e=0,t=0;return this.container&&(Hv?(e=this.container.width/Yv.devicePixelRatio,t=this.container.height/Yv.devicePixelRatio):(e=0===(e=this.container.clientWidth)?400:e,t=0===(t=this.container.clientHeight)?300:t)),[e,t]}}]),r}(GU),nV=function(){function e(){u(this,e),h(this,"xzReg",.6*-Math.PI),h(this,"yReg",.2*Math.PI),h(this,"earthCameraRadius",200),h(this,"earthCameraZoom",1),h(this,"cameraPosition",ox()),h(this,"viewport",void 0),h(this,"projectionMatrix",Ab()),h(this,"modelMatrix",Ab()),h(this,"viewMatrix",Ab()),h(this,"viewProjectionMatrix",Ab()),h(this,"ViewProjectionMatrixUncentered",Ab()),h(this,"viewUncenteredMatrix",Ab())}return l(e,[{key:"syncWithMapCamera",value:function(e){var t=e.viewportHeight,r=void 0===t?1:t,n=e.viewportWidth,i=(void 0===n?1:n)/r;Bb(this.projectionMatrix,20,i,.1,1e4);var a=this.earthCameraRadius*Math.cos(this.xzReg),o=this.earthCameraRadius*Math.sin(this.xzReg),s=this.earthCameraRadius*Math.sin(this.yReg);this.cameraPosition=ux(a,s,o),mx(this.cameraPosition,this.cameraPosition),lx(this.cameraPosition,this.cameraPosition,ux(this.earthCameraRadius,this.earthCameraRadius,this.earthCameraRadius)),fx(this.cameraPosition,this.cameraPosition,this.earthCameraZoom);var u=ox();_x(u,this.cameraPosition,ux(0,1,0));var c=ux(0,1,0);_x(c,u,this.cameraPosition);var l=ux(0,0,0);Vb(this.viewMatrix,this.cameraPosition,l,c),this.viewUncenteredMatrix=Tb(this.viewMatrix),Mb(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),Mb(this.ViewProjectionMatrixUncentered,this.projectionMatrix,this.viewMatrix)}},{key:"rotateY",value:function(e){this.xzReg+=e*Math.min(this.earthCameraZoom*this.earthCameraZoom,1)}},{key:"rotateX",value:function(e){this.yReg+=e*Math.min(this.earthCameraZoom*this.earthCameraZoom,1)}},{key:"scaleZoom",value:function(e){this.earthCameraZoom+=e,this.earthCameraZoom=Math.max(this.earthCameraZoom,.6)}},{key:"getZoom",value:function(){return 4}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[0,0]}},{key:"getProjectionMatrix",value:function(){return this.projectionMatrix}},{key:"getModelMatrix",value:function(){return this.modelMatrix}},{key:"getViewMatrix",value:function(){return this.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewMatrix}},{key:"getViewProjectionMatrix",value:function(){return this.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(e,t){return this.viewport.projectFlat(e,t)}}]),e}(),iV=["id","style","rotation"],aV={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},oV=Me()(Wj=function(e){f(a,e);var t,r=x(a);function a(){var e;u(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return h(_(e=r.call.apply(r,[this].concat(n))),"version",QD.GLOBEL),h(_(e),"dragging",!1),h(_(e),"viewport",void 0),h(_(e),"cameraChangedCallback",void 0),h(_(e),"handleCameraChanging",void 0),h(_(e),"handleCameraTimer",void 0),h(_(e),"handleCameraChanged",(function(t){e.emit("mapchange");e.handleCameraChanging=!0,e.handleCameraTimer&&clearTimeout(e.handleCameraTimer),e.handleCameraTimer=setTimeout((function(){e.handleCameraChanging=!1}),2e3);t.type&&t.originalEvent&&("wheel"===t.originalEvent.type&&e.viewport.scaleZoom(.01*Math.sign(t.originalEvent.wheelDelta)*-1),Math.abs(t.originalEvent.movementX)>Math.abs(t.originalEvent.movementY)?t.originalEvent.movementX>0?e.viewport.rotateY(.02):t.originalEvent.movementX<0&&e.viewport.rotateY(-.02):t.originalEvent.movementY>0?e.viewport.rotateX(.02):t.originalEvent.movementY<0&&e.viewport.rotateX(-.02));var r=e.config.offsetCoordinate,n=void 0===r||r;e.viewport.syncWithMapCamera({viewportHeight:e.map.transform.height,viewportWidth:e.map.transform.width}),e.viewport.getZoom()>12&&n?e.coordinateSystemService.setCoordinateSystem(ub.LNGLAT_OFFSET):e.coordinateSystemService.setCoordinateSystem(ub.LNGLAT),e.cameraChangedCallback(e.viewport)})),e}return l(a,[{key:"lngLatToMercator",value:function(e,t){throw new Error("Method not implemented.")}},{key:"getModelMatrix",value:function(e,t,r,n,i){throw new Error("Method not implemented.")}},{key:"on",value:function(e,t){-1!==LD.indexOf(e)?this.eventEmitter.on(e,t):this.map.on(aV[e]||e,t)}},{key:"off",value:function(e,t){this.map.off(aV[e]||e,t),this.eventEmitter.off(e,t)}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){var e=this.map.transform;return[e.width,e.height]}},{key:"getType",value:function(){return"earth"}},{key:"init",value:(t=s(i().mark((function e(){var t,r,a,o,s,u,c,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.config,r=t.id,a=void 0===r?"map":r,o=t.style,s=void 0===o?"light":o,u=t.rotation,c=void 0===u?0:u,l=y(t,iV),this.viewport=new nV,this.$mapContainer=this.creatMapContainer(a),this.map=new Jj(n({container:this.$mapContainer,style:this.getMapStyleValue(s),bearing:c},l)),this.map.on("load",this.handleCameraChanged),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged({});case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"destroy",value:function(){var e,t;null===(e=this.$mapContainer)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(t=this.eventEmitter).emit.apply(t,[e].concat(n))}},{key:"once",value:function(e){for(var t,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];(t=this.eventEmitter).once.apply(t,[e].concat(n))}},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"onCameraChanged",value:function(e){this.cameraChangedCallback=e}},{key:"rotateY",value:function(e){var t=e||{},r=t.force,n=void 0!==r&&r,i=t.reg,a=void 0===i?.01:i;this.handleCameraChanging&&!n||this.viewport&&(this.viewport.rotateY(a),this.viewport.syncWithMapCamera({viewportHeight:this.map.transform.height,viewportWidth:this.map.transform.width}),this.cameraChangedCallback(this.viewport))}}]),a}(tF))||Wj,sV=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"getServiceConstructor",value:function(){return oV}}]),r}(FD),uV=function(){function e(){u(this,e),h(this,"viewport",void 0)}return l(e,[{key:"syncWithMapCamera",value:function(e){var t=e.center,r=e.zoom,i=e.pitch,a=e.bearing,o=e.viewportHeight,s=e.viewportWidth,u=this.viewport?{width:this.viewport.width,height:this.viewport.height,longitude:this.viewport.center[0],latitude:this.viewport.center[1],zoom:this.viewport.zoom,pitch:this.viewport.pitch,bearing:this.viewport.bearing}:{};this.viewport=new Zx(n(n({},u),{},{width:s,height:o,longitude:t&&t[0],latitude:t&&t[1],zoom:r,pitch:i,bearing:a}))}},{key:"getZoom",value:function(){return this.viewport.zoom}},{key:"getZoomScale",value:function(){return Math.pow(2,this.getZoom())}},{key:"getCenter",value:function(){return[this.viewport.longitude,this.viewport.latitude]}},{key:"getProjectionMatrix",value:function(){return this.viewport.projectionMatrix}},{key:"getModelMatrix",value:function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}},{key:"getViewMatrix",value:function(){return this.viewport.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewport.viewMatrixUncentered}},{key:"getViewProjectionMatrix",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.viewport.viewProjectionMatrix}},{key:"getFocalDistance",value:function(){return 1}},{key:"projectFlat",value:function(e,t){return this.viewport.projectFlat(e,t)}}]),e}(),cV=["id","style","rotation","mapInstance","version","mapSize","interactive"],lV=["id","style","rotation","mapInstance","canvas","hasBaseMap"],hV=Me()(Yj=function(e){f(o,e);var t,r,a=x(o);function o(){var e;u(this,o);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=a.call.apply(a,[this].concat(r))),"version",QD.DEFUALT),h(_(e),"viewport",void 0),h(_(e),"handleMiniCameraChanged",(function(t,r,n,i,a){var o=e.config.offsetCoordinate,s=void 0===o||o;e.viewport.syncWithMapCamera({bearing:i,center:[t,r],viewportHeight:e.map.transform.height,pitch:a,viewportWidth:e.map.transform.width,zoom:n,cameraHeight:0}),e.viewport.getZoom()>12&&s?e.coordinateSystemService.setCoordinateSystem(ub.LNGLAT_OFFSET):e.coordinateSystemService.setCoordinateSystem(ub.LNGLAT),e.cameraChangedCallback(e.viewport)})),e}return l(o,[{key:"lngLatToCoord",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0,z:0},r=this.lngLatToMercator(e,0),n=r.x,i=r.y;return[n-t.x,i-t.y]}},{key:"lngLatToMercator",value:function(e,t){var r=UU.fromLngLat(e,t),n=r.x,i=void 0===n?0:n,a=r.y,o=void 0===a?0:a,s=r.z;return{x:i,y:o,z:void 0===s?0:s}}},{key:"getModelMatrix",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1,1],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{x:0,y:0,z:0},a=UU.fromLngLat(e,t),o=a.meterInMercatorCoordinateUnits(),s=Ab();return Pb(s,s,ux(a.x-i.x,a.y-i.y,a.z||0-i.z)),Ib(s,s,ux(o*n[0],-o*n[1],o*n[2])),Ob(s,s,r[0]),Rb(s,s,r[1]),Lb(s,s,r[2]),s}},{key:"init",value:(r=s(i().mark((function e(){var t,r,a,o,s,u,c,l,h,f,p,d,v,g,m,_=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.config,r=t.id,a=void 0===r?"map":r,o=t.style,s=void 0===o?"light":o,u=t.rotation,c=void 0===u?0:u,l=t.mapInstance,h=t.version,f=void 0===h?"DEFAULTMAP":h,p=t.mapSize,d=void 0===p?1e4:p,v=t.interactive,g=void 0===v||v,m=y(t,cV),this.viewport=new uV,this.version=f,this.simpleMapCoord.setSize(d),f===QD.SIMPLE&&m.center&&(m.center=this.simpleMapCoord.unproject(m.center)),l?(this.map=l,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(a),this.map=new rV(n({container:this.$mapContainer,style:this.getMapStyleValue(s),bearing:c},m))),this.map.on("load",(function(){_.handleCameraChanged()})),g&&this.map.on("move",this.handleCameraChanged),setTimeout((function(){_.handleCameraChanged()}),100),this.handleCameraChanged();case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"initMiniMap",value:(t=s(i().mark((function e(){var t,r,a,o,s,u,c,l,h,f,p,d=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=this.config).id,r=t.style,a=void 0===r?"light":r,o=t.rotation,s=void 0===o?0:o,t.mapInstance,u=t.canvas,c=void 0===u?null:u,l=t.hasBaseMap,h=void 0!==l&&l,f=y(t,lV),this.viewport=new uV,this.$mapContainer=c,this.map=new rV(n({container:this.$mapContainer,style:this.getMapStyleValue(a),bearing:s,canvas:c},f)),h?(p=this.map.getCenter(),this.handleMiniCameraChanged(p.lng,p.lat,this.map.getZoom(),this.map.getBearing(),this.map.getPitch()),Yv.document.addEventListener("mapCameaParams",(function(e){var t=e.e,r=t.longitude,n=t.latitude,i=t.scale,a=t.bearing,o=t.pitch;d.handleMiniCameraChanged(r,n,i-1.25,a,o)}))):(this.map.on("load",this.handleCameraChanged),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged());case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"exportMap",value:function(e){var t=this.map.getCanvas();return"jpg"===e?null==t?void 0:t.toDataURL("image/jpeg"):null==t?void 0:t.toDataURL("image/png")}}]),o}(tF))||Yj,fV=function(e){f(r,e);var t=x(r);function r(){return u(this,r),t.apply(this,arguments)}return l(r,[{key:"getServiceConstructor",value:function(){return hV}}]),r}(FD);function pV(e,t){e.length>0&&t.version===QD.SIMPLE&&e.map((function(e){e.simpleCoordinate||(e.coordinates=function(e,t){if("number"==typeof e[0])return t.simpleMapCoord.unproject(e);if(e[0]&&e[0][0]instanceof Array){var r=[];return e.map((function(e){var n=[];e.map((function(e){n.push(t.simpleMapCoord.unproject(e))})),r.push(n)})),r}var n=[];return e.map((function(e){n.push(t.simpleMapCoord.unproject(e))})),n}(e.coordinates,t),e.simpleCoordinate=!0)}))}function dV(e,t,r,n,i){var a=(null==i?void 0:i.getLayerConfig()).arrow,o=void 0===a?{enable:!1}:a,s=t.map((function(t){var n,i,a,s={id:t._id,coordinates:t.coordinates};if(e.filter((function(e){return void 0!==e.scale})).forEach((function(e){var n=function(e,t){var r;if(!e.scale)return[];var n=(null==e||null===(r=e.scale)||void 0===r?void 0:r.scalers)||[],i=[];return n.forEach((function(r){var n,a=r.field;(t.hasOwnProperty(a)||"variable"===(null===(n=e.scale)||void 0===n?void 0:n.type))&&i.push(t[a])})),e.mapping?e.mapping(i):[]}(e,t);e.needRemapping=!1,"color"===e.name&&(n=n.map((function(e){return zg(e)}))),s[e.name]=Array.isArray(n)&&1===n.length?n[0]:n,"shape"===e.name&&(s.shape=r.getIconFontKey(s[e.name]))})),"line"===s.shape&&o.enable){var u=s.coordinates,c=(n=u[0],i=u[1],a=AS([i[0]-n[0],i[1]-n[1]]),[n[0]+1e-4*a[0],n[1]+1e-4*a[1]]);s.coordinates.splice(1,0,c,c)}return s}));return function(e,t,r){if(e.length>0&&t.version===QD["GAODE2.x"]){var n=r.coordCenter;e[0].coordinates[0],e.filter((function(e){return!e.originCoordinates})).map((function(e){e.version=QD["GAODE2.x"],e.originCoordinates=II(e.coordinates),e.coordinates=t.coordToAMap2RelativeCoordinates(e.coordinates,n)}))}}(s,n,i),pV(s,n),s}function vV(e){return e.map((function(e){return"string"==typeof e&&(e=[e,{}]),e}))}function gV(e,t,r,n){var i=e.multiPassRenderer;return e.getLayerConfig().enableTAA?i.add(n("taa")):i.add(n("render")),vV(t).forEach((function(e){var t=A(e,2),n=t[0],a=t[1];i.add(r(n),a)})),i.add(r("copy")),i}var mV,yV,_V,bV,xV,SV,EV=function(){function e(t){u(this,e),h(this,"layer",void 0),this.layer=t}return l(e,[{key:"pickRender",value:function(e){var t=this.layer.getContainer().get(ba.ILayerService),r=this.layer;if(r.tileLayer)return r.tileLayer.pickRender(e);r.hooks.beforePickingEncode.call(),t.renderTileLayerMask(r),r.renderModels({ispick:!0}),r.hooks.afterPickingEncode.call()}},{key:"pick",value:function(e,t){var r=this.layer.getContainer().get(ba.IPickingService);return"RasterLayer"===e.type?this.pickRasterLayer(e,t):(this.pickRender(t),r.pickFromPickingFBO(e,t))}},{key:"pickRasterLayer",value:function(e,t,r){var i=this.layer.getContainer(),a=i.get(ba.IPickingService),o=i.get(ba.IMapService),s=this.layer.getSource().extent,u=hS(t.lngLat,s),c={x:t.x,y:t.y,type:t.type,lngLat:t.lngLat,target:t,rasterValue:null},l=r||e;if(u){var h=this.readRasterValue(e,s,o,t.x,t.y);return c.rasterValue=h,a.triggerHoverOnLayer(l,c),!0}return c.type="mousemove"===t.type?"mouseout":"un"+t.type,a.triggerHoverOnLayer(l,n(n({},c),{},{type:"unpick"})),a.triggerHoverOnLayer(l,c),!1}},{key:"readRasterValue",value:function(e,t,r,n,i){var a=e.getSource().data.dataArray[0],o=A(t,4),s=o[0],u=void 0===s?0:s,c=o[1],l=void 0===c?0:c,h=o[2],f=void 0===h?10:h,p=o[3],d=void 0===p?-10:p,v=r.lngLatToContainer([u,l]),g=r.lngLatToContainer([f,d]),m=g.x-v.x,y=v.y-g.y,_=[(n-v.x)/m,(i-g.y)/y],b=a.width||1,x=a.height||1,S=Math.floor(_[0]*b),E=Math.floor(_[1]*x),T=Math.max(0,E-1)*b+S;return a.data[T]}},{key:"selectFeature",value:function(e){var t=this.layer,r=A(e,3),n=r[0],i=r[1],a=r[2];t.hooks.beforeSelect.call([n,i,a])}},{key:"highlightPickedFeature",value:function(e){var t=A(e,3),r=t[0],n=t[1],i=t[2];this.layer.hooks.beforeHighlight.call([r,n,i])}},{key:"getFeatureById",value:function(e){return this.layer.getSource().getFeatureById(e)}}]),e}(),AV=function(){function e(t){u(this,e),h(this,"layer",void 0),h(this,"rendererService",void 0),h(this,"colorTexture",void 0),h(this,"key",void 0),this.layer=t;var r=this.layer.getContainer();this.rendererService=r.get(ba.IRendererService)}return l(e,[{key:"getColorTexture",value:function(e,t){var r=this.getTextureKey(e,t);return this.key===r||(this.createColorTexture(e,t),this.key=r),this.colorTexture}},{key:"createColorTexture",value:function(e,t){var r=this.rendererService.createTexture2D,n=this.getColorRampBar(e,t),i=r({data:new Uint8Array(n.data),width:n.width,height:n.height,flipY:!1});return this.colorTexture=i,i}},{key:"setColorTexture",value:function(e,t,r){this.key=this.getTextureKey(t,r),this.colorTexture=e}},{key:"destroy",value:function(){var e;null===(e=this.colorTexture)||void 0===e||e.destroy()}},{key:"getColorRampBar",value:function(e,t){switch(e.type){case"cat":return Gg(e);case"quantize":return Hg(e);case"custom":return Wg(e,t);case"linear":return Vg(e,t);default:return jg(e)}}},{key:"getTextureKey",value:function(e,t){var r;return"".concat(e.colors.join("_"),"_").concat(null==e||null===(r=e.positions)||void 0===r?void 0:r.join("_"),"_").concat(e.type,"_").concat(null==t?void 0:t.join("_"))}}]),e}(),TV=["passes"],wV=["moduleName","vertexShader","fragmentShader","inject","triangulation","segmentNumber"],CV=0,kV=(mV=mD(ba.IGlobalConfigService),_V=I((yV=function(e){f(g,e);var t,r,a,o,c,p,d,v=x(g);function g(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(this,g),h(_(e=v.call(this)),"id","".concat(CV++)),h(_(e),"name","".concat(CV)),h(_(e),"parent",void 0),h(_(e),"coordCenter",void 0),h(_(e),"type",void 0),h(_(e),"visible",!0),h(_(e),"zIndex",0),h(_(e),"minZoom",void 0),h(_(e),"maxZoom",void 0),h(_(e),"inited",!1),h(_(e),"layerModelNeedUpdate",!1),h(_(e),"pickedFeatureID",null),h(_(e),"selectedFeatureID",null),h(_(e),"styleNeedUpdate",!1),h(_(e),"rendering",void 0),h(_(e),"forceRender",!1),h(_(e),"clusterZoom",0),h(_(e),"layerType",void 0),h(_(e),"triangulation",void 0),h(_(e),"layerPickService",void 0),h(_(e),"textureService",void 0),h(_(e),"defaultSourceConfig",{data:[],options:{parser:{type:"json"}}}),h(_(e),"dataState",{dataSourceNeedUpdate:!1,dataMappingNeedUpdate:!1,filterNeedUpdate:!1,featureScaleNeedUpdate:!1,StyleAttrNeedUpdate:!1}),h(_(e),"hooks",{init:new aR,afterInit:new nR,beforeRender:new nR,beforeRenderData:new oR,afterRender:new $O,beforePickingEncode:new $O,afterPickingEncode:new $O,beforeHighlight:new $O(["pickedColor"]),afterHighlight:new $O,beforeSelect:new $O(["pickedColor"]),afterSelect:new $O,beforeDestroy:new $O,afterDestroy:new $O}),h(_(e),"models",[]),h(_(e),"multiPassRenderer",void 0),h(_(e),"plugins",void 0),h(_(e),"startInit",!1),h(_(e),"sourceOption",void 0),h(_(e),"layerModel",void 0),h(_(e),"shapeOption",void 0),h(_(e),"sceneContainer",void 0),h(_(e),"tileLayer",void 0),h(_(e),"layerChildren",[]),h(_(e),"masks",[]),P(_(e),"configService",_V,_(e)),h(_(e),"shaderModuleService",void 0),h(_(e),"cameraService",void 0),h(_(e),"coordinateService",void 0),h(_(e),"iconService",void 0),h(_(e),"fontService",void 0),h(_(e),"pickingService",void 0),h(_(e),"rendererService",void 0),h(_(e),"layerService",void 0),h(_(e),"debugService",void 0),h(_(e),"interactionService",void 0),h(_(e),"mapService",void 0),h(_(e),"styleAttributeService",void 0),h(_(e),"layerSource",void 0),h(_(e),"postProcessingPassFactory",void 0),h(_(e),"normalPassFactory",void 0),h(_(e),"animateOptions",{enable:!1}),h(_(e),"container",void 0),h(_(e),"encodedData",void 0),h(_(e),"currentPickId",null),h(_(e),"rawConfig",void 0),h(_(e),"needUpdateConfig",void 0),h(_(e),"encodeStyleAttribute",{}),h(_(e),"enableShaderEncodeStyles",[]),h(_(e),"enableDataEncodeStyles",[]),h(_(e),"enablg",[]),h(_(e),"pendingStyleAttributes",[]),h(_(e),"scaleOptions",{}),h(_(e),"animateStartTime",void 0),h(_(e),"animateStatus",!1),h(_(e),"isDestroyed",!1),h(_(e),"encodeDataLength",0),h(_(e),"sourceEvent",(function(){e.dataState.dataSourceNeedUpdate=!0;var t=e.getLayerConfig();t&&t.autoFit&&e.fitBounds(t.fitBoundsOptions),e.layerSource.getSourceCfg().autoRender&&e.reRender()})),e.name=t.name||e.id,e.zIndex=t.zIndex||0,e.rawConfig=t,e}return l(g,[{key:"addMask",value:function(e){this.masks.push(e),this.enableMask()}},{key:"removeMask",value:function(e){var t=this.masks.indexOf(e);t>-1&&this.masks.splice(t,1)}},{key:"disableMask",value:function(){this.updateLayerConfig({enableMask:!1})}},{key:"enableMask",value:function(){this.updateLayerConfig({enableMask:!0})}},{key:"addMaskLayer",value:function(e){this.masks.push(e)}},{key:"removeMaskLayer",value:function(e){var t=this.masks.indexOf(e);t>-1&&this.masks.splice(t,1),e.destroy()}},{key:"getAttribute",value:function(e){return this.styleAttributeService.getLayerStyleAttribute(e)}},{key:"getLayerConfig",value:function(){return this.configService.getLayerConfig(this.id)}},{key:"updateLayerConfig",value:function(e){var t=this;if(Object.keys(e).map((function(r){r in t.rawConfig&&(t.rawConfig[r]=e[r])})),this.startInit){var r=this.container.get(ba.SceneID);this.configService.setLayerConfig(r,this.id,n(n(n({},this.configService.getLayerConfig(this.id)),this.needUpdateConfig),e)),this.needUpdateConfig={}}else this.needUpdateConfig=n(n({},this.needUpdateConfig),e)}},{key:"setContainer",value:function(e,t){this.container=e,this.sceneContainer=t}},{key:"getContainer",value:function(){return this.container}},{key:"addPlugin",value:function(e){return this.plugins.push(e),this}},{key:"init",value:(d=s(i().mark((function e(){var t,r,a,o,s,u,c=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.container.get(ba.SceneID),this.startInit=!0,this.configService.setLayerConfig(t,this.id,this.rawConfig),this.layerType=this.rawConfig.layerType,this.iconService=this.container.get(ba.IIconService),this.fontService=this.container.get(ba.IFontService),this.rendererService=this.container.get(ba.IRendererService),this.layerService=this.container.get(ba.ILayerService),this.debugService=this.container.get(ba.IDebugService),this.interactionService=this.container.get(ba.IInteractionService),this.pickingService=this.container.get(ba.IPickingService),this.mapService=this.container.get(ba.IMapService),r=this.getLayerConfig(),a=r.enableMultiPassRenderer,o=r.passes,a&&null!=o&&o.length&&o.length>0&&this.mapService.on("mapAfterFrameChange",(function(){c.renderLayers()})),this.cameraService=this.container.get(ba.ICameraService),this.coordinateService=this.container.get(ba.ICoordinateSystemService),this.shaderModuleService=this.container.get(ba.IShaderModuleService),this.postProcessingPassFactory=this.container.get(ba.IFactoryPostProcessingPass),this.normalPassFactory=this.container.get(ba.IFactoryNormalPass),this.styleAttributeService=this.container.get(ba.IStyleAttributeService),a&&(this.multiPassRenderer=this.container.get(ba.IMultiPassRenderer),this.multiPassRenderer.setLayer(this)),this.pendingStyleAttributes.forEach((function(e){var t=e.attributeName,r=e.attributeField,i=e.attributeValues,a=e.updateOptions;c.styleAttributeService.updateStyleAttribute(t,{scale:n({field:r},c.splitValuesAndCallbackInAttribute(i,c.getLayerConfig()[t]))},a)})),this.pendingStyleAttributes=[],this.plugins=this.container.getAll(ba.ILayerPlugin),s=k(this.plugins);try{for(s.s();!(u=s.n()).done;)u.value.apply(this,{rendererService:this.rendererService,mapService:this.mapService,styleAttributeService:this.styleAttributeService,normalPassFactory:this.normalPassFactory,postProcessingPassFactory:this.postProcessingPassFactory})}catch(e){s.e(e)}finally{s.f()}return this.layerPickService=new EV(this),this.textureService=new AV(this),this.log(CD.LayerInitStart),e.next=31,this.hooks.init.promise();case 31:this.log(CD.LayerInitEnd),this.inited=!0,this.emit("inited",{target:this,type:"inited"}),this.emit("add",{target:this,type:"add"}),this.hooks.afterInit.call();case 36:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"log",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"init";if(!this.tileLayer&&!this.isTileLayer){var n="".concat(this.id,".").concat(r,".").concat(e),i={id:this.id,type:this.type};null===(t=this.debugService)||void 0===t||t.log(n,i)}}},{key:"updateModelData",value:function(e){e.attributes&&e.elements?this.models.map((function(t){t.updateAttributesAndElements(e.attributes,e.elements)})):console.warn("data error")}},{key:"createModelData",value:function(e,t){var r;if(null!==(r=this.layerModel)&&void 0!==r&&r.createModelData)return this.layerModel.createModelData(t);var n=this.calculateEncodeData(e,t),i=this.triangulation;return n&&i?this.styleAttributeService.createAttributesAndIndices(n,i):{attributes:void 0,elements:void 0}}},{key:"setLayerPickService",value:function(e){this.layerPickService=e}},{key:"calculateEncodeData",value:function(e,t){return this.inited?function(e,t,r,n,i,a){var o=new uB(i,a),s=dV(n.getLayerStyleAttributes()||[],o.data.dataArray,t,r,e);return o.destroy(),s}(this,this.fontService,this.mapService,this.styleAttributeService,e,t):(console.warn("layer not inited!"),null)}},{key:"prepareBuildModel",value:function(){0!==Object.keys(this.needUpdateConfig||{}).length&&this.updateLayerConfig({});var e=this.getLayerConfig().animateOption;null!=e&&e.enable&&(this.animateStatus=!0)}},{key:"color",value:function(e,t,r){return this.updateStyleAttribute("color",e,t,r),this}},{key:"texture",value:function(e,t,r){return this.updateStyleAttribute("texture",e,t,r),this}},{key:"rotate",value:function(e,t,r){return this.updateStyleAttribute("rotate",e,t,r),this}},{key:"size",value:function(e,t,r){return this.updateStyleAttribute("size",e,t,r),this}},{key:"filter",value:function(e,t,r){var n=this.updateStyleAttribute("filter",e,t,r);return this.dataState.dataSourceNeedUpdate=n&&this.inited,this}},{key:"shape",value:function(e,t,r){this.shapeOption={field:e,values:t};var n=this.updateStyleAttribute("shape",e,t,r);return this.dataState.dataSourceNeedUpdate=n&&this.inited,this}},{key:"label",value:function(e,t,r){return this.pendingStyleAttributes.push({attributeName:"label",attributeField:e,attributeValues:t,updateOptions:r}),this}},{key:"animate",value:function(e){var t={};return vm(e)?(t.enable=!0,t=n(n({},t),e)):t.enable=e,this.updateLayerConfig({animateOption:t}),this}},{key:"source",value:function(e,t){return"source"===(null==e?void 0:e.type)?(this.setSource(e),this):(this.sourceOption={data:e,options:t},this.clusterZoom=0,this)}},{key:"setData",value:function(e,t){var r=this;return this.inited?(this.log(CD.SourceInitStart,pP.UPDATE),this.layerSource.setData(e,t),this.log(CD.SourceInitEnd,pP.UPDATE)):this.on("inited",(function(){r.log(CD.SourceInitStart,pP.UPDATE),r.getSource()?r.layerSource.setData(e,t):r.source(new uB(e,t)),r.layerSource.once("update",(function(){r.log(CD.SourceInitEnd,pP.UPDATE)}))})),this}},{key:"style",value:function(e){var t=this,r=e.passes,n=y(e,TV);r&&vV(r).forEach((function(e){var r=t.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(e[0]);r&&r.updateOptions(e[1])}));var i=n;Object.keys(n).forEach((function(e){var t=n[e];!Array.isArray(t)||2!==t.length||PB(t[0])||PB(t[1])||(i[e]={field:t[0],value:t[1]})})),this.encodeStyle(i),this.updateLayerConfig(i);var a=["segmentNumber","coverage","angle"];return Object.keys(n).some((function(e){return a.includes(e)}))&&this.hooks.init.promise(),this}},{key:"encodeStyle",value:function(e){var t=this;Object.keys(e).forEach((function(r){[t.enableShaderEncodeStyles].concat(T(t.enableDataEncodeStyles)).includes(r)&&zM(e[r])&&(e[r].field||e[r].value)&&!dU(t.encodeStyleAttribute[r],e[r])?(t.encodeStyleAttribute[r]=e[r],t.updateStyleAttribute(r,e[r].field,e[r].value),t.inited&&(t.dataState.dataMappingNeedUpdate=!0)):t.encodeStyleAttribute[r]&&(delete t.encodeStyleAttribute[r],t.dataState.dataSourceNeedUpdate=!0)}))}},{key:"scale",value:function(e,t){var r=n({},this.scaleOptions);if(vm(e)?this.scaleOptions=n(n({},this.scaleOptions),e):this.scaleOptions[e]=t,this.styleAttributeService&&!dU(r,this.scaleOptions)){var i=vm(e)?e:h({},e,t);this.styleAttributeService.updateScaleAttribute(i)}return this}},{key:"renderLayers",value:function(){this.rendering=!0,this.layerService.reRender(),this.rendering=!1}},{key:"render",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.tileLayer?(this.tileLayer.render(),this):(this.layerService.beforeRenderData(this),this.encodeDataLength<=0&&!this.forceRender||this.renderModels(e),this)}},{key:"renderMultiPass",value:(p=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this.encodeDataLength<=0)||this.forceRender){e.next=2;break}return e.abrupt("return");case 2:if(!this.multiPassRenderer||!this.multiPassRenderer.getRenderFlag()){e.next=7;break}return e.next=5,this.multiPassRenderer.render();case 5:e.next=8;break;case 7:this.multiPassRenderer,this.renderModels();case 8:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"active",value:function(e){var t={};return t.enableHighlight=!!vm(e)||e,vm(e)?(t.enableHighlight=!0,e.color&&(t.highlightColor=e.color),e.mix&&(t.activeMix=e.mix)):t.enableHighlight=!!e,this.updateLayerConfig(t),this}},{key:"setActive",value:function(e,t){var r=this;if(vm(e)){var n=e.x,i=void 0===n?0:n,a=e.y,o=void 0===a?0:a;this.updateLayerConfig({highlightColor:vm(t)?t.color:this.getLayerConfig().highlightColor,activeMix:vm(t)?t.mix:this.getLayerConfig().activeMix}),this.pick({x:i,y:o})}else this.updateLayerConfig({pickedFeatureID:e,highlightColor:vm(t)?t.color:this.getLayerConfig().highlightColor,activeMix:vm(t)?t.mix:this.getLayerConfig().activeMix}),this.hooks.beforeHighlight.call(Ug(e)).then((function(){setTimeout((function(){r.reRender()}),1)}))}},{key:"select",value:function(e){var t={};return t.enableSelect=!!vm(e)||e,vm(e)?(t.enableSelect=!0,e.color&&(t.selectColor=e.color),e.mix&&(t.selectMix=e.mix)):t.enableSelect=!!e,this.updateLayerConfig(t),this}},{key:"setSelect",value:function(e,t){var r=this;if(vm(e)){var n=e.x,i=void 0===n?0:n,a=e.y,o=void 0===a?0:a;this.updateLayerConfig({selectColor:vm(t)?t.color:this.getLayerConfig().selectColor,selectMix:vm(t)?t.mix:this.getLayerConfig().selectMix}),this.pick({x:i,y:o})}else this.updateLayerConfig({pickedFeatureID:e,selectColor:vm(t)?t.color:this.getLayerConfig().selectColor,selectMix:vm(t)?t.mix:this.getLayerConfig().selectMix}),this.hooks.beforeSelect.call(Ug(e)).then((function(){setTimeout((function(){r.reRender()}),1)}))}},{key:"setBlend",value:function(e){return this.updateLayerConfig({blend:e}),this.reRender(),this}},{key:"show",value:function(){return this.updateLayerConfig({visible:!0}),this.reRender(),this.emit("show"),this}},{key:"hide",value:function(){return this.updateLayerConfig({visible:!1}),this.reRender(),this.emit("hide"),this}},{key:"setIndex",value:function(e){return this.zIndex=e,this.layerService.updateLayerRenderList(),this.layerService.renderLayers(),this}},{key:"setCurrentPickId",value:function(e){this.currentPickId=e}},{key:"getCurrentPickId",value:function(){return this.currentPickId}},{key:"setCurrentSelectedId",value:function(e){this.selectedFeatureID=e}},{key:"getCurrentSelectedId",value:function(){return this.selectedFeatureID}},{key:"isVisible",value:function(){var e=this.mapService.getZoom(),t=this.getLayerConfig(),r=t.visible,n=t.minZoom,i=void 0===n?-1/0:n,a=t.maxZoom;return!!r&&e>=i&&e<(void 0===a?1/0:a)}},{key:"setMultiPass",value:function(e,t){if(this.updateLayerConfig({enableMultiPassRenderer:e}),t&&this.updateLayerConfig({passes:t}),e){var r=this.getLayerConfig().passes,n=void 0===r?[]:r;this.multiPassRenderer=gV(this,n,this.postProcessingPassFactory,this.normalPassFactory),this.multiPassRenderer.setRenderFlag(!0);var i=this.rendererService.getViewportSize(),a=i.width,o=i.height;this.multiPassRenderer.resize(a,o)}return this}},{key:"setMinZoom",value:function(e){return this.updateLayerConfig({minZoom:e}),this}},{key:"getMinZoom",value:function(){return this.getLayerConfig().minZoom}},{key:"getMaxZoom",value:function(){return this.getLayerConfig().maxZoom}},{key:"get",value:function(e){return this.getLayerConfig()[e]}},{key:"setMaxZoom",value:function(e){return this.updateLayerConfig({maxZoom:e}),this}},{key:"setAutoFit",value:function(e){return this.updateLayerConfig({autoFit:e}),this}},{key:"fitBounds",value:function(e){if(!this.inited)return this.updateLayerConfig({autoFit:!0}),this;var t=this.getSource().extent;return t.some((function(e){return Math.abs(e)===1/0}))||this.mapService.fitBounds([[t[0],t[1]],[t[2],t[3]]],e),this}},{key:"destroy",value:function(){var e,t,r,n,i=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.isDestroyed){this.layerChildren.map((function(e){return e.destroy(!1)})),this.layerChildren=[];var a=this.getLayerConfig(),o=a.maskfence;o&&(this.masks.map((function(e){return e.destroy(!1)})),this.masks=[]),this.hooks.beforeDestroy.call(),this.layerSource.off("update",this.sourceEvent),null===(e=this.multiPassRenderer)||void 0===e||e.destroy(),this.textureService.destroy(),this.styleAttributeService.clearAllAttributes(),this.hooks.afterDestroy.call(),null===(t=this.layerModel)||void 0===t||t.clearModels(i),null===(r=this.tileLayer)||void 0===r||r.destroy(),this.models=[],null===(n=this.debugService)||void 0===n||n.removeLog(this.id),this.emit("remove",{target:this,type:"remove"}),this.emit("destroy",{target:this,type:"destroy"}),this.removeAllListeners(),this.isDestroyed=!0}}},{key:"clear",value:function(){this.styleAttributeService.clearAllAttributes()}},{key:"clearModels",value:function(){var e;this.models.forEach((function(e){return e.destroy()})),null===(e=this.layerModel)||void 0===e||e.clearModels(),this.models=[]}},{key:"isDirty",value:function(){return!!(this.styleAttributeService.getLayerStyleAttributes()||[]).filter((function(e){return e.needRescale||e.needRemapping||e.needRegenerateVertices})).length}},{key:"setSource",value:function(e){var t=this;if(this.layerSource&&this.layerSource.off("update",this.sourceEvent),this.layerSource=e,this.clusterZoom=0,this.inited&&this.layerSource.cluster){var r=this.mapService.getZoom();this.layerSource.updateClusterData(r)}this.layerSource.inited&&this.sourceEvent(),this.layerSource.on("update",(function(e){var r=e.type;if(void 0===t.coordCenter){var n,i=t.layerSource.center;t.coordCenter=i,null!==(n=t.mapService)&&void 0!==n&&n.setCoordCenter&&t.mapService.setCoordCenter(i)}if("update"===r){if(t.tileLayer)return void t.tileLayer.reload();t.sourceEvent()}}))}},{key:"getSource",value:function(){return this.layerSource}},{key:"getScaleOptions",value:function(){return this.scaleOptions}},{key:"setEncodedData",value:function(e){this.encodedData=e,this.encodeDataLength=e.length}},{key:"getEncodedData",value:function(){return this.encodedData}},{key:"getScale",value:function(e){return this.styleAttributeService.getLayerAttributeScale(e)}},{key:"getLegend",value:function(e){var t,r,n,i=this.styleAttributeService.getLayerStyleAttribute(e);return{type:null===(r=((null==i||null===(t=i.scale)||void 0===t?void 0:t.scalers)||[])[0].option)||void 0===r?void 0:r.type,field:null==i||null===(n=i.scale)||void 0===n?void 0:n.field,items:this.getLegendItems(e)}}},{key:"getLegendItems",value:function(e){var t=this.styleAttributeService.getLayerAttributeScale(e);return t?t.invertExtent?t.range().map((function(r){return h({value:t.invertExtent(r)},e,r)})):t.ticks?t.ticks().map((function(r){return h({value:r},e,t(r))})):null!=t&&t.domain?t.domain().filter((function(e){return!tU(e)})).map((function(r){return h({value:r},e,t(r))})):[]:[]}},{key:"pick",value:function(e){var t=e.x,r=e.y;this.interactionService.triggerHover({x:t,y:r})}},{key:"boxSelect",value:function(e,t){this.pickingService.boxPickLayer(this,e,t)}},{key:"buildLayerModel",value:(c=s(i().mark((function e(t){var r,a,o,s,u,c,l,h,f,p,d,v,g=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.moduleName,a=t.vertexShader,o=t.fragmentShader,s=t.inject,u=t.triangulation,c=t.segmentNumber,l=y(t,wV),this.shaderModuleService.registerModule(r,{vs:a,fs:o,inject:s}),h=this.shaderModuleService.getModule(r),f=h.vs,p=h.fs,d=h.uniforms,v=this.rendererService.createModel,e.abrupt("return",new Promise((function(e){var t=g.styleAttributeService.createAttributesAndIndices(g.encodedData,u,c),r=t.attributes,i=t.elements,a=t.count,o=n({attributes:r,uniforms:d,fs:p,vs:f,elements:i,blend:vU[lP.normal]},l);a&&(o.count=a),e(v(o))})));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"createAttributes",value:function(e){var t=e.triangulation;return this.styleAttributeService.createAttributes(this.encodedData,t).attributes}},{key:"getTime",value:function(){return this.layerService.clock.getDelta()}},{key:"setAnimateStartTime",value:function(){this.animateStartTime=this.layerService.clock.getElapsedTime()}},{key:"stopAnimate",value:function(){this.animateStatus&&(this.layerService.stopAnimate(),this.animateStatus=!1,this.updateLayerConfig({animateOption:{enable:!1}}))}},{key:"getLayerAnimateTime",value:function(){return this.layerService.clock.getElapsedTime()-this.animateStartTime}},{key:"needPick",value:function(e){var t=this.getLayerConfig(),r=t.enableHighlight,n=void 0===r||r,i=t.enableSelect,a=void 0===i||i,o=-1!==this.eventNames().indexOf(e)||-1!==this.eventNames().indexOf("un"+e);return"click"!==e&&"dblclick"!==e||!a||(o=!0),"mousemove"!==e||!n&&-1===this.eventNames().indexOf("mouseenter")&&-1===this.eventNames().indexOf("unmousemove")&&-1===this.eventNames().indexOf("mouseout")||(o=!0),this.isVisible()&&o}},{key:"buildModels",value:(o=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"rebuildModels",value:(a=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.buildModels();case 2:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"renderMulPass",value:(r=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.render();case 2:case"end":return e.stop()}}),e)}))),function(e){return r.apply(this,arguments)})},{key:"renderModels",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.encodeDataLength<=0&&!this.forceRender?(this.clearModels(),this):(this.hooks.beforeRender.call(),this.models.forEach((function(r){r.draw({uniforms:e.layerModel.getUninforms(),blend:e.layerModel.getBlend(),stencil:e.layerModel.getStencil(t)},(null==t?void 0:t.ispick)||!1)})),this.hooks.afterRender.call(),this)}},{key:"updateStyleAttribute",value:function(e,t,r,i){var a=this.configService.getAttributeConfig(this.id)||{};return!dU(a[e],{field:t,values:r})&&(-1!==["color","size","texture","rotate","filter","label","shape"].indexOf(e)&&this.configService.setAttributeConfig(this.id,h({},e,{field:t,values:r})),this.startInit?this.styleAttributeService.updateStyleAttribute(e,{scale:n({field:t},this.splitValuesAndCallbackInAttribute(r,this.getLayerConfig()[t]))},i):this.pendingStyleAttributes.push({attributeName:e,attributeField:t,attributeValues:r,updateOptions:i}),!0)}},{key:"getLayerAttributeConfig",value:function(){return this.configService.getAttributeConfig(this.id)}},{key:"getShaderPickStat",value:function(){return this.layerService.getShaderPickStat()}},{key:"setEarthTime",value:function(e){console.warn("empty fn")}},{key:"processData",value:function(e){return e}},{key:"getModelType",value:function(){throw new Error("Method not implemented.")}},{key:"getDefaultConfig",value:function(){return{}}},{key:"initLayerModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.models.forEach((function(e){return e.destroy()})),this.models=[],e.next=4,this.layerModel.initModels();case 4:this.models=e.sent;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"reRender",value:function(){this.inited&&this.layerService.reRender()}},{key:"splitValuesAndCallbackInAttribute",value:function(e,t){return{values:gm(e)?void 0:e||t,callback:gm(e)?e:void 0}}}]),g}(F)).prototype,"configService",[mV],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),yV);function MV(e){return e.maskOperation===fP.OR?{enable:!0,mask:255,func:{cmp:rO.ALWAYS,ref:1,mask:255},opFront:{fail:rO.KEEP,zfail:rO.REPLACE,zpass:rO.REPLACE}}:{enable:!0,mask:255,func:{cmp:e.stencilType===hP.SINGLE||0===e.stencilIndex?rO.ALWAYS:rO.LESS,ref:e.stencilType===hP.SINGLE?1:0===e.stencilIndex?2:1,mask:255},opFront:{fail:rO.KEEP,zfail:rO.REPLACE,zpass:rO.REPLACE}}}var PV=(bV=mD(ba.IGlobalConfigService),SV=I((xV=function(){function e(t){u(this,e),h(this,"triangulation",void 0),h(this,"createTexture2D",void 0),h(this,"preStyleAttribute",{}),h(this,"encodeStyleAttribute",{}),h(this,"layer",void 0),h(this,"dataTexture",void 0),h(this,"DATA_TEXTURE_WIDTH",void 0),h(this,"rowCount",void 0),h(this,"cacheStyleProperties",void 0),h(this,"cellLength",void 0),h(this,"cellProperties",void 0),h(this,"cellTypeLayout",void 0),h(this,"stylePropertiesExist",void 0),h(this,"dataTextureTest",void 0),P(this,"configService",SV,this),h(this,"shaderModuleService",void 0),h(this,"rendererService",void 0),h(this,"iconService",void 0),h(this,"fontService",void 0),h(this,"styleAttributeService",void 0),h(this,"mapService",void 0),h(this,"coordinateSystemService",void 0),h(this,"cameraService",void 0),h(this,"layerService",void 0),h(this,"pickingService",void 0),this.layer=t,this.rendererService=t.getContainer().get(ba.IRendererService),this.pickingService=t.getContainer().get(ba.IPickingService),this.shaderModuleService=t.getContainer().get(ba.IShaderModuleService),this.styleAttributeService=t.getContainer().get(ba.IStyleAttributeService),this.mapService=t.getContainer().get(ba.IMapService),this.coordinateSystemService=t.getContainer().get(ba.ICoordinateSystemService),this.iconService=t.getContainer().get(ba.IIconService),this.fontService=t.getContainer().get(ba.IFontService),this.cameraService=t.getContainer().get(ba.ICameraService),this.layerService=t.getContainer().get(ba.ILayerService),this.registerStyleAttribute(),this.registerBuiltinAttributes(),this.startModelAnimate();var r=this.rendererService.createTexture2D;this.createTexture2D=r}var t,r,a;return l(e,[{key:"getBlend",value:function(){var e=this.layer.getLayerConfig().blend;return vU[lP[void 0===e?"normal":e]]}},{key:"getStencil",value:function(e){var t=this.layer.getLayerConfig(),r=t.mask,i=void 0!==r&&r,a=t.maskInside,o=void 0===a||a,s=t.enableMask,u=t.maskOperation,c=void 0===u?fP.AND:u;return"MaskLayer"===this.layer.type?MV({isStencil:!0,stencilType:hP.SINGLE}):e.isStencil?MV(n(n({},e),{},{maskOperation:c})):function(e,t){return{enable:e,mask:255,func:{cmp:rO.EQUAL,ref:t?1:0,mask:1}}}(i||s&&0!==this.layer.masks.length||void 0!==this.layer.tileMask,o)}},{key:"getDefaultStyle",value:function(){return{}}},{key:"getUninforms",value:function(){throw new Error("Method not implemented.")}},{key:"getAnimateUniforms",value:function(){return{}}},{key:"needUpdate",value:(a=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!1);case 1:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})},{key:"buildModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return e.stop()}}),e)}))),function(){return r.apply(this,arguments)})},{key:"initModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){}},{key:"getAttribute",value:function(){throw new Error("Method not implemented.")}},{key:"render",value:function(e){throw new Error("Method not implemented.")}},{key:"registerBuiltinAttributes",value:function(){throw new Error("Method not implemented.")}},{key:"animateOption2Array",value:function(e){return[e.enable?0:1,e.duration||4,e.interval||.2,e.trailLength||.1]}},{key:"startModelAnimate",value:function(){this.layer.getLayerConfig().animateOption.enable&&this.layer.setAnimateStartTime()}},{key:"getInject",value:function(){var e=this.layer.encodeStyleAttribute,t="",r={opacity:"float",stroke:"vec4",offsets:"vec2",textOffset:"vec2"};this.layer.enableShaderEncodeStyles.forEach((function(n){e[n]&&(t+="#define USE_ATTRIBUTE_".concat(n.toUpperCase()," 0.0; \n\n")),t+="\n          #ifdef USE_ATTRIBUTE_".concat(n.toUpperCase(),"\n      attribute ").concat(r[n]," a_").concat(n.charAt(0).toUpperCase()+n.slice(1),";\n    #else\n      uniform ").concat(r[n]," u_").concat(n,";\n    #endif\n\n    ")}));var n="";return this.layer.enableShaderEncodeStyles.forEach((function(e){n+="\n\n#ifdef USE_ATTRIBUTE_".concat(e.toUpperCase(),"\n  ").concat(r[e]," ").concat(e,"  = a_").concat(e.charAt(0).toUpperCase()+e.slice(1),";\n#else\n  ").concat(r[e]," ").concat(e," = u_").concat(e,";\n#endif\n\n")})),{"vs:#decl":t,"vs:#main-start":n}}},{key:"getStyleAttribute",value:function(){var e=this,t={},r={opacity:1,stroke:[1,0,0,1],offsets:[0,0]};return this.layer.enableShaderEncodeStyles.forEach((function(n){if(!e.layer.encodeStyleAttribute[n]){var i=e.layer.getLayerConfig()[n],a=void 0===i?r[n]:i;"stroke"===n&&(a=zg(a)),t["u_"+n]=a}})),t}},{key:"registerStyleAttribute",value:function(){var e=this;Object.keys(this.layer.encodeStyleAttribute).forEach((function(t){var r=function(e){switch(e){case"stroke":return{name:"stroke",type:RD.Attribute,descriptor:{name:"a_Stroke",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(e){var t=e.stroke;return void 0===t?[1,1,1,1]:t}}};case"opacity":return{name:"opacity",type:RD.Attribute,descriptor:{name:"a_Opacity",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.opacity;return[void 0===t?1:t]}}};case"offsets":return{name:"offsets",type:RD.Attribute,descriptor:{name:"a_Offsets",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e){return e.offsets}}};default:return}}(t);r&&e.styleAttributeService.registerStyleAttribute(r)}))}},{key:"updateEncodeAttribute",value:function(e,t){this.encodeStyleAttribute[e]=t}}]),e}()).prototype,"configService",[bV],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),xV),IV=function(e){return e[e.solid=0]="solid",e[e.dash=1]="dash",e}({}),OV=function(e){return e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e}({}),RV=function(e){return e.NORMAL="normal",e.REPLACE="replace",e}({}),LV=function(e){return e[e.pixel=0]="pixel",e[e.meter=1]="meter",e}({}),NV=function(e){return e.ALWAYS="always",e.DRAGEND="dragend",e}({}),DV={canvas:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"updateMode",NV.ALWAYS),h(_(e),"canvas",void 0),h(_(e),"ctx",void 0),h(_(e),"prevSize",void 0),h(_(e),"renderUpdate",(function(){var t=e.layer.getLayerConfig(),r=t.zIndex,n=void 0===r?10:r,i=t.update,a=void 0===i?NV.ALWAYS:i,o=t.animateOption,s=void 0===o?{enable:!1,duration:20}:o;+e.canvas.style.zIndex===n&&(e.canvas.style.zIndex=n+""),e.updateMode!==a&&(e.updateMode=a,e.unBindListener(),e.bindListener()),e.updateMode===NV.ALWAYS&&s.enable&&e.renderCanvas()})),h(_(e),"unBindListener",(function(){e.mapService.off("mapchange",e.renderCanvas),e.mapService.off("zoomstart",e.clearCanvas),e.mapService.off("zoomend",e.renderCanvas),e.mapService.off("movestart",e.clearCanvas),e.mapService.off("moveend",e.renderCanvas)})),h(_(e),"bindListener",(function(){e.updateMode===NV.ALWAYS?e.mapService.on("mapchange",e.renderCanvas):(e.mapService.on("zoomstart",e.clearCanvas),e.mapService.on("zoomend",e.renderCanvas),e.mapService.on("movestart",e.clearCanvas),e.mapService.on("moveend",e.renderCanvas))})),h(_(e),"clearCanvas",(function(){if(e.ctx){var t=e.rendererService.getViewportSize(),r=t.width,n=t.height;e.ctx.clearRect(0,0,r,n)}})),h(_(e),"renderCanvas",(function(){var t=e.rendererService.getViewportSize(),r=t.width,n=t.height;if(e.prevSize[0]!==r||e.prevSize[1]!==n){e.prevSize=[r,n];var i=A(e.mapService.getSize(),2),a=i[0],o=i[1];e.canvas.width=r,e.canvas.height=n,e.canvas.style.width=a+"px",e.canvas.style.height=o+"px"}var s=e.layer.getLayerConfig().drawingOnCanvas;e.ctx&&s({canvas:e.canvas,ctx:e.ctx,mapService:e.mapService,size:[r,n]})})),e}return l(a,[{key:"clearModels",value:function(){var e;this.canvas&&(null===(e=this.mapService.getContainer())||void 0===e||e.removeChild(this.canvas),this.canvas=null);this.unBindListener()}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.update,n=void 0===r?NV.ALWAYS:r,this.updateMode=n,this.initCanvas(),this.renderCanvas(),this.bindListener(),this.mapService.getContainer(),e.abrupt("return",[]);case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"initCanvas",value:function(){var e,t=this.layer.getLayerConfig().zIndex,r=A(this.mapService.getSize(),2),n=r[0],i=r[1],a=this.rendererService.getViewportSize(),o=a.width,s=a.height;this.prevSize=[o,s];var u=document.createElement("canvas");this.canvas=u,u.width=o,u.height=s,u.style.pointerEvents="none",u.style.width=n+"px",u.style.height=i+"px",u.style.position="absolute",u.style.top="0",u.style.left="0",u.style.zIndex=t+"",null===(e=this.mapService.getContainer())||void 0===e||e.appendChild(u);var c=u.getContext("2d");this.ctx=c}},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){}}]),a}(PV)},FV=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","CanvasLayer"),h(_(e),"forceRender",!0),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new DV[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"hide",value:function(){return this.layerModel.clearCanvas&&this.layerModel.clearCanvas(),this.updateLayerConfig({visible:!1}),this.reRender(),this}},{key:"renderModels",value:function(){var e,t=this;return null!=this&&null!==(e=this.layerModel)&&void 0!==e&&e.renderUpdate&&this.layerModel.renderUpdate(),this.models.forEach((function(e){e.draw({uniforms:t.layerModel.getUninforms()},!1)})),this}},{key:"getDefaultConfig",value:function(){return{canvas:{}}[this.getModelType()]}},{key:"getModelType",value:function(){return"canvas"}}]),n}(kV),zV=function(e,t,r,n,i,a,o,s){for(var u,c,l=i,h=0,f=!!o&&Yn(o,s);h<n;)h in r&&(u=f?f(r[h],h,t):r[h],a>0&&Xn(u)?(c=Gr(u),l=zV(e,t,u,c,l,a-1)-1):(Sa(l+1),e[l]=u),l++),h++;return l},BV=zV;hn({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Ft(this),r=Gr(t),n=ai(t,0);return n.length=BV(n,t,t,r,0,void 0===e?1:Fr(e)),n}}),Na("flat");function UV(e){return e/180*Math.acos(-1)}function jV(e){var t=UV(e[0])+Math.PI/2,r=UV(e[1]),n=100+.4*Math.random(),i=n*Math.cos(r)*Math.cos(t);return[n*Math.cos(r)*Math.sin(t),n*Math.sin(r),i]}function VV(e,t){var r=Ab(),n=Ab(),i=ux(0,1,0),a=ux(0,0,0);e=void 0!==e?e:1;for(var o=2+(void 0!==(t=t||{}).segments?t.segments:32),s=2*o,u=[],c=[],l=[],h=[],f=[],p=[],d=0;d<=o;d++){for(var v=d/o,g=v*Math.PI,m=0;m<=s;m++){var y=m/s,_=y*Math.PI*2;Cb(n),Lb(n,n,-g),Cb(r),Rb(r,r,_),bx(a,i,n),bx(a,a,r),fx(a,a,-e),l.push(a.slice()),h.push.apply(h,T(a.slice())),mx(a,a),f.push.apply(f,T(a.slice())),p.push([y,1-v]),h.push(y,1-v)}if(d>0)for(var b=l.length,x=b-2*(s+1);x+s+2<b;x++)u.push([x,x+1,x+s+1]),c.push(x,x+1,x+s+1),u.push([x+s+1,x+1,x+s+2]),c.push(x+s+1,x+1,x+s+2)}return{cells:u,positions:l,uvs:p,positionsArr:h,indicesArr:c,normalArr:f}}var GV=Zb(),HV=(Zb(),Zb()),WV=Zb(),YV=Zb();function XV(e,t,r,n,i){return $b(e,r,n),tx(e,e),[i/rx(t=qb(-e[1],e[0]),qb(-r[1],r[0])),t]}function ZV(e,t){return Qb(e,-t[1],t[0])}function qV(e,t,r){return ax(e,t,r),tx(e,e),e}function KV(e,t){return e[0]===t[0]&&e[1]===t[1]}var QV,$V=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),h(this,"complex",void 0),h(this,"join",void 0),h(this,"cap",void 0),h(this,"miterLimit",void 0),h(this,"thickness",void 0),h(this,"normal",void 0),h(this,"lastFlip",-1),h(this,"miter",qb(0,0)),h(this,"started",!1),h(this,"dash",!1),h(this,"totalDistance",0),h(this,"currentIndex",0),this.join=t.join||"miter",this.cap=t.cap||"butt",this.miterLimit=t.miterLimit||10,this.thickness=t.thickness||1,this.dash=t.dash||!1,this.complex={positions:[],indices:[],normals:[],startIndex:0,indexes:[]}}return l(e,[{key:"simpleExtrude",value:function(e){var t=this.complex;if(e.length<=1)return t;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=e.length,n=t.startIndex,i=1;i<r;i++){var a=e[i-1],o=e[i],s=i<e.length-1?e[i+1]:null;n+=this.simpleSegment(t,n,a,o,s)}if(this.dash)for(var u=0;u<t.positions.length/6;u++)t.positions[6*u+5]=this.totalDistance;return t.startIndex=t.positions.length/6,t}},{key:"simpleExtrude_gaode2",value:function(e,t){var r=this.complex;if(e.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=e.length,i=r.startIndex,a=1;a<n;a++){var o,s,u,c=e[a-1];c.push(null!==(o=t[a-1][2])&&void 0!==o?o:0);var l=t[a-1],h=e[a];h.push(null!==(s=t[a][2])&&void 0!==s?s:0);var f=t[a],p=a<e.length-1?[].concat(T(e[a+1]),[null!==(u=t[a+1][2])&&void 0!==u?u:0]):null,d=a<t.length-1?t[a+1]:null;i+=this.simpleSegment(r,i,c,h,p,l,f,d)}if(this.dash)for(var v=0;v<r.positions.length/6;v++)r.positions[6*v+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"extrude_gaode2",value:function(e,t){var r=this.complex;if(e.length<=1)return r;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var n=e.length,i=r.startIndex,a=1;a<n;a++){var o,s,u,c=e[a-1];c.push(null!==(o=t[a-1][2])&&void 0!==o?o:0);var l=t[a-1],h=e[a];h.push(null!==(s=t[a][2])&&void 0!==s?s:0);var f=t[a],p=a<e.length-1?[].concat(T(e[a+1]),[null!==(u=t[a+1][2])&&void 0!==u?u:0]):null,d=a<t.length-1?t[a+1]:null;i+=this.segment_gaode2(r,i,c,h,p,l,f,d)}if(this.dash)for(var v=0;v<r.positions.length/6;v++)r.positions[6*v+5]=this.totalDistance;return r.startIndex=r.positions.length/6,r}},{key:"extrude",value:function(e){var t=this.complex;if(e.length<=1)return t;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=e.length,n=t.startIndex,i=1;i<r;i++){var a=e[i-1],o=e[i],s=i<e.length-1?e[i+1]:null;n+=this.segment(t,n,a,o,s)}if(this.dash)for(var u=0;u<t.positions.length/6;u++)t.positions[6*u+5]=this.totalDistance;return t.startIndex=t.positions.length/6,t}},{key:"simpleSegment",value:function(e,t,r,n,i){var a=0,o=e.indices,s=e.positions,u=e.normals,c=mS([n[0],n[1]]),l=mS([r[0],r[1]]);qV(HV,c,l);var h=0;if(this.dash&&(h=this.lineSegmentDistance(c,l),this.totalDistance+=h),this.normal||(this.normal=Zb(),ZV(this.normal,HV)),this.started||(this.started=!0,this.extrusions(s,u,r,this.normal,this.thickness,this.totalDistance-h)),o.push(t+0,t+1,t+2),i){var f=mS([i[0],i[1]]);KV(c,f)&&$b(f,c,tx(f,Jb(f,c,l))),qV(WV,f,c);var p=A(XV(YV,Zb(),HV,WV,this.thickness),2),d=p[0],v=p[1];rx(YV,this.normal);this.extrusions(s,u,n,v,d,this.totalDistance),o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),-1,Kb(this.normal,v),a+=2,this.lastFlip=-1}else ZV(this.normal,HV),this.extrusions(s,u,n,this.normal,this.thickness,this.totalDistance),o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),a+=2;return a}},{key:"segment_gaode2",value:function(e,t,r,n,i,a,o,s){var u=0,c=e.indices,l=e.positions,h=e.normals,f="square"===this.cap,p="bevel"===this.join,d=mS([o[0],o[1]]),v=mS([a[0],a[1]]);qV(HV,n,r);var g=0;if(this.dash&&(g=this.lineSegmentDistance(d,v),this.totalDistance+=g),this.normal||(this.normal=Zb(),ZV(this.normal,HV)),!this.started)if(this.started=!0,f){var m=Zb(),y=Zb();$b(m,this.normal,HV),$b(y,this.normal,HV),h.push(y[0],y[1],0),h.push(m[0],m[1],0),l.push(r[0],r[1],0|r[2],this.totalDistance-g,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),l.push(r[0],r[1],0|r[2],this.totalDistance-g,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(l,h,r,this.normal,this.thickness,this.totalDistance-g);if(c.push(t+0,t+1,t+2),i){KV(n,i)&&$b(i,n,tx(i,Jb(i,n,r))),qV(WV,i,n);var _=A(XV(YV,Zb(),HV,WV,this.thickness),2),b=_[0],x=_[1],S=rx(YV,this.normal)<0?-1:1,E=p;if(!E&&"miter"===this.join)b>this.miterLimit&&(E=!0);E?(h.push(this.normal[0],this.normal[1],0),h.push(x[0],x[1],0),l.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*S,0|n[2]),this.complex.indexes.push(this.currentIndex),l.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*S,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,c.push.apply(c,T(this.lastFlip!==-S?[t,t+2,t+3]:[t+2,t+1,t+3])),c.push(t+2,t+3,t+4),ZV(GV,WV),Kb(this.normal,GV),h.push(this.normal[0],this.normal[1],0),l.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*S,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,u+=3):(this.extrusions(l,h,n,x,b,this.totalDistance),c.push.apply(c,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),S=-1,Kb(this.normal,x),u+=2),this.lastFlip=S}else{if(ZV(this.normal,HV),f){var w=Zb(),C=Zb();ax(C,HV,this.normal),$b(w,HV,this.normal),h.push(C[0],C[1],0),h.push(w[0],w[1],0),l.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),l.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(l,h,n,this.normal,this.thickness,this.totalDistance);c.push.apply(c,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),u+=2}return u}},{key:"segment",value:function(e,t,r,n,i){var a=0,o=e.indices,s=e.positions,u=e.normals,c="square"===this.cap,l="bevel"===this.join,h=mS([n[0],n[1]]),f=mS([r[0],r[1]]);qV(HV,h,f);var p=0;if(this.dash&&(p=this.lineSegmentDistance(h,f),this.totalDistance+=p),this.normal||(this.normal=Zb(),ZV(this.normal,HV)),!this.started)if(this.started=!0,c){var d=Zb(),v=Zb();$b(d,this.normal,HV),$b(v,this.normal,HV),u.push(v[0],v[1],0),u.push(d[0],d[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance-p,-this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),s.push(r[0],r[1],0|r[2],this.totalDistance-p,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(s,u,r,this.normal,this.thickness,this.totalDistance-p);if(o.push(t+0,t+1,t+2),i){var g=mS([i[0],i[1]]);KV(h,g)&&$b(g,h,tx(g,Jb(g,h,f))),qV(WV,g,h);var m=A(XV(YV,Zb(),HV,WV,this.thickness),2),y=m[0],_=m[1],b=rx(YV,this.normal)<0?-1:1,x=l;if(!x&&"miter"===this.join)y>this.miterLimit&&(x=!0);x?(u.push(this.normal[0],this.normal[1],0),u.push(_[0],_[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*b,0|n[2]),this.complex.indexes.push(this.currentIndex),s.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness*b,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,o.push.apply(o,T(this.lastFlip!==-b?[t,t+2,t+3]:[t+2,t+1,t+3])),o.push(t+2,t+3,t+4),ZV(GV,WV),Kb(this.normal,GV),u.push(this.normal[0],this.normal[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance,-this.thickness*b,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,a+=3):(this.extrusions(s,u,n,_,y,this.totalDistance),o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),b=-1,Kb(this.normal,_),a+=2),this.lastFlip=b}else{if(ZV(this.normal,HV),c){var S=Zb(),E=Zb();ax(E,HV,this.normal),$b(S,HV,this.normal),u.push(E[0],E[1],0),u.push(S[0],S[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),s.push(n[0],n[1],0|n[2],this.totalDistance,this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(s,u,n,this.normal,this.thickness,this.totalDistance);o.push.apply(o,T(1===this.lastFlip?[t,t+2,t+3]:[t+2,t+1,t+3])),a+=2}return a}},{key:"extrusions",value:function(e,t,r,n,i,a){t.push(n[0],n[1],0),t.push(n[0],n[1],0),e.push(r[0],r[1],0|r[2],a,-i,0|r[2]),this.complex.indexes.push(this.currentIndex),e.push(r[0],r[1],0|r[2],a,i,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}}]),e}();function JV(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=e[0][0],n=e[0][e[0].length-1];r[0]===n[0]&&r[1]===n[1]&&(e[0]=e[0].slice(0,e[0].length-1));for(var i=e[0].length,a=PA.flatten(e),o=a.vertices,s=a.dimensions,u=[],c=[],l=[],h=0;h<o.length/s;h++)u.push(o[h*s],o[h*s+1],1,-1,-1),l.push(0,0,1);var f=PA(a.vertices,a.holes,a.dimensions);c.push.apply(c,T(f));for(var p=function(){var e=a.vertices.slice(d*s,(d+1)*s),r=a.vertices.slice((d+1)*s,(d+2)*s);0===r.length&&(r=a.vertices.slice(0,s));var n=u.length/5;u.push(e[0],e[1],1,0,0,r[0],r[1],1,.1,0,e[0],e[1],0,0,.8,r[0],r[1],0,.1,.8);var i=eG([r[0],r[1],1],[e[0],e[1],0],[e[0],e[1],1],t);l.push.apply(l,T(i).concat(T(i),T(i),T(i))),c.push.apply(c,T([1,2,0,3,2,1].map((function(e){return e+n}))))},d=0;d<i;d++)p();return{positions:u,index:c,normals:l}}function eG(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=ox(),a=ox(),o=ox();n&&(e=pS(e),t=pS(t),r=pS(r));var s=ux.apply(Ix,T(e)),u=ux.apply(Ix,T(t)),c=ux.apply(Ix,T(r));Sx(i,c,u),Sx(a,s,u),_x(o,i,a);var l=ox();return mx(l,o),l}var tG=function(e){return e.CYLINDER="cylinder",e.SQUARECOLUMN="squareColumn",e.TRIANGLECOLUMN="triangleColumn",e.HEXAGONCOLUMN="hexagonColumn",e.PENTAGONCOLUMN="pentagonColumn",e}({}),rG=function(e){return e.CIRCLE="circle",e.SQUARE="square",e.TRIANGLE="triangle",e.HEXAGON="hexagon",e.PENTAGON="pentagon",e}({});function nG(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=2*Math.PI/e,n=[],i=0;i<e;i++)n.push(r*i+t*Math.PI/12);var a=n.map((function(e){return[Math.sin(e+Math.PI/4),Math.cos(e+Math.PI/4),0]}));return a}function iG(){return nG(30)}function aG(){return nG(4)}function oG(){return nG(3)}function sG(){return nG(6,1)}function uG(){return nG(5)}var cG=(h(QV={},rG.CIRCLE,iG),h(QV,rG.HEXAGON,sG),h(QV,rG.TRIANGLE,oG),h(QV,rG.SQUARE,aG),h(QV,rG.PENTAGON,uG),h(QV,tG.CYLINDER,iG),h(QV,tG.HEXAGONCOLUMN,sG),h(QV,tG.TRIANGLECOLUMN,oG),h(QV,tG.SQUARECOLUMN,aG),h(QV,tG.PENTAGONCOLUMN,uG),QV),lG={};function hG(e){var t=kS(e.coordinates);return{vertices:[].concat(T(t),T(t),T(t),T(t)),indices:[0,1,2,2,3,0],size:t.length}}function fG(e){var t=jV(kS(e.coordinates));return{vertices:[].concat(T(t),T(t),T(t),T(t)),indices:[0,1,2,2,3,0],size:t.length}}function pG(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(lG&&lG[e])return lG[e];var r=cG[e]?cG[e]():cG.cylinder(),n=JV([r],t);return lG[e]=n,n}(e.shape,!1);return{vertices:t.positions,indices:t.index,normals:t.normals,size:5}}function dG(e){var t=kS(e.coordinates);return{vertices:T(t),indices:[0],size:t.length}}function vG(e){var t=e.coordinates,r=e.originCoordinates,n=e.version,i=new $V({dash:!0,join:"bevel"});if("GAODE2.x"===n){var a=t;Array.isArray(a[0][0])||(a=[t]);var o=r;Array.isArray(o[0][0])||(o=[r]);for(var s=0;s<a.length;s++){var u=a[s],c=o[s];i.extrude_gaode2(u,c)}}else{var l=t;l[0]&&!Array.isArray(l[0][0])&&(l=[t]),l.forEach((function(e){i.extrude(e)}))}var h=i.complex;return{vertices:h.positions,indices:h.indices,normals:h.normals,indexes:h.indexes,size:6}}function gG(e){var t=e.coordinates.flat();return{vertices:[1,0,0].concat(T(t),[1,2,-3],T(t),[1,1,-3],T(t),[0,1,0],T(t),[0,0,0],T(t),[1,0,0],T(t),[1,2,-3],T(t),[1,1,-3],T(t),[0,1,0],T(t),[0,0,0],T(t)),normals:[-1,2,1,2,-1,1,1,-1,1,1,-1,1,-1,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],indices:[0,1,2,0,2,3,0,3,4,5,6,7,5,7,8,5,8,9],size:7}}function mG(e){var t=e.coordinates,r=[];if(!Array.isArray(t[0]))return{vertices:[],indices:[],normals:[],size:6,count:0};var n=function(e){var t=e;Array.isArray(t)&&Array.isArray(t[0])&&Array.isArray(t[0][0])&&(t=e.flat());var r=0;if(t.length<2)return{results:t,totalDistance:0};var n=[],i=_G(t[0],r);n.push(i);for(var a=1;a<t.length-1;a++){var o=yG(t[a-1],t[a]);r+=o;var s=_G(t[a],r);n.push(s),n.push(s)}var u=yG(t[t.length-2],t[t.length-1]);return r+=u,n.push(_G(t[t.length-1],r)),{results:n,totalDistance:r}}(t),i=n.results,a=n.totalDistance;return i.map((function(e){r.push(e[0],e[1],e[2],e[3],0,a)})),{vertices:r,indices:[],normals:[],size:6,count:i.length}}function yG(e,t){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function _G(e,t){return e.length<3&&e.push(0),void 0!==t&&e.push(t),e}function bG(e){var t=e.coordinates,r=PA.flatten(t),n=r.vertices,i=r.dimensions,a=r.holes;return{indices:PA(n,a,i),vertices:n,size:i}}function xG(e){var t=e.coordinates,r=PA.flatten(t),n=r.vertices,i=r.dimensions,a=r.holes;return{indices:PA(n,a,i),vertices:SG(n),size:i+4}}function SG(e){for(var t=[],r=MS(e),n=r.center,i=r.radius,a=0;a<e.length;a+=2){var o=e[a],s=e[a+1];t.push.apply(t,[o,s,0].concat(T(n),[i]))}return t}function EG(e){var t=JV(e.coordinates,!0);return{vertices:t.positions,indices:t.index,normals:t.normals,size:5}}function AG(e){var t=function(e){var t=cG[e]?cG[e]():cG.circle();return-1===["cylinder","triangleColumn","hexagonColumn","squareColumn"].indexOf(e)?(r=[t],n=PA.flatten(r),i=PA(n.vertices,n.holes,n.dimensions),{positions:n.vertices,index:i}):function(e){var t=e[0][0],r=e[0][e[0].length-1];t[0]===r[0]&&t[1]===r[1]&&(e[0]=e[0].slice(0,e[0].length-1));for(var n=e[0].length,i=PA.flatten(e),a=i.vertices,o=i.dimensions,s=[],u=[],c=0;c<a.length/o;c++)2===o?s.push(a[2*c],a[2*c+1],1):s.push(a[3*c],a[3*c+1],1);var l=PA(i.vertices,i.holes,i.dimensions);u.push.apply(u,T(l));for(var h=function(){var e=i.vertices.slice(f*o,(f+1)*o),t=i.vertices.slice((f+1)*o,(f+2)*o);0===t.length&&(t=i.vertices.slice(0,o));var r=s.length/3;s.push(e[0],e[1],1,t[0],t[1],1,e[0],e[1],0,t[0],t[1],0),u.push.apply(u,T([0,2,1,2,3,1].map((function(e){return e+r}))))},f=0;f<n;f++)h();return{positions:s,index:u}}([t]);var r,n,i}(e.shape);return{vertices:t.positions,indices:t.index,size:3}}function TG(e){var t=e.coordinates;return{vertices:[].concat(T(t[0]),[0,0,1,t[1][0],t[0][1],0,1,1],T(t[1]),[0,1,0],T(t[0]),[0,0,1],T(t[1]),[0,1,0,t[0][0],t[1][1],0,0,0]),indices:[0,1,2,3,4,5],size:5}}function wG(e,t){for(var r=t||30,n=e.coordinates,i=[],a=[],o=function(e){i.push(e,1,e,n[0][0],n[0][1],n[1][0],n[1][1],e,-1,e,n[0][0],n[0][1],n[1][0],n[1][1]),e!==r-1&&a.push.apply(a,T([0,1,2,1,3,2].map((function(t){return 2*e+t}))))},s=0;s<r;s++)o(s);return{vertices:i,indices:a,size:7}}function CG(e){var t=e.coordinates;2===t.length&&t.push(0);var r=kG(-1,1),n=kG(1,1),i=kG(-1,-1),a=kG(1,-1);return{vertices:[].concat(T(t),T(r),T(t),T(i),T(t),T(a),T(t),T(n)),indices:[0,1,2,3,0,2],size:5}}function kG(e,t){return[(e+1)/2,(t+1)/2]}function MG(){var e=VV(100,{segments:36});return{vertices:e.positionsArr,indices:e.indicesArr,size:5,normals:e.normalArr}}function PG(){var e=VV(140,{segments:36});return{vertices:e.positionsArr,indices:e.indicesArr,size:5,normals:e.normalArr}}var IG,OG=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"cityCenter",void 0),h(_(e),"cityMinSize",void 0),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.baseColor,i=void 0===n?"rgb(16,16,16)":n,a=e.brightColor,o=void 0===a?"rgb(255,176,38)":a,s=e.windowColor,u=void 0===s?"rgb(30,60,89)":s,c=e.time,l=void 0===c?0:c,h=e.sweep,f=void 0===h?{enable:!1,sweepRadius:1,sweepColor:"rgb(255, 255, 255)",sweepSpeed:.4,sweepCenter:this.cityCenter}:h;return{u_cityCenter:f.sweepCenter||this.cityCenter,u_cityMinSize:this.cityMinSize*f.sweepRadius,u_circleSweep:f.enable?1:0,u_circleSweepColor:zg(f.sweepColor).slice(0,3),u_circleSweepSpeed:f.sweepSpeed,u_opacity:r,u_baseColor:zg(i),u_brightColor:zg(o),u_windowColor:zg(u),u_time:this.layer.getLayerAnimateTime()||l}}},{key:"calCityGeo",value:function(){var e=A(this.layer.getSource().extent,4),t=e[0],r=e[1],n=e[2],i=e[3];if("GAODE2.x"===this.mapService.version){this.cityCenter=this.mapService.lngLatToCoord([(n+t)/2,(i+r)/2]);var a=this.mapService.lngLatToCoord([n,i]),o=this.mapService.lngLatToCoord([t,r]);this.cityMinSize=Math.sqrt(Math.pow(a[0]-o[0],2)+Math.pow(a[1]-o[1],2))/4}else{var s=n-t,u=i-r;this.cityCenter=[(n+t)/2,(i+r)/2],this.cityMinSize=Math.sqrt(Math.pow(s,2)+Math.pow(u,2))/4}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.calCityGeo(),this.startModelAnimate(),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"cityBuilding",vertexShader:'precision highp float;\r\n\r\n#define ambientRatio 0.5\r\n#define diffuseRatio 0.3\r\n#define specularRatio 0.2\r\n\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Normal;\r\nattribute float a_Size;\r\nuniform mat4 u_ModelMatrix;\r\n\r\nattribute vec2 a_Uv;\r\nvarying vec2 v_texCoord;\r\n\r\nvarying vec4 v_Color;\r\nuniform mat4 u_Mvp;\r\n\r\nuniform float u_circleSweep;\r\nuniform vec2 u_cityCenter;\r\n\r\nvarying float v_worldDis;\r\n\r\n#pragma include "projection"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\n\r\nvoid main() {\r\n  vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\r\n  vec4 project_pos = project_position(pos);\r\n\r\n   v_texCoord = a_Uv;\r\n\r\n  if(u_circleSweep > 0.0) {\r\n     vec2 lnglatscale = vec2(0.0);\r\n    if(u_CoordinateSystem != COORDINATE_SYSTEM_P20_2) {\r\n      lnglatscale = (a_Position.xy - u_cityCenter) * vec2(0.0, 0.135);\r\n    }\r\n    v_worldDis = length(a_Position.xy + lnglatscale - u_cityCenter);\r\n  }\r\n \r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n\r\n  float lightWeight = calc_lighting(pos);\r\n  // v_Color = a_Color;\r\n  v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w);\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'uniform float u_opacity: 1.0;\r\nuniform vec4 u_baseColor : [ 1.0, 0, 0, 1.0 ];\r\nuniform vec4 u_brightColor : [ 1.0, 0, 0, 1.0 ];\r\nuniform vec4 u_windowColor : [ 1.0, 0, 0, 1.0 ];\r\nuniform float u_near : 0;\r\nuniform float u_far : 1;\r\nvarying vec4 v_Color;\r\nvarying vec2 v_texCoord;\r\nuniform float u_Zoom : 1;\r\nuniform float u_time;\r\n\r\nuniform float u_circleSweep;\r\nuniform float u_cityMinSize;\r\nuniform vec3 u_circleSweepColor;\r\nuniform float u_circleSweepSpeed;\r\n\r\nvarying float v_worldDis;\r\n\r\n#pragma include "picking"\r\n\r\nvec3 getWindowColor(float n, float hot, vec3 brightColor, vec3 darkColor) {\r\n    float s = step(hot, n);\r\n    vec3 color = mix(brightColor,vec3(0.9,0.9,1.0),n);\r\n\r\n    return mix(darkColor, color, s);\r\n}\r\nfloat random (vec2 st) {\r\n    return fract(sin(dot(st.xy, vec2(12.9898,78.233)))* 43758.5453123);\r\n}\r\n\r\nfloat LinearizeDepth()\r\n{\r\n    float z = gl_FragCoord.z * 2.0 - 1.0;\r\n    return (2.0 * u_near * u_far) / (u_far + u_near - z * (u_far - u_near));\r\n}\r\n\r\nvec3 fog(vec3 color, vec3 fogColor, float depth){\r\n    float fogFactor=clamp(depth,0.0,1.0);\r\n    vec3 output_color=mix(fogColor,color,fogFactor);\r\n    return output_color;\r\n}\r\n\r\nfloat sdRect(vec2 p, vec2 sz) {\r\n  vec2 d = abs(p) - sz;\r\n  float outside = length(max(d, 0.));\r\n  float inside = min(max(d.x, d.y), 0.);\r\n  return outside + inside;\r\n}\r\n\r\nvoid main() {\r\n  gl_FragColor = v_Color;\r\n  vec3 baseColor = u_baseColor.xyz;\r\n  vec3 brightColor = u_brightColor.xyz;\r\n  vec3 windowColor = u_windowColor.xyz;\r\n  float targetColId = 5.;\r\n  float depth = 1.0 - LinearizeDepth() / u_far * u_Zoom;\r\n  vec3 fogColor = vec3(23.0/255.0,31.0/255.0,51.0/255.0);\r\n  if(v_texCoord.x < 0.) { //顶部颜色\r\n       vec3 foggedColor = fog(baseColor.xyz + vec3(0.12*0.9,0.2*0.9,0.3*0.9),fogColor,depth);\r\n       gl_FragColor = vec4( foggedColor, v_Color.w);\r\n  }else { // 侧面颜色\r\n        vec2 st = v_texCoord;\r\n        vec2  UvScale = v_texCoord;\r\n        float tStep = min(0.08,max(0.05* (18.0-u_Zoom),0.02));\r\n        float tStart = 0.25 * tStep;\r\n        float tEnd = 0.75 * tStep;\r\n        float u = mod(UvScale.x, tStep);\r\n        float v = mod(UvScale.y, tStep);\r\n        float ux = floor(UvScale.x/tStep);\r\n        float uy = floor(UvScale.y/tStep);\r\n        float n = random(vec2(ux,uy));\r\n        float lightP = u_time;\r\n        float head = 1.0- step(0.005,st.y);\r\n        /*step3*/\r\n        // 将窗户颜色和墙面颜色区别开来\r\n        float sU = step(tStart, u) - step(tEnd, u);\r\n        float sV = step(tStart, v) - step(tEnd, v);\r\n        vec2 windowSize = vec2(abs(tEnd-tStart),abs(tEnd-tStart));\r\n        float dist = sdRect(vec2(u,v), windowSize);\r\n        float s = sU * sV;\r\n\r\n        float curColId = floor(UvScale.x / tStep);\r\n        float sCol = step(targetColId - 0.2, curColId) - step(targetColId + 0.2, curColId);\r\n\r\n        float mLightP = mod(lightP, 2.);\r\n        float sRow = step(mLightP - 0.2, st.y) - step(mLightP, st.y);\r\n        if(ux == targetColId){\r\n            n =0.;\r\n        }\r\n        float timeP = min(0.75, abs ( sin(u_time/3.0) ) );\r\n        float hot = smoothstep(1.0,0.0,timeP);\r\n        vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);\r\n        //vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);\r\n        float sFinal = s * sCol * sRow;\r\n        color += mix(baseColor, brightColor, sFinal*n);\r\n        if (st.y<0.01){\r\n        color = baseColor;\r\n         }\r\n        if(head ==1.0) { // 顶部亮线\r\n            color = brightColor;\r\n        }\r\n        color = color * v_Color.rgb;\r\n\r\n        vec3 foggedColor = fog(color,fogColor,depth);\r\n\r\n        gl_FragColor = vec4(foggedColor,1.0);\r\n  }\r\n\r\n\r\n  if(u_circleSweep > 0.0 && v_worldDis < u_cityMinSize) {\r\n    float r = fract(((v_worldDis/u_cityMinSize) - u_time * u_circleSweepSpeed) * 2.0);\r\n    gl_FragColor.rgb += r * r * u_circleSweepColor;\r\n  }\r\n   \r\n  gl_FragColor.a *= u_opacity;\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',triangulation:EG,depth:{enable:!0,range:[0,.9]},cull:{enable:!0,face:rO.BACK}});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?10:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),a}(PV),RG=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","CityBuildingLayer"),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layerModel=new OG(this),e.next=3,this.initLayerModels();case 3:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"setLight",value:function(e){this.updateLayerConfig({time:e})}},{key:"getModelType",value:function(){return"citybuilding"}}]),n}(kV),LG=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"radian",0),h(_(e),"planeGeometryTriangulation",(function(){var t=e.layer.getLayerConfig().center,r=void 0===t?[120,30]:t;return{size:4,indices:[0,1,2,2,3,0],vertices:[].concat(T(r),[1,1],T(r),[0,1],T(r),[0,0],T(r),[1,0])}})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=e.width,n=void 0===r?1:r,i=e.height,a=void 0===i?1:i,o=e.raisingHeight,s=void 0===o?0:o,u=1;return"GAODE2.x"!==this.mapService.version&&"GAODE1.x"!==this.mapService.version||(u=-1),this.radian=u*Math.PI*(this.mapService.getRotation()%360)/180,{u_raisingHeight:Number(s),u_RotateMatrix:new Float32Array([Math.cos(this.radian),Math.sin(this.radian),-Math.sin(this.radian),Math.cos(this.radian)]),u_opacity:t||1,u_texture:this.texture,u_size:[n,a]}}},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy()}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.drawCanvas,n=this.rendererService.createTexture2D,this.texture=n({height:0,width:0}),r&&this.updateTexture(r),e.next=6,this.layer.buildLayerModel({moduleName:"geometryBillboard",vertexShader:'precision highp float;\r\nuniform mat4 u_ModelMatrix;\r\nuniform float u_raisingHeight: 0.0;\r\nuniform mat4 u_Mvp;\r\nuniform float u_opacity;\r\nuniform vec2 u_size: [1.0, 1.0];\r\nuniform mat2 u_RotateMatrix;\r\n\r\nattribute vec3 a_Extrude;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nattribute vec3 a_Color;\r\n\r\nvarying vec3 v_Color;\r\nvarying vec2 v_uv;\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\nvoid main() {\r\n   vec3 extrude = a_Extrude;\r\n   v_Color = a_Color;\r\n   v_uv = a_Uv;\r\n\r\n   float raiseHeight = u_raisingHeight;\r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      raiseHeight = u_raisingHeight * mapboxZoomScale;\r\n   }\r\n\r\n   // 计算经纬度点位坐标\r\n   vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));\r\n\r\n   // 计算绕 z 轴旋转后的偏移\r\n   vec2 offsetXY = project_pixel(u_RotateMatrix * vec2(extrude.x * u_size.x, 0.0));\r\n   // 绕 z 轴旋转\r\n   float x = project_pos.x + offsetXY.x;\r\n   float y = project_pos.y + offsetXY.y;\r\n   // z 轴不参与旋转\r\n   float z = project_pixel(extrude.y * u_size.y + raiseHeight);\r\n\r\n\r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      // gl_Position = u_Mvp * (vec4(project_pos.xy, a_Position.z, 1.0));\r\n      gl_Position = u_Mvp * (vec4(x, y, z, 1.0));\r\n   } else {\r\n      gl_Position = project_common_position_to_clipspace(vec4(x , y, z , 1.0));\r\n   }\r\n\r\n   setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'\r\nuniform sampler2D u_texture;\r\nuniform float u_opacity;\r\n\r\nvarying vec3 v_Color;\r\nvarying vec2 v_uv;\r\n\r\n#pragma include "picking"\r\nvoid main() {\r\n  gl_FragColor = texture2D(u_texture, vec2(v_uv.x, 1.0 - v_uv.y));\r\n  gl_FragColor.a *= u_opacity;\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',triangulation:this.planeGeometryTriangulation,primitive:rO.TRIANGLES,depth:{enable:!0}});case 6:return a=e.sent,e.abrupt("return",[a]);case 8:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"updateTexture",value:function(e){var t=this.rendererService.createTexture2D,r=this.layer.getLayerConfig(),n=r.canvasWidth,i=void 0===n?1:n,a=r.canvasHeight,o=void 0===a?1:a,s=document.createElement("canvas");s.width=i,s.height=o,s.getContext("2d")&&(e(s),this.texture=t({data:s,width:s.width,height:s.height,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE}),this.layerService.reRender())}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"extrude",type:RD.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n){var i=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],a=n%4*3;return[i[a],i[a+1],i[a+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[2],r[3]]}}})}}]),a}(PV),NG=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"terrainImage",void 0),h(_(e),"terrainImageLoaded",!1),h(_(e),"mapTexture",void 0),h(_(e),"planeGeometryTriangulation",(function(){var t,r=e.layer.getLayerConfig(),n=r.width,i=void 0===n?1:n,a=r.height,o=void 0===a?1:a,s=r.widthSegments,u=void 0===s?1:s,c=r.heightSegments,l=void 0===c?1:c,h=r.center,f=void 0===h?[120,30]:h,p=r.terrainTexture,d=(t=e).initPlane.apply(t,[i,o,u,l].concat(T(f))),v=d.indices,g=d.positions;return p&&e.loadTerrainTexture(g,v),{vertices:g,indices:v,size:5}})),e}return l(a,[{key:"initPlane",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:120,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:30,o=e/2,s=t/2,u=Math.floor(r),c=Math.floor(n),l=u+1,h=c+1,f=e/u,p=t/c,d=[],v=[],g=0;g<h;g++)for(var m=g*p-s,y=0;y<l;y++){var _=y*f-o;if(this.mapService.version===QD["GAODE2.x"]){var b=this.mapService.lngLatToCoord([_+i,-m+a]),x=A(b,2),S=x[0],E=x[1];v.push(S,E,0)}else v.push(_+i,-m+a,0);v.push(y/u),v.push(1-g/c)}for(var T=0;T<c;T++)for(var w=0;w<u;w++){var C=w+l*T,k=w+l*(T+1),M=w+1+l*(T+1),P=w+1+l*T;d.push(C,k,P),d.push(k,M,P)}return{indices:d,positions:v}}},{key:"getUninforms",value:function(){var e,t=this.layer.getLayerConfig(),r=t.opacity,n=t.mapTexture,i=t.terrainClipHeight,a=void 0===i?0:i,o=t.terrainTexture;this.mapTexture!==n&&(this.mapTexture=n,null===(e=this.texture)||void 0===e||e.destroy(),this.updateTexture(n));return{u_opacity:r||1,u_mapFlag:n?1:0,u_terrainClipHeight:o?a:-1,u_texture:this.texture}}},{key:"clearModels",value:function(){var e;this.terrainImage=null,null===(e=this.texture)||void 0===e||e.destroy()}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.mapTexture,this.mapTexture=r,n=this.rendererService.createTexture2D,this.texture=n({height:0,width:0}),this.updateTexture(r),e.next=7,this.layer.buildLayerModel({moduleName:"geometryPlane",vertexShader:'precision highp float;\r\nuniform mat4 u_ModelMatrix;\r\n\r\nuniform mat4 u_Mvp;\r\nuniform float u_opacity;\r\nuniform float u_terrainClipHeight;\r\n\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nattribute vec3 a_Color;\r\n\r\nvarying vec3 v_Color;\r\nvarying vec2 v_uv;\r\nvarying float v_clip;\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\nvoid main() {\r\n   v_Color = a_Color;\r\n   v_uv = a_Uv;\r\n  \r\n   vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n\r\n   v_clip = 1.0;\r\n   if(a_Position.z < u_terrainClipHeight) {\r\n      v_clip = 0.0;\r\n   }\r\n  \r\n   // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\r\n\r\n   // float x = 1.0;\r\n   // float y = 0.0;\r\n   // float z = 0.0;\r\n   // mat3 translateMatrix = mat3(\r\n   //    1.0, 0.0, 0.0 \r\n   //    0.0, 1.0, 0.0\r\n   //    -project_pos.x,    -project_pos.y,  1.0\r\n   // );\r\n   //  mat4 translateMatrix = mat4(\r\n   //    1.0, 0.0, 0.0, 0.0 ,\r\n   //    0.0, 1.0, 0.0, 0.0,\r\n   //    0.0, 0.0, 1.0, 0.0,\r\n   //    1.0, 0.0, 0.0, 1.0\r\n   // );\r\n\r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      gl_Position = u_Mvp * (vec4(project_pos.xy, a_Position.z, 1.0));\r\n   } else {\r\n      gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, a_Position.z, 1.0));\r\n   }\r\n\r\n   setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'\r\nuniform sampler2D u_texture;\r\nuniform float u_mapFlag;\r\nuniform float u_opacity;\r\n\r\nvarying vec3 v_Color;\r\nvarying vec2 v_uv;\r\nvarying float v_clip;\r\n\r\n#pragma include "picking"\r\nvoid main() {\r\n  // gl_FragColor = vec4(v_Color, u_opacity);\r\n  if(u_mapFlag > 0.0) {\r\n    gl_FragColor = texture2D(u_texture, vec2(v_uv.x, 1.0 - v_uv.y));\r\n    gl_FragColor.a *= u_opacity;\r\n  } else {\r\n    // gl_FragColor = vec4(v_uv, 0.0, u_opacity);\r\n    gl_FragColor = vec4(v_Color, u_opacity);\r\n  }\r\n  gl_FragColor.a *= v_clip;\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',triangulation:this.planeGeometryTriangulation,primitive:rO.TRIANGLES,depth:{enable:!0,range:[0,.9]},cull:{enable:!0,face:rO.BACK}});case 7:return a=e.sent,e.abrupt("return",[a]);case 9:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"createModelData",value:function(e){if(e){var t=this.layer.getLayerConfig(),r=t.widthSegments,n=t.heightSegments,i=t.width,a=t.height,o=e,s=o.widthSegments,u=o.heightSegments,c=o.width,l=o.height;this.layer.style({widthSegments:void 0!==s?s:r,heightSegments:void 0!==u?u:n,width:void 0!==c?c:i,height:void 0!==l?l:a})}var h=this.layer.getEncodedData();return this.styleAttributeService.createAttributesAndIndices(h,this.planeGeometryTriangulation)}},{key:"updateTexture",value:function(e){var t=this,r=this.rendererService.createTexture2D;if(e){var n=new Image;n.crossOrigin="anonymous",n.onload=function(){t.texture=r({data:n,width:n.width,height:n.height,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE}),t.layerService.updateLayerRenderList()},n.src=e}else this.texture=r({width:0,height:0})}},{key:"getImageData",value:function(e){var t=document.createElement("canvas"),r=t.getContext("2d"),n=e.width,i=e.height;return t.width=n,t.height=i,r.drawImage(e,0,0,n,i),r.getImageData(0,0,n,i)}},{key:"translateVertex",value:function(e,t,r,n,i,a){for(var o=r.width,s=r.height,u=this.getImageData(r).data,c=Math.floor(n),l=Math.floor(i),h=c+1,f=l+1,p=o/c,d=s/l,v=0;v<f;v++)for(var g=Math.floor(v*d)*o,m=0;m<h;m++){var y=4*(g+Math.floor(m*p)),_=u[y],b=u[y+1],x=u[y+2];e[5*(v*h+m)+2]=a(_,b,x)}var S=this.layer.getEncodedData(),E=this.styleAttributeService.createAttributesAndIndices(S,(function(){return{vertices:e,indices:t,size:5}}));this.layer.updateModelData(E),this.layerService.throttleRenderLayers()}},{key:"loadTerrainTexture",value:function(e,t){var r=this,n=this.layer.getLayerConfig(),i=n.widthSegments,a=void 0===i?1:i,o=n.heightSegments,s=void 0===o?1:o,u=n.terrainTexture,c=n.rgb2height,l=void 0===c?function(e,t,r){return e+t+r}:c;if(this.terrainImage)this.terrainImageLoaded?this.translateVertex(e,t,this.terrainImage,a,s,l):this.terrainImage.onload=function(){r.translateVertex(e,t,r.terrainImage,a,s,l)};else{var h=new Image;this.terrainImage=h,h.crossOrigin="anonymous",h.onload=function(){r.terrainImageLoaded=!0,setTimeout((function(){return r.layer.emit("terrainImageLoaded",null)})),r.translateVertex(e,t,h,a,s,l)},h.src=u}}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),a}(PV),DG=function(e){return e.UP="up",e.DOWN="down",e}(DG||{}),FG={plane:NG,sprite:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"mapTexture",void 0),h(_(e),"positions",void 0),h(_(e),"indices",void 0),h(_(e),"timer",void 0),h(_(e),"spriteTop",void 0),h(_(e),"spriteUpdate",void 0),h(_(e),"spriteAnimate",void 0),h(_(e),"planeGeometryUpdateTriangulation",(function(){for(var t=e.layer.getLayerConfig().spriteBottom,r=void 0===t?-10:t,n=e.spriteUpdate,i=r,a=e.spriteTop,o=0;o<e.positions.length;o+=5)e.spriteAnimate===DG.UP?(e.positions[o+2]+=n,e.positions[o+2]>a&&(e.positions[o+2]=i)):(e.positions[o+2]-=n,e.positions[o+2]<i&&(e.positions[o+2]=a));return{vertices:e.positions,indices:e.indices,size:5}})),h(_(e),"updateModel",(function(){var t=e.layer.createAttributes({triangulation:e.planeGeometryUpdateTriangulation});e.layer.models.map((function(e){e.updateAttributes(t)})),jE((function(){e.layerService.renderLayer(e.layer.id)}),168),e.timer=requestAnimationFrame(e.updateModel)})),h(_(e),"planeGeometryTriangulation",(function(){var t,r=e.layer.getLayerConfig(),n=r.center,i=void 0===n?[120,30]:n,a=r.spriteCount,o=void 0===a?100:a,s=r.spriteRadius,u=void 0===s?10:s,c=(t=e).initSprite.apply(t,[u,o].concat(T(i))),l=c.indices,h=c.positions;return e.positions=h,e.indices=l,{vertices:h,indices:l,size:5}})),e}return l(a,[{key:"initSprite",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:120,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30,i=[],a=[],o=this.mapService,s=this.coordinateSystemService.getCoordinateSystem(),u=this.spriteAnimate===DG.UP?-this.spriteTop:this.spriteTop,c=0;c<t;c++){var l=Math.random()*u;a.push.apply(a,T(f(l)))}for(var h=0;h<t;h++)i.push(h);function f(t){var i=e*Math.random(),a=e*Math.random(),u=-e/2+i,c=-e/2+a;if(o.version===QD["GAODE2.x"]){var l=A(o.lngLatToCoord([u+r,-c+n]),2);return[l[0],l[1],t,0,0]}if(!o.isMapBoxMapLibre()||s!==ub.LNGLAT&&s!==ub.METER_OFFSET)return[u+r,-c+n,t,0,0];var h=A(eS([u+r,-c+n],o.map,512),2);return[h[0],h[1],t,0,0]}return{indices:i,positions:a}}},{key:"getUninforms",value:function(){var e,t=this.layer.getLayerConfig(),r=t.opacity,n=t.mapTexture,i=t.spriteScale,a=void 0===i?1:i;this.mapTexture!==n&&(this.mapTexture=n,null===(e=this.texture)||void 0===e||e.destroy(),this.updateTexture(n));return{u_opacity:r||1,u_mapFlag:n?1:0,u_texture:this.texture,u_Scale:a}}},{key:"clearModels",value:function(){var e;cancelAnimationFrame(this.timer),null===(e=this.texture)||void 0===e||e.destroy()}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a,o,s,u,c,l,h,f=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.mapTexture,n=t.spriteTop,a=void 0===n?5e6:n,o=t.spriteUpdate,s=void 0===o?1e4:o,u=t.spriteAnimate,c=void 0===u?DG.DOWN:u,this.mapTexture=r,this.spriteTop=a,this.spriteUpdate=s,this.spriteAnimate="up"===c?DG.UP:DG.DOWN,l=this.rendererService.createTexture2D,this.texture=l({height:0,width:0}),this.updateTexture(r),setTimeout((function(){f.updateModel()}),100),e.next=11,this.layer.buildLayerModel({moduleName:"geometrySprite",vertexShader:'precision highp float;\r\n\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Color;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float u_opacity;\r\nuniform float u_Scale;\r\nvarying vec3 v_Color;\r\nvarying float v_d;\r\n\r\n#pragma include "projection"\r\nvoid main() {\r\n   v_Color = a_Color;\r\n  \r\n   vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n\r\n   v_d = a_Position.z;\r\n\r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      gl_Position = u_Mvp * (vec4(project_pos.xy, a_Position.z, 1.0));\r\n   } else {\r\n      gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, a_Position.z, 1.0));\r\n   }\r\n\r\n   gl_PointSize = pow((u_Zoom - 1.0), 2.0) * u_Scale;\r\n}\r\n',fragmentShader:"\r\nuniform sampler2D u_texture;\r\nuniform float u_mapFlag;\r\nuniform float u_opacity;\r\n\r\nvarying vec3 v_Color;\r\nvarying float v_d;\r\n\r\nvoid main() {\r\n\r\n  if(v_d < 0.0) {\r\n    discard;\r\n  }\r\n\r\n  if(u_mapFlag > 0.0) {\r\n    gl_FragColor = texture2D(u_texture, gl_PointCoord);\r\n    gl_FragColor.a *= u_opacity;\r\n  } else {\r\n    gl_FragColor = vec4(v_Color, u_opacity);\r\n  }\r\n}\r\n",triangulation:this.planeGeometryTriangulation,primitive:rO.POINTS,depth:{enable:!1},blend:this.getBlend()});case 11:return h=e.sent,e.abrupt("return",[h]);case 13:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"updateTexture",value:function(e){var t=this,r=this.rendererService.createTexture2D;if(e){var n=new Image;n.crossOrigin="anonymous",n.onload=function(){t.texture=r({data:n,width:n.width,height:n.height,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE}),t.layerService.reRender()},n.src=e}else this.texture=r({width:0,height:0})}},{key:"registerBuiltinAttributes",value:function(){return""}}]),a}(PV),billboard:LG},zG=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","GeometryLayer"),h(_(e),"defaultSourceConfig",{data:[{x:0,y:0}],options:{parser:{type:"json",x:"x",y:"y"}}}),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new FG[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getDefaultConfig",value:function(){return{plane:{},sprite:{},billboard:{}}[this.getModelType()]}},{key:"getModelType",value:function(){var e,t=this.styleAttributeService.getLayerStyleAttribute("shape"),r=null==t||null===(e=t.scale)||void 0===e?void 0:e.field;return"plane"===r?"plane":"sprite"===r?"sprite":"billboard"===r?"billboard":"plane"}}]),n}(kV),BG='precision highp float;\r\nvarying vec4 v_color;\r\nuniform float u_opacity: 1;\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  gl_FragColor = v_color;\r\n  gl_FragColor.a *= u_opacity;\r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',UG=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig();return{u_opacity:e.opacity||1,u_coverage:e.coverage||.9,u_angle:e.angle||0,u_radius:[this.layer.getSource().data.xOffset,this.layer.getSource().data.yOffset]}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"heatmapGrid",vertexShader:'precision highp float;\r\n// 多边形顶点坐标\r\nattribute vec3 a_Position;\r\n// 多边形经纬度坐标\r\nattribute vec3 a_Pos;\r\nattribute float a_Size;\r\nattribute vec4 a_Color;\r\nuniform vec2 u_radius;\r\nuniform float u_coverage: 0.9;\r\nuniform float u_angle: 0;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nvarying vec4 v_color;\r\n\r\nuniform vec2 u_sceneCenterMercator;\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  v_color = a_Color;\r\n\r\n  mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));\r\n  vec2 offset = a_Position.xy * u_radius * rotationMatrix * u_coverage ;\r\n  // vec2 lnglat = unProjectFlat(a_Pos.xy + offset);\r\n  // vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\r\n  // gl_Position = project_common_position_to_clipspace(project_pos);\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    vec2 lnglat = unProjectFlat(a_Pos.xy + offset);\r\n    vec2 customLnglat = customProject(lnglat) - u_sceneCenterMercator; // 将经纬度转换为高德2.0需要的平面坐标\r\n    vec4 project_pos = project_position(vec4(customLnglat, 0, 1.0));\r\n    gl_Position = u_Mvp * (project_pos);\r\n  } else {\r\n    // vec2 lnglat = unProjectFlat(a_Pos.xy + offset)\r\n     vec2 lnglat = a_Pos.xy;\r\n    vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\r\n    gl_Position = project_common_position_to_clipspace(project_pos);\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:BG,triangulation:AG,primitive:rO.TRIANGLES,depth:{enable:!1}});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"pos",type:RD.Attribute,descriptor:{name:"a_Pos",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(t,r,n){var i;if("GAODE2.x"===t.version)i=t.originCoordinates;else{var a=e.layer.getLayerConfig(),o=a.coverage,s=void 0===o?1:o,u=a.angle,c=e.layer.getSource().data,l=c.xOffset,h=c.yOffset,f=uT();cT(f,f,u);var p=Zb();ex(p,qb(n[0],n[1]),qb(l,h)),ex(p,p,qb(s,s)),ix(p,p,f);var d=tS([t.coordinates[0]+p[0],t.coordinates[1]+p[1]],e.mapService.map,256<<20);if(e.mapService.coordinateSystemService.getCoordinateSystem()===ub.LNGLAT_OFFSET)i=d;else if(e.mapService.coordinateSystemService.getCoordinateSystem()===ub.METER_OFFSET){i=eS(d,e.mapService.map,512);var v=e.mapService.coordinateSystemService.offsetCenterTransform;i=[i[0]-v[0],i[1]-v[1]]}else i=eS(d,e.mapService.map,512)}return[i[0],i[1],0]}}})}}]),a}(PV),jG=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig();return{u_opacity:e.opacity||1,u_coverage:e.coverage||1,u_angle:e.angle||0,u_radius:[this.layer.getSource().data.xOffset,this.layer.getSource().data.yOffset]}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"heatmapGrid3d",vertexShader:'precision highp float;\r\n// 多边形顶点坐标\r\nattribute vec3 a_Position;\r\n// 多边形经纬度坐标\r\nattribute vec3 a_Pos;\r\n\r\nattribute vec3 a_Normal;\r\nattribute float a_Size;\r\nattribute vec4 a_Color;\r\nuniform vec2 u_radius;\r\nuniform float u_coverage: 0.9;\r\nuniform float u_angle: 0;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nvarying vec4 v_color;\r\n\r\nuniform vec2 u_sceneCenterMercator;\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\n\r\nvoid main() {\r\n  mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));\r\n  vec2 offset =(vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage));\r\n\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n \r\n    vec2 lnglat = unProjectFlat(a_Pos.xy + offset); // 经纬度\r\n    vec2 customLnglat = customProject(lnglat) - u_sceneCenterMercator; // 将经纬度转换为高德2.0需要的平面坐标\r\n    vec4 project_pos = project_position(vec4(customLnglat, a_Position.z * a_Size, 1.0));\r\n\r\n    float lightWeight = calc_lighting(project_pos);\r\n    v_color =vec4(a_Color.rgb*lightWeight, a_Color.w);\r\n  \r\n    gl_Position = u_Mvp * vec4(customLnglat , a_Position.z * a_Size, 1.0);\r\n  } else {\r\n    //vec2 lnglat = unProjectFlat(a_Pos.xy + offset); // 实际的经纬度\r\n    vec2 lnglat = a_Pos.xy;\r\n    vec4 project_pos = project_position(vec4(lnglat, a_Position.z * a_Size, 1.0));\r\n    \r\n    float lightWeight = calc_lighting(project_pos);\r\n    v_color =vec4(a_Color.rgb*lightWeight, a_Color.w);\r\n    \r\n    gl_Position = project_common_position_to_clipspace(project_pos);\r\n  }\r\n\r\n\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:BG,triangulation:pG,primitive:rO.TRIANGLES,depth:{enable:!0,range:[0,.9]}});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size;return Array.isArray(t)?[t[0]]:[t]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:RD.Attribute,descriptor:{name:"a_Pos",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(t,r,n){var i;if("GAODE2.x"===t.version)i=t.originCoordinates;else{var a=e.layer.getLayerConfig(),o=a.coverage,s=void 0===o?1:o,u=a.angle,c=e.layer.getSource().data,l=c.xOffset,h=c.yOffset,f=uT();cT(f,f,u);var p=Zb();ex(p,qb(n[0],n[1]),qb(l,h)),ex(p,p,qb(s,s)),ix(p,p,f);var d=tS([t.coordinates[0]+p[0],t.coordinates[1]+p[1]],e.mapService.map,256<<20);if(e.mapService.coordinateSystemService.getCoordinateSystem()===ub.LNGLAT_OFFSET)i=d;else if(e.mapService.coordinateSystemService.getCoordinateSystem()===ub.METER_OFFSET){i=eS(d,e.mapService.map,512);var v=e.mapService.coordinateSystemService.offsetCenterTransform;i=[i[0]-v[0],i[1]-v[1]]}else i=eS(d,e.mapService.map,512)}return[i[0],i[1],0]}}})}}]),a}(PV);var VG=Me()(IG=function(e){f(c,e);var t,r,a,o=x(c);function c(){var e;u(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=o.call.apply(o,[this].concat(r))),"texture",void 0),h(_(e),"colorTexture",void 0),h(_(e),"heatmapFramerBuffer",void 0),h(_(e),"intensityModel",void 0),h(_(e),"colorModel",void 0),h(_(e),"shapeType",void 0),h(_(e),"preRampColors",void 0),e}return l(c,[{key:"render",value:function(e){var t=this,r=this.rendererService,n=r.clear,i=r.useFramebuffer,a=this.layer.getLayerConfig().rampColors;i(this.heatmapFramerBuffer,(function(){n({color:[0,0,0,0],depth:1,stencil:0,framebuffer:t.heatmapFramerBuffer}),t.drawIntensityMode()})),dU(this.preRampColors,a)||this.updateColorTexture(),"heatmap"===this.shapeType?this.drawColorMode(e):this.draw3DHeatMap(e)}},{key:"getUninforms",value:function(){throw new Error("Method not implemented.")}},{key:"initModels",value:(a=s(i().mark((function e(){var t,r,n,a,o,s,u,c,l,h;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.rendererService,n=r.createFramebuffer,a=r.getViewportSize,o=r.createTexture2D,s=this.styleAttributeService.getLayerStyleAttribute("shape"),u=(null==s||null===(t=s.scale)||void 0===t?void 0:t.field)||"heatmap",this.shapeType=u,e.next=6,this.buildHeatMapIntensity();case 6:return this.intensityModel=e.sent,this.colorModel="heatmap"===u?this.buildHeatmapColor():this.build3dHeatMap(),c=a(),l=c.width,h=c.height,this.heatmapFramerBuffer=n({color:o({width:Math.floor(l/4),height:Math.floor(h/4),wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE,min:rO.LINEAR,mag:rO.LINEAR}),depth:!1}),this.updateColorTexture(),e.abrupt("return",[this.intensityModel,this.colorModel]);case 12:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"buildModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"dir",type:RD.Attribute,descriptor:{name:"a_Dir",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size;return[void 0===t?1:t]}}})}},{key:"buildHeatMapIntensity",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layer.triangulation=CG,e.next=3,this.layer.buildLayerModel({moduleName:"heatmapIntensity",vertexShader:'precision highp float;\r\nattribute vec3 a_Position;\r\nattribute float a_Size;\r\nattribute vec2 a_Dir;\r\nuniform float u_intensity;\r\nuniform float u_radius;\r\nvarying vec2 v_extrude;\r\nvarying float v_weight;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\n#define GAUSS_COEF  0.3989422804014327\r\n\r\n#pragma include "projection"\r\n\r\nvoid main(){\r\n    v_weight = a_Size;\r\n    float ZERO = 1.0 / 255.0 / 16.0;\r\n    float extrude_x = a_Dir.x * 2.0 -1.0;\r\n    float extrude_y = a_Dir.y * 2.0 -1.0;\r\n    vec2 extrude_dir = normalize(vec2(extrude_x,extrude_y));\r\n    float S = sqrt(-2.0 * log(ZERO / a_Size / u_intensity / GAUSS_COEF)) / 2.5;\r\n    v_extrude = extrude_dir * S;\r\n\r\n    vec2 offset = project_pixel(v_extrude * u_radius);\r\n    vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));\r\n\r\n    // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\r\n\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n        gl_Position = u_Mvp * (vec4(project_pos.xy + offset, 0.0, 1.0));\r\n    } else {\r\n        gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\r\n    }\r\n}\r\n',fragmentShader:"precision highp float;\r\nuniform float u_intensity;\r\nvarying float v_weight;\r\nvarying vec2 v_extrude;\r\n#define GAUSS_COEF  0.3989422804014327\r\nvoid main(){\r\n    float d = -0.5 * 3.0 * 3.0 * dot(v_extrude, v_extrude);\r\n    float val = v_weight * u_intensity * GAUSS_COEF * exp(d);\r\n    gl_FragColor = vec4(val, 1., 1., 1.);\r\n}\r\n",triangulation:CG,depth:{enable:!1},cull:{enable:!0,face:Kg(this.mapService.version)}});case 3:return t=e.sent,e.abrupt("return",t);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"buildHeatmapColor",value:function(){this.shaderModuleService.registerModule("heatmapColor",{vs:"precision highp float;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nvarying vec2 v_texCoord;\r\n\r\nvoid main() {\r\n  v_texCoord = a_Uv;\r\n\r\n  gl_Position = vec4(a_Position.xy, 0, 1.);\r\n}\r\n",fs:"uniform sampler2D u_texture;        // 热力强度图\r\nuniform sampler2D u_colorTexture;   // 根据强度分布的色带\r\nuniform float u_opacity;\r\nvarying vec2 v_texCoord;\r\n\r\nuniform vec2 u_ViewportSize;\r\n\r\nfloat getBlurIndusty() {\r\n    float vW = 2.0/u_ViewportSize.x;\r\n    float vH = 2.0/u_ViewportSize.y;\r\n    vec2 vUv = v_texCoord;\r\n    float i11 = texture2D( u_texture, vec2( vUv.x - 1.0 * vW, vUv.y + 1.0 * vH) ).r;\r\n    float i12 = texture2D( u_texture, vec2( vUv.x - 0.0 * vW, vUv.y + 1.0 * vH) ).r;\r\n    float i13 = texture2D( u_texture, vec2( vUv.x + 1.0 * vW, vUv.y + 1.0 * vH) ).r;\r\n\r\n    float i21 = texture2D( u_texture, vec2( vUv.x - 1.0 * vW, vUv.y) ).r;\r\n    float i22 = texture2D( u_texture, vec2( vUv.x , vUv.y) ).r;\r\n    float i23 = texture2D( u_texture, vec2( vUv.x + 1.0 * vW, vUv.y) ).r;\r\n\r\n    float i31 = texture2D( u_texture, vec2( vUv.x - 1.0 * vW, vUv.y-1.0*vH) ).r;\r\n    float i32 = texture2D( u_texture, vec2( vUv.x - 0.0 * vW, vUv.y-1.0*vH) ).r;\r\n    float i33 = texture2D( u_texture, vec2( vUv.x + 1.0 * vW, vUv.y-1.0*vH) ).r;\r\n\r\n    return(\r\n        i11 + \r\n        i12 + \r\n        i13 + \r\n        i21 + \r\n        i21 + \r\n        i22 + \r\n        i23 + \r\n        i31 + \r\n        i32 + \r\n        i33\r\n        )/9.0;\r\n}\r\n\r\n\r\nvoid main(){\r\n    // float intensity = texture2D(u_texture, v_texCoord).r;\r\n    float intensity = getBlurIndusty();\r\n    vec4 color = texture2D(u_colorTexture, vec2(intensity, 0.0));\r\n\r\n    gl_FragColor =color;\r\n    gl_FragColor.a = color.a * smoothstep(0.,0.1,intensity) * u_opacity;\r\n\r\n}\r\n"});var e=this.shaderModuleService.getModule("heatmapColor"),t=e.vs,r=e.fs,i=e.uniforms,a=this.rendererService,o=a.createAttribute,s=a.createElements,u=a.createBuffer;return(0,a.createModel)({vs:t,fs:r,attributes:{a_Position:o({buffer:u({data:[-1,1,0,1,1,0,-1,-1,0,1,-1,0],type:rO.FLOAT}),size:3}),a_Uv:o({buffer:u({data:[0,1,1,1,0,0,1,0],type:rO.FLOAT}),size:2})},uniforms:n({},i),depth:{enable:!1},elements:s({data:[0,2,1,2,3,1],type:rO.UNSIGNED_INT,count:6})})}},{key:"drawIntensityMode",value:function(){var e,t=this.layer.getLayerConfig(),r=t.opacity,n=t.intensity,i=void 0===n?10:n,a=t.radius,o=void 0===a?5:a;this.layerService.beforeRenderData(this.layer),this.layer.hooks.beforeRender.call(),null===(e=this.intensityModel)||void 0===e||e.draw({uniforms:{u_opacity:r||1,u_radius:o,u_intensity:i},blend:{enable:!0,func:{srcRGB:rO.ONE,srcAlpha:1,dstRGB:rO.ONE,dstAlpha:1}},stencil:{enable:!1,mask:255,func:{cmp:514,ref:1,mask:255}}}),this.layer.hooks.afterRender.call()}},{key:"drawColorMode",value:function(e){var t,r=this.layer.getLayerConfig().opacity;null===(t=this.colorModel)||void 0===t||t.draw({uniforms:{u_opacity:r||1,u_colorTexture:this.colorTexture,u_texture:this.heatmapFramerBuffer},blend:this.getBlend(),stencil:this.getStencil(e)})}},{key:"draw3DHeatMap",value:function(e){var t,r=this.layer.getLayerConfig().opacity,n=Ab();kb(n,this.cameraService.getViewProjectionMatrixUncentered()),null===(t=this.colorModel)||void 0===t||t.draw({uniforms:{u_opacity:r||1,u_colorTexture:this.colorTexture,u_texture:this.heatmapFramerBuffer,u_ViewProjectionMatrixUncentered:this.cameraService.getViewProjectionMatrixUncentered(),u_InverseViewProjectionMatrix:T(n)},blend:{enable:!0,func:{srcRGB:rO.SRC_ALPHA,srcAlpha:1,dstRGB:rO.ONE_MINUS_SRC_ALPHA,dstAlpha:1}},stencil:this.getStencil(e)})}},{key:"build3dHeatMap",value:function(){var e=(0,this.rendererService.getViewportSize)(),t=function(e,t){for(var r=[],n=[],i=[],a=e+1,o=t+1,s=e/2,u=t/2,c=0;c<o;c++)for(var l=c-u,h=0;h<a;h++){var f=h-s;n.push(f/s,-l/u,0),i.push(h/e),i.push(1-c/t)}for(var p=0;p<t;p++)for(var d=0;d<e;d++){var v=d+a*p,g=d+a*(p+1),m=d+1+a*(p+1),y=d+1+a*p;r.push(v,g,y),r.push(g,m,y)}return{vertices:n,indices:r,uvs:i}}(e.width/4,e.height/4);this.shaderModuleService.registerModule("heatmap3dColor",{vs:'precision highp float;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nuniform sampler2D u_texture;\r\nvarying vec2 v_texCoord;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_InverseViewProjectionMatrix;\r\nuniform mat4 u_ViewProjectionMatrixUncentered;\r\nvarying float v_intensity;\r\n\r\n\r\nvec2 toBezier(float t, vec2 P0, vec2 P1, vec2 P2, vec2 P3) {\r\n    float t2 = t * t;\r\n    float one_minus_t = 1.0 - t;\r\n    float one_minus_t2 = one_minus_t * one_minus_t;\r\n    return (P0 * one_minus_t2 * one_minus_t + P1 * 3.0 * t * one_minus_t2 + P2 * 3.0 * t2 * one_minus_t + P3 * t2 * t);\r\n}\r\nvec2 toBezier(float t, vec4 p){\r\n    return toBezier(t, vec2(0.0, 0.0), vec2(p.x, p.y), vec2(p.z, p.w), vec2(1.0, 1.0));\r\n}\r\n#pragma include "projection"\r\nvoid main() {\r\n  v_texCoord = a_Uv;\r\n\r\n  vec2 pos = a_Uv * vec2(2.0) - vec2(1.0); // 将原本 0 -> 1 的 uv 转换为 -1 -> 1 的标准坐标空间(NDC)\r\n\r\n  vec4 p1 = vec4(pos, 0.0, 1.0); // x/y 平面上的点(z == 0)可以认为是三维上的点被投影到平面后的点\r\n\tvec4 p2 = vec4(pos, 1.0, 1.0); // 平行于x/y平面、z==1 的平面上的点\r\n\r\n\tvec4 inverseP1 = u_InverseViewProjectionMatrix * p1; // 根据视图投影矩阵的逆矩阵平面上的反算出三维空间中的点(p1平面上的点)\r\n\tvec4 inverseP2 = u_InverseViewProjectionMatrix * p2;\r\n\r\n  inverseP1 = inverseP1 / inverseP1.w; // 归一化操作(归一化后为世界坐标)\r\n\tinverseP2 = inverseP2 / inverseP2.w;\r\n\r\n\tfloat zPos = (0.0 - inverseP1.z) / (inverseP2.z - inverseP1.z); // ??\r\n\tvec4 position = inverseP1 + zPos * (inverseP2 - inverseP1);\r\n\r\n  vec4 b= vec4(0.5000, 0.0, 1.0, 0.5000);\r\n  float fh;\r\n\r\n  v_intensity = texture2D(u_texture, v_texCoord).r;\r\n  fh = toBezier(v_intensity, b).y;\r\n  gl_Position = u_ViewProjectionMatrixUncentered * vec4(position.xy, fh * project_pixel(50.), 1.0);\r\n \r\n}\r\n',fs:"uniform sampler2D u_texture;\r\nuniform sampler2D u_colorTexture;\r\nuniform float u_opacity;\r\nvarying vec2 v_texCoord;\r\nvarying float v_intensity;\r\n\r\nvoid main(){\r\n   \r\n     float intensity = texture2D(u_texture, v_texCoord).r;\r\n    vec4 color = texture2D(u_colorTexture,vec2(intensity, 0));\r\n    gl_FragColor = color;\r\n    // gl_FragColor.a = color.a * smoothstep(0.1,0.2,intensity)* u_opacity;\r\n     gl_FragColor.a = color.a * smoothstep(0.,0.1,intensity) * u_opacity;\r\n}\r\n"});var r=this.shaderModuleService.getModule("heatmap3dColor"),i=r.vs,a=r.fs,o=r.uniforms,s=this.rendererService,u=s.createAttribute,c=s.createElements,l=s.createBuffer;return(0,s.createModel)({vs:i,fs:a,attributes:{a_Position:u({buffer:l({data:t.vertices,type:rO.FLOAT}),size:3}),a_Uv:u({buffer:l({data:t.uvs,type:rO.FLOAT}),size:2})},primitive:rO.TRIANGLES,uniforms:n({},o),depth:{enable:!1},blend:{enable:!0,func:{srcRGB:rO.SRC_ALPHA,srcAlpha:1,dstRGB:rO.ONE_MINUS_SRC_ALPHA,dstAlpha:1}},elements:c({data:t.indices,type:rO.UNSIGNED_INT,count:t.indices.length})})}},{key:"updateStyle",value:function(){this.updateColorTexture()}},{key:"updateColorTexture",value:function(){var e=this.rendererService.createTexture2D;this.texture&&this.texture.destroy();var t=this.layer.getLayerConfig().rampColors,r=jg(t);this.colorTexture=e({data:new Uint8Array(r.data),width:r.width,height:r.height,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE,min:rO.NEAREST,mag:rO.NEAREST,flipY:!1}),this.preRampColors=t}}]),c}(PV))||IG,GG={heatmap:VG,heatmap3d:VG,grid:UG,grid3d:jG,hexagon:function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig();return{u_opacity:e.opacity||1,u_coverage:e.coverage||.9,u_angle:e.angle||0,u_radius:[this.layer.getSource().data.xOffset,this.layer.getSource().data.yOffset]}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"heatmapHexagon",vertexShader:'precision highp float;\r\n// 多边形顶点坐标\r\nattribute vec3 a_Position;\r\n// 多边形经纬度坐标\r\nattribute vec3 a_Pos;\r\nattribute float a_Size;\r\nattribute vec4 a_Color;\r\nuniform vec2 u_radius;\r\nuniform float u_coverage: 0.9;\r\nuniform float u_angle: 0;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nvarying vec4 v_color;\r\n\r\nuniform vec2 u_sceneCenterMercator;\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  v_color = a_Color;\r\n    \r\n  mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));\r\n  vec2 offset =(vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage));\r\n   // vec2 lnglat = unProjectFlat(a_Pos.xy + offset)\r\n   vec2 lnglat = a_Pos.xy;  \r\n \r\n  // vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0., 1.0));\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    // gl_Position = u_Mvp * (vec4(project_pos.xy, 0., 1.0));\r\n    // gl_Position = u_Mvp * (vec4(a_Pos.xy + offset, 0., 1.0));\r\n    vec2 customLnglat = customProject(lnglat) - u_sceneCenterMercator;\r\n    vec4 project_pos = project_position(vec4(customLnglat, 0, 1.0));\r\n    gl_Position = u_Mvp * vec4(project_pos.xy, 0.0, 1.0);\r\n  } else {\r\n    vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0., 1.0));\r\n  }\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:BG,triangulation:AG,depth:{enable:!1},primitive:rO.TRIANGLES});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"pos",type:RD.Attribute,descriptor:{name:"a_Pos",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(t,r,n){var i;if("GAODE2.x"===t.version)i=t.originCoordinates;else{var a=e.layer.getLayerConfig(),o=a.coverage,s=void 0===o?1:o,u=a.angle,c=e.layer.getSource().data,l=c.xOffset,h=c.yOffset,f=uT();cT(f,f,u);var p=Zb();ex(p,qb(n[0],n[1]),qb(l,h)),ex(p,p,qb(s,s)),ix(p,p,f);var d=tS([t.coordinates[0]+p[0],t.coordinates[1]+p[1]],e.mapService.map,256<<20);if(e.mapService.coordinateSystemService.getCoordinateSystem()===ub.LNGLAT_OFFSET)i=d;else if(e.mapService.coordinateSystemService.getCoordinateSystem()===ub.METER_OFFSET){i=eS(d,e.mapService.map,512);var v=e.mapService.coordinateSystemService.offsetCenterTransform;i=[i[0]-v[0],i[1]-v[1]]}else i=eS(d,e.mapService.map,512)}return[i[0],i[1],0]}}})}}]),a}(PV)},HG=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","HeatMapLayer"),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new GG[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"renderModels",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.getModelType();return"heatmap"===r?(this.layerModel&&this.layerModel.render(t),this):(this.encodeDataLength<=0&&!this.forceRender||(this.hooks.beforeRender.call(),this.models.forEach((function(r){return r.draw({uniforms:e.layerModel.getUninforms(),blend:e.layerModel.getBlend(),stencil:e.layerModel.getStencil(t)})})),this.hooks.afterRender.call()),this)}},{key:"updateModelData",value:function(e){e.attributes&&e.elements?this.models[0].updateAttributesAndElements(e.attributes,e.elements):console.warn("data error")}},{key:"getModelType",value:function(){var e,t=this.styleAttributeService.getLayerStyleAttribute("shape"),r=this.getLayerConfig().shape3d,n=this.getSource().data.type,i=(null==t||null===(e=t.scale)||void 0===e?void 0:e.field)||"heatmap";return"heatmap"===i||"heatmap3d"===i?"heatmap":"hexagon"===n?-1===(null==r?void 0:r.indexOf(i))?"hexagon":"grid3d":"grid"===n?-1===(null==r?void 0:r.indexOf(i))?"grid":"grid3d":"heatmap"}}]),n}(kV),WG={image:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),e}return l(a,[{key:"getUninforms",value:function(){return{u_opacity:this.layer.getLayerConfig().opacity||1,u_texture:this.texture}}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a,o,s,u=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.layer.getSource(),r=this.rendererService.createTexture2D,this.texture=r({height:0,width:0}),!Hv){e.next=11;break}n=this.layerService.sceneService.getSceneConfig().canvas,(a=n.createImage()).crossOrigin="anonymous",a.src=t.data.originData,a.onload=function(){u.texture=r({data:a,width:a.width,height:a.height}),u.layerService.reRender()},e.next=15;break;case 11:return e.next=13,t.data.images;case 13:o=e.sent,this.texture=r({data:o[0],width:o[0].width,height:o[0].height,mag:rO.LINEAR,min:rO.LINEAR});case 15:return e.next=17,this.layer.buildLayerModel({moduleName:"rasterImage",vertexShader:'precision highp float;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nvarying vec2 v_texCoord;\r\n#pragma include "projection"\r\nvoid main() {\r\n   v_texCoord = a_Uv;\r\n   vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n   // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\r\n   } else {\r\n      gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\r\n   }\r\n}\r\n',fragmentShader:"precision mediump float;\r\nuniform float u_opacity: 1.0;\r\nuniform sampler2D u_texture;\r\nvarying vec2 v_texCoord;\r\nvoid main() {\r\n  vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));\r\n  gl_FragColor = color;\r\n  gl_FragColor.a *= u_opacity;\r\n  if(gl_FragColor.a < 0.01)\r\n    discard;\r\n}\r\n",triangulation:TG,primitive:rO.TRIANGLES,blend:{enable:!0},depth:{enable:!1}});case 17:return s=e.sent,e.abrupt("return",[s]);case 19:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy()}},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),a}(PV)},YG=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","ImageLayer"),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new WG[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getDefaultConfig",value:function(){return{image:{}}[this.getModelType()]}},{key:"getModelType",value:function(){return"image"}}]),n}(kV),XG={solid:0,dash:1},ZG=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas()}),void e.layer.render();e.texture=t({data:e.iconService.getCanvas(),mag:rO.NEAREST,min:rO.NEAREST,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128})})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.sourceColor,i=e.targetColor,a=e.textureBlend,o=void 0===a?"normal":a,s=e.lineType,u=void 0===s?"solid":s,c=e.dashArray,l=void 0===c?[10,5]:c,h=e.forward,f=void 0===h||h,p=e.lineTexture,d=void 0!==p&&p,v=e.iconStep,g=void 0===v?100:v,m=e.segmentNumber,y=void 0===m?30:m,_=e.thetaOffset,b=void 0===_?.314:_;2===l.length&&l.push(0,0);var x=0,S=[0,0,0,0],E=[0,0,0,0];return n&&i&&(S=zg(n),E=zg(i),x=1),this.rendererService.getDirty()&&this.texture.bind(),{u_thetaOffset:b,u_opacity:PB(r)?r:1,u_textureBlend:"normal"===o?0:1,segmentNumber:y,u_line_type:XG[u||"solid"],u_dash_array:l,u_blur:.9,u_lineDir:f?1:-1,u_texture:this.texture,u_line_texture:d?1:0,u_icon_step:g,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:x,u_sourceColor:S,u_targetColor:E}}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"getShaders",value:function(){var e=this.layer.getLayerConfig(),t=e.sourceColor,r=e.targetColor;return"dash"===e.lineType?{frag:'\r\nuniform float u_opacity;\r\n\r\nvarying vec4 v_dash_array;\r\nvarying vec4 v_color;\r\nvarying float v_distance_ratio;\r\n\r\nuniform float segmentNumber;\r\n\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  gl_FragColor = v_color;\r\n\r\n\r\n  float flag = 0.;\r\n  float dashLength = mod(v_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);\r\n  if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength <  v_dash_array.x + v_dash_array.y + v_dash_array.z)) {\r\n    flag = 1.;\r\n  };\r\n  gl_FragColor.a *=flag;\r\n  \r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}',vert:'\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec4 a_Instance;\r\nattribute float a_Size;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float segmentNumber;\r\nvarying vec4 v_color;\r\n\r\n\r\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\r\nuniform float u_lineDir: 1.0;\r\nvarying vec4 v_dash_array;\r\nvarying float v_distance_ratio;\r\n\r\nuniform float u_thetaOffset: 0.314;\r\n\r\nuniform float u_opacity: 1.0;\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nfloat bezier3(vec3 arr, float t) {\r\n  float ut = 1. - t;\r\n  return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;\r\n}\r\nvec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {\r\n  vec2 center = target - source;\r\n  float r = length(center);\r\n  float theta = atan(center.y, center.x);\r\n  float thetaOffset = arcThetaOffset;\r\n  float r2 = r / 2.0 / cos(thetaOffset);\r\n  float theta2 = theta + thetaOffset;\r\n  vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);\r\n  if(u_lineDir == 1.0) { // 正向\r\n    return mid;\r\n  } else { // 逆向\r\n    // (mid + vmin)/2 = (s + t)/2\r\n    vec2 vmid = source + target - mid;\r\n    return vmid;\r\n  }\r\n  // return mid;\r\n}\r\nfloat getSegmentRatio(float index) {\r\n  // dash: index / (segmentNumber - 1.);\r\n  // normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\r\n  return index / (segmentNumber - 1.);\r\n}\r\nvec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {\r\n  // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\r\n  vec2 mid = midPoint(source, target, arcThetaOffset);\r\n  vec3 x = vec3(source.x, mid.x, target.x);\r\n  vec3 y = vec3(source.y, mid.y, target.y);\r\n  return vec2(bezier3(x ,t), bezier3(y,t));\r\n}\r\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n  vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\r\n  return offset;\r\n}\r\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n   return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\r\n}\r\n\r\nvoid main() {\r\n  v_color = vec4(a_Color.xyz, a_Color.w * u_opacity);\r\n  \r\n  vec2 source = a_Instance.rg;  // 起始点\r\n  vec2 target =  a_Instance.ba; // 终点\r\n  float segmentIndex = a_Position.x;\r\n  float segmentRatio = getSegmentRatio(segmentIndex);\r\n\r\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\r\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\r\n\r\n  vec2 s = source;\r\n  vec2 t = target;\r\n  \r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    s = unProjCustomCoord(source);\r\n    t = unProjCustomCoord(target);\r\n  }\r\n  float total_Distance = pixelDistance(s, t) / 2.0 * PI;\r\n  v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance;\r\n\r\n  v_distance_ratio = segmentIndex / segmentNumber;\r\n\r\n  vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, u_thetaOffset), 0.0, 1.0));\r\n  vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, u_thetaOffset), 0.0, 1.0));\r\n \r\n  \r\n  vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\r\n  }\r\n  gl_PointSize = 5.0;\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',type:"Dash"}:t&&r?{frag:'varying vec4 v_color;\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n// 当前顶点在弧线中所处的分段位置\r\n\r\n  gl_FragColor = v_color;\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}',vert:'\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec4 a_Instance;\r\nattribute float a_Size;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float segmentNumber;\r\nvarying vec4 v_color;\r\nvarying float v_segmentIndex;\r\n\r\nuniform float u_lineDir: 1.0;\r\nuniform float u_opacity: 1.0;\r\n\r\nuniform float u_thetaOffset: 0.314;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\n\r\n\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nfloat bezier3(vec3 arr, float t) {\r\n  float ut = 1. - t;\r\n  return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;\r\n}\r\nvec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {\r\n  vec2 center = target - source;\r\n  float r = length(center);\r\n  float theta = atan(center.y, center.x);\r\n  float thetaOffset = arcThetaOffset;\r\n  float r2 = r / 2.0 / cos(thetaOffset);\r\n  float theta2 = theta + thetaOffset;\r\n  vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);\r\n  if(u_lineDir == 1.0) { // 正向\r\n    return mid;\r\n  } else { // 逆向\r\n    // (mid + vmin)/2 = (s + t)/2\r\n    vec2 vmid = source + target - mid;\r\n    return vmid;\r\n  }\r\n  // return mid;\r\n}\r\nfloat getSegmentRatio(float index) {\r\n    return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\r\n}\r\nvec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {\r\n  // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\r\n  vec2 mid = midPoint(source, target, arcThetaOffset);\r\n  vec3 x = vec3(source.x, mid.x, target.x);\r\n  vec3 y = vec3(source.y, mid.y, target.y);\r\n  return vec2(bezier3(x ,t), bezier3(y,t));\r\n}\r\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n  vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\r\n  return offset;\r\n}\r\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n   return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\r\n}\r\n\r\nvoid main() {\r\n  v_color = a_Color;\r\n\r\n  vec2 source = a_Instance.rg;  // 起始点\r\n  vec2 target =  a_Instance.ba; // 终点\r\n  float segmentIndex = a_Position.x;\r\n  float segmentRatio = getSegmentRatio(segmentIndex);\r\n\r\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\r\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\r\n  float d_distance_ratio;\r\n  vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, u_thetaOffset), 0.0, 1.0));\r\n  vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, u_thetaOffset), 0.0, 1.0));\r\n  // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);\r\n  //unProjCustomCoord\r\n  \r\n  vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));\r\n\r\n\r\n  float d_segmentIndex = a_Position.x + 1.0; // 当前顶点在弧线中所处的分段位置\r\n\r\n  v_color = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber);\r\n  v_color.a *= u_opacity;\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\r\n  }\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',type:"Linear"}:{frag:'\r\n#define Animate 0.0\r\n#define LineTexture 1.0\r\n\r\nuniform float u_opacity;\r\nuniform float u_textureBlend;\r\nuniform float u_blur : 0.9;\r\nuniform float u_line_type: 0.0;\r\n// varying vec2 v_normal;\r\nvarying vec4 v_dash_array;\r\nvarying vec4 v_color;\r\n\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\n\r\nuniform float u_line_texture;\r\nuniform sampler2D u_texture;\r\nuniform vec2 u_textSize;\r\n\r\nuniform float segmentNumber;\r\nvarying vec2 v_iconMapUV;\r\nvarying vec4 v_lineData;\r\n\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  float animateSpeed = 0.0; // 运动速度\r\n  gl_FragColor = v_color;\r\n  \r\n  gl_FragColor.a *= u_opacity;\r\n\r\n  if(u_animate.x == Animate && u_line_texture != LineTexture) {\r\n      animateSpeed = u_time / u_animate.y;\r\n      float alpha =1.0 - fract( mod(1.0- v_lineData.b, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);\r\n      alpha = (alpha + u_animate.w -1.0) / u_animate.w;\r\n      // alpha = smoothstep(0., 1., alpha);\r\n      alpha = clamp(alpha, 0.0, 1.0);\r\n      gl_FragColor.a *= alpha;\r\n  }\r\n\r\n  // 当存在贴图时在底色上贴上贴图\r\n  if(u_line_texture == LineTexture) { // while load texture\r\n    float arcRadio = smoothstep( 0.0, 1.0, (v_lineData.r / segmentNumber));\r\n    // float arcRadio = smoothstep( 0.0, 1.0, d_distance_ratio);\r\n\r\n    float count = v_lineData.g; // 贴图在弧线上重复的数量\r\n\r\n    float time = 0.0;\r\n    if(u_animate.x == Animate) {\r\n      time = u_time / u_animate.y;\r\n    }\r\n    float redioCount = arcRadio * count;\r\n\r\n    float u = fract(redioCount - time);\r\n    float v = v_lineData.a; // 横向 v\r\n    vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\r\n\r\n    vec4 pattern = texture2D(u_texture, uv);\r\n\r\n    if(u_animate.x == Animate) {\r\n      float currentPlane = floor(redioCount - time);\r\n      float textureStep = floor(count * u_animate.z);\r\n      float a = mod(currentPlane, textureStep);\r\n      if(a < textureStep - 1.0) {\r\n        pattern = vec4(0.0);\r\n      }\r\n    }\r\n\r\n    if(u_textureBlend == 0.0) { // normal\r\n      pattern.a = 0.0;\r\n      gl_FragColor = filterColor(gl_FragColor + pattern);\r\n    } else { // replace\r\n        pattern.a *= u_opacity;\r\n        if(gl_FragColor.a <= 0.0) {\r\n          pattern.a = 0.0;\r\n        }\r\n        gl_FragColor = filterColor(pattern);\r\n    }\r\n    \r\n  } else {\r\n     gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n}',vert:'#define Animate 0.0\r\n#define LineTexture 1.0\r\n\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec4 a_Instance;\r\nattribute float a_Size;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float segmentNumber;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\nvarying vec4 v_color;\r\n\r\nuniform float u_lineDir: 1.0;\r\n\r\nuniform float u_thetaOffset: 0.314;\r\nuniform float u_icon_step: 100;\r\nuniform float u_line_texture: 0.0;\r\nattribute vec2 a_iconMapUV;\r\nvarying vec2 v_iconMapUV;\r\nvarying vec4 v_lineData;\r\nvarying vec2 v_distance_ratio;\r\n\r\nuniform float u_opacity: 1.0;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nfloat bezier3(vec3 arr, float t) {\r\n  float ut = 1. - t;\r\n  return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;\r\n}\r\nvec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {\r\n  vec2 center = target - source;\r\n  float r = length(center);\r\n  float theta = atan(center.y, center.x);\r\n  float thetaOffset = arcThetaOffset;\r\n  float r2 = r / 2.0 / cos(thetaOffset);\r\n  float theta2 = theta + thetaOffset;\r\n  vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);\r\n  if(u_lineDir == 1.0) { // 正向\r\n    return mid;\r\n  } else { // 逆向\r\n    // (mid + vmin)/2 = (s + t)/2\r\n    vec2 vmid = source + target - mid;\r\n    return vmid;\r\n  }\r\n  // return mid;\r\n}\r\nfloat getSegmentRatio(float index) {\r\n    // dash: index / (segmentNumber - 1.);\r\n    // normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\r\n    return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\r\n    //  return index / (segmentNumber - 1.);\r\n}\r\nvec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {\r\n  // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\r\n  vec2 mid = midPoint(source, target, arcThetaOffset);\r\n  vec3 x = vec3(source.x, mid.x, target.x);\r\n  vec3 y = vec3(source.y, mid.y, target.y);\r\n  return vec2(bezier3(x ,t), bezier3(y,t));\r\n}\r\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n  vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\r\n  return offset;\r\n}\r\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n   return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\r\n}\r\n\r\nvoid main() {\r\n  v_color = a_Color;\r\n\r\n  vec2 source = a_Instance.rg;  // 起始点\r\n  vec2 target =  a_Instance.ba; // 终点\r\n  float segmentIndex = a_Position.x;\r\n  float segmentRatio = getSegmentRatio(segmentIndex);\r\n\r\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\r\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\r\n  float d_distance_ratio;\r\n  \r\n  if(u_animate.x == Animate) {\r\n      d_distance_ratio = segmentIndex / segmentNumber;\r\n      if(u_lineDir != 1.0) {\r\n        d_distance_ratio = 1.0 - d_distance_ratio;\r\n      }\r\n  }\r\n\r\n v_lineData.b = d_distance_ratio;\r\n\r\n  vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, u_thetaOffset), 0.0, 1.0));\r\n  vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, u_thetaOffset), 0.0, 1.0));\r\n\r\n  \r\n  vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));\r\n\r\n\r\n  float d_segmentIndex = a_Position.x + 1.0; // 当前顶点在弧线中所处的分段位置\r\n v_lineData.r = d_segmentIndex;\r\n\r\n  if(LineTexture == u_line_texture) { // 开启贴图模式\r\n\r\n    float arcDistrance = length(source - target); // 起始点和终点的距离\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap\r\n      arcDistrance *= 1000000.0;\r\n    }\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox\r\n      // arcDistrance *= 8.0;\r\n      arcDistrance = project_pixel_allmap(arcDistrance);\r\n    }\r\n    v_iconMapUV = a_iconMapUV;\r\n\r\n    float pixelLen = project_pixel_texture(u_icon_step); // 贴图沿弧线方向的长度 - 随地图缩放改变\r\n    float texCount = floor(arcDistrance/pixelLen); // 贴图在弧线上重复的数量\r\n    v_lineData.g = texCount;\r\n\r\n    float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // 线横向偏移的距离\r\n    float linePixelSize = project_pixel(a_Size); // 定点位置偏移\r\n    v_lineData.a = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值\r\n  }\r\n  \r\n\r\n  // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    // gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\r\n    gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\r\n  }\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',type:""}}},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.segmentNumber,n=void 0===r?30:r,a=this.getShaders(),o=a.frag,s=a.vert,u=a.type,e.next=4,this.layer.buildLayerModel({moduleName:"lineArc2d"+u,vertexShader:s,fragmentShader:o,triangulation:wG,depth:{enable:!1},segmentNumber:n});case 4:return c=e.sent,e.abrupt("return",[c]);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:RD.Attribute,descriptor:{name:"a_Instance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(e,t,r){return[r[3],r[4],r[5],r[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.texture]||{x:0,y:0};return[r.x,r.y]}}})}}]),a}(PV),qG='#define LineTypeSolid 0.0\r\n#define LineTypeDash 1.0\r\n#define Animate 0.0\r\n#define LineTexture 1.0\r\n\r\nuniform float u_textureBlend;\r\nuniform float u_blur : 0.9;\r\nuniform float u_line_type: 0.0;\r\n// varying vec2 v_normal;\r\nvarying vec4 v_dash_array;\r\nvarying vec4 v_color;\r\nvarying vec4 v_line_data;\r\n\r\nuniform float u_line_texture: 0.0;\r\nuniform sampler2D u_texture;\r\nuniform vec2 u_textSize;\r\nvarying float v_segmentIndex;\r\nuniform float segmentNumber;\r\nuniform float u_opacity;\r\n\r\nvarying vec2 v_iconMapUV;\r\n\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\n\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  float opacity = u_opacity;\r\n  float animateSpeed = 0.0; // 运动速度\r\n  float d_distance_ratio = v_line_data.g; // 当前点位距离占线总长的比例\r\n  gl_FragColor = v_color;\r\n\r\n  gl_FragColor.a *= opacity;\r\n  if(u_line_type == LineTypeDash) {\r\n    float flag = 0.;\r\n    float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);\r\n    if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength <  v_dash_array.x + v_dash_array.y + v_dash_array.z)) {\r\n      flag = 1.;\r\n    }\r\n    gl_FragColor.a *=flag;\r\n  }\r\n\r\n  if(u_animate.x == Animate && u_line_texture != LineTexture) {\r\n      animateSpeed = u_time / u_animate.y;\r\n      float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);\r\n\r\n      alpha = (alpha + u_animate.w -1.0) / u_animate.w;\r\n      // alpha = smoothstep(0., 1., alpha);\r\n      alpha = clamp(alpha, 0.0, 1.0);\r\n      gl_FragColor.a *= alpha;\r\n\r\n      // u_animate \r\n      // x enable\r\n      // y duration\r\n      // z interval\r\n      // w trailLength\r\n  }\r\n\r\n  if(u_line_texture == LineTexture && u_line_type != LineTypeDash) { // while load texture\r\n    // float arcRadio = smoothstep( 0.0, 1.0, (v_segmentIndex / segmentNumber));\r\n    float arcRadio = v_segmentIndex / (segmentNumber - 1.0);\r\n    float count = v_line_data.b; // // 贴图在弧线上重复的数量\r\n\r\n    float time = 0.0;\r\n    if(u_animate.x == Animate) {\r\n      time = u_time / u_animate.y;\r\n    }\r\n    float redioCount = arcRadio * count;\r\n\r\n    float u = fract(redioCount - time);\r\n\r\n    float v = v_line_data.a;  // 线图层贴图部分的 v 坐标值\r\n    vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\r\n    vec4 pattern = texture2D(u_texture, uv);\r\n\r\n    if(u_animate.x == Animate) {\r\n      float currentPlane = floor(redioCount - time);\r\n      float textureStep = floor(count * u_animate.z);\r\n      float a = mod(currentPlane, textureStep);\r\n      if(a < textureStep - 1.0) {\r\n        pattern = vec4(0.0);\r\n      }\r\n    }\r\n\r\n    if(u_textureBlend == 0.0) { // normal\r\n      pattern.a = 0.0;\r\n      gl_FragColor = filterColor(gl_FragColor + pattern);\r\n    } else { // replace\r\n        pattern.a *= opacity;\r\n        if(gl_FragColor.a <= 0.0) {\r\n          pattern.a = 0.0;\r\n          discard;\r\n        } else {\r\n          gl_FragColor = filterColor(pattern);\r\n        }\r\n    }\r\n\r\n  } else {\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n}\r\n',KG='#define LineTypeSolid 0.0\r\n#define LineTypeDash 1.0\r\n#define Animate 0.0\r\n#define LineTexture 1.0\r\nattribute vec3 a_Position;\r\nattribute vec4 a_Instance;\r\nattribute vec4 a_Color;\r\nattribute float a_Size;\r\n\r\nuniform float u_globel;\r\nuniform float u_globel_radius;\r\nuniform float u_global_height: 10;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float segmentNumber;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\nvarying vec4 v_color;\r\n\r\nuniform float u_line_type: 0.0;\r\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\r\nvarying vec4 v_dash_array;\r\n\r\nuniform float u_icon_step: 100;\r\nuniform float u_line_texture: 0.0;\r\nvarying float v_segmentIndex;\r\n\r\nattribute vec2 a_iconMapUV;\r\nvarying vec2 v_iconMapUV;\r\nvarying vec4 v_line_data;\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nfloat maps (float value, float start1, float stop1, float start2, float stop2) {\r\n  return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));\r\n}\r\n\r\nfloat getSegmentRatio(float index) {\r\n  return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));\r\n}\r\n\r\nfloat paraboloid(vec2 source, vec2 target, float ratio) {\r\n  vec2 x = mix(source, target, ratio);\r\n  vec2 center = mix(source, target, 0.5);\r\n  float dSourceCenter = distance(source, center);\r\n  float dXCenter = distance(x, center);\r\n  return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\r\n}\r\n\r\nvec3 getPos(vec2 source, vec2 target, float segmentRatio) {\r\n  float vertex_height = paraboloid(source, target, segmentRatio);\r\n\r\n  return vec3(\r\n    mix(source, target, segmentRatio),\r\n    sqrt(max(0.0, vertex_height))\r\n  );\r\n}\r\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n\r\n  vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\r\n\r\n  return offset;\r\n}\r\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n  return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\r\n}\r\n\r\nfloat torad(float deg) {\r\n  return (deg / 180.0) * acos(-1.0);\r\n}\r\n\r\nvec3 lglt2xyz(vec2 lnglat) {\r\n  float pi = 3.1415926;\r\n  // + Math.PI/2 是为了对齐坐标\r\n  float lng = torad(lnglat.x) + pi / 2.0;\r\n  float lat = torad(lnglat.y);\r\n\r\n  // 手动增加一些偏移,减轻面的冲突\r\n  float radius = u_globel_radius;\r\n\r\n  float z = radius * cos(lat) * cos(lng);\r\n  float x = radius * cos(lat) * sin(lng);\r\n  float y = radius * sin(lat);\r\n  return vec3(x, y, z);\r\n}\r\n\r\nvoid main() {\r\n\r\n  v_color = a_Color;\r\n  vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;\r\n  vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;\r\n  float segmentIndex = a_Position.x;\r\n  float segmentRatio = getSegmentRatio(segmentIndex);\r\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\r\n\r\n  float d_distance_ratio;\r\n   if(u_line_type == LineTypeDash) {\r\n    d_distance_ratio = segmentIndex / segmentNumber;\r\n    vec2 s = source;\r\n    vec2 t = target;\r\n    \r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      s = unProjCustomCoord(source);\r\n      t = unProjCustomCoord(target);\r\n    }\r\n    float total_Distance = pixelDistance(s, t) / 2.0 * PI;\r\n    v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);\r\n  }\r\n    if(u_animate.x == Animate) {\r\n      d_distance_ratio = segmentIndex / segmentNumber;\r\n  }\r\n  v_line_data.g = d_distance_ratio; // 当前点位距离占线总长的比例\r\n\r\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\r\n  vec3 curr = getPos(source, target, segmentRatio);\r\n  vec3 next = getPos(source, target, nextSegmentRatio);\r\n  vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);\r\n  // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);\r\n\r\n\r\n  v_segmentIndex = a_Position.x;\r\n  if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // 开启贴图模式  \r\n\r\n    float arcDistrance = length(source - target);\r\n    float pixelLen =  project_pixel_texture(u_icon_step);\r\n    v_line_data.b = floor(arcDistrance/pixelLen); // 贴图在弧线上重复的数量\r\n\r\n    vec2 projectOffset = project_pixel(offset);\r\n    float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // 线横向偏移的距离\r\n    float linePixelSize = project_pixel(a_Size);  // 定点位置偏移,按地图等级缩放后的距离\r\n    v_line_data.a = lineOffsetWidth/linePixelSize;  // 线图层贴图部分的 v 坐标值\r\n\r\n    v_iconMapUV = a_iconMapUV;\r\n  }\r\n  \r\n\r\n  // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\r\n  }\r\n\r\n  // 地球模式\r\n  if(u_globel > 0.0) {\r\n    vec3 startLngLat = lglt2xyz(a_Instance.rg);\r\n    vec3 endLngLat = lglt2xyz(a_Instance.ba);\r\n    float globalRadius = length(startLngLat);\r\n\r\n    vec3 lineDir = normalize(endLngLat - startLngLat);\r\n    vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);\r\n\r\n    // 线的偏移\r\n    vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;\r\n    // 计算起始点和终止点的距离\r\n    float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;\r\n    // 计算飞线各个节点相应的高度\r\n    float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;\r\n    // 地球点位\r\n    vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;\r\n    \r\n    gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);\r\n  }\r\n \r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',QG='\r\n#define Animate 0.0\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\nvarying vec4 v_Color;\r\n\r\nvarying float v_distance_ratio;\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n\r\n  float animateSpeed = 0.0; // 运动速度\r\n  gl_FragColor = v_Color;\r\n\r\n  if(u_animate.x == Animate) {\r\n      animateSpeed = u_time / u_animate.y;\r\n      float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);\r\n\r\n      alpha = (alpha + u_animate.w -1.0) / u_animate.w;\r\n      // alpha = smoothstep(0., 1., alpha);\r\n      alpha = clamp(alpha, 0.0, 1.0);\r\n      gl_FragColor.a *= alpha;\r\n\r\n      // u_animate \r\n      // x enable\r\n      // y duration\r\n      // z interval\r\n      // w trailLength\r\n  }\r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',$G='#define LineTypeSolid 0.0\r\n#define LineTypeDash 1.0\r\n#define Animate 0.0\r\n#define LineTexture 1.0\r\nattribute vec3 a_Position;\r\nattribute vec4 a_Instance;\r\nattribute vec4 a_Color;\r\nattribute float a_Size;\r\nattribute vec2 a_iconMapUV;\r\n\r\nuniform float u_globel;\r\nuniform float u_globel_radius;\r\nuniform float u_global_height: 10;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float segmentNumber;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\n\r\nuniform float u_line_type: 0.0;\r\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\r\nuniform float u_icon_step: 100;\r\nuniform float u_line_texture: 0.0;\r\nvarying float v_distance_ratio;\r\n\r\nvarying vec4 v_dash_array;\r\nvarying vec4 v_color;\r\nvarying vec2 v_iconMapUV;\r\nvarying vec4 v_Color;\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nfloat maps (float value, float start1, float stop1, float start2, float stop2) {\r\n  return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));\r\n}\r\n\r\nfloat getSegmentRatio(float index) {\r\n  return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));\r\n}\r\n\r\nfloat paraboloid(vec2 source, vec2 target, float ratio) {\r\n  vec2 x = mix(source, target, ratio);\r\n  vec2 center = mix(source, target, 0.5);\r\n  float dSourceCenter = distance(source, center);\r\n  float dXCenter = distance(x, center);\r\n  return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\r\n}\r\n\r\nvec3 getPos(vec2 source, vec2 target, float segmentRatio) {\r\n  float vertex_height = paraboloid(source, target, segmentRatio);\r\n\r\n  return vec3(\r\n    mix(source, target, segmentRatio),\r\n    sqrt(max(0.0, vertex_height))\r\n  );\r\n}\r\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n\r\n  vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\r\n\r\n  return offset;\r\n}\r\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n  dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n  return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\r\n}\r\n\r\nfloat torad(float deg) {\r\n  return (deg / 180.0) * acos(-1.0);\r\n}\r\n\r\nvec3 lglt2xyz(vec2 lnglat) {\r\n  float pi = 3.1415926;\r\n  // + Math.PI/2 是为了对齐坐标\r\n  float lng = torad(lnglat.x) + pi / 2.0;\r\n  float lat = torad(lnglat.y);\r\n\r\n  // 手动增加一些偏移,减轻面的冲突\r\n  float radius = u_globel_radius;\r\n\r\n  float z = radius * cos(lat) * cos(lng);\r\n  float x = radius * cos(lat) * sin(lng);\r\n  float y = radius * sin(lat);\r\n  return vec3(x, y, z);\r\n}\r\n\r\nvoid main() {\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n\r\n  v_color = a_Color;\r\n  vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;\r\n  vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;\r\n  float segmentIndex = a_Position.x;\r\n  float segmentRatio = getSegmentRatio(segmentIndex);\r\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\r\n\r\n  float d_distance_ratio;\r\n   if(u_line_type == LineTypeDash) {\r\n    d_distance_ratio = segmentIndex / segmentNumber;\r\n    // float total_Distance = pixelDistance(a_Instance.rg, a_Instance.ba) / 2.0 * PI;\r\n    vec2 s = source;\r\n    vec2 t = target;\r\n    \r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      s = unProjCustomCoord(source);\r\n      t = unProjCustomCoord(target);\r\n    }\r\n    float total_Distance = pixelDistance(s, t) / 2.0 * PI;\r\n    v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);\r\n  }\r\n    if(u_animate.x == Animate) {\r\n      v_distance_ratio = segmentIndex / segmentNumber;\r\n  }\r\n\r\n\r\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\r\n  vec3 curr = getPos(source, target, segmentRatio);\r\n  vec3 next = getPos(source, target, nextSegmentRatio);\r\n  vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);\r\n\r\n  float animateSpeed = 0.0; // 运动速度\r\n  v_Color = mix(u_sourceColor, u_targetColor, a_Position.x/segmentNumber);\r\n\r\n  v_Color.a *= opacity;\r\n\r\n\r\n  // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\r\n  }\r\n\r\n  // 地球模式\r\n  if(u_globel > 0.0) {\r\n    vec3 startLngLat = lglt2xyz(a_Instance.rg);\r\n    vec3 endLngLat = lglt2xyz(a_Instance.ba);\r\n    float globalRadius = length(startLngLat);\r\n\r\n    vec3 lineDir = normalize(endLngLat - startLngLat);\r\n    vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);\r\n\r\n    // 线的偏移\r\n    vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;\r\n    // 计算起始点和终止点的距离\r\n    float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;\r\n    // 计算飞线各个节点相应的高度\r\n    float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;\r\n    // 地球点位\r\n    vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;\r\n    \r\n    gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);\r\n  }\r\n \r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',JG={solid:0,dash:1},eH=function(e){f(o,e);var t,r,a=x(o);function o(){var e;u(this,o);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=a.call.apply(a,[this].concat(r))),"texture",void 0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas()}),void e.layer.render();e.texture=t({data:e.iconService.getCanvas(),mag:rO.NEAREST,min:rO.NEAREST,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128})})),e}return l(o,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.sourceColor,r=e.targetColor,i=e.textureBlend,a=void 0===i?"normal":i,o=e.lineType,s=void 0===o?"solid":o,u=e.dashArray,c=void 0===u?[10,5]:u,l=e.lineTexture,h=void 0!==l&&l,f=e.iconStep,p=void 0===f?100:f,d=e.segmentNumber,v=void 0===d?30:d,g=e.globalArcHeight,m=void 0===g?10:g;2===c.length&&c.push(0,0);var y=0,_=[0,0,0,0],b=[0,0,0,0];return t&&r&&(_=zg(t),b=zg(r),y=1),this.rendererService.getDirty()&&this.texture.bind(),n({u_globel:"GLOBEL"===this.mapService.version?1:0,u_globel_radius:100,u_global_height:m,u_textureBlend:"normal"===a?0:1,segmentNumber:v,u_line_type:JG[s]||0,u_dash_array:c,u_texture:this.texture,u_line_texture:h?1:0,u_icon_step:p,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:y,u_sourceColor:_,u_targetColor:b},this.getStyleAttribute())}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"getShaders",value:function(){var e=this.layer.getLayerConfig(),t=e.sourceColor,r=e.targetColor;return t&&r?{frag:QG,vert:$G,type:"Linear"}:{frag:qG,vert:KG,type:""}}},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.segmentNumber,n=void 0===r?30:r,a=this.getShaders(),o=a.frag,s=a.vert,u=a.type,e.next=4,this.layer.buildLayerModel({moduleName:"lineArc3d"+u,vertexShader:s,fragmentShader:o,inject:this.getInject(),triangulation:wG,segmentNumber:n});case 4:return c=e.sent,e.abrupt("return",[c]);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:RD.Attribute,descriptor:{name:"a_Instance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(e,t,r){return[r[3],r[4],r[5],r[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.texture]||{x:0,y:0};return[r.x,r.y]}}})}}]),o}(PV),tH={solid:0,dash:1},rH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas()}),void e.layer.render();e.texture=t({data:e.iconService.getCanvas(),mag:rO.NEAREST,min:rO.NEAREST,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128})})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.sourceColor,i=e.targetColor,a=e.textureBlend,o=void 0===a?"normal":a,s=e.lineType,u=void 0===s?"solid":s,c=e.dashArray,l=void 0===c?[10,5]:c,h=e.lineTexture,f=void 0!==h&&h,p=e.iconStep,d=void 0===p?100:p,v=e.segmentNumber,g=void 0===v?30:v,m=e.globalArcHeight,y=void 0===m?10:m;2===l.length&&l.push(0,0);var _=0,b=[0,0,0,0],x=[0,0,0,0];return n&&i&&(b=zg(n),x=zg(i),_=1),this.rendererService.getDirty()&&this.texture.bind(),{u_globel:1,u_globel_radius:100,u_global_height:y,u_opacity:r,u_textureBlend:"normal"===o?0:1,segmentNumber:g,u_line_type:tH[u]||0,u_dash_array:l,u_texture:this.texture,u_line_texture:f?1:0,u_icon_step:d,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:_,u_sourceColor:b,u_targetColor:x}}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"getShaders",value:function(){var e=this.layer.getLayerConfig(),t=e.sourceColor,r=e.targetColor;return t&&r?{frag:QG,vert:$G,type:"Linear"}:{frag:qG,vert:KG,type:""}}},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.segmentNumber,n=void 0===r?30:r,a=this.getShaders(),o=a.frag,s=a.vert,u=a.type,e.next=4,this.layer.buildLayerModel({moduleName:"lineEarthArc3d"+u,vertexShader:s,fragmentShader:o,triangulation:wG,depth:{enable:!0},segmentNumber:n});case 4:return c=e.sent,e.abrupt("return",[c]);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:RD.Attribute,descriptor:{name:"a_Instance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(e,t,r){return[r[3],r[4],r[5],r[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.texture]||{x:0,y:0};return[r.x,r.y]}}})}}]),a}(PV),nH=function(e){f(o,e);var t,r,a=x(o);function o(){return u(this,o),a.apply(this,arguments)}return l(o,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.gapWidth,r=void 0===t?2:t,i=e.strokeWidth,a=void 0===i?1:i,o=e.stroke,s=void 0===o?"#000":o,u=e.strokeOpacity,c=void 0===u?1:u;return n({u_gap_width:r,u_stroke_width:a,u_stroke:zg(s),u_stroke_opacity:c},this.getStyleAttribute())}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"flow_line",vertexShader:'attribute vec4 a_Color;\r\nattribute vec2 a_Size;\r\nattribute vec4 a_Instance;\r\nattribute vec3 a_Normal;\r\nattribute vec3 a_Position;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\nvarying vec4 v_color;\r\nuniform float u_gap_width: 1.0;\r\nuniform float u_stroke_width: 1.0;\r\nuniform float u_stroke_opacity: 1.0;\r\n\r\n\r\nvoid main() {\r\n\r\n// #ifdef USE_ATTRIBUTE_OPACITY\r\n//   float opacity  = a_Opacity;\r\n// #else\r\n//   float opacity = u_opacity;\r\n// #endif\r\n\r\n\r\n// #ifdef USE_ATTRIBUTE_OFFSETS\r\n//   vec2 offsets  = a_Offsets;\r\n// #else\r\n//   vec2 offsets = u_offsets;\r\n// #endif\r\n\r\n  // float opacity = u_opacity;\r\n// 透明度计算\r\n  vec2 source = a_Instance.rg;  // 起始点\r\n  vec2 target =  a_Instance.ba; // 终点\r\n  vec2 flowlineDir = normalize(target - source);\r\n  vec2 perpendicularDir = vec2(-flowlineDir.y, flowlineDir.x);\r\n\r\n\r\n  vec2 position = mix(source, target, a_Position.x);\r\n\r\n  float lengthCommon = length(target - source);    \r\n  vec2 offsetDistances = a_Size.x * project_pixel(a_Position.yz);\r\n  vec2 limitedOffsetDistances = clamp(   \r\n   offsetDistances,\r\n    -lengthCommon*.8, lengthCommon*.8\r\n  );\r\n\r\n  float startOffsetCommon = project_pixel(offsets[0]);\r\n  float endOffsetCommon = project_pixel(offsets[1]);\r\n  float endpointOffset = mix(\r\n    clamp(startOffsetCommon, 0.0, lengthCommon*.2),\r\n    -clamp(endOffsetCommon, 0.0, lengthCommon*.2),\r\n    a_Position.x\r\n  );\r\n\r\n  vec2 normalsCommon =  u_stroke_width * project_pixel(a_Normal.xy);\r\n\r\n  float gapCommon =  project_pixel(u_gap_width);\r\n  vec3 offsetCommon = vec3(\r\n    flowlineDir * (limitedOffsetDistances[1] + normalsCommon.y + endpointOffset * 1.05) -\r\n    perpendicularDir * (limitedOffsetDistances[0] + gapCommon + normalsCommon.x),\r\n    0.0\r\n  );\r\n\r\n\r\n  vec4 project_pos = project_position(vec4(position.xy, 0, 1.0));\r\n\r\n  vec4 fillColor = vec4(a_Color.rgb, a_Color.a * opacity);\r\n  v_color = mix(fillColor, vec4(u_stroke.xyz, u_stroke.w * fillColor.w * u_stroke_opacity), a_Normal.z);\r\n\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * vec4(project_pos.xy + offsetCommon.xy, 0., 1.0);\r\n  } else {\r\n     gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offsetCommon.xy, 0., 1.0));\r\n  }\r\n\r\n\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'// #extension GL_OES_standard_derivatives : enable\r\n\r\nvarying vec4 v_color;\r\n\r\n\r\n// line texture\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\ngl_FragColor = v_color;\r\ngl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',inject:this.getInject(),triangulation:gG,primitive:rO.TRIANGLES,depth:{enable:!1},pick:!1});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0],r[1]]:[r,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:RD.Attribute,descriptor:{name:"a_Instance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(e,t,r){return[r[3],r[4],r[5],r[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}})}}]),o}(PV),iH={solid:0,dash:1},aH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas()}),void e.layer.render();e.texture=t({data:e.iconService.getCanvas(),mag:rO.NEAREST,min:rO.NEAREST,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128})})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.sourceColor,i=e.targetColor,a=e.textureBlend,o=void 0===a?"normal":a,s=e.lineType,u=void 0===s?"solid":s,c=e.dashArray,l=void 0===c?[10,5]:c,h=e.lineTexture,f=void 0!==h&&h,p=e.iconStep,d=void 0===p?100:p,v=e.segmentNumber,g=void 0===v?30:v;2===l.length&&l.push(0,0),this.rendererService.getDirty()&&this.texture.bind();var m=0,y=[0,0,0,0],_=[0,0,0,0];return n&&i&&(y=zg(n),_=zg(i),m=1),{u_opacity:r,u_textureBlend:"normal"===o?0:1,segmentNumber:g,u_line_type:iH[u]||0,u_dash_array:l,u_texture:this.texture,u_line_texture:f?1:0,u_icon_step:d,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:m,u_sourceColor:y,u_targetColor:_}}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getUninforms(),r=t.segmentNumber,e.next=3,this.layer.buildLayerModel({moduleName:"lineGreatCircle",vertexShader:'#define LineTypeSolid 0.0\r\n#define LineTypeDash 1.0\r\n#define Animate 0.0\r\n#define LineTexture 1.0\r\n\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec4 a_Instance;\r\nattribute float a_Size;\r\nattribute vec4 a_Position1;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float segmentNumber;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\nvarying vec4 v_color;\r\n\r\nvarying float v_distance_ratio;\r\nuniform float u_line_type: 0.0;\r\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\r\nvarying vec4 v_dash_array;\r\n\r\nuniform float u_icon_step: 100;\r\nuniform float u_line_texture: 0.0;\r\n\r\nattribute vec2 a_iconMapUV;\r\nvarying vec2 v_iconMapUV;\r\nvarying vec4 v_line_data;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n#pragma include "picking"\r\n\r\nfloat maps (float value, float start1, float stop1, float start2, float stop2) {\r\n    return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));\r\n}\r\n\r\nfloat getSegmentRatio(float index) {\r\n    return index / (segmentNumber - 1.);\r\n}\r\n\r\nfloat paraboloid(vec2 source, vec2 target, float ratio) {\r\n    vec2 x = mix(source, target, ratio);\r\n    vec2 center = mix(source, target, 0.5);\r\n    float dSourceCenter = distance(source, center);\r\n    float dXCenter = distance(x, center);\r\n    return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\r\n}\r\n\r\nvec3 getPos(vec2 source, vec2 target, float segmentRatio) {\r\n     float vertex_height = paraboloid(source, target, segmentRatio);\r\n\r\n    return vec3(\r\n    mix(source, target, segmentRatio),\r\n    sqrt(max(0.0, vertex_height))\r\n    );\r\n}\r\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n  vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size)/ 2.0;\r\n  return offset;\r\n}\r\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\r\n  // normalized direction of the line\r\n  vec2 dir_screenspace = normalize(line_clipspace);\r\n  // rotate by 90 degrees\r\n   dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\r\n   return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\r\n}\r\nfloat getAngularDist (vec2 source, vec2 target) {\r\n  vec2 delta = source - target;\r\n  vec2 sin_half_delta = sin(delta / 2.0);\r\n  float a =\r\n    sin_half_delta.y * sin_half_delta.y +\r\n    cos(source.y) * cos(target.y) *\r\n    sin_half_delta.x * sin_half_delta.x;\r\n  return 2.0 * atan(sqrt(a), sqrt(1.0 - a));\r\n}\r\n\r\nvec2 midPoint(vec2 source, vec2 target) {\r\n  vec2 center = target - source;\r\n  float r = length(center);\r\n  float theta = atan(center.y, center.x);\r\n  float thetaOffset = 0.314;\r\n  float r2 = r / 2.0 / cos(thetaOffset);\r\n  float theta2 = theta + thetaOffset;\r\n  vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);\r\n  return mid;\r\n}\r\nfloat bezier3(vec3 arr, float t) {\r\n  float ut = 1. - t;\r\n  return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;\r\n}\r\n\r\nvec2 interpolate (vec2 source, vec2 target, float angularDist, float t) {\r\n  // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    vec2 mid = midPoint(source, target);\r\n    vec3 x = vec3(source.x, mid.x, target.x);\r\n    vec3 y = vec3(source.y, mid.y, target.y);\r\n    return vec2(bezier3(x ,t), bezier3(y,t));\r\n  }else {\r\n    if(abs(angularDist - PI) < 0.001) {\r\n      return (1.0 - t) * source + t * target;\r\n    }\r\n    float a = sin((1.0 - t) * angularDist) / sin(angularDist);\r\n    float b = sin(t * angularDist) / sin(angularDist);\r\n    vec2 sin_source = sin(source);\r\n    vec2 cos_source = cos(source);\r\n    vec2 sin_target = sin(target);\r\n    vec2 cos_target = cos(target);\r\n    float x = a * cos_source.y * cos_source.x + b * cos_target.y * cos_target.x;\r\n    float y = a * cos_source.y * sin_source.x + b * cos_target.y * sin_target.x;\r\n    float z = a * sin_source.y + b * sin_target.y;\r\n    return vec2(atan(y, x), atan(z, sqrt(x * x + y * y)));\r\n  }\r\n}\r\n\r\nvoid main() {\r\n  \r\n\r\n  v_color = a_Color;\r\n  vec2 source = radians(a_Instance.rg);\r\n  vec2 target = radians(a_Instance.ba);\r\n  float angularDist = getAngularDist(source, target);\r\n  float segmentIndex = a_Position.x;\r\n  float segmentRatio = getSegmentRatio(segmentIndex);\r\n  float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\r\n\r\n  if(u_line_type == LineTypeDash) {\r\n    v_distance_ratio = segmentIndex / segmentNumber;\r\n    vec2 s = source;\r\n    vec2 t = target;\r\n    \r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      s = unProjCustomCoord(source);\r\n      t = unProjCustomCoord(target);\r\n    }\r\n    float total_Distance = pixelDistance(s, t) / 2.0 * PI;\r\n    total_Distance = total_Distance*16.0; // total_Distance*16.0 调整默认的效果\r\n    v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance;\r\n  }\r\n\r\n  if(u_animate.x == Animate) {\r\n      v_distance_ratio = segmentIndex / segmentNumber;\r\n  }\r\n\r\n  float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\r\n  v_distance_ratio = segmentIndex / segmentNumber;\r\n  vec4 curr = project_position(vec4(a_Position1[0], a_Position1[1],0.0, 1.0));\r\n  vec4 next = project_position(vec4(a_Position1[2], a_Position1[3],0.0, 1.0));\r\n  vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));\r\n\r\nv_line_data.g = a_Position.x; // 该顶点在弧线上的分段排序\r\n  if(LineTexture == u_line_texture) { // 开启贴图模式  \r\n    float d_arcDistrance = length(source - target);\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap\r\n      d_arcDistrance = d_arcDistrance * 1000000.0;\r\n    }\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox\r\n      d_arcDistrance = project_pixel_allmap(d_arcDistrance);\r\n    }\r\n    float d_pixelLen = project_pixel(u_icon_step)/8.0;\r\nv_line_data.b = floor(d_arcDistrance/d_pixelLen); // 贴图在弧线上重复的数量\r\n\r\n    float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // 线横向偏移的距离\r\n    float linePixelSize = project_pixel(a_Size);  // 定点位置偏移,按地图等级缩放后的距离\r\nv_line_data.a = lineOffsetWidth/linePixelSize;  // 线图层贴图部分的 v 坐标值\r\n\r\n    v_iconMapUV = a_iconMapUV;\r\n  }\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(curr.xy + offset, curr.z, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, curr.z, 1.0));\r\n  }\r\n  setPickingColor(a_PickingColor);\r\n}\r\n\r\n',fragmentShader:'#define LineTypeSolid 0.0\r\n#define LineTypeDash 1.0\r\n#define Animate 0.0\r\n#define LineTexture 1.0\r\n\r\nuniform float u_opacity;\r\nuniform float u_textureBlend;\r\nuniform float u_blur : 0.9;\r\nuniform float u_line_type: 0.0;\r\n// varying vec2 v_normal;\r\nvarying vec4 v_dash_array;\r\nvarying float v_distance_ratio;\r\nvarying vec4 v_color;\r\n\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\n\r\nuniform float u_line_texture: 0.0;\r\nuniform sampler2D u_texture;\r\nuniform vec2 u_textSize;\r\nuniform float segmentNumber;\r\n\r\nvarying vec2 v_iconMapUV;\r\n\r\nuniform float u_linearColor: 0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nvarying vec4 v_line_data;\r\n\r\n#pragma include "picking"\r\n#pragma include "project"\r\n#pragma include "projection"\r\n\r\nvoid main() {\r\n  float opacity = u_opacity;\r\n  float animateSpeed = 0.0;\r\n  float d_segmentIndex = v_line_data.g;\r\n  \r\n  // 设置弧线的底色\r\n  if(u_linearColor == 1.0) { // 使用渐变颜色\r\n    gl_FragColor = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber);\r\n  } else { // 使用 color 方法传入的颜色\r\n     gl_FragColor = v_color;\r\n  }\r\n\r\n  // float blur = 1.- smoothstep(u_blur, 1., length(v_normal.xy));\r\n  // float blur = smoothstep(1.0, u_blur, length(v_normal.xy));\r\n  gl_FragColor.a *= opacity;\r\n  if(u_line_type == LineTypeDash) {\r\n    float dashLength = mod(v_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);\r\n    if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength <  v_dash_array.x + v_dash_array.y + v_dash_array.z)) {\r\n      // 实线部分\r\n    } else {\r\n      // 虚线部分\r\n      discard;\r\n    };\r\n  }\r\n\r\n  // 设置弧线的动画模式\r\n  if(u_animate.x == Animate) {\r\n      animateSpeed = u_time / u_animate.y;\r\n      float alpha =1.0 - fract( mod(1.0- v_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + u_time / u_animate.y);\r\n      alpha = (alpha + u_animate.w -1.0) / u_animate.w;\r\n      alpha = smoothstep(0., 1., alpha);\r\n      gl_FragColor.a *= alpha;\r\n  }\r\n\r\n  // 设置弧线的贴图\r\n  if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { \r\n    float arcRadio = smoothstep( 0.0, 1.0, (d_segmentIndex / (segmentNumber - 1.0)));\r\n    // float arcRadio = d_segmentIndex / (segmentNumber - 1.0);\r\n    float count = v_line_data.b; // 贴图在弧线上重复的数量\r\n    float u = fract(arcRadio * count - animateSpeed * count);\r\n    // float u = fract(arcRadio * count - animateSpeed);\r\n    if(u_animate.x == Animate) {\r\n      u = gl_FragColor.a/opacity;\r\n    }\r\n\r\n    float v = v_line_data.a; // 线图层贴图部分的 v 坐标值\r\n\r\n    vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\r\n    vec4 pattern = texture2D(u_texture, uv);\r\n    \r\n    // 设置贴图和底色的叠加模式\r\n    if(u_textureBlend == 0.0) { // normal\r\n      pattern.a = 0.0;\r\n      gl_FragColor = filterColor(gl_FragColor + pattern);\r\n    } else { // replace\r\n        pattern.a *= opacity;\r\n        if(gl_FragColor.a <= 0.0) {\r\n          pattern.a = 0.0;\r\n        }\r\n        gl_FragColor = filterColor(pattern);\r\n    }\r\n  } else {\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n\r\n  // gl_FragColor = filterColor(gl_FragColor);\r\n}',triangulation:wG,depth:{enable:!1},segmentNumber:r});case 3:return n=e.sent,e.abrupt("return",[n]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:RD.Attribute,descriptor:{name:"a_Instance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(t,r,n){var i,a=t.originCoordinates;if(a&&null!==(i=e.mapService)&&void 0!==i&&i.isMapBoxMapLibre()){var o=A(a,2),s=o[0],u=o[1];return[s[0],s[1],u[0],u[1]]}return[n[3],n[4],n[5],n[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"Position1",type:RD.Attribute,descriptor:{name:"a_Position1",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(t,r,n){var i=t.coordinates,a=t.originCoordinates,o=A(a||i,2),s=o[0],u=o[1],c=[s[0],s[1],u[0],u[1]],l=e.getUninforms().segmentNumber,h=2===n.length?[n[0],n[1],0]:[n[0],n[1],n[2]],f=e.handleGLSL(c,h,l),p=f.currentDegree,d=f.nextDegree;return a&&e.mapService.isMapBoxMapLibre()?e.transformMapboxOffset(p,d):[].concat(T(p),T(d))}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.texture]||{x:0,y:0};return[r.x,r.y]}}})}},{key:"handleGLSL",value:function(e,t,r){var n=function(e){return e/(r-1)},i=[e[0],e[1]],a=[e[2],e[3]],o=t[0],s=n(o),u=n(o+function(e,t,r){return e*(1-r)+t*r}(-1,1,0<o?0:1));return{currentDegree:BS(i,a,s,this.mapService.version),nextDegree:BS(i,a,u,this.mapService.version)}}},{key:"transformMapboxOffset",value:function(e,t){var r=eS(e,this.mapService.map,512),n=eS(t,this.mapService.map,512);if(this.mapService.coordinateSystemService.getCoordinateSystem()===ub.METER_OFFSET){var i=this.mapService.coordinateSystemService.offsetCenterTransform;r=[r[0]-i[0],r[1]-i[1]],n=[n[0]-i[0],n[1]-i[1]]}return[].concat(T(r),T(n))}}]),a}(PV),oH='\r\n#define Animate 0.0\r\n\r\nattribute float a_Miter;\r\nattribute vec4 a_Color;\r\nattribute vec2 a_Size;\r\nattribute vec3 a_Normal;\r\nattribute vec3 a_Position;\r\n\r\nattribute vec2 a_iconMapUV;\r\n\r\n// dash line\r\nattribute float a_Total_Distance;\r\nattribute vec2 a_DistanceAndIndex;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\nuniform float u_icon_step: 100;\r\n\r\nuniform float u_heightfixed: 0.0;\r\nuniform float u_vertexScale: 1.0;\r\nuniform float u_raisingHeight: 0.0;\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nvarying vec4 v_color;\r\n\r\n// texV 线图层 - 贴图部分的 v 坐标(线的宽度方向)\r\nvarying vec2 v_iconMapUV;\r\n\r\n\r\nuniform float u_linearColor: 0;\r\nuniform float u_arrow: 0.0;\r\nuniform float u_arrowHeight: 3.0;\r\nuniform float u_arrowWidth: 2.0;\r\nuniform float u_tailWidth: 1.0;\r\n\r\nvarying vec4 v_texture_data;\r\n\r\nvec2 calculateArrow(vec2 offset) {\r\n  /*\r\n  * 在支持箭头的时候,第二、第三组顶点是额外插入用于构建顶点的\r\n  */\r\n  float arrowFlag = -1.0;\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    // 高德 2.0 的旋转角度不同\r\n    arrowFlag = 1.0;\r\n  }\r\n  float pi = arrowFlag * 3.1415926/2.;\r\n  if(a_Miter < 0.) {\r\n    // 根据线的两侧偏移不同、旋转的方向相反\r\n    pi = -pi;\r\n  }\r\n  highp float angle_sin = sin(pi);\r\n  highp float angle_cos = cos(pi);\r\n  // 计算垂直与线方向的旋转矩阵\r\n  mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\r\n  float arrowWidth = u_arrowWidth;\r\n  float arrowHeight = u_arrowHeight;\r\n\r\n  vec2 arrowOffset = vec2(0.0);\r\n  /*\r\n  * a_DistanceAndIndex.y 用于标记当前顶点属于哪一组(两个顶点一组,构成线的其实是矩形,最简需要四个顶点、两组顶点构成)\r\n  */\r\n  if(a_DistanceAndIndex.y == 0.0) {\r\n    // 箭头尖部\r\n    offset = vec2(0.0);\r\n  } else if(a_DistanceAndIndex.y == 1.0) {\r\n    // 箭头两侧\r\n    arrowOffset = rotation_matrix*(offset * arrowHeight);\r\n    offset += arrowOffset; // 沿线偏移\r\n    offset = offset * arrowWidth; // 垂直线向外偏移(是构建箭头两侧的顶点)\r\n  } else if(a_DistanceAndIndex.y == 2.0 || a_DistanceAndIndex.y == 3.0 || a_DistanceAndIndex.y == 4.0) {\r\n    // 偏移其余的点位(将长度让位给箭头)\r\n    arrowOffset = rotation_matrix*(offset * arrowHeight) * arrowWidth;\r\n    offset += arrowOffset;// 沿线偏移\r\n  }\r\n\r\n  return offset;\r\n}\r\n\r\nvoid main() {\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n\r\n  \r\n  float d_texPixelLen;    // 贴图的像素长度,根据地图层级缩放\r\n\r\n  v_iconMapUV = a_iconMapUV;\r\n  d_texPixelLen = project_float_pixel(u_icon_step);\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    d_texPixelLen *= 10.0;\r\n  }\r\n\r\n  v_color = a_Color;\r\n  v_color.a *= opacity;\r\n\r\n  vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);\r\n  \r\n  vec2 offset = project_pixel(size.xy);\r\n\r\n  float lineDistance = a_DistanceAndIndex.x;\r\n  float currentLinePointRatio = lineDistance / a_Total_Distance;\r\n \r\n  if(u_arrow > 0.0) {\r\n      //  计算箭头\r\n    offset = calculateArrow(offset);\r\n\r\n    if(a_DistanceAndIndex.y > 4.0) {\r\n      offset *= mix(1.0, u_tailWidth, currentLinePointRatio);\r\n    }\r\n  }\r\n\r\n  float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // 线横向偏移的距离(向两侧偏移的和)\r\n  float linePixelSize = project_pixel(a_Size.x) * 2.0;  // 定点位置偏移,按地图等级缩放后的距离 单侧 * 2\r\n  float texV = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值\r\n  \r\n  v_texture_data = vec4(currentLinePointRatio, lineDistance, d_texPixelLen, texV);\r\n  // 设置数据集的参数\r\n\r\n  vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\r\n\r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));\r\n\r\n  float h = float(a_Position.z) * u_vertexScale; // 线顶点的高度 - 兼容不存在第三个数值的情况 vertex height\r\n  float lineHeight = a_Size.y; // size 第二个参数代表的高度 [linewidth, lineheight]\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    lineHeight *= 0.2; // 保持和 amap/mapbox 一致的效果\r\n    h *= 0.2;\r\n    if(u_heightfixed < 1.0) {\r\n      lineHeight = project_pixel(a_Size.y);\r\n    }\r\n    gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0));\r\n  } else {\r\n    // mapbox -  amap\r\n    \r\n    // 兼容 mapbox 在线高度上的效果表现基本一致\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n      // mapbox\r\n      // 保持高度相对不变\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      h *= mapboxZoomScale;\r\n      h += u_raisingHeight * mapboxZoomScale;\r\n      if(u_heightfixed > 0.0) {\r\n        lineHeight *= mapboxZoomScale;\r\n      }\r\n      \r\n    } else {\r\n      // amap\r\n      h += u_raisingHeight;\r\n      // lineHeight 顶点偏移高度\r\n      if(u_heightfixed < 1.0) {\r\n        lineHeight *= pow(2.0, 20.0 - u_Zoom);\r\n      }\r\n    }\r\n\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',sH={solid:0,dash:1},uH=function(e){f(o,e);var t,r,a=x(o);function o(){var e;u(this,o);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=a.call.apply(a,[this].concat(r))),"textureEventFlag",!1),h(_(e),"texture",e.createTexture2D({data:[0,0,0,0],mag:rO.NEAREST,min:rO.NEAREST,premultiplyAlpha:!1,width:1,height:1})),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas()}),void e.layer.render();e.texture=t({data:e.iconService.getCanvas(),mag:rO.NEAREST,min:rO.NEAREST,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128})})),e}return l(o,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.sourceColor,r=e.targetColor,i=e.textureBlend,a=void 0===i?"normal":i,o=e.lineType,s=void 0===o?"solid":o,u=e.dashArray,c=void 0===u?[10,5,0,0]:u,l=e.lineTexture,h=void 0!==l&&l,f=e.iconStep,p=void 0===f?100:f,d=e.vertexHeightScale,v=void 0===d?20:d,g=e.borderWidth,m=void 0===g?0:g,y=e.borderColor,_=void 0===y?"#ccc":y,b=e.raisingHeight,x=void 0===b?0:b,S=e.heightfixed,E=void 0!==S&&S,A=e.linearDir,T=void 0===A?OV.VERTICAL:A,w=e.blur,C=void 0===w?[1,1,1]:w,k=e.arrow,M=void 0===k?{enable:!1,arrowWidth:2,arrowHeight:3,tailWidth:1}:k;2===c.length&&c.push(0,0),this.rendererService.getDirty()&&this.texture&&this.texture.bind();var P=0,I=[0,0,0,0],O=[0,0,0,0];return t&&r&&(I=zg(t),O=zg(r),P=1),n({u_textureBlend:a===RV.NORMAL?0:1,u_line_type:sH[s],u_dash_array:c,u_blur:C,u_texture:this.texture,u_line_texture:h?1:0,u_icon_step:p,u_textSize:[1024,this.iconService.canvasHeight||128],u_borderWidth:m,u_borderColor:zg(_),u_linearDir:T===OV.VERTICAL?1:0,u_linearColor:P,u_sourceColor:I,u_targetColor:O,u_heightfixed:Number(E),u_vertexScale:v,u_raisingHeight:Number(x),u_arrow:Number(M.enable),u_arrowHeight:M.arrowHeight||3,u_arrowWidth:M.arrowWidth||2,u_tailWidth:void 0===M.tailWidth?1:M.tailWidth},this.getStyleAttribute())}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.textureEventFlag||(this.textureEventFlag=!0,this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture)),e.abrupt("return",this.buildModels());case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.depth,n=void 0!==r&&r,a=this.getShaders(),o=a.frag,s=a.vert,u=a.type,this.layer.triangulation=_T,e.next=5,this.layer.buildLayerModel({moduleName:"line"+u,vertexShader:s,fragmentShader:o,triangulation:_T,inject:this.getInject(),depth:{enable:n}});case 5:return c=e.sent,e.abrupt("return",[c]);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getShaders",value:function(){var e=this.layer.getLayerConfig(),t=e.sourceColor,r=e.targetColor;return"dash"===e.lineType?{frag:'#define LineTypeSolid 0.0\r\nvarying vec4 v_color;\r\n\r\n// dash\r\nvarying vec4 v_dash_array;\r\nvarying float v_d_distance_ratio;\r\n\r\n#pragma include "picking"\r\n\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; // 控制运动\r\n\r\n// [animate, duration, interval, trailLength],\r\nvoid main() {\r\n\r\n  gl_FragColor = v_color;\r\n\r\n \r\n  float dashLength = mod(v_d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);\r\n  if(dashLength < v_dash_array.x || (dashLength > (v_dash_array.x + v_dash_array.y) && dashLength <  v_dash_array.x + v_dash_array.y + v_dash_array.z)) {\r\n    // 实线部分\r\n  } else {\r\n    // 虚线部分\r\n    discard;\r\n  };\r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',vert:'#define LineTypeSolid 0.0\r\n#define LineTypeDash 1.0\r\n#define Animate 0.0\r\n\r\nattribute float a_Miter;\r\nattribute vec4 a_Color;\r\nattribute vec2 a_Size;\r\nattribute vec3 a_Normal;\r\nattribute vec3 a_Position;\r\n\r\nattribute vec2 a_iconMapUV;\r\n\r\n// dash line\r\nattribute float a_Total_Distance;\r\nattribute vec2 a_DistanceAndIndex;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\r\n\r\nuniform float u_vertexScale: 1.0;\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nvarying vec4 v_color;\r\nvarying vec4 v_dash_array;\r\nvarying float v_d_distance_ratio;\r\n\r\n\r\nvoid main() {\r\n\r\n  v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / a_Total_Distance;\r\n  v_color = vec4(a_Color.xyz, a_Color.w * opacity);\r\n\r\n  vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);\r\n  vec2 offset = project_pixel(size.xy);\r\n  v_d_distance_ratio = a_DistanceAndIndex.x / a_Total_Distance;\r\n\r\n\r\n  vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\r\n\r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xy + offset, project_pixel(a_Size.y), 1.0));\r\n  } else {\r\n    float lineHeight = a_Size.y;\r\n \r\n    // #define COORDINATE_SYSTEM_P20 5.0\r\n    // #define COORDINATE_SYSTEM_P20_OFFSET 6.0\r\n    // amap1.x\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n      // 保持高度相对不变\r\n      lineHeight *= pow(2.0, 20.0 - u_Zoom);\r\n    }\r\n\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight, 1.0));\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',type:"Dash"}:t&&r?{frag:'varying vec4 v_color;\r\nvarying vec4 v_texture_data;\r\nuniform float u_linearDir: 1.0;\r\nuniform float u_linearColor: 0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_opacity: 1.0;\r\n\r\n#pragma include "picking"\r\n\r\n\r\nvoid main() {\r\n  float linearRadio = v_texture_data.r; // 当前点位距离占线总长的比例\r\n  if(u_linearDir < 1.0) {\r\n    linearRadio = v_texture_data.a;\r\n  }\r\n\r\n  if(u_linearColor == 1.0) { // 使用渐变颜色\r\n    gl_FragColor = mix(u_sourceColor, u_targetColor, linearRadio);\r\n    gl_FragColor.a *= v_color.a;\r\n  } else { // 使用 color 方法传入的颜色\r\n     gl_FragColor = v_color;\r\n  }\r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',vert:oH,type:"Linear"}:{frag:'// #extension GL_OES_standard_derivatives : enable\r\n#define Animate 0.0\r\n#define LineTexture 1.0\r\nuniform float u_textureBlend;\r\n\r\nuniform float u_borderWidth: 0.0;\r\n\r\nuniform vec3 u_blur;\r\nuniform vec4 u_borderColor;\r\nvarying vec4 v_color;\r\n\r\n// line texture\r\nuniform float u_line_texture;\r\nuniform sampler2D u_texture;\r\nuniform vec2 u_textSize;\r\nvarying vec2 v_iconMapUV;\r\nvarying vec4 v_texture_data;\r\n\r\n\r\n#pragma include "picking"\r\n\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1, 2., 1.0, 0.2 ]; // 控制运动\r\n// [animate, duration, interval, trailLength],\r\nvoid main() {\r\n  float animateSpeed = 0.0; // 运动速度\r\n  float d_distance_ratio = v_texture_data.r; // 当前点位距离占线总长的比例\r\n  gl_FragColor = v_color;\r\n  // anti-alias\r\n  // float blur = 1.0 - smoothstep(u_blur, 1., length(v_normal.xy));\r\n  if(u_animate.x == Animate) {\r\n      animateSpeed = u_time / u_animate.y;\r\n       float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed);\r\n      alpha = (alpha + u_animate.w -1.0) / u_animate.w;\r\n      alpha = smoothstep(0., 1., alpha);\r\n      gl_FragColor.a *= alpha;\r\n  }\r\n\r\n  if(u_line_texture == LineTexture) { // while load texture\r\n    float aDistance = v_texture_data.g;      // 当前顶点的距离\r\n    float d_texPixelLen = v_texture_data.b;  // 贴图的像素长度,根据地图层级缩放\r\n    float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed);\r\n    float v = v_texture_data.a;  // 线图层贴图部分的 v 坐标值\r\n\r\n    // v = max(smoothstep(0.95, 1.0, v), v);\r\n    vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\r\n     vec4 pattern = texture2D(u_texture, uv);\r\n\r\n    if(u_textureBlend == 0.0) { // normal\r\n      pattern.a = 0.0;\r\n      gl_FragColor += pattern;\r\n    } else { // replace\r\n        pattern.a *= v_color.a;\r\n        if(gl_FragColor.a <= 0.0) {\r\n          pattern.a = 0.0;\r\n        }\r\n        gl_FragColor = pattern;\r\n    }\r\n  } \r\n\r\n  float v = v_texture_data.a;\r\n  float borderWidth = min(0.5, u_borderWidth);\r\n  // 绘制 border\r\n  if(borderWidth > 0.01) {\r\n    float borderOuterWidth = borderWidth / 2.0;\r\n\r\n\r\n    if(v >= 1.0 - borderWidth || v <= borderWidth) {\r\n      if(v > borderWidth) { // 外侧\r\n        float linear = smoothstep(0.0, 1.0, (v - (1.0 - borderWidth))/borderWidth);\r\n        //  float linear = step(0.0, (v - (1.0 - borderWidth))/borderWidth);\r\n        gl_FragColor.rgb = mix(gl_FragColor.rgb, u_borderColor.rgb, linear);\r\n      } else if(v <= borderWidth) {\r\n        float linear = smoothstep(0.0, 1.0, v/borderWidth);\r\n        gl_FragColor.rgb = mix(u_borderColor.rgb, gl_FragColor.rgb, linear);\r\n      }\r\n    }\r\n\r\n    if(v < borderOuterWidth) {\r\n      gl_FragColor.a = mix(0.0, gl_FragColor.a, v/borderOuterWidth);\r\n    } else if(v > 1.0 - borderOuterWidth) {\r\n      gl_FragColor.a = mix(gl_FragColor.a, 0.0, (v - (1.0 - borderOuterWidth))/borderOuterWidth);\r\n    }\r\n  }\r\n\r\n  // blur\r\n  float blurV = v_texture_data.a;\r\n  if(blurV < 0.5) {\r\n    gl_FragColor.a *= mix(u_blur.r, u_blur.g, blurV/0.5);\r\n  } else {\r\n    gl_FragColor.a *= mix(u_blur.g, u_blur.b, (blurV - 0.5)/0.5);\r\n  }\r\n  \r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',vert:oH,type:""}}},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"distanceAndIndex",type:RD.Attribute,descriptor:{name:"a_DistanceAndIndex",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r,n,i,a){return void 0===a?[r[3],10]:[r[3],a]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:RD.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0],r[1]]:[r,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:RD.Attribute,descriptor:{name:"a_Miter",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.texture]||{x:0,y:0};return[r.x,r.y]}}})}}]),o}(PV),cH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"colorTexture",void 0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;e.colorTexture&&e.colorTexture.destroy();var r=jg(e.layer.getLayerConfig().rampColors);e.colorTexture=t({data:new Uint8Array(r.data),width:r.width,height:r.height,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE,min:rO.NEAREST,mag:rO.NEAREST,flipY:!1})})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.vertexHeightScale,i=void 0===n?20:n,a=e.raisingHeight,o=void 0===a?0:a,s=e.heightfixed,u=void 0!==s&&s,c=e.linearDir,l=void 0===c?OV.VERTICAL:c;return this.rendererService.getDirty()&&this.colorTexture.bind(),{u_linearDir:l===OV.VERTICAL?1:0,u_opacity:PB(r)?r:1,u_texture:this.colorTexture,u_heightfixed:Number(u),u_vertexScale:i,u_raisingHeight:Number(o)}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.updateTexture(),e.abrupt("return",this.buildModels());case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.colorTexture)||void 0===e||e.destroy()}},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.depth,n=void 0!==r&&r,this.layer.triangulation=vG,e.next=4,this.layer.buildLayerModel({moduleName:"lineRampColors",vertexShader:'\r\nattribute float a_Miter;\r\nattribute vec2 a_Size;\r\nattribute vec3 a_Normal;\r\nattribute vec3 a_Position;\r\n\r\n// dash line\r\nattribute float a_Total_Distance;\r\nattribute vec2 a_DistanceAndIndex;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\nuniform float u_heightfixed: 0.0;\r\nuniform float u_vertexScale: 1.0;\r\nuniform float u_raisingHeight: 0.0;\r\nuniform float u_opacity : 1.0;\r\nuniform sampler2D u_texture;\r\nuniform float u_linearDir: 1.0;\r\nvarying vec4 v_Color;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\n\r\nvoid main() {\r\n\r\n\r\n  vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);\r\n  \r\n  vec2 offset = project_pixel(size.xy);\r\n\r\n  float lineDistance = a_DistanceAndIndex.x;\r\n  float currentLinePointRatio = lineDistance / a_Total_Distance;\r\n \r\n\r\n  float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // 线横向偏移的距离(向两侧偏移的和)\r\n  float linePixelSize = project_pixel(a_Size.x) * 2.0;  // 定点位置偏移,按地图等级缩放后的距离 单侧 * 2\r\n  float texV = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值\r\n\r\n  float linearRadio =currentLinePointRatio; // 当前点位距离占线总长的比例\r\n  if(u_linearDir < 1.0) {\r\n    linearRadio = texV;\r\n  }\r\n\r\n  v_Color = texture2D(u_texture, vec2(linearRadio, 0.5));\r\n\r\n  v_Color.a *= u_opacity; // 全局透明度\r\n\r\n\r\n\r\n  vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\r\n\r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));\r\n\r\n  float h = float(a_Position.z) * u_vertexScale; // 线顶点的高度 - 兼容不存在第三个数值的情况 vertex height\r\n  float lineHeight = a_Size.y; // size 第二个参数代表的高度 [linewidth, lineheight]\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    lineHeight *= 0.2; // 保持和 amap/mapbox 一致的效果\r\n    h *= 0.2;\r\n    if(u_heightfixed < 1.0) {\r\n      lineHeight = project_pixel(a_Size.y);\r\n    }\r\n    gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0));\r\n  } else {\r\n    // mapbox -  amap\r\n    \r\n    // 兼容 mapbox 在线高度上的效果表现基本一致\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      // mapbox\r\n      // 保持高度相对不变\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      h *= mapboxZoomScale;\r\n      h += u_raisingHeight * mapboxZoomScale;\r\n      if(u_heightfixed > 0.0) {\r\n        lineHeight *= mapboxZoomScale;\r\n      }\r\n      \r\n    } else {\r\n      // amap\r\n      h += u_raisingHeight;\r\n      // lineHeight 顶点偏移高度\r\n      if(u_heightfixed < 1.0) {\r\n        lineHeight *= pow(2.0, 20.0 - u_Zoom);\r\n      }\r\n    }\r\n\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'\r\nvarying vec4 v_Color;\r\n#pragma include "picking"\r\nvoid main() {\r\n\r\n  gl_FragColor = v_Color; // 全局透明度\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',triangulation:vG,depth:{enable:n}});case 4:return a=e.sent,e.abrupt("return",[a]);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"distanceAndIndex",type:RD.Attribute,descriptor:{name:"a_DistanceAndIndex",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r,n,i,a){return void 0===a?[r[3],10]:[r[3],a]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:RD.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0],r[1]]:[r,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:RD.Attribute,descriptor:{name:"a_Miter",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[4]]}}})}}]),a}(PV),lH='attribute vec4 a_Color;\r\nattribute vec2 a_Size;\r\nattribute vec3 a_Position;\r\n\r\nattribute float a_Total_Distance;\r\nattribute float a_Distance;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\nuniform float u_opacity: 1.0;\r\nuniform float u_vertexScale: 1.0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\n\r\n\r\n\r\n#pragma include "projection"\r\n\r\nvarying vec4 v_color;\r\nvarying float v_distanceScale;\r\n\r\nvoid main() {\r\n\r\n  v_color = a_Color; \r\n  v_distanceScale = a_Distance / a_Total_Distance;\r\n  v_color = vec4(a_Color.xyz, a_Color.w * u_opacity); \r\n  vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\r\n\r\n  float h = float(a_Position.z) * u_vertexScale; // 线顶点的高度 - 兼容不存在第三个数值的情况\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xy, project_pixel(a_Size.y) + h * 0.2, 1.0));\r\n  } else {\r\n    float lineHeight = a_Size.y;\r\n    // 兼容 mapbox 在线高度上的效果表现基本一致\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      // 保持高度相对不变\r\n      h *= 2.0/pow(2.0, 20.0 - u_Zoom);\r\n    }\r\n\r\n    // #define COORDINATE_SYSTEM_P20 5.0\r\n    // #define COORDINATE_SYSTEM_P20_OFFSET 6.0\r\n    // amap1.x\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n      // 保持高度相对不变\r\n      lineHeight *= pow(2.0, 20.0 - u_Zoom);\r\n    }\r\n\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0));\r\n    gl_PointSize = 10.0;\r\n  }\r\n}\r\n',hH=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.sourceColor,i=e.targetColor,a=e.vertexHeightScale,o=void 0===a?20:a,s=0,u=[0,0,0,0],c=[0,0,0,0];return n&&i&&(u=zg(n),c=zg(i),s=1),{u_opacity:PB(r)?r:1,u_linearColor:s,u_sourceColor:u,u_targetColor:c,u_vertexScale:o}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getShaders",value:function(){var e=this.layer.getLayerConfig(),t=e.sourceColor,r=e.targetColor;return t&&r?{frag:"uniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float opacity;\r\nvoid main() {\r\n  gl_FragColor = mix(u_sourceColor, u_targetColor, v_distanceScale);\r\n  gl_FragColor.a *= opacity; // 全局透明度\r\n}\r\n",vert:lH,type:"lineSimpleLinear"}:{frag:"\r\nvarying vec4 v_color;\r\nvoid main() {\r\n  gl_FragColor = v_color;\r\n\r\n}\r\n",vert:lH,type:"lineSimpleNormal"}}},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getShaders(),r=t.frag,n=t.vert,a=t.type,e.next=3,this.layer.buildLayerModel({moduleName:a,vertexShader:n,fragmentShader:r,triangulation:mG,primitive:rO.LINES,depth:{enable:!1},pick:!1});case 3:return o=e.sent,e.abrupt("return",[o]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"distance",type:RD.Attribute,descriptor:{name:"a_Distance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[3]]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:RD.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0],r[1]]:[r,0]}}})}}]),a}(PV),fH={arc:ZG,arc3d:eH,greatcircle:aH,wall:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas()}),void e.layer.render();e.texture=t({data:e.iconService.getCanvas(),mag:rO.NEAREST,min:rO.NEAREST,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128})})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.sourceColor,i=e.targetColor,a=e.textureBlend,o=void 0===a?"normal":a,s=e.heightfixed,u=void 0!==s&&s,c=e.lineTexture,l=void 0!==c&&c,h=e.iconStep,f=void 0===h?100:h,p=e.iconStepCount,d=void 0===p?1:p;this.rendererService.getDirty()&&this.texture.bind();var v=0,g=[0,0,0,0],m=[0,0,0,0];return n&&i&&(g=zg(n),m=zg(i),v=1),{u_heightfixed:Number(u),u_opacity:PB(r)?r:1,u_textureBlend:"normal"===o?0:1,u_texture:this.texture,u_line_texture:l?1:0,u_iconStepCount:d,u_icon_step:f,u_textSize:[1024,this.iconService.canvasHeight||128],u_linearColor:v,u_sourceColor:g,u_targetColor:m}}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.updateTexture(),this.iconService.on("imageUpdate",this.updateTexture),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"lineWall",vertexShader:'#define Animate 0.0\r\n\r\nattribute float a_Miter;\r\nattribute vec4 a_Color;\r\nattribute vec2 a_Size;\r\nattribute vec3 a_Normal;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_iconMapUV;\r\nattribute float a_Total_Distance;\r\nattribute float a_Distance;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\nuniform float u_icon_step: 100;\r\nuniform float u_heightfixed;\r\nuniform float u_linearColor: 0;\r\n\r\n#pragma include "projection"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\n// texV 线图层 - 贴图部分的 v 坐标(线的宽度方向)\r\nvarying vec2 v_iconMapUV;\r\nvarying vec4 v_color;\r\nvarying float v_blur;\r\nvarying float v_radio;\r\nvarying vec4 v_dataset;\r\n\r\nvoid main() {\r\n\r\n\r\n  float d_distance_ratio; // 当前点位距离占线总长的比例\r\n  float d_texPixelLen;    // 贴图的像素长度,根据地图层级缩放\r\n\r\n  v_iconMapUV = a_iconMapUV;\r\n  if(u_heightfixed < 1.0) {     // 高度随 zoom 调整\r\n    d_texPixelLen = project_pixel(u_icon_step);\r\n  } else {\r\n    d_texPixelLen = u_icon_step;\r\n  }\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n    d_texPixelLen *= 10.0;\r\n  }\r\n\r\n  if(u_animate.x == Animate || u_linearColor == 1.0) {\r\n      d_distance_ratio = a_Distance / a_Total_Distance;\r\n  }\r\n\r\n  float miter = (a_Miter + 1.0)/2.0;\r\n  // 设置数据集的参数\r\n  v_dataset[0] = d_distance_ratio; // 当前点位距离占线总长的比例\r\n  v_dataset[1] = a_Distance;       // 当前顶点的距离\r\n  v_dataset[2] = d_texPixelLen;    // 贴图的像素长度,根据地图层级缩放\r\n  v_dataset[3] = miter;          // 线图层贴图部分的 v 坐标值 0 - 1\r\n\r\n  vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\r\n\r\n  float originSize = a_Size.x;  // 固定高度\r\n  if(u_heightfixed < 1.0) {     // 高度随 zoom 调整\r\n    originSize = project_float_pixel(a_Size.x);\r\n  }\r\n\r\n  float wallHeight = originSize * miter;\r\n  float lightWeight = calc_lighting(vec4(project_pos.xy, wallHeight, 1.0));\r\n\r\n  v_blur = min(project_float_pixel(2.0) / originSize, 0.05);\r\n  v_color = vec4(a_Color.rgb * lightWeight, a_Color.w);\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xy, wallHeight, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, wallHeight, 1.0));\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'#define Animate 0.0\r\n#define LineTexture 1.0\r\n\r\n// line texture\r\nuniform float u_line_texture;\r\nuniform sampler2D u_texture;\r\nuniform vec2 u_textSize;\r\nuniform float u_linearColor: 0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_opacity : 1.0;\r\nuniform float u_textureBlend;\r\nuniform float u_iconStepCount;\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ]; // 控制运动\r\n\r\nvarying vec2 v_iconMapUV;\r\nvarying float v_blur;\r\nvarying float v_radio;\r\nvarying vec4 v_color;\r\nvarying vec4 v_dataset;\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  float opacity = u_opacity;\r\n  float animateSpeed = 0.0; // 运动速度\r\n  float d_distance_ratio = v_dataset.r; // 当前点位距离占线总长的比例\r\n  float v = v_dataset.a;\r\n\r\n  if(u_linearColor == 1.0) { // 使用渐变颜色\r\n    gl_FragColor = mix(u_sourceColor, u_targetColor, v);\r\n  } else { // 使用 color 方法传入的颜色\r\n     gl_FragColor = v_color;\r\n  }\r\n\r\n  gl_FragColor.a *= opacity; // 全局透明度\r\n  if(u_animate.x == Animate) {\r\n      animateSpeed = u_time / u_animate.y;\r\n       float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed);\r\n      alpha = (alpha + u_animate.w -1.0) / u_animate.w;\r\n      alpha = smoothstep(0., 1., alpha);\r\n      gl_FragColor.a *= alpha;\r\n  }\r\n\r\n  if(u_line_texture == LineTexture) { // while load texture\r\n    float aDistance = v_dataset.g;      // 当前顶点的距离\r\n    float d_texPixelLen = v_dataset.b;  // 贴图的像素长度,根据地图层级缩放\r\n    float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed);\r\n    float v = v_dataset.a;  // 线图层贴图部分的 v 坐标值\r\n\r\n    // 计算纹理间隔 start\r\n    float flag = 0.0;\r\n    if(u > 1.0/u_iconStepCount) {\r\n      flag = 1.0;\r\n    }\r\n    u = fract(u*u_iconStepCount);\r\n    // 计算纹理间隔 end\r\n\r\n    vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\r\n    vec4 pattern = texture2D(u_texture, uv);\r\n\r\n    // Tip: 判断纹理间隔\r\n    if(flag > 0.0) {\r\n      pattern = vec4(0.0);\r\n    }\r\n\r\n    if(u_textureBlend == 0.0) { // normal\r\n      pattern.a = 0.0;\r\n      gl_FragColor = filterColor(gl_FragColor + pattern);\r\n    } else { // replace\r\n        pattern.a *= opacity;\r\n        if(gl_FragColor.a <= 0.0) {\r\n          pattern.a = 0.0;\r\n        }\r\n        gl_FragColor = filterColor(pattern);\r\n    }\r\n  }\r\n  \r\n\r\n  // blur - AA\r\n  if(v < v_blur) {\r\n    gl_FragColor.a = mix(0.0, gl_FragColor.a, v/v_blur);\r\n  } else if(v > 1.0 - v_blur) {\r\n    gl_FragColor.a = mix(gl_FragColor.a, 0.0, (v - (1.0 - v_blur))/v_blur);\r\n  }\r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',triangulation:vG,depth:{enable:!1},blend:this.getBlend()});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"distance",type:RD.Attribute,descriptor:{name:"a_Distance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[3]]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:RD.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0],r[1]]:[r,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:RD.Attribute,descriptor:{name:"a_Miter",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t,r){return[r[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.texture]||{x:0,y:0};return[r.x,r.y]}}})}}]),a}(PV),line:uH,simple:hH,linearline:cH,earthArc3d:rH,flowline:nH},pH=function(e){f(a,e);var t,r=x(a);function a(){var e;u(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return h(_(e=r.call.apply(r,[this].concat(n))),"type","LineLayer"),h(_(e),"enableShaderEncodeStyles",["opacity","offsets","stroke"]),h(_(e),"arrowInsertCount",0),h(_(e),"defaultSourceConfig",{data:[{lng1:100,lat1:30,lng2:130,lat2:30}],options:{parser:{type:"json",x:"lng1",y:"lat1",x1:"lng2",y1:"lat2"}}}),e}return l(a,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new fH[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getDefaultConfig",value:function(){return{line:{},linearline:{},simple:{},wall:{},arc3d:{blend:"additive"},arc:{blend:"additive"},greatcircle:{blend:"additive"},tileLine:{},earthArc3d:{},flowline:{}}[this.getModelType()]}},{key:"getModelType",value:function(){var e;if(this.layerType)return this.layerType;var t=this.styleAttributeService.getLayerStyleAttribute("shape");return(null==t||null===(e=t.scale)||void 0===e?void 0:e.field)||"line"}},{key:"processData",value:function(e){if("simple"!==this.getModelType())return e;var t=[];return e.map((function(e){if(Array.isArray(e.coordinates)&&Array.isArray(e.coordinates[0])&&Array.isArray(e.coordinates[0][0])){var r=n({},e);e.coordinates.map((function(e){t.push(n(n({},r),{},{coordinates:e}))}))}else t.push(e)})),t}}]),a}(kV);hn({target:"String",proto:!0},{repeat:j_});var dH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"raiseCount",0),h(_(e),"raiseRepeat",0),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.animateOption,r=void 0===t?{enable:!1,speed:.01,repeat:!1}:t,n=e.opacity,i=void 0===n?1:n,a=e.sourceColor,o=e.targetColor,s=e.pickLight,u=void 0!==s&&s,c=e.heightfixed,l=void 0!==c&&c,h=e.opacityLinear,f=void 0===h?{enable:!1,dir:"up"}:h,p=e.lightEnable,d=void 0===p||p,v=0,g=[0,0,0,0],m=[0,0,0,0];if(a&&o&&(g=zg(a),m=zg(o),v=1),this.raiseCount<1&&this.raiseRepeat>0&&r.enable){var y=r.speed,_=void 0===y?.01:y;this.raiseCount+=_,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}return{u_pickLight:Number(u),u_heightfixed:Number(l),u_r:r.enable&&this.raiseRepeat>0?this.raiseCount:1,u_opacity:PB(i)?i:1,u_linearColor:v,u_sourceColor:g,u_targetColor:m,u_opacitylinear:Number(f.enable),u_opacitylinear_dir:"up"===f.dir?1:0,u_lightEnable:Number(d)}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.animateOption.repeat,n=void 0===r?1:r,this.raiseRepeat=n,e.next=4,this.layer.buildLayerModel({moduleName:"pointEarthExtrude",vertexShader:'precision highp float;\r\n\r\n#define pi 3.1415926535\r\n#define ambientRatio 0.5\r\n#define diffuseRatio 0.3\r\n#define specularRatio 0.2\r\n\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Pos;\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Size;\r\nattribute vec3 a_Normal;\r\n\r\nuniform float u_heightfixed: 0.0; // 默认不固定\r\nuniform float u_globel;\r\nuniform float u_r;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nvarying vec4 v_color;\r\n\r\nuniform float u_opacity : 1;\r\nuniform float u_lightEnable: 1;\r\nvarying float v_lightWeight;\r\nvarying float v_barLinearZ;\r\n// 用于将在顶点着色器中计算好的样式值传递给片元\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\nfloat getYRadian(float x, float z) {\r\n  if(x > 0.0 && z > 0.0) {\r\n    return atan(x/z);\r\n  } else if(x > 0.0 && z <= 0.0){\r\n    return atan(-z/x) + pi/2.0;\r\n  } else if(x <= 0.0 && z <= 0.0) {\r\n    return  pi + atan(x/z); //atan(x/z) + \r\n  } else {\r\n    return atan(z/-x) + pi*3.0/2.0;\r\n  }\r\n}\r\n\r\nfloat getXRadian(float y, float r) {\r\n  return atan(y/r);\r\n}\r\n\r\nvoid main() {\r\n\r\n  \r\n  float textureOffset = 0.0; // 在 cell 中取值的偏移量\r\n\r\n  textureOffset = opacityAndOffset.g;\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n  vec3 size = a_Size * a_Position;\r\n\r\n  // a_Position.z 是在构建网格的时候传入的标准值 0 - 1,在插值器插值可以获取 0~1 线性渐变的值\r\n  v_barLinearZ =  a_Position.z;\r\n\r\n  vec3 offset = size; // 控制圆柱体的大小 - 从标准单位圆柱体进行偏移\r\n  if(u_heightfixed < 1.0) { // 圆柱体不固定高度\r\n    \r\n    if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n      // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\r\n      offset = offset * pow(2.0, (19.0 - u_Zoom));\r\n    }\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n      // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\r\n      offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom));\r\n    }\r\n  } else {// 圆柱体固定高度 ( 处理 mapbox )\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      offset *= 4.0/pow(2.0, 21.0 - u_Zoom);\r\n    }\r\n  }\r\n\r\n\r\n  vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));\r\n\r\n  // u_r 控制圆柱的生长\r\n  vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);\r\n\r\n  // 圆柱光照效果\r\n  float lightWeight = 1.0;\r\n  if(u_lightEnable > 0.0) { // 取消三元表达式,增强健壮性\r\n    lightWeight = calc_lighting(pos);\r\n  }\r\n  v_lightWeight = lightWeight;\r\n  // 设置圆柱的底色\r\n  if(u_linearColor == 1.0) { // 使用渐变颜色\r\n    v_color = mix(u_sourceColor, u_targetColor, barLinearZ);\r\n    v_color.rgb *= lightWeight;\r\n  } else { // 使用 color 方法传入的颜色\r\n     v_color = a_Color;\r\n  }\r\n  v_color.a *= u_opacity;\r\n\r\n    \r\n  // 在地球模式下,将原本垂直于 xy 平面的圆柱调整姿态到适应圆的角度\r\n  //旋转矩阵mx,创建绕x轴旋转矩阵\r\n  float r = sqrt(a_Pos.z*a_Pos.z + a_Pos.x*a_Pos.x);\r\n  float xRadian = getXRadian(a_Pos.y, r);\r\n  float xcos = cos(xRadian);//求解旋转角度余弦值\r\n  float xsin = sin(xRadian);//求解旋转角度正弦值\r\n  mat4 mx = mat4(\r\n    1,0,0,0,  \r\n    0,xcos,-xsin,0,  \r\n    0,xsin,xcos,0,  \r\n    0,0,0,1);\r\n\r\n  //旋转矩阵my,创建绕y轴旋转矩阵\r\n  float yRadian = getYRadian(a_Pos.x, a_Pos.z);\r\n  float ycos = cos(yRadian);//求解旋转角度余弦值\r\n  float ysin = sin(yRadian);//求解旋转角度正弦值\r\n  mat4 my = mat4(\r\n    ycos,0,-ysin,0,  \r\n    0,1,0,0,  \r\n    ysin,0,ycos,0,  \r\n    0,0,0,1);\r\n\r\n  gl_Position = u_ViewProjectionMatrix * vec4(( my * mx *  vec4(a_Position * a_Size, 1.0)).xyz + a_Pos, 1.0);\r\n  \r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'varying vec4 v_color;\r\nuniform float u_opacity: 1.0;\r\n\r\nuniform float u_pickLight: 0.0;\r\n\r\n#pragma include "picking"\r\n\r\n\r\nuniform float u_linearColor: 0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\n\r\nuniform float u_opacitylinear: 0.0;\r\nuniform float u_opacitylinear_dir: 1.0;\r\nvarying float v_lightWeight;\r\nvarying float v_barLinearZ;\r\nvoid main() {\r\n\r\n   gl_FragColor = v_color;\r\n\r\n  // 开启透明度渐变\r\n  if(u_opacitylinear > 0.0) {\r\n    gl_FragColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - v_barLinearZ): v_barLinearZ;\r\n  }\r\n\r\n  // picking\r\n  if(u_pickLight > 0.0) {\r\n    gl_FragColor = filterColorAlpha(gl_FragColor, v_lightWeight);\r\n  } else {\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n}\r\n',triangulation:pG,depth:{enable:!0},cull:{enable:!0,face:Kg(this.mapService.version)},blend:this.getBlend()});case 4:return a=e.sent,e.abrupt("return",[a]);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e){var t=e.size;if(t){var r=[];return Array.isArray(t)&&(r=2===t.length?[t[0],t[0],t[1]]:t),Array.isArray(t)||(r=[t,t,t]),r}return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:RD.Attribute,descriptor:{name:"a_Pos",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e){var t=kS(e.coordinates);return jV([t[0],t[1]])}}})}}]),a}(PV),vH=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.strokeOpacity,i=void 0===n?1:n,a=e.strokeWidth,o=void 0===a?0:a,s=e.stroke,u=void 0===s?"rgba(0,0,0,0)":s,c=e.blend,l=e.blur;return{u_blur:void 0===l?0:l,u_additive:"additive"===c?1:0,u_opacity:r,u_stroke_opacity:i,u_stroke_width:o,u_stroke_color:zg(u)}}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption,t=void 0===e?{enable:!1}:e;return{u_animate:this.animateOption2Array(t),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layer.triangulation=fG,e.next=3,this.layer.buildLayerModel({moduleName:"pointEarthFill",vertexShader:'attribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Extrude;\r\nattribute float a_Size;\r\nattribute float a_Shape;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\nvarying vec4 v_data;\r\nvarying vec4 v_color;\r\nvarying float v_radius;\r\n\r\nuniform float u_opacity : 1;\r\nuniform float u_stroke_opacity : 1;\r\nuniform float u_stroke_width : 2;\r\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\r\nuniform vec2 u_offsets;\r\n\r\nuniform float u_blur : 0.0;\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\n\r\nvoid main() {\r\n  vec3 extrude = a_Extrude;\r\n  float shape_type = a_Shape;\r\n  /*\r\n  *  setPickingSize 设置拾取大小\r\n  */\r\n  float newSize = setPickingSize(a_Size);\r\n  // float newSize = setPickingSize(a_Size) * 0.00001038445708445579;\r\n\r\n  // unpack color(vec2)\r\n  v_color = a_Color;\r\n\r\n  // radius(16-bit)\r\n  v_radius = newSize;\r\n\r\n  // anti-alias\r\n  //  float antialiased_blur = -max(u_blur, antialiasblur);\r\n  float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur);\r\n\r\n  // TODP: /abs(extrude.x) 是为了兼容地球模式\r\n  v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);\r\n\r\n\r\n  gl_Position = u_ViewProjectionMatrix * vec4(a_Position + extrude * newSize * 0.1 + u_offsets, 1.0);\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:"uniform float u_additive;\r\nuniform float u_opacity : 1;\r\nuniform float u_stroke_opacity : 1;\r\nuniform float u_stroke_width : 2;\r\n\r\nvarying vec4 v_data;\r\nvarying vec4 v_color;\r\nvarying float v_radius;\r\n\r\n#pragma include \"sdf_2d\"\r\n#pragma include \"picking\"\r\n\r\n\r\nvoid main() {\r\n  int shape = int(floor(v_data.w + 0.5));\r\n\r\n  vec4 strokeColor = textrueStroke == vec4(0) ? v_color : textrueStroke;\r\n\r\n  lowp float antialiasblur = v_data.z;\r\n  float r = v_radius / (v_radius + strokeWidth);\r\n\r\n  float outer_df;\r\n  float inner_df;\r\n  // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\r\n  if (shape == 0) {\r\n    outer_df = sdCircle(v_data.xy, 1.0);\r\n    inner_df = sdCircle(v_data.xy, r);\r\n  } else if (shape == 1) {\r\n    outer_df = sdEquilateralTriangle(1.1 * v_data.xy);\r\n    inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);\r\n  } else if (shape == 2) {\r\n    outer_df = sdBox(v_data.xy, vec2(1.));\r\n    inner_df = sdBox(v_data.xy, vec2(r));\r\n  } else if (shape == 3) {\r\n    outer_df = sdPentagon(v_data.xy, 0.8);\r\n    inner_df = sdPentagon(v_data.xy, r * 0.8);\r\n  } else if (shape == 4) {\r\n    outer_df = sdHexagon(v_data.xy, 0.8);\r\n    inner_df = sdHexagon(v_data.xy, r * 0.8);\r\n  } else if (shape == 5) {\r\n    outer_df = sdOctogon(v_data.xy, 1.0);\r\n    inner_df = sdOctogon(v_data.xy, r);\r\n  } else if (shape == 6) {\r\n    outer_df = sdHexagram(v_data.xy, 0.52);\r\n    inner_df = sdHexagram(v_data.xy, r * 0.52);\r\n  } else if (shape == 7) {\r\n    outer_df = sdRhombus(v_data.xy, vec2(1.0));\r\n    inner_df = sdRhombus(v_data.xy, vec2(r));\r\n  } else if (shape == 8) {\r\n    outer_df = sdVesica(v_data.xy, 1.1, 0.8);\r\n    inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);\r\n  }\r\n\r\n  if(outer_df > antialiasblur + 0.018) discard;\r\n\r\n  float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\r\n\r\n  float color_t = strokeWidth < 0.01 ? 0.0 : smoothstep(\r\n    antialiasblur,\r\n    0.0,\r\n    inner_df\r\n  );\r\n\r\n  if(strokeWidth < 0.01) {\r\n    gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);\r\n  } else {\r\n    gl_FragColor = mix(vec4(v_color.rgb, v_color.a * u_opacity), u_stroke_color * u_stroke_opacity, color_t);\r\n  }\r\n\r\n  if(u_additive > 0.0) {\r\n    gl_FragColor *= opacity_t;\r\n    gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\r\n  } else {\r\n    gl_FragColor.a *= opacity_t;\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n}\r\n",triangulation:fG,depth:{enable:!0},blend:this.getBlend()});case 3:return t=e.sent,e.abrupt("return",[t]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"animateOption2Array",value:function(e){return[e.enable?0:1,e.speed||1,e.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:RD.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n){var i=A(r,3),a=i[0],o=i[1],s=i[2],u=ux(0,0,1),c=ux(a,0,s),l=a>=0?xx(u,c):2*Math.PI-xx(u,c),h=2*Math.PI-Math.asin(o/100),f=Ab();Rb(f,f,l),Ob(f,f,h);var p=ux(1,1,0);bx(p,p,f),mx(p,p);var d=ux(-1,1,0);bx(d,d,f),mx(d,d);var v=ux(-1,-1,0);bx(v,v,f),mx(v,v);var g=ux(1,-1,0);bx(g,g,f),mx(g,g);var m=[].concat(T(p),T(d),T(v),T(g)),y=n%4*3;return[m[y],m[y+1],m[y+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?5:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:RD.Attribute,descriptor:{name:"a_Shape",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(t){var r=t.shape,n=void 0===r?2:r;return[e.layer.getLayerConfig().shape2d.indexOf(n)]}}})}}]),a}(PV),gH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"raiseCount",0),h(_(e),"raiseRepeat",0),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.animateOption,r=void 0===t?{enable:!1,speed:.01,repeat:!1}:t,n=e.opacity,i=void 0===n?1:n,a=e.sourceColor,o=e.targetColor,s=e.pickLight,u=void 0!==s&&s,c=e.heightfixed,l=void 0!==c&&c,h=e.opacityLinear,f=void 0===h?{enable:!1,dir:"up"}:h,p=e.lightEnable,d=void 0===p||p,v=0,g=[0,0,0,0],m=[0,0,0,0];if(a&&o&&(g=zg(a),m=zg(o),v=1),this.raiseCount<1&&this.raiseRepeat>0&&r.enable){var y=r.speed,_=void 0===y?.01:y;this.raiseCount+=_,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}return{u_pickLight:Number(u),u_heightfixed:Number(l),u_r:r.enable&&this.raiseRepeat>0?this.raiseCount:1,u_opacity:i,u_linearColor:v,u_sourceColor:g,u_targetColor:m,u_opacitylinear:Number(f.enable),u_opacitylinear_dir:"up"===f.dir?1:0,u_lightEnable:Number(d)}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.depth,n=void 0===r||r,a=t.animateOption.repeat,o=void 0===a?1:a,this.raiseRepeat=o,e.next=4,this.layer.buildLayerModel({moduleName:"pointExtrude",vertexShader:'precision highp float;\r\n\r\n#define pi 3.1415926535\r\n#define ambientRatio 0.5\r\n#define diffuseRatio 0.3\r\n#define specularRatio 0.2\r\n\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Pos;\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Size;\r\nattribute vec3 a_Normal;\r\n\r\nuniform float u_heightfixed: 0.0; // 默认不固定\r\nuniform float u_r;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nvarying vec4 v_color;\r\nvarying float v_lightWeight;\r\nvarying float v_barLinearZ;\r\n\r\nuniform float u_opacity : 1;\r\nuniform float u_lightEnable: 1;\r\nuniform float u_opacitylinear: 0.0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_opacitylinear_dir: 1.0;\r\nuniform float  u_linearColor: 0.0;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\nfloat getYRadian(float x, float z) {\r\n  if(x > 0.0 && z > 0.0) {\r\n    return atan(x/z);\r\n  } else if(x > 0.0 && z <= 0.0){\r\n    return atan(-z/x) + pi/2.0;\r\n  } else if(x <= 0.0 && z <= 0.0) {\r\n    return  pi + atan(x/z); //atan(x/z) + \r\n  } else {\r\n    return atan(z/-x) + pi*3.0/2.0;\r\n  }\r\n}\r\n\r\nfloat getXRadian(float y, float r) {\r\n  return atan(y/r);\r\n}\r\n\r\nvoid main() {\r\n\r\n\r\n  vec3 size = a_Size * a_Position;\r\n\r\n  vec3 offset = size; // 控制圆柱体的大小 - 从标准单位圆柱体进行偏移\r\n\r\n  if(u_heightfixed < 1.0) { // 圆柱体不固定高度\r\n    \r\n    if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\r\n      // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\r\n      offset = offset * pow(2.0, (19.0 - u_Zoom));\r\n    }\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\r\n      // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\r\n      offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom));\r\n    }\r\n  } else {// 圆柱体固定高度 ( 处理 mapbox )\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      offset *= 4.0/pow(2.0, 21.0 - u_Zoom);\r\n    }\r\n  }\r\n\r\n\r\n  vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));\r\n\r\n  // u_r 控制圆柱的生长\r\n  vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);\r\n\r\n  // // 圆柱光照效果\r\n  float lightWeight = 1.0;\r\n\r\n  if(u_lightEnable > 0.0) { // 取消三元表达式,增强健壮性\r\n    lightWeight = calc_lighting(pos);\r\n  }\r\n\r\n  v_lightWeight = lightWeight;\r\n\r\n  v_color = a_Color;\r\n\r\n    // 设置圆柱的底色\r\n  if(u_linearColor == 1.0) { // 使用渐变颜色\r\n    v_color = mix(u_sourceColor, u_targetColor, a_Position.z);\r\n    v_color.a =  v_color.a * u_opacity;\r\n  } else {\r\n    v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * u_opacity);\r\n  }\r\n\r\n    if(u_opacitylinear > 0.0) {\r\n    v_color.a *= u_opacitylinear_dir > 0.0 ? (1.0 - a_Position.z): a_Position.z;\r\n  }\r\n\r\n\r\n  // gl_Position = project_common_position_to_clipspace(pos);\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * pos;\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(pos);\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'varying vec4 v_color;\r\nvarying float v_lightWeight;\r\nuniform float u_pickLight: 0.0;\r\n\r\n#pragma include "picking"\r\n\r\n\r\nvoid main() {\r\n\r\n  gl_FragColor = v_color;\r\n  // 开启透明度渐变\r\n  // picking\r\n  if(u_pickLight > 0.0) {\r\n    gl_FragColor = filterColorAlpha(gl_FragColor, v_lightWeight);\r\n  } else {\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n}\r\n',triangulation:pG,cull:{enable:!0,face:Kg(this.mapService.version)},depth:{enable:n,range:[0,.9]}});case 4:return s=e.sent,e.abrupt("return",[s]);case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e){var t=e.size;if(t){var r=[];return Array.isArray(t)&&(r=2===t.length?[t[0],t[0],t[1]]:t),Array.isArray(t)||(r=[t,t,t]),r}return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:RD.Attribute,descriptor:{name:"a_Pos",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e){var t=kS(e.coordinates);return[t[0],t[1],0]}}})}}]),a}(PV),mH="\r\nuniform float u_additive;\r\n\r\n\r\nvarying vec4 v_data;\r\nvarying vec4 v_color;\r\nvarying float v_radius;\r\nuniform float u_time;\r\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\r\n\r\n#pragma include \"sdf_2d\"\r\n#pragma include \"picking\"\r\n\r\nvoid main() {\r\n\r\n  lowp float antialiasblur = v_data.z;\r\n  float r = v_radius / (v_radius);\r\n\r\n  float outer_df;\r\n  float inner_df;\r\n  // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\r\n  \r\n  outer_df = sdCircle(v_data.xy, 1.0);\r\n  inner_df = sdCircle(v_data.xy, r);\r\n\r\n\r\n  float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\r\n\r\n  float color_t = smoothstep(\r\n    antialiasblur,\r\n    0.0,\r\n    inner_df\r\n  );\r\n  float PI = 3.14159;\r\n  float N_RINGS = 3.0;\r\n  float FREQ = 1.0;\r\n\r\n  gl_FragColor = v_color;\r\n\r\n  float d = length(v_data.xy);\r\n  if(d > 0.5) {\r\n    discard;\r\n  }\r\n  float intensity = clamp(cos(d * PI), 0.0, 1.0) * clamp(cos(2.0 * PI * (d * 2.0 * u_animate.z - u_animate.y * u_time)), 0.0, 1.0);\r\n  \r\n  // 根据叠加模式选择效果\r\n  if(u_additive > 0.0) {\r\n    gl_FragColor *= intensity;\r\n    // 优化水波点 blend additive 模式下有的拾取效果 \r\n    gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\r\n  } else {\r\n    gl_FragColor = vec4(gl_FragColor.xyz, gl_FragColor.a * intensity);\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n}\r\n",yH='attribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Extrude;\r\nattribute float a_Size;\r\nattribute float a_Shape;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform int u_size_unit;\r\n\r\nvarying vec4 v_data;\r\nvarying vec4 v_color;\r\nvarying float v_radius;\r\nvarying vec4 v_stroke;\r\n\r\n// uniform float u_opacity : 1;\r\nuniform float u_stroke_width: 2;\r\nuniform vec3 u_blur_height_fixed: [0, 0, 0];\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\n\r\nvoid main() {\r\n  // 透明度计算\r\n  v_stroke = stroke;  \r\n  vec3 extrude = a_Extrude;\r\n  float shape_type = a_Shape;\r\n  /*\r\n  *  setPickingSize 设置拾取大小\r\n  *  u_meter2coord 在等面积大小的时候设置单位\r\n  */\r\n  float newSize = setPickingSize(a_Size);\r\n  // float newSize = setPickingSize(a_Size) * 0.00001038445708445579;\r\n\r\n\r\n\r\n  // unpack color(vec2)\r\n  v_color = vec4(a_Color.xyz, a_Color.w * opacity);\r\n\r\n  if(u_size_unit == 1) {\r\n    newSize = newSize  * u_PixelsPerMeter.z;\r\n  }\r\n\r\n   v_radius = newSize;\r\n\r\n  // anti-alias\r\n  //  float antialiased_blur = -max(u_blur, antialiasblur);\r\n  float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur_height_fixed.x);\r\n\r\n  vec2 offset = (extrude.xy * (newSize + u_stroke_width) + u_offsets);\r\n  vec3 aPosition = a_Position;\r\n\r\n  offset = project_pixel(offset);\r\n  \r\n  // TODP: /abs(extrude.x) 是为了兼容地球模式\r\n  v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);\r\n\r\n\r\n  // vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));\r\n  vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));\r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));\r\n\r\n  float raisingHeight = u_blur_height_fixed.y;\r\n\r\n  if(u_blur_height_fixed.z < 1.0) { // false\r\n    raisingHeight = project_pixel(u_blur_height_fixed.y);\r\n  } else {\r\n     if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      raisingHeight = u_blur_height_fixed.y * mapboxZoomScale;\r\n    }\r\n  }\r\n \r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));\r\n  }\r\n \r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',_H=function(e){f(o,e);var t,r,a=x(o);function o(){return u(this,o),a.apply(this,arguments)}return l(o,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.strokeOpacity,r=void 0===t?1:t,i=e.strokeWidth,a=void 0===i?0:i,o=e.blend,s=e.blur,u=void 0===s?0:s,c=e.raisingHeight,l=void 0===c?0:c,h=e.heightfixed,f=void 0!==h&&h,p=e.unit,d=void 0===p?"pixel":p;return n({u_blur_height_fixed:[u,Number(l),Number(f)],u_additive:"additive"===o?1:0,u_stroke_opacity:r,u_stroke_width:a,u_size_unit:LV[d]},this.getStyleAttribute())}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption,t=void 0===e?{enable:!1}:e;return{u_animate:this.animateOption2Array(t),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),bT)}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.animateOption,n=void 0===r?{enable:!1}:r,a=this.getShaders(n),o=a.frag,s=a.vert,u=a.type,this.layer.triangulation=bT,e.next=5,this.layer.buildLayerModel({moduleName:u,vertexShader:s,fragmentShader:o,inject:this.getInject(),triangulation:bT,depth:{enable:!1}});case 5:return c=e.sent,e.abrupt("return",[c]);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getShaders",value:function(e){if(!e.enable)return{frag:"uniform float u_additive;\r\nuniform float u_stroke_opacity : 1;\r\nuniform float u_stroke_width : 2;\r\n\r\nvarying vec4 v_data;\r\nvarying vec4 v_color;\r\nvarying float v_radius;\r\nvarying vec4 v_stroke;\r\n\r\n\r\n#pragma include \"sdf_2d\"\r\n#pragma include \"picking\"\r\n\r\n\r\nvoid main() {\r\n  int shape = int(floor(v_data.w + 0.5));\r\n  lowp float antialiasblur = v_data.z;\r\n  float r = v_radius / (v_radius + u_stroke_width);\r\n\r\n  float outer_df;\r\n  float inner_df;\r\n  // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\r\n  if (shape == 0) {\r\n    outer_df = sdCircle(v_data.xy, 1.0);\r\n    inner_df = sdCircle(v_data.xy, r);\r\n  } else if (shape == 1) {\r\n    outer_df = sdEquilateralTriangle(1.1 * v_data.xy);\r\n    inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);\r\n  } else if (shape == 2) {\r\n    outer_df = sdBox(v_data.xy, vec2(1.));\r\n    inner_df = sdBox(v_data.xy, vec2(r));\r\n  } else if (shape == 3) {\r\n    outer_df = sdPentagon(v_data.xy, 0.8);\r\n    inner_df = sdPentagon(v_data.xy, r * 0.8);\r\n  } else if (shape == 4) {\r\n    outer_df = sdHexagon(v_data.xy, 0.8);\r\n    inner_df = sdHexagon(v_data.xy, r * 0.8);\r\n  } else if (shape == 5) {\r\n    outer_df = sdOctogon(v_data.xy, 1.0);\r\n    inner_df = sdOctogon(v_data.xy, r);\r\n  } else if (shape == 6) {\r\n    outer_df = sdHexagram(v_data.xy, 0.52);\r\n    inner_df = sdHexagram(v_data.xy, r * 0.52);\r\n  } else if (shape == 7) {\r\n    outer_df = sdRhombus(v_data.xy, vec2(1.0));\r\n    inner_df = sdRhombus(v_data.xy, vec2(r));\r\n  } else if (shape == 8) {\r\n    outer_df = sdVesica(v_data.xy, 1.1, 0.8);\r\n    inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);\r\n  }\r\n\r\n  float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\r\n\r\n  float color_t = u_stroke_width < 0.01 ? 0.0 : smoothstep(\r\n    antialiasblur,\r\n    0.0,\r\n    inner_df\r\n  );\r\n\r\n  if(u_stroke_width < 0.01) {\r\n    gl_FragColor = v_color;\r\n  } else {\r\n    gl_FragColor = mix(v_color, v_stroke * u_stroke_opacity, color_t);\r\n  }\r\n\r\n  if(u_additive > 0.0) {\r\n    gl_FragColor *= opacity_t;\r\n    gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\r\n  } else {\r\n    gl_FragColor.a *= opacity_t;\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n   // 作为 mask 模板时需要丢弃透明的像素\r\n  if(gl_FragColor.a < 0.01) {\r\n    discard;\r\n  } \r\n}\r\n",vert:yH,type:"pointFill"};switch(e.type){case"wave":default:return{frag:mH,vert:yH,type:"pointWave"}}}},{key:"animateOption2Array",value:function(e){return[e.enable?0:1,e.speed||1,e.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var e=this.layer.getLayerConfig().shape2d;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:RD.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n){var i=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],a=n%4*3;return[i[a],i[a+1],i[a+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?5:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:RD.Attribute,descriptor:{name:"a_Shape",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(t){var r=t.shape,n=void 0===r?2:r;return[e.indexOf(n)]}}})}}]),o}(PV),bH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"meter2coord",1),h(_(e),"texture",void 0),h(_(e),"isMeter",!1),h(_(e),"radian",0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas(),mag:"linear",min:"linear mipmap nearest",mipmap:!0}),void e.layerService.throttleRenderLayers();e.texture=t({data:e.iconService.getCanvas(),mag:rO.LINEAR,min:rO.LINEAR_MIPMAP_LINEAR,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128,mipmap:!0})})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.offsets,i=void 0===n?[0,0]:n,a=e.rotation,o=e.raisingHeight,s=void 0===o?0:o,u=e.heightfixed,c=void 0!==u&&u,l=e.unit,h=void 0===l?"pixel":l;this.rendererService.getDirty()&&this.texture.bind();var f=1;return"GAODE2.x"!==this.mapService.version&&"GAODE1.x"!==this.mapService.version||(f=-1),this.radian=void 0!==a?f*Math.PI*a/180:f*Math.PI*(this.mapService.getRotation()%360)/180,{u_raisingHeight:Number(s),u_heightfixed:Number(c),u_size_unit:LV[h],u_RotateMatrix:new Float32Array([Math.cos(this.radian),Math.sin(this.radian),-Math.sin(this.radian),Math.cos(this.radian)]),u_texture:this.texture,u_textSize:[1024,this.iconService.canvasHeight||128],u_opacity:r,u_offsets:i}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),hG)}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.iconService.on("imageUpdate",this.updateTexture),this.updateTexture(),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"pointFillImage",vertexShader:'attribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Extrude;\r\nattribute float a_Size;\r\nattribute vec2 a_Uv;\r\nattribute float a_Rotate;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform mat2 u_RotateMatrix;\r\nuniform int u_size_unit;\r\n\r\nvarying vec2 v_uv; // 本身的 uv 坐标\r\nvarying vec2 v_Iconuv; // icon 贴图的 uv 坐标\r\n\r\nuniform float u_raisingHeight: 0.0;\r\nuniform float u_heightfixed: 0.0;\r\nuniform float u_opacity : 1;\r\nuniform vec2 u_offsets;\r\n\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  vec3 extrude = a_Extrude;\r\n  v_uv = (a_Extrude.xy + 1.0)/2.0;\r\n  v_uv.y = 1.0 - v_uv.y;\r\n  v_Iconuv = a_Uv;\r\n\r\n\r\n  highp float angle_sin = sin(a_Rotate);\r\n  highp float angle_cos = cos(a_Rotate);\r\n  mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\r\n  float newSize = a_Size;\r\n  if(u_size_unit == 1) {\r\n    newSize = newSize  * u_PixelsPerMeter.z;\r\n  }\r\n\r\n  // vec2 offset = (u_RotateMatrix * extrude.xy * (a_Size) + textrueOffsets);\r\n  vec2 offset = (rotation_matrix * u_RotateMatrix * extrude.xy * (newSize) + u_offsets);\r\n  vec3 aPosition = a_Position;\r\n\r\n  offset = project_pixel(offset);\r\n\r\n  vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));\r\n  float raisingHeight = u_raisingHeight;\r\n  if(u_heightfixed < 1.0) { // height fixed\r\n    raisingHeight = project_pixel(u_raisingHeight);\r\n  } else {\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      raisingHeight = u_raisingHeight * mapboxZoomScale;\r\n    }\r\n  }\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp *vec4(project_pos.xy + offset, raisingHeight, 1.0);\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));\r\n  }\r\n \r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'uniform sampler2D u_texture;\r\nuniform vec2 u_textSize;\r\nuniform float u_opacity : 1;\r\n\r\n#pragma include "sdf_2d"\r\n#pragma include "picking"\r\nvarying vec2 v_uv; // 本身的 uv 坐标\r\nvarying vec2 v_Iconuv;\r\n\r\nvoid main() {\r\n\r\n  vec2 pos = v_Iconuv / u_textSize + v_uv / u_textSize * 64.;\r\n  gl_FragColor = texture2D(u_texture, pos);\r\n  gl_FragColor.a *= u_opacity;\r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',triangulation:hG,depth:{enable:!1,range:[0,.9]},cull:{enable:!0,face:Kg(this.mapService.version)}});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){var e;this.iconService.off("imageUpdate",this.updateTexture),null===(e=this.texture)||void 0===e||e.destroy()}},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"rotate",type:RD.Attribute,descriptor:{name:"a_Rotate",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.rotate,r=void 0===t?0:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.shape]||{x:-64,y:-64};return[r.x,r.y]}}}),this.styleAttributeService.registerStyleAttribute({name:"extrude",type:RD.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n){var i=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],a=n%4*3;return[i[a],i[a+1],i[a+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?5:t;return Array.isArray(r)?[r[0]]:[r]}}})}}]),a}(PV),xH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"updateTexture",(function(){var t=e.rendererService.createTexture2D;if(e.texture)return e.texture.update({data:e.iconService.getCanvas(),mag:"linear",min:"linear mipmap nearest",mipmap:!0}),void setTimeout((function(){e.layerService.throttleRenderLayers()}));e.texture=t({data:e.iconService.getCanvas(),mag:rO.LINEAR,min:rO.LINEAR_MIPMAP_LINEAR,premultiplyAlpha:!1,width:1024,height:e.iconService.canvasHeight||128,mipmap:!0})})),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.offsets,i=void 0===n?[0,0]:n,a=e.raisingHeight,o=void 0===a?0:a,s=e.heightfixed,u=void 0!==s&&s;return this.rendererService.getDirty()&&this.texture.bind(),{u_raisingHeight:Number(o),u_heightfixed:Number(u),u_texture:this.texture,u_textSize:[1024,this.iconService.canvasHeight||128],u_opacity:r,u_offsets:i}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.iconService.on("imageUpdate",this.updateTexture),this.updateTexture(),e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.iconService.off("imageUpdate",this.updateTexture)}},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"pointImage",vertexShader:'precision highp float;\r\nattribute vec3 a_Position;\r\nattribute vec4 a_Color;\r\nattribute vec2 a_Uv;\r\nattribute float a_Size;\r\nvarying vec4 v_color;\r\nvarying vec2 v_uv;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform vec2 u_offsets;\r\n\r\nuniform float u_opacity : 1;\r\nuniform float u_raisingHeight: 0.0;\r\nuniform float u_heightfixed: 0.0;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n  v_color = a_Color;\r\n  v_uv = a_Uv;\r\n  vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n   \r\n  vec2 offset = project_pixel(u_offsets);\r\n\r\n  float raisingHeight = u_raisingHeight;\r\n  if(u_heightfixed < 1.0) { // false\r\n    raisingHeight = project_pixel(u_raisingHeight);\r\n  } else {\r\n     if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      raisingHeight = u_raisingHeight * mapboxZoomScale;\r\n    }\r\n  }\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));\r\n  }\r\n\r\n  gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'\r\nuniform sampler2D u_texture;\r\nvarying vec4 v_color;\r\nvarying vec2 v_uv;\r\nuniform vec2 u_textSize;\r\nuniform float u_opacity : 1;\r\n\r\n#pragma include "picking"\r\n\r\nvoid main(){\r\n      vec2 pos = v_uv / u_textSize + gl_PointCoord / u_textSize * 64.;\r\n      vec4 textureColor;\r\n\r\n      // Y = 0.299R + 0.587G + 0.114B // 亮度提取\r\n     \r\n      textureColor = texture2D(u_texture, pos);\r\n\r\n      // Tip: 去除边缘部分 mipmap 导致的混合变暗\r\n      float fragmengTocenter = distance(vec2(0.5), gl_PointCoord);\r\n      if(fragmengTocenter >= 0.5) {\r\n            float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b;\r\n            textureColor.a *= luma;\r\n      }\r\n      \r\n      \r\n\r\n      if(all(lessThan(v_color, vec4(1.0+0.00001))) && all(greaterThan(v_color, vec4(1.0-0.00001))) || v_color==vec4(1.0)){\r\n            gl_FragColor= textureColor;\r\n      }else {\r\n            gl_FragColor= step(0.01, textureColor.z) * v_color;\r\n      }\r\n\r\n      gl_FragColor.a = gl_FragColor.a * u_opacity;\r\n      \r\n      if (gl_FragColor.a < 0.01) {\r\n         discard;\r\n      }\r\n      gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',triangulation:dG,depth:{enable:!1},primitive:rO.POINTS});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?5:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(t){var r=e.iconService.getIconMap()[t.shape]||{x:-64,y:-64};return[r.x,r.y]}}})}}]),a}(PV);function SH(e){var t=e.coordinates;return{vertices:T(t),indices:[0],size:t.length}}var EH=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig().opacity,t=void 0===e?1:e;return{u_opacity:PB(t)?t:1}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layer.triangulation=SH,e.next=3,this.layer.buildLayerModel({moduleName:"pointNormal",vertexShader:'\r\nattribute vec3 a_Position;\r\nuniform mat4 u_ModelMatrix;\r\nuniform float u_opacity : 1;\r\nuniform mat4 u_Mvp;\r\nattribute float a_Size;\r\nattribute vec4 a_Color;\r\n\r\nvarying vec4 v_color;\r\n\r\n#pragma include "projection"\r\n#pragma include "project"\r\n\r\nvoid main() {\r\n  v_color = vec4(a_Color.xyz, a_Color.w * u_opacity);\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * vec4(a_Position.xy, a_Position.z, 1.0);\r\n  } else {\r\n    vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);\r\n    gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy),project_pos.z,project_pos.w));\r\n  }\r\n\r\n  gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\r\n}\r\n',fragmentShader:"varying vec4 v_color;\r\nvoid main() {\r\n  gl_FragColor = v_color;\r\n}\r\n",triangulation:SH,depth:{enable:!1},primitive:rO.POINTS,pick:!1});case 3:return t=e.sent,e.abrupt("return",[t]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}})}}]),a}(PV),AH=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.blend,i=e.speed,a=void 0===i?1:i,o=e.unit;return{u_size_unit:LV[void 0===o?"pixel":o],u_speed:a,u_additive:"additive"===n?1:0,u_opacity:r}}},{key:"getAnimateUniforms",value:function(){var e=this.layer.getLayerConfig().animateOption,t=void 0===e?{enable:!1}:e;return{u_animate:this.animateOption2Array(t),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),hG)}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"pointRadar",vertexShader:'attribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Extrude;\r\nattribute float a_Size;\r\nuniform float u_speed: 1.0;\r\nuniform float u_time;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform int u_size_unit;\r\n\r\nvarying vec4 v_data;\r\nvarying vec4 v_color;\r\nvarying float v_radius;\r\nvarying vec2 v_exteude;\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  vec3 extrude = a_Extrude;\r\n  float newSize = setPickingSize(a_Size);\r\n\r\n  float time = u_time * u_speed;\r\n  mat2 rotateMatrix = mat2( \r\n    cos(time), sin(time), \r\n    -sin(time), cos(time)\r\n  );\r\n  v_exteude = rotateMatrix * a_Extrude.xy;\r\n\r\n  // unpack color(vec2)\r\n  v_color = a_Color;\r\n\r\n\r\n\r\n  // anti-alias\r\n  float blur = 0.0;\r\n  float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur);\r\n\r\n  if(u_size_unit == 1) {\r\n    newSize = newSize  * u_PixelsPerMeter.z;\r\n  }\r\n  // radius(16-bit)\r\n  v_radius = newSize;\r\n\r\n  vec2 offset = (extrude.xy * (newSize));\r\n  vec3 aPosition = a_Position;\r\n  \r\n    // 不以米为实际单位\r\n  offset = project_pixel(offset);\r\n  \r\n  v_data = vec4(extrude.x, extrude.y, antialiasblur, -1.0);\r\n\r\n  vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp *vec4(project_pos.xy + offset, 0.0, 1.0);\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'\r\nuniform float u_additive;\r\nuniform float u_opacity: 1.0;\r\n\r\nvarying vec4 v_data;\r\nvarying vec4 v_color;\r\nvarying float v_radius;\r\nvarying vec2 v_exteude;\r\n#pragma include "sdf_2d"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n\r\n  lowp float antialiasblur = v_data.z;\r\n  float r = v_radius / (v_radius);\r\n\r\n  float outer_df = sdCircle(v_data.xy, 1.0);\r\n  float inner_df = sdCircle(v_data.xy, r);\r\n\r\n  float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\r\n\r\n  gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);\r\n\r\n  if(u_additive > 0.0) {\r\n    gl_FragColor *= opacity_t;\r\n  } else {\r\n    gl_FragColor.a *= opacity_t;\r\n  }\r\n\r\n  if(gl_FragColor.a > 0.0) {\r\n    gl_FragColor = filterColor(gl_FragColor);\r\n  }\r\n\r\n  vec2 extrude =  v_exteude;\r\n  vec2 dir = normalize(extrude);\r\n  vec2 baseDir = vec2(1.0, 0.0);\r\n  float pi = 3.14159265359;\r\n  // full circle\r\n  // float rades = dot(dir, baseDir);\r\n  // float flag = sign(dir.y);\r\n  // float radar_v = (flag - 1.0) * -0.5 + flag * acos(rades)/pi/2.0;\r\n  \r\n  // half circle\r\n  float flag = sign(dir.y);\r\n  float rades = dot(dir, baseDir);\r\n  float radar_v = (flag - 1.0) * -0.5 * acos(rades)/pi;\r\n  // simple AA\r\n  if(radar_v > 0.99) {\r\n    radar_v = 1.0 - (radar_v - 0.99)/0.01;\r\n  }\r\n\r\n  gl_FragColor.a *= radar_v;\r\n}\r\n',triangulation:hG,depth:{enable:!1}});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"animateOption2Array",value:function(e){return[e.enable?0:1,e.speed||1,e.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"extrude",type:RD.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n){var i=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],a=n%4*3;return[i[a],i[a+1],i[a+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?5:t;return Array.isArray(r)?[r[0]]:[r]}}})}}]),a}(PV);function TH(e){var t=e.coordinates;return{vertices:T(t),indices:[0],size:t.length}}var wH=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.offsets,i=void 0===n?[0,0]:n,a=e.blend,o=e.strokeOpacity,s=void 0===o?1:o,u=e.strokeWidth,c=void 0===u?0:u,l=e.stroke;return{u_additive:"additive"===a?1:0,u_opacity:r,u_offsets:i,u_stroke_opacity:s,u_stroke_width:c,u_stroke_color:zg(void 0===l?"#fff":l)}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layer.triangulation=TH,e.next=3,this.layer.buildLayerModel({moduleName:"pointSimple",vertexShader:'\r\nattribute vec3 a_Position;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nattribute float a_Size;\r\nattribute vec4 a_Color;\r\nvarying vec4 v_color;\r\n\r\nuniform float u_opacity : 1;\r\nuniform vec2 u_offsets;\r\nuniform float u_stroke_width;\r\n\r\nvarying float v_blur;\r\nvarying float v_innerRadius;\r\n\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n#pragma include "project"\r\nvoid main() {\r\n  v_color = vec4(a_Color.xyz, a_Color.w * u_opacity);\r\n  v_blur = 1.0 - max(2.0/a_Size, 0.05);\r\n  v_innerRadius = max((a_Size - u_stroke_width) / a_Size, 0.0);\r\n  \r\n  vec2 offset = project_pixel(u_offsets);\r\n  \r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * vec4(a_Position.xy + offset, a_Position.z, 1.0);\r\n  } else { // else\r\n    vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);\r\n    gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy+offset),project_pos.z,project_pos.w));\r\n  }\r\n\r\n  gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',fragmentShader:'\r\nuniform float u_additive;\r\nuniform float u_stroke_opacity : 1;\r\n\r\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\r\n\r\nvarying vec4 v_color;\r\nvarying float v_blur;\r\nvarying float v_innerRadius;\r\n\r\n#pragma include "picking"\r\nvoid main() {\r\n  vec2 center = vec2(0.5);\r\n\r\n  // Tip: 片元到中心点的距离 0 - 1\r\n  float fragmengTocenter = distance(center, gl_PointCoord) * 2.0;\r\n  // Tip: 片元的剪切成圆形\r\n  float circleClipOpacity = 1.0 - smoothstep(v_blur, 1.0, fragmengTocenter);\r\n\r\n\r\n  if(v_innerRadius < 0.99) {\r\n    // 当存在 stroke 且 stroke > 0.01\r\n    float blurWidth = (1.0 - v_blur)/2.0;\r\n    vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity);\r\n    if(fragmengTocenter > v_innerRadius + blurWidth) {\r\n      gl_FragColor = stroke;\r\n    } else if(fragmengTocenter > v_innerRadius - blurWidth){\r\n      float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0);\r\n      gl_FragColor = mix(v_color, stroke, mixR);\r\n    } else {\r\n      gl_FragColor = v_color;\r\n    }\r\n  } else {\r\n    // 当不存在 stroke 或 stroke <= 0.01\r\n    gl_FragColor = v_color;\r\n  }\r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n  \r\n  if(u_additive > 0.0) {\r\n    gl_FragColor *= circleClipOpacity;\r\n  } else {\r\n    gl_FragColor.a *= circleClipOpacity;\r\n  }\r\n\r\n}\r\n',triangulation:TH,depth:{enable:!1},primitive:rO.POINTS});case 3:return t=e.sent,e.abrupt("return",[t]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}})}}]),a}(PV),CH=function(){function e(t,r,n){u(this,e),h(this,"boxCells",[]),h(this,"xCellCount",void 0),h(this,"yCellCount",void 0),h(this,"boxKeys",void 0),h(this,"bboxes",void 0),h(this,"width",void 0),h(this,"height",void 0),h(this,"xScale",void 0),h(this,"yScale",void 0),h(this,"boxUid",void 0);var i=this.boxCells;this.xCellCount=Math.ceil(t/n),this.yCellCount=Math.ceil(r/n);for(var a=0;a<this.xCellCount*this.yCellCount;a++)i.push([]);this.boxKeys=[],this.bboxes=[],this.width=t,this.height=r,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/r,this.boxUid=0}return l(e,[{key:"insert",value:function(e,t,r,n,i){this.forEachCell(t,r,n,i,this.insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(t),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)}},{key:"query",value:function(e,t,r,n,i){return this.queryHitTest(e,t,r,n,!1,i)}},{key:"hitTest",value:function(e,t,r,n,i){return this.queryHitTest(e,t,r,n,!0,i)}},{key:"insertBoxCell",value:function(e,t,r,n,i,a){this.boxCells[i].push(a)}},{key:"queryHitTest",value:function(e,t,r,n,i,a){if(r<0||e>this.width||n<0||t>this.height)return!i&&[];var o=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s<this.boxKeys.length;s++)o.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});return a?o.filter(a):o}var u={hitTest:i,seenUids:{box:{},circle:{}}};return this.forEachCell(e,t,r,n,this.queryCell,o,u,a),i?o.length>0:o}},{key:"queryCell",value:function(e,t,r,n,i,a,o,s){var u=o.seenUids,c=this.boxCells[i];if(null!==c){var l,h=this.bboxes,f=k(c);try{for(f.s();!(l=f.n()).done;){var p=l.value;if(!u.box[p]){u.box[p]=!0;var d=4*p;if(e<=h[d+2]&&t<=h[d+3]&&r>=h[d+0]&&n>=h[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:h[d],y1:h[d+1],x2:h[d+2],y2:h[d+3]})}}}}catch(e){f.e(e)}finally{f.f()}}return!1}},{key:"forEachCell",value:function(e,t,r,n,i,a,o,s){for(var u=this.convertToXCellCoord(e),c=this.convertToYCellCoord(t),l=this.convertToXCellCoord(r),h=this.convertToYCellCoord(n),f=u;f<=l;f++)for(var p=c;p<=h;p++){var d=this.xCellCount*p+f;if(i.call(this,e,t,r,n,d,a,o,s))return}}},{key:"convertToXCellCoord",value:function(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}},{key:"convertToYCellCoord",value:function(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}}]),e}(),kH=function(){function e(t,r){u(this,e),h(this,"width",void 0),h(this,"height",void 0),h(this,"grid",void 0),h(this,"viewportPadding",100),h(this,"screenRightBoundary",void 0),h(this,"screenBottomBoundary",void 0),h(this,"gridRightBoundary",void 0),h(this,"gridBottomBoundary",void 0),this.width=t,this.height=r,this.viewportPadding=Math.max(t,r),this.grid=new CH(t+this.viewportPadding,r+this.viewportPadding,25),this.screenRightBoundary=t+this.viewportPadding,this.screenBottomBoundary=r+this.viewportPadding,this.gridRightBoundary=t+2*this.viewportPadding,this.gridBottomBoundary=r+2*this.viewportPadding}return l(e,[{key:"placeCollisionBox",value:function(e){var t=e.x1+e.anchorPointX+this.viewportPadding,r=e.y1+e.anchorPointY+this.viewportPadding,n=e.x2+e.anchorPointX+this.viewportPadding,i=e.y2+e.anchorPointY+this.viewportPadding;return!this.isInsideGrid(t,r,n,i)||this.grid.hitTest(t,r,n,i)?{box:[]}:{box:[t,r,n,i]}}},{key:"insertCollisionBox",value:function(e,t){var r={featureIndex:t};this.grid.insert(r,e[0],e[1],e[2],e[3])}},{key:"project",value:function(e,t,r){var n=yb(t,r,0,1),i=mb();return _b(i,n,wb.apply(Xb,T(e))),{x:(i[0]/i[3]+1)/2*this.width+this.viewportPadding,y:(-i[1]/i[3]+1)/2*this.height+this.viewportPadding}}},{key:"isInsideGrid",value:function(e,t,r,n){return r>=0&&e<this.gridRightBoundary&&n>=0&&t<this.gridBottomBoundary}}]),e}();function MH(e){var t=.5,r=.5;switch(e){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0;break;default:t=.5}switch(e){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0;break;default:r=.5}return{horizontalAlign:t,verticalAlign:r}}function PH(e,t,r,n,i){if(i){var a=e[n],o=a.glyph;if(o)for(var s=t[o].advance*a.scale,u=(e[n].x+s)*i,c=r;c<=n;c++)e[c].x-=u}}function IH(e,t,r,n,i,a,o){var s,u=(t-r)*i,c=(-n*o+.5)*a,l=k(e);try{for(l.s();!(s=l.n()).done;){var h=s.value;h.x+=u,h.y+=c}}catch(e){l.e(e)}finally{l.f()}}function OH(e,t,r,n,i,a,o){var s=0,u=-8,c=0,l=e.positionedGlyphs,h="right"===a?1:"left"===a?0:.5,f=l.length;r.forEach((function(e){if(e.split("").forEach((function(e){var r=t[e];r&&(l.push({glyph:e,x:s,y:u+0,vertical:!1,scale:1,metrics:r}),s+=r.advance+o)})),l.length!==f){var r=s-o;c=Math.max(r,c),PH(l,t,f,l.length-1,h)}s=0,u-=n+5}));var p=MH(i),d=p.horizontalAlign,v=p.verticalAlign;IH(l,h,d,v,c,n,r.length);var g=u- -8;e.top+=-v*g,e.bottom=e.top-g,e.left+=-d*c,e.right=e.left+c}function RH(e,t,r,n,i,a,o){var s=0,u=-8,c=0,l=e.positionedGlyphs,h="right"===a?1:"left"===a?0:.5,f=l.length;r.forEach((function(e){var r=t[e];if(r&&(l.push({glyph:e,x:r.advance/2,y:u+0,vertical:!1,scale:1,metrics:r}),s+=r.advance+o),l.length!==f){var i=s-o;c=Math.max(i,c),PH(l,t,f,l.length-1,h)}s=0,u-=n+5}));var p=MH(i),d=p.horizontalAlign,v=p.verticalAlign;IH(l,h,d,v,c,n,r.length);var g=u- -8;e.top+=-v*g,e.bottom=e.top-g,e.left+=-d*c,e.right=e.left+c}var LH='#define SDF_PX 8.0\r\n#define EDGE_GAMMA 0.105\r\n#define FONT_SIZE 48.0\r\nuniform sampler2D u_sdf_map;\r\nuniform float u_gamma_scale : 0.5;\r\nuniform float u_stroke_width : 2.0;\r\nuniform float u_halo_blur : 0.5;\r\nuniform float u_DevicePixelRatio;\r\n\r\nvarying vec4 v_color;\r\nvarying vec4 v_stroke_color;\r\nvarying vec2 v_uv;\r\nvarying float v_gamma_scale;\r\nvarying float v_fontScale;\r\n\r\n\r\n#pragma include "picking"\r\nvoid main() {\r\n  // get style data mapping\r\n\r\n  // get sdf from atlas\r\n  float dist = texture2D(u_sdf_map, v_uv).a;\r\n\r\n  lowp float buff = (6.0 - u_stroke_width / v_fontScale) / SDF_PX;\r\n  highp float gamma = (u_halo_blur * 1.19 / SDF_PX + EDGE_GAMMA) / (v_fontScale * u_gamma_scale) / 1.0;\r\n\r\n  highp float gamma_scaled = gamma * v_gamma_scale;\r\n\r\n  highp float alpha = smoothstep(buff - gamma_scaled, buff + gamma_scaled, dist);\r\n\r\n  gl_FragColor = mix(v_color, v_stroke_color, smoothstep(0., 0.5, 1.- dist));\r\n\r\n  gl_FragColor.a *= alpha;\r\n   // 作为 mask 模板时需要丢弃透明的像素\r\n  if (gl_FragColor.a < 0.01) {\r\n    discard;\r\n  }\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',NH='#define SDF_PX 8.0\r\n#define EDGE_GAMMA 0.105\r\n#define FONT_SIZE 24.0\r\nattribute vec3 a_Position;\r\nattribute vec2 a_tex;\r\nattribute vec2 a_textOffsets;\r\nattribute vec4 a_Color;\r\nattribute float a_Size;\r\nattribute float a_Rotate;\r\n\r\nuniform vec2 u_sdf_map_size;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float u_raisingHeight: 0.0;\r\n\r\nvarying vec2 v_uv;\r\nvarying float v_gamma_scale;\r\nvarying vec4 v_color;\r\nvarying vec4 v_stroke_color;\r\nvarying float v_fontScale;\r\n// uniform float u_opacity : 1;\r\nuniform float u_stroke_width : 2;\r\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n  \r\n  v_uv = a_tex / u_sdf_map_size;\r\n\r\n\r\n\r\n  v_color = vec4(a_Color.xyz, a_Color.w * opacity);\r\n  v_stroke_color = vec4(u_stroke_color.xyz, u_stroke_color.w * opacity);\r\n\r\n  // 文本缩放比例\r\n  float fontScale = a_Size / FONT_SIZE;\r\n  v_fontScale = fontScale;\r\n\r\n  vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n  // vec4 projected_position  = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n\r\n  highp float angle_sin = sin(a_Rotate);\r\n  highp float angle_cos = cos(a_Rotate);\r\n  mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\r\n  \r\n  // gl_Position = vec4(projected_position.xy / projected_position.w + rotation_matrix * a_textOffsets * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0);\r\n\r\n  float raiseHeight = u_raisingHeight;\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n    float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n    raiseHeight = u_raisingHeight * mapboxZoomScale;\r\n  }\r\n\r\n  vec4 projected_position;\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n   projected_position  = u_Mvp *(vec4(a_Position.xyz + vec3(0.0, 0.0, raiseHeight), 1.0));\r\n  } else { // else\r\n   projected_position  = project_common_position_to_clipspace(vec4(project_pos.xyz + vec3(0.0, 0.0, raiseHeight), 1.0));\r\n  }\r\n\r\n  gl_Position = vec4(\r\n    projected_position.xy / projected_position.w + rotation_matrix * a_textOffsets * fontScale / u_ViewportSize * 2.0 * u_DevicePixelRatio, 0.0, 1.0);\r\n  v_gamma_scale = gl_Position.w;\r\n  setPickingColor(a_PickingColor);\r\n\r\n}\r\n';function DH(e){var t=e.id,r=[],n=[];if(!this.glyphInfoMap||!this.glyphInfoMap[t])return{vertices:[],indices:[],size:7};var i=this.glyphInfoMap[t].centroid,a=2===i.length?[i[0],i[1],0]:i;return this.glyphInfoMap[t].glyphQuads.forEach((function(e,t){r.push.apply(r,T(a).concat([e.tex.x,e.tex.y+e.tex.height,e.tl.x,e.tl.y],T(a),[e.tex.x+e.tex.width,e.tex.y+e.tex.height,e.tr.x,e.tr.y],T(a),[e.tex.x+e.tex.width,e.tex.y,e.br.x,e.br.y],T(a),[e.tex.x,e.tex.y,e.bl.x,e.bl.y])),n.push(0+4*t,1+4*t,2+4*t,2+4*t,3+4*t,0+4*t)})),{vertices:r,indices:n,size:7}}var FH=function(e){f(p,e);var t,r,a,o,c=x(p);function p(){var e;u(this,p);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=c.call.apply(c,[this].concat(r))),"glyphInfo",void 0),h(_(e),"glyphInfoMap",{}),h(_(e),"rawEncodeData",void 0),h(_(e),"texture",void 0),h(_(e),"currentZoom",-1),h(_(e),"extent",void 0),h(_(e),"textureHeight",0),h(_(e),"textCount",0),h(_(e),"preTextStyle",{}),h(_(e),"mapping",s(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.initGlyph(),e.updateTexture(),t.next=4,e.reBuildModel();case 4:case"end":return t.stop()}}),t)})))),e}return l(p,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.stroke,r=void 0===t?"#fff":t,i=e.strokeWidth,a=void 0===i?0:i,o=e.halo,s=void 0===o?.5:o,u=e.gamma,c=void 0===u?2:u,l=e.raisingHeight,h=void 0===l?0:l,f=this.getFontServiceMapping(),p=this.getFontServiceCanvas();return f&&Object.keys(f).length!==this.textCount&&p&&(this.updateTexture(),this.textCount=Object.keys(f).length),this.preTextStyle=this.getTextStyle(),n({u_raisingHeight:Number(h),u_stroke_width:a,u_stroke_color:zg(r),u_sdf_map:this.texture,u_halo_blur:s,u_gamma_scale:c,u_sdf_map_size:[(null==p?void 0:p.width)||1,(null==p?void 0:p.height)||1]},this.getStyleAttribute())}},{key:"initModels",value:(o=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.bindEvent(),this.extent=this.textExtent(),this.rawEncodeData=this.layer.getEncodedData(),this.preTextStyle=this.getTextStyle(),e.abrupt("return",this.buildModels());case 5:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"buildModels",value:(a=s(i().mark((function e(){var t,r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),r=t.textAllowOverlap,n=void 0!==r&&r,this.initGlyph(),this.updateTexture(),n||this.filterGlyphs(),e.next=6,this.layer.buildLayerModel({moduleName:"pointText",vertexShader:NH,fragmentShader:LH,inject:this.getInject(),triangulation:DH.bind(this),depth:{enable:!1}});case 6:return a=e.sent,e.abrupt("return",[a]);case 8:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"needUpdate",value:(r=s(i().mark((function e(){var t,r,n,a,o,s,u,c,l,h,f,p;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.getTextStyle(),r=t.textAllowOverlap,n=void 0!==r&&r,a=t.textAnchor,o=void 0===a?"center":a,s=t.textOffset,u=t.padding,c=t.fontFamily,l=t.fontWeight,dU(u,this.preTextStyle.padding)&&dU(s,this.preTextStyle.textOffset)&&dU(o,this.preTextStyle.textAnchor)&&dU(c,this.preTextStyle.fontFamily)&&dU(l,this.preTextStyle.fontWeight)){e.next=5;break}return e.next=4,this.mapping();case 4:return e.abrupt("return",!0);case 5:if(!n){e.next=7;break}return e.abrupt("return",!1);case 7:if(h=this.mapService.getZoom(),f=this.mapService.getBounds(),p=SS(this.extent,f),!(Math.abs(this.currentZoom-h)>.5)&&p&&n===this.preTextStyle.textAllowOverlap){e.next=14;break}return e.next=13,this.reBuildModel();case 13:return e.abrupt("return",!0);case 14:return e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy(),this.layer.off("remapping",this.mapping)}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"rotate",type:RD.Attribute,descriptor:{name:"a_Rotate",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.rotate,r=void 0===t?0:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"textOffsets",type:RD.Attribute,descriptor:{name:"a_textOffsets",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[5],r[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?12:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"textUv",type:RD.Attribute,descriptor:{name:"a_tex",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}},{key:"bindEvent",value:function(){this.layer.isTileLayer||this.layer.on("remapping",this.mapping)}},{key:"textExtent",value:function(){return xS(this.mapService.getBounds(),.5)}},{key:"initTextFont",value:function(){var e=this.getTextStyle(),t=e.fontWeight,r=e.fontFamily,n=this.rawEncodeData,i=[];n.forEach((function(e){var t,r=e.shape,n=void 0===r?"":r,a=k(n=n.toString());try{for(a.s();!(t=a.n()).done;){var o=t.value;-1===i.indexOf(o)&&i.push(o)}}catch(e){a.e(e)}finally{a.f()}})),this.fontService.setFontOptions({characterSet:i,fontWeight:t,fontFamily:r,iconfont:!1})}},{key:"initIconFontTex",value:function(){var e=this.getTextStyle(),t=e.fontWeight,r=e.fontFamily,n=this.rawEncodeData,i=[];n.forEach((function(e){var t=e.shape,r=void 0===t?"":t;r="".concat(r),-1===i.indexOf(r)&&i.push(r)})),this.fontService.setFontOptions({characterSet:i,fontWeight:t,fontFamily:r,iconfont:!0})}},{key:"getTextStyle",value:function(){var e=this.layer.getLayerConfig(),t=e.fontWeight,r=void 0===t?"400":t,n=e.fontFamily,i=void 0===n?"sans-serif":n,a=e.textAllowOverlap,o=void 0!==a&&a,s=e.padding,u=void 0===s?[0,0]:s,c=e.textAnchor,l=void 0===c?"center":c,h=e.textOffset,f=void 0===h?[0,0]:h,p=e.opacity,d=void 0===p?1:p,v=e.strokeOpacity,g=void 0===v?1:v,m=e.strokeWidth,y=void 0===m?0:m,_=e.stroke;return{fontWeight:r,fontFamily:i,textAllowOverlap:o,padding:u,textAnchor:l,textOffset:f,opacity:d,strokeOpacity:g,strokeWidth:y,stroke:void 0===_?"#000":_}}},{key:"generateGlyphLayout",value:function(e){var t=this,r=this.getFontServiceMapping(),n=this.layer.getLayerConfig(),i=n.spacing,a=void 0===i?2:i,o=n.textAnchor,s=void 0===o?"center":o,u=n.textOffset,c=this.rawEncodeData;this.glyphInfo=c.map((function(n){var i=n.shape,o=void 0===i?"":i,c=n.id,l=n.size,h=void 0===l?1:l,f=n.textOffset?n.textOffset:u||[0,0],p=n.textAnchor?n.textAnchor:s||"center",d=function(e,t,r,n,i,a){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[0,0],s=arguments.length>7?arguments[7]:void 0,u=e.split("\n"),c=[],l={positionedGlyphs:c,top:o[1],bottom:o[1],left:o[0],right:o[0],lineCount:u.length,text:e};return s?RH(l,t,u,r,n,i,a):OH(l,t,u,r,n,i,a),!!c.length&&l}(o.toString(),r,h,p,"left",a,f,e),v=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],n=arguments.length>2?arguments[2]:void 0,i=e.positionedGlyphs,a=void 0===i?[]:i,o=[],s=k(a);try{for(s.s();!(t=s.n()).done;){var u=t.value,c=u.metrics,l=4,h=c.advance*u.scale/2,f=n?[u.x+h,u.y]:[0,0],p=n?[0,0]:[u.x+h+r[0],u.y+r[1]],d=(0-l)*u.scale-h+p[0],v=(0-l)*u.scale+p[1],g=d+c.width*u.scale,m=v+c.height*u.scale,y={x:d,y:v},_={x:g,y:v},b={x:d,y:m},x={x:g,y:m};o.push({tl:y,tr:_,bl:b,br:x,tex:c,glyphOffset:f})}}catch(e){s.e(e)}finally{s.f()}return o}(d,f,!1);return n.shaping=d,n.glyphQuads=v,n.centroid=kS(n.coordinates),n.originCentroid="GAODE2.x"===n.version||"MAPBOX"===n.version||"MAPLIBRE"===n.version?kS(n.originCoordinates):n.originCentroid=n.centroid,t.glyphInfoMap[c]={shaping:d,glyphQuads:v,centroid:kS(n.coordinates)},n}))}},{key:"getFontServiceMapping",value:function(){var e=this.layer.getLayerConfig(),t=e.fontWeight,r=void 0===t?"400":t,n=e.fontFamily,i=void 0===n?"sans-serif":n;return this.fontService.getMappingByKey("".concat(i,"_").concat(r))}},{key:"getFontServiceCanvas",value:function(){var e=this.layer.getLayerConfig(),t=e.fontWeight,r=void 0===t?"400":t,n=e.fontFamily,i=void 0===n?"sans-serif":n;return this.fontService.getCanvasByKey("".concat(i,"_").concat(r))}},{key:"filterGlyphs",value:function(){var e=this,t=this.layer.getLayerConfig(),r=t.padding,n=void 0===r?[0,0]:r,i=t.textAllowOverlap;if(!(void 0!==i&&i)){this.glyphInfoMap={},this.currentZoom=this.mapService.getZoom(),this.extent=this.textExtent();var a=this.rendererService.getViewportSize(),o=a.width,s=a.height,u=new kH(o,s);this.glyphInfo.filter((function(t){var r=t.shaping,i=t.id,a=void 0===i?0:i,o="GAODE2.x"===t.version||"MAPBOX"===t.version||"MAPLIBRE"===t.version?t.originCentroid:t.centroid,s=t.size/16,c=e.mapService.lngLatToContainer(o),l=u.placeCollisionBox({x1:r.left*s-n[0],x2:r.right*s+n[0],y1:r.top*s-n[1],y2:r.bottom*s+n[1],anchorPointX:c.x,anchorPointY:c.y}).box;return!(!l||!l.length)&&(u.insertCollisionBox(l,a),!0)})).forEach((function(t){e.glyphInfoMap[t.id]=t}))}}},{key:"initGlyph",value:function(){var e=this.layer.getLayerConfig().iconfont,t=void 0!==e&&e;t?this.initIconFontTex():this.initTextFont(),this.generateGlyphLayout(t)}},{key:"updateTexture",value:function(){var e=this.rendererService.createTexture2D,t=this.getFontServiceCanvas();this.textureHeight=t.height,this.texture&&this.texture.destroy(),this.texture=e({data:t,mag:rO.LINEAR,min:rO.LINEAR,width:t.width,height:t.height})}},{key:"reBuildModel",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.filterGlyphs(),e.next=3,this.layer.buildLayerModel({moduleName:"pointText",vertexShader:NH,fragmentShader:LH,triangulation:DH.bind(this),inject:this.getInject(),depth:{enable:!1}});case 3:t=e.sent,this.layer.models=[t];case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),p}(PV),zH={fillImage:bH,fill:_H,radar:AH,image:xH,normal:EH,simplePoint:wH,extrude:gH,text:FH,earthFill:vH,earthExtrude:dH},BH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"type","PointLayer"),h(_(e),"enableShaderEncodeStyles",["opacity","offsets","stroke"]),h(_(e),"enableDataEncodeStyles",["textOffset","textAnchor"]),h(_(e),"defaultSourceConfig",{data:[],options:{parser:{type:"json",x:"lng",y:"lat"}}}),e}return l(a,[{key:"buildModels",value:(r=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel&&this.layerModel.clearModels(),this.layerModel=new zH[t](this),e.next=5,this.initLayerModels();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"rebuildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.buildModels();case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getModelTypeWillEmptyData",value:function(){if(this.shapeOption){var e=this.shapeOption,t=e.field,r=e.values,n=this.getLayerConfig().shape2d,i=this.iconService.getIconMap();if(t&&-1!==(null==n?void 0:n.indexOf(t)))return"fill";if("text"===r)return"text";if(r&&r instanceof Array){var a,o=k(r);try{for(o.s();!(a=o.n()).done;){var s=a.value;if("string"==typeof s&&i.hasOwnProperty(s))return"image"}}catch(e){o.e(e)}finally{o.f()}}}return"normal"}},{key:"getDefaultConfig",value:function(){return{fillImage:{},normal:{blend:"additive"},radar:{},simplePoint:{},fill:{blend:"normal"},extrude:{},image:{},text:{blend:"normal"},tile:{},tileText:{},earthFill:{},earthExtrude:{}}[this.getModelType()]}},{key:"getModelType",value:function(){var e=this.getEncodedData(),t=this.getLayerConfig(),r=t.shape2d,n=t.shape3d,i=this.iconService.getIconMap(),a=e.find((function(e){return e.hasOwnProperty("shape")}));if(a){var o=a.shape;return"dot"===o?"normal":"simple"===o?"simplePoint":"radar"===o?"radar":"fillImage"===this.layerType?"fillImage":-1!==(null==r?void 0:r.indexOf(o))?"GLOBEL"===this.mapService.version?"earthFill":"fill":-1!==(null==n?void 0:n.indexOf(o))?"GLOBEL"===this.mapService.version?"earthExtrude":"extrude":i.hasOwnProperty(o)?"image":"text"}return this.getModelTypeWillEmptyData()}}]),a}(kV),UH=function(e){f(c,e);var t,r,a,o=x(c);function c(){var e;u(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=o.call.apply(o,[this].concat(r))),"texture",void 0),e}return l(c,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.heightfixed,r=void 0!==t&&t,i=e.raisingHeight,a=void 0===i?0:i,o=e.topsurface,s=void 0===o||o,u=e.sidesurface,c=void 0===u||u,l=e.sourceColor,h=e.targetColor,f=0,p=[1,1,1,1],d=[1,1,1,1];return l&&h&&(p=zg(l),d=zg(h),f=1),n({u_topsurface:Number(s),u_sidesurface:Number(c),u_heightfixed:Number(r),u_raisingHeight:Number(a),u_linearColor:f,u_sourceColor:p,u_targetColor:d,u_texture:this.texture},this.getStyleAttribute())}},{key:"initModels",value:(a=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadTexture();case 2:return e.abrupt("return",this.buildModels());case 3:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"buildModels",value:(r=s(i().mark((function e(){var t,r,n,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getShaders(),r=t.frag,n=t.vert,a=t.type,e.next=3,this.layer.buildLayerModel({moduleName:a,vertexShader:n,fragmentShader:r,inject:this.getInject(),triangulation:EG,depth:{range:[0,.9]}});case 3:return o=e.sent,e.abrupt("return",[o]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getShaders",value:function(){var e=this.layer.getLayerConfig(),t=e.pickLight;return e.mapTexture?{frag:'uniform sampler2D u_texture;\r\nuniform float u_opacity: 1.0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_linearColor: 0;\r\n\r\nuniform float u_topsurface: 1.0;\r\nuniform float u_sidesurface: 1.0;\r\n\r\nvarying vec4 v_Color;\r\nvarying vec3 v_uvs;\r\nvarying vec2 v_texture_data;\r\n\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  float opacity = u_opacity;\r\n  float isSide = v_texture_data.x;\r\n  float lightWeight = v_texture_data.y;\r\n  float topU = v_uvs[0];\r\n  float topV = 1.0 - v_uvs[1];\r\n  float sidey = v_uvs[2];\r\n  // Tip: 部分机型 GPU 计算精度兼容\r\n  if(isSide < 0.999) {// 是否是边缘\r\n    // side face\r\n    if(u_sidesurface < 1.0) {\r\n      discard;\r\n    }\r\n\r\n    if(u_linearColor == 1.0) {\r\n      vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\r\n      linearColor.rgb *= lightWeight;\r\n      gl_FragColor = linearColor;\r\n    } else {\r\n      gl_FragColor = v_Color;\r\n    }\r\n  } else {\r\n\r\n     // top face\r\n    if(u_topsurface < 1.0) {\r\n      discard;\r\n    }\r\n\r\n    gl_FragColor = texture2D(u_texture, vec2(topU, topV));\r\n    // gl_FragColor = vec4(1.0, 0., 0., 1.0);\r\n  }\r\n  \r\n\r\n  gl_FragColor.a *= opacity;\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',vert:'precision highp float;\r\n\r\n#define ambientRatio 0.5\r\n#define diffuseRatio 0.3\r\n#define specularRatio 0.2\r\n\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Normal;\r\nattribute float a_Size;\r\nattribute vec3 a_uvs;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform sampler2D u_texture;\r\n\r\n\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_topsurface: 1.0;\r\nuniform float u_sidesurface: 1.0;\r\nvarying vec4 v_Color;\r\nuniform float u_heightfixed: 0.0; // 默认不固定\r\nuniform float u_raisingHeight: 0.0;\r\nuniform float u_linearColor: 0.0;\r\n\r\nvarying vec2 v_texture_data;\r\nvarying vec3 v_uvs;\r\n\r\n#pragma include "projection"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n \r\n  vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\r\n  float lightWeight = calc_lighting(pos);\r\n  vec4 project_pos = project_position(pos);\r\n  v_uvs = a_uvs;\r\n\r\n  v_texture_data = vec2(a_Position.z, lightWeight);\r\n\r\n  if(u_heightfixed > 0.0) { // 判断几何体是否固定高度\r\n    project_pos.z = a_Position.z * a_Size;\r\n    project_pos.z += u_raisingHeight;\r\n\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      project_pos.z *= mapboxZoomScale;\r\n      project_pos.z += u_raisingHeight * mapboxZoomScale;\r\n    }\r\n  }\r\n\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    // gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n\r\n\r\n\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',type:"polygonExtrudeTexture"}:t?{frag:'uniform float u_opacity: 1.0;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_linearColor: 0;\r\n\r\nuniform float u_topsurface: 1.0;\r\nuniform float u_sidesurface: 1.0;\r\n\r\nvarying vec4 v_Color;\r\nvarying vec3 v_uvs;\r\nvarying vec2 v_texture_data;\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  float opacity = u_opacity;\r\n  float isSide =  v_texture_data.x;\r\n  float sidey = v_uvs[2];\r\n  float lightWeight = v_texture_data.y;\r\n\r\n  // Tip: 部分机型 GPU 计算精度兼容\r\n  if(isSide < 0.999) {\r\n    // side face\r\n    if(u_sidesurface < 1.0) {\r\n      discard;\r\n    }\r\n    \r\n    if( u_linearColor == 1.0) {\r\n      // side use linear\r\n      vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\r\n      linearColor.rgb *= lightWeight;\r\n      gl_FragColor = linearColor;\r\n    } else {\r\n      // side notuse linear\r\n       gl_FragColor = v_Color;\r\n    }\r\n  } else {\r\n    // top face\r\n    if(u_topsurface < 1.0) {\r\n      discard;\r\n    }\r\n    gl_FragColor = v_Color;\r\n  }\r\n\r\n  gl_FragColor.a *= opacity;\r\n  gl_FragColor = filterColorAlpha(gl_FragColor, lightWeight);\r\n}\r\n',vert:'precision highp float;\r\n\r\n#define ambientRatio 0.5\r\n#define diffuseRatio 0.3\r\n#define specularRatio 0.2\r\n\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Normal;\r\nattribute float a_Size;\r\nattribute vec3 a_uvs;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\nuniform float u_heightfixed: 0.0; // 默认不固定\r\nuniform float u_raisingHeight: 0.0;\r\n\r\nvarying vec2 v_texture_data;\r\nvarying vec3 v_uvs;\r\nvarying vec4 v_Color;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n\r\n\r\n  v_uvs = a_uvs;\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n  vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\r\n  vec4 project_pos = project_position(pos);\r\n\r\n  if(u_heightfixed > 0.0) { // 判断几何体是否固定高度\r\n    project_pos.z = a_Position.z * a_Size;\r\n    project_pos.z += u_raisingHeight;\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      project_pos.z *= mapboxZoomScale;\r\n      project_pos.z += u_raisingHeight * mapboxZoomScale;\r\n    }\r\n  }\r\n\r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    // gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n\r\n  float lightWeight = calc_lighting(pos);\r\n  v_texture_data = vec2(a_Position.z,lightWeight);\r\n\r\n  v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w);\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',type:"polygonExtrudePickLight"}:{frag:'uniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_linearColor: 0;\r\n\r\nuniform float u_topsurface: 1.0;\r\nuniform float u_sidesurface: 1.0;\r\n\r\nvarying vec4 v_Color;\r\n\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n\r\n\r\n     // top face\r\n    if(u_topsurface < 1.0) {\r\n      discard;\r\n    }\r\n\r\n    gl_FragColor = v_Color;\r\n  \r\n\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',vert:'precision highp float;\r\n\r\n#define ambientRatio 0.5\r\n#define diffuseRatio 0.3\r\n#define specularRatio 0.2\r\n\r\nattribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Normal;\r\nattribute float a_Size;\r\nattribute vec3 a_uvs;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform vec4 u_sourceColor;\r\nuniform vec4 u_targetColor;\r\nuniform float u_linearColor: 0;\r\n\r\nuniform float u_topsurface: 1.0;\r\nuniform float u_sidesurface: 1.0;\r\n\r\nvarying vec4 v_Color;\r\nuniform float u_heightfixed: 0.0; // 默认不固定\r\nuniform float u_raisingHeight: 0.0;\r\n\r\n#pragma include "projection"\r\n#pragma include "light"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n \r\n float isSide = a_Position.z;\r\n float topU = a_uvs[0];\r\n float topV = 1.0 - a_uvs[1];\r\n float sidey = a_uvs[2];\r\n\r\n  vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\r\n  float lightWeight = calc_lighting(pos);\r\n\r\n  vec4 project_pos = project_position(pos);\r\n\r\n  if(u_heightfixed > 0.0) { // 判断几何体是否固定高度\r\n    project_pos.z = a_Position.z * a_Size;\r\n    project_pos.z += u_raisingHeight;\r\n\r\n    if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET) {\r\n      float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n      project_pos.z *= mapboxZoomScale;\r\n      project_pos.z += u_raisingHeight * mapboxZoomScale;\r\n    }\r\n  }\r\n\r\n\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    // gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n\r\n  // Tip: 部分机型 GPU 计算精度兼容\r\n  if(isSide < 0.999) {\r\n    // side face\r\n    // if(u_sidesurface < 1.0) {\r\n    //   discard;\r\n    // }\r\n\r\n    if(u_linearColor == 1.0) {\r\n      vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\r\n      linearColor.rgb *= lightWeight;\r\n      v_Color = linearColor;\r\n    } else {\r\n      v_Color = a_Color;\r\n    }\r\n\r\n  } else {\r\n    v_Color = a_Color;\r\n  }\r\n\r\n  v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity);\r\n\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n',type:"polygonExtrude"}}},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy()}},{key:"registerBuiltinAttributes",value:function(){var e=this.layer.getSource().extent,t=e,r=this.layer.coordCenter||this.layer.getSource().center,n=t[2]-t[0],i=t[3]-t[1];if("GAODE2.x"===this.mapService.version){var a=A(this.mapService.coordToAMap2RelativeCoordinates([e[0],e[1]],r),2),o=a[0],s=a[1],u=A(this.mapService.coordToAMap2RelativeCoordinates([e[2],e[3]],r),2),c=u[0],l=u[1];n=c-o,i=l-s,t=[o,s,c,l]}this.styleAttributeService.registerStyleAttribute({name:"uvs",type:RD.Attribute,descriptor:{name:"a_uvs",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,r,a){var o=a[0],s=a[1];return[(o-t[0])/n,(s-t[1])/i,a[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?10:t;return Array.isArray(r)?[r[0]]:[r]}}})}},{key:"loadTexture",value:(t=s(i().mark((function e(){var t,r,n,a=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.layer.getLayerConfig(),r=t.mapTexture,n=this.rendererService.createTexture2D,this.texture=n({height:0,width:0}),!r){e.next=5;break}return e.abrupt("return",new Promise((function(e,t){var i=new Image;i.crossOrigin="anonymous",i.src=r,i.onload=function(){return a.texture=n({data:i,width:i.width,height:i.height,wrapS:rO.CLAMP_TO_EDGE,wrapT:rO.CLAMP_TO_EDGE,min:rO.LINEAR,mag:rO.LINEAR}),e(null)},i.onerror=function(){t(new Error("image load error"))}})));case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),c}(PV),jH=function(e){f(o,e);var t,r,a=x(o);function o(){return u(this,o),a.apply(this,arguments)}return l(o,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.raisingHeight,r=void 0===t?0:t,i=e.opacityLinear,a=void 0===i?{enable:!1,dir:"in"}:i;return n({u_raisingHeight:Number(r),u_opacitylinear:Number(a.enable),u_dir:"in"===a.dir?1:0},this.getStyleAttribute())}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t,r,n,a,o,s,u,c,l,h;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelParams(),r=t.frag,n=t.vert,a=t.triangulation,o=t.type,s=this.layer.getLayerConfig(),u=s.workerEnabled,c=void 0!==u&&u,l=s.enablePicking,this.layer.triangulation=a,e.next=5,this.layer.buildLayerModel({moduleName:o,vertexShader:n,fragmentShader:r,inject:this.getInject(),triangulation:a,primitive:rO.TRIANGLES,depth:{enable:!1},workerEnabled:c,workerOptions:{modelType:o,enablePicking:l}});case 5:return h=e.sent,e.abrupt("return",[h]);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var e=this.layer.getLayerConfig().opacityLinear;(void 0===e?{enable:!1,dir:"in"}:e).enable&&this.styleAttributeService.registerStyleAttribute({name:"linear",type:RD.Attribute,descriptor:{name:"a_linear",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r){return[r[3],r[4],r[5]]}}})}},{key:"getModelParams",value:function(){var e=this.layer.getLayerConfig().opacityLinear;return(void 0===e?{enable:!1}:e).enable?{frag:'#pragma include "picking"\r\nuniform float u_opacitylinear: 0.0;\r\nuniform float u_dir: 1.0;\r\nvarying vec3 v_linear;\r\nvarying vec2 v_pos;\r\nvarying vec4 v_Color;\r\n\r\n\r\nvoid main() {\r\n   gl_FragColor = v_Color;\r\n  if(u_opacitylinear > 0.0) {\r\n    gl_FragColor.a *= u_dir == 1.0 ? 1.0 - length(v_pos - v_linear.xy)/v_linear.z : length(v_pos - v_linear.xy)/v_linear.z;\r\n  }\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',vert:'attribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nuniform float u_raisingHeight: 0.0;\r\n\r\nvarying vec4 v_Color;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nuniform float u_opacitylinear: 0.0;\r\n\r\nattribute vec3 a_linear;\r\nvarying vec3 v_linear;\r\nvarying vec2 v_pos;\r\n\r\nvoid main() {\r\n  if(u_opacitylinear > 0.0) {\r\n    v_linear = a_linear;\r\n    v_pos = a_Position.xy;\r\n  }\r\n  v_Color = vec4(a_Color.xyz, a_Color.w * opacity);\r\n  vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n  project_pos.z += u_raisingHeight;\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n    float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n    project_pos.z *= mapboxZoomScale;\r\n    project_pos.z += u_raisingHeight * mapboxZoomScale;\r\n  }\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}',type:"polygonLinear",triangulation:xG}:{frag:'varying vec4 v_color;\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  gl_FragColor = v_color;\r\n  gl_FragColor = filterColor(gl_FragColor);\r\n}\r\n',vert:'attribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\n\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\nuniform float u_raisingHeight: 0.0;\r\n\r\nvarying vec4 v_color;\r\n\r\n\r\n#pragma include "projection"\r\n#pragma include "picking"\r\n\r\nvoid main() {\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n\r\n  // cal style mapping - 数据纹理映射部分的计算\r\n\r\n  v_color = vec4(a_Color.xyz, a_Color.w * opacity);\r\n  vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n  // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n\r\n  project_pos.z += u_raisingHeight;\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\r\n    float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\r\n    project_pos.z *= mapboxZoomScale;\r\n    project_pos.z += u_raisingHeight * mapboxZoomScale;\r\n  }\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n\r\n  setPickingColor(a_PickingColor);\r\n}\r\n\r\n',type:"polygonFill",triangulation:xT}}}]),o}(PV),VH=function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture1",void 0),h(_(e),"texture2",void 0),h(_(e),"texture3",void 0),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.watercolor,i=void 0===n?"#6D99A8":n,a=e.watercolor2,o=void 0===a?"#0F121C":a;return{u_texture1:this.texture1,u_texture2:this.texture2,u_texture3:this.texture3,u_watercolor:zg(i),u_watercolor2:zg(o),u_opacity:PB(r)?r:1}}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loadTexture(),e.abrupt("return",this.buildModels());case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"polygonOcean",vertexShader:'attribute vec2 a_uv;\r\nattribute vec3 a_Position;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\nvarying vec2 v_uv;\r\n\r\n#pragma include "projection"\r\n\r\nvoid main() {\r\n  v_uv = a_uv;\r\n\r\n  vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n}\r\n\r\n',fragmentShader:"\r\nuniform float u_time: 0.0;\r\nuniform float u_opacity: 1.0;\r\n\r\nvarying vec2 v_uv;\r\n\r\nfloat coast2water_fadedepth = 0.10;\r\nfloat large_waveheight      = .750; // change to adjust the \"heavy\" waves\r\nfloat large_wavesize        = 3.4;  // factor to adjust the large wave size\r\nfloat small_waveheight      = 0.6;  // change to adjust the small random waves\r\nfloat small_wavesize        = 0.5;   // factor to ajust the small wave size\r\nfloat water_softlight_fact  = 15.;  // range [1..200] (should be << smaller than glossy-fact)\r\nfloat water_glossylight_fact= 120.; // range [1..200]\r\nfloat particle_amount       = 70.;\r\n// vec3 watercolor             = vec3(0.43, 0.60, 0.66); // 'transparent' low-water color (RGB)\r\n// vec3 watercolor2            = vec3(0.06, 0.07, 0.11); // deep-water color (RGB, should be darker than the low-water color)\r\nuniform vec4 u_watercolor;\r\nuniform vec4 u_watercolor2;\r\nvec3 water_specularcolor    = vec3(1.3, 1.3, 0.9);    // specular Color (RGB) of the water-highlights\r\n#define light                 vec3(-0., sin(u_time*0.5)*.5 + .35, 2.8) // position of the sun\r\n\r\nuniform sampler2D u_texture1;\r\nuniform sampler2D u_texture2;\r\nuniform sampler2D u_texture3;\r\n\r\n  \r\n\r\nfloat hash( float n ) {\r\n    return fract(sin(n)*43758.5453123);\r\n}\r\n\r\n// 2d noise function\r\nfloat noise1( in vec2 x ) {\r\n  vec2 p  = floor(x);\r\n  vec2 f  = smoothstep(0.0, 1.0, fract(x));\r\n  float n = p.x + p.y*57.0;\r\n  return mix(mix( hash(n+  0.0), hash(n+  1.0),f.x),\r\n    mix( hash(n+ 57.0), hash(n+ 58.0),f.x),f.y);\r\n}\r\n\r\nfloat noise(vec2 p) {\r\n    return texture2D(u_texture2,p*vec2(1./256.)).x;\r\n}\r\n\r\nvec4 highness(vec2 p) {\r\n    vec4 t = texture2D(u_texture1,fract(p));\r\n    float clipped = -2.0-smoothstep(3.,10.,t.a)*6.9-smoothstep(10.,100.,t.a)*89.9-smoothstep(0.,10000.,t.a)*10000.0;\r\n    return clamp(t, 0.0,3.0)+clamp(t/3.0-1.0, 0.0,1.0)+clamp(t/16.0-1.0, 0.0,1.0);\r\n}\r\n\r\nfloat height_map( vec2 p ) {\r\n    vec4 height=highness(p);\r\n    /*\r\n    height = -0.5+\r\n        0.5*smoothstep(-100.,0.,-height)+\r\n        2.75*smoothstep(0.,2.,height)+\r\n        1.75*smoothstep(2.,4.,height)+\r\n        2.75*smoothstep(4.,16.,height)+\r\n        1.5*smoothstep(16.,1000.,height);\r\n    */\r\n\r\n    mat2 m = mat2( 0.9563*1.4,  -0.2924*1.4,  0.2924*1.4,  0.9563*1.4 );\r\n    //p = p*6.;\r\n    float f = 0.6000*noise1( p ); p = m*p*1.1*6.;\r\n    f += 0.2500*noise( p ); p = m*p*1.32;\r\n    f += 0.1666*noise( p ); p = m*p*1.11;\r\n    f += 0.0834*noise( p ); p = m*p*1.12;\r\n    f += 0.0634*noise( p ); p = m*p*1.13;\r\n    f += 0.0444*noise( p ); p = m*p*1.14;\r\n    f += 0.0274*noise( p ); p = m*p*1.15;\r\n    f += 0.0134*noise( p ); p = m*p*1.16;\r\n    f += 0.0104*noise( p ); p = m*p*1.17;\r\n    f += 0.0084*noise( p );\r\n    f = .25*f+dot(height,vec4(-.03125,-.125,.25,.25))*.5;\r\n        const float FLAT_LEVEL = 0.92525;\r\n        //f = f*0.25+height*0.75;\r\n    if (f<FLAT_LEVEL)\r\n        f = f;\r\n    else\r\n        f = pow((f-FLAT_LEVEL)/(1.-FLAT_LEVEL), 2.)*(1.-FLAT_LEVEL)*2.0+FLAT_LEVEL; // makes a smooth coast-increase\r\n    return clamp(f, 0., 10.);\r\n}\r\n\r\nvec3 plasma_quintic( float x ) {\r\n    x = clamp( x, 0.0, 1.0);\r\n    vec4 x1 = vec4( 1.0, x, x * x, x * x * x ); // 1 x x2 x3\r\n    vec4 x2 = x1 * x1.w * x; // x4 x5 x6 x7\r\n    return vec3(\r\n        dot( x1.xyzw, vec4( +0.063861086, +1.992659096, -1.023901152, -0.490832805 ) ) + dot( x2.xy, vec2( +1.308442123, -0.914547012 ) ),\r\n        dot( x1.xyzw, vec4( +0.049718590, -0.791144343, +2.892305078, +0.811726816 ) ) + dot( x2.xy, vec2( -4.686502417, +2.717794514 ) ),\r\n        dot( x1.xyzw, vec4( +0.513275779, +1.580255060, -5.164414457, +4.559573646 ) ) + dot( x2.xy, vec2( -1.916810682, +0.570638854 ) ) );\r\n}\r\n\r\nvec4 color(vec2 p){\r\n    vec4 c1 = vec4(1.7,1.6,.9,1);\r\n    vec4 c2 = vec4(.2,.94,.1,1);\r\n    vec4 c3 = vec4(.3,.2,.0,1);\r\n    vec4 c4 = vec4(.99,.99,1.6,1);\r\n    vec4 v = highness(p);\r\n    float los = smoothstep(0.1,1.1,v.b);\r\n    float his = smoothstep(3.5,6.5,v.b);\r\n    float ces = smoothstep(1.,5.,v.a);\r\n    vec4 lo = mix(c1,c2,los);\r\n    vec4 hi = mix(c3,c4,his);\r\n    vec4 ce = mix(lo,hi,ces);\r\n\r\n    return vec4(plasma_quintic(ces),1).ragb;\r\n}\r\n\r\nvec3 terrain_map( vec2 p )\r\n{\r\n  return color(p).rgb*0.75+0.25*vec3(0.7, .55, .4)+texture2D(u_texture3, fract(p*5.)).rgb*.5; // test-terrain is simply 'sandstone'\r\n}\r\n\r\nconst mat2 m = mat2( 0.72, -1.60,  1.60,  0.72 );\r\n\r\nfloat water_map( vec2 p, float height ) {\r\n    vec2 p2 = p*large_wavesize;\r\n    vec2 shift1 = 0.001*vec2( u_time*160.0*2.0, u_time*120.0*2.0 );\r\n    vec2 shift2 = 0.001*vec2( u_time*190.0*2.0, -u_time*130.0*2.0 );\r\n\r\n    // coarse crossing 'ocean' waves...\r\n    float f = 0.6000*noise( p );\r\n    f += 0.2500*noise( p*m );\r\n    f += 0.1666*noise( p*m*m );\r\n    float wave = sin(p2.x*0.622+p2.y*0.622+shift2.x*4.269)*large_waveheight*f*height*height ;\r\n\r\n    p *= small_wavesize;\r\n    f = 0.;\r\n    float amp = 1.0, s = .5;\r\n    for (int i=0; i<9; i++)\r\n    { p = m*p*.947; f -= amp*abs(sin((noise( p+shift1*s )-.5)*2.)); amp = amp*.59; s*=-1.329; }\r\n    \r\n    return wave+f*small_waveheight;\r\n}\r\n\r\nfloat nautic(vec2 p) {\r\n    p *= 18.;\r\n    float f = 0.;\r\n    float amp = 1.0, s = .5;\r\n    for (int i=0; i<3; i++)\r\n    { p = m*p*1.2; f += amp*abs(smoothstep(0., 1., noise( p+u_time*s ))-.5); amp = amp*.5; s*=-1.227; }\r\n    return pow(1.-f, 5.);\r\n}\r\n\r\nfloat particles(vec2 p) {\r\n    p *= 200.;\r\n    float f = 0.;\r\n    float amp = 1.0, s = 1.5;\r\n    for (int i=0; i<3; i++)\r\n    { p = m*p*1.2; f += amp*noise( p+u_time*s ); amp = amp*.5; s*=-1.227; }\r\n    return pow(f*.35, 7.)*particle_amount;\r\n}\r\n\r\nfloat test_shadow( vec2 xy, float height) {\r\n    vec3 r0 = vec3(xy, height);\r\n    vec3 rd = normalize( light - r0 );\r\n    \r\n    float hit = 1.0;\r\n    float t   = 0.001;\r\n    for (int j=1; j<25; j++)\r\n    {\r\n        vec3 p = r0 + t*rd;\r\n        float h = height_map( p.xy );\r\n        float height_diff = p.z - h;\r\n        if (height_diff<0.0)\r\n        {\r\n            return 0.0;\r\n        }\r\n        t += 0.01+height_diff*.02;\r\n        hit = min(hit, 2.*height_diff/t); // soft shaddow   \r\n    }\r\n    return hit;\r\n}\r\n\r\nvec3 CalcTerrain(vec2 uv, float height) {\r\n    vec3 col = terrain_map( uv );\r\n    vec2 iResolution = vec2(512.);\r\n    float h1 = height_map(uv-vec2(0., 0.5)/ iResolution.xy);\r\n    float h2 = height_map(uv+vec2(0., 0.5)/ iResolution.xy);\r\n    float h3 = height_map(uv-vec2(0.5, 0.)/ iResolution.xy);\r\n    float h4 = height_map(uv+vec2(0.5, 0.)/ iResolution.xy);\r\n    vec3 norm = normalize(vec3(h3-h4, h1-h2, 1.));\r\n    vec3 r0 = vec3(uv, height);\r\n    vec3 rd = normalize( light - r0 );\r\n    float grad = dot(norm, rd);\r\n    col *= grad+pow(grad, 8.);\r\n    float terrainshade = test_shadow( uv, height );\r\n    col = mix(col*.25, col, terrainshade);\r\n    return col;\r\n}\r\n\r\n\r\nvoid main() {\r\n  vec3 watercolor = u_watercolor.rgb;\r\n  vec3 watercolor2 = u_watercolor2.rgb;\r\n  vec2 uv = v_uv;\r\n  float WATER_LEVEL = 0.84; // Water level (range: 0.0 - 2.0)\r\n  float deepwater_fadedepth   = 0.4 + coast2water_fadedepth;\r\n  float height = height_map( uv );\r\n  vec3 col;\r\n\r\n    float waveheight = clamp(WATER_LEVEL*3.-1.5, 0., 1.);\r\n    float level = WATER_LEVEL + .2*water_map(uv*15. + vec2(u_time*.1), waveheight);\r\n    if (height > level)\r\n    {\r\n        col = CalcTerrain(uv, height);\r\n    }\r\n    if (height <= level)\r\n    {\r\n        vec2 dif = vec2(.0, .01);\r\n        vec2 pos = uv*15. + vec2(u_time*.01);\r\n        float h1 = water_map(pos-dif,waveheight);\r\n        float h2 = water_map(pos+dif,waveheight);\r\n        float h3 = water_map(pos-dif.yx,waveheight);\r\n        float h4 = water_map(pos+dif.yx,waveheight);\r\n        vec3 normwater = normalize(vec3(h3-h4, h1-h2, .125)); // norm-vector of the 'bumpy' water-plane\r\n        uv += normwater.xy*.002*(level-height);\r\n        \r\n        col = CalcTerrain(uv, height);\r\n\r\n        float coastfade = clamp((level-height)/coast2water_fadedepth, 0., 1.);\r\n        float coastfade2= clamp((level-height)/deepwater_fadedepth, 0., 1.);\r\n        float intensity = col.r*.2126+col.g*.7152+col.b*.0722;\r\n        watercolor = mix(watercolor*intensity, watercolor2, smoothstep(0., 1., coastfade2));\r\n\r\n        vec3 r0 = vec3(uv, WATER_LEVEL);\r\n        vec3 rd = normalize( light - r0 ); // ray-direction to the light from water-position\r\n        float grad     = dot(normwater, rd); // dot-product of norm-vector and light-direction\r\n        float specular = pow(grad, water_softlight_fact);  // used for soft highlights                          \r\n        float specular2= pow(grad, water_glossylight_fact); // used for glossy highlights\r\n        float gradpos  = dot(vec3(0., 0., 1.), rd);\r\n        float specular1= smoothstep(0., 1., pow(gradpos, 5.));  // used for diffusity (some darker corona around light's specular reflections...)                          \r\n        float watershade  = test_shadow( uv, level );\r\n        watercolor *= 2.2+watershade;\r\n        watercolor += (.2+.8*watershade) * ((grad-1.0)*.5+specular) * .25;\r\n        watercolor /= (1.+specular1*1.25);\r\n        watercolor += watershade*specular2*water_specularcolor;\r\n        watercolor += watershade*coastfade*(1.-coastfade2)*(vec3(.5, .6, .7)*nautic(uv)+vec3(1., 1., 1.)*particles(uv));\r\n        \r\n        col = mix(col, watercolor, coastfade);\r\n    }\r\n    \r\n\r\n  float opacity = u_opacity;\r\n  gl_FragColor = vec4(col, opacity);  \r\n}\r\n",triangulation:bG,primitive:rO.TRIANGLES,depth:{enable:!1}});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){var e,t,r;null===(e=this.texture1)||void 0===e||e.destroy(),null===(t=this.texture2)||void 0===t||t.destroy(),null===(r=this.texture3)||void 0===r||r.destroy()}},{key:"registerBuiltinAttributes",value:function(){var e=A(this.layer.getSource().extent,4),t=e[0],r=e[1],n=e[2],i=e[3],a=n-t,o=i-r;this.styleAttributeService.registerStyleAttribute({name:"oceanUv",type:RD.Attribute,descriptor:{name:"a_uv",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,n,i,s){var u=A(e.version===QD["GAODE2.x"]||e.version===QD.MAPBOX||e.version===QD.MAPLIBRE?e.originCoordinates[0][s]:i,2),c=u[0],l=u[1];return[(c-t)/a,(l-r)/o]}}})}},{key:"loadTexture",value:function(){var e,t,r,n=this,i=this.rendererService.createTexture2D,a={height:0,width:0};function o(e){return i({data:e,width:e.width,height:e.height,wrapS:rO.MIRRORED_REPEAT,wrapT:rO.MIRRORED_REPEAT,min:rO.LINEAR,mag:rO.LINEAR})}this.texture1=i(a),this.texture2=i(a),this.texture3=i(a),e=function(e){n.texture1=o(e[0]),n.texture2=o(e[1]),n.texture3=o(e[2]),n.layerService.reRender()},t=0,r=[],["https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*MJ22QbpuCzIAAAAAAAAAAAAAARQnAQ","https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*-z2HSIVDsHIAAAAAAAAAAAAAARQnAQ"].map((function(n){var i=new Image;i.crossOrigin="",i.src=n,r.push(i),i.onload=function(){3==++t&&e(r)}}))}}]),a}(PV),GH={fill:jH,line:uH,extrude:UH,text:FH,point_fill:_H,point_image:xH,point_normal:EH,point_extrude:gH,water:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.speed,i=void 0===n?.5:n;return{u_texture:this.texture,u_speed:i,u_opacity:PB(r)?r:1}}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.loadTexture(),e.abrupt("return",this.buildModels());case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"polygonWater",vertexShader:'attribute vec4 a_Color;\r\nattribute vec2 a_uv;\r\nattribute vec3 a_Position;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\nvarying vec4 v_Color;\r\nvarying vec2 v_uv;\r\nuniform float u_opacity: 1.0;\r\n\r\n\r\n#pragma include "projection"\r\n\r\nvoid main() {\r\n  v_uv = a_uv;\r\n\r\n  v_Color = a_Color;\r\n  vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n}\r\n\r\n',fragmentShader:"uniform sampler2D u_texture;\r\nuniform float u_time: 0.0;\r\nuniform float u_speed: 1.0;\r\nuniform float u_opacity: 1.0;\r\n\r\nvarying vec4 v_Color;\r\nvarying vec2 v_uv;\r\n\r\nfloat rand(vec2 n) { return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233)))* 43758.5453); }\r\n\r\nfloat water(vec3 p) {\r\n  float t = u_time * u_speed;\r\n  p.z += t * 2.; p.x += t * 2.;\r\n  vec3 c1 = texture2D(u_texture, p.xz / 30.).xyz;\r\n  p.z += t * 3.; p.x += t * 0.52;\r\n  vec3 c2 = texture2D(u_texture, p.xz / 30.).xyz;\r\n  p.z += t * 4.; p.x += t * 0.8;\r\n  vec3 c3 = texture2D(u_texture, p.xz / 30.).xyz;\r\n  c1 += c2 - c3;\r\n  float z = (c1.x + c1.y + c1.z) / 3.;\r\n  return p.y + z / 4.;\r\n}\r\n\r\nfloat map(vec3 p) {\r\n  float d = 100.0;\r\n  d = water(p);\r\n  return d;\r\n}\r\n\r\nfloat intersect(vec3 ro, vec3 rd) {\r\n  float d = 0.0;\r\n  for (int i = 0; i <= 100; i++) {\r\n    float h = map(ro + rd * d);\r\n    if (h < 0.1) return  d;\r\n    d += h;\r\n  }\r\n  return 0.0;\r\n}\r\n\r\nvec3 norm(vec3 p) {\r\n  float eps = .1;\r\n  return normalize(vec3(\r\n    map(p + vec3(eps, 0, 0)) - map(p + vec3(-eps, 0, 0)),\r\n    map(p + vec3(0, eps, 0)) - map(p + vec3(0, -eps, 0)),\r\n    map(p + vec3(0, 0, eps)) - map(p + vec3(0, 0, -eps))\r\n  ));\r\n} \r\n\r\nfloat calSpc() {\r\n  vec3 l1 = normalize(vec3(1, 1, 1));\r\n  vec3 ro = vec3(-3, 20, -8);\r\n  vec3 rc = vec3(0, 0, 0);\r\n  vec3 ww = normalize(rc - ro);\r\n  vec3 uu = normalize(cross(vec3(0,1,0), ww));\r\n  vec3 vv = normalize(cross(rc - ro, uu));\r\n  vec3 rd = normalize(uu * v_uv.x + vv * v_uv.y + ww);\r\n  float d = intersect(ro, rd);\r\n  vec3 p = ro + rd * d;\r\n  vec3 n = norm(p);\r\n  float spc = pow(max(0.0, dot(reflect(l1, n), rd)), 30.0);\r\n  return spc;\r\n}\r\n\r\nvoid main() {\r\n  float opacity = u_opacity;\r\n  gl_FragColor = v_Color;\r\n  gl_FragColor.a *= opacity;\r\n\r\n  float spc = calSpc();\r\n  gl_FragColor += spc * 0.4;\r\n}\r\n",triangulation:bG,primitive:rO.TRIANGLES,depth:{enable:!1}});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy()}},{key:"registerBuiltinAttributes",value:function(){var e=A(this.layer.getSource().extent,4),t=e[0],r=e[1],n=e[2],i=e[3],a=n-t,o=i-r;this.styleAttributeService.registerStyleAttribute({name:"waterUv",type:RD.Attribute,descriptor:{name:"a_uv",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,n,i,s){var u=A(e.version===QD["GAODE2.x"]||e.version===QD.MAPBOX||e.version===QD.MAPLIBRE?e.originCoordinates[0][s]:i,2),c=u[0],l=u[1];return[(c-t)/a,(l-r)/o]}}})}},{key:"loadTexture",value:function(){var e=this,t=this.layer.getLayerConfig().waterTexture,r=this.rendererService.createTexture2D;this.texture=r({height:0,width:0});var n=new Image;n.crossOrigin="",t?(console.warn("L7 recommend:https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ"),n.src=t):n.src="https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ",n.onload=function(){e.texture=r({data:n,width:n.width,height:n.height,wrapS:rO.MIRRORED_REPEAT,wrapT:rO.MIRRORED_REPEAT,min:rO.LINEAR,mag:rO.LINEAR}),e.layerService.reRender()}}}]),a}(PV),ocean:VH},HH=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","PolygonLayer"),h(_(e),"enableShaderEncodeStyles",["opacity"]),h(_(e),"defaultSourceConfig",void 0),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new GH[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getModelType",value:function(){var e,t=this.styleAttributeService.getLayerStyleAttribute("shape"),r=null==t||null===(e=t.scale)||void 0===e?void 0:e.field;return"fill"!==r&&r?"extrude"===r?"extrude":"water"===r?"water":"ocean"===r?"ocean":"line"===r?"line":this.getPointModelType():"fill"}},{key:"getPointModelType",value:function(){var e=this.getEncodedData(),t=this.getLayerConfig(),r=t.shape2d,n=t.shape3d,i=this.iconService.getIconMap(),a=e.find((function(e){return e.hasOwnProperty("shape")}));if(a){var o=a.shape;return"dot"===o?"point_normal":-1!==(null==r?void 0:r.indexOf(o))?"point_fill":-1!==(null==n?void 0:n.indexOf(o))?"point_extrude":i.hasOwnProperty(o)?"point_image":"text"}return"fill"}}]),n}(kV),WH='precision highp float;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nvarying vec2 v_texCoord;\r\n#pragma include "projection"\r\nvoid main() {\r\n   v_texCoord = a_Uv;\r\n   vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n\r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\r\n   } else {\r\n      gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\r\n   }\r\n}\r\n',YH=function(e){f(o,e);var t,r,n,a=x(o);function o(){var e;u(this,o);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=a.call.apply(a,[this].concat(r))),"texture",void 0),h(_(e),"colorTexture",void 0),e}return l(o,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.clampLow,i=void 0===n||n,a=e.clampHigh,o=void 0===a||a,s=e.noDataValue,u=void 0===s?-9999999:s,c=e.domain,l=e.rampColors,h=c||Xg(l);return this.colorTexture=this.layer.textureService.getColorTexture(l,h),{u_opacity:r||1,u_texture:this.texture,u_domain:h,u_clampLow:i,u_clampHigh:void 0!==o?o:i,u_noDataValue:u,u_colorTexture:this.colorTexture}}},{key:"getRasterData",value:(n=s(i().mark((function e(t){var r,n,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(t.data)){e.next=4;break}return e.abrupt("return",{data:t.data,width:t.width,height:t.height});case 4:return e.next=6,t.data;case 6:return r=e.sent,n=r.rasterData,a=r.width,o=r.height,e.abrupt("return",{data:Array.from(n),width:a,height:o});case 11:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getSource(),r=this.rendererService.createTexture2D,n=t.data.dataArray[0],e.next=5,this.getRasterData(n);case 5:return a=e.sent,o=a.data,s=a.width,u=a.height,this.texture=r({data:o,width:s,height:u,format:rO.LUMINANCE,type:rO.FLOAT}),e.next=12,this.layer.buildLayerModel({moduleName:"rasterImageData",vertexShader:WH,fragmentShader:"#extension GL_OES_standard_derivatives : enable\r\nprecision mediump float;\r\nuniform float u_opacity: 1.0;\r\nuniform sampler2D u_texture;\r\nuniform sampler2D u_colorTexture;\r\nuniform float u_min;\r\nuniform float u_max;\r\nuniform vec2 u_domain;\r\nuniform float u_noDataValue;\r\nuniform bool u_clampLow: true;\r\nuniform bool u_clampHigh: true;\r\nvarying vec2 v_texCoord;\r\nbool isnan_emu(float x) { return (x > 0.0 || x < 0.0) ? x != x : x != 0.0; }\r\n\r\n\r\nvoid main() {\r\n\r\n  float value = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).r;\r\n  if (value == u_noDataValue || isnan_emu(value))\r\n      discard;\r\n  else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1]))\r\n     discard;\r\n  else {\r\n    float normalisedValue =(value - u_domain[0]) / (u_domain[1] -u_domain[0]);\r\n    vec4 color = texture2D(u_colorTexture,vec2(normalisedValue, 0));\r\n    \r\n    gl_FragColor = color;\r\n    gl_FragColor.a =  gl_FragColor.a * u_opacity ;\r\n    if(gl_FragColor.a < 0.01)\r\n      discard;\r\n   \r\n  }\r\n}\r\n",triangulation:TG,primitive:rO.TRIANGLES,depth:{enable:!1,range:[0,.9]}});case 12:return c=e.sent,e.abrupt("return",[c]);case 14:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){var e,t;null===(e=this.texture)||void 0===e||e.destroy(),null===(t=this.colorTexture)||void 0===t||t.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),o}(PV),XH=["data"],ZH=["rasterData"],qH={raster:YH,rasterRgb:function(e){f(c,e);var t,r,a,o=x(c);function c(){var e;u(this,c);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(_(e=o.call.apply(o,[this].concat(r))),"texture",void 0),h(_(e),"dataOption",{}),e}return l(c,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.noDataValue,i=void 0===n?0:n,a=this.dataOption,o=a.rMinMax,s=a.gMinMax,u=a.bMinMax;return{u_opacity:r||1,u_texture:this.texture,u_noDataValue:i,u_rminmax:o,u_gminmax:s,u_bminmax:u}}},{key:"getRasterData",value:(a=s(i().mark((function e(t){var r,a,o,s,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Array.isArray(t.data)){e.next=4;break}return r=t.data,a=y(t,XH),this.dataOption=a,e.abrupt("return",n({data:r},a));case 4:return e.next=6,t.data;case 6:if(o=e.sent,s=o.rasterData,u=y(o,ZH),this.dataOption=u,!Array.isArray(s)){e.next=14;break}return e.abrupt("return",n({data:s},u));case 14:return e.abrupt("return",n({data:Array.from(s)},u));case 15:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getSource(),r=this.rendererService.createTexture2D,n=t.data.dataArray[0],e.next=5,this.getRasterData(n);case 5:return a=e.sent,o=a.data,s=a.width,u=a.height,this.texture=r({data:o,width:s,height:u,format:rO.RGB,type:rO.FLOAT}),e.next=12,this.layer.buildLayerModel({moduleName:"rasterImageDataRGBA",vertexShader:WH,fragmentShader:"precision mediump float;\r\nuniform vec2 u_rminmax: vec2(0,255); \r\nuniform vec2 u_gminmax: vec2(0,255);\r\nuniform vec2 u_bminmax: vec2(0,255);\r\nuniform float u_opacity: 1.0;\r\nuniform sampler2D u_texture;\r\nuniform float u_noDataValue : 0.0;\r\nvarying vec2 v_texCoord;\r\n\r\nvoid main() {\r\n  vec3 rgb = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).rgb;\r\n  if(rgb == vec3(u_noDataValue)) {\r\n    gl_FragColor = vec4(0.0, 0, 0, 0.0);\r\n  } else {\r\n    gl_FragColor = vec4(rgb.r / (u_rminmax.y -u_rminmax.x), rgb.g /(u_gminmax.y -u_gminmax.x), rgb.b/ (u_bminmax.y - u_bminmax.x), u_opacity);\r\n  }\r\n  if(gl_FragColor.a < 0.01)\r\n    discard;\r\n \r\n}",triangulation:TG,primitive:rO.TRIANGLES,depth:{enable:!1}});case 12:return c=e.sent,e.abrupt("return",[c]);case 14:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),c}(PV),raster3d:YH,rasterTerrainRgb:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=e.clampLow,n=void 0===r||r,i=e.clampHigh,a=void 0===i||i,o=e.noDataValue,s=void 0===o?-9999999:o,u=e.domain,c=e.rampColors,l=e.colorTexture,h=e.rScaler,f=void 0===h?6553.6:h,p=e.gScaler,d=void 0===p?25.6:p,v=e.bScaler,g=void 0===v?.1:v,m=e.offset,y=void 0===m?1e4:m,_=u||Xg(c),b=l;return l?this.layer.textureService.setColorTexture(l,c,_):b=this.layer.textureService.getColorTexture(c,_),{u_opacity:t||1,u_texture:this.texture,u_domain:_,u_clampLow:n,u_clampHigh:void 0!==a?a:n,u_noDataValue:s,u_unpack:[f,d,g,y],u_colorTexture:b}}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getSource(),r=this.rendererService.createTexture2D,e.next=4,t.data.images;case 4:return n=e.sent,this.texture=r({data:n[0],width:n[0].width,height:n[0].height,min:rO.LINEAR,mag:rO.LINEAR}),e.next=8,this.layer.buildLayerModel({moduleName:"RasterTileDataImage",vertexShader:'precision highp float;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nvarying vec2 v_texCoord;\r\n#pragma include "projection"\r\nvoid main() {\r\n   v_texCoord = a_Uv;\r\n   vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n   // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\r\n   } else {\r\n      gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\r\n   }\r\n}\r\n',fragmentShader:"precision mediump float;\r\nuniform float u_opacity: 1.0;\r\n\r\nuniform sampler2D u_texture;\r\nuniform sampler2D u_colorTexture;\r\n\r\nvarying vec2 v_texCoord;\r\n\r\nuniform vec2 u_domain;\r\nuniform float u_noDataValue;\r\nuniform bool u_clampLow: true;\r\nuniform bool u_clampHigh: true;\r\nuniform vec4 u_unpack;\r\n\r\nfloat getElevation(vec2 coord, float bias) {\r\n    // Convert encoded elevation value to meters\r\n    vec4 data = texture2D(u_texture, coord,bias) * 255.0;\r\n    data.a = -1.0;\r\n    return dot(data, u_unpack);\r\n}\r\n\r\nvec4 getColor(float value) {\r\n   float normalisedValue =(value- u_domain[0]) / (u_domain[1] - u_domain[0]);\r\n    vec2 coord = vec2(normalisedValue, 0);\r\n    return texture2D(u_colorTexture, coord);\r\n}\r\n\r\nvoid main() {\r\n  float value = getElevation(v_texCoord,0.0);\r\n  if (value == u_noDataValue) {\r\n    gl_FragColor = vec4(0.0, 0, 0, 0.0);\r\n  } else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1])) {\r\n     gl_FragColor = vec4(0.0, 0, 0, 0.0);\r\n  } else {\r\n   \r\n    gl_FragColor = getColor(value);\r\n    gl_FragColor.a =  gl_FragColor.a * u_opacity ;\r\n      if(gl_FragColor.a < 0.01)\r\n      discard;\r\n  }\r\n}\r\n",triangulation:TG,primitive:rO.TRIANGLES,depth:{enable:!1}});case 8:return a=e.sent,e.abrupt("return",[a]);case 10:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){var e;null===(e=this.texture)||void 0===e||e.destroy()}},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),a}(PV)},KH=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","RasterLayer"),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new qH[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getDefaultConfig",value:function(){return{raster:{},rasterRgb:{},raster3d:{},rasterTerrainRgb:{}}[this.getModelType()]}},{key:"getModelType",value:function(){switch(this.layerSource.getParserType()){case"raster":return"raster";case"rasterRgb":return"rasterRgb";case"image":return"rasterTerrainRgb";default:return"raster"}}}]),n}(kV),QH=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","TileDebugLayer"),h(_(e),"zIndex",1e4),h(_(e),"defaultSourceConfig",{data:[],options:{parser:{type:"testTile"}}}),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return");case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})}]),n}(kV),$H=function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig().opacity,t=void 0===e?1:e;return{u_opacity:PB(t)?t:1}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){return""}},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layer.zIndex=-997,e.next=3,this.layer.buildLayerModel({moduleName:"earthAtmoSphere",vertexShader:"\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Normal;\r\nattribute vec2 a_Uv;\r\nattribute vec4 a_Color;\r\nuniform vec3 u_CameraPosition;\r\nvarying float v_CamreaDistance;\r\n\r\nuniform mat4 u_ViewProjectionMatrix;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_ViewMatrix;\r\n\r\nvarying vec3 vVertexNormal;\r\nvarying vec4 v_Color;\r\nvarying float v_offset;\r\n\r\nvoid main() {\r\n    float EARTH_RADIUS = 100.0;\r\n    \r\n    v_Color = a_Color;\r\n\r\n    v_offset = min(((length(u_CameraPosition) - EARTH_RADIUS)/600.0) * 0.5 + 0.4, 1.0);\r\n    vVertexNormal = a_Normal;\r\n\r\n    gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0);\r\n}\r\n",fragmentShader:"\r\nuniform float u_opacity;\r\nuniform vec3 u_CameraPosition;\r\n\r\nvarying vec3 vVertexNormal;\r\nvarying float v_offset;\r\nvarying vec4 v_Color;\r\nvoid main() {\r\n    \r\n    \r\n    // float intensity = pow(0.5 + dot(normalize(vVertexNormal), normalize(u_CameraPosition)), 3.0);\r\n    float intensity = pow(v_offset + dot(normalize(vVertexNormal), normalize(u_CameraPosition)), 3.0);\r\n    // 去除背面\r\n    if(intensity > 1.0) intensity = 0.0;\r\n\r\n    gl_FragColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity);\r\n}\r\n",triangulation:MG,depth:{enable:!1},blend:this.getBlend()});case 3:return t=e.sent,e.abrupt("return",[t]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),a}(PV),JH={base:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"earthTime",3.4),h(_(e),"sunX",1e3),h(_(e),"sunY",1e3),h(_(e),"sunZ",1e3),h(_(e),"sunRadius",Math.sqrt(e.sunX*e.sunX+e.sunY*e.sunY+e.sunZ*e.sunZ)),e}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.animateOption,r=e.globalOptions;return null!=t&&t.enable&&(this.mapService.rotateY({reg:.002}),this.earthTime+=.02,this.sunY=10,this.sunX=Math.cos(this.earthTime)*(this.sunRadius-this.sunY),this.sunZ=Math.sin(this.earthTime)*(this.sunRadius-this.sunY)),{u_ambientRatio:(null==r?void 0:r.ambientRatio)||.6,u_diffuseRatio:(null==r?void 0:r.diffuseRatio)||.4,u_specularRatio:(null==r?void 0:r.specularRatio)||.1,u_sunLight:[this.sunX,this.sunY,this.sunZ],u_texture:this.texture}}},{key:"setEarthTime",value:function(e){this.earthTime=e,this.sunY=10,this.sunX=Math.cos(this.earthTime)*(this.sunRadius-this.sunY),this.sunZ=Math.sin(this.earthTime)*(this.sunRadius-this.sunY),this.layerService.throttleRenderLayers()}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a,o=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.layer.getLayerConfig(),void 0!==(null==(r=t.globalOptions)?void 0:r.earthTime)&&this.setEarthTime(r.earthTime),n=this.layer.getSource(),a=this.rendererService.createTexture2D,this.texture=a({height:0,width:0}),n.data.images.then((function(e){o.texture=a({data:e[0],width:e[0].width,height:e[0].height}),o.layerService.reRender()})),e.abrupt("return",this.buildModels());case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){return""}},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layer.zIndex=-998,e.next=3,this.layer.buildLayerModel({moduleName:"earthBase",vertexShader:"// attribute vec4 a_Color;\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Normal;\r\nattribute vec2 a_Uv;\r\nvarying vec2 v_texCoord;\r\n\r\n// attribute vec2 a_Extrude;\r\n// attribute float a_Size;\r\n// attribute float a_Shape;\r\n\r\nuniform vec3 u_CameraPosition;\r\nuniform mat4 u_ViewProjectionMatrix;\r\nuniform mat4 u_ModelMatrix;\r\nuniform float u_ambientRatio : 0.5;\r\nuniform float u_diffuseRatio : 0.3;\r\nuniform float u_specularRatio : 0.2;\r\nuniform vec3 u_sunLight: [1.0, -10.5, 12.0];\r\n\r\n\r\n\r\nfloat calc_lighting(vec4 pos) {\r\n\r\n    vec3 worldPos = vec3(pos * u_ModelMatrix);\r\n\r\n    vec3 worldNormal = a_Normal;\r\n\r\n    // cal light weight\r\n    vec3 viewDir = normalize(u_CameraPosition - worldPos);\r\n\r\n    vec3 lightDir = normalize(u_sunLight);\r\n\r\n    vec3 halfDir = normalize(viewDir+lightDir);\r\n    // lambert\r\n    float lambert = dot(worldNormal, lightDir);\r\n    // specular\r\n    float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0);\r\n    //sum to light weight\r\n    float lightWeight = u_ambientRatio + u_diffuseRatio * lambert + u_specularRatio * specular;\r\n\r\n    return lightWeight;\r\n}\r\n\r\nvarying float v_lightWeight;\r\nvoid main() {\r\n\r\n    v_texCoord = a_Uv;\r\n\r\n    float lightWeight = calc_lighting(vec4(a_Position, 1.0));\r\n    v_lightWeight = lightWeight;\r\n\r\n    gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0);\r\n}\r\n",fragmentShader:"\r\nuniform sampler2D u_texture;\r\n\r\nvarying vec2 v_texCoord;\r\nvarying float v_lightWeight;\r\n\r\n\r\nvoid main() {\r\n\r\n    vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));\r\n    color.xyz = color.xyz * v_lightWeight;\r\n    gl_FragColor = color;\r\n}\r\n",triangulation:MG,depth:{enable:!0},blend:this.getBlend()});case 3:return t=e.sent,e.abrupt("return",[t]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),a}(PV),atomSphere:$H,bloomSphere:function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig().opacity,t=void 0===e?1:e;return{u_opacity:PB(t)?t:1}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"clearModels",value:function(){return""}},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.layer.zIndex=-999,e.next=3,this.layer.buildLayerModel({moduleName:"earthBloom",vertexShader:"\r\nattribute vec3 a_Position;\r\nattribute vec3 a_Normal;\r\nattribute vec2 a_Uv;\r\nattribute vec4 a_Color;\r\nuniform vec3 u_CameraPosition;\r\nuniform mat4 u_ViewProjectionMatrix;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_ViewMatrix;\r\n\r\nvarying vec3 vVertexNormal;\r\nvarying vec4 v_Color;\r\n\r\nvoid main() {\r\n    v_Color = a_Color;\r\n\r\n    vVertexNormal = a_Normal;\r\n\r\n    gl_Position = u_ViewProjectionMatrix * u_ModelMatrix * vec4(a_Position, 1.0);\r\n}\r\n",fragmentShader:"\r\nuniform float u_opacity;\r\nuniform vec3 u_CameraPosition;\r\nvarying vec3 vVertexNormal;\r\n\r\nvarying vec4 v_Color;\r\nvoid main() {\r\n\r\n\r\n    float intensity =  - dot(normalize(vVertexNormal), normalize(u_CameraPosition));\r\n    // 去除背面\r\n    if(intensity > 1.0) intensity = 0.0;\r\n\r\n    gl_FragColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity);\r\n}\r\n",triangulation:PG,depth:{enable:!1},blend:this.getBlend()});case 3:return t=e.sent,e.abrupt("return",[t]);case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:RD.Attribute,descriptor:{name:"a_Size",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){var t=e.size,r=void 0===t?1:t;return Array.isArray(r)?[r[0]]:[r]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:RD.Attribute,descriptor:{name:"a_Normal",buffer:{usage:rO.STATIC_DRAW,data:[],type:rO.FLOAT},size:3,update:function(e,t,r,n,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}}]),a}(PV)},eW=["base","atomSphere","bloomSphere"],tW=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","EarthLayer"),h(_(e),"defaultSourceConfig",{data:[],options:{parser:{type:"json"}}}),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new JH[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"setEarthTime",value:function(e){this.layerModel&&this.layerModel.setEarthTime?this.layerModel.setEarthTime(e):console.warn("请在 scene loaded 之后执行该方法!")}},{key:"getModelType",value:function(){var e,t=this.styleAttributeService.getLayerStyleAttribute("shape"),r=(null==t||null===(e=t.scale)||void 0===e?void 0:e.field)||"base";return eW.indexOf(r)<0&&(r="base"),r}}]),n}(kV),rW={fill:function(e){f(a,e);var t,r,n=x(a);function a(){return u(this,a),n.apply(this,arguments)}return l(a,[{key:"getUninforms",value:function(){var e=this.layer.getLayerConfig(),t=e.opacity,r=void 0===t?1:t,n=e.color,i=void 0===n?"#000":n;return{u_opacity:PB(r)?r:0,u_color:zg(i)}}},{key:"initModels",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.buildModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layer.buildLayerModel({moduleName:"mask",vertexShader:'attribute vec3 a_Position;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\n\r\n#pragma include "projection"\r\n\r\nvoid main() {\r\n  vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n\r\n  if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n    gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\r\n  } else {\r\n    gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\r\n  }\r\n}\r\n\r\n',fragmentShader:"uniform float u_opacity : 1.0;\r\nuniform vec4 u_color;\r\n\r\nvoid main() {\r\n  gl_FragColor = u_color;\r\n  gl_FragColor.a *= u_opacity;\r\n}\r\n",triangulation:bG,depth:{enable:!1},pick:!1});case 2:return t=e.sent,e.abrupt("return",[t]);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&this.layerService.clear()}},{key:"registerBuiltinAttributes",value:function(){return""}}]),a}(PV)},nW=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","MaskLayer"),h(_(e),"defaultSourceConfig",void 0),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new rW[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getModelType",value:function(){return"fill"}}]),n}(kV);function iW(e,t,r){var n=aW(e,e.VERTEX_SHADER,t),i=aW(e,e.FRAGMENT_SHADER,r);if(!n||!i)return null;var a=e.createProgram();if(!a)return null;if(e.attachShader(a,n),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){var o=e.getProgramInfoLog(a);return console.warn("Failed to link program: "+o),e.deleteProgram(a),e.deleteShader(i),e.deleteShader(n),null}for(var s=e.getProgramParameter(a,e.ACTIVE_ATTRIBUTES),u=0;u<s;u++){var c=e.getActiveAttrib(a,u);a[c.name]=e.getAttribLocation(a,c.name)}for(var l=e.getProgramParameter(a,e.ACTIVE_UNIFORMS),h=0;h<l;h++){var f=e.getActiveUniform(a,h);a[f.name]=e.getUniformLocation(a,f.name)}return a.vertexShader=n,a.fragmentShader=i,a}function aW(e,t,r){var n=e.createShader(t);if(null==n)return console.warn("unable to create shader"),null;if(e.shaderSource(n,r),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){var i=e.getShaderInfoLog(n);return console.warn("Failed to compile shader: "+i),e.deleteShader(n),null}return n}function oW(e,t,r,n,i){var a=e.createTexture();return e.bindTexture(e.TEXTURE_2D,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n,i,0,e.RGBA,e.UNSIGNED_BYTE,r),e.bindTexture(e.TEXTURE_2D,null),a}function sW(e,t,r){e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,t)}function uW(e,t){var r=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),r}function cW(e){var t=document.createElement("canvas"),r=t.getContext("2d");t.width=256,t.height=1;for(var n=r.createLinearGradient(0,0,256,0),i=0,a=Object.keys(e);i<a.length;i++){var o=a[i];n.addColorStop(+o,e[+o])}return r.fillStyle=n,r.fillRect(0,0,256,1),t=null,new Uint8Array(r.getImageData(0,0,256,1).data)}function lW(e,t,r,n){e.bindBuffer(e.ARRAY_BUFFER,t),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,n,e.FLOAT,!1,0,0)}function hW(e,t,r){e.bindFramebuffer(e.FRAMEBUFFER,t),r&&e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0)}var fW,pW,dW,vW,gW,mW,yW,_W,bW,xW,SW=function(){function e(t){u(this,e),h(this,"width",512),h(this,"height",512),h(this,"pixels",void 0),h(this,"fadeOpacity",void 0),h(this,"speedFactor",void 0),h(this,"dropRate",void 0),h(this,"dropRateBump",void 0),h(this,"gl",void 0),h(this,"drawProgram",void 0),h(this,"fullScreenProgram",void 0),h(this,"updateProgram",void 0),h(this,"rampColors",void 0),h(this,"numParticles",65536),h(this,"numParticlesSize",void 0),h(this,"particleStateResolution",void 0),h(this,"quadBuffer",void 0),h(this,"particleIndexBuffer",void 0),h(this,"framebuffer",void 0),h(this,"colorRampTexture",void 0),h(this,"backgroundTexture",void 0),h(this,"screenTexture",void 0),h(this,"particleStateTexture0",void 0),h(this,"particleStateTexture1",void 0),h(this,"windTexture",void 0),h(this,"windData",void 0),this.gl=t.glContext,this.width=t.imageWidth,this.height=t.imageHeight,this.fadeOpacity=t.fadeOpacity,this.speedFactor=t.speedFactor,this.dropRate=t.dropRate,this.dropRateBump=t.dropRateBump,this.rampColors=t.rampColors,this.init()}return l(e,[{key:"init",value:function(){var e=this.gl;this.fadeOpacity=.996,this.speedFactor=.25,this.dropRate=.003,this.dropRateBump=.01,this.drawProgram=iW(e,"\n precision mediump float;\n\n attribute float a_index;\n\n uniform sampler2D u_particles;\n uniform float u_particles_res;\n\n varying vec2 v_particle_pos;\n\n void main() {\n     vec4 color = texture2D(u_particles, vec2(\n         fract(a_index / u_particles_res),\n         floor(a_index / u_particles_res) / u_particles_res)\n     );\n\n     // decode current particle position from the pixel's RGBA value\n     v_particle_pos = vec2( color.r / 255.0 + color.b, color.g / 255.0 + color.a);\n\n     gl_PointSize = 1.0;\n     gl_Position = vec4(2.0 * v_particle_pos.x - 1.0, 1.0 - 2.0 * v_particle_pos.y, 0, 1);\n }","\n precision mediump float;\n\n uniform sampler2D u_wind;\n uniform vec2 u_wind_min;\n uniform vec2 u_wind_max;\n uniform sampler2D u_color_ramp;\n\n varying vec2 v_particle_pos;\n\n void main() {\n     vec2 velocity = mix(u_wind_min, u_wind_max, texture2D(u_wind, v_particle_pos).rg);\n     float speed_t = length(velocity) / length(u_wind_max);\n\n     // color ramp is encoded in a 16x16 texture\n     vec2 ramp_pos = vec2( fract(16.0 * speed_t), floor(16.0 * speed_t) / 16.0);\n\n     gl_FragColor = texture2D(u_color_ramp, ramp_pos);\n }"),this.fullScreenProgram=iW(e,"\n     precision mediump float;\n\n     attribute vec2 a_pos;\n\n     varying vec2 v_tex_pos;\n\n     void main() {\n         v_tex_pos = a_pos;\n         gl_Position = vec4(1.0 - 2.0 * a_pos, 0.0, 1.0);\n         gl_PointSize = 100.0;\n }","\n precision mediump float;\n\n uniform sampler2D u_screen;\n uniform float u_opacity;\n varying vec2 v_tex_pos;\n\n void main() {\n     vec4 color = texture2D(u_screen, 1.0 - v_tex_pos);\n\n     // a hack to guarantee opacity fade out even with a value close to 1.0\n     gl_FragColor = vec4(floor(255.0 * color * u_opacity) / 255.0);\n }"),this.updateProgram=iW(e,"\n precision mediump float;\n\n attribute vec2 a_pos;\n\n varying vec2 v_tex_pos;\n\n void main() {\n     v_tex_pos = a_pos;\n     gl_Position = vec4(1.0 - 2.0 * a_pos, 0, 1);\n     // framebuffer 始终用铺满屏幕的 texture\n }","\n precision highp float;\n\n uniform sampler2D u_particles;\n uniform sampler2D u_wind;\n uniform vec2 u_wind_res;\n uniform vec2 u_wind_min;\n uniform vec2 u_wind_max;\n uniform float u_rand_seed;\n uniform float u_speed_factor;\n uniform float u_drop_rate;\n uniform float u_drop_rate_bump;\n\n varying vec2 v_tex_pos;\n\n // pseudo-random generator\n const vec3 rand_constants = vec3(12.9898, 78.233, 4375.85453);\n float rand(const vec2 co) {\n float t = dot(rand_constants.xy, co);\n     return fract(sin(t) * (rand_constants.z + t));\n }\n\n // wind speed lookup; use manual bilinear filtering based on 4 adjacent pixels for smooth interpolation\n vec2 lookup_wind(const vec2 uv) {\n     // return texture2D(u_wind, uv).rg; // lower-res hardware filtering\n     vec2 px = 1.0 / u_wind_res;\n     vec2 vc = (floor(uv * u_wind_res)) * px;\n     vec2 f = fract(uv * u_wind_res);\n     vec2 tl = texture2D(u_wind, vc).rg;\n     vec2 tr = texture2D(u_wind, vc + vec2(px.x, 0)).rg;\n     vec2 bl = texture2D(u_wind, vc + vec2(0, px.y)).rg;\n     vec2 br = texture2D(u_wind, vc + px).rg;\n     return mix(mix(tl, tr, f.x), mix(bl, br, f.x), f.y);\n }\n\n void main() {\n     vec4 color = texture2D(u_particles, v_tex_pos);\n     vec2 pos = vec2(\n         color.r / 255.0 + color.b,\n         color.g / 255.0 + color.a); // decode particle position from pixel RGBA\n     vec2 velocity = mix(u_wind_min, u_wind_max, lookup_wind(pos));\n     float speed_t = length(velocity) / length(u_wind_max);\n\n     // take EPSG:4236 distortion into account for calculating where the particle moved\n     float distortion = cos(radians(pos.y * 180.0 - 90.0));\n     vec2 offset = vec2(velocity.x / distortion, -velocity.y) * 0.0001 * u_speed_factor;\n\n     // update particle position, wrapping around the date line\n     pos = fract(1.0 + pos + offset);\n\n     // a random seed to use for the particle drop\n     vec2 seed = (pos + v_tex_pos) * u_rand_seed;\n\n     // drop rate is a chance a particle will restart at random position, to avoid degeneration\n     float drop_rate = u_drop_rate + speed_t * u_drop_rate_bump;\n     float drop = step(1.0 - drop_rate, rand(seed));\n\n     vec2 random_pos = vec2(\n         rand(seed + 1.3),\n         rand(seed + 2.1));\n         pos = mix(pos, random_pos, drop);\n\n     // encode the new particle position back into RGBA\n     gl_FragColor = vec4(\n         fract(pos * 255.0),\n         floor(pos * 255.0) / 255.0);\n }"),this.quadBuffer=uW(e,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1])),this.framebuffer=e.createFramebuffer(),this.colorRampTexture=oW(this.gl,this.gl.LINEAR,cW(this.rampColors),16,16);var t=new Uint8Array(this.width*this.height*4);this.backgroundTexture=oW(e,e.NEAREST,t,this.width,this.height),this.screenTexture=oW(e,e.NEAREST,t,this.width,this.height);var r=this.particleStateResolution=Math.ceil(Math.sqrt(this.numParticles));this.numParticlesSize=r*r;for(var n=new Uint8Array(4*this.numParticlesSize),i=0;i<n.length;i++)n[i]=Math.floor(256*Math.random());this.particleStateTexture0=oW(e,e.NEAREST,n,r,r),this.particleStateTexture1=oW(e,e.NEAREST,n,r,r);for(var a=new Float32Array(this.numParticlesSize),o=0;o<this.numParticlesSize;o++)a[o]=o;this.particleIndexBuffer=uW(e,a)}},{key:"setWind",value:function(e){this.windData=e,this.windTexture=function(e,t,r){var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r),e.bindTexture(e.TEXTURE_2D,null),n}(this.gl,this.gl.LINEAR,e.image)}},{key:"updateParticelNum",value:function(e){var t=this.gl;if(e!==this.numParticles){this.numParticles=e;var r=this.particleStateResolution=Math.ceil(Math.sqrt(this.numParticles));this.numParticlesSize=r*r;for(var n=new Uint8Array(4*this.numParticlesSize),i=0;i<n.length;i++)n[i]=Math.floor(256*Math.random());this.particleStateTexture0=oW(t,t.NEAREST,n,r,r),this.particleStateTexture1=oW(t,t.NEAREST,n,r,r);for(var a=new Float32Array(this.numParticlesSize),o=0;o<this.numParticlesSize;o++)a[o]=o;this.particleIndexBuffer=uW(t,a)}}},{key:"updateWindDir",value:function(e,t,r,n){this.windData.uMin=e,this.windData.uMax=t,this.windData.vMin=r,this.windData.vMax=n}},{key:"updateColorRampTexture",value:function(e){if(this.isColorChanged(e)){this.rampColors=e;var t=this.gl;t.deleteTexture(this.colorRampTexture),this.colorRampTexture=oW(t,t.LINEAR,cW(e),16,16)}}},{key:"isColorChanged",value:function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t],i=Number(n);if(!this.rampColors[i])return!0;if(this.rampColors[i]&&this.rampColors[i]!==e[i])return!0}return!1}},{key:"reSize",value:function(e,t){if(e!==this.width||t!==this.height){var r=this.gl;r.deleteTexture(this.backgroundTexture),r.deleteTexture(this.screenTexture),this.width=e,this.height=t;var n=new Uint8Array(e*t*4);this.backgroundTexture=oW(r,r.NEAREST,n,e,t),this.screenTexture=oW(r,r.NEAREST,n,e,t)}}},{key:"draw",value:function(){var e;if(null!==(e=this.windData)&&void 0!==e&&e.image){var t=this.gl;return sW(t,this.windTexture,0),sW(t,this.particleStateTexture0,1),this.drawScreen(),this.updateParticles(),{d:this.pixels,w:this.width,h:this.height}}return{d:new Uint8Array([0,0,0,0]),w:1,h:1}}},{key:"drawScreen",value:function(){var e=this.gl;hW(e,this.framebuffer,this.screenTexture),e.viewport(0,0,this.width,this.height),e.disable(e.BLEND),this.drawFullTexture(this.backgroundTexture,this.fadeOpacity),this.drawParticles(),this.pixels=new Uint8Array(4*this.width*this.height),e.readPixels(0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.pixels),hW(e,null,null),e.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height);var t=this.backgroundTexture;this.backgroundTexture=this.screenTexture,this.screenTexture=t}},{key:"drawFullTexture",value:function(e,t){var r=this.gl,n=this.fullScreenProgram;r.useProgram(n),r.bindBuffer(r.ARRAY_BUFFER,this.quadBuffer),r.vertexAttribPointer(n.a_pos,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(n.a_pos),r.bindBuffer(r.ARRAY_BUFFER,null),sW(r,e,2),r.uniform1i(n.u_screen,2),r.uniform1f(n.u_opacity,t),r.drawArrays(r.TRIANGLES,0,6)}},{key:"drawParticles",value:function(){var e=this.gl,t=this.drawProgram;e.useProgram(t),lW(e,this.particleIndexBuffer,t.a_index,1),sW(e,this.colorRampTexture,2),e.uniform1i(t.u_wind,0),e.uniform1i(t.u_particles,1),e.uniform1i(t.u_color_ramp,2),e.uniform1f(t.u_particles_res,this.particleStateResolution),e.uniform2f(t.u_wind_min,this.windData.uMin,this.windData.vMin),e.uniform2f(t.u_wind_max,this.windData.uMax,this.windData.vMax),e.drawArrays(e.POINTS,0,this.numParticlesSize)}},{key:"updateParticles",value:function(){var e=this.gl;hW(e,this.framebuffer,this.particleStateTexture1),e.viewport(0,0,this.particleStateResolution,this.particleStateResolution);var t=this.updateProgram;e.useProgram(t),lW(e,this.quadBuffer,t.a_pos,2),e.uniform1i(t.u_wind,0),e.uniform1i(t.u_particles,1),e.uniform1f(t.u_rand_seed,Math.random()),e.uniform2f(t.u_wind_res,2*this.windData.image.width,2*this.windData.image.height),e.uniform2f(t.u_wind_min,this.windData.uMin,this.windData.vMin),e.uniform2f(t.u_wind_max,this.windData.uMax,this.windData.vMax),e.uniform1f(t.u_speed_factor,this.speedFactor),e.uniform1f(t.u_drop_rate,this.dropRate),e.uniform1f(t.u_drop_rate_bump,this.dropRateBump),e.drawArrays(e.TRIANGLES,0,6);var r=this.particleStateTexture0;this.particleStateTexture0=this.particleStateTexture1,this.particleStateTexture1=r,hW(e,null,null)}},{key:"destroy",value:function(){this.gl.deleteBuffer(this.quadBuffer),this.gl.deleteBuffer(this.particleIndexBuffer),this.gl.deleteFramebuffer(this.framebuffer),this.gl.deleteShader(this.drawProgram.vertexShader),this.gl.deleteShader(this.drawProgram.fragmentShader),this.gl.deleteProgram(this.drawProgram),this.gl.deleteShader(this.fullScreenProgram.vertexShader),this.gl.deleteShader(this.fullScreenProgram.fragmentShader),this.gl.deleteProgram(this.fullScreenProgram),this.gl.deleteShader(this.updateProgram.vertexShader),this.gl.deleteShader(this.updateProgram.fragmentShader),this.gl.deleteProgram(this.updateProgram),this.gl.deleteTexture(this.colorRampTexture),this.gl.deleteTexture(this.backgroundTexture),this.gl.deleteTexture(this.screenTexture),this.gl.deleteTexture(this.particleStateTexture0),this.gl.deleteTexture(this.particleStateTexture1),this.gl.deleteTexture(this.windTexture)}}]),e}(),EW={0:"#3288bd",.1:"#66c2a5",.2:"#abdda4",.3:"#e6f598",.4:"#fee08b",.5:"#fdae61",.6:"#f46d43",1:"#d53e4f"},AW={wind:function(e){f(a,e);var t,r,n=x(a);function a(){var e;u(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return h(_(e=n.call.apply(n,[this].concat(r))),"texture",void 0),h(_(e),"colorModel",void 0),h(_(e),"wind",void 0),h(_(e),"imageCoords",void 0),h(_(e),"sizeScale",.5),h(_(e),"frequency",new A_(7.2)),h(_(e),"cacheZoom",void 0),e}return l(a,[{key:"render",value:function(e){var t=this;this.drawColorMode(e),this.frequency.run((function(){t.drawWind()}))}},{key:"getUninforms",value:function(){throw new Error("Method not implemented.")}},{key:"initModels",value:(r=s(i().mark((function e(){var t,r,n,a,o,s,u,c,l,h,f,p,d,v,g,m,y,_,b,x,S,E,A,T,w,C,k,M,P=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.layer.getLayerConfig(),o=a.uMin,s=void 0===o?-21.32:o,u=a.uMax,c=void 0===u?26.8:u,l=a.vMin,h=void 0===l?-21.57:l,f=a.vMax,p=void 0===f?21.42:f,d=a.fadeOpacity,v=void 0===d?.996:d,g=a.speedFactor,m=void 0===g?.25:g,y=a.dropRate,_=void 0===y?.003:y,b=a.dropRateBump,x=void 0===b?.01:b,S=a.rampColors,E=void 0===S?EW:S,A=a.sizeScale,T=void 0===A?.5:A,w=this.rendererService.createTexture2D,C=this.layer.getSource(),this.texture=w({height:0,width:0}),this.cacheZoom=Math.floor(this.mapService.getZoom()),k=this.rendererService.getGLContext(),this.imageCoords=null===(t=C.data)||void 0===t?void 0:t.dataArray[0].coordinates,null===(r=C.data)||void 0===r||null===(n=r.images)||void 0===n||n.then((function(e){var t;P.sizeScale=T*P.getZoomScale();var r=P.getWindSize(),n=r.imageWidth,i=r.imageHeight,a={glContext:k,imageWidth:n,imageHeight:i,fadeOpacity:v,speedFactor:m,dropRate:_,dropRateBump:x,rampColors:E};P.wind=new SW(a),P.wind.setWind({uMin:s,uMax:c,vMin:h,vMax:p,image:e[0]}),null===(t=P.texture)||void 0===t||t.destroy(),P.texture=w({width:n,height:i}),P.layerService.updateLayerRenderList()})),e.next=10,this.layer.buildLayerModel({moduleName:"wind",vertexShader:'precision highp float;\r\nuniform mat4 u_ModelMatrix;\r\nuniform mat4 u_Mvp;\r\nattribute vec3 a_Position;\r\nattribute vec2 a_Uv;\r\nvarying vec2 v_texCoord;\r\n#pragma include "projection"\r\nvoid main() {\r\n   v_texCoord = a_Uv;\r\n   vec4 project_pos = project_position(vec4(a_Position, 1.0));\r\n   \r\n   if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\r\n      gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\r\n   } else {\r\n      gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\r\n   }\r\n}\r\n',fragmentShader:"precision mediump float;\r\nuniform float u_opacity: 1.0;\r\nuniform sampler2D u_texture;\r\nvarying vec2 v_texCoord;\r\nvoid main() {\r\n  vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));\r\n  gl_FragColor = color;\r\n  gl_FragColor.a *= u_opacity;\r\n}\r\n",triangulation:TG,primitive:rO.TRIANGLES,depth:{enable:!1}});case 10:return M=e.sent,this.colorModel=M,e.abrupt("return",[M]);case 13:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"getWindSize",value:function(){var e=this.mapService.lngLatToPixel(this.imageCoords[0]),t=this.mapService.lngLatToPixel(this.imageCoords[1]);return{imageWidth:Math.min(Math.floor((t.x-e.x)*this.sizeScale),2048),imageHeight:Math.min(Math.floor((e.y-t.y)*this.sizeScale),2048)}}},{key:"buildModels",value:(t=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.initModels());case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"clearModels",value:function(){var e,t;null===(e=this.texture)||void 0===e||e.destroy(),null===(t=this.wind)||void 0===t||t.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:RD.Attribute,descriptor:{name:"a_Uv",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:2,update:function(e,t,r){return[r[3],r[4]]}}})}},{key:"getZoomScale",value:function(){return Math.min((this.cacheZoom+4)/30*2,2)}},{key:"drawWind",value:function(){if(this.wind){var e=this.layer.getLayerConfig(),t=e.uMin,r=void 0===t?-21.32:t,n=e.uMax,i=void 0===n?26.8:n,a=e.vMin,o=void 0===a?-21.57:a,s=e.vMax,u=void 0===s?21.42:s,c=e.numParticles,l=void 0===c?65535:c,h=e.fadeOpacity,f=void 0===h?.996:h,p=e.speedFactor,d=void 0===p?.25:p,v=e.dropRate,g=void 0===v?.003:v,m=e.dropRateBump,y=void 0===m?.01:m,_=e.rampColors,b=void 0===_?EW:_,x=e.sizeScale,S=void 0===x?.5:x,E=l,A=Math.floor(this.mapService.getZoom());if("number"==typeof S&&S!==this.sizeScale||A!==this.cacheZoom){var T=this.getZoomScale();this.sizeScale=S,E*=T;var w=this.getWindSize(),C=w.imageWidth,k=w.imageHeight;this.wind.reSize(C,k),this.cacheZoom=A}this.wind.updateWindDir(r,i,o,u),this.wind.updateParticelNum(E),this.wind.updateColorRampTexture(b),this.wind.fadeOpacity=f,this.wind.speedFactor=d,this.wind.dropRate=g,this.wind.dropRateBump=y;var M=this.wind.draw(),P=M.d,I=M.w,O=M.h;this.rendererService.setBaseState(),this.texture.update({data:P,width:I,height:O})}}},{key:"drawColorMode",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this.layer.getLayerConfig(),n=r.opacity;this.layerService.beforeRenderData(this.layer),this.layer.hooks.beforeRender.call(),this.layerService.renderMask(this.layer.masks),null===(e=this.colorModel)||void 0===e||e.draw({uniforms:{u_opacity:n||1,u_texture:this.texture},blend:this.getBlend(),stencil:this.getStencil(t)}),this.layer.hooks.afterRender.call()}}]),a}(PV)},TW=function(e){f(n,e);var t,r=x(n);function n(){var e;u(this,n);for(var t=arguments.length,i=new Array(t),a=0;a<t;a++)i[a]=arguments[a];return h(_(e=r.call.apply(r,[this].concat(i))),"type","WindLayer"),e}return l(n,[{key:"buildModels",value:(t=s(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getModelType(),this.layerModel=new AW[t](this),e.next=4,this.initLayerModels();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"renderModels",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.layerModel&&this.layerModel.render(e),this}},{key:"getDefaultConfig",value:function(){return{wind:{}}[this.getModelType()]}},{key:"getModelType",value:function(){return"wind"}}]),n}(kV),wW=(fW=Me(),pW=ke(ba.ICoordinateSystemService),dW=ke(ba.IMapService),vW=ke(ba.IFontService),fW((yW=I((mW=function(){function e(){u(this,e),P(this,"coordinateSystemService",yW,this),P(this,"mapService",_W,this),P(this,"fontService",bW,this)}return l(e,[{key:"apply",value:function(e,t){var r=this,n=t.styleAttributeService;e.hooks.init.tapPromise("DataMappingPlugin",s(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.log(CD.MappingStart,pP.INIT),r.generateMaping(e,{styleAttributeService:n}),e.log(CD.MappingEnd,pP.INIT);case 3:case"end":return t.stop()}}),t)})))),e.hooks.beforeRenderData.tapPromise("DataMappingPlugin",function(){var t=s(i().mark((function t(a){var o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return",a);case 2:return e.dataState.dataMappingNeedUpdate=!1,e.log(CD.MappingStart,pP.UPDATE),o=r.generateMaping(e,{styleAttributeService:n}),e.log(CD.MappingEnd,pP.UPDATE),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e.hooks.beforeRender.tap("DataMappingPlugin",(function(){var t=e.getSource();if(!e.layerModelNeedUpdate&&t&&t.inited){var i=n.getLayerStyleAttributes()||[],a=n.getLayerStyleAttribute("filter"),o=t.data.dataArray;if(!Array.isArray(o)||0!==o.length){var s=i.filter((function(e){return e.needRemapping})),u=o;if(null!=a&&a.needRemapping&&null!=a&&a.scale&&(u=o.filter((function(e){return r.applyAttributeMapping(a,e)[0]}))),s.length){var c=r.mapping(e,s,u,e.getEncodedData());e.setEncodedData(c)}}}}))}},{key:"generateMaping",value:function(e,t){var r=this,n=t.styleAttributeService,i=n.getLayerStyleAttributes()||[],a=n.getLayerStyleAttribute("filter"),o=e.getSource().data.dataArray,s=o;null!=a&&a.scale&&(s=o.filter((function(e){return r.applyAttributeMapping(a,e)[0]}))),s=e.processData(s);var u=this.mapping(e,i,s,void 0);return e.setEncodedData(u),(0!==o.length||0!==e.encodeDataLength)&&(e.emit("dataUpdate",null),!0)}},{key:"mapping",value:function(e,t,r,i){var a=this,o=e.getLayerConfig().arrow,s=void 0===o?{enable:!1}:o,u=t.filter((function(e){return void 0!==e.scale})).filter((function(e){return"filter"!==e.name})),c=r.map((function(t,r){var o=i?i[r]:{},c=n({id:t._id,coordinates:t.coordinates,originCoordinates:t.originCoordinates},o);if(u.forEach((function(e){var r=a.applyAttributeMapping(e,t);"color"!==e.name&&"stroke"!==e.name||(r=r.map((function(e){return zg(e)}))),c[e.name]=Array.isArray(r)&&1===r.length?r[0]:r,"shape"===e.name&&(c.shape=a.fontService.getIconFontKey(c[e.name]))})),s.enable&&"line"===c.shape){var l=c.coordinates;if(e.arrowInsertCount<e.encodeDataLength){var h=a.getArrowPoints(l[0],l[1]);c.coordinates.splice(1,0,h,h),e.arrowInsertCount++}}return c}));if(t.forEach((function(e){e.needRemapping=!1})),this.adjustData2SimpleCoordinates(c),this.coordinateSystemService.getCoordinateSystem()!==ub.METER_OFFSET&&(this.coordinateSystemService.offsetCenter=null,this.coordinateSystemService.offsetCenterTransform=null),this.coordinateSystemService.getCoordinateSystem()===ub.LNGLAT)this.adjustData2MapboxCoordinates(c);else if(this.coordinateSystemService.getCoordinateSystem()===ub.METER_OFFSET){var l=this.mapService.map,h=l.getCenter(),f=h.lng,p=h.lat,d=eS([f,p],l,512);this.coordinateSystemService.offsetCenter||(this.coordinateSystemService.offsetCenter=[f,p]),this.coordinateSystemService.offsetCenterTransform||(this.coordinateSystemService.offsetCenterTransform=[d[0],d[1]]),this.adjustData2MapboxCoordinates(c)}return c}},{key:"adjustData2MapboxCoordinates",value:function(e){var t,r=this;e.length>0&&null!==(t=this.mapService)&&void 0!==t&&t.isMapBoxMapLibre()&&e.map((function(e){e.version=r.mapService.version,e.originCoordinates||(e.originCoordinates=II(e.coordinates),e.coordinates=r.getMapboxCoordiantes(e.coordinates))}))}},{key:"getMapboxCoordiantes",value:function(e){var t=this,r=this.mapService.map;if("number"==typeof e[0])return this.project(e,r,512);if(e[0]&&e[0][0]instanceof Array){var n=[];return e.map((function(e){var i=[];e.map((function(e){i.push(t.project(e,r,512))})),n.push(i)})),n}var i=[];return e.map((function(e){i.push(t.project(e,r,512))})),i}},{key:"project",value:function(e,t,r){if(this.coordinateSystemService.getCoordinateSystem()===ub.METER_OFFSET){var n=eS(e,t,r,this.coordinateSystemService.offsetCenter);return[Math.fround(n[0]),Math.fround(n[1])]}return eS(e,t,r)}},{key:"getIsMultiCoor",value:function(){return!!this.mapService.isMapBoxMapLibre()&&rS(this.mapService.map)}},{key:"adjustData2Amap2Coordinates",value:function(e,t){var r=this;if(e.length>0&&this.mapService.version===QD["GAODE2.x"]){var n=t.coordCenter||t.getSource().center;e.filter((function(e){return!e.originCoordinates})).map((function(e){e.version=QD["GAODE2.x"],e.originCoordinates=II(e.coordinates),e.coordinates=r.mapService.coordToAMap2RelativeCoordinates(e.coordinates,n)}))}}},{key:"adjustData2SimpleCoordinates",value:function(e){var t=this;e.length>0&&this.mapService.version===QD.SIMPLE&&e.map((function(e){e.simpleCoordinate||(e.coordinates=t.unProjectCoordinates(e.coordinates),e.simpleCoordinate=!0)}))}},{key:"unProjectCoordinates",value:function(e){var t=this;if("number"==typeof e[0])return this.mapService.simpleMapCoord.unproject(e);if(e[0]&&e[0][0]instanceof Array){var r=[];return e.map((function(e){var n=[];e.map((function(e){n.push(t.mapService.simpleMapCoord.unproject(e))})),r.push(n)})),r}var n=[];return e.map((function(e){n.push(t.mapService.simpleMapCoord.unproject(e))})),n}},{key:"applyAttributeMapping",value:function(e,t){var r;if(!e.scale)return[];var n=(null==e||null===(r=e.scale)||void 0===r?void 0:r.scalers)||[],i=[];return n.forEach((function(r){var n,a=r.field;(t.hasOwnProperty(a)||"variable"===(null===(n=e.scale)||void 0===n?void 0:n.type))&&i.push(t[a])})),e.mapping?e.mapping(i):[]}},{key:"getArrowPoints",value:function(e,t){var r=AS([t[0]-e[0],t[1]-e[1]]);return[e[0]+1e-4*r[0],e[1]+1e-4*r[1]]}}]),e}()).prototype,"coordinateSystemService",[pW],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_W=I(mW.prototype,"mapService",[dW],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bW=I(mW.prototype,"fontService",[vW],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),gW=mW))||gW),CW=Me()(xW=function(){function e(){u(this,e),h(this,"mapService",void 0)}return l(e,[{key:"apply",value:function(e){var t=this;this.mapService=e.getContainer().get(ba.IMapService),e.hooks.init.tapPromise("DataSourcePlugin",s(i().mark((function r(){var n,a,o,s;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(e.log(CD.SourceInitStart,pP.INIT),(n=e.getSource())||(a=e.sourceOption||e.defaultSourceConfig,o=a.data,s=a.options,n=new uB(o,s),e.setSource(n)),!n.inited){r.next=8;break}t.updateClusterData(e),e.log(CD.SourceInitEnd,pP.INIT),r.next=10;break;case 8:return r.next=10,new Promise((function(r){n.on("update",(function(n){"inited"===n.type&&(t.updateClusterData(e),e.log(CD.SourceInitEnd,pP.INIT)),r(null)}))}));case 10:case"end":return r.stop()}}),r)})))),e.hooks.beforeRenderData.tapPromise("DataSourcePlugin",s(i().mark((function r(){var n,a,o;return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.updateClusterData(e),a=e.dataState.dataSourceNeedUpdate,e.dataState.dataSourceNeedUpdate=!1,o=n||a,r.abrupt("return",o);case 5:case"end":return r.stop()}}),r)}))))}},{key:"updateClusterData",value:function(e){if(e.isTileLayer||e.tileLayer||!e.getSource())return!1;var t=e.getSource(),r=t.cluster,n=t.clusterOptions.zoom,i=void 0===n?0:n,a=this.mapService.getZoom()-1,o=e.dataState.dataSourceNeedUpdate;return r&&o&&t.updateClusterData(Math.floor(a)),!!(r&&Math.abs(e.clusterZoom-a)>=1)&&(i!==Math.floor(a)&&t.updateClusterData(Math.floor(a)),e.clusterZoom=a,!0)}}]),e}())||xW;function kW(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function MW(e){return 1===e.length&&(e=function(e){return function(t,r){return kW(e(t),r)}}(e)),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var a=n+i>>>1;e(t[a],r)<0?n=a+1:i=a}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n<i;){var a=n+i>>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}var PW=MW(kW).right;function IW(e){return null===e?NaN:+e}function OW(e,t){var r,n,i,a=e.length,o=-1;if(null==t){for(;++o<a;)if(null!=(r=e[o])&&r>=r)for(n=i=r;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else for(;++o<a;)if(null!=(r=t(e[o],o,e))&&r>=r)for(n=i=r;++o<a;)null!=(r=t(e[o],o,e))&&(n>r&&(n=r),i<r&&(i=r));return[n,i]}var RW=Math.sqrt(50),LW=Math.sqrt(10),NW=Math.sqrt(2);function DW(e,t,r){var n,i,a,o,s=-1;if(r=+r,(e=+e)===(t=+t)&&r>0)return[e];if((n=t<e)&&(i=e,e=t,t=i),0===(o=FW(e,t,r))||!isFinite(o))return[];if(o>0)for(e=Math.ceil(e/o),t=Math.floor(t/o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(e+s)*o;else for(e=Math.floor(e*o),t=Math.ceil(t*o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(e-s)/o;return n&&a.reverse(),a}function FW(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i>=0?(a>=RW?10:a>=LW?5:a>=NW?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=RW?10:a>=LW?5:a>=NW?2:1)}function zW(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=RW?i*=10:a>=LW?i*=5:a>=NW&&(i*=2),t<e?-i:i}function BW(e,t,r){if(null==r&&(r=IW),n=e.length){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e);return o+(+r(e[a+1],a+1,e)-o)*(i-a)}}function UW(e){return function(){return e}}function jW(e){return 1==(e=+e)?VW:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):UW(isNaN(t)?r:t)}}function VW(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):UW(isNaN(e)?t:e)}var GW=function e(t){var r=jW(t);function n(e,t){var n=r((e=Mg(e)).r,(t=Mg(t)).r),i=r(e.g,t.g),a=r(e.b,t.b),o=VW(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return n.gamma=e,n}(1);var HW,WW=(HW=function(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n<t-1?e[n+2]:2*a-i;return function(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}((r-n/t)*t,o,i,a,s)}},function(e){var t,r,n=e.length,i=new Array(n),a=new Array(n),o=new Array(n);for(t=0;t<n;++t)r=Mg(e[t]),i[t]=r.r||0,a[t]=r.g||0,o[t]=r.b||0;return i=HW(i),a=HW(a),o=HW(o),r.opacity=1,function(e){return r.r=i(e),r.g=a(e),r.b=o(e),r+""}});function YW(e,t){t||(t=[]);var r,n=e?Math.min(t.length,e.length):0,i=t.slice();return function(a){for(r=0;r<n;++r)i[r]=e[r]*(1-a)+t[r]*a;return i}}function XW(e,t){var r,n=t?t.length:0,i=e?Math.min(n,e.length):0,a=new Array(i),o=new Array(n);for(r=0;r<i;++r)a[r]=eY(e[r],t[r]);for(;r<n;++r)o[r]=t[r];return function(e){for(r=0;r<i;++r)o[r]=a[r](e);return o}}function ZW(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function qW(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function KW(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)r in e?n[r]=eY(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var QW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$W=new RegExp(QW.source,"g");function JW(e,t){var r,n,i,a=QW.lastIndex=$W.lastIndex=0,o=-1,s=[],u=[];for(e+="",t+="";(r=QW.exec(e))&&(n=$W.exec(t));)(i=n.index)>a&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,u.push({i:o,x:qW(r,n)})),a=$W.lastIndex;return a<t.length&&(i=t.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var r,n=0;n<t;++n)s[(r=u[n]).i]=r.x(e);return s.join("")})}function eY(e,t){var r,n,i=typeof t;return null==t||"boolean"===i?UW(t):("number"===i?qW:"string"===i?(r=Tg(t))?(t=r,GW):JW:t instanceof Tg?GW:t instanceof Date?ZW:(n=t,!ArrayBuffer.isView(n)||n instanceof DataView?Array.isArray(t)?XW:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?KW:qW:YW))(e,t)}function tY(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function rY(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function nY(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e)}return this}function iY(){}function aY(e,t){var r=new iY;if(e instanceof iY)e.each((function(e,t){r.set(t,e)}));else if(Array.isArray(e)){var n,i=-1,a=e.length;if(null==t)for(;++i<a;)r.set(i,e[i]);else for(;++i<a;)r.set(t(n=e[i],i,e),n)}else if(e)for(var o in e)r.set(o,e[o]);return r}function oY(){}iY.prototype=aY.prototype={constructor:iY,has:function(e){return"$"+e in this},get:function(e){return this["$"+e]},set:function(e,t){return this["$"+e]=t,this},remove:function(e){var t="$"+e;return t in this&&delete this[t]},clear:function(){for(var e in this)"$"===e[0]&&delete this[e]},keys:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)"$"===t[0]&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)"$"===t[0]&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)"$"===t[0]&&++e;return e},empty:function(){for(var e in this)if("$"===e[0])return!1;return!0},each:function(e){for(var t in this)"$"===t[0]&&e(this[t],t.slice(1),this)}};var sY=aY.prototype;oY.prototype=function(e,t){var r=new oY;if(e instanceof oY)e.each((function(e){r.add(e)}));else if(e){var n=-1,i=e.length;if(null==t)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}.prototype={constructor:oY,has:sY.has,add:function(e){return this["$"+(e+="")]=e,this},remove:sY.remove,clear:sY.clear,values:sY.keys,size:sY.size,empty:sY.empty,each:sY.each};var uY=Array.prototype,cY=uY.map,lY=uY.slice,hY={name:"implicit"};function fY(){var e=aY(),t=[],r=[],n=hY;function i(i){var a=i+"",o=e.get(a);if(!o){if(n!==hY)return n;e.set(a,o=t.push(i))}return r[(o-1)%r.length]}return i.domain=function(r){if(!arguments.length)return t.slice();t=[],e=aY();for(var n,a,o=-1,s=r.length;++o<s;)e.has(a=(n=r[o])+"")||e.set(a,t.push(n));return i},i.range=function(e){return arguments.length?(r=lY.call(e),i):r.slice()},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return fY(t,r).unknown(n)},rY.apply(i,arguments),i}function pY(e){return+e}var dY=[0,1];function vY(e){return e}function gY(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function mY(e){var t,r=e[0],n=e[e.length-1];return r>n&&(t=r,r=n,n=t),function(e){return Math.max(r,Math.min(n,e))}}function yY(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=gY(i,n),a=r(o,a)):(n=gY(n,i),a=r(a,o)),function(e){return a(n(e))}}function _Y(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=gY(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(t){var r=PW(e,t,1,n)-1;return a[r](i[r](t))}}function bY(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function xY(){var e,t,r,n,i,a,o=dY,s=dY,u=eY,c=vY;function l(){return n=Math.min(o.length,s.length)>2?_Y:yY,i=a=null,h}function h(t){return isNaN(t=+t)?r:(i||(i=n(o.map(e),s,u)))(e(c(t)))}return h.invert=function(r){return c(t((a||(a=n(s,o.map(e),qW)))(r)))},h.domain=function(e){return arguments.length?(o=cY.call(e,pY),c===vY||(c=mY(o)),l()):o.slice()},h.range=function(e){return arguments.length?(s=lY.call(e),l()):s.slice()},h.rangeRound=function(e){return s=lY.call(e),u=tY,l()},h.clamp=function(e){return arguments.length?(c=e?mY(o):vY,h):c!==vY},h.interpolate=function(e){return arguments.length?(u=e,l()):u},h.unknown=function(e){return arguments.length?(r=e,h):r},function(r,n){return e=r,t=n,l()}}function SY(e,t){return xY()(e,t)}function EY(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function AY(e){return(e=EY(Math.abs(e)))?e[1]:NaN}var TY,wY=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function CY(e){if(!(t=wY.exec(e)))throw new Error("invalid format: "+e);var t;return new kY({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function kY(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function MY(e,t){var r=EY(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}CY.prototype=kY.prototype,kY.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var PY={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return MY(100*e,t)},r:MY,s:function(e,t){var r=EY(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(TY=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+EY(e,Math.max(0,t+a-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function IY(e){return e}var OY,RY,LY,NY=Array.prototype.map,DY=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function FY(e){var t,r,n=void 0===e.grouping||void 0===e.thousands?IY:(t=NY.call(e.grouping,Number),r=e.thousands+"",function(e,n){for(var i=e.length,a=[],o=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>n&&(s=Math.max(1,n-u)),a.push(e.substring(i-=s,i+s)),!((u+=s+1)>n));)s=t[o=(o+1)%t.length];return a.reverse().join(r)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?IY:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(NY.call(e.numerals,String)),u=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"-":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=CY(e)).fill,r=e.align,h=e.sign,f=e.symbol,p=e.zero,d=e.width,v=e.comma,g=e.precision,m=e.trim,y=e.type;"n"===y?(v=!0,y="g"):PY[y]||(void 0===g&&(g=12),m=!0,y="g"),(p||"0"===t&&"="===r)&&(p=!0,t="0",r="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?a:/[%p]/.test(y)?u:"",x=PY[y],S=/[defgprs%]/.test(y);function E(e){var i,a,u,f=_,E=b;if("c"===y)E=x(e)+E,e="";else{var A=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:x(Math.abs(e),g),m&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n<r;++n)switch(e[n]){case".":i=t=n;break;case"0":0===i&&(i=n),t=n;break;default:if(!+e[n])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),A&&0==+e&&"+"!==h&&(A=!1),f=(A?"("===h?h:c:"-"===h||"("===h?"":h)+f,E=("s"===y?DY[8+TY/3]:"")+E+(A&&"("===h?")":""),S)for(i=-1,a=e.length;++i<a;)if(48>(u=e.charCodeAt(i))||u>57){E=(46===u?o+e.slice(i+1):e.slice(i))+E,e=e.slice(0,i);break}}v&&!p&&(e=n(e,1/0));var T=f.length+e.length+E.length,w=T<d?new Array(d-T+1).join(t):"";switch(v&&p&&(e=n(w+e,w.length?d-E.length:1/0),w=""),r){case"<":e=f+e+E+w;break;case"=":e=f+w+e+E;break;case"^":e=w.slice(0,T=w.length>>1)+f+e+E+w.slice(T);break;default:e=w+f+e+E}return s(e)}return g=void 0===g?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),E.toString=function(){return e+""},E}return{format:h,formatPrefix:function(e,t){var r=h(((e=CY(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(AY(t)/3))),i=Math.pow(10,-n),a=DY[8+n/3];return function(e){return r(i*e)+a}}}}function zY(e,t,r,n){var i,a=zW(e,t,r);switch((n=CY(null==n?",f":n)).type){case"s":var o=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(AY(t)/3)))-AY(Math.abs(e)))}(a,o))||(n.precision=i),LY(n,o);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,AY(t)-AY(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=function(e){return Math.max(0,-AY(Math.abs(e)))}(a))||(n.precision=i-2*("%"===n.type))}return RY(n)}function BY(e){var t=e.domain;return e.ticks=function(e){var r=t();return DW(r[0],r[r.length-1],null==e?10:e)},e.tickFormat=function(e,r){var n=t();return zY(n[0],n[n.length-1],null==e?10:e,r)},e.nice=function(r){null==r&&(r=10);var n,i=t(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(n=s,s=u,u=n,n=a,a=o,o=n),(n=FW(s,u,r))>0?n=FW(s=Math.floor(s/n)*n,u=Math.ceil(u/n)*n,r):n<0&&(n=FW(s=Math.ceil(s*n)/n,u=Math.floor(u*n)/n,r)),n>0?(i[a]=Math.floor(s/n)*n,i[o]=Math.ceil(u/n)*n,t(i)):n<0&&(i[a]=Math.ceil(s*n)/n,i[o]=Math.floor(u*n)/n,t(i)),e},e}function UY(e,t){var r,n=0,i=(e=e.slice()).length-1,a=e[n],o=e[i];return o<a&&(r=n,n=i,i=r,r=a,a=o,o=r),e[n]=t.floor(a),e[i]=t.ceil(o),e}function jY(e){return Math.log(e)}function VY(e){return Math.exp(e)}function GY(e){return-Math.log(-e)}function HY(e){return-Math.exp(-e)}function WY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function YY(e){return function(t){return-e(-t)}}function XY(e){var t,r,n=e(jY,VY),i=n.domain,a=10;function o(){return t=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}(a),r=function(e){return 10===e?WY:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}(a),i()[0]<0?(t=YY(t),r=YY(r),e(GY,HY)):e(jY,VY),n}return n.base=function(e){return arguments.length?(a=+e,o()):a},n.domain=function(e){return arguments.length?(i(e),o()):i()},n.ticks=function(e){var n,o=i(),s=o[0],u=o[o.length-1];(n=u<s)&&(f=s,s=u,u=f);var c,l,h,f=t(s),p=t(u),d=null==e?10:+e,v=[];if(!(a%1)&&p-f<d){if(f=Math.round(f)-1,p=Math.round(p)+1,s>0){for(;f<p;++f)for(l=1,c=r(f);l<a;++l)if(!((h=c*l)<s)){if(h>u)break;v.push(h)}}else for(;f<p;++f)for(l=a-1,c=r(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;v.push(h)}}else v=DW(f,p,Math.min(p-f,d)).map(r);return n?v.reverse():v},n.tickFormat=function(e,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=RY(i)),e===1/0)return i;null==e&&(e=10);var o=Math.max(1,a*e/n.ticks().length);return function(e){var n=e/r(Math.round(t(e)));return n*a<a-.5&&(n*=a),n<=o?i(e):""}},n.nice=function(){return i(UY(i(),{floor:function(e){return r(Math.floor(t(e)))},ceil:function(e){return r(Math.ceil(t(e)))}}))},n}function ZY(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function KY(e){return e<0?-e*e:e*e}function QY(e){var t=e(vY,vY),r=1;function n(){return 1===r?e(vY,vY):.5===r?e(qY,KY):e(ZY(r),ZY(1/r))}return t.exponent=function(e){return arguments.length?(r=+e,n()):r},BY(t)}OY=FY({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),RY=OY.format,LY=OY.formatPrefix;var $Y=new Date,JY=new Date;function eX(e,t,r,n){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(r){return e(r=new Date(r-1)),t(r,1),e(r),r},i.round=function(e){var t=i(e),r=i.ceil(e);return e-t<r-e?t:r},i.offset=function(e,r){return t(e=new Date(+e),null==r?1:Math.floor(r)),e},i.range=function(r,n,a){var o,s=[];if(r=i.ceil(r),a=null==a?1:Math.floor(a),!(r<n&&a>0))return s;do{s.push(o=new Date(+r)),t(r,a),e(r)}while(o<r&&r<n);return s},i.filter=function(r){return eX((function(t){if(t>=t)for(;e(t),!r(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!r(e););else for(;--n>=0;)for(;t(e,1),!r(e););}))},r&&(i.count=function(t,n){return $Y.setTime(+t),JY.setTime(+n),e($Y),e(JY),Math.floor(r($Y,JY))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(n?function(t){return n(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var tX=eX((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));tX.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?eX((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,r){t.setTime(+t+r*e)}),(function(t,r){return(r-t)/e})):tX:null};var rX=eX((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),nX=eX((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getMinutes()})),iX=eX((function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())}),(function(e,t){e.setTime(+e+36e5*t)}),(function(e,t){return(t-e)/36e5}),(function(e){return e.getHours()})),aX=eX((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5}),(function(e){return e.getDate()-1}));function oX(e){return eX((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/6048e5}))}var sX=oX(0),uX=oX(1),cX=(oX(2),oX(3),oX(4)),lX=(oX(5),oX(6),eX((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}))),hX=eX((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));hX.every=function(e){return isFinite(e=Math.floor(e))&&e>0?eX((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,r){t.setFullYear(t.getFullYear()+r*e)})):null};var fX=eX((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1}));function pX(e){return eX((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}var dX=pX(0),vX=pX(1),gX=(pX(2),pX(3),pX(4)),mX=(pX(5),pX(6),eX((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()})));function yX(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function _X(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function bX(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}mX.every=function(e){return isFinite(e=Math.floor(e))&&e>0?eX((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})):null};var xX,SX,EX={"-":"",_:" ",0:"0"},AX=/^\s*\d+/,TX=/^%/,wX=/[\\^$*+?|[\]().{}]/g;function CX(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function kX(e){return e.replace(wX,"\\$&")}function MX(e){return new RegExp("^(?:"+e.map(kX).join("|")+")","i")}function PX(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function IX(e,t,r){var n=AX.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function OX(e,t,r){var n=AX.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function RX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function LX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function NX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function DX(e,t,r){var n=AX.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function FX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function zX(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function BX(e,t,r){var n=AX.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function UX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function jX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function VX(e,t,r){var n=AX.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function GX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function HX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function WX(e,t,r){var n=AX.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function YX(e,t,r){var n=AX.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function XX(e,t,r){var n=AX.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function ZX(e,t,r){var n=TX.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function qX(e,t,r){var n=AX.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function KX(e,t,r){var n=AX.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function QX(e,t){return CX(e.getDate(),t,2)}function $X(e,t){return CX(e.getHours(),t,2)}function JX(e,t){return CX(e.getHours()%12||12,t,2)}function eZ(e,t){return CX(1+aX.count(hX(e),e),t,3)}function tZ(e,t){return CX(e.getMilliseconds(),t,3)}function rZ(e,t){return tZ(e,t)+"000"}function nZ(e,t){return CX(e.getMonth()+1,t,2)}function iZ(e,t){return CX(e.getMinutes(),t,2)}function aZ(e,t){return CX(e.getSeconds(),t,2)}function oZ(e){var t=e.getDay();return 0===t?7:t}function sZ(e,t){return CX(sX.count(hX(e)-1,e),t,2)}function uZ(e){var t=e.getDay();return t>=4||0===t?cX(e):cX.ceil(e)}function cZ(e,t){return e=uZ(e),CX(cX.count(hX(e),e)+(4===hX(e).getDay()),t,2)}function lZ(e){return e.getDay()}function hZ(e,t){return CX(uX.count(hX(e)-1,e),t,2)}function fZ(e,t){return CX(e.getFullYear()%100,t,2)}function pZ(e,t){return CX((e=uZ(e)).getFullYear()%100,t,2)}function dZ(e,t){return CX(e.getFullYear()%1e4,t,4)}function vZ(e,t){var r=e.getDay();return CX((e=r>=4||0===r?cX(e):cX.ceil(e)).getFullYear()%1e4,t,4)}function gZ(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+CX(t/60|0,"0",2)+CX(t%60,"0",2)}function mZ(e,t){return CX(e.getUTCDate(),t,2)}function yZ(e,t){return CX(e.getUTCHours(),t,2)}function _Z(e,t){return CX(e.getUTCHours()%12||12,t,2)}function bZ(e,t){return CX(1+fX.count(mX(e),e),t,3)}function xZ(e,t){return CX(e.getUTCMilliseconds(),t,3)}function SZ(e,t){return xZ(e,t)+"000"}function EZ(e,t){return CX(e.getUTCMonth()+1,t,2)}function AZ(e,t){return CX(e.getUTCMinutes(),t,2)}function TZ(e,t){return CX(e.getUTCSeconds(),t,2)}function wZ(e){var t=e.getUTCDay();return 0===t?7:t}function CZ(e,t){return CX(dX.count(mX(e)-1,e),t,2)}function kZ(e){var t=e.getUTCDay();return t>=4||0===t?gX(e):gX.ceil(e)}function MZ(e,t){return e=kZ(e),CX(gX.count(mX(e),e)+(4===mX(e).getUTCDay()),t,2)}function PZ(e){return e.getUTCDay()}function IZ(e,t){return CX(vX.count(mX(e)-1,e),t,2)}function OZ(e,t){return CX(e.getUTCFullYear()%100,t,2)}function RZ(e,t){return CX((e=kZ(e)).getUTCFullYear()%100,t,2)}function LZ(e,t){return CX(e.getUTCFullYear()%1e4,t,4)}function NZ(e,t){var r=e.getUTCDay();return CX((e=r>=4||0===r?gX(e):gX.ceil(e)).getUTCFullYear()%1e4,t,4)}function DZ(){return"+0000"}function FZ(){return"%"}function zZ(e){return+e}function BZ(e){return Math.floor(+e/1e3)}!function(e){xX=function(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,u=e.shortMonths,c=MX(i),l=PX(i),h=MX(a),f=PX(a),p=MX(o),d=PX(o),v=MX(s),g=PX(s),m=MX(u),y=PX(u),_={a:function(e){return o[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:QX,e:QX,f:rZ,g:pZ,G:vZ,H:$X,I:JX,j:eZ,L:tZ,m:nZ,M:iZ,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:zZ,s:BZ,S:aZ,u:oZ,U:sZ,V:cZ,w:lZ,W:hZ,x:null,X:null,y:fZ,Y:dZ,Z:gZ,"%":FZ},b={a:function(e){return o[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return u[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:mZ,e:mZ,f:SZ,g:RZ,G:NZ,H:yZ,I:_Z,j:bZ,L:xZ,m:EZ,M:AZ,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:zZ,s:BZ,S:TZ,u:wZ,U:CZ,V:MZ,w:PZ,W:IZ,x:null,X:null,y:OZ,Y:LZ,Z:DZ,"%":FZ},x={a:function(e,t,r){var n=p.exec(t.slice(r));return n?(e.w=d[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=h.exec(t.slice(r));return n?(e.w=f[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=m.exec(t.slice(r));return n?(e.m=y[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=v.exec(t.slice(r));return n?(e.m=g[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,r,n){return A(e,t,r,n)},d:jX,e:jX,f:XX,g:FX,G:DX,H:GX,I:GX,j:VX,L:YX,m:UX,M:HX,p:function(e,t,r){var n=c.exec(t.slice(r));return n?(e.p=l[n[0].toLowerCase()],r+n[0].length):-1},q:BX,Q:qX,s:KX,S:WX,u:OX,U:RX,V:LX,w:IX,W:NX,x:function(e,t,n){return A(e,r,t,n)},X:function(e,t,r){return A(e,n,t,r)},y:FX,Y:DX,Z:zX,"%":ZX};function S(e,t){return function(r){var n,i,a,o=[],s=-1,u=0,c=e.length;for(r instanceof Date||(r=new Date(+r));++s<c;)37===e.charCodeAt(s)&&(o.push(e.slice(u,s)),null!=(i=EX[n=e.charAt(++s)])?n=e.charAt(++s):i="e"===n?" ":"0",(a=t[n])&&(n=a(r,i)),o.push(n),u=s+1);return o.push(e.slice(u,s)),o.join("")}}function E(e,t){return function(r){var n,i,a=bX(1900,void 0,1);if(A(a,e,r+="",0)!=r.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(n=_X(bX(a.y,0,1))).getUTCDay(),n=i>4||0===i?vX.ceil(n):vX(n),n=fX.offset(n,7*(a.V-1)),a.y=n.getUTCFullYear(),a.m=n.getUTCMonth(),a.d=n.getUTCDate()+(a.w+6)%7):(i=(n=yX(bX(a.y,0,1))).getDay(),n=i>4||0===i?uX.ceil(n):uX(n),n=aX.offset(n,7*(a.V-1)),a.y=n.getFullYear(),a.m=n.getMonth(),a.d=n.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?_X(bX(a.y,0,1)).getUTCDay():yX(bX(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,_X(a)):yX(a)}}function A(e,t,r,n){for(var i,a,o=0,s=t.length,u=r.length;o<s;){if(n>=u)return-1;if(37===(i=t.charCodeAt(o++))){if(i=t.charAt(o++),!(a=x[i in EX?t.charAt(o++):i])||(n=a(e,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return _.x=S(r,_),_.X=S(n,_),_.c=S(t,_),b.x=S(r,b),b.X=S(n,b),b.c=S(t,b),{format:function(e){var t=S(e+="",_);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}(e),SX=xX.format,xX.parse,xX.utcFormat,xX.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var UZ,jZ;function VZ(e){return new Date(e)}function GZ(e){return e instanceof Date?+e:+new Date(+e)}function HZ(e,t,r,n,i,a,o,s,u){var c=SY(vY,vY),l=c.invert,h=c.domain,f=u(".%L"),p=u(":%S"),d=u("%I:%M"),v=u("%I %p"),g=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[n,1,864e5],[n,2,1728e5],[r,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function x(s){return(o(s)<s?f:a(s)<s?p:i(s)<s?d:n(s)<s?v:t(s)<s?r(s)<s?g:m:e(s)<s?y:_)(s)}function S(t,r,n,i){if(null==t&&(t=10),"number"==typeof t){var a=Math.abs(n-r)/t,o=MW((function(e){return e[2]})).right(b,a);o===b.length?(i=zW(r/31536e6,n/31536e6,t),t=e):o?(i=(o=b[a/b[o-1][2]<b[o][2]/a?o-1:o])[1],t=o[0]):(i=Math.max(zW(r,n,t),1),t=s)}return null==i?t:t.every(i)}return c.invert=function(e){return new Date(l(e))},c.domain=function(e){return arguments.length?h(cY.call(e,GZ)):h().map(VZ)},c.ticks=function(e,t){var r,n=h(),i=n[0],a=n[n.length-1],o=a<i;return o&&(r=i,i=a,a=r),r=(r=S(e,i,a,t))?r.range(i,a+1):[],o?r.reverse():r},c.tickFormat=function(e,t){return null==t?x:u(t)},c.nice=function(e,t){var r=h();return(e=S(e,r[0],r[r.length-1],t))?h(UY(r,e)):c},c.copy=function(){return bY(c,HZ(e,t,r,n,i,a,o,s,u))},c}function WZ(){var e,t,r,n,i,a=0,o=1,s=vY,u=!1;function c(t){return isNaN(t=+t)?i:s(0===r?.5:(t=(n(t)-e)*r,u?Math.max(0,Math.min(1,t)):t))}return c.domain=function(i){return arguments.length?(e=n(a=+i[0]),t=n(o=+i[1]),r=e===t?0:1/(t-e),c):[a,o]},c.clamp=function(e){return arguments.length?(u=!!e,c):u},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.unknown=function(e){return arguments.length?(i=e,c):i},function(i){return n=i,e=i(a),t=i(o),r=e===t?0:1/(t-e),c}}function YZ(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function XZ(){var e,t,r,n,i,a,o,s=0,u=.5,c=1,l=vY,h=!1;function f(e){return isNaN(e=+e)?o:(e=.5+((e=+a(e))-t)*(e<t?n:i),l(h?Math.max(0,Math.min(1,e)):e))}return f.domain=function(o){return arguments.length?(e=a(s=+o[0]),t=a(u=+o[1]),r=a(c=+o[2]),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),f):[s,u,c]},f.clamp=function(e){return arguments.length?(h=!!e,f):h},f.interpolator=function(e){return arguments.length?(l=e,f):l},f.unknown=function(e){return arguments.length?(o=e,f):o},function(o){return a=o,e=o(s),t=o(u),r=o(c),n=e===t?0:.5/(t-e),i=t===r?0:.5/(r-t),f}}var ZZ,qZ,KZ=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]?)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/,QZ=(h(UZ={},ID.LINEAR,(function e(){var t=SY(vY,vY);return t.copy=function(){return bY(t,e())},rY.apply(t,arguments),BY(t)})),h(UZ,ID.POWER,(function e(){var t=QY(xY());return t.copy=function(){return bY(t,e()).exponent(t.exponent())},rY.apply(t,arguments),t})),h(UZ,ID.LOG,(function e(){var t=XY(xY()).domain([1,10]);return t.copy=function(){return bY(t,e()).base(t.base())},rY.apply(t,arguments),t})),h(UZ,ID.IDENTITY,(function e(t){var r,n=[];function i(e){return null==e?r:e}return i.invert=i,i.domain=i.range=function(e){return e?(n=e,e):n},i.unknown=function(e){return e?(r=e,e):r},i.copy=function(){return e().unknown(r)},i})),h(UZ,ID.SEQUENTIAL,(function e(){var t=BY(WZ()(vY));return t.copy=function(){return YZ(t,e())},nY.apply(t,arguments)})),h(UZ,ID.TIME,(function(){return rY.apply(HZ(hX,lX,sX,aX,iX,nX,rX,tX,SX).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)})),h(UZ,ID.QUANTILE,(function e(){var t,r=[],n=[],i=[];function a(){var e=0,t=Math.max(1,n.length);for(i=new Array(t-1);++e<t;)i[e-1]=BW(r,e/t);return o}function o(e){return isNaN(e=+e)?t:n[PW(i,e)]}return o.invertExtent=function(e){var t=n.indexOf(e);return t<0?[NaN,NaN]:[t>0?i[t-1]:r[0],t<i.length?i[t]:r[r.length-1]]},o.domain=function(e){if(!arguments.length)return r.slice();r=[];for(var t,n=0,i=e.length;n<i;++n)null==(t=e[n])||isNaN(t=+t)||r.push(t);return r.sort(kW),a()},o.range=function(e){return arguments.length?(n=lY.call(e),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return e().domain(r).range(n).unknown(t)},rY.apply(o,arguments)})),h(UZ,ID.QUANTIZE,(function e(){var t,r=0,n=1,i=1,a=[.5],o=[0,1];function s(e){return e<=e?o[PW(a,e,0,i)]:t}function u(){var e=-1;for(a=new Array(i);++e<i;)a[e]=((e+1)*n-(e-i)*r)/(i+1);return s}return s.domain=function(e){return arguments.length?(r=+e[0],n=+e[1],u()):[r,n]},s.range=function(e){return arguments.length?(i=(o=lY.call(e)).length-1,u()):o.slice()},s.invertExtent=function(e){var t=o.indexOf(e);return t<0?[NaN,NaN]:t<1?[r,a[0]]:t>=i?[a[i-1],n]:[a[t-1],a[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return e().domain([r,n]).range(o).unknown(t)},rY.apply(BY(s),arguments)})),h(UZ,ID.THRESHOLD,(function e(){var t,r=[.5],n=[0,1],i=1;function a(e){return e<=e?n[PW(r,e,0,i)]:t}return a.domain=function(e){return arguments.length?(r=lY.call(e),i=Math.min(r.length,n.length-1),a):r.slice()},a.range=function(e){return arguments.length?(n=lY.call(e),i=Math.min(r.length,n.length-1),a):n.slice()},a.invertExtent=function(e){var t=n.indexOf(e);return[r[t-1],r[t]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return e().domain(r).range(n).unknown(t)},rY.apply(a,arguments)})),h(UZ,ID.CAT,fY),h(UZ,ID.DIVERGING,(function e(){var t=BY(XZ()(vY));return t.copy=function(){return YZ(t,e())},nY.apply(t,arguments)})),UZ),$Z=Me()(jZ=function(){function e(){u(this,e),h(this,"scaleOptions",{})}return l(e,[{key:"apply",value:function(e,t){var r=this,n=t.styleAttributeService;e.hooks.init.tapPromise("FeatureScalePlugin",s(i().mark((function t(){var a,o,s;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.log(CD.ScaleInitStart,pP.INIT),r.scaleOptions=e.getScaleOptions(),o=n.getLayerStyleAttributes(),s=null===(a=e.getSource())||void 0===a?void 0:a.data.dataArray,!Array.isArray(s)||0!==s.length){t.next=8;break}return t.abrupt("return");case 8:r.caculateScalesForAttributes(o||[],s);case 9:e.log(CD.ScaleInitEnd,pP.INIT);case 10:case"end":return t.stop()}}),t)})))),e.hooks.beforeRenderData.tapPromise("FeatureScalePlugin",function(){var t=s(i().mark((function t(a){var o,s;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a){t.next=2;break}return t.abrupt("return",a);case 2:if(e.log(CD.ScaleInitStart,pP.UPDATE),r.scaleOptions=e.getScaleOptions(),o=n.getLayerStyleAttributes(),s=e.getSource().data.dataArray,!Array.isArray(s)||0!==s.length){t.next=8;break}return t.abrupt("return",!0);case 8:return r.caculateScalesForAttributes(o||[],s),e.log(CD.ScaleInitEnd,pP.UPDATE),e.layerModelNeedUpdate=!0,t.abrupt("return",!0);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e.hooks.beforeRender.tap("FeatureScalePlugin",(function(){if(!e.layerModelNeedUpdate){r.scaleOptions=e.getScaleOptions();var t=n.getLayerStyleAttributes(),i=e.getSource().data.dataArray;if((!Array.isArray(i)||0!==i.length)&&t){var a=t.filter((function(e){return e.needRescale}));a.length&&r.caculateScalesForAttributes(a,i)}}}))}},{key:"isNumber",value:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},{key:"caculateScalesForAttributes",value:function(e,t){var r=this;e.forEach((function(e){if(e.scale){var n=e.scale;n.names=r.parseFields(e.scale.field||[]);var i=[];n.names.forEach((function(n){var a;i.push(r.createScale(n,e.name,null===(a=e.scale)||void 0===a?void 0:a.values,t))})),i.some((function(e){return e.type===OD.VARIABLE}))?(n.type=OD.VARIABLE,i.forEach((function(e){var t,r;if(!n.callback&&"text"!==n.values)switch(null===(t=e.option)||void 0===t?void 0:t.type){case ID.LOG:case ID.LINEAR:case ID.POWER:if(n.values&&n.values.length>2){var i=e.scale.ticks(n.values.length);e.scale.domain(i)}n.values?e.scale.range(n.values):e.scale.range(e.option.domain);break;case ID.QUANTILE:case ID.QUANTIZE:case ID.THRESHOLD:e.scale.range(n.values);break;case ID.IDENTITY:break;case ID.CAT:n.values?e.scale.range(n.values):e.scale.range(e.option.domain);break;case ID.DIVERGING:case ID.SEQUENTIAL:e.scale.interpolator(WW(n.values))}"text"===n.values&&e.scale.range(null===(r=e.option)||void 0===r?void 0:r.domain)}))):(n.type=OD.CONSTANT,n.defaultValues=i.map((function(e,t){return e.scale(n.names[t])}))),n.scalers=i.map((function(e){return{field:e.field,func:e.scale,option:e.option}})),e.needRescale=!1}}))}},{key:"parseFields",value:function(e){return Array.isArray(e)?e:rB(e)?e.split("*"):[e]}},{key:"createScale",value:function(e,t,r,n){var i,a,o=this.scaleOptions[t]&&(null===(i=this.scaleOptions[t])||void 0===i?void 0:i.field)===e?this.scaleOptions[t]:this.scaleOptions[e],s={field:e,scale:void 0,type:OD.VARIABLE,option:o};if(!n||!n.length)return o&&o.type?s.scale=this.createDefaultScale(o):(s.scale=fY([e]),s.type=OD.CONSTANT),s;var u=null===(a=n.find((function(t){return!dO(t[e])})))||void 0===a?void 0:a[e];if(this.isNumber(e)||dO(u)&&!o)s.scale=fY([e]),s.type=OD.CONSTANT;else{var c=o&&o.type||this.getDefaultType(u);"text"===r&&(c=ID.CAT);var l=this.createScaleConfig(c,e,o,n);s.scale=this.createDefaultScale(l),s.option=l}return s}},{key:"getDefaultType",value:function(e){var t=ID.LINEAR;return"string"==typeof e&&(t=KZ.test(e)?ID.TIME:ID.CAT),t}},{key:"createScaleConfig",value:function(e,t,r,i){var a={type:e},o=(null==i?void 0:i.map((function(e){return e[t]})))||[];if(null!=r&&r.domain)a.domain=null==r?void 0:r.domain;else if(e===ID.CAT||e===ID.IDENTITY)a.domain=iL(o);else if(e===ID.QUANTILE)a.domain=o;else if(e===ID.DIVERGING){var s=OW(o),u=void 0!==(null==r?void 0:r.neutral)?null==r?void 0:r.neutral:(s[0]+s[1])/2;a.domain=[s[0],u,s[1]]}else a.domain=OW(o);return n(n({},a),r)}},{key:"createDefaultScale",value:function(e){var t=e.type,r=e.domain,n=e.unknown,i=e.clamp,a=e.nice,o=QZ[t]();return r&&o.domain&&o.domain(r),n&&o.unknown(n),void 0!==i&&o.clamp&&o.clamp(i),void 0!==a&&o.nice&&o.nice(a),o}}]),e}())||jZ,JZ=Me()(ZZ=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e){e.hooks.beforeRender.tap("LayerAnimateStylePlugin",(function(){e.animateStatus&&e.models.forEach((function(t){t.addUniforms(n({},e.layerModel.getAnimateUniforms()))}))}))}}]),e}())||ZZ,eq=Me()(qZ=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e){e.hooks.afterInit.tap("LayerMaskPlugin",(function(){var t,r=e.getLayerConfig(),n=r.maskLayers,i=r.enableMask;!e.tileLayer&&n&&n.length>0&&((t=e.masks).push.apply(t,T(n)),e.updateLayerConfig({mask:i}))}))}}]),e}())||qZ,tq=function(){function e(t){var r=t.rendererService,n=t.layerService,i=t.parent;u(this,e),h(this,"tileResource",new Map),h(this,"rendererService",void 0),h(this,"layerService",void 0),h(this,"parent",void 0),h(this,"layerTiles",[]),this.rendererService=r,this.layerService=n,this.parent=i}var t;return l(e,[{key:"tiles",get:function(){return this.layerTiles}},{key:"hasTile",value:function(e){return this.layerTiles.some((function(t){return t.key===e}))}},{key:"addTile",value:function(e){this.layerTiles.push(e)}},{key:"getTile",value:function(e){return this.layerTiles.find((function(t){return t.key===e}))}},{key:"getVisibleTileBylngLat",value:function(e){return this.layerTiles.find((function(t){return t.isLoaded&&t.visible&&t.lnglatInBounds(e)}))}},{key:"getVisibleTileByBox",value:function(e,t){return this.layerTiles.filter((function(r){return r.isLoaded&&r.visible&&r.boxInBounds(e,t)}))}},{key:"removeTile",value:function(e){var t=this.layerTiles.findIndex((function(t){return t.key===e})),r=this.layerTiles.splice(t,1);r[0]&&r[0].destroy()}},{key:"updateTileVisible",value:function(e){var t=this.getTile(e.key);null==t||t.updateVisible(e.isVisible)}},{key:"isParentLoaded",value:function(e){var t=e.parent;if(!t)return!0;var r=this.getTile(null==t?void 0:t.key);return!(null==r||!r.isLoaded)}},{key:"isChildrenLoaded",value:function(e){var t=this,r=null==e?void 0:e.children;return 0===r.length||r.some((function(e){var r=t.getTile(null==e?void 0:e.key);return!1===(null==r?void 0:r.isLoaded)}))}},{key:"render",value:(t=s(i().mark((function e(){var t,r,n=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getRenderLayers(),r=t.map(function(){var e=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.layerService.renderTileLayer(t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=4,Promise.all(r);case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getRenderLayers",value:function(){var e=this.layerTiles.filter((function(e){return e.visible&&e.isLoaded})),t=[];return e.map((function(e){return t.push.apply(t,T(e.getLayers()))})),t}},{key:"getLayers",value:function(){var e=this.layerTiles.filter((function(e){return e.isLoaded})),t=[];return e.map((function(e){return t.push.apply(t,T(e.getLayers()))})),t}},{key:"getTiles",value:function(){return this.layerTiles}},{key:"destroy",value:function(){this.layerTiles.forEach((function(e){return e.destroy()})),this.tileResource.clear()}}]),e}(),rq=N((function(e,t){e.exports=function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}
/**
     * splaytree v3.1.0
     * Fast Splay tree for Node and browser
     *
     * @author Alexander Milevski <info@w8r.name>
     * @license MIT
     * @preserve
     */var n=function(e,t){this.next=null,this.key=e,this.data=t,this.left=null,this.right=null};function i(e,t){return e>t?1:e<t?-1:0}function a(e,t,r){for(var i=new n(null,null),a=i,o=i;;){var s=r(e,t.key);if(s<0){if(null===t.left)break;if(r(e,t.left.key)<0){var u=t.left;if(t.left=u.right,u.right=t,null===(t=u).left)break}o.left=t,o=t,t=t.left}else{if(!(s>0))break;if(null===t.right)break;if(r(e,t.right.key)>0&&(u=t.right,t.right=u.left,u.left=t,null===(t=u).right))break;a.right=t,a=t,t=t.right}}return a.right=t.left,o.left=t.right,t.left=i.right,t.right=i.left,t}function o(e,t,r,i){var o=new n(e,t);if(null===r)return o.left=o.right=null,o;var s=i(e,(r=a(e,r,i)).key);return s<0?(o.left=r.left,o.right=r,r.left=null):s>=0&&(o.right=r.right,o.left=r,r.right=null),o}function s(e,t,r){var n=null,i=null;if(t){var o=r((t=a(e,t,r)).key,e);0===o?(n=t.left,i=t.right):o<0?(i=t.right,t.right=null,n=t):(n=t.left,t.left=null,i=t)}return{left:n,right:i}}var u=function(){function e(e){void 0===e&&(e=i),this._root=null,this._size=0,this._comparator=e}return e.prototype.insert=function(e,t){return this._size++,this._root=o(e,t,this._root,this._comparator)},e.prototype.add=function(e,t){var r=new n(e,t);null===this._root&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,o=a(e,this._root,i),s=i(e,o.key);return 0===s?this._root=o:(s<0?(r.left=o.left,r.right=o,o.left=null):s>0&&(r.right=o.right,r.left=o,o.right=null),this._size++,this._root=r),this._root},e.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},e.prototype._remove=function(e,t,r){var n;return null===t?null:0===r(e,(t=a(e,t,r)).key)?(null===t.left?n=t.right:(n=a(e,t.left,r)).right=t.right,this._size--,n):t},e.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=a(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},e.prototype.findStatic=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return t;t=n<0?t.left:t.right}return null},e.prototype.find=function(e){return this._root&&(this._root=a(e,this._root,this._comparator),0!==this._comparator(e,this._root.key))?null:this._root},e.prototype.contains=function(e){for(var t=this._root,r=this._comparator;t;){var n=r(e,t.key);if(0===n)return!0;t=n<0?t.left:t.right}return!1},e.prototype.forEach=function(e,t){for(var r=this._root,n=[],i=!1;!i;)null!==r?(n.push(r),r=r.left):0!==n.length?(r=n.pop(),e.call(t,r),r=r.right):i=!0;return this},e.prototype.range=function(e,t,r,n){for(var i=[],a=this._comparator,o=this._root;0!==i.length||o;)if(o)i.push(o),o=o.left;else{if(a((o=i.pop()).key,t)>0)break;if(a(o.key,e)>=0&&r.call(n,o))return this;o=o.right}return this},e.prototype.keys=function(){var e=[];return this.forEach((function(t){var r=t.key;return e.push(r)})),e},e.prototype.values=function(){var e=[];return this.forEach((function(t){var r=t.data;return e.push(r)})),e},e.prototype.min=function(){return this._root?this.minNode(this._root).key:null},e.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},e.prototype.minNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.left;)e=e.left;return e},e.prototype.maxNode=function(e){if(void 0===e&&(e=this._root),e)for(;e.right;)e=e.right;return e},e.prototype.at=function(e){for(var t=this._root,r=!1,n=0,i=[];!r;)if(t)i.push(t),t=t.left;else if(i.length>0){if(t=i.pop(),n===e)return t;n++,t=t.right}else r=!0;return null},e.prototype.next=function(e){var t=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(0===i)break;i<0?(r=t,t=t.left):t=t.right}return r},e.prototype.prev=function(e){var t=this._root,r=null;if(null!==e.left){for(r=e.left;r.right;)r=r.right;return r}for(var n=this._comparator;t;){var i=n(e.key,t.key);if(0===i)break;i<0?t=t.left:(r=t,t=t.right)}return r},e.prototype.clear=function(){return this._root=null,this._size=0,this},e.prototype.toList=function(){return function(e){for(var t=e,r=[],i=!1,a=new n(null,null),o=a;!i;)t?(r.push(t),t=t.left):r.length>0?t=(t=o=o.next=r.pop()).right:i=!0;return o.next=null,a.next}(this._root)},e.prototype.load=function(e,t,r){void 0===t&&(t=[]),void 0===r&&(r=!1);var i=e.length,a=this._comparator;if(r&&function e(t,r,n,i,a){if(!(n>=i)){for(var o=t[n+i>>1],s=n-1,u=i+1;;){do{s++}while(a(t[s],o)<0);do{u--}while(a(t[u],o)>0);if(s>=u)break;var c=t[s];t[s]=t[u],t[u]=c,c=r[s],r[s]=r[u],r[u]=c}e(t,r,n,u,a),e(t,r,u+1,i,a)}}(e,t,0,i-1,a),null===this._root)this._root=function e(t,r,i,a){var o=a-i;if(o>0){var s=i+Math.floor(o/2),u=t[s],c=r[s],l=new n(u,c);return l.left=e(t,r,i,s),l.right=e(t,r,s+1,a),l}return null}(e,t,0,i),this._size=i;else{var o=function(e,t,r){for(var i=new n(null,null),a=i,o=e,s=t;null!==o&&null!==s;)r(o.key,s.key)<0?(a.next=o,o=o.next):(a.next=s,s=s.next),a=a.next;return null!==o?a.next=o:null!==s&&(a.next=s),i.next}(this.toList(),function(e,t){for(var r=new n(null,null),i=r,a=0;a<e.length;a++)i=i.next=new n(e[a],t[a]);return i.next=null,r.next}(e,t),a);i=this._size+i,this._root=function e(t,r,n){var i=n-r;if(i>0){var a=r+Math.floor(i/2),o=e(t,r,a),s=t.head;return s.left=o,t.head=t.head.next,s.right=e(t,a+1,n),s}return null}({head:o},0,i)}return this},e.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),e.prototype.toString=function(e){void 0===e&&(e=function(e){return String(e.key)});var t=[];return function e(t,r,n,i,a){if(t){i(r+(n?"└── ":"├── ")+a(t)+"\n");var o=r+(n?"    ":"│   ");t.left&&e(t.left,o,!1,i,a),t.right&&e(t.right,o,!0,i,a)}}(this._root,"",!0,(function(e){return t.push(e)}),e),t.join("")},e.prototype.update=function(e,t,r){var n=this._comparator,i=s(e,this._root,n),u=i.left,c=i.right;n(e,t)<0?c=o(t,r,c,n):u=o(t,r,u,n),this._root=function(e,t,r){return null===t?e:(null===e||((t=a(e.key,t,r)).left=e),t)}(u,c,n)},e.prototype.split=function(e){return s(e,this._root,this._comparator)},e}(),c=function(e,t){return e.ll.x<=t.x&&t.x<=e.ur.x&&e.ll.y<=t.y&&t.y<=e.ur.y},l=function(e,t){if(t.ur.x<e.ll.x||e.ur.x<t.ll.x||t.ur.y<e.ll.y||e.ur.y<t.ll.y)return null;var r=e.ll.x<t.ll.x?t.ll.x:e.ll.x,n=e.ur.x<t.ur.x?e.ur.x:t.ur.x;return{ll:{x:r,y:e.ll.y<t.ll.y?t.ll.y:e.ll.y},ur:{x:n,y:e.ur.y<t.ur.y?e.ur.y:t.ur.y}}},h=Number.EPSILON;void 0===h&&(h=Math.pow(2,-52));var f=h*h,p=function(e,t){if(-h<e&&e<h&&-h<t&&t<h)return 0;var r=e-t;return r*r<f*e*t?0:e<t?-1:1},d=function(){function t(){e(this,t),this.reset()}return r(t,[{key:"reset",value:function(){this.xRounder=new v,this.yRounder=new v}},{key:"round",value:function(e,t){return{x:this.xRounder.round(e),y:this.yRounder.round(t)}}}]),t}(),v=function(){function t(){e(this,t),this.tree=new u,this.round(0)}return r(t,[{key:"round",value:function(e){var t=this.tree.add(e),r=this.tree.prev(t);if(null!==r&&0===p(t.key,r.key))return this.tree.remove(e),r.key;var n=this.tree.next(t);return null!==n&&0===p(t.key,n.key)?(this.tree.remove(e),n.key):e}}]),t}(),g=new d,m=function(e,t){return e.x*t.y-e.y*t.x},y=function(e,t){return e.x*t.x+e.y*t.y},_=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y},a=m(n,i);return p(a,0)},b=function(e){return Math.sqrt(y(e,e))},x=function(e,t,r){var n={x:t.x-e.x,y:t.y-e.y},i={x:r.x-e.x,y:r.y-e.y};return y(i,n)/b(i)/b(n)},S=function(e,t,r){return 0===t.y?null:{x:e.x+t.x/t.y*(r-e.y),y:r}},E=function(e,t,r){return 0===t.x?null:{x:r,y:e.y+t.y/t.x*(r-e.x)}},A=function(){function t(r,n){e(this,t),void 0===r.events?r.events=[this]:r.events.push(this),this.point=r,this.isLeft=n}return r(t,null,[{key:"compare",value:function(e,r){var n=t.comparePoints(e.point,r.point);return 0!==n?n:(e.point!==r.point&&e.link(r),e.isLeft!==r.isLeft?e.isLeft?1:-1:w.compare(e.segment,r.segment))}},{key:"comparePoints",value:function(e,t){return e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0}}]),r(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var t=e.point.events,r=0,n=t.length;r<n;r++){var i=t[r];this.point.events.push(i),i.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var e=this.point.events.length,t=0;t<e;t++){var r=this.point.events[t];if(void 0===r.segment.consumedBy)for(var n=t+1;n<e;n++){var i=this.point.events[n];void 0===i.consumedBy&&r.otherSE.point.events===i.otherSE.point.events&&r.segment.consume(i.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var e=[],t=0,r=this.point.events.length;t<r;t++){var n=this.point.events[t];n!==this&&!n.segment.ringOut&&n.segment.isInResult()&&e.push(n)}return e}},{key:"getLeftmostComparator",value:function(e){var t=this,r=new Map,n=function(n){var i,a,o,s,u,c=n.otherSE;r.set(n,{sine:(i=t.point,a=e.point,o=c.point,s={x:a.x-i.x,y:a.y-i.y},u={x:o.x-i.x,y:o.y-i.y},m(u,s)/b(u)/b(s)),cosine:x(t.point,e.point,c.point)})};return function(e,t){r.has(e)||n(e),r.has(t)||n(t);var i=r.get(e),a=i.sine,o=i.cosine,s=r.get(t),u=s.sine,c=s.cosine;return a>=0&&u>=0?o<c?1:o>c?-1:0:a<0&&u<0?o<c?-1:o>c?1:0:u<a?-1:u>a?1:0}}}]),t}(),T=0,w=function(){function t(r,n,i,a){e(this,t),this.id=++T,this.leftSE=r,r.segment=this,r.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=r,this.rings=i,this.windings=a}return r(t,null,[{key:"compare",value:function(e,t){var r=e.leftSE.point.x,n=t.leftSE.point.x,i=e.rightSE.point.x,a=t.rightSE.point.x;if(a<r)return 1;if(i<n)return-1;var o=e.leftSE.point.y,s=t.leftSE.point.y,u=e.rightSE.point.y,c=t.rightSE.point.y;if(r<n){if(s<o&&s<u)return 1;if(s>o&&s>u)return-1;var l=e.comparePoint(t.leftSE.point);if(l<0)return 1;if(l>0)return-1;var h=t.comparePoint(e.rightSE.point);return 0!==h?h:-1}if(r>n){if(o<s&&o<c)return-1;if(o>s&&o>c)return 1;var f=t.comparePoint(e.leftSE.point);if(0!==f)return f;var p=e.comparePoint(t.rightSE.point);return p<0?1:p>0?-1:1}if(o<s)return-1;if(o>s)return 1;if(i<a){var d=t.comparePoint(e.rightSE.point);if(0!==d)return d}if(i>a){var v=e.comparePoint(t.rightSE.point);if(v<0)return 1;if(v>0)return-1}if(i!==a){var g=u-o,m=i-r,y=c-s,_=a-n;if(g>m&&y<_)return 1;if(g<m&&y>_)return-1}return i>a?1:i<a||u<c?-1:u>c?1:e.id<t.id?-1:e.id>t.id?1:0}}]),r(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,t=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:e<t?e:t},ur:{x:this.rightSE.point.x,y:e>t?e:t}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var t=this.leftSE.point,r=this.rightSE.point,n=this.vector();if(t.x===r.x)return e.x===t.x?0:e.x<t.x?1:-1;var i=(e.y-t.y)/n.y,a=t.x+i*n.x;if(e.x===a)return 0;var o=(e.x-t.x)/n.x,s=t.y+o*n.y;return e.y===s?0:e.y<s?-1:1}},{key:"getIntersection",value:function(e){var t=this.bbox(),r=e.bbox(),n=l(t,r);if(null===n)return null;var i=this.leftSE.point,a=this.rightSE.point,o=e.leftSE.point,s=e.rightSE.point,u=c(t,o)&&0===this.comparePoint(o),h=c(r,i)&&0===e.comparePoint(i),f=c(t,s)&&0===this.comparePoint(s),p=c(r,a)&&0===e.comparePoint(a);if(h&&u)return p&&!f?a:!p&&f?s:null;if(h)return f&&i.x===s.x&&i.y===s.y?null:i;if(u)return p&&a.x===o.x&&a.y===o.y?null:o;if(p&&f)return null;if(p)return a;if(f)return s;var d=function(e,t,r,n){if(0===t.x)return E(r,n,e.x);if(0===n.x)return E(e,t,r.x);if(0===t.y)return S(r,n,e.y);if(0===n.y)return S(e,t,r.y);var i=m(t,n);if(0==i)return null;var a={x:r.x-e.x,y:r.y-e.y},o=m(a,t)/i,s=m(a,n)/i;return{x:(e.x+s*t.x+(r.x+o*n.x))/2,y:(e.y+s*t.y+(r.y+o*n.y))/2}}(i,this.vector(),o,e.vector());return null===d?null:c(n,d)?g.round(d.x,d.y):null}},{key:"split",value:function(e){var r=[],n=void 0!==e.events,i=new A(e,!0),a=new A(e,!1),o=this.rightSE;this.replaceRightSE(a),r.push(a),r.push(i);var s=new t(i,o,this.rings.slice(),this.windings.slice());return A.comparePoints(s.leftSE.point,s.rightSE.point)>0&&s.swapEvents(),A.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(i.checkForConsuming(),a.checkForConsuming()),r}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var t=0,r=this.windings.length;t<r;t++)this.windings[t]*=-1}},{key:"consume",value:function(e){for(var r=this,n=e;r.consumedBy;)r=r.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var i=t.compare(r,n);if(0!==i){if(i>0){var a=r;r=n,n=a}if(r.prev===n){var o=r;r=n,n=o}for(var s=0,u=n.rings.length;s<u;s++){var c=n.rings[s],l=n.windings[s],h=r.rings.indexOf(c);-1===h?(r.rings.push(c),r.windings.push(l)):r.windings[h]+=l}n.rings=null,n.windings=null,n.consumedBy=r,n.leftSE.consumedBy=r.leftSE,n.rightSE.consumedBy=r.rightSE}}},{key:"prevInResult",value:function(){return void 0!==this._prevInResult||(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null),this._prevInResult}},{key:"beforeState",value:function(){if(void 0!==this._beforeState)return this._beforeState;if(this.prev){var e=this.prev.consumedBy||this.prev;this._beforeState=e.afterState()}else this._beforeState={rings:[],windings:[],multiPolys:[]};return this._beforeState}},{key:"afterState",value:function(){if(void 0!==this._afterState)return this._afterState;var e=this.beforeState();this._afterState={rings:e.rings.slice(0),windings:e.windings.slice(0),multiPolys:[]};for(var t=this._afterState.rings,r=this._afterState.windings,n=this._afterState.multiPolys,i=0,a=this.rings.length;i<a;i++){var o=this.rings[i],s=this.windings[i],u=t.indexOf(o);-1===u?(t.push(o),r.push(s)):r[u]+=s}for(var c=[],l=[],h=0,f=t.length;h<f;h++)if(0!==r[h]){var p=t[h],d=p.poly;if(-1===l.indexOf(d))if(p.isExterior)c.push(d);else{-1===l.indexOf(d)&&l.push(d);var v=c.indexOf(p.poly);-1!==v&&c.splice(v,1)}}for(var g=0,m=c.length;g<m;g++){var y=c[g].multiPoly;-1===n.indexOf(y)&&n.push(y)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(void 0!==this._isInResult)return this._isInResult;var e=this.beforeState().multiPolys,t=this.afterState().multiPolys;switch(D.type){case"union":var r=0===e.length,n=0===t.length;this._isInResult=r!==n;break;case"intersection":var i,a;e.length<t.length?(i=e.length,a=t.length):(i=t.length,a=e.length),this._isInResult=a===D.numMultiPolys&&i<a;break;case"xor":var o=Math.abs(e.length-t.length);this._isInResult=o%2==1;break;case"difference":var s=function(e){return 1===e.length&&e[0].isSubject};this._isInResult=s(e)!==s(t);break;default:throw new Error("Unrecognized operation type found ".concat(D.type))}return this._isInResult}}],[{key:"fromRing",value:function(e,r,n){var i,a,o,s=A.comparePoints(e,r);if(s<0)i=e,a=r,o=1;else{if(!(s>0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));i=r,a=e,o=-1}return new t(new A(i,!0),new A(a,!1),[n],[o])}}]),t}(),C=function(){function t(r,n,i){if(e(this,t),!Array.isArray(r)||0===r.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=i,this.segments=[],"number"!=typeof r[0][0]||"number"!=typeof r[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var a=g.round(r[0][0],r[0][1]);this.bbox={ll:{x:a.x,y:a.y},ur:{x:a.x,y:a.y}};for(var o=a,s=1,u=r.length;s<u;s++){if("number"!=typeof r[s][0]||"number"!=typeof r[s][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var c=g.round(r[s][0],r[s][1]);c.x===o.x&&c.y===o.y||(this.segments.push(w.fromRing(o,c,this)),c.x<this.bbox.ll.x&&(this.bbox.ll.x=c.x),c.y<this.bbox.ll.y&&(this.bbox.ll.y=c.y),c.x>this.bbox.ur.x&&(this.bbox.ur.x=c.x),c.y>this.bbox.ur.y&&(this.bbox.ur.y=c.y),o=c)}a.x===o.x&&a.y===o.y||this.segments.push(w.fromRing(o,a,this))}return r(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,r=this.segments.length;t<r;t++){var n=this.segments[t];e.push(n.leftSE),e.push(n.rightSE)}return e}}]),t}(),k=function(){function t(r,n){if(e(this,t),!Array.isArray(r))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new C(r[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var i=1,a=r.length;i<a;i++){var o=new C(r[i],this,!1);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=n}return r(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),t=0,r=this.interiorRings.length;t<r;t++)for(var n=this.interiorRings[t].getSweepEvents(),i=0,a=n.length;i<a;i++)e.push(n[i]);return e}}]),t}(),M=function(){function t(r,n){if(e(this,t),!Array.isArray(r))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{"number"==typeof r[0][0][0]&&(r=[r])}catch(e){}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,a=r.length;i<a;i++){var o=new k(r[i],this);o.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=o.bbox.ll.x),o.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=o.bbox.ll.y),o.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=n}return r(t,[{key:"getSweepEvents",value:function(){for(var e=[],t=0,r=this.polys.length;t<r;t++)for(var n=this.polys[t].getSweepEvents(),i=0,a=n.length;i<a;i++)e.push(n[i]);return e}}]),t}(),P=function(){function t(r){e(this,t),this.events=r;for(var n=0,i=r.length;n<i;n++)r[n].segment.ringOut=this;this.poly=null}return r(t,null,[{key:"factory",value:function(e){for(var r=[],n=0,i=e.length;n<i;n++){var a=e[n];if(a.isInResult()&&!a.ringOut){for(var o=null,s=a.leftSE,u=a.rightSE,c=[s],l=s.point,h=[];o=s,s=u,c.push(s),s.point!==l;)for(;;){var f=s.getAvailableLinkedEvents();if(0===f.length){var p=c[0].point,d=c[c.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(p.x,",")+" ".concat(p.y,"]. Last matching segment found ends at")+" [".concat(d.x,", ").concat(d.y,"]."))}if(1===f.length){u=f[0].otherSE;break}for(var v=null,g=0,m=h.length;g<m;g++)if(h[g].point===s.point){v=g;break}if(null===v){h.push({index:c.length,point:s.point});var y=s.getLeftmostComparator(o);u=f.sort(y)[0].otherSE;break}var _=h.splice(v)[0],b=c.splice(_.index);b.unshift(b[0].otherSE),r.push(new t(b.reverse()))}r.push(new t(c))}}return r}}]),r(t,[{key:"getGeom",value:function(){for(var e=this.events[0].point,t=[e],r=1,n=this.events.length-1;r<n;r++){var i=this.events[r].point,a=this.events[r+1].point;0!==_(i,e,a)&&(t.push(i),e=i)}if(1===t.length)return null;var o=t[0],s=t[1];0===_(o,e,s)&&t.shift(),t.push(t[0]);for(var u=this.isExteriorRing()?1:-1,c=this.isExteriorRing()?0:t.length-1,l=this.isExteriorRing()?t.length:-1,h=[],f=c;f!=l;f+=u)h.push([t[f].x,t[f].y]);return h}},{key:"isExteriorRing",value:function(){if(void 0===this._isExteriorRing){var e=this.enclosingRing();this._isExteriorRing=!e||!e.isExteriorRing()}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return void 0===this._enclosingRing&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var e=this.events[0],t=1,r=this.events.length;t<r;t++){var n=this.events[t];A.compare(e,n)>0&&(e=n)}for(var i=e.segment.prevInResult(),a=i?i.prevInResult():null;;){if(!i)return null;if(!a)return i.ringOut;if(a.ringOut!==i.ringOut)return a.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=a.prevInResult(),a=i?i.prevInResult():null}}}]),t}(),I=function(){function t(r){e(this,t),this.exteriorRing=r,r.poly=this,this.interiorRings=[]}return r(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(null===e[0])return null;for(var t=0,r=this.interiorRings.length;t<r;t++){var n=this.interiorRings[t].getGeom();null!==n&&e.push(n)}return e}}]),t}(),O=function(){function t(r){e(this,t),this.rings=r,this.polys=this._composePolys(r)}return r(t,[{key:"getGeom",value:function(){for(var e=[],t=0,r=this.polys.length;t<r;t++){var n=this.polys[t].getGeom();null!==n&&e.push(n)}return e}},{key:"_composePolys",value:function(e){for(var t=[],r=0,n=e.length;r<n;r++){var i=e[r];if(!i.poly)if(i.isExteriorRing())t.push(new I(i));else{var a=i.enclosingRing();a.poly||t.push(new I(a)),a.poly.addInterior(i)}}return t}}]),t}(),R=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.compare;e(this,t),this.queue=r,this.tree=new u(n),this.segments=[]}return r(t,[{key:"process",value:function(e){var t=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(t),r;var n=e.isLeft?this.tree.insert(t):this.tree.find(t);if(!n)throw new Error("Unable to find segment #".concat(t.id," ")+"[".concat(t.leftSE.point.x,", ").concat(t.leftSE.point.y,"] -> ")+"[".concat(t.rightSE.point.x,", ").concat(t.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=n,a=n,o=void 0,s=void 0;void 0===o;)null===(i=this.tree.prev(i))?o=null:void 0===i.key.consumedBy&&(o=i.key);for(;void 0===s;)null===(a=this.tree.next(a))?s=null:void 0===a.key.consumedBy&&(s=a.key);if(e.isLeft){var u=null;if(o){var c=o.getIntersection(t);if(null!==c&&(t.isAnEndpoint(c)||(u=c),!o.isAnEndpoint(c)))for(var l=this._splitSafely(o,c),h=0,f=l.length;h<f;h++)r.push(l[h])}var p=null;if(s){var d=s.getIntersection(t);if(null!==d&&(t.isAnEndpoint(d)||(p=d),!s.isAnEndpoint(d)))for(var v=this._splitSafely(s,d),g=0,m=v.length;g<m;g++)r.push(v[g])}if(null!==u||null!==p){var y=null;y=null===u?p:null===p||A.comparePoints(u,p)<=0?u:p,this.queue.remove(t.rightSE),r.push(t.rightSE);for(var _=t.split(y),b=0,x=_.length;b<x;b++)r.push(_[b])}r.length>0?(this.tree.remove(t),r.push(e)):(this.segments.push(t),t.prev=o)}else{if(o&&s){var S=o.getIntersection(s);if(null!==S){if(!o.isAnEndpoint(S))for(var E=this._splitSafely(o,S),T=0,w=E.length;T<w;T++)r.push(E[T]);if(!s.isAnEndpoint(S))for(var C=this._splitSafely(s,S),k=0,M=C.length;k<M;k++)r.push(C[k])}}this.tree.remove(t)}return r}},{key:"_splitSafely",value:function(e,t){this.tree.remove(e);var r=e.rightSE;this.queue.remove(r);var n=e.split(t);return n.push(r),void 0===e.consumedBy&&this.tree.insert(e),n}}]),t}(),L="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,N="undefined"!=typeof process&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,D=new(function(){function t(){e(this,t)}return r(t,[{key:"run",value:function(e,t,r){D.type=e,g.reset();for(var n=[new M(t,!0)],i=0,a=r.length;i<a;i++)n.push(new M(r[i],!1));if(D.numMultiPolys=n.length,"difference"===D.type)for(var o=n[0],s=1;s<n.length;)null!==l(n[s].bbox,o.bbox)?s++:n.splice(s,1);if("intersection"===D.type)for(var c=0,h=n.length;c<h;c++)for(var f=n[c],p=c+1,d=n.length;p<d;p++)if(null===l(f.bbox,n[p].bbox))return[];for(var v=new u(A.compare),m=0,y=n.length;m<y;m++)for(var _=n[m].getSweepEvents(),b=0,x=_.length;b<x;b++)if(v.insert(_[b]),v.size>L)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var S=new R(v),E=v.size,T=v.pop();T;){var w=T.key;if(v.size===E){var C=w.segment;throw new Error("Unable to pop() ".concat(w.isLeft?"left":"right"," SweepEvent ")+"[".concat(w.point.x,", ").concat(w.point.y,"] from segment #").concat(C.id," ")+"[".concat(C.leftSE.point.x,", ").concat(C.leftSE.point.y,"] -> ")+"[".concat(C.rightSE.point.x,", ").concat(C.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(v.size>L)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(S.segments.length>N)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var k=S.process(w),I=0,F=k.length;I<F;I++){var z=k[I];void 0===z.consumedBy&&v.insert(z)}E=v.size,T=v.pop()}g.reset();var B=P.factory(S.segments);return new O(B).getGeom()}}]),t}());return{union:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return D.run("union",e,r)},intersection:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return D.run("intersection",e,r)},xor:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return D.run("xor",e,r)},difference:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return D.run("difference",e,r)}}}()}));function nq(e,t,r){void 0===r&&(r={});var n=EF(e),i=EF(t),a=rq.union(n.coordinates,i.coordinates);return 0===a.length?null:1===a.length?tb(a[0],r.properties):function(e,t,r){return void 0===r&&(r={}),eb({type:"MultiPolygon",coordinates:e},t,r)}(a,r.properties)}var iq=function(){function e(){u(this,e)}return l(e,[{key:"getCombineFeature",value:function(e){var t=null,r=e[0];return e.map((function(e){var r=tb(e.coordinates);t=null===t?r:nq(t,r)})),r&&(t.properties=n({},r)),t}}]),e}(),aq=function(){function e(t){var r=t.layerService,n=t.tileLayerService,i=t.parent;u(this,e),h(this,"layerService",void 0),h(this,"tileLayerService",void 0),h(this,"tileSourceService",void 0),h(this,"parent",void 0),h(this,"tilePickID",new Map),this.layerService=r,this.tileLayerService=n,this.parent=i,this.tileSourceService=new iq}return l(e,[{key:"pickRender",value:function(e){var t=this.tileLayerService.getVisibleTileBylngLat(e.lngLat);if(t){var r=t.getMainLayer();null==r||r.layerPickService.pickRender(e)}}},{key:"pickBoxSelectTiles",value:function(e,t){var r=A(e,4),n=r[0],i=r[1],a=r[2],o=r[3],s=t.unproject({x:n,y:i}),u=t.unproject({x:a,y:o});this.tileLayerService.getVisibleTileByBox(s,u).forEach((function(e){var t=e.getMainLayer();null==t||t.layerPickService.pickRender(s)}))}},{key:"pick",value:function(e,t){var r=this.parent.getContainer().get(ba.IPickingService);if("RasterLayer"===e.type){var n=this.tileLayerService.getVisibleTileBylngLat(t.lngLat);if(n&&void 0!==n.getMainLayer()){var i=n.getMainLayer();return i.layerPickService.pickRasterLayer(i,t,this.parent)}return!1}return this.pickRender(t),r.pickFromPickingFBO(e,t)}},{key:"selectFeature",value:function(e){var t=A(e,3),r=t[0],n=t[1],i=t[2],a=this.color2PickId(r,n,i);this.tilePickID.set("select",a),this.updateHighLight(r,n,i,"select")}},{key:"highlightPickedFeature",value:function(e){var t=A(e,3),r=t[0],n=t[1],i=t[2],a=this.color2PickId(r,n,i);this.tilePickID.set("active",a),this.updateHighLight(r,n,i,"active")}},{key:"updateHighLight",value:function(e,t,r,n){this.tileLayerService.tiles.map((function(i){var a=i.getMainLayer();switch(n){case"select":null==a||a.hooks.beforeSelect.call([e,t,r]);break;case"active":null==a||a.hooks.beforeHighlight.call([e,t,r])}}))}},{key:"setPickState",value:function(){var e=this.tilePickID.get("select"),t=this.tilePickID.get("active");if(e){var r=A(this.pickId2Color(e),3),n=r[0],i=r[1],a=r[2];this.updateHighLight(n,i,a,"select")}else if(t){var o=A(this.pickId2Color(t),3),s=o[0],u=o[1],c=o[2];this.updateHighLight(s,u,c,"active")}else;}},{key:"color2PickId",value:function(e,t,r){return Bg(new Uint8Array([e,t,r]))}},{key:"pickId2Color",value:function(e){return Ug(e)}},{key:"getFeatureById",value:function(e,t){var r=this.tileLayerService.getTiles().filter((function(e){return e.visible})),n=[];return r.forEach((function(r){n.push.apply(n,T(r.getFeatureById(e,t)))})),n}},{key:"pickRasterLayer",value:function(e,t,r){return!1}}]),e}(),oq=["shape","color","size","style","animate","filter","rotate","scale","setBlend","setSelect","setActive","disableMask","enableMask"];function sq(e){return"PolygonLayer"===e?HH:"LineLayer"===e?pH:BH}function uq(e){return-1!==["PolygonLayer","LineLayer"].indexOf(e)}var cq=function(){function e(t,r){u(this,e),h(this,"x",void 0),h(this,"y",void 0),h(this,"z",void 0),h(this,"key",void 0),h(this,"parent",void 0),h(this,"sourceTile",void 0),h(this,"visible",!0),h(this,"layers",[]),h(this,"isLoaded",!1),h(this,"tileMaskLayers",[]),h(this,"tileMask",void 0),this.parent=r,this.sourceTile=t,this.x=t.x,this.y=t.y,this.z=t.z,this.key="".concat(this.x,"_").concat(this.y,"_").concat(this.z)}var t,r,a;return l(e,[{key:"getLayers",value:function(){return this.layers}},{key:"styleUpdate",value:function(){}},{key:"lnglatInBounds",value:function(e){var t=A(this.sourceTile.bounds,4),r=t[0],n=t[1],i=t[2],a=t[3],o=e.lng,s=e.lat;return o>=r&&o<=i&&s>=n&&s<=a}},{key:"boxInBounds",value:function(e,t){var r=A(this.sourceTile.bounds,4),n=r[0],i=r[1],a=r[2],o=r[3],s=e.lng,u=e.lat,c=t.lng,l=t.lat;return n>=s&&a<=c&&i>=u&&o<=l||n<=s&&a>=s||n<=c&&a>=c||i<=u&&o>=u||i<=l&&o>=l}},{key:"getLayerOptions",value:function(){var e,t=this.parent.getLayerConfig();return n(n({},t),{},{textAllowOverlap:!0,autoFit:!1,maskLayers:this.getMaskLayer(),tileMask:uq(this.parent.type),mask:t.mask||0!==(null===(e=t.maskLayers)||void 0===e?void 0:e.length)&&t.enableMask})}},{key:"getMaskLayer",value:function(){var e=this,t=this.parent.getLayerConfig().maskLayers,r=[];return null==t||t.forEach((function(t){if(!t.tileLayer)return r.push(t),t;var n=t.tileLayer.getTile(e.sourceTile.key),i=null==n?void 0:n.getLayers()[0];i&&r.push(i)})),r}},{key:"addTileMask",value:(a=s(i().mark((function e(){var t,r,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new HH({visible:!1,enablePicking:!1}).source({type:"FeatureCollection",features:[this.sourceTile.bboxPolygon]},{parser:{type:"geojson",featureId:"id"}}).shape("fill"),r=bD(this.parent.sceneContainer),t.setContainer(r,this.parent.sceneContainer),e.next=5,t.init();case 5:return this.tileMask=t,void 0!==(n=this.getMainLayer())&&(n.tileMask=t),e.abrupt("return",t);case 9:case"end":return e.stop()}}),e,this)}))),function(){return a.apply(this,arguments)})},{key:"addMask",value:(r=s(i().mark((function e(t,r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=bD(this.parent.sceneContainer),r.setContainer(n,this.parent.sceneContainer),e.next=4,r.init();case 4:t.addMask(r),this.tileMaskLayers.push(r);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addLayer",value:(t=s(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.isTileLayer=!0,r=bD(this.parent.sceneContainer),t.setContainer(r,this.parent.sceneContainer),this.layers.push(t),e.next=6,t.init();case 6:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"updateVisible",value:function(e){this.visible=e,this.updateOptions("visible",e)}},{key:"updateOptions",value:function(e,t){this.layers.forEach((function(r){r.updateLayerConfig(h({},e,t))}))}},{key:"getMainLayer",value:function(){return this.layers[0]}},{key:"getFeatures",value:function(e){return[]}},{key:"getFeatureById",value:function(e){return[]}},{key:"destroy",value:function(){var e;null===(e=this.tileMask)||void 0===e||e.destroy(),this.layers.forEach((function(e){return e.destroy()}))}}]),e}(),lq=function(e){f(n,e);var t,r=x(n);function n(){return u(this,n),r.apply(this,arguments)}return l(n,[{key:"initTileLayer",value:(t=s(i().mark((function e(){var t,r,n,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getSourceOption(),r=t.data.features[0].properties,n=(new pH).source(t.data,t.options).size(1).shape("line").color("red"),a=new BH({minZoom:this.z-1,maxZoom:this.z+1,textAllowOverlap:!0}).source([r],{parser:{type:"json",x:"x",y:"y"}}).size(20).color("red").shape(this.key).style({stroke:"#fff",strokeWidth:2}),e.next=6,this.addLayer(n);case 6:return e.next=8,this.addLayer(a);case 8:this.isLoaded=!0;case 9:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getSourceOption",value:function(){var e=this.parent.getSource();return{data:{type:"FeatureCollection",features:this.sourceTile.data.layers.testTile.features},options:{parser:{type:"geojson"},transforms:e.transforms}}}}]),n}(cq),hq=function(e){f(a,e);var t,r=x(a);function a(){return u(this,a),r.apply(this,arguments)}return l(a,[{key:"initTileLayer",value:(t=s(i().mark((function e(){var t,r,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.parent.getLayerAttributeConfig(),r=this.getLayerOptions(),a=this.getSourceOption(),o=new YG(n({},r)).source(a.data,a.options),t&&Object.keys(t).forEach((function(e){var r,n,i=e;o[i](null===(r=t[i])||void 0===r?void 0:r.field,null===(n=t[i])||void 0===n?void 0:n.values)})),e.next=7,this.addLayer(o);case 7:this.isLoaded=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getSourceOption",value:function(){var e=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:e.transforms}}}}]),a}(cq),fq=function(e){f(a,e);var t,r=x(a);function a(){return u(this,a),r.apply(this,arguments)}return l(a,[{key:"initTileLayer",value:(t=s(i().mark((function e(){var t,r,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.parent.getLayerAttributeConfig(),r=this.getLayerOptions(),a=this.getSourceOption(),o=new nW(n({},r)).source(a.data,a.options),t&&Object.keys(t).forEach((function(e){var r,n,i=e;o[i](null===(r=t[i])||void 0===r?void 0:r.field,null===(n=t[i])||void 0===n?void 0:n.values)})),e.next=7,this.addLayer(o);case 7:this.isLoaded=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getFeatures",value:function(e){return e?this.sourceTile.data.getTileData(e):[]}},{key:"getSourceOption",value:function(){var e=this.parent.getSource(),t=this.parent.getLayerConfig(),r=t.sourceLayer,n=t.featureId;return{data:{type:"FeatureCollection",features:this.getFeatures(r)},options:{parser:{type:"geojson",featureId:n},transforms:e.transforms}}}}]),a}(cq),pq=["rasterData"],dq=function(e){f(a,e);var t,r=x(a);function a(){return u(this,a),r.apply(this,arguments)}return l(a,[{key:"initTileLayer",value:(t=s(i().mark((function e(){var t,r,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.parent.getLayerAttributeConfig(),r=this.getLayerOptions(),a=this.getSourceOption(),o=new KH(n({},r)).source(a.data,a.options),t&&Object.keys(t).forEach((function(e){var r,n,i=e;o[i](null===(r=t[i])||void 0===r?void 0:r.field,null===(n=t[i])||void 0===n?void 0:n.values)})),e.next=7,this.addLayer(o);case 7:this.isLoaded=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getSourceOption",value:function(){var e=this.parent.getSource(),t=this.sourceTile.data.data,r=t.rasterData,i=y(t,pq);return{data:r,options:{parser:n({type:"rasterRgb",extent:this.sourceTile.bounds},i),transforms:e.transforms}}}}]),a}(cq),vq=function(e){f(a,e);var t,r=x(a);function a(){return u(this,a),r.apply(this,arguments)}return l(a,[{key:"initTileLayer",value:(t=s(i().mark((function e(){var t,r,a,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.parent.getLayerAttributeConfig(),r=this.getLayerOptions(),a=this.getSourceOption(),o=new KH(n({},r)).source(a.data,a.options),t&&Object.keys(t).forEach((function(e){var r,n,i=e;o[i](null===(r=t[i])||void 0===r?void 0:r.field,null===(n=t[i])||void 0===n?void 0:n.values)})),e.next=7,this.addLayer(o);case 7:this.isLoaded=!0;case 8:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getSourceOption",value:function(){var e=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:e.transforms}}}}]),a}(cq),gq=["rasterData"],mq={positions:[0,1],colors:["#000","#fff"]},yq=function(e){f(a,e);var t,r=x(a);function a(){var e;u(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return h(_(e=r.call.apply(r,[this].concat(n))),"colorTexture",void 0),e}return l(a,[{key:"initTileLayer",value:(t=s(i().mark((function e(){var t,r,a,o,s,u,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.parent.getLayerAttributeConfig(),r=this.getLayerOptions(),a=this.getSourceOption(),o=this.getLayerOptions(),s=o.rampColors,u=o.domain,this.colorTexture=this.parent.textureService.getColorTexture(s,u),c=new KH(n(n({},r),{},{colorTexture:this.colorTexture})).source(a.data,a.options),t&&Object.keys(t).forEach((function(e){var r,n,i=e;c[i](null===(r=t[i])||void 0===r?void 0:r.field,null===(n=t[i])||void 0===n?void 0:n.values)})),e.next=9,this.addLayer(c);case 9:this.isLoaded=!0;case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getSourceOption",value:function(){var e=this.parent.getSource(),t=this.sourceTile.data.data,r=t.rasterData,i=y(t,gq);return{data:r,options:{parser:n({type:"raster",extent:this.sourceTile.bounds},i),transforms:e.transforms}}}},{key:"styleUpdate",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r,a=i.rampColors,o=void 0===a?mq:a,s=i.domain;this.colorTexture=this.parent.textureService.getColorTexture(o,s||Xg(o)),this.layers.forEach((function(t){return t.style({colorTexture:e.colorTexture})}))}},{key:"destroy",value:function(){this.layers.forEach((function(e){return e.destroy()}))}}]),a}(cq),_q=function(e){f(a,e);var t,r=x(a);function a(){return u(this,a),r.apply(this,arguments)}return l(a,[{key:"initTileLayer",value:(t=s(i().mark((function e(){var t,r,a,o,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.parent.getLayerAttributeConfig(),r=this.getLayerOptions(),a=sq(this.parent.type),o=this.getSourceOption()){e.next=7;break}return this.isLoaded=!0,e.abrupt("return");case 7:return s=new a(n({},r)).source(o.data,o.options),Object.keys(t).forEach((function(e){var r,n,i=e;s[i](null===(r=t[i])||void 0===r?void 0:r.field,null===(n=t[i])||void 0===n?void 0:n.values)})),e.next=11,this.addLayer(s);case 11:r.tileMask,this.setLayerMinMaxZoom(s),this.isLoaded=!0;case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getSourceOption",value:function(){var e=this.parent.getSource(),t=this.parent.getLayerConfig(),r=t.sourceLayer,n=void 0===r?"defaultLayer":r,i=t.featureId,a=void 0===i?"id":i;return{data:{type:"FeatureCollection",features:this.getFeatures(n)},options:{parser:{type:"geojson",featureId:a},transforms:e.transforms}}}},{key:"setLayerMinMaxZoom",value:function(e){"text"===e.getModelType()&&e.updateLayerConfig({maxZoom:this.z+1,minZoom:this.z-1})}},{key:"getFeatures",value:function(e){return this.sourceTile.data.getTileData(e)}},{key:"getFeatureById",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",r=this.getMainLayer();if(!r)return[];var n=r.getSource(),i=II(n.data.dataArray.filter((function(t){return t._id===e})));if(0===i.length)return i;if("geojson"===n.parser.type){var a=i.map((function(e){var r=e[t],i=n.originData.features.find((function(e){return e[t]===r||e.properties[t]===r})),a=II(i);return delete e.coordinates,a.properties=e,a}));return a}return i}}]),a}(cq);function bq(e){switch(e.type){case"PolygonLayer":case"LineLayer":case"PointLayer":return _q;case"TileDebugLayer":return lq;case"MaskLayer":return fq;case"RasterLayer":switch(e.getSource().parser.dataType){case DD.RGB:case DD.CUSTOMRGB:return dq;case DD.ARRAYBUFFER:case DD.CUSTOMARRAYBUFFER:return yq;case DD.TERRAINRGB:case DD.CUSTOMTERRAINRGB:return vq;default:return hq}default:return _q}}var xq,Sq,Eq,Aq=function(){function e(t){var r=this;u(this,e),h(this,"parent",void 0),h(this,"tileLayerService",void 0),h(this,"mapService",void 0),h(this,"layerService",void 0),h(this,"rendererService",void 0),h(this,"pickingService",void 0),h(this,"tilePickService",void 0),h(this,"tilesetManager",void 0),h(this,"initedTileset",!1),h(this,"lastViewStates",void 0),h(this,"mapchange",(function(){var e,t=r.getCurrentView(),n=t.latLonBounds,i=t.zoom;if("GAODE1.x"===r.mapService.version){var a=r.parent.getLayerConfig().visible;i<2&&a?(r.parent.updateLayerConfig({visible:!1}),r.layerService.reRender()):i>=2&&!a&&(r.parent.updateLayerConfig({visible:!0}),r.layerService.reRender())}r.lastViewStates&&r.lastViewStates.zoom===i&&r.lastViewStates.latLonBounds.toString()===n.toString()||(r.lastViewStates={zoom:i,latLonBounds:n},null===(e=r.tilesetManager)||void 0===e||e.throttleUpdate(i,n))})),h(this,"viewchange",UE(this.mapchange,24)),this.parent=t;var n=this.parent.getContainer();this.rendererService=n.get(ba.IRendererService),this.layerService=n.get(ba.ILayerService),this.mapService=n.get(ba.IMapService),this.pickingService=n.get(ba.IPickingService),this.tileLayerService=new tq({rendererService:this.rendererService,layerService:this.layerService,parent:t}),this.tilePickService=new aq({tileLayerService:this.tileLayerService,layerService:this.layerService,parent:t}),this.parent.setLayerPickService(this.tilePickService),this.proxy(t),this.initTileSetManager()}var t;return l(e,[{key:"initTileSetManager",value:function(){var e,t=this.parent.getSource();this.tilesetManager=t.tileset,this.initedTileset||(this.bindTilesetEvent(),this.initedTileset=!0);var r=this.getCurrentView(),n=r.latLonBounds,i=r.zoom;null===(e=this.tilesetManager)||void 0===e||e.update(i,n,this.getMap(),this.mapService.version)}},{key:"getCurrentView",value:function(){var e=this.mapService.getBounds();return{latLonBounds:[e[0][0],e[0][1],e[1][0],e[1][1]],zoom:this.mapService.getZoom()}}},{key:"getMap",value:function(){return this.mapService.map}},{key:"bindTilesetEvent",value:function(){var e=this;this.tilesetManager.on("tile-loaded",(function(e){})),this.tilesetManager.on("tile-unload",(function(t){e.tileUnLoad(t)})),this.tilesetManager.on("tile-error",(function(t,r){e.tileError(t)})),this.tilesetManager.on("tile-update",(function(){e.tileUpdate()})),this.mapService.on("zoomend",this.mapchange),this.mapService.on("moveend",this.viewchange)}},{key:"render",value:function(){this.tileLayerService.render()}},{key:"getLayers",value:function(){return this.tileLayerService.getLayers()}},{key:"getTiles",value:function(){return this.tileLayerService.getTiles()}},{key:"getTile",value:function(e){return this.tileLayerService.getTile(e)}},{key:"tileLoaded",value:function(e){}},{key:"tileError",value:function(e){console.warn("error:",e)}},{key:"destroy",value:function(){var e;this.mapService.off("zoomend",this.mapchange),this.mapService.off("moveend",this.viewchange),null===(e=this.tilesetManager)||void 0===e||e.destroy(),this.tileLayerService.destroy()}},{key:"reload",value:function(){var e;this.tilesetManager.clear();var t=this.getCurrentView(),r=t.latLonBounds,n=t.zoom;null===(e=this.tilesetManager)||void 0===e||e.update(n,r)}},{key:"tileUnLoad",value:function(e){this.tileLayerService.removeTile(e.key)}},{key:"tileUpdate",value:(t=s(i().mark((function e(){var t,r,n=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.tilesetManager){e.next=2;break}return e.abrupt("return");case 2:return t=this.parent.getMinZoom(),r=this.parent.getMaxZoom(),e.next=6,Promise.all(this.tilesetManager.tiles.filter((function(e){return e.isLoaded})).filter((function(e){return e.isVisibleChange})).filter((function(e){return e.data})).filter((function(e){return e.z>=t&&e.z<r})).map(function(){var e=s(i().mark((function e(t){var r,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.tileLayerService.hasTile(t.key)){e.next=9;break}return r=bq(n.parent),a=new r(t,n.parent),e.next=5,a.initTileLayer();case 5:n.tilePickService.setPickState(),0!==a.getLayers().length&&(n.tileLayerService.addTile(a),n.tileLayerService.updateTileVisible(t),n.layerService.reRender(n.parent.id)),e.next=12;break;case 9:n.tileLayerService.updateTileVisible(t),n.tilePickService.setPickState(),n.layerService.reRender(n.parent.id);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 6:this.tilesetManager.isLoaded&&this.parent.emit("tiles-loaded",this.tilesetManager.currentTiles);case 7:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"setPickState",value:function(e){}},{key:"pickRender",value:function(e){this.tilePickService.pickRender(e)}},{key:"selectFeature",value:function(e){this.tilePickService.selectFeature(e)}},{key:"highlightPickedFeature",value:function(e){this.tilePickService.highlightPickedFeature(e)}},{key:"proxy",value:function(e){var t=this;oq.forEach((function(r){var n=e[r].bind(e);e[r]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n.apply(void 0,a),t.getLayers().map((function(e){e[r].apply(e,a)})),"style"===r&&t.getTiles().forEach((function(e){return e.styleUpdate.apply(e,a)})),e}}))}}]),e}(),Tq=Me()(xq=function(){function e(){u(this,e)}var t,r,n;return l(e,[{key:"build",value:(n=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.prepareBuildModel(),e.next=3,t.buildModels();case 3:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"initLayerModel",value:(r=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.build(t);case 2:t.styleNeedUpdate=!1;case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"prepareLayerModel",value:(t=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.build(t);case 2:t.styleNeedUpdate=!1;case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"apply",value:function(e){var t=this;e.hooks.init.tapPromise("LayerModelPlugin",s(i().mark((function r(){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!e.getSource().isTile){r.next=4;break}return e.prepareBuildModel(),e.tileLayer=new Aq(e),r.abrupt("return");case 4:return e.log(CD.BuildModelStart,pP.INIT),r.next=7,t.initLayerModel(e);case 7:e.log(CD.BuildModelEnd,pP.INIT);case 8:case"end":return r.stop()}}),r)})))),e.hooks.beforeRenderData.tapPromise("LayerModelPlugin",function(){var r=s(i().mark((function r(n){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(n){r.next=2;break}return r.abrupt("return",!1);case 2:if(!e.getSource().isTile){r.next=5;break}return e.tileLayer=new Aq(e),r.abrupt("return",!1);case 5:return e.log(CD.BuildModelStart,pP.UPDATE),r.next=8,t.prepareLayerModel(e);case 8:return e.log(CD.BuildModelEnd,pP.UPDATE),r.abrupt("return",!0);case 10:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}())}}]),e}())||xq,wq=Me()(Sq=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e){e.hooks.afterInit.tap("LayerStylePlugin",(function(){var t=e.getLayerConfig(),r=t.autoFit,n=t.fitBoundsOptions;r&&e.fitBounds(n),e.styleNeedUpdate=!1}))}}]),e}())||Sq,Cq=["type"],kq={directional:{lights:"u_DirectionalLights",num:"u_NumOfDirectionalLights"},spot:{lights:"u_SpotLights",num:"u_NumOfSpotLights"}},Mq={type:"directional",direction:[1,10.5,12],ambient:[.2,.2,.2],diffuse:[.6,.6,.6],specular:[.1,.1,.1]},Pq={direction:[0,0,0],ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0]},Iq={position:[0,0,0],direction:[0,0,0],ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],constant:1,linear:0,quadratic:0,angle:14,exponent:40,blur:5};var Oq,Rq,Lq,Nq=Me()(Eq=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e){e.hooks.beforeRender.tap("LightingPlugin",(function(){e.getLayerConfig().enableLighting&&e.models.forEach((function(e){return e.addUniforms(n({},(r={u_DirectionalLights:new Array(3).fill(n({},Pq)),u_NumOfDirectionalLights:0,u_SpotLights:new Array(3).fill(n({},Iq)),u_NumOfSpotLights:0},t&&t.length||(t=[Mq]),t.forEach((function(e){var t=e.type,i=void 0===t?"directional":t,a=y(e,Cq),o=kq[i].lights,s=kq[i].num,u=r[s];r[o][u]=n(n({},r[o][u]),a),r[s]++})),r)));var t,r}))}))}}]),e}())||Eq,Dq=Me()(Oq=function(){function e(){u(this,e),h(this,"enabled",void 0)}return l(e,[{key:"apply",value:function(e,t){var r=this,n=t.rendererService,i=t.postProcessingPassFactory,a=t.normalPassFactory;e.hooks.init.tapPromise("MultiPassRendererPlugin",(function(){var t=e.getLayerConfig(),n=t.enableMultiPassRenderer,o=t.passes,s=void 0===o?[]:o;r.enabled=!!n&&!1!==e.getLayerConfig().enableMultiPassRenderer,r.enabled&&(e.multiPassRenderer=gV(e,s,i,a),e.multiPassRenderer.setRenderFlag(!0))})),e.hooks.beforeRender.tap("MultiPassRendererPlugin",(function(){if(r.enabled){var t=n.getViewportSize(),i=t.width,a=t.height;e.multiPassRenderer.resize(i,a)}}))}}]),e}())||Oq,Fq=1,zq=2,Bq=Me()(Rq=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e,t){var r=t.styleAttributeService;e.hooks.init.tapPromise("PixelPickingPlugin",(function(){var t=e.getLayerConfig().enablePicking;r.registerStyleAttribute({name:"pickingColor",type:RD.Attribute,descriptor:{name:"a_PickingColor",buffer:{data:[],type:rO.FLOAT},size:3,update:function(e){var r=e.id;return t?Ug(r):[0,0,0]}}})})),e.hooks.beforePickingEncode.tap("PixelPickingPlugin",(function(){e.getLayerConfig().enablePicking&&e.isVisible()&&e.models.forEach((function(e){return e.addUniforms({u_PickingStage:Fq})}))})),e.hooks.afterPickingEncode.tap("PixelPickingPlugin",(function(){e.getLayerConfig().enablePicking&&e.isVisible()&&e.models.forEach((function(e){return e.addUniforms({u_PickingStage:zq})}))})),e.hooks.beforeHighlight.tap("PixelPickingPlugin",(function(t){var r=e.getLayerConfig(),n=r.highlightColor,i=r.activeMix,a=void 0===i?0:i,o="string"==typeof n?zg(n):n||[1,0,0,1];e.updateLayerConfig({pickedFeatureID:Bg(new Uint8Array(t))}),e.models.forEach((function(e){return e.addUniforms({u_PickingStage:zq,u_PickingColor:t,u_HighlightColor:o.map((function(e){return 255*e})),u_activeMix:a})}))})),e.hooks.beforeSelect.tap("PixelPickingPlugin",(function(t){var r=e.getLayerConfig(),n=r.selectColor,i=r.selectMix,a=void 0===i?0:i,o="string"==typeof n?zg(n):n||[1,0,0,1];e.updateLayerConfig({pickedFeatureID:Bg(new Uint8Array(t))}),e.models.forEach((function(e){return e.addUniforms({u_PickingStage:zq,u_PickingColor:t,u_HighlightColor:o.map((function(e){return 255*e})),u_activeMix:a,u_CurrentSelectedId:t,u_SelectColor:o.map((function(e){return 255*e})),u_EnableSelect:1})}))}))}}]),e}())||Rq,Uq=["mvt","geojsonvt","testTile"];var jq,Vq,Gq,Hq,Wq,Yq,Xq,Zq,qq,Kq,Qq,$q,Jq,eK=Me()(Lq=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e,t){var r=this,n=t.styleAttributeService;e.hooks.init.tapPromise("RegisterStyleAttributePlugin",(function(){(function(e){var t=e.getSource();return Uq.includes(t.parser.type)})(e)||r.registerBuiltinAttributes(n,e)}))}},{key:"registerBuiltinAttributes",value:function(e,t){"MaskLayer"!==t.type?(this.registerPositionAttribute(e),this.registerColorAttribute(e),this.registerVertexIdAttribute(e)):this.registerPositionAttribute(e)}},{key:"registerPositionAttribute",value:function(e){e.registerStyleAttribute({name:"position",type:RD.Attribute,descriptor:{name:"a_Position",buffer:{data:[],type:rO.FLOAT},size:3,update:function(e,t,r){return 2===r.length?[r[0],r[1],0]:[r[0],r[1],r[2]]}}})}},{key:"registerFilterAttribute",value:function(e){e.registerStyleAttribute({name:"filter",type:RD.Attribute,descriptor:{name:"filter",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e){return e.filter?[1]:[0]}}})}},{key:"registerColorAttribute",value:function(e){e.registerStyleAttribute({name:"color",type:RD.Attribute,descriptor:{name:"a_Color",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:4,update:function(e){var t=e.color;return t&&t.length?t:[1,1,1,1]}}})}},{key:"registerVertexIdAttribute",value:function(e){e.registerStyleAttribute({name:"vertexId",type:RD.Attribute,descriptor:{name:"a_vertexId",buffer:{usage:rO.DYNAMIC_DRAW,data:[],type:rO.FLOAT},size:1,update:function(e,t){return[t]}}})}}]),e}())||Lq,tK=(jq=Me(),Vq=ke(ba.ICameraService),Gq=ke(ba.ICoordinateSystemService),Hq=ke(ba.IRendererService),Wq=ke(ba.IMapService),jq((Zq=I((Xq=function(){function e(){u(this,e),P(this,"cameraService",Zq,this),P(this,"coordinateSystemService",qq,this),P(this,"rendererService",Kq,this),P(this,"mapService",Qq,this)}return l(e,[{key:"resetLayerEncodeData",value:function(e){var t=this,r=this.mapService.map;if(r&&this.getIsMultiCoor()){this.mapZoom=r.getZoom();var n=function(){var n=s(i().mark((function n(){var a;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!((a=r.getZoom())<=12&&t.mapZoom>12)){n.next=5;break}return n.next=4,e.hooks.init.promise();case 4:t.mapZoom=a;case 5:if(!(a>12&&t.mapZoom<=12)){n.next=9;break}return n.next=8,e.hooks.init.promise();case 8:t.mapZoom=a;case 9:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();r.off("zoom",n),r.on("zoom",n)}}},{key:"apply",value:function(e){var t=this,r=this.mapService.version;this.resetLayerEncodeData(e);var n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],i=[0,0];e.hooks.beforeRender.tap("ShaderUniformPlugin",(function(){var a=e.getLayerConfig().tileOrigin,o=t.getIsMultiCoor()?"degree"===t.mapService.map.getCRS().unit?t.mapService.map.getCRS().extent:t.mapService.map.getCRS().getLngLatExtent():[];t.coordinateSystemService.refresh(a,o),"GAODE2.x"===r&&(t.setLayerCenter(e),n=t.mapService.map.customCoords.getMVPMatrix(),i=t.mapService.getCustomCoordCenter());var s=t.rendererService.getViewportSize(),u=s.width,c=s.height;e.models.forEach((function(r){var a;r.addUniforms((h(a={},wD.ProjectionMatrix,t.cameraService.getProjectionMatrix()),h(a,wD.ViewMatrix,t.cameraService.getViewMatrix()),h(a,wD.ViewProjectionMatrix,t.cameraService.getViewProjectionMatrix()),h(a,wD.Zoom,t.cameraService.getZoom()),h(a,wD.ZoomScale,t.cameraService.getZoomScale()),h(a,wD.FocalDistance,t.cameraService.getFocalDistance()),h(a,wD.CameraPosition,t.cameraService.getCameraPosition()),h(a,cb.MultiCoor,t.getIsMultiCoor()),h(a,cb.CoordinateSystem,t.coordinateSystemService.getCoordinateSystem()),h(a,cb.ViewportCenter,t.coordinateSystemService.getViewportCenter(t.mapService.map)),h(a,cb.ViewportCenterProjection,t.coordinateSystemService.getViewportCenterProjection()),h(a,cb.PixelsPerDegree,t.coordinateSystemService.getPixelsPerDegree()),h(a,cb.PixelsPerDegree2,t.coordinateSystemService.getPixelsPerDegree2()),h(a,cb.PixelsPerMeter,t.coordinateSystemService.getPixelsPerMeter()),h(a,cb.Mvp,n),h(a,"u_sceneCenterMercator",i),h(a,"u_ViewportSize",[u,c]),h(a,"u_ModelMatrix",t.cameraService.getModelMatrix()),h(a,"u_DevicePixelRatio",Yv.devicePixelRatio),h(a,"u_PickingBuffer",e.getLayerConfig().pickingBuffer||0),h(a,"u_shaderPick",Number(e.getShaderPickStat())),a))}))}))}},{key:"setLayerCenter",value:function(e){void 0===e.coordCenter&&(e.coordCenter=e.getSource().center),this.mapService.setCoordCenter&&this.mapService.setCoordCenter(e.coordCenter)}},{key:"getIsMultiCoor",value:function(){return!!this.mapService.isMapBoxMapLibre()&&rS(this.mapService.map)}}]),e}()).prototype,"cameraService",[Vq],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qq=I(Xq.prototype,"coordinateSystemService",[Gq],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Kq=I(Xq.prototype,"rendererService",[Hq],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qq=I(Xq.prototype,"mapService",[Wq],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Yq=Xq))||Yq),rK=Me()($q=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e){e.hooks.beforeRender.tap("UpdateModelPlugin",(function(){e.layerModel&&e.layerModel.needUpdate().then((function(t){t&&e.renderLayers()}))})),e.hooks.afterRender.tap("UpdateModelPlugin",(function(){e.layerModelNeedUpdate=!1}))}}]),e}())||$q,nK=Me()(Jq=function(){function e(){u(this,e)}return l(e,[{key:"apply",value:function(e,t){var r=this,n=t.styleAttributeService;e.hooks.init.tapPromise("UpdateStyleAttributePlugin",(function(){r.initStyleAttribute(e,{styleAttributeService:n})})),e.hooks.beforeRender.tap("UpdateStyleAttributePlugin",(function(){e.layerModelNeedUpdate||e.inited&&r.updateStyleAttribute(e,{styleAttributeService:n})}))}},{key:"updateStyleAttribute",value:function(e,t){var r=t.styleAttributeService,n=r.getLayerStyleAttributes()||[],i=r.getLayerStyleAttribute("filter");if(i&&i.needRegenerateVertices)return e.layerModelNeedUpdate=!0,void n.forEach((function(e){return e.needRegenerateVertices=!1}));n.filter((function(e){return e.needRegenerateVertices})).forEach((function(t){r.updateAttributeByFeatureRange(t.name,e.getEncodedData(),t.featureRange.startIndex,t.featureRange.endIndex,e),t.needRegenerateVertices=!1}))}},{key:"initStyleAttribute",value:function(e,t){var r=t.styleAttributeService;(r.getLayerStyleAttributes()||[]).filter((function(e){return e.needRegenerateVertices})).forEach((function(t){r.updateAttributeByFeatureRange(t.name,e.getEncodedData(),t.featureRange.startIndex,t.featureRange.endIndex),t.needRegenerateVertices=!1}))}}]),e}())||Jq;vD.bind(ba.ILayerPlugin).to(CW).inRequestScope(),vD.bind(ba.ILayerPlugin).to(eK).inRequestScope(),vD.bind(ba.ILayerPlugin).to($Z).inRequestScope(),vD.bind(ba.ILayerPlugin).to(wW).inRequestScope(),vD.bind(ba.ILayerPlugin).to(wq).inRequestScope(),vD.bind(ba.ILayerPlugin).to(eq).inRequestScope(),vD.bind(ba.ILayerPlugin).to(nK).inRequestScope(),vD.bind(ba.ILayerPlugin).to(rK).inRequestScope(),vD.bind(ba.ILayerPlugin).to(Dq).inRequestScope(),vD.bind(ba.ILayerPlugin).to(tK).inRequestScope(),vD.bind(ba.ILayerPlugin).to(JZ).inRequestScope(),vD.bind(ba.ILayerPlugin).to(Nq).inRequestScope(),vD.bind(ba.ILayerPlugin).to(Bq).inRequestScope(),vD.bind(ba.ILayerPlugin).to(Tq).inRequestScope(),kh("Uint16",(function(e){return function(t,r,n){return e(this,t,r,n)}})),kh("Uint32",(function(e){return function(t,r,n){return e(this,t,r,n)}})),kh("Int8",(function(e){return function(t,r,n){return e(this,t,r,n)}})),kh("Int16",(function(e){return function(t,r,n){return e(this,t,r,n)}})),kh("Int32",(function(e){return function(t,r,n){return e(this,t,r,n)}})),hn({target:"String",proto:!0,forced:sT("link")},{link:function(e){return oT(this,"a","href",e)}});var iK={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},aK="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",oK={5:aK,"5module":aK+" export import",6:aK+" const class extends export import super"},sK=/^in(stanceof)?$/,uK="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",cK="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",lK=new RegExp("["+uK+"]"),hK=new RegExp("["+uK+cK+"]");uK=cK=null;var fK=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,35,56,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8952,286,50,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,2357,44,11,6,17,0,370,43,1301,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42717,35,4148,12,221,3,5761,15,7472,3104,541,1507,4938],pK=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,176,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,135,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,419,13,1495,6,110,6,6,9,4759,9,787719,239];function dK(e,t){for(var r=65536,n=0;n<t.length;n+=2){if((r+=t[n])>e)return!1;if((r+=t[n+1])>=e)return!0}}function vK(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&lK.test(String.fromCharCode(e)):!1!==t&&dK(e,fK)))}function gK(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&hK.test(String.fromCharCode(e)):!1!==t&&(dK(e,fK)||dK(e,pK)))))}var mK=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function yK(e,t){return new mK(e,{beforeExpr:!0,binop:t})}var _K={beforeExpr:!0},bK={startsExpr:!0},xK={};function SK(e,t){return void 0===t&&(t={}),t.keyword=e,xK[e]=new mK(e,t)}var EK={num:new mK("num",bK),regexp:new mK("regexp",bK),string:new mK("string",bK),name:new mK("name",bK),eof:new mK("eof"),bracketL:new mK("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new mK("]"),braceL:new mK("{",{beforeExpr:!0,startsExpr:!0}),braceR:new mK("}"),parenL:new mK("(",{beforeExpr:!0,startsExpr:!0}),parenR:new mK(")"),comma:new mK(",",_K),semi:new mK(";",_K),colon:new mK(":",_K),dot:new mK("."),question:new mK("?",_K),questionDot:new mK("?."),arrow:new mK("=>",_K),template:new mK("template"),invalidTemplate:new mK("invalidTemplate"),ellipsis:new mK("...",_K),backQuote:new mK("`",bK),dollarBraceL:new mK("${",{beforeExpr:!0,startsExpr:!0}),eq:new mK("=",{beforeExpr:!0,isAssign:!0}),assign:new mK("_=",{beforeExpr:!0,isAssign:!0}),incDec:new mK("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new mK("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:yK("||",1),logicalAND:yK("&&",2),bitwiseOR:yK("|",3),bitwiseXOR:yK("^",4),bitwiseAND:yK("&",5),equality:yK("==/!=/===/!==",6),relational:yK("</>/<=/>=",7),bitShift:yK("<</>>/>>>",8),plusMin:new mK("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:yK("%",10),star:yK("*",10),slash:yK("/",10),starstar:new mK("**",{beforeExpr:!0}),coalesce:yK("??",1),_break:SK("break"),_case:SK("case",_K),_catch:SK("catch"),_continue:SK("continue"),_debugger:SK("debugger"),_default:SK("default",_K),_do:SK("do",{isLoop:!0,beforeExpr:!0}),_else:SK("else",_K),_finally:SK("finally"),_for:SK("for",{isLoop:!0}),_function:SK("function",bK),_if:SK("if"),_return:SK("return",_K),_switch:SK("switch"),_throw:SK("throw",_K),_try:SK("try"),_var:SK("var"),_const:SK("const"),_while:SK("while",{isLoop:!0}),_with:SK("with"),_new:SK("new",{beforeExpr:!0,startsExpr:!0}),_this:SK("this",bK),_super:SK("super",bK),_class:SK("class",bK),_extends:SK("extends",_K),_export:SK("export"),_import:SK("import",bK),_null:SK("null",bK),_true:SK("true",bK),_false:SK("false",bK),_in:SK("in",{beforeExpr:!0,binop:7}),_instanceof:SK("instanceof",{beforeExpr:!0,binop:7}),_typeof:SK("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:SK("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:SK("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},AK=/\r\n?|\n|\u2028|\u2029/,TK=new RegExp(AK.source,"g");function wK(e,t){return 10===e||13===e||!t&&(8232===e||8233===e)}var CK=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,kK=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,MK=Object.prototype,PK=MK.hasOwnProperty,IK=MK.toString;function OK(e,t){return PK.call(e,t)}var RK=Array.isArray||function(e){return"[object Array]"===IK.call(e)};function LK(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}var NK=function(e,t){this.line=e,this.column=t};NK.prototype.offset=function(e){return new NK(this.line,this.column+e)};var DK=function(e,t,r){this.start=t,this.end=r,null!==e.sourceFile&&(this.source=e.sourceFile)};function FK(e,t){for(var r=1,n=0;;){TK.lastIndex=n;var i=TK.exec(e);if(!(i&&i.index<t))return new NK(r,t-n);++r,n=i.index+i[0].length}}var zK={ecmaVersion:10,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1};function BK(e){var t={};for(var r in zK)t[r]=e&&OK(e,r)?e[r]:zK[r];if(t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),RK(t.onToken)){var n=t.onToken;t.onToken=function(e){return n.push(e)}}return RK(t.onComment)&&(t.onComment=function(e,t){return function(r,n,i,a,o,s){var u={type:r?"Block":"Line",value:n,start:i,end:a};e.locations&&(u.loc=new DK(this,o,s)),e.ranges&&(u.range=[i,a]),t.push(u)}}(t,t.onComment)),t}function UK(e,t){return 2|(e?4:0)|(t?8:0)}var jK=function(e,t,r){this.options=e=BK(e),this.sourceFile=e.sourceFile,this.keywords=LK(oK[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var n="";if(!0!==e.allowReserved){for(var i=e.ecmaVersion;!(n=iK[i]);i--);"module"===e.sourceType&&(n+=" await")}this.reservedWords=LK(n);var a=(n?n+" ":"")+iK.strict;this.reservedWordsStrict=LK(a),this.reservedWordsStrictBind=LK(a+" "+iK.strictBind),this.input=String(t),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf("\n",r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(AK).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=EK.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},VK={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};jK.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},VK.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},VK.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0},VK.inAsync.get=function(){return(4&this.currentVarScope().flags)>0},VK.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},VK.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},VK.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},jK.prototype.inNonArrowFunction=function(){return(2&this.currentThisScope().flags)>0},jK.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=this,n=0;n<e.length;n++)r=e[n](r);return r},jK.parse=function(e,t){return new this(t,e).parse()},jK.parseExpressionAt=function(e,t,r){var n=new this(r,e,t);return n.nextToken(),n.parseExpression()},jK.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(jK.prototype,VK);var GK=jK.prototype,HK=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;function WK(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}GK.strictDirective=function(e){for(;;){kK.lastIndex=e,e+=kK.exec(this.input)[0].length;var t=HK.exec(this.input.slice(e));if(!t)return!1;if("use strict"===(t[1]||t[2])){kK.lastIndex=e+t[0].length;var r=kK.exec(this.input),n=r.index+r[0].length,i=this.input.charAt(n);return";"===i||"}"===i||AK.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||"!"===i&&"="===this.input.charAt(n+1))}e+=t[0].length,kK.lastIndex=e,e+=kK.exec(this.input)[0].length,";"===this.input[e]&&e++}},GK.eat=function(e){return this.type===e&&(this.next(),!0)},GK.isContextual=function(e){return this.type===EK.name&&this.value===e&&!this.containsEsc},GK.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},GK.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},GK.canInsertSemicolon=function(){return this.type===EK.eof||this.type===EK.braceR||AK.test(this.input.slice(this.lastTokEnd,this.start))},GK.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},GK.semicolon=function(){this.eat(EK.semi)||this.insertSemicolon()||this.unexpected()},GK.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},GK.expect=function(e){this.eat(e)||this.unexpected()},GK.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")},GK.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,"Parenthesized pattern")}},GK.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")},GK.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value")},GK.isSimpleAssignTarget=function(e){return"ParenthesizedExpression"===e.type?this.isSimpleAssignTarget(e.expression):"Identifier"===e.type||"MemberExpression"===e.type};var YK=jK.prototype;YK.parseTopLevel=function(e){var t={};for(e.body||(e.body=[]);this.type!==EK.eof;){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var n=0,i=Object.keys(this.undefinedExports);n<i.length;n+=1){var a=i[n];this.raiseRecoverable(this.undefinedExports[a].start,"Export '"+a+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType,this.finishNode(e,"Program")};var XK={kind:"loop"},ZK={kind:"switch"};YK.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;kK.lastIndex=this.pos;var t=kK.exec(this.input),r=this.pos+t[0].length,n=this.input.charCodeAt(r);if(91===n)return!0;if(e)return!1;if(123===n)return!0;if(vK(n,!0)){for(var i=r+1;gK(this.input.charCodeAt(i),!0);)++i;var a=this.input.slice(r,i);if(!sK.test(a))return!0}return!1},YK.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;kK.lastIndex=this.pos;var e=kK.exec(this.input),t=this.pos+e[0].length;return!(AK.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!==this.input.length&&gK(this.input.charAt(t+8)))},YK.parseStatement=function(e,t,r){var n,i=this.type,a=this.startNode();switch(this.isLet(e)&&(i=EK._var,n="let"),i){case EK._break:case EK._continue:return this.parseBreakContinueStatement(a,i.keyword);case EK._debugger:return this.parseDebuggerStatement(a);case EK._do:return this.parseDoStatement(a);case EK._for:return this.parseForStatement(a);case EK._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(a,!1,!e);case EK._class:return e&&this.unexpected(),this.parseClass(a,!0);case EK._if:return this.parseIfStatement(a);case EK._return:return this.parseReturnStatement(a);case EK._switch:return this.parseSwitchStatement(a);case EK._throw:return this.parseThrowStatement(a);case EK._try:return this.parseTryStatement(a);case EK._const:case EK._var:return n=n||this.value,e&&"var"!==n&&this.unexpected(),this.parseVarStatement(a,n);case EK._while:return this.parseWhileStatement(a);case EK._with:return this.parseWithStatement(a);case EK.braceL:return this.parseBlock(!0,a);case EK.semi:return this.parseEmptyStatement(a);case EK._export:case EK._import:if(this.options.ecmaVersion>10&&i===EK._import){kK.lastIndex=this.pos;var o=kK.exec(this.input),s=this.pos+o[0].length,u=this.input.charCodeAt(s);if(40===u||46===u)return this.parseExpressionStatement(a,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===EK._import?this.parseImport(a):this.parseExport(a,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(a,!0,!e);var c=this.value,l=this.parseExpression();return i===EK.name&&"Identifier"===l.type&&this.eat(EK.colon)?this.parseLabeledStatement(a,c,l,e):this.parseExpressionStatement(a,l)}},YK.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.eat(EK.semi)||this.insertSemicolon()?e.label=null:this.type!==EK.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n<this.labels.length;++n){var i=this.labels[n];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(r||"loop"===i.kind))break;if(e.label&&r)break}}return n===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,r?"BreakStatement":"ContinueStatement")},YK.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")},YK.parseDoStatement=function(e){return this.next(),this.labels.push(XK),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(EK._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(EK.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},YK.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(XK),this.enterScope(0),this.expect(EK.parenL),this.type===EK.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===EK._var||this.type===EK._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),(this.type===EK._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===n.declarations.length?(this.options.ecmaVersion>=9&&(this.type===EK._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,n)):(t>-1&&this.unexpected(t),this.parseFor(e,n))}var a=new WK,o=this.parseExpression(!0,a);return this.type===EK._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===EK._in?t>-1&&this.unexpected(t):e.await=t>-1),this.toAssignable(o,!1,a),this.checkLVal(o),this.parseForIn(e,o)):(this.checkExpressionErrors(a,!0),t>-1&&this.unexpected(t),this.parseFor(e,o))},YK.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,KK|(r?0:QK),!1,t)},YK.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(EK._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},YK.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(EK.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},YK.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(EK.braceL),this.labels.push(ZK),this.enterScope(0);for(var r=!1;this.type!==EK.braceR;)if(this.type===EK._case||this.type===EK._default){var n=this.type===EK._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(EK.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},YK.parseThrowStatement=function(e){return this.next(),AK.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var qK=[];YK.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===EK._catch){var t=this.startNode();if(this.next(),this.eat(EK.parenL)){t.param=this.parseBindingAtom();var r="Identifier"===t.param.type;this.enterScope(r?32:0),this.checkLVal(t.param,r?4:2),this.expect(EK.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0);t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(EK._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},YK.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},YK.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(XK),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},YK.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},YK.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},YK.parseLabeledStatement=function(e,t,r,n){for(var i=0,a=this.labels;i<a.length;i+=1){a[i].name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.type.isLoop?"loop":this.type===EK._switch?"switch":null,s=this.labels.length-1;s>=0;s--){var u=this.labels[s];if(u.statementStart!==e.start)break;u.statementStart=this.start,u.kind=o}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(n?-1===n.indexOf("label")?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},YK.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},YK.parseBlock=function(e,t,r){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(EK.braceL),e&&this.enterScope(0);this.type!==EK.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},YK.parseFor=function(e,t){return e.init=t,this.expect(EK.semi),e.test=this.type===EK.semi?null:this.parseExpression(),this.expect(EK.semi),e.update=this.type===EK.parenR?null:this.parseExpression(),this.expect(EK.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},YK.parseForIn=function(e,t){var r=this.type===EK._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!r||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)?this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"):"AssignmentPattern"===t.type&&this.raise(t.start,"Invalid left-hand side in for-loop"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(EK.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")},YK.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r;;){var n=this.startNode();if(this.parseVarId(n,r),this.eat(EK.eq)?n.init=this.parseMaybeAssign(t):"const"!==r||this.type===EK._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===n.id.type||t&&(this.type===EK._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(EK.comma))break}return e},YK.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLVal(e.id,"var"===t?1:2,!1)};var KK=1,QK=2;YK.parseFunction=function(e,t,r,n){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===EK.star&&t&QK&&this.unexpected(),e.generator=this.eat(EK.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&KK&&(e.id=4&t&&this.type!==EK.name?null:this.parseIdent(),!e.id||t&QK||this.checkLVal(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(UK(e.async,e.generator)),t&KK||(e.id=this.type===EK.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,t&KK?"FunctionDeclaration":"FunctionExpression")},YK.parseFunctionParams=function(e){this.expect(EK.parenL),e.params=this.parseBindingList(EK.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},YK.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),i=!1;for(n.body=[],this.expect(EK.braceL);this.type!==EK.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(n.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind&&(i&&this.raise(a.start,"Duplicate constructor in the same class"),i=!0))}return this.strict=r,this.next(),e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},YK.parseClassElement=function(e){var t=this;if(this.eat(EK.semi))return null;var r=this.startNode(),n=function(e,n){void 0===n&&(n=!1);var i=t.start,a=t.startLoc;return!!t.eatContextual(e)&&(!(t.type===EK.parenL||n&&t.canInsertSemicolon())||(r.key&&t.unexpected(),r.computed=!1,r.key=t.startNodeAt(i,a),r.key.name=e,t.finishNode(r.key,"Identifier"),!1))};r.kind="method",r.static=n("static");var i=this.eat(EK.star),a=!1;i||(this.options.ecmaVersion>=8&&n("async",!0)?(a=!0,i=this.options.ecmaVersion>=9&&this.eat(EK.star)):n("get")?r.kind="get":n("set")&&(r.kind="set")),r.key||this.parsePropertyName(r);var o=r.key,s=!1;return r.computed||r.static||!("Identifier"===o.type&&"constructor"===o.name||"Literal"===o.type&&"constructor"===o.value)?r.static&&"Identifier"===o.type&&"prototype"===o.name&&this.raise(o.start,"Classes may not have a static property named prototype"):("method"!==r.kind&&this.raise(o.start,"Constructor can't have get/set modifier"),i&&this.raise(o.start,"Constructor can't be a generator"),a&&this.raise(o.start,"Constructor can't be an async method"),r.kind="constructor",s=e),this.parseClassMethod(r,i,a,s),"get"===r.kind&&0!==r.value.params.length&&this.raiseRecoverable(r.value.start,"getter should have no params"),"set"===r.kind&&1!==r.value.params.length&&this.raiseRecoverable(r.value.start,"setter should have exactly one param"),"set"===r.kind&&"RestElement"===r.value.params[0].type&&this.raiseRecoverable(r.value.params[0].start,"Setter cannot use rest params"),r},YK.parseClassMethod=function(e,t,r,n){return e.value=this.parseMethod(t,r,n),this.finishNode(e,"MethodDefinition")},YK.parseClassId=function(e,t){this.type===EK.name?(e.id=this.parseIdent(),t&&this.checkLVal(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},YK.parseClassSuper=function(e){e.superClass=this.eat(EK._extends)?this.parseExprSubscripts():null},YK.parseExport=function(e,t){if(this.next(),this.eat(EK.star))return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseIdent(!0),this.checkExport(t,e.exported.name,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==EK.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(EK._default)){var r;if(this.checkExport(t,"default",this.lastTokStart),this.type===EK._function||(r=this.isAsyncFunction())){var n=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(n,4|KK,!1,r)}else if(this.type===EK._class){var i=this.startNode();e.declaration=this.parseClass(i,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(null),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==EK.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var a=0,o=e.specifiers;a<o.length;a+=1){var s=o[a];this.checkUnreserved(s.local),this.checkLocalExport(s.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")},YK.checkExport=function(e,t,r){e&&(OK(e,t)&&this.raiseRecoverable(r,"Duplicate export '"+t+"'"),e[t]=!0)},YK.checkPatternExport=function(e,t){var r=t.type;if("Identifier"===r)this.checkExport(e,t.name,t.start);else if("ObjectPattern"===r)for(var n=0,i=t.properties;n<i.length;n+=1){var a=i[n];this.checkPatternExport(e,a)}else if("ArrayPattern"===r)for(var o=0,s=t.elements;o<s.length;o+=1){var u=s[o];u&&this.checkPatternExport(e,u)}else"Property"===r?this.checkPatternExport(e,t.value):"AssignmentPattern"===r?this.checkPatternExport(e,t.left):"RestElement"===r?this.checkPatternExport(e,t.argument):"ParenthesizedExpression"===r&&this.checkPatternExport(e,t.expression)},YK.checkVariableExport=function(e,t){if(e)for(var r=0,n=t;r<n.length;r+=1){var i=n[r];this.checkPatternExport(e,i.id)}},YK.shouldParseExportStatement=function(){return"var"===this.type.keyword||"const"===this.type.keyword||"class"===this.type.keyword||"function"===this.type.keyword||this.isLet()||this.isAsyncFunction()},YK.parseExportSpecifiers=function(e){var t=[],r=!0;for(this.expect(EK.braceL);!this.eat(EK.braceR);){if(r)r=!1;else if(this.expect(EK.comma),this.afterTrailingComma(EK.braceR))break;var n=this.startNode();n.local=this.parseIdent(!0),n.exported=this.eatContextual("as")?this.parseIdent(!0):n.local,this.checkExport(e,n.exported.name,n.exported.start),t.push(this.finishNode(n,"ExportSpecifier"))}return t},YK.parseImport=function(e){return this.next(),this.type===EK.string?(e.specifiers=qK,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===EK.string?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},YK.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===EK.name){var r=this.startNode();if(r.local=this.parseIdent(),this.checkLVal(r.local,2),e.push(this.finishNode(r,"ImportDefaultSpecifier")),!this.eat(EK.comma))return e}if(this.type===EK.star){var n=this.startNode();return this.next(),this.expectContextual("as"),n.local=this.parseIdent(),this.checkLVal(n.local,2),e.push(this.finishNode(n,"ImportNamespaceSpecifier")),e}for(this.expect(EK.braceL);!this.eat(EK.braceR);){if(t)t=!1;else if(this.expect(EK.comma),this.afterTrailingComma(EK.braceR))break;var i=this.startNode();i.imported=this.parseIdent(!0),this.eatContextual("as")?i.local=this.parseIdent():(this.checkUnreserved(i.imported),i.local=i.imported),this.checkLVal(i.local,2),e.push(this.finishNode(i,"ImportSpecifier"))}return e},YK.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},YK.isDirectiveCandidate=function(e){return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var $K=jK.prototype;$K.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern",r&&this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];this.toAssignable(a,t),"RestElement"!==a.type||"ArrayPattern"!==a.argument.type&&"ObjectPattern"!==a.argument.type||this.raise(a.argument.start,"Unexpected token")}break;case"Property":"init"!==e.kind&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern",r&&this.checkPatternErrors(r,!0),this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),"AssignmentPattern"===e.argument.type&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":"="!==e.operator&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);case"AssignmentPattern":break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else r&&this.checkPatternErrors(r,!0);return e},$K.toAssignableList=function(e,t){for(var r=e.length,n=0;n<r;n++){var i=e[n];i&&this.toAssignable(i,t)}if(r){var a=e[r-1];6===this.options.ecmaVersion&&t&&a&&"RestElement"===a.type&&"Identifier"!==a.argument.type&&this.unexpected(a.argument.start)}return e},$K.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")},$K.parseRestBinding=function(){var e=this.startNode();return this.next(),6===this.options.ecmaVersion&&this.type!==EK.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")},$K.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case EK.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(EK.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case EK.braceL:return this.parseObj(!0)}return this.parseIdent()},$K.parseBindingList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(EK.comma),t&&this.type===EK.comma)n.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===EK.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),n.push(a),this.type===EK.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o),n.push(o)}return n},$K.parseBindingListItem=function(e){return e},$K.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(EK.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},$K.checkLVal=function(e,t,r){switch(void 0===t&&(t=0),e.type){case"Identifier":2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(t?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(OK(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),0!==t&&5!==t&&this.declareName(e.name,t,e.start);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":t&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ObjectPattern":for(var n=0,i=e.properties;n<i.length;n+=1){var a=i[n];this.checkLVal(a,t,r)}break;case"Property":this.checkLVal(e.value,t,r);break;case"ArrayPattern":for(var o=0,s=e.elements;o<s.length;o+=1){var u=s[o];u&&this.checkLVal(u,t,r)}break;case"AssignmentPattern":this.checkLVal(e.left,t,r);break;case"RestElement":this.checkLVal(e.argument,t,r);break;case"ParenthesizedExpression":this.checkLVal(e.expression,t,r);break;default:this.raise(e.start,(t?"Binding":"Assigning to")+" rvalue")}};var JK=jK.prototype;JK.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n,i=e.key;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===a&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=i.start):this.raiseRecoverable(i.start,"Redefinition of __proto__ property")),t.proto=!0);else{var o=t[n="$"+n];if(o)("init"===a?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(i.start,"Redefinition of property");else o=t[n]={init:!1,get:!1,set:!1};o[a]=!0}}},JK.parseExpression=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeAssign(e,t);if(this.type===EK.comma){var a=this.startNodeAt(r,n);for(a.expressions=[i];this.eat(EK.comma);)a.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(a,"SequenceExpression")}return i},JK.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var n=!1,i=-1,a=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new WK,n=!0);var o=this.start,s=this.startLoc;this.type!==EK.parenL&&this.type!==EK.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(r&&(u=r.call(this,u,o,s)),this.type.isAssign){var c=this.startNodeAt(o,s);return c.operator=this.value,c.left=this.type===EK.eq?this.toAssignable(u,!1,t):u,n||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.left.start&&(t.shorthandAssign=-1),this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return n&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),u},JK.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(EK.question)){var a=this.startNodeAt(r,n);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(EK.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,"ConditionalExpression")}return i},JK.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)||i.start===r&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,r,n,-1,e)},JK.parseExprOp=function(e,t,r,n,i){var a=this.type.binop;if(null!=a&&(!i||this.type!==EK._in)&&a>n){var o=this.type===EK.logicalOR||this.type===EK.logicalAND,s=this.type===EK.coalesce;s&&(a=EK.logicalAND.binop);var u=this.value;this.next();var c=this.start,l=this.startLoc,h=this.parseExprOp(this.parseMaybeUnary(null,!1),c,l,a,i),f=this.buildBinary(t,r,e,h,u,o||s);return(o&&this.type===EK.coalesce||s&&(this.type===EK.logicalOR||this.type===EK.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,t,r,n,i)}return e},JK.buildBinary=function(e,t,r,n,i,a){var o=this.startNodeAt(e,t);return o.left=r,o.operator=i,o.right=n,this.finishNode(o,a?"LogicalExpression":"BinaryExpression")},JK.parseMaybeUnary=function(e,t){var r,n=this.start,i=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))r=this.parseAwait(),t=!0;else if(this.type.prefix){var a=this.startNode(),o=this.type===EK.incDec;a.operator=this.value,a.prefix=!0,this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(a.argument):this.strict&&"delete"===a.operator&&"Identifier"===a.argument.type?this.raiseRecoverable(a.start,"Deleting local variable in strict mode"):t=!0,r=this.finishNode(a,o?"UpdateExpression":"UnaryExpression")}else{if(r=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return r;for(;this.type.postfix&&!this.canInsertSemicolon();){var s=this.startNodeAt(n,i);s.operator=this.value,s.prefix=!1,s.argument=r,this.checkLVal(r),this.next(),r=this.finishNode(s,"UpdateExpression")}}return!t&&this.eat(EK.starstar)?this.buildBinary(n,i,r,this.parseMaybeUnary(null,!1),"**",!1):r},JK.parseExprSubscripts=function(e){var t=this.start,r=this.startLoc,n=this.parseExprAtom(e);if("ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return n;var i=this.parseSubscripts(n,t,r);return e&&"MemberExpression"===i.type&&(e.parenthesizedAssign>=i.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=i.start&&(e.parenthesizedBind=-1)),i},JK.parseSubscripts=function(e,t,r,n){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,a=!1;;){var o=this.parseSubscript(e,t,r,n,i,a);if(o.optional&&(a=!0),o===e||"ArrowFunctionExpression"===o.type){if(a){var s=this.startNodeAt(t,r);s.expression=o,o=this.finishNode(s,"ChainExpression")}return o}e=o}},JK.parseSubscript=function(e,t,r,n,i,a){var o=this.options.ecmaVersion>=11,s=o&&this.eat(EK.questionDot);n&&s&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var u=this.eat(EK.bracketL);if(u||s&&this.type!==EK.parenL&&this.type!==EK.backQuote||this.eat(EK.dot)){var c=this.startNodeAt(t,r);c.object=e,c.property=u?this.parseExpression():this.parseIdent("never"!==this.options.allowReserved),c.computed=!!u,u&&this.expect(EK.bracketR),o&&(c.optional=s),e=this.finishNode(c,"MemberExpression")}else if(!n&&this.eat(EK.parenL)){var l=new WK,h=this.yieldPos,f=this.awaitPos,p=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var d=this.parseExprList(EK.parenR,this.options.ecmaVersion>=8,!1,l);if(i&&!s&&!this.canInsertSemicolon()&&this.eat(EK.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=h,this.awaitPos=f,this.awaitIdentPos=p,this.parseArrowExpression(this.startNodeAt(t,r),d,!0);this.checkExpressionErrors(l,!0),this.yieldPos=h||this.yieldPos,this.awaitPos=f||this.awaitPos,this.awaitIdentPos=p||this.awaitIdentPos;var v=this.startNodeAt(t,r);v.callee=e,v.arguments=d,o&&(v.optional=s),e=this.finishNode(v,"CallExpression")}else if(this.type===EK.backQuote){(s||a)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var g=this.startNodeAt(t,r);g.tag=e,g.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(g,"TaggedTemplateExpression")}return e},JK.parseExprAtom=function(e){this.type===EK.slash&&this.readRegexp();var t,r=this.potentialArrowAt===this.start;switch(this.type){case EK._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),t=this.startNode(),this.next(),this.type!==EK.parenL||this.allowDirectSuper||this.raise(t.start,"super() call outside constructor of a subclass"),this.type!==EK.dot&&this.type!==EK.bracketL&&this.type!==EK.parenL&&this.unexpected(),this.finishNode(t,"Super");case EK._this:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case EK.name:var n=this.start,i=this.startLoc,a=this.containsEsc,o=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!a&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(EK._function))return this.parseFunction(this.startNodeAt(n,i),0,!1,!0);if(r&&!this.canInsertSemicolon()){if(this.eat(EK.arrow))return this.parseArrowExpression(this.startNodeAt(n,i),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===EK.name&&!a)return o=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(EK.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,i),[o],!0)}return o;case EK.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case EK.num:case EK.string:return this.parseLiteral(this.value);case EK._null:case EK._true:case EK._false:return(t=this.startNode()).value=this.type===EK._null?null:this.type===EK._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case EK.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(r);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),c;case EK.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(EK.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case EK.braceL:return this.parseObj(!1,e);case EK._function:return t=this.startNode(),this.next(),this.parseFunction(t,0);case EK._class:return this.parseClass(this.startNode(),!1);case EK._new:return this.parseNew();case EK.backQuote:return this.parseTemplate();case EK._import:return this.options.ecmaVersion>=11?this.parseExprImport():this.unexpected();default:this.unexpected()}},JK.parseExprImport=function(){var e=this.startNode();this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import");var t=this.parseIdent(!0);switch(this.type){case EK.parenL:return this.parseDynamicImport(e);case EK.dot:return e.meta=t,this.parseImportMeta(e);default:this.unexpected()}},JK.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(EK.parenR)){var t=this.start;this.eat(EK.comma)&&this.eat(EK.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},JK.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"!==this.options.sourceType&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},JK.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},JK.parseParenExpression=function(){this.expect(EK.parenL);var e=this.parseExpression();return this.expect(EK.parenR),e},JK.parseParenAndDistinguishExpression=function(e){var t,r=this.start,n=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,o=this.start,s=this.startLoc,u=[],c=!0,l=!1,h=new WK,f=this.yieldPos,p=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==EK.parenR;){if(c?c=!1:this.expect(EK.comma),i&&this.afterTrailingComma(EK.parenR,!0)){l=!0;break}if(this.type===EK.ellipsis){a=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===EK.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}u.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var d=this.start,v=this.startLoc;if(this.expect(EK.parenR),e&&!this.canInsertSemicolon()&&this.eat(EK.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(r,n,u);u.length&&!l||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(h,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,u.length>1?((t=this.startNodeAt(o,s)).expressions=u,this.finishNodeAt(t,"SequenceExpression",d,v)):t=u[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var g=this.startNodeAt(r,n);return g.expression=t,this.finishNode(g,"ParenthesizedExpression")}return t},JK.parseParenItem=function(e){return e},JK.parseParenArrowList=function(e,t,r){return this.parseArrowExpression(this.startNodeAt(e,t),r)};var eQ=[];JK.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(EK.dot)){e.meta=t;var r=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.inNonArrowFunction()||this.raiseRecoverable(e.start,"'new.target' can only be used in functions"),this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc,a=this.type===EK._import;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,i,!0),a&&"ImportExpression"===e.callee.type&&this.raise(n,"Cannot use new with import()"),this.eat(EK.parenL)?e.arguments=this.parseExprList(EK.parenR,this.options.ecmaVersion>=8,!1):e.arguments=eQ,this.finishNode(e,"NewExpression")},JK.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===EK.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),r.tail=this.type===EK.backQuote,this.finishNode(r,"TemplateElement")},JK.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===EK.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(EK.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(EK.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")},JK.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===EK.name||this.type===EK.num||this.type===EK.string||this.type===EK.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===EK.star)&&!AK.test(this.input.slice(this.lastTokEnd,this.start))},JK.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};for(r.properties=[],this.next();!this.eat(EK.braceR);){if(n)n=!1;else if(this.expect(EK.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(EK.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),r.properties.push(a)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},JK.parseProperty=function(e,t){var r,n,i,a,o=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(EK.ellipsis))return e?(o.argument=this.parseIdent(!1),this.type===EK.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(o,"RestElement")):(this.type===EK.parenL&&t&&(t.parenthesizedAssign<0&&(t.parenthesizedAssign=this.start),t.parenthesizedBind<0&&(t.parenthesizedBind=this.start)),o.argument=this.parseMaybeAssign(!1,t),this.type===EK.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(o,"SpreadElement"));this.options.ecmaVersion>=6&&(o.method=!1,o.shorthand=!1,(e||t)&&(i=this.start,a=this.startLoc),e||(r=this.eat(EK.star)));var s=this.containsEsc;return this.parsePropertyName(o),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(o)?(n=!0,r=this.options.ecmaVersion>=9&&this.eat(EK.star),this.parsePropertyName(o,t)):n=!1,this.parsePropertyValue(o,e,r,n,i,a,t,s),this.finishNode(o,"Property")},JK.parsePropertyValue=function(e,t,r,n,i,a,o,s){if((r||n)&&this.type===EK.colon&&this.unexpected(),this.eat(EK.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===EK.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,n);else if(t||s||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===EK.comma||this.type===EK.braceR||this.type===EK.eq)this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=i),e.kind="init",t?e.value=this.parseMaybeDefault(i,a,e.key):this.type===EK.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected();else{(r||n)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var u="get"===e.kind?0:1;if(e.value.params.length!==u){var c=e.value.start;"get"===e.kind?this.raiseRecoverable(c,"getter should have no params"):this.raiseRecoverable(c,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}},JK.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(EK.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(EK.bracketR),e.key;e.computed=!1}return e.key=this.type===EK.num||this.type===EK.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},JK.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},JK.parseMethod=function(e,t,r){var n=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|UK(t,n.generator)|(r?128:0)),this.expect(EK.parenL),n.params=this.parseBindingList(EK.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(n,"FunctionExpression")},JK.parseArrowExpression=function(e,t,r){var n=this.yieldPos,i=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|UK(r,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1),this.yieldPos=n,this.awaitPos=i,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},JK.parseFunctionBody=function(e,t,r){var n=t&&this.type!==EK.braceL,i=this.strict,a=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var o=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!o||(a=this.strictDirective(this.end))&&o&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var s=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!i&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLVal(e.id,5),e.body=this.parseBlock(!1,void 0,a&&!i),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=s}this.exitScope()},JK.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){if("Identifier"!==r[t].type)return!1}return!0},JK.checkParams=function(e,t){for(var r={},n=0,i=e.params;n<i.length;n+=1){var a=i[n];this.checkLVal(a,1,t?null:r)}},JK.parseExprList=function(e,t,r,n){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(EK.comma),t&&this.afterTrailingComma(e))break;var o=void 0;r&&this.type===EK.comma?o=null:this.type===EK.ellipsis?(o=this.parseSpread(n),n&&this.type===EK.comma&&n.trailingComma<0&&(n.trailingComma=this.start)):o=this.parseMaybeAssign(!1,n),i.push(o)}return i},JK.checkUnreserved=function(e){var t=e.start,r=e.end,n=e.name;(this.inGenerator&&"yield"===n&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&"await"===n&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),this.keywords.test(n)&&this.raise(t,"Unexpected keyword '"+n+"'"),this.options.ecmaVersion<6&&-1!==this.input.slice(t,r).indexOf("\\"))||(this.strict?this.reservedWordsStrict:this.reservedWords).test(n)&&(this.inAsync||"await"!==n||this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+n+"' is reserved"))},JK.parseIdent=function(e,t){var r=this.startNode();return this.type===EK.name?r.name=this.value:this.type.keyword?(r.name=this.type.keyword,"class"!==r.name&&"function"!==r.name||this.lastTokEnd===this.lastTokStart+1&&46===this.input.charCodeAt(this.lastTokStart)||this.context.pop()):this.unexpected(),this.next(!!e),this.finishNode(r,"Identifier"),e||(this.checkUnreserved(r),"await"!==r.name||this.awaitIdentPos||(this.awaitIdentPos=r.start)),r},JK.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===EK.semi||this.canInsertSemicolon()||this.type!==EK.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(EK.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")},JK.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!1),this.finishNode(e,"AwaitExpression")};var tQ=jK.prototype;tQ.raise=function(e,t){var r=FK(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n.raisedAt=this.pos,n},tQ.raiseRecoverable=tQ.raise,tQ.curPosition=function(){if(this.options.locations)return new NK(this.curLine,this.pos-this.lineStart)};var rQ=jK.prototype,nQ=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};rQ.enterScope=function(e){this.scopeStack.push(new nQ(e))},rQ.exitScope=function(){this.scopeStack.pop()},rQ.treatFunctionsAsVarInScope=function(e){return 2&e.flags||!this.inModule&&1&e.flags},rQ.declareName=function(e,t,r){var n=!1;if(2===t){var i=this.currentScope();n=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&1&i.flags&&delete this.undefinedExports[e]}else if(4===t){this.currentScope().lexical.push(e)}else if(3===t){var a=this.currentScope();n=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(32&s.flags&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){n=!0;break}if(s.var.push(e),this.inModule&&1&s.flags&&delete this.undefinedExports[e],3&s.flags)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")},rQ.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},rQ.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},rQ.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(3&t.flags)return t}},rQ.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(3&t.flags&&!(16&t.flags))return t}};var iQ=function(e,t,r){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new DK(e,r)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},aQ=jK.prototype;function oQ(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}aQ.startNode=function(){return new iQ(this,this.start,this.startLoc)},aQ.startNodeAt=function(e,t){return new iQ(this,e,t)},aQ.finishNode=function(e,t){return oQ.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},aQ.finishNodeAt=function(e,t,r,n){return oQ.call(this,e,t,r,n)};var sQ=function(e,t,r,n,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!r,this.override=n,this.generator=!!i},uQ={b_stat:new sQ("{",!1),b_expr:new sQ("{",!0),b_tmpl:new sQ("${",!1),p_stat:new sQ("(",!1),p_expr:new sQ("(",!0),q_tmpl:new sQ("`",!0,!0,(function(e){return e.tryReadTemplateToken()})),f_stat:new sQ("function",!1),f_expr:new sQ("function",!0),f_expr_gen:new sQ("function",!0,!1,null,!0),f_gen:new sQ("function",!1,!1,null,!0)},cQ=jK.prototype;cQ.initialContext=function(){return[uQ.b_stat]},cQ.braceIsBlock=function(e){var t=this.curContext();return t===uQ.f_expr||t===uQ.f_stat||(e!==EK.colon||t!==uQ.b_stat&&t!==uQ.b_expr?e===EK._return||e===EK.name&&this.exprAllowed?AK.test(this.input.slice(this.lastTokEnd,this.start)):e===EK._else||e===EK.semi||e===EK.eof||e===EK.parenR||e===EK.arrow||(e===EK.braceL?t===uQ.b_stat:e!==EK._var&&e!==EK._const&&e!==EK.name&&!this.exprAllowed):!t.isExpr)},cQ.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},cQ.updateContext=function(e){var t,r=this.type;r.keyword&&e===EK.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr},EK.parenR.updateContext=EK.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===uQ.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},EK.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?uQ.b_stat:uQ.b_expr),this.exprAllowed=!0},EK.dollarBraceL.updateContext=function(){this.context.push(uQ.b_tmpl),this.exprAllowed=!0},EK.parenL.updateContext=function(e){var t=e===EK._if||e===EK._for||e===EK._with||e===EK._while;this.context.push(t?uQ.p_stat:uQ.p_expr),this.exprAllowed=!0},EK.incDec.updateContext=function(){},EK._function.updateContext=EK._class.updateContext=function(e){!e.beforeExpr||e===EK.semi||e===EK._else||e===EK._return&&AK.test(this.input.slice(this.lastTokEnd,this.start))||(e===EK.colon||e===EK.braceL)&&this.curContext()===uQ.b_stat?this.context.push(uQ.f_stat):this.context.push(uQ.f_expr),this.exprAllowed=!1},EK.backQuote.updateContext=function(){this.curContext()===uQ.q_tmpl?this.context.pop():this.context.push(uQ.q_tmpl),this.exprAllowed=!1},EK.star.updateContext=function(e){if(e===EK._function){var t=this.context.length-1;this.context[t]===uQ.f_expr?this.context[t]=uQ.f_expr_gen:this.context[t]=uQ.f_gen}this.exprAllowed=!0},EK.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==EK.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var lQ="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",hQ=lQ+" Extended_Pictographic",fQ={9:lQ,10:hQ,11:"ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS Extended_Pictographic"},pQ="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",dQ="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",vQ=dQ+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",gQ={9:dQ,10:vQ,11:"Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"},mQ={};function yQ(e){var t=mQ[e]={binary:LK(fQ[e]+" "+pQ),nonBinary:{General_Category:LK(pQ),Script:LK(gQ[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}yQ(9),yQ(10),yQ(11);var _Q=jK.prototype,bQ=function(e){this.parser=e,this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":""),this.unicodeProperties=mQ[e.options.ecmaVersion>=11?11:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function xQ(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function SQ(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function EQ(e){return e>=65&&e<=90||e>=97&&e<=122}function AQ(e){return EQ(e)||95===e}function TQ(e){return AQ(e)||wQ(e)}function wQ(e){return e>=48&&e<=57}function CQ(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function kQ(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function MQ(e){return e>=48&&e<=55}bQ.prototype.reset=function(e,t,r){var n=-1!==r.indexOf("u");this.start=0|e,this.source=t+"",this.flags=r,this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchN=n&&this.parser.options.ecmaVersion>=9},bQ.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},bQ.prototype.at=function(e,t){void 0===t&&(t=!1);var r=this.source,n=r.length;if(e>=n)return-1;var i=r.charCodeAt(e);if(!t&&!this.switchU||i<=55295||i>=57344||e+1>=n)return i;var a=r.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},bQ.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var r=this.source,n=r.length;if(e>=n)return n;var i,a=r.charCodeAt(e);return!t&&!this.switchU||a<=55295||a>=57344||e+1>=n||(i=r.charCodeAt(e+1))<56320||i>57343?e+1:e+2},bQ.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},bQ.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},bQ.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},bQ.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},_Q.validateRegExpFlags=function(e){for(var t=e.validFlags,r=e.flags,n=0;n<r.length;n++){var i=r.charAt(n);-1===t.indexOf(i)&&this.raise(e.start,"Invalid regular expression flag"),r.indexOf(i,n+1)>-1&&this.raise(e.start,"Duplicate regular expression flag")}},_Q.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},_Q.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var n=r[t];-1===e.groupNames.indexOf(n)&&e.raise("Invalid named capture referenced")}},_Q.regexp_disjunction=function(e){for(this.regexp_alternative(e);e.eat(124);)this.regexp_alternative(e);this.regexp_eatQuantifier(e,!0)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets")},_Q.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},_Q.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),!0):!!(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))&&(this.regexp_eatQuantifier(e),!0)},_Q.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1},_Q.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},_Q.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},_Q.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return-1!==i&&i<n&&!t&&e.raise("numbers out of order in {} quantifier"),!0;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=r}return!1},_Q.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},_Q.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},_Q.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}e.pos=t}return!1},_Q.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},_Q.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},_Q.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},_Q.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!SQ(t)&&(e.lastIntValue=t,e.advance(),!0)},_Q.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;-1!==(r=e.current())&&!SQ(r);)e.advance();return e.pos!==t},_Q.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t)&&(e.advance(),!0)},_Q.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},_Q.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},_Q.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=xQ(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=xQ(e.lastIntValue);return!0}return!1},_Q.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),function(e){return vK(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},_Q.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),function(e){return gK(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},_Q.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},_Q.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1},_Q.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},_Q.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},_Q.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},_Q.regexp_eatZero=function(e){return 48===e.current()&&!wQ(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},_Q.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},_Q.regexp_eatControlLetter=function(e){var t=e.current();return!!EQ(t)&&(e.lastIntValue=t%32,e.advance(),!0)},_Q.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var r,n=e.pos,i=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(i&&a>=55296&&a<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=1024*(a-55296)+(s-56320)+65536,!0}e.pos=o,e.lastIntValue=a}return!0}if(i&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((r=e.lastIntValue)>=0&&r<=1114111))return!0;i&&e.raise("Invalid unicode escape"),e.pos=n}return!1},_Q.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t)&&(e.lastIntValue=t,e.advance(),!0)},_Q.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48),e.advance()}while((t=e.current())>=48&&t<=57);return!0}return!1},_Q.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),!0;if(e.switchU&&this.options.ecmaVersion>=9&&(80===t||112===t)){if(e.lastIntValue=-1,e.advance(),e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125))return!0;e.raise("Invalid property name")}return!1},_Q.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),!0}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i),!0}return!1},_Q.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){OK(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")},_Q.regexp_validateUnicodePropertyNameOrValue=function(e,t){e.unicodeProperties.binary.test(t)||e.raise("Invalid property name")},_Q.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";AQ(t=e.current());)e.lastStringValue+=xQ(t),e.advance();return""!==e.lastStringValue},_Q.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";TQ(t=e.current());)e.lastStringValue+=xQ(t),e.advance();return""!==e.lastStringValue},_Q.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},_Q.regexp_eatCharacterClass=function(e){if(e.eat(91)){if(e.eat(94),this.regexp_classRanges(e),e.eat(93))return!0;e.raise("Unterminated character class")}return!1},_Q.regexp_classRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;!e.switchU||-1!==t&&-1!==r||e.raise("Invalid character class"),-1!==t&&-1!==r&&t>r&&e.raise("Range out of order in character class")}}},_Q.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(99===r||MQ(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return 93!==n&&(e.lastIntValue=n,e.advance(),!0)},_Q.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},_Q.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!wQ(t)&&95!==t)&&(e.lastIntValue=t%32,e.advance(),!0)},_Q.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},_Q.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;wQ(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t},_Q.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;CQ(r=e.current());)e.lastIntValue=16*e.lastIntValue+kQ(r),e.advance();return e.pos!==t},_Q.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*r+e.lastIntValue:e.lastIntValue=8*t+r}else e.lastIntValue=t;return!0}return!1},_Q.regexp_eatOctalDigit=function(e){var t=e.current();return MQ(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},_Q.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n<t;++n){var i=e.current();if(!CQ(i))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+kQ(i),e.advance()}return!0};var PQ=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new DK(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},IQ=jK.prototype;function OQ(e){return"function"!=typeof BigInt?null:BigInt(e.replace(/_/g,""))}function RQ(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}IQ.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new PQ(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},IQ.getToken=function(){return this.next(),new PQ(this)},"undefined"!=typeof Symbol&&(IQ[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===EK.eof,value:t}}}}),IQ.curContext=function(){return this.context[this.context.length-1]},IQ.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(EK.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},IQ.readToken=function(e){return vK(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},IQ.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},IQ.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),r=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(TK.lastIndex=r;(e=TK.exec(this.input))&&e.index<this.pos;)++this.curLine,this.lineStart=e.index+e[0].length;this.options.onComment&&this.options.onComment(!0,this.input.slice(r+2,n),r,this.pos,t,this.curPosition())},IQ.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!wK(n);)n=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())},IQ.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:10===this.input.charCodeAt(this.pos+1)&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(!(e>8&&e<14||e>=5760&&CK.test(String.fromCharCode(e))))break e;++this.pos}}},IQ.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)},IQ.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(EK.ellipsis)):(++this.pos,this.finishToken(EK.dot))},IQ.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(EK.assign,2):this.finishOp(EK.slash,1)},IQ.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=42===e?EK.star:EK.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++r,n=EK.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(EK.assign,r+1):this.finishOp(n,r)},IQ.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(EK.assign,3);return this.finishOp(124===e?EK.logicalOR:EK.logicalAND,2)}return 61===t?this.finishOp(EK.assign,2):this.finishOp(124===e?EK.bitwiseOR:EK.bitwiseAND,1)},IQ.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(EK.assign,2):this.finishOp(EK.bitwiseXOR,1)},IQ.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!AK.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(EK.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(EK.assign,2):this.finishOp(EK.plusMin,1)},IQ.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+r)?this.finishOp(EK.assign,r+1):this.finishOp(EK.bitShift,r)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(r=2),this.finishOp(EK.relational,r)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},IQ.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(EK.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(EK.arrow)):this.finishOp(61===e?EK.eq:EK.prefix,1)},IQ.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(EK.questionDot,2)}if(63===t){if(e>=12)if(61===this.input.charCodeAt(this.pos+2))return this.finishOp(EK.assign,3);return this.finishOp(EK.coalesce,2)}}return this.finishOp(EK.question,1)},IQ.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(EK.parenL);case 41:return++this.pos,this.finishToken(EK.parenR);case 59:return++this.pos,this.finishToken(EK.semi);case 44:return++this.pos,this.finishToken(EK.comma);case 91:return++this.pos,this.finishToken(EK.bracketL);case 93:return++this.pos,this.finishToken(EK.bracketR);case 123:return++this.pos,this.finishToken(EK.braceL);case 125:return++this.pos,this.finishToken(EK.braceR);case 58:return++this.pos,this.finishToken(EK.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(EK.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(EK.prefix,1)}this.raise(this.pos,"Unexpected character '"+RQ(e)+"'")},IQ.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)},IQ.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(AK.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===n)t=!0;else if("]"===n&&t)t=!1;else if("/"===n&&!t)break;e="\\"===n}++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||(this.regexpState=new bQ(this));s.reset(r,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var u=null;try{u=new RegExp(i,o)}catch(e){}return this.finishToken(EK.regexp,{pattern:i,flags:o,value:u})},IQ.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&void 0===t,i=r&&48===this.input.charCodeAt(this.pos),a=this.pos,o=0,s=0,u=0,c=null==t?1/0:t;u<c;++u,++this.pos){var l=this.input.charCodeAt(this.pos),h=void 0;if(n&&95===l)i&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),95===s&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),0===u&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),s=l;else{if((h=l>=97?l-97+10:l>=65?l-65+10:l>=48&&l<=57?l-48:1/0)>=e)break;s=l,o=o*e+h}}return n&&95===s&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===a||null!=t&&this.pos-a!==t?null:o},IQ.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return null==r&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(r=OQ(this.input.slice(t,this.pos)),++this.pos):vK(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(EK.num,r)},IQ.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var r=this.pos-t>=2&&48===this.input.charCodeAt(t);r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&110===n){var i=OQ(this.input.slice(t,this.pos));return++this.pos,vK(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(EK.num,i)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),46!==n||r||(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),69!==n&&101!==n||r||(43!==(n=this.input.charCodeAt(++this.pos))&&45!==n||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),vK(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var a=function(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}(this.input.slice(t,this.pos),r);return this.finishToken(EK.num,a)},IQ.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},IQ.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):(wK(n,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(EK.string,t)};var LQ={};IQ.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==LQ)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},IQ.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw LQ;this.raise(e,t)},IQ.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==EK.template&&this.type!==EK.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(EK.template,e)):36===r?(this.pos+=2,this.finishToken(EK.dollarBraceL)):(++this.pos,this.finishToken(EK.backQuote));if(92===r)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(wK(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},IQ.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if("{"!==this.input[this.pos+1])break;case"`":return this.finishToken(EK.invalidTemplate,this.input.slice(this.start,this.pos))}this.raise(this.start,"Unterminated template")},IQ.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return RQ(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(e){var r=this.pos-1;return this.invalidStringToken(r,"Invalid escape sequence in template string"),null}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(i)}return wK(t)?"":String.fromCharCode(t)}},IQ.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return null===r&&this.invalidStringToken(t,"Bad character escape sequence"),r},IQ.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(gK(i,n))this.pos+=i<=65535?1:2;else{if(92!==i)break;this.containsEsc=!0,e+=this.input.slice(r,this.pos);var a=this.pos;117!==this.input.charCodeAt(++this.pos)&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?vK:gK)(o,n)||this.invalidStringToken(a,"Invalid Unicode escape"),e+=RQ(o),r=this.pos}t=!1}return e+this.input.slice(r,this.pos)},IQ.readWord=function(){var e=this.readWord1(),t=EK.name;return this.keywords.test(e)&&(t=xK[e]),this.finishToken(t,e)};function NQ(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function DQ(e){var t="function"==typeof Map?new Map:void 0;return(DQ=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return zQ(e,arguments,UQ(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),BQ(n,e)})(e)}function FQ(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function zQ(e,t,r){return(zQ=FQ()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&BQ(i,r.prototype),i}).apply(null,arguments)}function BQ(e,t){return(BQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function UQ(e){return(UQ=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}jK.acorn={Parser:jK,version:"7.4.1",defaultOptions:zK,Position:NK,SourceLocation:DK,getLineInfo:FK,Node:iQ,TokenType:mK,tokTypes:EK,keywordTypes:xK,TokContext:sQ,tokContexts:uQ,isIdentifierChar:gK,isIdentifierStart:vK,Token:PQ,isNewLine:wK,lineBreak:AK,lineBreakG:TK,nonASCIIwhitespace:CK};var jQ=function(e){function t(){return e.apply(this,arguments)||this}return NQ(t,e),t}(DQ(Error)),VQ=function(e){function t(){return e.apply(this,arguments)||this}return NQ(t,e),t}(DQ(SyntaxError)),GQ=function(e){function t(){return e.apply(this,arguments)||this}return NQ(t,e),t}(DQ(ReferenceError)),HQ=function(e){function t(){return e.apply(this,arguments)||this}return NQ(t,e),t}(DQ(TypeError)),WQ=function(e){function t(){return e.apply(this,arguments)||this}return NQ(t,e),t}(jQ),YQ=function(e){function t(){return e.apply(this,arguments)||this}return NQ(t,e),t}(VQ),XQ=function(e){function t(){return e.apply(this,arguments)||this}return NQ(t,e),t}(GQ),ZQ={UnknownError:[3001,"%0",WQ],ExecutionTimeOutError:[3002,"Script execution timed out after %0ms",WQ],NodeTypeSyntaxError:[1001,"Unknown node type: %0",XQ],BinaryOperatorSyntaxError:[1002,"Unknown binary operator: %0",XQ],LogicalOperatorSyntaxError:[1003,"Unknown logical operator: %0",XQ],UnaryOperatorSyntaxError:[1004,"Unknown unary operator: %0",XQ],UpdateOperatorSyntaxError:[1005,"Unknown update operator: %0",XQ],ObjectStructureSyntaxError:[1006,"Unknown object structure: %0",XQ],AssignmentExpressionSyntaxError:[1007,"Unknown assignment expression: %0",XQ],VariableTypeSyntaxError:[1008,"Unknown variable type: %0",XQ],ParamTypeSyntaxError:[1009,"Unknown param type: %0",XQ],AssignmentTypeSyntaxError:[1010,"Unknown assignment type: %0",XQ],FunctionUndefinedReferenceError:[2001,"%0 is not a function",GQ],VariableUndefinedReferenceError:[2002,"%0 is not defined",GQ],IsNotConstructor:[2003,"%0 is not a constructor",HQ]};function qQ(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function KQ(e,t,r){return(KQ=qQ()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&QQ(i,r.prototype),i}).apply(null,arguments)}function QQ(e,t){return(QQ=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $Q(e,t){Object.defineProperty(e,"name",{value:t,writable:!1,enumerable:!1,configurable:!0})}var JQ=Object.prototype.hasOwnProperty,e$=Symbol("Break"),t$=Symbol("Continue"),r$=Symbol("DefaultCase"),n$=Symbol("EmptyStatementReturn"),i$=Symbol("WithScopeName"),a$=Symbol("SuperScopeName"),o$=Symbol("RootScopeName"),s$=Symbol("GlobalScopeName");function u$(e){return"function"==typeof e}var c$=function(){function e(e){this.interpreter=e}return e.prototype.generator=function(){var e=this.interpreter;return{getOptions:e.getOptions.bind(e),getCurrentScope:function(){return this.getCurrentScope()}.bind(e),getGlobalScope:function(){return this.getGlobalScope()}.bind(e),getCurrentContext:function(){return this.getCurrentContext()}.bind(e),getExecStartTime:e.getExecStartTime.bind(e)}},e}();function l$(e,t,r){if(void 0===r&&(r=!0),!(e instanceof c$))throw new Error("Illegal call");if("string"!=typeof t)return t;if(t){var n=e.generator(),i={timeout:n.getOptions().timeout,_initEnv:function(){r||this.setCurrentContext(n.getCurrentContext()),this.execStartTime=n.getExecStartTime(),this.execEndTime=this.execStartTime}},a=r?n.getGlobalScope():n.getCurrentScope();return new _$(a,i).evaluate(t)}}function h$(e){if(!(e instanceof c$))throw new Error("Illegal call");for(var t=e.generator(),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var a=n.pop(),o=new _$(t.getGlobalScope(),t.getOptions()),s="\n\t\t    (function anonymous("+n.join(",")+"){\n\t\t        "+a+"\n\t\t    });\n\t\t    ";return o.evaluate(s)}Object.defineProperty(l$,"__IS_EVAL_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Object.defineProperty(h$,"__IS_FUNCTION_FUNC",{value:!0,writable:!1,enumerable:!1,configurable:!1});var f$=function(e){this.value=e},p$=function(e){this.value=e},d$=function(e){this.value=e},v$=function(e,t,r){void 0===t&&(t=null),this.name=r,this.parent=t,this.data=e,this.labelStack=[]};function g$(){}function m$(e,t){return void 0===e&&(e=null),new v$(Object.create(null),e,t)}var y$={NaN:NaN,Infinity:1/0,undefined:void 0,Object:Object,Array:Array,String:String,Boolean:Boolean,Number:Number,Date:Date,RegExp:RegExp,Error:Error,URIError:URIError,TypeError:TypeError,RangeError:RangeError,SyntaxError:SyntaxError,ReferenceError:ReferenceError,Float32Array:Float32Array,Float64Array:Float64Array,Uint32Array:Uint32Array,Math:Math,parseInt:parseInt,parseFloat:parseFloat,isNaN:isNaN,isFinite:isFinite,decodeURI:decodeURI,decodeURIComponent:decodeURIComponent,encodeURI:encodeURI,encodeURIComponent:encodeURIComponent,escape:escape,unescape:unescape,eval:l$,Function:h$};"undefined"!=typeof JSON&&(y$.JSON=JSON),"undefined"!=typeof Promise&&(y$.Promise=Promise),"undefined"!=typeof Set&&(y$.Set=Set),"undefined"!=typeof Map&&(y$.Map=Map),"undefined"!=typeof Symbol&&(y$.Symbol=Symbol),"undefined"!=typeof Proxy&&(y$.Proxy=Proxy),"undefined"!=typeof WeakMap&&(y$.WeakMap=WeakMap),"undefined"!=typeof WeakSet&&(y$.WeakSet=WeakSet),"undefined"!=typeof Reflect&&(y$.Reflect=Reflect);var _$=function(){function e(t,r){void 0===t&&(t=e.global),void 0===r&&(r={}),this.sourceList=[],this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.isVarDeclMode=!1,this.lastExecNode=null,this.isRunning=!1,this.options={ecmaVersion:r.ecmaVersion||e.ecmaVersion,timeout:r.timeout||0,rootContext:r.rootContext,globalContextInFunction:void 0===r.globalContextInFunction?e.globalContextInFunction:r.globalContextInFunction,_initEnv:r._initEnv},this.context=t||Object.create(null),this.callStack=[],this.initEnvironment(this.context)}var t=e.prototype;return t.initEnvironment=function(e){var t;if(e instanceof v$)t=e;else{var r=null,n=this.createSuperScope(e);this.options.rootContext&&(r=new v$(function(e){return Object.create(e)}(this.options.rootContext),n,o$)),t=new v$(e,r||n,s$)}this.globalScope=t,this.currentScope=this.globalScope,this.globalContext=t.data,this.currentContext=t.data,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null),this.execStartTime=Date.now(),this.execEndTime=this.execStartTime;var i=this.options._initEnv;i&&i.call(this)},t.getExecStartTime=function(){return this.execStartTime},t.getExecutionTime=function(){return this.execEndTime-this.execStartTime},t.setExecTimeout=function(e){void 0===e&&(e=0),this.options.timeout=e},t.getOptions=function(){return this.options},t.getGlobalScope=function(){return this.globalScope},t.getCurrentScope=function(){return this.currentScope},t.getCurrentContext=function(){return this.currentContext},t.isInterruptThrow=function(e){return e instanceof WQ||e instanceof XQ||e instanceof YQ},t.createSuperScope=function(e){var t=Object.assign({},y$);return Object.keys(t).forEach((function(r){r in e&&delete t[r]})),new v$(t,null,a$)},t.setCurrentContext=function(e){this.currentContext=e},t.setCurrentScope=function(e){this.currentScope=e},t.evaluate=function(t){var r;if(void 0===t&&(t=""),t)return r=function(e,t){return jK.parse(e,t)}(t,{ranges:!0,locations:!0,ecmaVersion:this.options.ecmaVersion||e.ecmaVersion}),this.evaluateNode(r,t)},t.appendCode=function(e){return this.evaluate(e)},t.evaluateNode=function(e,t){var r=this;void 0===t&&(t=""),this.value=void 0,this.source=t,this.sourceList.push(t),this.isRunning=!0,this.execStartTime=Date.now(),this.execEndTime=this.execStartTime,this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);var n=this.getCurrentScope(),i=this.getCurrentContext(),a=n.labelStack.concat([]),o=this.callStack.concat([]);try{var s=this.createClosure(e);this.addDeclarationsToScope(this.collectDeclVars,this.collectDeclFuncs,this.getCurrentScope()),s()}catch(e){throw e}finally{r.setCurrentScope(n),r.setCurrentContext(i),n.labelStack=a,r.callStack=o,this.execEndTime=Date.now()}return this.isRunning=!1,this.getValue()},t.createErrorMessage=function(e,t,r){var n=e[1].replace("%0",String(t));return null!==r&&(n+=this.getNodePosition(r||this.lastExecNode)),n},t.createError=function(e,t){return new t(e)},t.createThrowError=function(e,t){return this.createError(e,t)},t.createInternalThrowError=function(e,t,r){return this.createError(this.createErrorMessage(e,t,r),e[2])},t.checkTimeout=function(){if(!this.isRunning)return!1;var e=this.options.timeout||0;return Date.now()-this.execStartTime>e},t.getNodePosition=function(e){if(e){return e.loc?" ["+e.loc.start.line+":"+e.loc.start.column+"]":""}return""},t.createClosure=function(e){var t,r=this;switch(e.type){case"BinaryExpression":t=this.binaryExpressionHandler(e);break;case"LogicalExpression":t=this.logicalExpressionHandler(e);break;case"UnaryExpression":t=this.unaryExpressionHandler(e);break;case"UpdateExpression":t=this.updateExpressionHandler(e);break;case"ObjectExpression":t=this.objectExpressionHandler(e);break;case"ArrayExpression":t=this.arrayExpressionHandler(e);break;case"CallExpression":t=this.callExpressionHandler(e);break;case"NewExpression":t=this.newExpressionHandler(e);break;case"MemberExpression":t=this.memberExpressionHandler(e);break;case"ThisExpression":t=this.thisExpressionHandler(e);break;case"SequenceExpression":t=this.sequenceExpressionHandler(e);break;case"Literal":t=this.literalHandler(e);break;case"Identifier":t=this.identifierHandler(e);break;case"AssignmentExpression":t=this.assignmentExpressionHandler(e);break;case"FunctionDeclaration":t=this.functionDeclarationHandler(e);break;case"VariableDeclaration":t=this.variableDeclarationHandler(e);break;case"BlockStatement":case"Program":t=this.programHandler(e);break;case"ExpressionStatement":t=this.expressionStatementHandler(e);break;case"EmptyStatement":t=this.emptyStatementHandler(e);break;case"ReturnStatement":t=this.returnStatementHandler(e);break;case"FunctionExpression":t=this.functionExpressionHandler(e);break;case"IfStatement":t=this.ifStatementHandler(e);break;case"ConditionalExpression":t=this.conditionalExpressionHandler(e);break;case"ForStatement":t=this.forStatementHandler(e);break;case"WhileStatement":t=this.whileStatementHandler(e);break;case"DoWhileStatement":t=this.doWhileStatementHandler(e);break;case"ForInStatement":t=this.forInStatementHandler(e);break;case"WithStatement":t=this.withStatementHandler(e);break;case"ThrowStatement":t=this.throwStatementHandler(e);break;case"TryStatement":t=this.tryStatementHandler(e);break;case"ContinueStatement":t=this.continueStatementHandler(e);break;case"BreakStatement":t=this.breakStatementHandler(e);break;case"SwitchStatement":t=this.switchStatementHandler(e);break;case"LabeledStatement":t=this.labeledStatementHandler(e);break;case"DebuggerStatement":t=this.debuggerStatementHandler(e);break;default:throw this.createInternalThrowError(ZQ.NodeTypeSyntaxError,e.type,e)}return function(){var n=r.options.timeout;if(n&&n>0&&r.checkTimeout())throw r.createInternalThrowError(ZQ.ExecutionTimeOutError,n,null);return r.lastExecNode=e,t.apply(void 0,arguments)}},t.binaryExpressionHandler=function(e){var t=this,r=this.createClosure(e.left),n=this.createClosure(e.right);return function(){var i=r(),a=n();switch(e.operator){case"==":return i==a;case"!=":return i!=a;case"===":return i===a;case"!==":return i!==a;case"<":return i<a;case"<=":return i<=a;case">":return i>a;case">=":return i>=a;case"<<":return i<<a;case">>":return i>>a;case">>>":return i>>>a;case"+":return i+a;case"-":return i-a;case"*":return i*a;case"**":return Math.pow(i,a);case"/":return i/a;case"%":return i%a;case"|":return i|a;case"^":return i^a;case"&":return i&a;case"in":return i in a;case"instanceof":return i instanceof a;default:throw t.createInternalThrowError(ZQ.BinaryOperatorSyntaxError,e.operator,e)}}},t.logicalExpressionHandler=function(e){var t=this,r=this.createClosure(e.left),n=this.createClosure(e.right);return function(){switch(e.operator){case"||":return r()||n();case"&&":return r()&&n();default:throw t.createInternalThrowError(ZQ.LogicalOperatorSyntaxError,e.operator,e)}}},t.unaryExpressionHandler=function(e){var t=this;switch(e.operator){case"delete":var r=this.createObjectGetter(e.argument),n=this.createNameGetter(e.argument);return function(){return delete r()[n()]};default:var i;if("typeof"===e.operator&&"Identifier"===e.argument.type){var a=this.createObjectGetter(e.argument),o=this.createNameGetter(e.argument);i=function(){return a()[o()]}}else i=this.createClosure(e.argument);return function(){var r=i();switch(e.operator){case"-":return-r;case"+":return+r;case"!":return!r;case"~":return~r;case"void":return;case"typeof":return typeof r;default:throw t.createInternalThrowError(ZQ.UnaryOperatorSyntaxError,e.operator,e)}}}},t.updateExpressionHandler=function(e){var t=this,r=this.createObjectGetter(e.argument),n=this.createNameGetter(e.argument);return function(){var i=r(),a=n();switch(t.assertVariable(i,a,e),e.operator){case"++":return e.prefix?++i[a]:i[a]++;case"--":return e.prefix?--i[a]:i[a]--;default:throw t.createInternalThrowError(ZQ.UpdateOperatorSyntaxError,e.operator,e)}}},t.objectExpressionHandler=function(e){var t=this,r=[];var n=Object.create(null);return e.properties.forEach((function(e){var i=e.kind,a=function(e){return"Identifier"===e.type?e.name:"Literal"===e.type?e.value:this.throwError(ZQ.ObjectStructureSyntaxError,e.type,e)}(e.key);n[a]&&"init"!==i||(n[a]={}),n[a][i]=t.createClosure(e.value),r.push({key:a,property:e})})),function(){for(var e={},t=r.length,i=0;i<t;i++){var a=r[i],o=a.key,s=n[o],u=s.init?s.init():void 0,c=s.get?s.get():function(){},l=s.set?s.set():function(e){};if("set"in s||"get"in s){var h={configurable:!0,enumerable:!0,get:c,set:l};Object.defineProperty(e,o,h)}else{var f=a.property,p=f.kind;"Identifier"!==f.key.type||"FunctionExpression"!==f.value.type||"init"!==p||f.value.id||$Q(u,f.key.name),e[o]=u}}return e}},t.arrayExpressionHandler=function(e){var t=this,r=e.elements.map((function(e){return e?t.createClosure(e):e}));return function(){for(var e=r.length,t=Array(e),n=0;n<e;n++){var i=r[n];i&&(t[n]=i())}return t}},t.safeObjectGet=function(e,t,r){return e[t]},t.createCallFunctionGetter=function(e){var t=this;switch(e.type){case"MemberExpression":var r=this.createClosure(e.object),n=this.createMemberKeyGetter(e),i=this.source;return function(){var a=r(),o=n(),s=t.safeObjectGet(a,o,e);if(!s||!u$(s)){var u=i.slice(e.start,e.end);throw t.createInternalThrowError(ZQ.FunctionUndefinedReferenceError,u,e)}return s.__IS_EVAL_FUNC?function(e){return s(new c$(t),e,!0)}:s.__IS_FUNCTION_FUNC?function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return s.apply(void 0,[new c$(t)].concat(r))}:s.bind(a)};default:var a=this.createClosure(e);return function(){var r="";"Identifier"===e.type&&(r=e.name);var n=a();if(!n||!u$(n))throw t.createInternalThrowError(ZQ.FunctionUndefinedReferenceError,r,e);if("Identifier"===e.type&&n.__IS_EVAL_FUNC&&"eval"===r)return function(e){var i=t.getScopeFromName(r,t.getCurrentScope()),a=i.name===a$||i.name===s$||i.name===o$;return n(new c$(t),e,!a)};if(n.__IS_EVAL_FUNC)return function(e){return n(new c$(t),e,!0)};if(n.__IS_FUNCTION_FUNC)return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return n.apply(void 0,[new c$(t)].concat(r))};var i=t.options.globalContextInFunction;if("Identifier"===e.type){var o=t.getIdentifierScope(e);o.name===i$&&(i=o.data)}return n.bind(i)}}},t.callExpressionHandler=function(e){var t=this,r=this.createCallFunctionGetter(e.callee),n=e.arguments.map((function(e){return t.createClosure(e)}));return function(){return r().apply(void 0,n.map((function(e){return e()})))}},t.functionExpressionHandler=function(e){var t=this,r=this,n=this.source,i=this.collectDeclVars,a=this.collectDeclFuncs;this.collectDeclVars=Object.create(null),this.collectDeclFuncs=Object.create(null);var o=e.id?e.id.name:"",s=e.params.length,u=e.params.map((function(e){return t.createParamNameGetter(e)})),c=this.createClosure(e.body),l=this.collectDeclVars,h=this.collectDeclFuncs;return this.collectDeclVars=i,this.collectDeclFuncs=a,function(){var t=r.getCurrentScope(),i=function e(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];r.callStack.push(""+o);var s=r.getCurrentScope(),f=m$(t,"FunctionScope("+o+")");r.setCurrentScope(f),r.addDeclarationsToScope(l,h,f),o&&(f.data[o]=e),f.data.arguments=arguments,u.forEach((function(e,t){f.data[e()]=i[t]}));var p=r.getCurrentContext();r.setCurrentContext(this);var d=c();if(r.setCurrentContext(p),r.setCurrentScope(s),r.callStack.pop(),d instanceof f$)return d.value};return $Q(i,o),Object.defineProperty(i,"length",{value:s,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(i,"toString",{value:function(){return n.slice(e.start,e.end)},writable:!0,configurable:!0,enumerable:!1}),Object.defineProperty(i,"valueOf",{value:function(){return n.slice(e.start,e.end)},writable:!0,configurable:!0,enumerable:!1}),i}},t.newExpressionHandler=function(e){var t=this,r=this.source,n=this.createClosure(e.callee),i=e.arguments.map((function(e){return t.createClosure(e)}));return function(){var a=n();if(!u$(a)||a.__IS_EVAL_FUNC){var o=e.callee,s=r.slice(o.start,o.end);throw t.createInternalThrowError(ZQ.IsNotConstructor,s,e)}return a.__IS_FUNCTION_FUNC?a.apply(void 0,[new c$(t)].concat(i.map((function(e){return e()})))):KQ(a,i.map((function(e){return e()})))}},t.memberExpressionHandler=function(e){var t=this.createClosure(e.object),r=this.createMemberKeyGetter(e);return function(){return t()[r()]}},t.thisExpressionHandler=function(e){var t=this;return function(){return t.getCurrentContext()}},t.sequenceExpressionHandler=function(e){var t=this,r=e.expressions.map((function(e){return t.createClosure(e)}));return function(){for(var e,t=r.length,n=0;n<t;n++){e=(0,r[n])()}return e}},t.literalHandler=function(e){return function(){return e.regex?new RegExp(e.regex.pattern,e.regex.flags):e.value}},t.identifierHandler=function(e){var t=this;return function(){var r=t.getCurrentScope(),n=t.getScopeDataFromName(e.name,r);return t.assertVariable(n,e.name,e),n[e.name]}},t.getIdentifierScope=function(e){var t=this.getCurrentScope();return this.getScopeFromName(e.name,t)},t.assignmentExpressionHandler=function(e){var t=this;"Identifier"!==e.left.type||"FunctionExpression"!==e.right.type||e.right.id||(e.right.id={type:"Identifier",name:e.left.name});var r=this.createObjectGetter(e.left),n=this.createNameGetter(e.left),i=this.createClosure(e.right);return function(){var a=r(),o=n(),s=i();switch("="!==e.operator&&t.assertVariable(a,o,e),e.operator){case"=":return a[o]=s;case"+=":return a[o]+=s;case"-=":return a[o]-=s;case"*=":return a[o]*=s;case"**=":return a[o]=Math.pow(a[o],s);case"/=":return a[o]/=s;case"%=":return a[o]%=s;case"<<=":return a[o]<<=s;case">>=":return a[o]>>=s;case">>>=":return a[o]>>>=s;case"&=":return a[o]&=s;case"^=":return a[o]^=s;case"|=":return a[o]|=s;default:throw t.createInternalThrowError(ZQ.AssignmentExpressionSyntaxError,e.type,e)}}},t.functionDeclarationHandler=function(e){if(e.id){var t=this.functionExpressionHandler(e);Object.defineProperty(t,"isFunctionDeclareClosure",{value:!0,writable:!1,configurable:!1,enumerable:!1}),this.funcDeclaration(e.id.name,t)}return function(){return n$}},t.getVariableName=function(e){if("Identifier"===e.type)return e.name;throw this.createInternalThrowError(ZQ.VariableTypeSyntaxError,e.type,e)},t.variableDeclarationHandler=function(e){for(var t,r=this,n=[],i=0;i<e.declarations.length;i++){var a=e.declarations[i];this.varDeclaration(this.getVariableName(a.id)),a.init&&n.push({type:"AssignmentExpression",operator:"=",left:a.id,right:a.init})}return n.length&&(t=this.createClosure({type:"BlockStatement",body:n})),function(){if(t){var e=r.isVarDeclMode;r.isVarDeclMode=!0,t(),r.isVarDeclMode=e}return n$}},t.assertVariable=function(e,t,r){if(e===this.globalScope.data&&!(t in e))throw this.createInternalThrowError(ZQ.VariableUndefinedReferenceError,t,r)},t.programHandler=function(e){var t=this,r=e.body.map((function(e){return t.createClosure(e)}));return function(){for(var e=n$,n=0;n<r.length;n++){var i=r[n],a=t.setValue(i());if(a!==n$&&((e=a)instanceof f$||e instanceof p$||e instanceof d$||e===e$||e===t$))break}return e}},t.expressionStatementHandler=function(e){return this.createClosure(e.expression)},t.emptyStatementHandler=function(e){return function(){return n$}},t.returnStatementHandler=function(e){var t=e.argument?this.createClosure(e.argument):g$;return function(){return new f$(t())}},t.ifStatementHandler=function(e){var t=this.createClosure(e.test),r=this.createClosure(e.consequent),n=e.alternate?this.createClosure(e.alternate):
/*!important*/
function(){return n$};return function(){return t()?r():n()}},t.conditionalExpressionHandler=function(e){return this.ifStatementHandler(e)},t.forStatementHandler=function(e){var t=this,r=g$,n=e.test?this.createClosure(e.test):function(){return!0},i=g$,a=this.createClosure(e.body);return"ForStatement"===e.type&&(r=e.init?this.createClosure(e.init):r,i=e.update?this.createClosure(e.update):g$),function(o){var s,u=n$,c="DoWhileStatement"===e.type;for(o&&"LabeledStatement"===o.type&&(s=o.label.name),r();c||n();i()){c=!1;var l=t.setValue(a());if(l!==n$&&l!==t$){if(l===e$)break;if((u=l)instanceof d$&&u.value===s)u=n$;else if(u instanceof f$||u instanceof p$||u instanceof d$)break}}return u}},t.whileStatementHandler=function(e){return this.forStatementHandler(e)},t.doWhileStatementHandler=function(e){return this.forStatementHandler(e)},t.forInStatementHandler=function(e){var t=this,r=e.left,n=this.createClosure(e.right),i=this.createClosure(e.body);return"VariableDeclaration"===e.left.type&&(this.createClosure(e.left)(),r=e.left.declarations[0].id),function(e){var a,o,s=n$;e&&"LabeledStatement"===e.type&&(a=e.label.name);var u=n();for(o in u){t.assignmentExpressionHandler({type:"AssignmentExpression",operator:"=",left:r,right:{type:"Literal",value:o}})();var c=t.setValue(i());if(c!==n$&&c!==t$){if(c===e$)break;if((s=c)instanceof d$&&s.value===a)s=n$;else if(s instanceof f$||s instanceof p$||s instanceof d$)break}}return s}},t.withStatementHandler=function(e){var t=this,r=this.createClosure(e.object),n=this.createClosure(e.body);return function(){var e=r(),i=t.getCurrentScope(),a=new v$(e,i,i$);t.setCurrentScope(a);var o=t.setValue(n());return t.setCurrentScope(i),o}},t.throwStatementHandler=function(e){var t=this,r=this.createClosure(e.argument);return function(){throw t.setValue(void 0),r()}},t.tryStatementHandler=function(e){var t=this,r=this.createClosure(e.block),n=e.handler?this.catchClauseHandler(e.handler):null,i=e.finalizer?this.createClosure(e.finalizer):null;return function(){var e,a,o=t.getCurrentScope(),s=t.getCurrentContext(),u=o.labelStack.concat([]),c=t.callStack.concat([]),l=n$,h=function(){t.setCurrentScope(o),t.setCurrentContext(s),o.labelStack=u,t.callStack=c};try{(l=t.setValue(r()))instanceof f$&&(e=l)}catch(r){if(h(),t.isInterruptThrow(r))throw r;if(n)try{(l=t.setValue(n(r)))instanceof f$&&(e=l)}catch(e){if(h(),t.isInterruptThrow(e))throw e;a=e}}if(i)try{(l=i())instanceof f$&&(e=l)}catch(e){if(h(),t.isInterruptThrow(e))throw e;a=e}if(a)throw a;return e||l}},t.catchClauseHandler=function(e){var t=this,r=this.createParamNameGetter(e.param),n=this.createClosure(e.body);return function(e){var i,a=t.getCurrentScope().data,o=r(),s=JQ.call(a,o),u=a[o];return a[o]=e,i=n(),s?a[o]=u:delete a[o],i}},t.continueStatementHandler=function(e){return function(){return e.label?new d$(e.label.name):t$}},t.breakStatementHandler=function(e){return function(){return e.label?new p$(e.label.name):e$}},t.switchStatementHandler=function(e){var t=this,r=this.createClosure(e.discriminant),n=e.cases.map((function(e){return t.switchCaseHandler(e)}));return function(){for(var e,i,a,o=r(),s=!1,u=0;u<n.length;u++){var c=n[u](),l=c.testClosure();if(l!==r$){if(s||l===o){if(s=!0,(i=t.setValue(c.bodyClosure()))===n$)continue;if(i===e$)break;if((e=i)instanceof f$||e instanceof p$||e instanceof d$||e===t$)break}}else a=c}!s&&a&&((i=t.setValue(a.bodyClosure()))===n$||i===e$||i===t$||(e=i));return e}},t.switchCaseHandler=function(e){var t=e.test?this.createClosure(e.test):function(){return r$},r=this.createClosure({type:"BlockStatement",body:e.consequent});return function(){return{testClosure:t,bodyClosure:r}}},t.labeledStatementHandler=function(e){var t=this,r=e.label.name,n=this.createClosure(e.body);return function(){var i,a=t.getCurrentScope();return a.labelStack.push(r),(i=n(e))instanceof p$&&i.value===r&&(i=n$),a.labelStack.pop(),i}},t.debuggerStatementHandler=function(e){return function(){return n$}},t.createParamNameGetter=function(e){if("Identifier"===e.type)return function(){return e.name};throw this.createInternalThrowError(ZQ.ParamTypeSyntaxError,e.type,e)},t.createObjectKeyGetter=function(e){var t;return t="Identifier"===e.type?function(){return e.name}:this.createClosure(e),function(){return t()}},t.createMemberKeyGetter=function(e){return e.computed?this.createClosure(e.property):this.createObjectKeyGetter(e.property)},t.createObjectGetter=function(e){var t=this;switch(e.type){case"Identifier":return function(){return t.getScopeDataFromName(e.name,t.getCurrentScope())};case"MemberExpression":return this.createClosure(e.object);default:throw this.createInternalThrowError(ZQ.AssignmentTypeSyntaxError,e.type,e)}},t.createNameGetter=function(e){switch(e.type){case"Identifier":return function(){return e.name};case"MemberExpression":return this.createMemberKeyGetter(e);default:throw this.createInternalThrowError(ZQ.AssignmentTypeSyntaxError,e.type,e)}},t.varDeclaration=function(e){this.collectDeclVars[e]=void 0},t.funcDeclaration=function(e,t){this.collectDeclFuncs[e]=t},t.addDeclarationsToScope=function(e,t,r){var n=r.data;for(var i in t){var a=t[i];n[i]=a?a():a}for(var o in e)o in n||(n[o]=void 0)},t.getScopeValue=function(e,t){return this.getScopeFromName(e,t).data[e]},t.getScopeDataFromName=function(e,t){return this.getScopeFromName(e,t).data},t.getScopeFromName=function(e,t){var r=t;do{if(e in r.data)return r}while(r=r.parent);return this.globalScope},t.setValue=function(e){var t=this.callStack.length;return this.isVarDeclMode||t||e===n$||e===e$||e===t$||e instanceof p$||e instanceof d$||(this.value=e instanceof f$?e.value:e),e},t.getValue=function(){return this.value},e}();_$.version="0.0.3",_$.eval=l$,_$.Function=h$,_$.ecmaVersion=5,_$.globalContextInFunction=void 0,_$.global=Object.create(null);var b$,x$,S$,E$,A$,T$,w$,C$,k$,M$,P$,I$,O$,R$,L$,N$=function(e,t,r){return function(e,t,r){return new _$(t,r).evaluate(e)}(e,t,r)},D$=N((function(e,t){e.exports=function(e){var t=["WEBGL_depth_texture","OES_texture_float","OES_vertex_array_object","OES_standard_derivatives","OES_element_index_uint","EXT_frag_depth","EXT_blend_minmax","EXT_shader_texture_lod","ANGLE_instanced_arrays","WEBGL_draw_buffers"],r=function(e){return"WebGL2RenderingContext"===e.__proto__.constructor.name},n=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray},i=function(e,t){for(var r=Object.keys(t),n=0;n<r.length;++n)e[r[n]]=t[r[n]];return e};function o(e){return"undefined"!=typeof atob?atob(e):"base64:"+e}function s(e){var t=new Error("(regl) "+e);throw console.error(t),t}function u(e,t){e||s(t)}function c(e){return e?": "+e:""}function l(e,t){switch(t){case"number":return"number"==typeof e;case"object":return"object"===a(e);case"string":return"string"==typeof e;case"boolean":return"boolean"==typeof e;case"function":return"function"==typeof e;case"undefined":return void 0===e;case"symbol":return"symbol"===a(e)}}function h(e,t,r){t.indexOf(e)<0&&s("invalid value"+c(r)+". must be one of: "+t)}var f=["gl","canvas","container","attributes","pixelRatio","extensions","optionalExtensions","profile","onDone"];function p(e,t){for(e+="";e.length<t;)e=" "+e;return e}function d(){this.name="unknown",this.lines=[],this.index={},this.hasErrors=!1}function v(e,t){this.number=e,this.line=t,this.errors=[]}function g(e,t,r){this.file=e,this.line=t,this.message=r}function m(){var e=new Error,t=(e.stack||e).toString(),r=/compileProcedure.*\n\s*at.*\((.*)\)/.exec(t);if(r)return r[1];var n=/compileProcedure.*\n\s*at\s+(.*)(\n|$)/.exec(t);return n?n[1]:"unknown"}function y(){var e=new Error,t=(e.stack||e).toString(),r=/at REGLCommand.*\n\s+at.*\((.*)\)/.exec(t);if(r)return r[1];var n=/at REGLCommand.*\n\s+at\s+(.*)\n/.exec(t);return n?n[1]:"unknown"}function _(e,t){var r=e.split("\n"),n=1,i=0,a={unknown:new d,0:new d};a.unknown.name=a[0].name=t||m(),a.unknown.lines.push(new v(0,""));for(var s=0;s<r.length;++s){var u=r[s],c=/^\s*#\s*(\w+)\s+(.+)\s*$/.exec(u);if(c)switch(c[1]){case"line":var l=/(\d+)(\s+\d+)?/.exec(c[2]);l&&(n=0|l[1],l[2]&&((i=0|l[2])in a||(a[i]=new d)));break;case"define":var h=/SHADER_NAME(_B64)?\s+(.*)$/.exec(c[2]);h&&(a[i].name=h[1]?o(h[2]):h[2])}a[i].lines.push(new v(n++,u))}return Object.keys(a).forEach((function(e){var t=a[e];t.lines.forEach((function(e){t.index[e.number]=e}))})),a}function b(e){e._commandRef=m()}function x(e,t){var r=y();s(e+" in command "+(t||m())+("unknown"===r?"":" called from "+r))}function S(e,t,r,n){l(e,t)||x("invalid parameter type"+c(r)+". expected "+t+", got "+a(e),n||m())}var E={};function A(e,t){return 32820===e||32819===e||33635===e?2:34042===e?4:E[e]*t}function T(e){return!(e&e-1||!e)}E[5120]=E[5121]=1,E[5122]=E[5123]=E[36193]=E[33635]=E[32819]=E[32820]=2,E[5124]=E[5125]=E[5126]=E[34042]=4;var w=i(u,{optional:function(e){e()},raise:s,commandRaise:x,command:function(e,t,r){e||x(t,r||m())},parameter:function(e,t,r){e in t||s("unknown parameter ("+e+")"+c(r)+". possible values: "+Object.keys(t).join())},commandParameter:function(e,t,r,n){e in t||x("unknown parameter ("+e+")"+c(r)+". possible values: "+Object.keys(t).join(),n||m())},constructor:function(e){Object.keys(e).forEach((function(e){f.indexOf(e)<0&&s('invalid regl constructor argument "'+e+'". must be one of '+f)}))},type:function(e,t,r){l(e,t)||s("invalid parameter type"+c(r)+". expected "+t+", got "+a(e))},commandType:S,isTypedArray:function(e,t){n(e)||s("invalid parameter type"+c(t)+". must be a typed array")},nni:function(e,t){e>=0&&(0|e)===e||s("invalid parameter type, ("+e+")"+c(t)+". must be a nonnegative integer")},oneOf:h,shaderError:function(e,t,r,n,i){if(!e.getShaderParameter(t,e.COMPILE_STATUS)){var a=e.getShaderInfoLog(t),o=n===e.FRAGMENT_SHADER?"fragment":"vertex";S(r,"string",o+" shader source must be a string",i);var s=_(r,i),c=function(e){var t=[];return e.split("\n").forEach((function(e){if(!(e.length<5)){var r=/^ERROR:\s+(\d+):(\d+):\s*(.*)$/.exec(e);r?t.push(new g(0|r[1],0|r[2],r[3].trim())):e.length>0&&t.push(new g("unknown",0,e))}})),t}(a);!function(e,t){t.forEach((function(t){var r=e[t.file];if(r){var n=r.index[t.line];if(n)return n.errors.push(t),void(r.hasErrors=!0)}e.unknown.hasErrors=!0,e.unknown.lines[0].errors.push(t)}))}(s,c),Object.keys(s).forEach((function(e){var t=s[e];if(t.hasErrors){var r=[""],n=[""];i("file number "+e+": "+t.name+"\n","color:red;text-decoration:underline;font-weight:bold"),t.lines.forEach((function(e){if(e.errors.length>0){i(p(e.number,4)+"|  ","background-color:yellow; font-weight:bold"),i(e.line+"\n","color:red; background-color:yellow; font-weight:bold");var t=0;e.errors.forEach((function(r){var n=r.message,a=/^\s*'(.*)'\s*:\s*(.*)$/.exec(n);if(a){var o=a[1];switch(n=a[2],o){case"assign":o="="}t=Math.max(e.line.indexOf(o,t),0)}else t=0;i(p("| ",6)),i(p("^^^",t+3)+"\n","font-weight:bold"),i(p("| ",6)),i(n+"\n","font-weight:bold")})),i(p("| ",6)+"\n")}else i(p(e.number,4)+"|  "),i(e.line+"\n","color:red")})),"undefined"==typeof document||window.chrome?console.log(r.join("")):(n[0]=r.join("%c"),console.log.apply(console,n))}function i(e,t){r.push(e),n.push(t||"")}})),u.raise("Error compiling "+o+" shader, "+s[0].name)}},linkError:function(e,t,r,n,i){if(!e.getProgramParameter(t,e.LINK_STATUS)){var a=e.getProgramInfoLog(t),o=_(r,i),s='Error linking program with vertex shader, "'+_(n,i)[0].name+'", and fragment shader "'+o[0].name+'"';"undefined"!=typeof document?console.log("%c"+s+"\n%c"+a,"color:red;text-decoration:underline;font-weight:bold","color:red"):console.log(s+"\n"+a),u.raise(s)}},callSite:y,saveCommandRef:b,saveDrawInfo:function(e,t,r,n){function i(e){return e?n.id(e):0}function a(e,t){Object.keys(t).forEach((function(t){e[n.id(t)]=!0}))}b(e),e._fragId=i(e.static.frag),e._vertId=i(e.static.vert);var o=e._uniformSet={};a(o,t.static),a(o,t.dynamic);var s=e._attributeSet={};a(s,r.static),a(s,r.dynamic),e._hasCount="count"in e.static||"count"in e.dynamic||"elements"in e.static||"elements"in e.dynamic},framebufferFormat:function(e,t,r){e.texture?h(e.texture._texture.internalformat,t,"unsupported texture format for attachment"):h(e.renderbuffer._renderbuffer.format,r,"unsupported renderbuffer format for attachment")},guessCommand:m,texture2D:function(e,t,r){var n,i=t.width,a=t.height,o=t.channels;u(i>0&&i<=r.maxTextureSize&&a>0&&a<=r.maxTextureSize,"invalid texture shape"),33071===e.wrapS&&33071===e.wrapT||u(T(i)&&T(a),"incompatible wrap mode for texture, both width and height must be power of 2"),1===t.mipmask?1!==i&&1!==a&&u(9984!==e.minFilter&&9986!==e.minFilter&&9985!==e.minFilter&&9987!==e.minFilter,"min filter requires mipmap"):(u(T(i)&&T(a),"texture must be a square power of 2 to support mipmapping"),u(t.mipmask===(i<<1)-1,"missing or incomplete mipmap data")),5126===t.type&&(r.extensions.indexOf("oes_texture_float_linear")<0&&u(9728===e.minFilter&&9728===e.magFilter,"filter not supported, must enable oes_texture_float_linear"),u(!e.genMipmaps,"mipmap generation not supported with float textures"));var s=t.images;for(n=0;n<16;++n)if(s[n]){var c=i>>n,l=a>>n;u(t.mipmask&1<<n,"missing mipmap data");var h=s[n];if(u(h.width===c&&h.height===l,"invalid shape for mip images"),u(h.format===t.format&&h.internalformat===t.internalformat&&h.type===t.type,"incompatible type for mip image"),h.compressed);else if(h.data){var f=Math.ceil(A(h.type,o)*c/h.unpackAlignment)*h.unpackAlignment;u(h.data.byteLength===f*l,"invalid data for image, buffer size is inconsistent with image format")}else h.element||h.copy}else e.genMipmaps||u(0==(t.mipmask&1<<n),"extra mipmap data");t.compressed&&u(!e.genMipmaps,"mipmap generation for compressed images not supported")},textureCube:function(e,t,r,n){var i=e.width,a=e.height,o=e.channels;u(i>0&&i<=n.maxTextureSize&&a>0&&a<=n.maxTextureSize,"invalid texture shape"),u(i===a,"cube map must be square"),u(33071===t.wrapS&&33071===t.wrapT,"wrap mode not supported by cube map");for(var s=0;s<r.length;++s){var c=r[s];u(c.width===i&&c.height===a,"inconsistent cube map face shape"),t.genMipmaps&&(u(!c.compressed,"can not generate mipmap for compressed textures"),u(1===c.mipmask,"can not specify mipmaps and generate mipmaps"));for(var l=c.images,h=0;h<16;++h){var f=l[h];if(f){var p=i>>h,d=a>>h;u(c.mipmask&1<<h,"missing mipmap data"),u(f.width===p&&f.height===d,"invalid shape for mip images"),u(f.format===e.format&&f.internalformat===e.internalformat&&f.type===e.type,"incompatible type for mip image"),f.compressed||(f.data?u(f.data.byteLength===p*d*Math.max(A(f.type,o),f.unpackAlignment),"invalid data for image, buffer size is inconsistent with image format"):f.element||f.copy)}}}}}),C=0;function k(e,t){this.id=C++,this.type=e,this.data=t}function M(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function P(e){return"["+function e(t){if(0===t.length)return[];var r=t.charAt(0),n=t.charAt(t.length-1);if(t.length>1&&r===n&&('"'===r||"'"===r))return['"'+M(t.substr(1,t.length-2))+'"'];var i=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(i)return e(t.substr(0,i.index)).concat(e(i[1])).concat(e(t.substr(i.index+i[0].length)));var a=t.split(".");if(1===a.length)return['"'+M(t)+'"'];for(var o=[],s=0;s<a.length;++s)o=o.concat(e(a[s]));return o}(e).join("][")+"]"}var I={DynamicVariable:k,define:function(e,t){return new k(e,P(t+""))},isDynamic:function(e){return"function"==typeof e&&!e._reglType||e instanceof k},unbox:function e(t,r){return"function"==typeof t?new k(0,t):"number"==typeof t||"boolean"==typeof t?new k(5,t):Array.isArray(t)?new k(6,t.map((function(t,n){return e(t,r+"["+n+"]")}))):t instanceof k?t:void w(!1,"invalid option type in uniform "+r)},accessor:P},O={next:"function"==typeof requestAnimationFrame?function(e){return requestAnimationFrame(e)}:function(e){return setTimeout(e,16)},cancel:"function"==typeof cancelAnimationFrame?function(e){return cancelAnimationFrame(e)}:clearTimeout},R="undefined"!=typeof my&&my&&"function"==typeof my.showToast&&!0!==my.isFRM?function(){return+new Date}:"undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date};function L(e){return"string"==typeof e?e.split():(w(Array.isArray(e),"invalid extension array"),e)}function N(e){return"string"==typeof e?(w("undefined"!=typeof document,"not supported outside of DOM"),document.querySelector(e)):e}function D(e){var t,r,n,o,s=e||{},u={},c=[],l=[],h="undefined"==typeof window?1:window.devicePixelRatio,f=!1,p=function(e){e&&w.raise(e)},d=function(){};if("string"==typeof s?(w("undefined"!=typeof document,"selector queries only supported in DOM environments"),t=document.querySelector(s),w(t,"invalid query string for element")):"object"===a(s)?function(e){return"string"==typeof e.nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect}(s)?t=s:function(e){return"function"==typeof e.drawArrays||"function"==typeof e.drawElements}(s)?n=(o=s).canvas:(w.constructor(s),"gl"in s?o=s.gl:"canvas"in s?n=N(s.canvas):"container"in s&&(r=N(s.container)),"attributes"in s&&(u=s.attributes,w.type(u,"object","invalid context attributes")),"extensions"in s&&(c=L(s.extensions)),"optionalExtensions"in s&&(l=L(s.optionalExtensions)),"onDone"in s&&(w.type(s.onDone,"function","invalid or missing onDone callback"),p=s.onDone),"profile"in s&&(f=!!s.profile),"pixelRatio"in s&&(h=+s.pixelRatio,w(h>0,"invalid pixel ratio"))):w.raise("invalid arguments to regl"),t&&("canvas"===t.nodeName.toLowerCase()?n=t:r=t),!o){if(!n){w("undefined"!=typeof document,"must manually specify webgl context outside of DOM environments");var v=function(e,t,r){var n,a=document.createElement("canvas");function o(){var t=window.innerWidth,n=window.innerHeight;if(e!==document.body){var i=a.getBoundingClientRect();t=i.right-i.left,n=i.bottom-i.top}a.width=r*t,a.height=r*n}return i(a.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),e.appendChild(a),e===document.body&&(a.style.position="absolute",i(e.style,{margin:0,padding:0})),e!==document.body&&"function"==typeof ResizeObserver?(n=new ResizeObserver((function(){setTimeout(o)}))).observe(e):window.addEventListener("resize",o,!1),o(),{canvas:a,onDestroy:function(){n?n.disconnect():window.removeEventListener("resize",o),e.removeChild(a)}}}(r||document.body,0,h);if(!v)return null;n=v.canvas,d=v.onDestroy}void 0===u.premultipliedAlpha&&(u.premultipliedAlpha=!0),(o=function(e,t){function r(r){try{return e.getContext(r,t)}catch(e){return null}}return r("webgl2")||r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(n,u)).getExtension("OES_standard_derivatives")}return o?{gl:o,canvas:n,container:r,extensions:c,optionalExtensions:l,pixelRatio:h,profile:f,onDone:p,onDestroy:d}:(d(),p("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function F(e,n){var i={};function a(n){w.type(n,"string","extension name must be string");var a,o=n.toLowerCase();try{a=i[o]=function(n){return e.getExtension(n)?e.getExtension(n):e.getExtension(n.toLowerCase())?e.getExtension(n.toLowerCase()):r(e)&&t.includes(n)?{}:null}(n)}catch(e){}return!!a}for(var o=0;o<n.extensions.length;++o){var s=n.extensions[o];if(!a(s))return n.onDestroy(),n.onDone('"'+s+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return n.optionalExtensions.forEach(a),{extensions:i,restore:function(){Object.keys(i).forEach((function(e){if(i[e]&&!a(e))throw new Error("(regl): error restoring extension "+e)}))}}}function z(e,t){for(var r=Array(e),n=0;n<e;++n)r[n]=t(n);return r}function B(e){var t,r;return t=(e>65535)<<4,t|=r=((e>>>=t)>255)<<3,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}function U(){var e=z(8,(function(){return[]}));function t(t){var r=function(e){for(var t=16;t<=1<<28;t*=16)if(e<=t)return t;return 0}(t),n=e[B(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[B(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(e){r(e.buffer)}}}var j=U();function V(e){return!!e&&"object"===a(e)&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||n(e.data))}j.zero=U();var G=function(e){return Object.keys(e).map((function(t){return e[t]}))},H={shape:function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},flatten:function(e,t,r,n){var i=1;if(t.length)for(var a=0;a<t.length;++a)i*=t[a];else i=0;var o=n||j.allocType(r,i);switch(t.length){case 0:break;case 1:!function(e,t,r){for(var n=0;n<t;++n)r[n]=e[n]}(e,t[0],o);break;case 2:!function(e,t,r,n){for(var i=0,a=0;a<t;++a)for(var o=e[a],s=0;s<r;++s)n[i++]=o[s]}(e,t[0],t[1],o);break;case 3:W(e,t[0],t[1],t[2],o,0);break;default:!function e(t,r,n,i,a){for(var o=1,s=n+1;s<r.length;++s)o*=r[s];var u=r[n];if(r.length-n==4){var c=r[n+1],l=r[n+2],h=r[n+3];for(s=0;s<u;++s)W(t[s],c,l,h,i,a),a+=o}else for(s=0;s<u;++s)e(t[s],r,n+1,i,a),a+=o}(e,t,0,o,0)}return o}};function W(e,t,r,n,i,a){for(var o=a,s=0;s<t;++s)for(var u=e[s],c=0;c<r;++c)for(var l=u[c],h=0;h<n;++h)i[o++]=l[h]}var Y={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},X={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},Z={dynamic:35048,stream:35040,static:35044},q=H.flatten,K=H.shape,Q=[];function $(e){return 0|Y[Object.prototype.toString.call(e)]}function J(e,t){for(var r=0;r<t.length;++r)e[r]=t[r]}function ee(e,t,r,n,i,a,o){for(var s=0,u=0;u<r;++u)for(var c=0;c<n;++c)e[s++]=t[i*u+a*c+o]}Q[5120]=1,Q[5122]=2,Q[5124]=4,Q[5121]=1,Q[5123]=2,Q[5125]=4,Q[5126]=4;var te={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},re=new Float32Array(1),ne=new Uint32Array(re.buffer);function ie(e){for(var t=j.allocType(5123,e.length),r=0;r<e.length;++r)if(isNaN(e[r]))t[r]=65535;else if(e[r]===1/0)t[r]=31744;else if(e[r]===-1/0)t[r]=64512;else{re[0]=e[r];var n=ne[0],i=n>>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)t[r]=i;else if(a<-14){var s=-14-a;t[r]=i+(o+1024>>s)}else t[r]=a>15?i+31744:i+(a+15<<10)+o}return t}function ae(e){return Array.isArray(e)||n(e)}var oe=function(e){return!(e&e-1||!e)},se=[9984,9986,9985,9987],ue=[0,6409,6410,6407,6408],ce={};function le(e){return"[object "+e+"]"}ce[6409]=ce[6406]=ce[6402]=1,ce[34041]=ce[6410]=2,ce[6407]=ce[35904]=3,ce[6408]=ce[35906]=4;var he=le("HTMLCanvasElement"),fe=le("OffscreenCanvas"),pe=le("CanvasRenderingContext2D"),de=le("ImageBitmap"),ve=le("HTMLImageElement"),ge=le("HTMLVideoElement"),me=Object.keys(Y).concat([he,fe,pe,de,ve,ge]),ye=[];ye[5121]=1,ye[5126]=4,ye[36193]=2,ye[5123]=2,ye[5125]=4;var _e=[];function be(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function xe(e){return!!Array.isArray(e)&&!(0===e.length||!ae(e[0]))}function Se(e){return Object.prototype.toString.call(e)}function Ee(e){return Se(e)===he}function Ae(e){return Se(e)===fe}function Te(e){return!!("undefined"!=typeof my&&my&&"function"==typeof my.showToast&&!0!==my.isFRM&&e&&e.getContext)}function we(e){return!!("undefined"!=typeof my&&my&&"function"==typeof my.showToast&&!0!==my.isFRM&&e&&"src"in e&&"crossOrigin"in e)}function Ce(e){if(!e)return!1;if(Te(e)||we(e))return!0;var t=Se(e);return me.indexOf(t)>=0||be(e)||xe(e)||V(e)}function ke(e){return 0|Y[Object.prototype.toString.call(e)]}function Me(e,t){return j.allocType(36193===e.type?5126:e.type,t)}function Pe(e,t){36193===e.type?(e.data=ie(t),j.freeType(t)):e.data=t}function Ie(e,t,r,n,i,a){var o;if(o=void 0!==_e[e]?_e[e]:ce[e]*ye[t],a&&(o*=6),i){for(var s=0,u=r;u>=1;)s+=o*u*u,u/=2;return s}return o*r*n}function Oe(e,t,r,o,s,u,c){var l={"don't care":4352,"dont care":4352,nice:4354,fast:4353},h={repeat:10497,clamp:33071,mirror:33648},f={nearest:9728,linear:9729},p=i({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},f),d={none:0,browser:37444},v={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},g={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},m={};t.ext_srgb&&(g.srgb=35904,g.srgba=35906),t.oes_texture_float&&(v.float32=v.float=5126),t.oes_texture_half_float&&(v.float16=v["half float"]=36193),t.webgl_depth_texture&&(i(g,{depth:6402,"depth stencil":34041}),i(v,{uint16:5123,uint32:5125,"depth stencil":34042})),t.webgl_compressed_texture_s3tc&&i(m,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),t.webgl_compressed_texture_atc&&i(m,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),t.webgl_compressed_texture_pvrtc&&i(m,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),t.webgl_compressed_texture_etc1&&(m["rgb etc1"]=36196);var y=Array.prototype.slice.call(e.getParameter(34467)||new Uint32Array(0));Object.keys(m).forEach((function(e){var t=m[e];y.indexOf(t)>=0&&(g[e]=t)}));var _=Object.keys(g);r.textureFormats=_;var b=[];Object.keys(g).forEach((function(e){var t=g[e];b[t]=e}));var x=[];Object.keys(v).forEach((function(e){var t=v[e];x[t]=e}));var S=[];Object.keys(f).forEach((function(e){S[f[e]]=e}));var E=[];Object.keys(p).forEach((function(e){var t=p[e];E[t]=e}));var A=[];Object.keys(h).forEach((function(e){A[h[e]]=e}));var T=_.reduce((function(e,r){var n=g[r];return 6409===n||6406===n||6409===n||6410===n||6402===n||34041===n||t.ext_srgb&&(35904===n||35906===n)?e[n]=n:32855===n||r.indexOf("rgba")>=0?e[n]=6408:e[n]=6407,e}),{});function C(){this.internalformat=6408,this.format=6408,this.type=5121,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function k(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function M(e,n){if("object"===a(n)&&n){if("premultiplyAlpha"in n&&(w.type(n.premultiplyAlpha,"boolean","invalid premultiplyAlpha"),e.premultiplyAlpha=n.premultiplyAlpha),"flipY"in n&&(w.type(n.flipY,"boolean","invalid texture flip"),e.flipY=n.flipY),"alignment"in n&&(w.oneOf(n.alignment,[1,2,4,8],"invalid texture unpack alignment"),e.unpackAlignment=n.alignment),"colorSpace"in n&&(w.parameter(n.colorSpace,d,"invalid colorSpace"),e.colorSpace=d[n.colorSpace]),"type"in n){var i=n.type;w(t.oes_texture_float||!("float"===i||"float32"===i),"you must enable the OES_texture_float extension in order to use floating point textures."),w(t.oes_texture_half_float||!("half float"===i||"float16"===i),"you must enable the OES_texture_half_float extension in order to use 16-bit floating point textures."),w(t.webgl_depth_texture||!("uint16"===i||"uint32"===i||"depth stencil"===i),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),w.parameter(i,v,"invalid texture type"),e.type=v[i]}var o=e.width,s=e.height,u=e.channels,c=!1;"shape"in n?(w(Array.isArray(n.shape)&&n.shape.length>=2,"shape must be an array"),o=n.shape[0],s=n.shape[1],3===n.shape.length&&(u=n.shape[2],w(u>0&&u<=4,"invalid number of channels"),c=!0),w(o>=0&&o<=r.maxTextureSize,"invalid width"),w(s>=0&&s<=r.maxTextureSize,"invalid height")):("radius"in n&&(o=s=n.radius,w(o>=0&&o<=r.maxTextureSize,"invalid radius")),"width"in n&&(o=n.width,w(o>=0&&o<=r.maxTextureSize,"invalid width")),"height"in n&&(s=n.height,w(s>=0&&s<=r.maxTextureSize,"invalid height")),"channels"in n&&(u=n.channels,w(u>0&&u<=4,"invalid number of channels"),c=!0)),e.width=0|o,e.height=0|s,e.channels=0|u;var l=!1;if("format"in n){var h=n.format;w(t.webgl_depth_texture||!("depth"===h||"depth stencil"===h),"you must enable the WEBGL_depth_texture extension in order to use depth/stencil textures."),w.parameter(h,g,"invalid texture format");var f=e.internalformat=g[h];e.format=T[f],h in v&&("type"in n||(e.type=v[h])),h in m&&(e.compressed=!0),l=!0}!c&&l?e.channels=ce[e.format]:c&&!l?e.channels!==ue[e.format]&&(e.format=e.internalformat=ue[e.channels]):l&&c&&w(e.channels===ce[e.format],"number of channels inconsistent with specified format")}}function P(t){e.pixelStorei(37440,t.flipY),e.pixelStorei(37441,t.premultiplyAlpha),e.pixelStorei(37443,t.colorSpace),e.pixelStorei(3317,t.unpackAlignment)}function I(){C.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function O(e,t){var i=null;if(Ce(t)?i=t:t&&(w.type(t,"object","invalid pixel data type"),M(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),Ce(t.data)&&(i=t.data)),w(!e.compressed||i instanceof Uint8Array,"compressed texture data must be stored in a uint8array"),t.copy){w(!i,"can not specify copy and data field for the same texture");var a=s.viewportWidth,o=s.viewportHeight;e.width=e.width||a-e.xOffset,e.height=e.height||o-e.yOffset,e.needsCopy=!0,w(e.xOffset>=0&&e.xOffset<a&&e.yOffset>=0&&e.yOffset<o&&e.width>0&&e.width<=a&&e.height>0&&e.height<=o,"copy texture read out of bounds")}else if(i){if(n(i))e.channels=e.channels||4,e.data=i,"type"in t||5121!==e.type||(e.type=ke(i));else if(be(i))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case 5121:case 5123:case 5125:case 5126:var n=j.allocType(e.type,r);n.set(t),e.data=n;break;case 36193:e.data=ie(t);break;default:w.raise("unsupported texture type, must specify a typed array")}}(e,i),e.alignment=1,e.needsFree=!0;else if(V(i)){var u=i.data;Array.isArray(u)||5121!==e.type||(e.type=ke(u));var c,l,h,f,p,d,v=i.shape,g=i.stride;3===v.length?(h=v[2],d=g[2]):(w(2===v.length,"invalid ndarray pixel data, must be 2 or 3D"),h=1,d=1),c=v[0],l=v[1],f=g[0],p=g[1],e.alignment=1,e.width=c,e.height=l,e.channels=h,e.format=e.internalformat=ue[h],e.needsFree=!0,function(e,t,r,n,i,a){for(var o=e.width,s=e.height,u=e.channels,c=Me(e,o*s*u),l=0,h=0;h<s;++h)for(var f=0;f<o;++f)for(var p=0;p<u;++p)c[l++]=t[r*f+n*h+i*p+a];Pe(e,c)}(e,u,f,p,d,i.offset)}else if(Te(i)||Ee(i)||Ae(i)||function(e){return Se(e)===pe}(i))Te(i)||Ee(i)||Ae(i)?e.element=i:e.element=i.canvas,e.width=e.element.width,e.height=e.element.height,e.channels=4;else if(function(e){return Se(e)===de}(i))e.element=i,e.width=i.width,e.height=i.height,e.channels=4;else if(function(e){return Se(e)===ve}(i))e.element=i,e.width=i.naturalWidth,e.height=i.naturalHeight,e.channels=4;else if(we(i))e.element=i,e.width=i.width,e.height=i.height,e.channels=4;else if(function(e){return Se(e)===ge}(i))e.element=i,e.width=i.videoWidth,e.height=i.videoHeight,e.channels=4;else if(xe(i)){var m=e.width||i[0].length,y=e.height||i.length,_=e.channels;_=ae(i[0][0])?_||i[0][0].length:_||1;for(var b=H.shape(i),x=1,S=0;S<b.length;++S)x*=b[S];var E=Me(e,x);H.flatten(i,b,"",E),Pe(e,E),e.alignment=1,e.width=m,e.height=y,e.channels=_,e.format=e.internalformat=ue[_],e.needsFree=!0}}else e.width=e.width||1,e.height=e.height||1,e.channels=e.channels||4;5126===e.type?w(r.extensions.indexOf("oes_texture_float")>=0,"oes_texture_float extension not enabled"):36193===e.type&&w(r.extensions.indexOf("oes_texture_half_float")>=0,"oes_texture_half_float extension not enabled")}function R(t,r,n){var i=t.element,a=t.data,s=t.internalformat,u=t.format,c=t.type,l=t.width,h=t.height;P(t),i?e.texImage2D(r,n,u,u,c,i):t.compressed?e.compressedTexImage2D(r,n,s,l,h,0,a):t.needsCopy?(o(),e.copyTexImage2D(r,n,u,t.xOffset,t.yOffset,l,h,0)):e.texImage2D(r,n,u,l,h,0,u,c,a||null)}function L(t,r,n,i,a){var s=t.element,u=t.data,c=t.internalformat,l=t.format,h=t.type,f=t.width,p=t.height;P(t),s?e.texSubImage2D(r,a,n,i,l,h,s):t.compressed?e.compressedTexSubImage2D(r,a,n,i,c,f,p,u):t.needsCopy?(o(),e.copyTexSubImage2D(r,a,n,i,t.xOffset,t.yOffset,f,p)):e.texSubImage2D(r,a,n,i,f,p,l,h,u)}var N=[];function D(){return N.pop()||new I}function F(e){e.needsFree&&j.freeType(e.data),I.call(e),N.push(e)}function z(){C.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function B(e,t,r){var n=e.images[0]=D();e.mipmask=1,n.width=e.width=t,n.height=e.height=r,n.channels=e.channels=4}function U(e,t){var r=null;if(Ce(t))k(r=e.images[0]=D(),e),O(r,t),e.mipmask=1;else if(M(e,t),Array.isArray(t.mipmap))for(var n=t.mipmap,i=0;i<n.length;++i)k(r=e.images[i]=D(),e),r.width>>=i,r.height>>=i,O(r,n[i]),e.mipmask|=1<<i;else k(r=e.images[0]=D(),e),O(r,t),e.mipmask=1;k(e,e.images[0]),!e.compressed||33776!==e.internalformat&&33777!==e.internalformat&&33778!==e.internalformat&&33779!==e.internalformat||w(e.width%4==0&&e.height%4==0,"for compressed texture formats, mipmap level 0 must have width and height that are a multiple of 4")}function W(e,t){for(var r=e.images,n=0;n<r.length;++n){if(!r[n])return;R(r[n],t,n)}}var Y=[];function X(){var e=Y.pop()||new z;C.call(e),e.mipmask=0;for(var t=0;t<16;++t)e.images[t]=null;return e}function Z(e){for(var t=e.images,r=0;r<t.length;++r)t[r]&&F(t[r]),t[r]=null;Y.push(e)}function q(){this.minFilter=9728,this.magFilter=9728,this.wrapS=33071,this.wrapT=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function K(e,t){if("min"in t){var n=t.min;w.parameter(n,p),e.minFilter=p[n],se.indexOf(e.minFilter)>=0&&!("faces"in t)&&(e.genMipmaps=!0)}if("mag"in t){var i=t.mag;w.parameter(i,f),e.magFilter=f[i]}var o=e.wrapS,s=e.wrapT;if("wrap"in t){var u=t.wrap;"string"==typeof u?(w.parameter(u,h),o=s=h[u]):Array.isArray(u)&&(w.parameter(u[0],h),w.parameter(u[1],h),o=h[u[0]],s=h[u[1]])}else{if("wrapS"in t){var c=t.wrapS;w.parameter(c,h),o=h[c]}if("wrapT"in t){var d=t.wrapT;w.parameter(d,h),s=h[d]}}if(e.wrapS=o,e.wrapT=s,"anisotropic"in t){var v=t.anisotropic;w("number"==typeof v&&v>=1&&v<=r.maxAnisotropic,"aniso samples must be between 1 and "),e.anisotropic=t.anisotropic}if("mipmap"in t){var g=!1;switch(a(t.mipmap)){case"string":w.parameter(t.mipmap,l,"invalid mipmap hint"),e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,g=!0;break;case"boolean":g=e.genMipmaps=t.mipmap;break;case"object":w(Array.isArray(t.mipmap),"invalid mipmap type"),e.genMipmaps=!1,g=!0;break;default:w.raise("invalid mipmap type")}g&&!("min"in t)&&(e.minFilter=9984)}}function Q(r,n){e.texParameteri(n,10241,r.minFilter),e.texParameteri(n,10240,r.magFilter),e.texParameteri(n,10242,r.wrapS),e.texParameteri(n,10243,r.wrapT),t.ext_texture_filter_anisotropic&&e.texParameteri(n,34046,r.anisotropic),r.genMipmaps&&(e.hint(33170,r.mipmapHint),e.generateMipmap(n))}var $=0,J={},ee=r.maxTextureUnits,te=Array(ee).map((function(){return null}));function re(t){C.call(this),this.mipmask=0,this.internalformat=6408,this.id=$++,this.refCount=1,this.target=t,this.texture=e.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new q,c.profile&&(this.stats={size:0})}function ne(t){e.activeTexture(33984),e.bindTexture(t.target,t.texture)}function le(){var t=te[0];t?e.bindTexture(t.target,t.texture):e.bindTexture(3553,null)}function he(t){var r=t.texture;w(r,"must not double destroy texture");var n=t.unit,i=t.target;n>=0&&(e.activeTexture(33984+n),e.bindTexture(i,null),te[n]=null),e.deleteTexture(r),t.texture=null,t.params=null,t.pixels=null,t.refCount=0,delete J[t.id],u.textureCount--}return i(re.prototype,{bind:function(){this.bindCount+=1;var t=this.unit;if(t<0){for(var r=0;r<ee;++r){var n=te[r];if(n){if(n.bindCount>0)continue;n.unit=-1}te[r]=this,t=r;break}t>=ee&&w.raise("insufficient number of texture units"),c.profile&&u.maxTextureUnits<t+1&&(u.maxTextureUnits=t+1),this.unit=t,e.activeTexture(33984+t),e.bindTexture(this.target,this.texture)}return t},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&he(this)}}),c.profile&&(u.getTotalTextureSize=function(){var e=0;return Object.keys(J).forEach((function(t){e+=J[t].stats.size})),e}),{create2D:function(t,n){var i=new re(3553);function a(e,t){var n=i.texInfo;q.call(n);var o=X();return"number"==typeof e?B(o,0|e,"number"==typeof t?0|t:0|e):e?(w.type(e,"object","invalid arguments to regl.texture"),K(n,e),U(o,e)):B(o,1,1),n.genMipmaps&&(o.mipmask=(o.width<<1)-1),i.mipmask=o.mipmask,k(i,o),w.texture2D(n,o,r),i.internalformat=o.internalformat,a.width=o.width,a.height=o.height,ne(i),W(o,3553),Q(n,3553),le(),Z(o),c.profile&&(i.stats.size=Ie(i.internalformat,i.type,o.width,o.height,n.genMipmaps,!1)),a.format=b[i.internalformat],a.type=x[i.type],a.mag=S[n.magFilter],a.min=E[n.minFilter],a.wrapS=A[n.wrapS],a.wrapT=A[n.wrapT],a}return J[i.id]=i,u.textureCount++,a(t,n),a.subimage=function(e,t,r,n){w(!!e,"must specify image data");var o=0|t,s=0|r,u=0|n,c=D();return k(c,i),c.width=0,c.height=0,O(c,e),c.width=c.width||(i.width>>u)-o,c.height=c.height||(i.height>>u)-s,w(i.type===c.type&&i.format===c.format&&i.internalformat===c.internalformat,"incompatible format for texture.subimage"),w(o>=0&&s>=0&&o+c.width<=i.width&&s+c.height<=i.height,"texture.subimage write out of bounds"),w(i.mipmask&1<<u,"missing mipmap data"),w(c.data||c.element||c.needsCopy,"missing image data"),ne(i),L(c,3553,o,s,u),le(),F(c),a},a.resize=function(t,r){var n=0|t,o=0|r||n;if(n===i.width&&o===i.height)return a;a.width=i.width=n,a.height=i.height=o,ne(i);for(var s=0;i.mipmask>>s;++s){var u=n>>s,l=o>>s;if(!u||!l)break;e.texImage2D(3553,s,i.format,u,l,0,i.format,i.type,null)}return le(),c.profile&&(i.stats.size=Ie(i.internalformat,i.type,n,o,!1,!1)),a},a._reglType="texture2d",a._texture=i,c.profile&&(a.stats=i.stats),a.destroy=function(){i.decRef()},a},createCube:function(t,n,i,o,s,l){var h=new re(34067);J[h.id]=h,u.cubeCount++;var f=new Array(6);function p(e,t,n,i,o,s){var u,l=h.texInfo;for(q.call(l),u=0;u<6;++u)f[u]=X();if("number"!=typeof e&&e)if("object"===a(e))if(t)U(f[0],e),U(f[1],t),U(f[2],n),U(f[3],i),U(f[4],o),U(f[5],s);else if(K(l,e),M(h,e),"faces"in e){var d=e.faces;for(w(Array.isArray(d)&&6===d.length,"cube faces must be a length 6 array"),u=0;u<6;++u)w("object"===a(d[u])&&!!d[u],"invalid input for cube map face"),k(f[u],h),U(f[u],d[u])}else for(u=0;u<6;++u)U(f[u],e);else w.raise("invalid arguments to cube map");else{var v=0|e||1;for(u=0;u<6;++u)B(f[u],v,v)}for(k(h,f[0]),w.optional((function(){r.npotTextureCube||w(oe(h.width)&&oe(h.height),"your browser does not support non power or two texture dimensions")})),l.genMipmaps?h.mipmask=(f[0].width<<1)-1:h.mipmask=f[0].mipmask,w.textureCube(h,l,f,r),h.internalformat=f[0].internalformat,p.width=f[0].width,p.height=f[0].height,ne(h),u=0;u<6;++u)W(f[u],34069+u);for(Q(l,34067),le(),c.profile&&(h.stats.size=Ie(h.internalformat,h.type,p.width,p.height,l.genMipmaps,!0)),p.format=b[h.internalformat],p.type=x[h.type],p.mag=S[l.magFilter],p.min=E[l.minFilter],p.wrapS=A[l.wrapS],p.wrapT=A[l.wrapT],u=0;u<6;++u)Z(f[u]);return p}return p(t,n,i,o,s,l),p.subimage=function(e,t,r,n,i){w(!!t,"must specify image data"),w("number"==typeof e&&e===(0|e)&&e>=0&&e<6,"invalid face");var a=0|r,o=0|n,s=0|i,u=D();return k(u,h),u.width=0,u.height=0,O(u,t),u.width=u.width||(h.width>>s)-a,u.height=u.height||(h.height>>s)-o,w(h.type===u.type&&h.format===u.format&&h.internalformat===u.internalformat,"incompatible format for texture.subimage"),w(a>=0&&o>=0&&a+u.width<=h.width&&o+u.height<=h.height,"texture.subimage write out of bounds"),w(h.mipmask&1<<s,"missing mipmap data"),w(u.data||u.element||u.needsCopy,"missing image data"),ne(h),L(u,34069+e,a,o,s),le(),F(u),p},p.resize=function(t){var r=0|t;if(r!==h.width){p.width=h.width=r,p.height=h.height=r,ne(h);for(var n=0;n<6;++n)for(var i=0;h.mipmask>>i;++i)e.texImage2D(34069+n,i,h.format,r>>i,r>>i,0,h.format,h.type,null);return le(),c.profile&&(h.stats.size=Ie(h.internalformat,h.type,p.width,p.height,!1,!0)),p}},p._reglType="textureCube",p._texture=h,c.profile&&(p.stats=h.stats),p.destroy=function(){h.decRef()},p},clear:function(){for(var t=0;t<ee;++t)e.activeTexture(33984+t),e.bindTexture(3553,null),te[t]=null;G(J).forEach(he),u.cubeCount=0,u.textureCount=0},getTexture:function(e){return null},restore:function(){for(var t=0;t<ee;++t){var r=te[t];r&&(r.bindCount=0,r.unit=-1,te[t]=null)}G(J).forEach((function(t){t.texture=e.createTexture(),e.bindTexture(t.target,t.texture);for(var r=0;r<32;++r)if(0!=(t.mipmask&1<<r))if(3553===t.target)e.texImage2D(3553,r,t.internalformat,t.width>>r,t.height>>r,0,t.internalformat,t.type,null);else for(var n=0;n<6;++n)e.texImage2D(34069+n,r,t.internalformat,t.width>>r,t.height>>r,0,t.internalformat,t.type,null);Q(t.texInfo,t.target)}))},refresh:function(){for(var t=0;t<ee;++t){var r=te[t];r&&(r.bindCount=0,r.unit=-1,te[t]=null),e.activeTexture(33984+t),e.bindTexture(3553,null),e.bindTexture(34067,null)}}}}_e[32854]=2,_e[32855]=2,_e[36194]=2,_e[34041]=4,_e[33776]=.5,_e[33777]=.5,_e[33778]=1,_e[33779]=1,_e[35986]=.5,_e[35987]=1,_e[34798]=1,_e[35840]=.5,_e[35841]=.25,_e[35842]=.5,_e[35843]=.25,_e[36196]=.5;var Re=[];function Le(e,t,r){return Re[e]*t*r}Re[32854]=2,Re[32855]=2,Re[36194]=2,Re[33189]=2,Re[36168]=1,Re[34041]=4,Re[35907]=4,Re[34836]=16,Re[34842]=8,Re[34843]=6;var Ne=[6407,6408],De=[];De[6408]=4,De[6407]=3;var Fe=[];Fe[5121]=1,Fe[5126]=4,Fe[36193]=2;var ze=[32854,32855,36194,35907,34842,34843,34836],Be={36053:"complete",36054:"incomplete attachment",36057:"incomplete dimensions",36055:"incomplete, missing attachment",36061:"unsupported"},Ue=["attributes","elements","offset","count","primitive","instances"];function je(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function Ve(e,t,r,i,a,o,s){function u(u){var c;null===t.next?(w(a.preserveDrawingBuffer,'you must create a webgl context with "preserveDrawingBuffer":true in order to read pixels from the drawing buffer'),c=5121):(w(null!==t.next.colorAttachments[0].texture,"You cannot read from a renderbuffer"),c=t.next.colorAttachments[0].texture._texture.type,w.optional((function(){o.oes_texture_float?(w(5121===c||5126===c,"Reading from a framebuffer is only allowed for the types 'uint8' and 'float'"),5126===c&&w(s.readFloat,"Reading 'float' values is not permitted in your browser. For a fallback, please see: https://www.npmjs.com/package/glsl-read-float")):w(5121===c,"Reading from a framebuffer is only allowed for the type 'uint8'")})));var l=0,h=0,f=i.framebufferWidth,p=i.framebufferHeight,d=null;n(u)?d=u:u&&(w.type(u,"object","invalid arguments to regl.read()"),l=0|u.x,h=0|u.y,w(l>=0&&l<i.framebufferWidth,"invalid x offset for regl.read"),w(h>=0&&h<i.framebufferHeight,"invalid y offset for regl.read"),f=0|(u.width||i.framebufferWidth-l),p=0|(u.height||i.framebufferHeight-h),d=u.data||null),d&&(5121===c?w(d instanceof Uint8Array,"buffer must be 'Uint8Array' when reading from a framebuffer of type 'uint8'"):5126===c&&w(d instanceof Float32Array,"buffer must be 'Float32Array' when reading from a framebuffer of type 'float'")),w(f>0&&f+l<=i.framebufferWidth,"invalid width for read pixels"),w(p>0&&p+h<=i.framebufferHeight,"invalid height for read pixels"),r();var v=f*p*4;return d||(5121===c?d=new Uint8Array(v):5126===c&&(d=d||new Float32Array(v))),w.isTypedArray(d,"data buffer for regl.read() must be a typedarray"),w(d.byteLength>=v,"data buffer for regl.read() too small"),e.pixelStorei(3333,4),e.readPixels(l,h,f,p,6408,c,d),d}return function(e){return e&&"framebuffer"in e?function(e){var r;return t.setFBO({framebuffer:e.framebuffer},(function(){r=u(e)})),r}(e):u(e)}}function Ge(e){return Array.prototype.slice.call(e)}function He(e){return Ge(e).join("")}var We="xyzw".split(""),Ye="profile",Xe="framebuffer",Ze="vert",qe="frag",Ke="elements",Qe="primitive",$e="count",Je="offset",et="instances",tt="vao",rt=Xe+"Width",nt=Xe+"Height",it=["blend.func","blend.equation","stencil.func","stencil.opFront","stencil.opBack","sample.coverage","viewport","scissor.box","polygonOffset.offset"],at={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ot=["constant color, constant alpha","one minus constant color, constant alpha","constant color, one minus constant alpha","one minus constant color, one minus constant alpha","constant alpha, constant color","constant alpha, one minus constant color","one minus constant alpha, constant color","one minus constant alpha, one minus constant color"],st={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},ut={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ct={frag:35632,vert:35633},lt={cw:2304,ccw:2305};function ht(e){return Array.isArray(e)||n(e)||V(e)}function ft(e){return e.sort((function(e,t){return"viewport"===e?-1:"viewport"===t?1:e<t?-1:1}))}function pt(e,t,r,n){this.thisDep=e,this.contextDep=t,this.propDep=r,this.append=n}function dt(e){return e&&!(e.thisDep||e.contextDep||e.propDep)}function vt(e){return new pt(!1,!1,!1,e)}function gt(e,t){var r=e.type;if(0===r){var n=e.data.length;return new pt(!0,n>=1,n>=2,t)}if(4===r){var i=e.data;return new pt(i.thisDep,i.contextDep,i.propDep,t)}if(5===r)return new pt(!1,!1,!1,t);if(6===r){for(var a=!1,o=!1,s=!1,u=0;u<e.data.length;++u){var c=e.data[u];if(1===c.type)s=!0;else if(2===c.type)o=!0;else if(3===c.type)a=!0;else if(0===c.type){a=!0;var l=c.data;l>=1&&(o=!0),l>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new pt(a,o,s,t)}return new pt(3===r,2===r,1===r,t)}var mt=new pt(!1,!1,!1,(function(){}));function yt(t,n,o,s,u,c,l,h,f,p,d,v,g,m,y){var _=p.Record,b={add:32774,subtract:32778,"reverse subtract":32779};o.ext_blend_minmax&&(b.min=32775,b.max=32776);var x=o.angle_instanced_arrays,S=o.webgl_draw_buffers,E=o.oes_vertex_array_object,A={dirty:!0,profile:y.profile},T={},C=[],k={},M={};function P(e){return e.replace(".","_")}function O(e,t,r){var n=P(e);C.push(e),T[n]=A[n]=!!r,k[n]=t}function R(e,t,r){var n=P(e);C.push(e),Array.isArray(r)?(A[n]=r.slice(),T[n]=r.slice()):A[n]=T[n]=r,M[n]=t}O("dither",3024),O("blend.enable",3042),R("blend.color","blendColor",[0,0,0,0]),R("blend.equation","blendEquationSeparate",[32774,32774]),R("blend.func","blendFuncSeparate",[1,0,1,0]),O("depth.enable",2929,!0),R("depth.func","depthFunc",513),R("depth.range","depthRange",[0,1]),R("depth.mask","depthMask",!0),R("colorMask","colorMask",[!0,!0,!0,!0]),O("cull.enable",2884),R("cull.face","cullFace",1029),R("frontFace","frontFace",2305),R("lineWidth","lineWidth",1),O("polygonOffset.enable",32823),R("polygonOffset.offset","polygonOffset",[0,0]),O("sample.alpha",32926),O("sample.enable",32928),R("sample.coverage","sampleCoverage",[1,!1]),O("stencil.enable",2960),R("stencil.mask","stencilMask",-1),R("stencil.func","stencilFunc",[519,0,-1]),R("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),R("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),O("scissor.enable",3089),R("scissor.box","scissor",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]),R("viewport","viewport",[0,0,t.drawingBufferWidth,t.drawingBufferHeight]);var L={gl:t,context:g,strings:n,next:T,current:A,draw:v,elements:c,buffer:u,shader:d,attributes:p.state,vao:p,uniforms:f,framebuffer:h,extensions:o,timer:m,isBufferArgs:ht},N={primTypes:te,compareFuncs:st,blendFuncs:at,blendEquations:b,stencilOps:ut,glTypes:X,orientationType:lt};w.optional((function(){L.isArrayLike=ae})),S&&(N.backBuffer=[1029],N.drawBuffer=z(s.maxDrawbuffers,(function(e){return 0===e?[0]:z(e,(function(e){return 36064+e}))})));var D=0;function F(){var t=function(){var t=0,r=[],n=[];function a(){var e=[],r=[];return i((function(){e.push.apply(e,Ge(arguments))}),{def:function(){var n="v"+t++;return r.push(n),arguments.length>0&&(e.push(n,"="),e.push.apply(e,Ge(arguments)),e.push(";")),n},toString:function(){return He([r.length>0?"var "+r.join(",")+";":"",He(e)])}})}function o(){var e=a(),t=a(),r=e.toString,n=t.toString;function o(r,n){t(r,n,"=",e.def(r,n),";")}return i((function(){e.apply(e,Ge(arguments))}),{def:e.def,entry:e,exit:t,save:o,set:function(t,r,n){o(t,r),e(t,r,"=",n,";")},toString:function(){return r()+n()}})}var s=a(),u={};return{global:s,link:function(e){for(var i=0;i<n.length;++i)if(n[i]===e)return r[i];var a="g"+t++;return r.push(a),n.push(e),a},block:a,proc:function(e,t){var r=[];function n(){var e="a"+r.length;return r.push(e),e}t=t||0;for(var a=0;a<t;++a)n();var s=o(),c=s.toString;return u[e]=i(s,{arg:n,toString:function(){return He(["function(",r.join(),"){",c(),"}"])}})},scope:o,cond:function(){var e=He(arguments),t=o(),r=o(),n=t.toString,a=r.toString;return i(t,{then:function(){return t.apply(t,Ge(arguments)),this},else:function(){return r.apply(r,Ge(arguments)),this},toString:function(){var t=a();return t&&(t="else{"+t+"}"),He(["if(",e,"){",n(),"}",t])}})},compile:function(){var t=['"use strict";',s,"return {"];Object.keys(u).forEach((function(e){t.push('"',e,'":',u[e].toString(),",")})),t.push("}");var i=He(t).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return("undefined"!=typeof my&&my&&"function"==typeof my.showToast&&!0!==my.isFRM?e.Function.apply(null,r.concat(i)):Function.apply(null,r.concat(i))).apply(null,n)}}}(),r=t.link,a=t.global;t.id=D++,t.batchId="0";var o=r(L),s=t.shared={props:"a0"};Object.keys(L).forEach((function(e){s[e]=a.def(o,".",e)})),w.optional((function(){t.CHECK=r(w),t.commandStr=w.guessCommand(),t.command=r(t.commandStr),t.assert=function(e,t,n){e("if(!(",t,"))",this.CHECK,".commandRaise(",r(n),",",this.command,");")},N.invalidBlendCombinations=ot}));var u=t.next={},c=t.current={};Object.keys(M).forEach((function(e){Array.isArray(A[e])&&(u[e]=a.def(s.next,".",e),c[e]=a.def(s.current,".",e))}));var l=t.constants={};Object.keys(N).forEach((function(e){l[e]=a.def(JSON.stringify(N[e]))})),t.invoke=function(e,n){switch(n.type){case 0:var i=["this",s.context,s.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case 1:return e.def(s.props,n.data);case 2:return e.def(s.context,n.data);case 3:return e.def("this",n.data);case 4:return n.data.append(t,e),n.data.ref;case 5:return n.data.toString();case 6:return n.data.map((function(r){return t.invoke(e,r)}))}},t.attribCache={};var h={};return t.scopeAttrib=function(e){var t=n.id(e);if(t in h)return h[t];var i=p.scope[t];return i||(i=p.scope[t]=new _),h[t]=r(i)},t}function B(e,t,r,i,l){var f=e.static,v=e.dynamic;w.optional((function(){var e=[Xe,Ze,qe,Ke,Qe,Je,$e,et,Ye,tt].concat(C);function t(t){Object.keys(t).forEach((function(t){w.command(e.indexOf(t)>=0,'unknown parameter "'+t+'"',l.commandStr)}))}t(f),t(v)}));var g=function(e,t){var r=e.static;if("string"==typeof r[qe]&&"string"==typeof r[Ze]){if(Object.keys(t.dynamic).length>0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"==typeof n[i[0]]){for(var a=[],o=0;o<i.length;++o)w("number"==typeof n[i[o]],"must specify all vertex attribute locations when using vaos"),a.push([0|n[i[o]],i[o]]);return a}}return null}(e,t),m=function(e,t){var r=e.static,n=e.dynamic;if(Xe in r){var i=r[Xe];return i?(i=h.getFramebuffer(i),w.command(i,"invalid framebuffer object"),vt((function(e,t){var r=e.link(i),n=e.shared;t.set(n.framebuffer,".next",r);var a=n.context;return t.set(a,"."+rt,r+".width"),t.set(a,"."+nt,r+".height"),r}))):vt((function(e,t){var r=e.shared;t.set(r.framebuffer,".next","null");var n=r.context;return t.set(n,"."+rt,n+".drawingBufferWidth"),t.set(n,"."+nt,n+".drawingBufferHeight"),"null"}))}if(Xe in n){var a=n[Xe];return gt(a,(function(e,t){var r=e.invoke(t,a),n=e.shared,i=n.framebuffer,o=t.def(i,".getFramebuffer(",r,")");w.optional((function(){e.assert(t,"!"+r+"||"+o,"invalid framebuffer object")})),t.set(i,".next",o);var s=n.context;return t.set(s,"."+rt,o+"?"+o+".width:"+s+".drawingBufferWidth"),t.set(s,"."+nt,o+"?"+o+".height:"+s+".drawingBufferHeight"),o}))}return null}(e),y=function(e,t,r){var n=e.static,i=e.dynamic;function a(e){if(e in n){var a=n[e];w.commandType(a,"object","invalid "+e,r.commandStr);var o,s,u=!0,c=0|a.x,l=0|a.y;return"width"in a?(o=0|a.width,w.command(o>=0,"invalid "+e,r.commandStr)):u=!1,"height"in a?(s=0|a.height,w.command(s>=0,"invalid "+e,r.commandStr)):u=!1,new pt(!u&&t&&t.thisDep,!u&&t&&t.contextDep,!u&&t&&t.propDep,(function(e,t){var r=e.shared.context,n=o;"width"in a||(n=t.def(r,".",rt,"-",c));var i=s;return"height"in a||(i=t.def(r,".",nt,"-",l)),[c,l,n,i]}))}if(e in i){var h=i[e],f=gt(h,(function(t,r){var n=t.invoke(r,h);w.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)}));var i=t.shared.context,a=r.def(n,".x|0"),o=r.def(n,".y|0"),s=r.def('"width" in ',n,"?",n,".width|0:","(",i,".",rt,"-",a,")"),u=r.def('"height" in ',n,"?",n,".height|0:","(",i,".",nt,"-",o,")");return w.optional((function(){t.assert(r,s+">=0&&"+u+">=0","invalid "+e)})),[a,o,s,u]}));return t&&(f.thisDep=f.thisDep||t.thisDep,f.contextDep=f.contextDep||t.contextDep,f.propDep=f.propDep||t.propDep),f}return t?new pt(t.thisDep,t.contextDep,t.propDep,(function(e,t){var r=e.shared.context;return[0,0,t.def(r,".",rt),t.def(r,".",nt)]})):null}var o=a("viewport");if(o){var s=o;o=new pt(o.thisDep,o.contextDep,o.propDep,(function(e,t){var r=s.append(e,t),n=e.shared.context;return t.set(n,".viewportWidth",r[2]),t.set(n,".viewportHeight",r[3]),r}))}return{viewport:o,scissor_box:a("scissor.box")}}(e,m,l),S=function(e,t){var r=e.static,n=e.dynamic,i={},a=!1,o=function(){if(tt in r){var e=r[tt];return null!==e&&null===p.getVAO(e)&&(e=p.createVAO(e)),a=!0,i.vao=e,vt((function(t){var r=p.getVAO(e);return r?t.link(r):"null"}))}if(tt in n){a=!0;var t=n[tt];return gt(t,(function(e,r){var n=e.invoke(r,t);return r.def(e.shared.vao+".getVAO("+n+")")}))}return null}(),s=!1,u=function(){if(Ke in r){var e=r[Ke];if(i.elements=e,ht(e)){var u=i.elements=c.create(e,!0);e=c.getElements(u),s=!0}else e&&(e=c.getElements(e),s=!0,w.command(e,"invalid elements",t.commandStr));var l=vt((function(t,r){if(e){var n=t.link(e);return t.ELEMENTS=n,n}return t.ELEMENTS=null,null}));return l.value=e,l}if(Ke in n){s=!0;var h=n[Ke];return gt(h,(function(e,t){var r=e.shared,n=r.isBufferArgs,i=r.elements,a=e.invoke(t,h),o=t.def("null"),s=t.def(n,"(",a,")"),u=e.cond(s).then(o,"=",i,".createStream(",a,");").else(o,"=",i,".getElements(",a,");");return w.optional((function(){e.assert(u.else,"!"+a+"||"+o,"invalid elements")})),t.entry(u),t.exit(e.cond(s).then(i,".destroyStream(",o,");")),e.ELEMENTS=o,o}))}return a?new pt(o.thisDep,o.contextDep,o.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.elements+".getElements("+e.shared.vao+".currentVAO.elements):null")})):null}();function l(e,u){if(e in r){var c=0|r[e];return u?i.offset=c:i.instances=c,w.command(!u||c>=0,"invalid "+e,t.commandStr),vt((function(e,t){return u&&(e.OFFSET=c),c}))}if(e in n){var l=n[e];return gt(l,(function(t,r){var n=t.invoke(r,l);return u&&(t.OFFSET=n,w.optional((function(){t.assert(r,n+">=0","invalid "+e)}))),n}))}if(u){if(s)return vt((function(e,t){return e.OFFSET=0,0}));if(a)return new pt(o.thisDep,o.contextDep,o.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.offset:0")}))}else if(a)return new pt(o.thisDep,o.contextDep,o.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.instances:-1")}));return null}var h=l(Je,!0),f=function(){if(Qe in r){var e=r[Qe];return i.primitive=e,w.commandParameter(e,te,"invalid primitve",t.commandStr),vt((function(t,r){return te[e]}))}if(Qe in n){var c=n[Qe];return gt(c,(function(e,t){var r=e.constants.primTypes,n=e.invoke(t,c);return w.optional((function(){e.assert(t,n+" in "+r,"invalid primitive, must be one of "+Object.keys(te))})),t.def(r,"[",n,"]")}))}return s?dt(u)?u.value?vt((function(e,t){return t.def(e.ELEMENTS,".primType")})):vt((function(){return 4})):new pt(u.thisDep,u.contextDep,u.propDep,(function(e,t){var r=e.ELEMENTS;return t.def(r,"?",r,".primType:",4)})):a?new pt(o.thisDep,o.contextDep,o.propDep,(function(e,t){return t.def(e.shared.vao+".currentVAO?"+e.shared.vao+".currentVAO.primitive:4")})):null}(),d=function(){if($e in r){var e=0|r[$e];return i.count=e,w.command("number"==typeof e&&e>=0,"invalid vertex count",t.commandStr),vt((function(){return e}))}if($e in n){var c=n[$e];return gt(c,(function(e,t){var r=e.invoke(t,c);return w.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">=0&&"+r+"===("+r+"|0)","invalid vertex count")})),r}))}if(s){if(dt(u)){if(u)return h?new pt(h.thisDep,h.contextDep,h.propDep,(function(e,t){var r=t.def(e.ELEMENTS,".vertCount-",e.OFFSET);return w.optional((function(){e.assert(t,r+">=0","invalid vertex offset/element buffer too small")})),r})):vt((function(e,t){return t.def(e.ELEMENTS,".vertCount")}));var l=vt((function(){return-1}));return w.optional((function(){l.MISSING=!0})),l}var f=new pt(u.thisDep||h.thisDep,u.contextDep||h.contextDep,u.propDep||h.propDep,(function(e,t){var r=e.ELEMENTS;return e.OFFSET?t.def(r,"?",r,".vertCount-",e.OFFSET,":-1"):t.def(r,"?",r,".vertCount:-1")}));return w.optional((function(){f.DYNAMIC=!0})),f}return a?new pt(o.thisDep,o.contextDep,o.propDep,(function(e,t){return t.def(e.shared.vao,".currentVAO?",e.shared.vao,".currentVAO.count:-1")})):null}(),v=l(et,!1);return{elements:u,primitive:f,count:d,instances:v,offset:h,vao:o,vaoActive:a,elementsActive:s,static:i}}(e,l),E=function(e,t){var r=e.static,n=e.dynamic,i={};return C.forEach((function(e){var o=P(e);function u(t,a){if(e in r){var s=t(r[e]);i[o]=vt((function(){return s}))}else if(e in n){var u=n[e];i[o]=gt(u,(function(e,t){return a(e,t,e.invoke(t,u))}))}}switch(e){case"cull.enable":case"blend.enable":case"dither":case"stencil.enable":case"depth.enable":case"scissor.enable":case"polygonOffset.enable":case"sample.alpha":case"sample.enable":case"depth.mask":return u((function(r){return w.commandType(r,"boolean",e,t.commandStr),r}),(function(t,r,n){return w.optional((function(){t.assert(r,"typeof "+n+'==="boolean"',"invalid flag "+e,t.commandStr)})),n}));case"depth.func":return u((function(r){return w.commandParameter(r,st,"invalid "+e,t.commandStr),st[r]}),(function(t,r,n){var i=t.constants.compareFuncs;return w.optional((function(){t.assert(r,n+" in "+i,"invalid "+e+", must be one of "+Object.keys(st))})),r.def(i,"[",n,"]")}));case"depth.range":return u((function(e){return w.command(ae(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]&&e[0]<=e[1],"depth range is 2d array",t.commandStr),e}),(function(e,t,r){return w.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===2&&typeof "+r+'[0]==="number"&&typeof '+r+'[1]==="number"&&'+r+"[0]<="+r+"[1]","depth range must be a 2d array")})),[t.def("+",r,"[0]"),t.def("+",r,"[1]")]}));case"blend.func":return u((function(e){w.commandType(e,"object","blend.func",t.commandStr);var r="srcRGB"in e?e.srcRGB:e.src,n="srcAlpha"in e?e.srcAlpha:e.src,i="dstRGB"in e?e.dstRGB:e.dst,a="dstAlpha"in e?e.dstAlpha:e.dst;return w.commandParameter(r,at,o+".srcRGB",t.commandStr),w.commandParameter(n,at,o+".srcAlpha",t.commandStr),w.commandParameter(i,at,o+".dstRGB",t.commandStr),w.commandParameter(a,at,o+".dstAlpha",t.commandStr),w.command(-1===ot.indexOf(r+", "+i),"unallowed blending combination (srcRGB, dstRGB) = ("+r+", "+i+")",t.commandStr),[at[r],at[i],at[n],at[a]]}),(function(t,r,n){var i=t.constants.blendFuncs;function a(a,o){var s=r.def('"',a,o,'" in ',n,"?",n,".",a,o,":",n,".",a);return w.optional((function(){t.assert(r,s+" in "+i,"invalid "+e+"."+a+o+", must be one of "+Object.keys(at))})),s}w.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid blend func, must be an object")}));var o=a("src","RGB"),s=a("dst","RGB");w.optional((function(){var e=t.constants.invalidBlendCombinations;t.assert(r,e+".indexOf("+o+'+", "+'+s+") === -1 ","unallowed blending combination for (srcRGB, dstRGB)")}));var u=r.def(i,"[",o,"]"),c=r.def(i,"[",a("src","Alpha"),"]");return[u,r.def(i,"[",s,"]"),c,r.def(i,"[",a("dst","Alpha"),"]")]}));case"blend.equation":return u((function(r){return"string"==typeof r?(w.commandParameter(r,b,"invalid "+e,t.commandStr),[b[r],b[r]]):"object"===a(r)?(w.commandParameter(r.rgb,b,e+".rgb",t.commandStr),w.commandParameter(r.alpha,b,e+".alpha",t.commandStr),[b[r.rgb],b[r.alpha]]):void w.commandRaise("invalid blend.equation",t.commandStr)}),(function(t,r,n){var i=t.constants.blendEquations,a=r.def(),o=r.def(),s=t.cond("typeof ",n,'==="string"');return w.optional((function(){function r(e,r,n){t.assert(e,n+" in "+i,"invalid "+r+", must be one of "+Object.keys(b))}r(s.then,e,n),t.assert(s.else,n+"&&typeof "+n+'==="object"',"invalid "+e),r(s.else,e+".rgb",n+".rgb"),r(s.else,e+".alpha",n+".alpha")})),s.then(a,"=",o,"=",i,"[",n,"];"),s.else(a,"=",i,"[",n,".rgb];",o,"=",i,"[",n,".alpha];"),r(s),[a,o]}));case"blend.color":return u((function(e){return w.command(ae(e)&&4===e.length,"blend.color must be a 4d array",t.commandStr),z(4,(function(t){return+e[t]}))}),(function(e,t,r){return w.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","blend.color must be a 4d array")})),z(4,(function(e){return t.def("+",r,"[",e,"]")}))}));case"stencil.mask":return u((function(e){return w.commandType(e,"number",o,t.commandStr),0|e}),(function(e,t,r){return w.optional((function(){e.assert(t,"typeof "+r+'==="number"',"invalid stencil.mask")})),t.def(r,"|0")}));case"stencil.func":return u((function(r){w.commandType(r,"object",o,t.commandStr);var n=r.cmp||"keep",i=r.ref||0,a="mask"in r?r.mask:-1;return w.commandParameter(n,st,e+".cmp",t.commandStr),w.commandType(i,"number",e+".ref",t.commandStr),w.commandType(a,"number",e+".mask",t.commandStr),[st[n],i,a]}),(function(e,t,r){var n=e.constants.compareFuncs;return w.optional((function(){function i(){e.assert(t,Array.prototype.join.call(arguments,""),"invalid stencil.func")}i(r+"&&typeof ",r,'==="object"'),i('!("cmp" in ',r,")||(",r,".cmp in ",n,")")})),[t.def('"cmp" in ',r,"?",n,"[",r,".cmp]",":",7680),t.def(r,".ref|0"),t.def('"mask" in ',r,"?",r,".mask|0:-1")]}));case"stencil.opFront":case"stencil.opBack":return u((function(r){w.commandType(r,"object",o,t.commandStr);var n=r.fail||"keep",i=r.zfail||"keep",a=r.zpass||"keep";return w.commandParameter(n,ut,e+".fail",t.commandStr),w.commandParameter(i,ut,e+".zfail",t.commandStr),w.commandParameter(a,ut,e+".zpass",t.commandStr),["stencil.opBack"===e?1029:1028,ut[n],ut[i],ut[a]]}),(function(t,r,n){var i=t.constants.stencilOps;function a(a){return w.optional((function(){t.assert(r,'!("'+a+'" in '+n+")||("+n+"."+a+" in "+i+")","invalid "+e+"."+a+", must be one of "+Object.keys(ut))})),r.def('"',a,'" in ',n,"?",i,"[",n,".",a,"]:",7680)}return w.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),["stencil.opBack"===e?1029:1028,a("fail"),a("zfail"),a("zpass")]}));case"polygonOffset.offset":return u((function(e){w.commandType(e,"object",o,t.commandStr);var r=0|e.factor,n=0|e.units;return w.commandType(r,"number",o+".factor",t.commandStr),w.commandType(n,"number",o+".units",t.commandStr),[r,n]}),(function(t,r,n){return w.optional((function(){t.assert(r,n+"&&typeof "+n+'==="object"',"invalid "+e)})),[r.def(n,".factor|0"),r.def(n,".units|0")]}));case"cull.face":return u((function(e){var r=0;return"front"===e?r=1028:"back"===e&&(r=1029),w.command(!!r,o,t.commandStr),r}),(function(e,t,r){return w.optional((function(){e.assert(t,r+'==="front"||'+r+'==="back"',"invalid cull.face")})),t.def(r,'==="front"?',1028,":",1029)}));case"lineWidth":return u((function(e){return w.command("number"==typeof e&&e>=s.lineWidthDims[0]&&e<=s.lineWidthDims[1],"invalid line width, must be a positive number between "+s.lineWidthDims[0]+" and "+s.lineWidthDims[1],t.commandStr),e}),(function(e,t,r){return w.optional((function(){e.assert(t,"typeof "+r+'==="number"&&'+r+">="+s.lineWidthDims[0]+"&&"+r+"<="+s.lineWidthDims[1],"invalid line width")})),r}));case"frontFace":return u((function(e){return w.commandParameter(e,lt,o,t.commandStr),lt[e]}),(function(e,t,r){return w.optional((function(){e.assert(t,r+'==="cw"||'+r+'==="ccw"',"invalid frontFace, must be one of cw,ccw")})),t.def(r+'==="cw"?2304:2305')}));case"colorMask":return u((function(e){return w.command(ae(e)&&4===e.length,"color.mask must be length 4 array",t.commandStr),e.map((function(e){return!!e}))}),(function(e,t,r){return w.optional((function(){e.assert(t,e.shared.isArrayLike+"("+r+")&&"+r+".length===4","invalid color.mask")})),z(4,(function(e){return"!!"+r+"["+e+"]"}))}));case"sample.coverage":return u((function(e){w.command("object"===a(e)&&e,o,t.commandStr);var r="value"in e?e.value:1,n=!!e.invert;return w.command("number"==typeof r&&r>=0&&r<=1,"sample.coverage.value must be a number between 0 and 1",t.commandStr),[r,n]}),(function(e,t,r){return w.optional((function(){e.assert(t,r+"&&typeof "+r+'==="object"',"invalid sample.coverage")})),[t.def('"value" in ',r,"?+",r,".value:1"),t.def("!!",r,".invert")]}))}})),i}(e,l),A=function(e,t,r){var i=e.static,a=e.dynamic;function o(e){if(e in i){var t=n.id(i[e]);w.optional((function(){d.shader(ct[e],t,w.guessCommand())}));var r=vt((function(){return t}));return r.id=t,r}if(e in a){var o=a[e];return gt(o,(function(t,r){var n=t.invoke(r,o),i=r.def(t.shared.strings,".id(",n,")");return w.optional((function(){r(t.shared.shader,".shader(",ct[e],",",i,",",t.command,");")})),i}))}return null}var s,u=o(qe),c=o(Ze),l=null;return dt(u)&&dt(c)?(l=d.program(c.id,u.id,null,r),s=vt((function(e,t){return e.link(l)}))):s=new pt(u&&u.thisDep||c&&c.thisDep,u&&u.contextDep||c&&c.contextDep,u&&u.propDep||c&&c.propDep,(function(e,t){var r,n=e.shared.shader;r=u?u.append(e,t):t.def(n,".",qe);var i=n+".program("+(c?c.append(e,t):t.def(n,".",Ze))+","+r;return w.optional((function(){i+=","+e.command})),t.def(i+")")})),{frag:u,vert:c,progVar:s,program:l}}(e,0,g);function T(e){var t=y[e];t&&(E[e]=t)}T("viewport"),T(P("scissor.box"));var k=Object.keys(E).length>0,M={framebuffer:m,draw:S,shader:A,state:E,dirty:k,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(M.profile=function(e){var t,r=e.static,n=e.dynamic;if(Ye in r){var i=!!r[Ye];(t=vt((function(e,t){return i}))).enable=i}else if(Ye in n){var a=n[Ye];t=gt(a,(function(e,t){return e.invoke(t,a)}))}return t}(e),M.uniforms=function(e,t){var r=e.static,n=e.dynamic,i={};return Object.keys(r).forEach((function(e){var n,a=r[e];if("number"==typeof a||"boolean"==typeof a)n=vt((function(){return a}));else if("function"==typeof a){var o=a._reglType;"texture2d"===o||"textureCube"===o?n=vt((function(e){return e.link(a)})):"framebuffer"===o||"framebufferCube"===o?(w.command(a.color.length>0,'missing color attachment for framebuffer sent to uniform "'+e+'"',t.commandStr),n=vt((function(e){return e.link(a.color[0])}))):w.commandRaise('invalid data for uniform "'+e+'"',t.commandStr)}else ae(a)?n=vt((function(t){return t.global.def("[",z(a.length,(function(r){return w.command("number"==typeof a[r]||"boolean"==typeof a[r],"invalid uniform "+e,t.commandStr),a[r]})),"]")})):w.commandRaise('invalid or missing data for uniform "'+e+'"',t.commandStr);n.value=a,i[e]=n})),Object.keys(n).forEach((function(e){var t=n[e];i[e]=gt(t,(function(e,r){return e.invoke(r,t)}))})),i}(r,l),M.drawVAO=M.scopeVAO=S.vao,!M.drawVAO&&A.program&&!g&&o.angle_instanced_arrays&&S.static.elements){var I=!0,O=A.program.attributes.map((function(e){var r=t.static[e];return I=I&&!!r,r}));if(I&&O.length>0){var R=p.getVAO(p.createVAO({attributes:O,elements:S.static.elements}));M.drawVAO=new pt(null,null,null,(function(e,t){return e.link(R)})),M.useVAO=!0}}return g?M.useVAO=!0:M.attributes=function(e,t){var r=e.static,i=e.dynamic,o={};return Object.keys(r).forEach((function(e){var i=r[e],s=n.id(e),c=new _;if(ht(i))c.state=1,c.buffer=u.getBuffer(u.create(i,34962,!1,!0)),c.type=0;else{var l=u.getBuffer(i);if(l)c.state=1,c.buffer=l,c.type=0;else if(w.command("object"===a(i)&&i,"invalid data for attribute "+e,t.commandStr),"constant"in i){var h=i.constant;c.buffer="null",c.state=2,"number"==typeof h?c.x=h:(w.command(ae(h)&&h.length>0&&h.length<=4,"invalid constant for attribute "+e,t.commandStr),We.forEach((function(e,t){t<h.length&&(c[e]=h[t])})))}else{l=ht(i.buffer)?u.getBuffer(u.create(i.buffer,34962,!1,!0)):u.getBuffer(i.buffer),w.command(!!l,'missing buffer for attribute "'+e+'"',t.commandStr);var f=0|i.offset;w.command(f>=0,'invalid offset for attribute "'+e+'"',t.commandStr);var p=0|i.stride;w.command(p>=0&&p<256,'invalid stride for attribute "'+e+'", must be integer betweeen [0, 255]',t.commandStr);var d=0|i.size;w.command(!("size"in i)||d>0&&d<=4,'invalid size for attribute "'+e+'", must be 1,2,3,4',t.commandStr);var v=!!i.normalized,g=0;"type"in i&&(w.commandParameter(i.type,X,"invalid type for attribute "+e,t.commandStr),g=X[i.type]);var m=0|i.divisor;w.optional((function(){"divisor"in i&&(w.command(0===m||x,'cannot specify divisor for attribute "'+e+'", instancing not supported',t.commandStr),w.command(m>=0,'invalid divisor for attribute "'+e+'"',t.commandStr));var r=t.commandStr,n=["buffer","offset","divisor","normalized","type","size","stride"];Object.keys(i).forEach((function(t){w.command(n.indexOf(t)>=0,'unknown parameter "'+t+'" for attribute pointer "'+e+'" (valid parameters are '+n+")",r)}))})),c.buffer=l,c.state=1,c.size=d,c.normalized=v,c.type=g||l.dtype,c.offset=f,c.stride=p,c.divisor=m}}o[e]=vt((function(e,t){var r=e.attribCache;if(s in r)return r[s];var n={isStream:!1};return Object.keys(c).forEach((function(e){n[e]=c[e]})),c.buffer&&(n.buffer=e.link(c.buffer),n.type=n.type||n.buffer+".dtype"),r[s]=n,n}))})),Object.keys(i).forEach((function(e){var t=i[e];o[e]=gt(t,(function(r,n){var i=r.invoke(n,t),a=r.shared,o=r.constants,s=a.isBufferArgs,u=a.buffer;w.optional((function(){r.assert(n,i+"&&(typeof "+i+'==="object"||typeof '+i+'==="function")&&('+s+"("+i+")||"+u+".getBuffer("+i+")||"+u+".getBuffer("+i+".buffer)||"+s+"("+i+'.buffer)||("constant" in '+i+"&&(typeof "+i+'.constant==="number"||'+a.isArrayLike+"("+i+".constant))))",'invalid dynamic attribute "'+e+'"')}));var c={isStream:n.def(!1)},l=new _;l.state=1,Object.keys(l).forEach((function(e){c[e]=n.def(""+l[e])}));var h=c.buffer,f=c.type;function p(e){n(c[e],"=",i,".",e,"|0;")}return n("if(",s,"(",i,")){",c.isStream,"=true;",h,"=",u,".createStream(",34962,",",i,");",f,"=",h,".dtype;","}else{",h,"=",u,".getBuffer(",i,");","if(",h,"){",f,"=",h,".dtype;",'}else if("constant" in ',i,"){",c.state,"=",2,";","if(typeof "+i+'.constant === "number"){',c[We[0]],"=",i,".constant;",We.slice(1).map((function(e){return c[e]})).join("="),"=0;","}else{",We.map((function(e,t){return c[e]+"="+i+".constant.length>"+t+"?"+i+".constant["+t+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",h,"=",u,".createStream(",34962,",",i,".buffer);","}else{",h,"=",u,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",h,".dtype;",c.normalized,"=!!",i,".normalized;"),p("size"),p("offset"),p("stride"),p("divisor"),n("}}"),n.exit("if(",c.isStream,"){",u,".destroyStream(",h,");","}"),c}))})),o}(t,l),M.context=function(e){var t=e.static,r=e.dynamic,n={};return Object.keys(t).forEach((function(e){var r=t[e];n[e]=vt((function(e,t){return"number"==typeof r||"boolean"==typeof r?""+r:e.link(r)}))})),Object.keys(r).forEach((function(e){var t=r[e];n[e]=gt(t,(function(e,r){return e.invoke(r,t)}))})),n}(i),M}function U(e,t,r){var n=e.shared.context,i=e.scope();Object.keys(r).forEach((function(a){t.save(n,"."+a);var o=r[a].append(e,t);Array.isArray(o)?i(n,".",a,"=[",o.join(),"];"):i(n,".",a,"=",o,";")})),t(i)}function j(e,t,r,n){var i,a=e.shared,o=a.gl,s=a.framebuffer;S&&(i=t.def(a.extensions,".webgl_draw_buffers"));var u,c=e.constants,l=c.drawBuffer,h=c.backBuffer;u=r?r.append(e,t):t.def(s,".next"),n||t("if(",u,"!==",s,".cur){"),t("if(",u,"){",o,".bindFramebuffer(",36160,",",u,".framebuffer);"),S&&t(i,".drawBuffersWEBGL(",l,"[",u,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",36160,",null);"),S&&t(i,".drawBuffersWEBGL(",h,");"),t("}",s,".cur=",u,";"),n||t("}")}function V(e,t,r){var n=e.shared,i=n.gl,a=e.current,o=e.next,s=n.current,u=n.next,c=e.cond(s,".dirty");C.forEach((function(t){var n,l,h=P(t);if(!(h in r.state))if(h in o){n=o[h],l=a[h];var f=z(A[h].length,(function(e){return c.def(n,"[",e,"]")}));c(e.cond(f.map((function(e,t){return e+"!=="+l+"["+t+"]"})).join("||")).then(i,".",M[h],"(",f,");",f.map((function(e,t){return l+"["+t+"]="+e})).join(";"),";"))}else{n=c.def(u,".",h);var p=e.cond(n,"!==",s,".",h);c(p),h in k?p(e.cond(n).then(i,".enable(",k[h],");").else(i,".disable(",k[h],");"),s,".",h,"=",n,";"):p(i,".",M[h],"(",n,");",s,".",h,"=",n,";")}})),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function G(e,t,r,n){var i=e.shared,a=e.current,o=i.current,s=i.gl;ft(Object.keys(r)).forEach((function(i){var u=r[i];if(!n||n(u)){var c=u.append(e,t);if(k[i]){var l=k[i];dt(u)?t(s,c?".enable(":".disable(",l,");"):t(e.cond(c).then(s,".enable(",l,");").else(s,".disable(",l,");")),t(o,".",i,"=",c,";")}else if(ae(c)){var h=a[i];t(s,".",M[i],"(",c,");",c.map((function(e,t){return h+"["+t+"]="+e})).join(";"),";")}else t(s,".",M[i],"(",c,");",o,".",i,"=",c,";")}}))}function H(e,t){x&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function W(e,t,r,n,i){var a,o,s,u=e.shared,c=e.stats,l=u.current,h=u.timer,f=r.profile;function p(){return"undefined"!=typeof my&&my&&"function"==typeof my.showToast&&!0!==my.isFRM||"undefined"==typeof performance?"Date.now()":"performance.now()"}function d(e){e(a=t.def(),"=",p(),";"),"string"==typeof i?e(c,".count+=",i,";"):e(c,".count++;"),m&&(n?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function v(e){e(c,".cpuTime+=",p(),"-",a,";"),m&&(n?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function g(e){var r=t.def(l,".profile");t(l,".profile=",e,";"),t.exit(l,".profile=",r,";")}if(f){if(dt(f))return void(f.enable?(d(t),v(t.exit),g("true")):g("false"));g(s=f.append(e,t))}else s=t.def(l,".profile");var y=e.block();d(y),t("if(",s,"){",y,"}");var _=e.block();v(_),t.exit("if(",s,"){",_,"}")}function Y(e,n,i,a,o){var s=e.shared;a.forEach((function(a){var u,c=a.name,l=i.attributes[c];if(l){if(!o(l))return;u=l.append(e,n)}else{if(!o(mt))return;var h=e.scopeAttrib(c);w.optional((function(){e.assert(n,h+".state","missing attribute "+c)})),u={},Object.keys(new _).forEach((function(e){u[e]=n.def(h,".",e)}))}!function(i,a,o){var u=s.gl,c=n.def(i,".location"),l=n.def(s.attributes,"[",c,"]"),h=o.state,f=o.buffer,p=[o.x,o.y,o.z,o.w],d=["buffer","normalized","offset","stride"];function v(){n("if(!",l,".buffer){",u,".enableVertexAttribArray(",c,");}");var i,s=o.type;if(i=o.size?n.def(o.size,"||",a):a,n("if(",l,".type!==",s,"||",l,".size!==",i,"||",d.map((function(e){return l+"."+e+"!=="+o[e]})).join("||"),"){",u,".bindBuffer(",34962,",",f,".buffer);",u,".vertexAttribPointer(",[c,i,s,o.normalized,o.stride,o.offset],");",l,".type=",s,";",l,".size=",i,";",d.map((function(e){return l+"."+e+"="+o[e]+";"})).join(""),"}"),x){var h=o.divisor;r(t)?n("if(",l,".divisor!==",h,"){",u,".vertexAttribDivisor(",[c,h],");",l,".divisor=",h,";}"):n("if(",l,".divisor!==",h,"){",e.instancing,".vertexAttribDivisorANGLE(",[c,h],");",l,".divisor=",h,";}")}}function g(){n("if(",l,".buffer){",u,".disableVertexAttribArray(",c,");",l,".buffer=null;","}if(",We.map((function(e,t){return l+"."+e+"!=="+p[t]})).join("||"),"){",u,".vertexAttrib4f(",c,",",p,");",We.map((function(e,t){return l+"."+e+"="+p[t]+";"})).join(""),"}")}1===h?v():2===h?g():(n("if(",h,"===",1,"){"),v(),n("}else{"),g(),n("}"))}(e.link(a),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(a.info.type),u)}))}function Z(e,t,r,i,a,o){for(var s,u=e.shared,c=u.gl,l=0;l<i.length;++l){var h,f=i[l],p=f.name,d=f.info.type,v=r.uniforms[p],g=e.link(f)+".location";if(v){if(!a(v))continue;if(dt(v)){var m=v.value;if(w.command(null!=m,'missing uniform "'+p+'"',e.commandStr),35678===d||35680===d){w.command("function"==typeof m&&(35678===d&&("texture2d"===m._reglType||"framebuffer"===m._reglType)||35680===d&&("textureCube"===m._reglType||"framebufferCube"===m._reglType)),"invalid texture for uniform "+p,e.commandStr);var y=e.link(m._texture||m.color[0]._texture);t(c,".uniform1i(",g,",",y+".bind());"),t.exit(y,".unbind();")}else if(35674===d||35675===d||35676===d){w.optional((function(){w.command(ae(m),"invalid matrix for uniform "+p,e.commandStr),w.command(35674===d&&4===m.length||35675===d&&9===m.length||35676===d&&16===m.length,"invalid length for matrix uniform "+p,e.commandStr)}));var _=e.global.def("new Float32Array(["+Array.prototype.slice.call(m)+"])"),b=2;35675===d?b=3:35676===d&&(b=4),t(c,".uniformMatrix",b,"fv(",g,",false,",_,");")}else{switch(d){case 5126:w.commandType(m,"number","uniform "+p,e.commandStr),s="1f";break;case 35664:w.command(ae(m)&&2===m.length,"uniform "+p,e.commandStr),s="2f";break;case 35665:w.command(ae(m)&&3===m.length,"uniform "+p,e.commandStr),s="3f";break;case 35666:w.command(ae(m)&&4===m.length,"uniform "+p,e.commandStr),s="4f";break;case 35670:w.commandType(m,"boolean","uniform "+p,e.commandStr),s="1i";break;case 5124:w.commandType(m,"number","uniform "+p,e.commandStr),s="1i";break;case 35671:case 35667:w.command(ae(m)&&2===m.length,"uniform "+p,e.commandStr),s="2i";break;case 35672:case 35668:w.command(ae(m)&&3===m.length,"uniform "+p,e.commandStr),s="3i";break;case 35673:case 35669:w.command(ae(m)&&4===m.length,"uniform "+p,e.commandStr),s="4i"}t(c,".uniform",s,"(",g,",",ae(m)?Array.prototype.slice.call(m):m,");")}continue}h=v.append(e,t)}else{if(!a(mt))continue;h=t.def(u.uniforms,"[",n.id(p),"]")}35678===d?(w(!Array.isArray(h),"must specify a scalar prop for textures"),t("if(",h,"&&",h,'._reglType==="framebuffer"){',h,"=",h,".color[0];","}")):35680===d&&(w(!Array.isArray(h),"must specify a scalar prop for cube maps"),t("if(",h,"&&",h,'._reglType==="framebufferCube"){',h,"=",h,".color[0];","}")),w.optional((function(){function r(r,n){e.assert(t,r,'bad data or missing for uniform "'+p+'".  '+n)}function n(e){w(!Array.isArray(h),"must not specify an array type for uniform"),r("typeof "+h+'==="'+e+'"',"invalid type, expected "+e)}function i(t,n){Array.isArray(h)?w(h.length===t,"must have length "+t):r(u.isArrayLike+"("+h+")&&"+h+".length==="+t,"invalid vector, should have length "+t,e.commandStr)}function a(t){w(!Array.isArray(h),"must not specify a value type"),r("typeof "+h+'==="function"&&'+h+'._reglType==="texture'+(3553===t?"2d":"Cube")+'"',"invalid texture type",e.commandStr)}switch(d){case 5124:n("number");break;case 35667:i(2);break;case 35668:i(3);break;case 35669:i(4);break;case 5126:n("number");break;case 35664:i(2);break;case 35665:i(3);break;case 35666:i(4);break;case 35670:n("boolean");break;case 35671:i(2);break;case 35672:i(3);break;case 35673:case 35674:i(4);break;case 35675:i(9);break;case 35676:i(16);break;case 35678:a(3553);break;case 35680:a(34067)}}));var x=1;switch(d){case 35678:case 35680:var S=t.def(h,"._texture");t(c,".uniform1i(",g,",",S,".bind());"),t.exit(S,".unbind();");continue;case 5124:case 35670:s="1i";break;case 35667:case 35671:s="2i",x=2;break;case 35668:case 35672:s="3i",x=3;break;case 35669:case 35673:s="4i",x=4;break;case 5126:s="1f";break;case 35664:s="2f",x=2;break;case 35665:s="3f",x=3;break;case 35666:s="4f",x=4;break;case 35674:s="Matrix2fv";break;case 35675:s="Matrix3fv";break;case 35676:s="Matrix4fv"}if("M"===s.charAt(0)){t(c,".uniform",s,"(",g,",");var E=Math.pow(d-35674+2,2),A=e.global.def("new Float32Array(",E,")");Array.isArray(h)?t("false,(",z(E,(function(e){return A+"["+e+"]="+h[e]})),",",A,")"):t("false,(Array.isArray(",h,")||",h," instanceof Float32Array)?",h,":(",z(E,(function(e){return A+"["+e+"]="+h+"["+e+"]"})),",",A,")"),t(");")}else if(x>1){for(var T=[],C=[],k=0;k<x;++k)Array.isArray(h)?C.push(h[k]):C.push(t.def(h+"["+k+"]")),o&&T.push(t.def());o&&t("if(!",e.batchId,"||",T.map((function(e,t){return e+"!=="+C[t]})).join("||"),"){",T.map((function(e,t){return e+"="+C[t]+";"})).join("")),t(c,".uniform",s,"(",g,",",C.join(","),");"),o&&t("}")}else{if(w(!Array.isArray(h),"uniform value must not be an array"),o){var M=t.def();t("if(!",e.batchId,"||",M,"!==",h,"){",M,"=",h,";")}t(c,".uniform",s,"(",g,",",h,");"),o&&t("}")}}}function q(e,t,r,n){var i=e.shared,a=i.gl,o=i.draw,s=n.draw,u=function(){var u,c=s.elements,l=t;return c?((c.contextDep&&n.contextDynamic||c.propDep)&&(l=r),u=c.append(e,l),s.elementsActive&&l("if("+u+")"+a+".bindBuffer(34963,"+u+".buffer.buffer);")):(u=l.def(),l(u,"=",o,".",Ke,";","if(",u,"){",a,".bindBuffer(",34963,",",u,".buffer.buffer);}","else if(",i.vao,".currentVAO){",u,"=",e.shared.elements+".getElements("+i.vao,".currentVAO.elements);",E?"":"if("+u+")"+a+".bindBuffer(34963,"+u+".buffer.buffer);","}")),u}();function c(i){var a=s[i];return a?a.contextDep&&n.contextDynamic||a.propDep?a.append(e,r):a.append(e,t):t.def(o,".",i)}var l,h,f=c(Qe),p=c(Je),d=function(){var i,a=s.count,u=t;return a?((a.contextDep&&n.contextDynamic||a.propDep)&&(u=r),i=a.append(e,u),w.optional((function(){a.MISSING&&e.assert(t,"false","missing vertex count"),a.DYNAMIC&&e.assert(u,i+">=0","missing vertex count")}))):(i=u.def(o,".",$e),w.optional((function(){e.assert(u,i+">=0","missing vertex count")}))),i}();if("number"==typeof d){if(0===d)return}else r("if(",d,"){"),r.exit("}");x&&(l=c(et),h=e.instancing);var v=u+".type",g=s.elements&&dt(s.elements)&&!s.vaoActive;function m(){function e(){r(h,".drawElementsInstancedANGLE(",[f,d,v,p+"<<(("+v+"-5121)>>1)",l],");")}function t(){r(h,".drawArraysInstancedANGLE(",[f,p,d,l],");")}u&&"null"!==u?g?e():(r("if(",u,"){"),e(),r("}else{"),t(),r("}")):t()}function y(){function e(){r(a+".drawElements("+[f,d,v,p+"<<(("+v+"-5121)>>1)"]+");")}function t(){r(a+".drawArrays("+[f,p,d]+");")}u&&"null"!==u?g?e():(r("if(",u,"){"),e(),r("}else{"),t(),r("}")):t()}x&&("number"!=typeof l||l>=0)?"string"==typeof l?(r("if(",l,">0){"),m(),r("}else if(",l,"<0){"),y(),r("}")):m():y()}function K(e,t,r,n,i){var a=F(),o=a.proc("body",i);return w.optional((function(){a.commandStr=t.commandStr,a.command=a.link(t.commandStr)})),x&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,n),a.compile().body}function Q(e,t,r,n){H(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),Y(e,t,r,n.attributes,(function(){return!0}))),Z(e,t,r,n.uniforms,(function(){return!0}),!1),q(e,t,t,r)}function $(e,t,r,n){function i(){return!0}e.batchId="a1",H(e,t),Y(e,t,r,n.attributes,i),Z(e,t,r,n.uniforms,i,!1),q(e,t,t,r)}function J(e,t,r,n){H(e,t);var i=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),u=e.scope();function c(e){return e.contextDep&&i||e.propDep}function l(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",u,"}",s.exit),r.needsContext&&U(e,u,r.context),r.needsFramebuffer&&j(e,u,r.framebuffer),G(e,u,r.state,c),r.profile&&c(r.profile)&&W(e,u,r,!1,!0),n)r.useVAO?r.drawVAO?c(r.drawVAO)?u(e.shared.vao,".setVAO(",r.drawVAO.append(e,u),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),Y(e,s,r,n.attributes,l),Y(e,u,r,n.attributes,c)),Z(e,s,r,n.uniforms,l,!1),Z(e,u,r,n.uniforms,c,!0),q(e,s,u,r);else{var h=e.global.def("{}"),f=r.shader.progVar.append(e,u),p=u.def(f,".id"),d=u.def(h,"[",p,"]");u(e.shared.gl,".useProgram(",f,".program);","if(!",d,"){",d,"=",h,"[",p,"]=",e.link((function(t){return K($,e,r,t,2)})),"(",f,");}",d,".call(this,a0[",a,"],",a,");")}}function ee(e,t,r){var n=t.static[r];if(n&&function(e){if("object"===a(e)&&!ae(e)){for(var t=Object.keys(e),r=0;r<t.length;++r)if(I.isDynamic(e[t[r]]))return!0;return!1}}(n)){var i=e.global,o=Object.keys(n),s=!1,u=!1,c=!1,l=e.global.def("{}");o.forEach((function(t){var r=n[t];if(I.isDynamic(r)){"function"==typeof r&&(r=n[t]=I.unbox(r));var o=gt(r,null);s=s||o.thisDep,c=c||o.propDep,u=u||o.contextDep}else{switch(i(l,".",t,"="),a(r)){case"number":i(r);break;case"string":i('"',r,'"');break;case"object":Array.isArray(r)&&i("[",r.join(),"]");break;default:i(e.link(r))}i(";")}})),t.dynamic[r]=new I.DynamicVariable(4,{thisDep:s,contextDep:u,propDep:c,ref:l,append:function(e,t){o.forEach((function(r){var i=n[r];if(I.isDynamic(i)){var a=e.invoke(t,i);t(l,".",r,"=",a,";")}}))}}),delete t.static[r]}}return{next:T,current:A,procs:function(){var e=F(),n=e.proc("poll"),i=e.proc("refresh"),a=e.block();n(a),i(a);var u,c=e.shared,l=c.gl,h=c.next,f=c.current;a(f,".dirty=false;"),j(e,n),j(e,i,null,!0),x&&(u=e.link(x)),o.oes_vertex_array_object&&i(e.link(o.oes_vertex_array_object),".bindVertexArrayOES(null);");for(var p=0;p<s.maxAttributes;++p){var d=i.def(c.attributes,"[",p,"]"),v=e.cond(d,".buffer");v.then(l,".enableVertexAttribArray(",p,");",l,".bindBuffer(",34962,",",d,".buffer.buffer);",l,".vertexAttribPointer(",p,",",d,".size,",d,".type,",d,".normalized,",d,".stride,",d,".offset);").else(l,".disableVertexAttribArray(",p,");",l,".vertexAttrib4f(",p,",",d,".x,",d,".y,",d,".z,",d,".w);",d,".buffer=null;"),i(v),x&&(r(t)?i(l,".vertexAttribDivisor(",p,",",d,".divisor);"):i(u,".vertexAttribDivisorANGLE(",p,",",d,".divisor);"))}return i(e.shared.vao,".currentVAO=null;",e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"),Object.keys(k).forEach((function(t){var r=k[t],o=a.def(h,".",t),s=e.block();s("if(",o,"){",l,".enable(",r,")}else{",l,".disable(",r,")}",f,".",t,"=",o,";"),i(s),n("if(",o,"!==",f,".",t,"){",s,"}")})),Object.keys(M).forEach((function(t){var r,o,s=M[t],u=A[t],c=e.block();if(c(l,".",s,"("),ae(u)){var p=u.length;r=e.global.def(h,".",t),o=e.global.def(f,".",t),c(z(p,(function(e){return r+"["+e+"]"})),");",z(p,(function(e){return o+"["+e+"]="+r+"["+e+"];"})).join("")),n("if(",z(p,(function(e){return r+"["+e+"]!=="+o+"["+e+"]"})).join("||"),"){",c,"}")}else r=a.def(h,".",t),o=a.def(f,".",t),c(r,");",f,".",t,"=",r,";"),n("if(",r,"!==",o,"){",c,"}");i(c)})),e.compile()}(),compile:function(e,t,r,a,o){var s=F();s.stats=s.link(o),Object.keys(t.static).forEach((function(e){ee(s,t,e)})),it.forEach((function(t){ee(s,e,t)}));var u=B(e,t,r,a,s);return function(e,t){var r=e.proc("draw",1);H(e,r),U(e,r,t.context),j(e,r,t.framebuffer),V(e,r,t),G(e,r,t.state),W(e,r,t,!1,!0);var n=t.shader.progVar.append(e,r);if(r(e.shared.gl,".useProgram(",n,".program);"),t.shader.program)Q(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var i=e.global.def("{}"),a=r.def(n,".id"),o=r.def(i,"[",a,"]");r(e.cond(o).then(o,".call(this,a0);").else(o,"=",i,"[",a,"]=",e.link((function(r){return K(Q,e,t,r,1)})),"(",n,");",o,".call(this,a0);"))}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(s,u),function(e,t){var r=e.proc("scope",3);e.batchId="a2";var i=e.shared,a=i.current;function o(n){var a=t.shader[n];a&&r.set(i.shader,"."+n,a.append(e,r))}U(e,r,t.context),t.framebuffer&&t.framebuffer.append(e,r),ft(Object.keys(t.state)).forEach((function(n){var a=t.state[n].append(e,r);ae(a)?a.forEach((function(t,i){r.set(e.next[n],"["+i+"]",t)})):r.set(i.next,"."+n,a)})),W(e,r,t,!0,!0),[Ke,Je,$e,et,Qe].forEach((function(n){var a=t.draw[n];a&&r.set(i.draw,"."+n,""+a.append(e,r))})),Object.keys(t.uniforms).forEach((function(a){var o=t.uniforms[a].append(e,r);Array.isArray(o)&&(o="["+o.join()+"]"),r.set(i.uniforms,"["+n.id(a)+"]",o)})),Object.keys(t.attributes).forEach((function(n){var i=t.attributes[n].append(e,r),a=e.scopeAttrib(n);Object.keys(new _).forEach((function(e){r.set(a,"."+e,i[e])}))})),t.scopeVAO&&r.set(i.vao,".targetVAO",t.scopeVAO.append(e,r)),o(Ze),o(qe),Object.keys(t.state).length>0&&(r(a,".dirty=true;"),r.exit(a,".dirty=true;")),r("a1(",e.shared.context,",a0,",e.batchId,");")}(s,u),function(e,t){var r=e.proc("batch",2);e.batchId="0",H(e,r);var n=!1,i=!0;Object.keys(t.context).forEach((function(e){n=n||t.context[e].propDep})),n||(U(e,r,t.context),i=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&n||e.propDep}a?(a.propDep?n=o=!0:a.contextDep&&n&&(o=!0),o||j(e,r,a)):j(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),V(e,r,t),G(e,r,t.state,(function(e){return!s(e)})),t.profile&&s(t.profile)||W(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=o;var u=t.shader.progVar;if(u.contextDep&&n||u.propDep)J(e,r,t,null);else{var c=u.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)J(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var l=e.global.def("{}"),h=r.def(c,".id"),f=r.def(l,"[",h,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",l,"[",h,"]=",e.link((function(r){return K(J,e,t,r,2)})),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(s,u),i(s.compile(),{destroy:function(){u.shader.program.destroy()}})}}}var _t=function(e,t){if(!t.ext_disjoint_timer_query)return null;var r=[];function n(e){r.push(e)}var i=[];function a(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var o=[];function s(e){o.push(e)}var u=[];function c(e,t,r){var n=o.pop()||new a;n.startQueryIndex=e,n.endQueryIndex=t,n.sum=0,n.stats=r,u.push(n)}var l=[],h=[];return{beginQuery:function(e){var n=r.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,n),i.push(n),c(i.length-1,i.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:c,update:function(){var e,r,a=i.length;if(0!==a){h.length=Math.max(h.length,a+1),l.length=Math.max(l.length,a+1),l[0]=0,h[0]=0;var o=0;for(e=0,r=0;r<i.length;++r){var c=i[r];t.ext_disjoint_timer_query.getQueryObjectEXT(c,34919)?(o+=t.ext_disjoint_timer_query.getQueryObjectEXT(c,34918),n(c)):i[e++]=c,l[r+1]=o,h[r+1]=e}for(i.length=e,e=0,r=0;r<u.length;++r){var f=u[r],p=f.startQueryIndex,d=f.endQueryIndex;f.sum+=l[d]-l[p];var v=h[p],g=h[d];g===v?(f.stats.gpuTime+=f.sum/1e6,s(f)):(f.startQueryIndex=v,f.endQueryIndex=g,u[e++]=f)}u.length=e}},getNumPendingQueries:function(){return i.length},clear:function(){r.push.apply(r,i);for(var e=0;e<r.length;e++)t.ext_disjoint_timer_query.deleteQueryEXT(r[e]);i.length=0,r.length=0},restore:function(){i.length=0,r.length=0}}};function bt(e,t){for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}return function(e){var t=D(e);if(!t)return null;var o=t.gl,s=o.getContextAttributes(),u=o.isContextLost(),c=F(o,t);if(!c)return null;var l,h,f=(l={"":0},h=[""],{id:function(e){var t=l[e];return t||(t=l[e]=h.length,h.push(e),t)},str:function(e){return h[e]}}),p={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},d=c.extensions,v=_t(0,d),g=R(),m=o.drawingBufferWidth,y=o.drawingBufferHeight,_={tick:0,time:0,viewportWidth:m,viewportHeight:y,framebufferWidth:m,framebufferHeight:y,drawingBufferWidth:m,drawingBufferHeight:y,pixelRatio:t.pixelRatio},b={elements:null,primitive:4,count:-1,offset:0,instances:-1},x=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(34047));var n=1,i=1;t.webgl_draw_buffers&&(n=e.getParameter(34852),i=e.getParameter(36063));var a=!!t.oes_texture_float;if(a){var o=e.createTexture();e.bindTexture(3553,o),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var s=e.createFramebuffer();if(e.bindFramebuffer(36160,s),e.framebufferTexture2D(36160,36064,3553,o,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))a=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var u=j.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,u),e.getError()?a=!1:(e.deleteFramebuffer(s),e.deleteTexture(o),a=1===u[0]),j.freeType(u)}}var c=!0;if("undefined"==typeof navigator||!(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))){var l=e.createTexture(),h=j.allocType(5121,36);e.activeTexture(33984),e.bindTexture(34067,l),e.texImage2D(34069,0,6408,3,3,0,6408,5121,h),j.freeType(h),e.bindTexture(34067,null),e.deleteTexture(l),c=!e.getError()}return{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter((function(e){return!!t[e]})),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:a,npotTextureCube:c}}(o,d),S=function(e,t,r,i){var a=0,o={};function s(t){this.id=a++,this.buffer=e.createBuffer(),this.type=t,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,r.profile&&(this.stats={size:0})}s.prototype.bind=function(){e.bindBuffer(this.type,this.buffer)},s.prototype.destroy=function(){h(this)};var u=[];function c(t,r,n){t.byteLength=r.byteLength,e.bufferData(t.type,r,n)}function l(e,t,r,i,a,o){var s,u;if(e.usage=r,Array.isArray(t)){if(e.dtype=i||5126,t.length>0)if(Array.isArray(t[0])){s=K(t);for(var l=1,h=1;h<s.length;++h)l*=s[h];e.dimension=l,c(e,u=q(t,s,e.dtype),r),o?e.persistentData=u:j.freeType(u)}else if("number"==typeof t[0]){e.dimension=a;var f=j.allocType(e.dtype,t.length);J(f,t),c(e,f,r),o?e.persistentData=f:j.freeType(f)}else n(t[0])?(e.dimension=t[0].length,e.dtype=i||$(t[0])||5126,c(e,u=q(t,[t.length,t[0].length],e.dtype),r),o?e.persistentData=u:j.freeType(u)):w.raise("invalid buffer data")}else if(n(t))e.dtype=i||$(t),e.dimension=a,c(e,t,r),o&&(e.persistentData=new Uint8Array(new Uint8Array(t.buffer)));else if(V(t)){s=t.shape;var p=t.stride,d=t.offset,v=0,g=0,m=0,y=0;1===s.length?(v=s[0],g=1,m=p[0],y=0):2===s.length?(v=s[0],g=s[1],m=p[0],y=p[1]):w.raise("invalid shape"),e.dtype=i||$(t.data)||5126,e.dimension=g;var _=j.allocType(e.dtype,v*g);ee(_,t.data,v,g,m,y,d),c(e,_,r),o?e.persistentData=_:j.freeType(_)}else t instanceof ArrayBuffer?(e.dtype=5121,e.dimension=a,c(e,t,r),o&&(e.persistentData=new Uint8Array(new Uint8Array(t)))):w.raise("invalid buffer data")}function h(r){t.bufferCount--,i(r);var n=r.buffer;w(n,"buffer must not be deleted already"),e.deleteBuffer(n),r.buffer=null,delete o[r.id]}return r.profile&&(t.getTotalBufferSize=function(){var e=0;return Object.keys(o).forEach((function(t){e+=o[t].stats.size})),e}),{create:function(i,a,u,c){t.bufferCount++;var f=new s(a);function p(t){var i=35044,a=null,o=0,s=0,u=1;return Array.isArray(t)||n(t)||V(t)||t instanceof ArrayBuffer?a=t:"number"==typeof t?o=0|t:t&&(w.type(t,"object","buffer arguments must be an object, a number or an array"),"data"in t&&(w(null===a||Array.isArray(a)||n(a)||V(a),"invalid data for buffer"),a=t.data),"usage"in t&&(w.parameter(t.usage,Z,"invalid buffer usage"),i=Z[t.usage]),"type"in t&&(w.parameter(t.type,X,"invalid buffer type"),s=X[t.type]),"dimension"in t&&(w.type(t.dimension,"number","invalid dimension"),u=0|t.dimension),"length"in t&&(w.nni(o,"buffer length must be a nonnegative integer"),o=0|t.length)),f.bind(),a?l(f,a,i,s,u,c):(o&&e.bufferData(f.type,o,i),f.dtype=s||5121,f.usage=i,f.dimension=u,f.byteLength=o),r.profile&&(f.stats.size=f.byteLength*Q[f.dtype]),p}function d(t,r){w(r+t.byteLength<=f.byteLength,"invalid buffer subdata call, buffer is too small.  Can't write data of size "+t.byteLength+" starting from offset "+r+" to a buffer of size "+f.byteLength),e.bufferSubData(f.type,r,t)}return o[f.id]=f,u||p(i),p._reglType="buffer",p._buffer=f,p.subdata=function(e,t){var r,i=0|(t||0);if(f.bind(),n(e)||e instanceof ArrayBuffer)d(e,i);else if(Array.isArray(e)){if(e.length>0)if("number"==typeof e[0]){var a=j.allocType(f.dtype,e.length);J(a,e),d(a,i),j.freeType(a)}else if(Array.isArray(e[0])||n(e[0])){r=K(e);var o=q(e,r,f.dtype);d(o,i),j.freeType(o)}else w.raise("invalid buffer data")}else if(V(e)){r=e.shape;var s=e.stride,u=0,c=0,l=0,h=0;1===r.length?(u=r[0],c=1,l=s[0],h=0):2===r.length?(u=r[0],c=r[1],l=s[0],h=s[1]):w.raise("invalid shape");var v=Array.isArray(e.data)?f.dtype:$(e.data),g=j.allocType(v,u*c);ee(g,e.data,u,c,l,h,e.offset),d(g,i),j.freeType(g)}else w.raise("invalid data for buffer subdata");return p},r.profile&&(p.stats=f.stats),p.destroy=function(){h(f)},p},createStream:function(e,t){var r=u.pop();return r||(r=new s(e)),r.bind(),l(r,t,35040,0,1,!1),r},destroyStream:function(e){u.push(e)},clear:function(){G(o).forEach(h),u.forEach(h)},getBuffer:function(e){return e&&e._buffer instanceof s?e._buffer:null},restore:function(){G(o).forEach((function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)}))},_initBuffer:l}}(o,p,t,(function(e){return A.destroyBuffer(e)})),E=function(e,t,r,i){var a={},o=0,s={uint8:5121,uint16:5123};function u(e){this.id=o++,a[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(s.uint32=5125),u.prototype.bind=function(){this.buffer.bind()};var c=[];function l(i,a,o,s,u,c,l){var h;if(i.buffer.bind(),a){var f=l;l||n(a)&&(!V(a)||n(a.data))||(f=t.oes_element_index_uint?5125:5123),r._initBuffer(i.buffer,a,o,f,3)}else e.bufferData(34963,c,o),i.buffer.dtype=h||5121,i.buffer.usage=o,i.buffer.dimension=3,i.buffer.byteLength=c;if(h=l,!l){switch(i.buffer.dtype){case 5121:case 5120:h=5121;break;case 5123:case 5122:h=5123;break;case 5125:case 5124:h=5125;break;default:w.raise("unsupported type for element array")}i.buffer.dtype=h}i.type=h,w(5125!==h||!!t.oes_element_index_uint,"32 bit element buffers not supported, enable oes_element_index_uint first");var p=u;p<0&&(p=i.buffer.byteLength,5123===h?p>>=1:5125===h&&(p>>=2)),i.vertCount=p;var d=s;if(s<0){d=4;var v=i.buffer.dimension;1===v&&(d=0),2===v&&(d=1),3===v&&(d=4)}i.primType=d}function h(e){i.elementsCount--,w(null!==e.buffer,"must not double destroy elements"),delete a[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var a=r.create(null,34963,!0),o=new u(a._buffer);function c(e){if(e)if("number"==typeof e)a(e),o.primType=4,o.vertCount=0|e,o.type=5121;else{var t=null,r=35044,i=-1,u=-1,h=0,f=0;Array.isArray(e)||n(e)||V(e)?t=e:(w.type(e,"object","invalid arguments for elements"),"data"in e&&(t=e.data,w(Array.isArray(t)||n(t)||V(t),"invalid data for element buffer")),"usage"in e&&(w.parameter(e.usage,Z,"invalid element buffer usage"),r=Z[e.usage]),"primitive"in e&&(w.parameter(e.primitive,te,"invalid element buffer primitive"),i=te[e.primitive]),"count"in e&&(w("number"==typeof e.count&&e.count>=0,"invalid vertex count for elements"),u=0|e.count),"type"in e&&(w.parameter(e.type,s,"invalid buffer type"),f=s[e.type]),"length"in e?h=0|e.length:(h=u,5123===f||5122===f?h*=2:5125!==f&&5124!==f||(h*=4))),l(o,t,r,i,u,h,f)}else a(),o.primType=4,o.vertCount=0,o.type=5121;return c}return i.elementsCount++,c(e),c._reglType="elements",c._elements=o,c.subdata=function(e,t){return a.subdata(e,t),c},c.destroy=function(){h(o)},c},createStream:function(e){var t=c.pop();return t||(t=new u(r.create(null,34963,!0,!1)._buffer)),l(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){c.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof u?e._elements:null},clear:function(){G(a).forEach(h)}}}(o,d,S,p),A=function(e,t,i,o,s,u,c){for(var l=i.maxAttributes,h=new Array(l),f=0;f<l;++f)h[f]=new je;var p=0,d={},v={Record:je,scope:{},state:h,currentVAO:null,targetVAO:null,restore:g()?function(){g()&&G(d).forEach((function(e){e.refresh()}))}:function(){},createVAO:function(e){var r=new y;function i(e){var o;if(Array.isArray(e))o=e,r.elements&&r.ownsElements&&r.elements.destroy(),r.elements=null,r.ownsElements=!1,r.offset=0,r.count=0,r.instances=-1,r.primitive=4;else{if(w("object"===a(e),"invalid arguments for create vao"),w("attributes"in e,"must specify attributes for vao"),e.elements){var c=e.elements;r.ownsElements?"function"==typeof c&&"elements"===c._reglType?(r.elements.destroy(),r.ownsElements=!1):(r.elements(c),r.ownsElements=!1):u.getElements(e.elements)?(r.elements=e.elements,r.ownsElements=!1):(r.elements=u.create(e.elements),r.ownsElements=!0)}else r.elements=null,r.ownsElements=!1;o=e.attributes,r.offset=0,r.count=-1,r.instances=-1,r.primitive=4,r.elements&&(r.count=r.elements._elements.vertCount,r.primitive=r.elements._elements.primType),"offset"in e&&(r.offset=0|e.offset),"count"in e&&(r.count=0|e.count),"instances"in e&&(r.instances=0|e.instances),"primitive"in e&&(w(e.primitive in te,"bad primitive type: "+e.primitive),r.primitive=te[e.primitive]),w.optional((function(){for(var t=Object.keys(e),r=0;r<t.length;++r)w(Ue.indexOf(t[r])>=0,'invalid option for vao: "'+t[r]+'" valid options are '+Ue)})),w(Array.isArray(o),"attributes must be an array")}w(o.length<l,"too many attributes"),w(o.length>0,"must specify at least one attribute");var h={},f=r.attributes;f.length=o.length;for(var p=0;p<o.length;++p){var d,v=o[p],g=f[p]=new je,m=v.data||v;Array.isArray(m)||n(m)||V(m)?(r.buffers[p]&&(d=r.buffers[p],n(m)&&d._buffer.byteLength>=m.byteLength?d.subdata(m):(d.destroy(),r.buffers[p]=null)),r.buffers[p]||(d=r.buffers[p]=s.create(v,34962,!1,!0)),g.buffer=s.getBuffer(d),g.size=0|g.buffer.dimension,g.normalized=!1,g.type=g.buffer.dtype,g.offset=0,g.stride=0,g.divisor=0,g.state=1,h[p]=1):s.getBuffer(v)?(g.buffer=s.getBuffer(v),g.size=0|g.buffer.dimension,g.normalized=!1,g.type=g.buffer.dtype,g.offset=0,g.stride=0,g.divisor=0,g.state=1):s.getBuffer(v.buffer)?(g.buffer=s.getBuffer(v.buffer),g.size=0|(+v.size||g.buffer.dimension),g.normalized=!!v.normalized||!1,"type"in v?(w.parameter(v.type,X,"invalid buffer type"),g.type=X[v.type]):g.type=g.buffer.dtype,g.offset=0|(v.offset||0),g.stride=0|(v.stride||0),g.divisor=0|(v.divisor||0),g.state=1,w(g.size>=1&&g.size<=4,"size must be between 1 and 4"),w(g.offset>=0,"invalid offset"),w(g.stride>=0&&g.stride<=255,"stride must be between 0 and 255"),w(g.divisor>=0,"divisor must be positive"),w(!g.divisor||!!t.angle_instanced_arrays,"ANGLE_instanced_arrays must be enabled to use divisor")):"x"in v?(w(p>0,"first attribute must not be a constant"),g.x=+v.x||0,g.y=+v.y||0,g.z=+v.z||0,g.w=+v.w||0,g.state=2):w(!1,"invalid attribute spec for location "+p)}for(var y=0;y<r.buffers.length;++y)!h[y]&&r.buffers[y]&&(r.buffers[y].destroy(),r.buffers[y]=null);return r.refresh(),i}return o.vaoCount+=1,i.destroy=function(){for(var e=0;e<r.buffers.length;++e)r.buffers[e]&&r.buffers[e].destroy();r.buffers.length=0,r.ownsElements&&(r.elements.destroy(),r.elements=null,r.ownsElements=!1),r.destroy()},i._vao=r,i._reglType="vao",i(e)},getVAO:function(e){return"function"==typeof e&&e._vao?e._vao:null},destroyBuffer:function(t){for(var r=0;r<h.length;++r){var n=h[r];n.buffer===t&&(e.disableVertexAttribArray(r),n.buffer=null)}},setVAO:g()?function(e){if(e!==v.currentVAO){var t=g();e?t.bindVertexArrayOES(e.vao):t.bindVertexArrayOES(null),v.currentVAO=e}}:function(t){if(t!==v.currentVAO){if(t)t.bindAttrs();else{for(var r=m(),n=0;n<h.length;++n){var i=h[n];i.buffer?(e.enableVertexAttribArray(n),i.buffer.bind(),e.vertexAttribPointer(n,i.size,i.type,i.normalized,i.stride,i.offfset),r&&i.divisor&&r.vertexAttribDivisorANGLE(n,i.divisor)):(e.disableVertexAttribArray(n),e.vertexAttrib4f(n,i.x,i.y,i.z,i.w))}c.elements?e.bindBuffer(34963,c.elements.buffer.buffer):e.bindBuffer(34963,null)}v.currentVAO=t}},clear:g()?function(){G(d).forEach((function(e){e.destroy()}))}:function(){}};function g(){return t.oes_vertex_array_object}function m(){var n=t.angle_instanced_arrays;return r(e)&&(n.vertexAttribDivisorANGLE=e.vertexAttribDivisor),n}function y(){this.id=++p,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var e=g();this.vao=e?e.createVertexArrayOES():null,d[this.id]=this,this.buffers=[]}return y.prototype.bindAttrs=function(){for(var t=m(),r=this.attributes,n=0;n<r.length;++n){var i=r[n];i.buffer?(e.enableVertexAttribArray(n),e.bindBuffer(34962,i.buffer.buffer),e.vertexAttribPointer(n,i.size,i.type,i.normalized,i.stride,i.offset),t&&i.divisor&&t.vertexAttribDivisorANGLE(n,i.divisor)):(e.disableVertexAttribArray(n),e.vertexAttrib4f(n,i.x,i.y,i.z,i.w))}for(var a=r.length;a<l;++a)e.disableVertexAttribArray(a);var o=u.getElements(this.elements);o?e.bindBuffer(34963,o.buffer.buffer):e.bindBuffer(34963,null)},y.prototype.refresh=function(){var e=g();e&&(e.bindVertexArrayOES(this.vao),this.bindAttrs(),v.currentVAO=null,e.bindVertexArrayOES(null))},y.prototype.destroy=function(){if(this.vao){var e=g();this===v.currentVAO&&(v.currentVAO=null,e.bindVertexArrayOES(null)),e.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),d[this.id]&&(delete d[this.id],o.vaoCount-=1)},v}(o,d,x,p,S,E,b),T=function(e,t,r,n){var a={},o={};function s(e,t,r,n){this.name=e,this.id=t,this.location=r,this.info=n}function u(e,t){for(var r=0;r<e.length;++r)if(e[r].id===t.id)return void(e[r].location=t.location);e.push(t)}function c(r,n,i){var s=35632===r?a:o,u=s[n];if(!u){var c=t.str(n);u=e.createShader(r),e.shaderSource(u,c),e.compileShader(u),w.shaderError(e,u,c,r,i),s[n]=u}return u}var l={},h=[],f=0;function p(e,t){this.id=f++,this.fragId=e,this.vertId=t,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,n.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function d(r,i,a){var o,l,h=c(35632,r.fragId),f=c(35633,r.vertId),p=r.program=e.createProgram();if(e.attachShader(p,h),e.attachShader(p,f),a)for(o=0;o<a.length;++o){var d=a[o];e.bindAttribLocation(p,d[0],d[1])}e.linkProgram(p),w.linkError(e,p,t.str(r.fragId),t.str(r.vertId),i);var v=e.getProgramParameter(p,35718);n.profile&&(r.stats.uniformsCount=v);var g=r.uniforms;for(o=0;o<v;++o)if(l=e.getActiveUniform(p,o))if(l.size>1)for(var m=0;m<l.size;++m){var y=l.name.replace("[0]","["+m+"]");u(g,new s(y,t.id(y),e.getUniformLocation(p,y),l))}else u(g,new s(l.name,t.id(l.name),e.getUniformLocation(p,l.name),l));var _=e.getProgramParameter(p,35721);n.profile&&(r.stats.attributesCount=_);var b=r.attributes;for(o=0;o<_;++o)(l=e.getActiveAttrib(p,o))&&u(b,new s(l.name,t.id(l.name),e.getAttribLocation(p,l.name),l))}return n.profile&&(r.getMaxUniformsCount=function(){var e=0;return h.forEach((function(t){t.stats.uniformsCount>e&&(e=t.stats.uniformsCount)})),e},r.getMaxAttributesCount=function(){var e=0;return h.forEach((function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)})),e}),{clear:function(){var t=e.deleteShader.bind(e);G(a).forEach(t),a={},G(o).forEach(t),o={},h.forEach((function(t){e.deleteProgram(t.program)})),h.length=0,l={},r.shaderCount=0},program:function(t,n,s,u){w.command(t>=0,"missing vertex shader",s),w.command(n>=0,"missing fragment shader",s);var c=l[n];c||(c=l[n]={});var f=c[t];if(f&&(f.refCount++,!u))return f;var v=new p(n,t);return r.shaderCount++,d(v,s,u),f||(c[t]=v),h.push(v),i(v,{destroy:function(){if(v.refCount--,v.refCount<=0){e.deleteProgram(v.program);var t=h.indexOf(v);h.splice(t,1),r.shaderCount--}c[v.vertId].refCount<=0&&(e.deleteShader(o[v.vertId]),delete o[v.vertId],delete l[v.fragId][v.vertId]),Object.keys(l[v.fragId]).length||(e.deleteShader(a[v.fragId]),delete a[v.fragId],delete l[v.fragId])}})},restore:function(){a={},o={};for(var e=0;e<h.length;++e)d(h[e],null,h[e].attributes.map((function(e){return[e.location,e.name]})))},shader:c,frag:-1,vert:-1}}(o,f,p,t),C=Oe(o,d,x,(function(){P.procs.poll()}),_,p,t),k=function(e,t,r,n,i){var o={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(o.srgba=35907),t.ext_color_buffer_half_float&&(o.rgba16f=34842,o.rgb16f=34843),t.webgl_color_buffer_float&&(o.rgba32f=34836);var s=[];Object.keys(o).forEach((function(e){var t=o[e];s[t]=e}));var u=0,c={};function l(e){this.id=u++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.width=0,this.height=0,i.profile&&(this.stats={size:0})}function h(t){var r=t.renderbuffer;w(r,"must not double destroy renderbuffer"),e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete c[t.id],n.renderbufferCount--}return l.prototype.decRef=function(){--this.refCount<=0&&h(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(c).forEach((function(t){e+=c[t].stats.size})),e}),{create:function(t,u){var h=new l(e.createRenderbuffer());function f(t,n){var u=0,c=0,l=32854;if("object"===a(t)&&t){var p=t;if("shape"in p){var d=p.shape;w(Array.isArray(d)&&d.length>=2,"invalid renderbuffer shape"),u=0|d[0],c=0|d[1]}else"radius"in p&&(u=c=0|p.radius),"width"in p&&(u=0|p.width),"height"in p&&(c=0|p.height);"format"in p&&(w.parameter(p.format,o,"invalid renderbuffer format"),l=o[p.format])}else"number"==typeof t?(u=0|t,c="number"==typeof n?0|n:u):t?w.raise("invalid arguments to renderbuffer constructor"):u=c=1;if(w(u>0&&c>0&&u<=r.maxRenderbufferSize&&c<=r.maxRenderbufferSize,"invalid renderbuffer size"),u!==h.width||c!==h.height||l!==h.format)return f.width=h.width=u,f.height=h.height=c,h.format=l,e.bindRenderbuffer(36161,h.renderbuffer),e.renderbufferStorage(36161,l,u,c),w(0===e.getError(),"invalid render buffer format"),i.profile&&(h.stats.size=Le(h.format,h.width,h.height)),f.format=s[h.format],f}return c[h.id]=h,n.renderbufferCount++,f(t,u),f.resize=function(t,n){var a=0|t,o=0|n||a;return a===h.width&&o===h.height||(w(a>0&&o>0&&a<=r.maxRenderbufferSize&&o<=r.maxRenderbufferSize,"invalid renderbuffer size"),f.width=h.width=a,f.height=h.height=o,e.bindRenderbuffer(36161,h.renderbuffer),e.renderbufferStorage(36161,h.format,a,o),w(0===e.getError(),"invalid render buffer format"),i.profile&&(h.stats.size=Le(h.format,h.width,h.height))),f},f._reglType="renderbuffer",f._renderbuffer=h,i.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){G(c).forEach(h)},restore:function(){G(c).forEach((function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)})),e.bindRenderbuffer(36161,null)}}}(o,d,x,p,t),M=function(e,t,r,n,o,s){var u={cur:null,next:null,dirty:!1,setFBO:null},c=["rgba"],l=["rgba4","rgb565","rgb5 a1"];t.ext_srgb&&l.push("srgba"),t.ext_color_buffer_half_float&&l.push("rgba16f","rgb16f"),t.webgl_color_buffer_float&&l.push("rgba32f");var h=["uint8"];function f(e,t,r){this.target=e,this.texture=t,this.renderbuffer=r;var n=0,i=0;t?(n=t.width,i=t.height):r&&(n=r.width,i=r.height),this.width=n,this.height=i}function p(e){e&&(e.texture&&e.texture._texture.decRef(),e.renderbuffer&&e.renderbuffer._renderbuffer.decRef())}function d(e,t,r){if(e)if(e.texture){var n=e.texture._texture,i=Math.max(1,n.width),a=Math.max(1,n.height);w(i===t&&a===r,"inconsistent width/height for supplied texture"),n.refCount+=1}else{var o=e.renderbuffer._renderbuffer;w(o.width===t&&o.height===r,"inconsistent width/height for renderbuffer"),o.refCount+=1}}function v(t,r){r&&(r.texture?e.framebufferTexture2D(36160,t,r.target,r.texture._texture.texture,0):e.framebufferRenderbuffer(36160,t,36161,r.renderbuffer._renderbuffer.renderbuffer))}function g(e){var t=3553,r=null,n=null,i=e;"object"===a(e)&&(i=e.data,"target"in e&&(t=0|e.target)),w.type(i,"function","invalid attachment data");var o=i._reglType;return"texture2d"===o?(r=i,w(3553===t)):"textureCube"===o?(r=i,w(t>=34069&&t<34075,"invalid cube map target")):"renderbuffer"===o?(n=i,t=36161):w.raise("invalid regl object for attachment"),new f(t,r,n)}function m(e,t,r,i,a){if(r){var s=n.create2D({width:e,height:t,format:i,type:a});return s._texture.refCount=0,new f(3553,s,null)}var u=o.create({width:e,height:t,format:i});return u._renderbuffer.refCount=0,new f(36161,null,u)}function y(e){return e&&(e.texture||e.renderbuffer)}function _(e,t,r){e&&(e.texture?e.texture.resize(t,r):e.renderbuffer&&e.renderbuffer.resize(t,r),e.width=t,e.height=r)}t.oes_texture_half_float&&h.push("half float","float16"),t.oes_texture_float&&h.push("float","float32");var b=0,x={};function S(){this.id=b++,x[this.id]=this,this.framebuffer=e.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function E(e){e.colorAttachments.forEach(p),p(e.depthAttachment),p(e.stencilAttachment),p(e.depthStencilAttachment)}function A(t){var r=t.framebuffer;w(r,"must not double destroy framebuffer"),e.deleteFramebuffer(r),t.framebuffer=null,s.framebufferCount--,delete x[t.id]}function T(t){var n;e.bindFramebuffer(36160,t.framebuffer);var i=t.colorAttachments;for(n=0;n<i.length;++n)v(36064+n,i[n]);for(n=i.length;n<r.maxColorAttachments;++n)e.framebufferTexture2D(36160,36064+n,3553,null,0);e.framebufferTexture2D(36160,33306,3553,null,0),e.framebufferTexture2D(36160,36096,3553,null,0),e.framebufferTexture2D(36160,36128,3553,null,0),v(36096,t.depthAttachment),v(36128,t.stencilAttachment),v(33306,t.depthStencilAttachment);var a=e.checkFramebufferStatus(36160);e.isContextLost()||36053===a||w.raise("framebuffer configuration not supported, status = "+Be[a]),e.bindFramebuffer(36160,u.next?u.next.framebuffer:null),u.cur=u.next,e.getError()}function C(e,n){var a=new S;function o(e,n){var i;w(u.next!==a,"can not update framebuffer which is currently in use");var s=0,f=0,p=!0,v=!0,_=null,b=!0,x="rgba",S="uint8",A=1,C=null,k=null,M=null,P=!1;if("number"==typeof e)s=0|e,f=0|n||s;else if(e){w.type(e,"object","invalid arguments for framebuffer");var I=e;if("shape"in I){var O=I.shape;w(Array.isArray(O)&&O.length>=2,"invalid shape for framebuffer"),s=O[0],f=O[1]}else"radius"in I&&(s=f=I.radius),"width"in I&&(s=I.width),"height"in I&&(f=I.height);("color"in I||"colors"in I)&&(_=I.color||I.colors,Array.isArray(_)&&w(1===_.length||t.webgl_draw_buffers,"multiple render targets not supported")),_||("colorCount"in I&&(A=0|I.colorCount,w(A>0,"invalid color buffer count")),"colorTexture"in I&&(b=!!I.colorTexture,x="rgba4"),"colorType"in I&&(S=I.colorType,b?(w(t.oes_texture_float||!("float"===S||"float32"===S),"you must enable OES_texture_float in order to use floating point framebuffer objects"),w(t.oes_texture_half_float||!("half float"===S||"float16"===S),"you must enable OES_texture_half_float in order to use 16-bit floating point framebuffer objects")):"half float"===S||"float16"===S?(w(t.ext_color_buffer_half_float,"you must enable EXT_color_buffer_half_float to use 16-bit render buffers"),x="rgba16f"):"float"!==S&&"float32"!==S||(w(t.webgl_color_buffer_float,"you must enable WEBGL_color_buffer_float in order to use 32-bit floating point renderbuffers"),x="rgba32f"),w.oneOf(S,h,"invalid color type")),"colorFormat"in I&&(x=I.colorFormat,c.indexOf(x)>=0?b=!0:l.indexOf(x)>=0?b=!1:w.optional((function(){b?w.oneOf(I.colorFormat,c,"invalid color format for texture"):w.oneOf(I.colorFormat,l,"invalid color format for renderbuffer")})))),("depthTexture"in I||"depthStencilTexture"in I)&&(P=!(!I.depthTexture&&!I.depthStencilTexture),w(!P||t.webgl_depth_texture,"webgl_depth_texture extension not supported")),"depth"in I&&("boolean"==typeof I.depth?p=I.depth:(C=I.depth,v=!1)),"stencil"in I&&("boolean"==typeof I.stencil?v=I.stencil:(k=I.stencil,p=!1)),"depthStencil"in I&&("boolean"==typeof I.depthStencil?p=v=I.depthStencil:(M=I.depthStencil,p=!1,v=!1))}else s=f=1;var R=null,L=null,N=null,D=null;if(Array.isArray(_))R=_.map(g);else if(_)R=[g(_)];else for(R=new Array(A),i=0;i<A;++i)R[i]=m(s,f,b,x,S);w(t.webgl_draw_buffers||R.length<=1,"you must enable the WEBGL_draw_buffers extension in order to use multiple color buffers."),w(R.length<=r.maxColorAttachments,"too many color attachments, not supported"),s=s||R[0].width,f=f||R[0].height,C?L=g(C):p&&!v&&(L=m(s,f,P,"depth","uint32")),k?N=g(k):v&&!p&&(N=m(s,f,!1,"stencil","uint8")),M?D=g(M):!C&&!k&&v&&p&&(D=m(s,f,P,"depth stencil","depth stencil")),w(!!C+!!k+!!M<=1,"invalid framebuffer configuration, can specify exactly one depth/stencil attachment");var F=null;for(i=0;i<R.length;++i)if(d(R[i],s,f),w(!R[i]||R[i].texture&&Ne.indexOf(R[i].texture._texture.format)>=0||R[i].renderbuffer&&ze.indexOf(R[i].renderbuffer._renderbuffer.format)>=0,"framebuffer color attachment "+i+" is invalid"),R[i]&&R[i].texture){var z=De[R[i].texture._texture.format]*Fe[R[i].texture._texture.type];null===F?F=z:w(F===z,"all color attachments much have the same number of bits per pixel.")}return d(L,s,f),w(!L||L.texture&&6402===L.texture._texture.format||L.renderbuffer&&33189===L.renderbuffer._renderbuffer.format,"invalid depth attachment for framebuffer object"),d(N,s,f),w(!N||N.renderbuffer&&36168===N.renderbuffer._renderbuffer.format,"invalid stencil attachment for framebuffer object"),d(D,s,f),w(!D||D.texture&&34041===D.texture._texture.format||D.renderbuffer&&34041===D.renderbuffer._renderbuffer.format,"invalid depth-stencil attachment for framebuffer object"),E(a),a.width=s,a.height=f,a.colorAttachments=R,a.depthAttachment=L,a.stencilAttachment=N,a.depthStencilAttachment=D,o.color=R.map(y),o.depth=y(L),o.stencil=y(N),o.depthStencil=y(D),o.width=a.width,o.height=a.height,T(a),o}return s.framebufferCount++,o(e,n),i(o,{resize:function(e,t){w(u.next!==a,"can not resize a framebuffer which is currently in use");var r=Math.max(0|e,1),n=Math.max(0|t||r,1);if(r===a.width&&n===a.height)return o;for(var i=a.colorAttachments,s=0;s<i.length;++s)_(i[s],r,n);return _(a.depthAttachment,r,n),_(a.stencilAttachment,r,n),_(a.depthStencilAttachment,r,n),a.width=o.width=r,a.height=o.height=n,T(a),o},_reglType:"framebuffer",_framebuffer:a,destroy:function(){A(a),E(a)},use:function(e){u.setFBO({framebuffer:o},e)}})}return i(u,{getFramebuffer:function(e){if("function"==typeof e&&"framebuffer"===e._reglType){var t=e._framebuffer;if(t instanceof S)return t}return null},create:C,createCube:function(e){var a=Array(6);function o(e){var r;w(a.indexOf(u.next)<0,"can not update framebuffer which is currently in use");var s,l={color:null},f=0,p=null,d="rgba",v="uint8",g=1;if("number"==typeof e)f=0|e;else if(e){w.type(e,"object","invalid arguments for framebuffer");var m=e;if("shape"in m){var y=m.shape;w(Array.isArray(y)&&y.length>=2,"invalid shape for framebuffer"),w(y[0]===y[1],"cube framebuffer must be square"),f=y[0]}else"radius"in m&&(f=0|m.radius),"width"in m?(f=0|m.width,"height"in m&&w(m.height===f,"must be square")):"height"in m&&(f=0|m.height);("color"in m||"colors"in m)&&(p=m.color||m.colors,Array.isArray(p)&&w(1===p.length||t.webgl_draw_buffers,"multiple render targets not supported")),p||("colorCount"in m&&(g=0|m.colorCount,w(g>0,"invalid color buffer count")),"colorType"in m&&(w.oneOf(m.colorType,h,"invalid color type"),v=m.colorType),"colorFormat"in m&&(d=m.colorFormat,w.oneOf(m.colorFormat,c,"invalid color format for texture"))),"depth"in m&&(l.depth=m.depth),"stencil"in m&&(l.stencil=m.stencil),"depthStencil"in m&&(l.depthStencil=m.depthStencil)}else f=1;if(p)if(Array.isArray(p))for(s=[],r=0;r<p.length;++r)s[r]=p[r];else s=[p];else{s=Array(g);var _={radius:f,format:d,type:v};for(r=0;r<g;++r)s[r]=n.createCube(_)}for(l.color=Array(s.length),r=0;r<s.length;++r){var b=s[r];w("function"==typeof b&&"textureCube"===b._reglType,"invalid cube map"),f=f||b.width,w(b.width===f&&b.height===f,"invalid cube map shape"),l.color[r]={target:34069,data:s[r]}}for(r=0;r<6;++r){for(var x=0;x<s.length;++x)l.color[x].target=34069+r;r>0&&(l.depth=a[0].depth,l.stencil=a[0].stencil,l.depthStencil=a[0].depthStencil),a[r]?a[r](l):a[r]=C(l)}return i(o,{width:f,height:f,color:s})}return o(e),i(o,{faces:a,resize:function(e){var t,n=0|e;if(w(n>0&&n<=r.maxCubeMapSize,"invalid radius for cube fbo"),n===o.width)return o;var i=o.color;for(t=0;t<i.length;++t)i[t].resize(n);for(t=0;t<6;++t)a[t].resize(n);return o.width=o.height=n,o},_reglType:"framebufferCube",destroy:function(){a.forEach((function(e){e.destroy()}))}})},clear:function(){G(x).forEach(A)},restore:function(){u.cur=null,u.next=null,u.dirty=!0,G(x).forEach((function(t){t.framebuffer=e.createFramebuffer(),T(t)}))}})}(o,d,x,C,k,p),P=yt(o,f,d,x,S,E,0,M,{},A,T,b,_,v,t),L=Ve(o,M,P.procs.poll,_,s,d,x),N=P.next,z=o.canvas,B=[],U=[],H=[],W=[t.onDestroy],Y=null;function re(){if(0===B.length)return v&&v.update(),void(Y=null);Y=O.next(re),pe();for(var e=B.length-1;e>=0;--e){var t=B[e];t&&t(_,null,0)}o.flush(),v&&v.update()}function ne(){!Y&&B.length>0&&(Y=O.next(re))}function ie(){Y&&(O.cancel(re),Y=null)}function ae(e){e.preventDefault(),u=!0,ie(),U.forEach((function(e){e()}))}function oe(e){o.getError(),u=!1,c.restore(),T.restore(),S.restore(),C.restore(),k.restore(),M.restore(),A.restore(),v&&v.restore(),P.procs.refresh(),ne(),H.forEach((function(e){e()}))}var se="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM;function ue(e){function t(e,t){var r={},n={};return Object.keys(e).forEach((function(i){var a=e[i];if(I.isDynamic(a))n[i]=I.unbox(a,i);else{if(t&&Array.isArray(a))for(var o=0;o<a.length;++o)if(I.isDynamic(a[o]))return void(n[i]=I.unbox(a,i));r[i]=a}})),{dynamic:n,static:r}}w(!!e,"invalid args to regl({...})"),w.type(e,"object","invalid args to regl({...})");var r=t(e.context||{},!0),n=t(e.uniforms||{},!0),a=t(e.attributes||{},!1),o=t(function(e){var t=i({},e);function r(e){if(e in t){var r=t[e];delete t[e],Object.keys(r).forEach((function(n){t[e+"."+n]=r[n]}))}}return delete t.uniforms,delete t.attributes,delete t.context,delete t.vao,"stencil"in t&&t.stencil.op&&(t.stencil.opBack=t.stencil.opFront=t.stencil.op,delete t.stencil.op),r("blend"),r("depth"),r("cull"),r("stencil"),r("polygonOffset"),r("scissor"),r("sample"),"vao"in e&&(t.vao=e.vao),t}(e),!1),s={gpuTime:0,cpuTime:0,count:0},c=P.compile(o,a,n,r,s),l=c.draw,h=c.batch,f=c.scope,p=[];return i((function(e,t){var r;if(u&&w.raise("context lost"),"function"==typeof e)return f.call(this,null,e,0);if("function"==typeof t)if("number"==typeof e)for(r=0;r<e;++r)f.call(this,null,t,r);else{if(!Array.isArray(e))return f.call(this,e,t,0);for(r=0;r<e.length;++r)f.call(this,e[r],t,r)}else if("number"==typeof e){if(e>0)return h.call(this,function(e){for(;p.length<e;)p.push(null);return p}(0|e),0|e)}else{if(!Array.isArray(e))return l.call(this,e);if(e.length)return h.call(this,e,e.length)}}),{stats:s,destroy:function(){c.destroy()}})}!se&&z&&(z.addEventListener("webglcontextlost",ae,!1),z.addEventListener("webglcontextrestored",oe,!1));var ce=M.setFBO=ue({framebuffer:I.define.call(null,1,"framebuffer")});function le(e,t){var r=0;P.procs.poll();var n=t.color;n&&(o.clearColor(+n[0]||0,+n[1]||0,+n[2]||0,+n[3]||0),r|=16384),"depth"in t&&(o.clearDepth(+t.depth),r|=256),"stencil"in t&&(o.clearStencil(0|t.stencil),r|=1024),w(!!r,"called regl.clear with no buffer specified"),o.clear(r)}function he(e){return w.type(e,"function","regl.frame() callback must be a function"),B.push(e),ne(),{cancel:function(){var t=bt(B,e);w(t>=0,"cannot cancel a frame twice"),B[t]=function e(){var t=bt(B,e);B[t]=B[B.length-1],B.length-=1,B.length<=0&&ie()}}}}function fe(){var e=N.viewport,t=N.scissor_box;e[0]=e[1]=t[0]=t[1]=0,_.viewportWidth=_.framebufferWidth=_.drawingBufferWidth=e[2]=t[2]=o.drawingBufferWidth,_.viewportHeight=_.framebufferHeight=_.drawingBufferHeight=e[3]=t[3]=o.drawingBufferHeight}function pe(){_.tick+=1,_.time=ve(),fe(),P.procs.poll()}function de(){C.refresh(),fe(),P.procs.refresh(),v&&v.update()}function ve(){return(R()-g)/1e3}de();var ge=i(ue,{clear:function(e){if(w("object"===a(e)&&e,"regl.clear() takes an object as input"),"framebuffer"in e)if(e.framebuffer&&"framebufferCube"===e.framebuffer_reglType)for(var t=0;t<6;++t)ce(i({framebuffer:e.framebuffer.faces[t]},e),le);else ce(e,le);else le(0,e)},prop:I.define.bind(null,1),context:I.define.bind(null,2),this:I.define.bind(null,3),draw:ue({}),buffer:function(e){return S.create(e,34962,!1,!1)},elements:function(e){return E.create(e,!1)},texture:C.create2D,cube:C.createCube,renderbuffer:k.create,framebuffer:M.create,framebufferCube:M.createCube,vao:A.createVAO,attributes:s,frame:he,on:function(e,t){var r;switch(w.type(t,"function","listener callback must be a function"),e){case"frame":return he(t);case"lost":r=U;break;case"restore":r=H;break;case"destroy":r=W;break;default:w.raise("invalid event, must be one of frame,lost,restore,destroy")}return r.push(t),{cancel:function(){for(var e=0;e<r.length;++e)if(r[e]===t)return r[e]=r[r.length-1],void r.pop()}}},limits:x,hasExtension:function(e){return x.extensions.indexOf(e.toLowerCase())>=0},read:L,destroy:function(){B.length=0,ie(),!se&&z&&(z.removeEventListener("webglcontextlost",ae),z.removeEventListener("webglcontextrestored",oe)),T.clear(),M.clear(),k.clear(),A.clear(),C.clear(),E.clear(),S.clear(),v&&v.clear(),W.forEach((function(e){e()}))},_gl:o,_refresh:de,_textureState:C,_refreshTexture:C.refresh,poll:function(){pe(),v&&v.update()},now:ve,stats:p});return t.onDone(null,ge),ge}}(N$)})),F$=function(){function e(t,r){u(this,e),h(this,"attribute",void 0),h(this,"buffer",void 0);var n=r.buffer,i=r.offset,a=r.stride,o=r.normalized,s=r.size,c=r.divisor;this.buffer=n,this.attribute={buffer:n.get(),offset:i||0,stride:a||0,normalized:o||!1,divisor:c||0},s&&(this.attribute.size=s)}return l(e,[{key:"get",value:function(){return this.attribute}},{key:"updateBuffer",value:function(e){this.buffer.subData(e)}},{key:"destroy",value:function(){this.buffer.destroy()}}]),e}(),z$=(h(b$={},rO.POINTS,"points"),h(b$,rO.LINES,"lines"),h(b$,rO.LINE_LOOP,"line loop"),h(b$,rO.LINE_STRIP,"line strip"),h(b$,rO.TRIANGLES,"triangles"),h(b$,rO.TRIANGLE_FAN,"triangle fan"),h(b$,rO.TRIANGLE_STRIP,"triangle strip"),b$),B$=(h(x$={},rO.STATIC_DRAW,"static"),h(x$,rO.DYNAMIC_DRAW,"dynamic"),h(x$,rO.STREAM_DRAW,"stream"),x$),U$=(h(S$={},rO.BYTE,"int8"),h(S$,rO.UNSIGNED_INT,"int16"),h(S$,rO.INT,"int32"),h(S$,rO.UNSIGNED_BYTE,"uint8"),h(S$,rO.UNSIGNED_SHORT,"uint16"),h(S$,rO.UNSIGNED_INT,"uint32"),h(S$,rO.FLOAT,"float"),S$),j$=(h(E$={},rO.ALPHA,"alpha"),h(E$,rO.LUMINANCE,"luminance"),h(E$,rO.LUMINANCE_ALPHA,"luminance alpha"),h(E$,rO.RGB,"rgb"),h(E$,rO.RGBA,"rgba"),h(E$,rO.RGBA4,"rgba4"),h(E$,rO.RGB5_A1,"rgb5 a1"),h(E$,rO.RGB565,"rgb565"),h(E$,rO.DEPTH_COMPONENT,"depth"),h(E$,rO.DEPTH_STENCIL,"depth stencil"),E$),V$=(h(A$={},rO.DONT_CARE,"dont care"),h(A$,rO.NICEST,"nice"),h(A$,rO.FASTEST,"fast"),A$),G$=(h(T$={},rO.NEAREST,"nearest"),h(T$,rO.LINEAR,"linear"),h(T$,rO.LINEAR_MIPMAP_LINEAR,"mipmap"),h(T$,rO.NEAREST_MIPMAP_LINEAR,"nearest mipmap linear"),h(T$,rO.LINEAR_MIPMAP_NEAREST,"linear mipmap nearest"),h(T$,rO.NEAREST_MIPMAP_NEAREST,"nearest mipmap nearest"),T$),H$=(h(w$={},rO.REPEAT,"repeat"),h(w$,rO.CLAMP_TO_EDGE,"clamp"),h(w$,rO.MIRRORED_REPEAT,"mirror"),w$),W$=(h(C$={},rO.NONE,"none"),h(C$,rO.BROWSER_DEFAULT_WEBGL,"browser"),C$),Y$=(h(k$={},rO.NEVER,"never"),h(k$,rO.ALWAYS,"always"),h(k$,rO.LESS,"less"),h(k$,rO.LEQUAL,"lequal"),h(k$,rO.GREATER,"greater"),h(k$,rO.GEQUAL,"gequal"),h(k$,rO.EQUAL,"equal"),h(k$,rO.NOTEQUAL,"notequal"),k$),X$=(h(M$={},rO.FUNC_ADD,"add"),h(M$,rO.MIN_EXT,"min"),h(M$,rO.MAX_EXT,"max"),h(M$,rO.FUNC_SUBTRACT,"subtract"),h(M$,rO.FUNC_REVERSE_SUBTRACT,"reverse subtract"),M$),Z$=(h(P$={},rO.ZERO,"zero"),h(P$,rO.ONE,"one"),h(P$,rO.SRC_COLOR,"src color"),h(P$,rO.ONE_MINUS_SRC_COLOR,"one minus src color"),h(P$,rO.SRC_ALPHA,"src alpha"),h(P$,rO.ONE_MINUS_SRC_ALPHA,"one minus src alpha"),h(P$,rO.DST_COLOR,"dst color"),h(P$,rO.ONE_MINUS_DST_COLOR,"one minus dst color"),h(P$,rO.DST_ALPHA,"dst alpha"),h(P$,rO.ONE_MINUS_DST_ALPHA,"one minus dst alpha"),h(P$,rO.CONSTANT_COLOR,"constant color"),h(P$,rO.ONE_MINUS_CONSTANT_COLOR,"one minus constant color"),h(P$,rO.CONSTANT_ALPHA,"constant alpha"),h(P$,rO.ONE_MINUS_CONSTANT_ALPHA,"one minus constant alpha"),h(P$,rO.SRC_ALPHA_SATURATE,"src alpha saturate"),P$),q$=(h(I$={},rO.NEVER,"never"),h(I$,rO.ALWAYS,"always"),h(I$,rO.LESS,"less"),h(I$,rO.LEQUAL,"lequal"),h(I$,rO.GREATER,"greater"),h(I$,rO.GEQUAL,"gequal"),h(I$,rO.EQUAL,"equal"),h(I$,rO.NOTEQUAL,"notequal"),I$),K$=(h(O$={},rO.ZERO,"zero"),h(O$,rO.KEEP,"keep"),h(O$,rO.REPLACE,"replace"),h(O$,rO.INVERT,"invert"),h(O$,rO.INCR,"increment"),h(O$,rO.DECR,"decrement"),h(O$,rO.INCR_WRAP,"increment wrap"),h(O$,rO.DECR_WRAP,"decrement wrap"),O$),Q$=(h(R$={},rO.FRONT,"front"),h(R$,rO.BACK,"back"),R$),$$=function(){function e(t,r){u(this,e),h(this,"buffer",void 0),h(this,"isDestroyed",!1);var n=r.data,i=r.usage,a=r.type;this.buffer=t.buffer({data:n,usage:B$[i||rO.STATIC_DRAW],type:U$[a||rO.UNSIGNED_BYTE]})}return l(e,[{key:"get",value:function(){return this.buffer}},{key:"destroy",value:function(){this.isDestroyed||this.buffer.destroy(),this.isDestroyed=!0}},{key:"subData",value:function(e){var t=e.data,r=e.offset;this.buffer.subdata(t,r)}}]),e}(),J$=function(){function e(t,r){u(this,e),h(this,"elements",void 0);var n=r.data,i=r.usage,a=r.type,o=r.count;this.elements=t.elements({data:n,usage:B$[i||rO.STATIC_DRAW],type:U$[a||rO.UNSIGNED_BYTE],count:o})}return l(e,[{key:"get",value:function(){return this.elements}},{key:"subData",value:function(e){var t=e.data;this.elements.subdata(t)}},{key:"destroy",value:function(){}}]),e}(),eJ=function(){function e(t,r){u(this,e),h(this,"framebuffer",void 0);var n=r.width,i=r.height,a=r.color,o=r.colors,s={width:n,height:i};Array.isArray(o)&&(s.colors=o.map((function(e){return e.get()}))),a&&"boolean"!=typeof a&&(s.color=a.get()),this.framebuffer=t.framebuffer(s)}return l(e,[{key:"get",value:function(){return this.framebuffer}},{key:"destroy",value:function(){this.framebuffer.destroy()}},{key:"resize",value:function(e){var t=e.width,r=e.height;this.framebuffer.resize(t,r)}}]),e}(),tJ=function(){function e(t,r){u(this,e),h(this,"reGl",void 0),h(this,"destroyed",!1),h(this,"drawCommand",void 0),h(this,"drawParams",void 0),h(this,"options",void 0),h(this,"uniforms",{}),this.reGl=t;var n=r.vs,i=r.fs,a=r.attributes,o=r.uniforms,s=r.primitive,c=r.count,l=r.elements,f=r.depth,p=r.cull,d=r.instances,v={};this.options=r,o&&(this.uniforms=this.extractUniforms(o),Object.keys(o).forEach((function(e){v[e]=t.prop(e)})));var g={};Object.keys(a).forEach((function(e){g[e]=a[e].get()}));var m={attributes:g,frag:i,uniforms:v,vert:n,colorMask:t.prop("colorMask"),lineWidth:1,blend:{enable:t.prop("blend.enable"),func:t.prop("blend.func"),equation:t.prop("blend.equation"),color:t.prop("blend.color")},stencil:{enable:t.prop("stencil.enable"),mask:t.prop("stencil.mask"),func:t.prop("stencil.func"),opFront:t.prop("stencil.opFront"),opBack:t.prop("stencil.opBack")},primitive:z$[void 0===s?rO.TRIANGLES:s]};d&&(m.instances=d),c?m.count=c:l&&(m.elements=l.get()),this.initDepthDrawParams({depth:f},m),this.initCullDrawParams({cull:p},m),this.drawCommand=t(m),this.drawParams=m}return l(e,[{key:"updateAttributesAndElements",value:function(e,t){var r={};Object.keys(e).forEach((function(t){r[t]=e[t].get()})),this.drawParams.attributes=r,this.drawParams.elements=t.get(),this.drawCommand=this.reGl(this.drawParams)}},{key:"updateAttributes",value:function(e){var t={};Object.keys(e).forEach((function(r){t[r]=e[r].get()})),this.drawParams.attributes=t,this.drawCommand=this.reGl(this.drawParams)}},{key:"addUniforms",value:function(e){this.uniforms=n(n({},this.uniforms),this.extractUniforms(e))}},{key:"draw",value:function(e,t){if(!this.drawParams.attributes||0!==Object.keys(this.drawParams.attributes).length){var r=n(n({},this.uniforms),this.extractUniforms(e.uniforms||{})),i={};Object.keys(r).forEach((function(e){var t=a(r[e]);"boolean"===t||"number"===t||Array.isArray(r[e])||r[e].BYTES_PER_ELEMENT?i[e]=r[e]:i[e]=r[e].get()})),i.blend=t?this.getBlendDrawParams({blend:{enable:!1}}):this.getBlendDrawParams(e),i.stencil=this.getStencilDrawParams(e),i.colorMask=this.getColorMaskDrawParams(e,t),this.reGl._refreshTexture(),this.drawCommand(i)}}},{key:"destroy",value:function(){var e,t;null===(e=this.drawParams)||void 0===e||null===(t=e.elements)||void 0===t||t.destroy(),this.options.attributes&&Object.values(this.options.attributes).forEach((function(e){null==e||e.destroy()})),this.destroyed=!0}},{key:"initDepthDrawParams",value:function(e,t){var r=e.depth;r&&(t.depth={enable:void 0===r.enable||!!r.enable,mask:void 0===r.mask||!!r.mask,func:Y$[r.func||rO.LESS],range:r.range||[0,1]})}},{key:"getBlendDrawParams",value:function(e){var t=e.blend||{},r=t.enable,n=t.func,i=t.equation,a=t.color,o=void 0===a?[0,0,0,0]:a;return{enable:!!r,func:{srcRGB:Z$[n&&n.srcRGB||rO.SRC_ALPHA],srcAlpha:Z$[n&&n.srcAlpha||rO.SRC_ALPHA],dstRGB:Z$[n&&n.dstRGB||rO.ONE_MINUS_SRC_ALPHA],dstAlpha:Z$[n&&n.dstAlpha||rO.ONE_MINUS_SRC_ALPHA]},equation:{rgb:X$[i&&i.rgb||rO.FUNC_ADD],alpha:X$[i&&i.alpha||rO.FUNC_ADD]},color:o}}},{key:"getStencilDrawParams",value:function(e){var t=e.stencil||{},r=t.enable,i=t.mask,a=void 0===i?-1:i,o=t.func,s=void 0===o?{cmp:rO.ALWAYS,ref:0,mask:-1}:o,u=t.opFront,c=void 0===u?{fail:rO.KEEP,zfail:rO.KEEP,zpass:rO.KEEP}:u,l=t.opBack,h=void 0===l?{fail:rO.KEEP,zfail:rO.KEEP,zpass:rO.KEEP}:l;return{enable:!!r,mask:a,func:n(n({},s),{},{cmp:q$[s.cmp]}),opFront:{fail:K$[c.fail],zfail:K$[c.zfail],zpass:K$[c.zpass]},opBack:{fail:K$[h.fail],zfail:K$[h.zfail],zpass:K$[h.zpass]}}}},{key:"getColorMaskDrawParams",value:function(e,t){var r=e.stencil;return null!=r&&r.enable&&r.opFront&&!t?[!1,!1,!1,!1]:[!0,!0,!0,!0]}},{key:"initCullDrawParams",value:function(e,t){var r=e.cull;if(r){var n=r.enable,i=r.face,a=void 0===i?rO.BACK:i;t.cull={enable:!!n,face:Q$[a]}}}},{key:"extractUniforms",value:function(e){var t=this,r={};return Object.keys(e).forEach((function(n){t.extractUniformsRecursively(n,e[n],r,"")})),r}},{key:"extractUniformsRecursively",value:function(e,t,r,n){var i=this;null===t||"number"==typeof t||"boolean"==typeof t||Array.isArray(t)&&"number"==typeof t[0]||GM(t)||""===t||"resize"in t?r["".concat(n&&n+".").concat(e)]=t:(zM(t)&&Object.keys(t).forEach((function(a){i.extractUniformsRecursively(a,t[a],r,"".concat(n&&n+".").concat(e))})),Array.isArray(t)&&t.forEach((function(t,a){Object.keys(t).forEach((function(o){i.extractUniformsRecursively(o,t[o],r,"".concat(n&&n+".").concat(e,"[").concat(a,"]"))}))})))}}]),e}(),rJ=function(){function e(t,r){u(this,e),h(this,"texture",void 0),h(this,"width",void 0),h(this,"height",void 0),h(this,"isDestroy",!1);var n=r.data,i=r.type,a=void 0===i?rO.UNSIGNED_BYTE:i,o=r.width,s=r.height,c=r.flipY,l=void 0!==c&&c,f=r.format,p=void 0===f?rO.RGBA:f,d=r.mipmap,v=void 0!==d&&d,g=r.wrapS,m=void 0===g?rO.CLAMP_TO_EDGE:g,y=r.wrapT,_=void 0===y?rO.CLAMP_TO_EDGE:y,b=r.aniso,x=void 0===b?0:b,S=r.alignment,E=void 0===S?1:S,A=r.premultiplyAlpha,T=void 0!==A&&A,w=r.mag,C=void 0===w?rO.NEAREST:w,k=r.min,M=void 0===k?rO.NEAREST:k,P=r.colorSpace,I=void 0===P?rO.BROWSER_DEFAULT_WEBGL:P,O=r.x,R=void 0===O?0:O,L=r.y,N=void 0===L?0:L,D=r.copy,F=void 0!==D&&D;this.width=o,this.height=s;var z={width:o,height:s,type:U$[a],format:j$[p],wrapS:H$[m],wrapT:H$[_],mag:G$[C],min:G$[M],alignment:E,flipY:l,colorSpace:W$[I],premultiplyAlpha:T,aniso:x,x:R,y:N,copy:F};n&&(z.data=n),"number"==typeof v?z.mipmap=V$[v]:"boolean"==typeof v&&(z.mipmap=v),this.texture=t.texture(z)}return l(e,[{key:"get",value:function(){return this.texture}},{key:"update",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.texture(e)}},{key:"bind",value:function(){this.texture._texture.bind()}},{key:"resize",value:function(e){var t=e.width,r=e.height;this.texture.resize(t,r),this.width=t,this.height=r}},{key:"getSize",value:function(){return[this.width,this.height]}},{key:"destroy",value:function(){var e;this.isDestroy||(null===(e=this.texture)||void 0===e||e.destroy());this.isDestroy=!0}}]),e}(),nJ=Me()(L$=function(){function e(){var t=this;u(this,e),h(this,"extensionObject",void 0),h(this,"gl",void 0),h(this,"$container",void 0),h(this,"canvas",void 0),h(this,"width",void 0),h(this,"height",void 0),h(this,"isDirty",void 0),h(this,"createModel",(function(e){return new tJ(t.gl,e)})),h(this,"createAttribute",(function(e){return new F$(t.gl,e)})),h(this,"createBuffer",(function(e){return new $$(t.gl,e)})),h(this,"createElements",(function(e){return new J$(t.gl,e)})),h(this,"createTexture2D",(function(e){return new rJ(t.gl,e)})),h(this,"createFramebuffer",(function(e){return new eJ(t.gl,e)})),h(this,"useFramebuffer",(function(e,r){t.gl({framebuffer:e?e.get():null})(r)})),h(this,"clear",(function(e){var r,n=e.color,i=e.depth,a=e.stencil,o=e.framebuffer,s=void 0===o?null:o,u={color:n,depth:i,stencil:a};u.framebuffer=null===s?s:s.get(),null===(r=t.gl)||void 0===r||r.clear(u)})),h(this,"viewport",(function(e){var r=e.x,n=e.y,i=e.width,a=e.height;t.gl._gl.viewport(r,n,i,a),t.width=i,t.height=a,t.gl._refresh()})),h(this,"readPixels",(function(e){var r=e.framebuffer,n={x:e.x,y:e.y,width:e.width,height:e.height};return r&&(n.framebuffer=r.get()),t.gl.read(n)})),h(this,"getViewportSize",(function(){return{width:t.gl._gl.drawingBufferWidth,height:t.gl._gl.drawingBufferHeight}})),h(this,"getContainer",(function(){return t.canvas})),h(this,"getCanvas",(function(){return t.canvas})),h(this,"getGLContext",(function(){return t.gl._gl})),h(this,"destroy",(function(){var e,r,n;t.canvas=null,null===(e=t.gl)||void 0===e||null===(r=e._gl)||void 0===r||null===(n=r.getExtension("WEBGL_lose_context"))||void 0===n||n.loseContext(),t.gl.destroy(),t.gl=null}))}var t;return l(e,[{key:"init",value:(t=s(i().mark((function e(t,r,n){var a=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.canvas=t,!n){e.next=5;break}this.gl=n,e.next=8;break;case 5:return e.next=7,new Promise((function(e,t){D$({canvas:a.canvas,attributes:{alpha:!0,antialias:r.antialias,premultipliedAlpha:!0,preserveDrawingBuffer:r.preserveDrawingBuffer,stencil:r.stencil},extensions:["OES_element_index_uint","OES_standard_derivatives","ANGLE_instanced_arrays"],optionalExtensions:["oes_texture_float_linear","OES_texture_float","EXT_texture_filter_anisotropic","EXT_blend_minmax","WEBGL_depth_texture","WEBGL_lose_context"],profile:!0,onDone:function(r,n){!r&&n||t(r),e(n)}})}));case 7:this.gl=e.sent;case 8:this.extensionObject={OES_texture_float:this.testExtension("OES_texture_float")};case 9:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"getPointSizeRange",value:function(){return this.gl._gl.getParameter(this.gl._gl.ALIASED_POINT_SIZE_RANGE)}},{key:"testExtension",value:function(e){return!!this.getGLContext().getExtension(e)}},{key:"setState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!0,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setBaseState",value:function(){this.gl({cull:{enable:!1,face:"back"},viewport:{x:0,y:0,height:this.width,width:this.height},blend:{enable:!1,equation:"add"},framebuffer:null}),this.gl._refresh()}},{key:"setCustomLayerDefaults",value:function(){var e=this.getGLContext();e.disable(e.CULL_FACE)}},{key:"setDirty",value:function(e){this.isDirty=e}},{key:"getDirty",value:function(){return this.isDirty}}]),e}())||L$,iJ=["selectstart","selecting","selectend"],aJ=function(e){f(r,e);var t=x(r);function r(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,r),h(_(n=t.call(this)),"scene",void 0),h(_(n),"options",void 0),h(_(n),"isEnable",!1),h(_(n),"box",void 0),h(_(n),"startEvent",void 0),h(_(n),"endEvent",void 0),h(_(n),"onDragStart",(function(e){n.box.style.display="block",n.startEvent=n.endEvent=e,n.syncBoxBound(),n.emit("selectstart",n.getLngLatBox(),n.startEvent,n.endEvent)})),h(_(n),"onDragging",(function(e){n.endEvent=e,n.syncBoxBound(),n.emit("selecting",n.getLngLatBox(),n.startEvent,n.endEvent)})),h(_(n),"onDragEnd",(function(e){n.endEvent=e,n.box.style.display="none",n.emit("selectend",n.getLngLatBox(),n.startEvent,n.endEvent)})),n.scene=e,n.options=i,n}return l(r,[{key:"container",get:function(){return this.scene.getMapService().getMarkerContainer()}},{key:"enable",value:function(){if(!this.isEnable){var e=this.options.className;if(this.scene.setMapStatus({dragEnable:!1}),this.container.style.cursor="crosshair",!this.box){var t=Zy("div",void 0,this.container);t.classList.add("l7-select-box"),e&&t.classList.add(e),t.style.display="none",this.box=t}this.scene.on("dragstart",this.onDragStart),this.scene.on("dragging",this.onDragging),this.scene.on("dragend",this.onDragEnd),this.isEnable=!0}}},{key:"disable",value:function(){this.isEnable&&(this.scene.setMapStatus({dragEnable:!0}),this.container.style.cursor="auto",this.scene.off("dragstart",this.onDragStart),this.scene.off("dragging",this.onDragging),this.scene.off("dragend",this.onDragEnd),this.isEnable=!1)}},{key:"syncBoxBound",value:function(){var e=this.startEvent,t=e.x,r=e.y,n=this.endEvent,i=n.x,a=n.y,o=Math.min(t,i),s=Math.min(r,a),u=Math.abs(t-i),c=Math.abs(r-a);this.box.style.top="".concat(s,"px"),this.box.style.left="".concat(o,"px"),this.box.style.width="".concat(u,"px"),this.box.style.height="".concat(c,"px")}},{key:"getLngLatBox",value:function(){var e=this.startEvent.lngLat,t=e.lng,r=e.lat,n=this.endEvent.lngLat;return PS([[t,r],[n.lng,n.lat]])}}]),r}(F),oJ=function(){function e(t){u(this,e),h(this,"sceneService",void 0),h(this,"mapService",void 0),h(this,"controlService",void 0),h(this,"layerService",void 0),h(this,"debugService",void 0),h(this,"iconService",void 0),h(this,"markerService",void 0),h(this,"popupService",void 0),h(this,"fontService",void 0),h(this,"interactionService",void 0),h(this,"boxSelect",void 0),h(this,"container",void 0);var r=t.id,n=t.map,i=t.canvas,a=t.hasBaseMap,o=_D();this.container=o,n.setContainer(o,r,i,a),o.bind(ba.IRendererService).to(nJ).inSingletonScope(),this.sceneService=o.get(ba.ISceneService),this.mapService=o.get(ba.IMapService),this.iconService=o.get(ba.IIconService),this.fontService=o.get(ba.IFontService),this.controlService=o.get(ba.IControlService),this.layerService=o.get(ba.ILayerService),this.debugService=o.get(ba.IDebugService),this.debugService.setEnable(t.debug),this.markerService=o.get(ba.IMarkerService),this.interactionService=o.get(ba.IInteractionService),this.popupService=o.get(ba.IPopupService),this.boxSelect=new aJ(this,{}),jv((null==t?void 0:t.isMini)||!1),Hv?this.sceneService.initMiniScene(t):(this.initComponent(r),this.sceneService.init(t),this.initControl())}var t,r,a,o,c;return l(e,[{key:"map",get:function(){return this.mapService.map}},{key:"loaded",get:function(){return this.sceneService.loaded}},{key:"getServiceContainer",value:function(){return this.container}},{key:"getSize",value:function(){return this.mapService.getSize()}},{key:"getMinZoom",value:function(){return this.mapService.getMinZoom()}},{key:"getMaxZoom",value:function(){return this.mapService.getMaxZoom()}},{key:"getType",value:function(){return this.mapService.getType()}},{key:"getMapContainer",value:function(){return this.mapService.getMapContainer()}},{key:"getMapCanvasContainer",value:function(){return this.mapService.getMapCanvasContainer()}},{key:"getMapService",value:function(){return this.mapService}},{key:"getDebugService",value:function(){return this.debugService}},{key:"exportPng",value:(c=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.sceneService.exportPng(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"exportMap",value:(o=s(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.sceneService.exportPng(t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"registerRenderService",value:function(e){var t=this;this.sceneService.loaded?new e(this).init():this.on("loaded",(function(){new e(t).init()}))}},{key:"setBgColor",value:function(e){this.mapService.setBgColor(e);var t=this.getMapCanvasContainer().children[0];t&&(t.style.background=e)}},{key:"addLayer",value:function(e){var t=this,r=bD(this.container);if(e.setContainer(r,this.container),this.sceneService.addLayer(e),e.inited){var n=this.initMask(e);this.addMask(n,e.id)}else e.on("inited",(function(){var r=t.initMask(e);t.addMask(r,e.id)}))}},{key:"initMask",value:function(e){var t=e.getLayerConfig(),r=t.mask,n=t.maskfence,i=t.maskColor,a=void 0===i?"#000":i,o=t.maskOpacity,s=void 0===o?0:o;if(r&&n)return(new nW).source(n).shape("fill").style({color:a,opacity:s})}},{key:"addMask",value:function(e,t){if(e){var r=this.getLayer(t);if(r){var n=bD(this.container);e.setContainer(n,this.container),r.addMaskLayer(e),this.sceneService.addMask(e)}else console.warn("parent layer not find!")}}},{key:"getPickedLayer",value:function(){return this.layerService.pickedLayerId}},{key:"getLayers",value:function(){return this.layerService.getLayers()}},{key:"getLayer",value:function(e){return this.layerService.getLayer(e)}},{key:"getLayerByName",value:function(e){return this.layerService.getLayerByName(e)}},{key:"removeLayer",value:(a=s(i().mark((function e(t,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layerService.remove(t,r);case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removeAllLayer",value:(r=s(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.layerService.removeAllLayers();case 2:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"render",value:function(){this.sceneService.render()}},{key:"setEnableRender",value:function(e){this.layerService.setEnableRender(e)}},{key:"addIconFont",value:function(e,t){this.fontService.addIconFont(e,t)}},{key:"addIconFonts",value:function(e){var t=this;e.forEach((function(e){var r=A(e,2),n=r[0],i=r[1];t.fontService.addIconFont(n,i)}))}},{key:"addFontFace",value:function(e,t){var r=this;this.fontService.once("fontloaded",(function(e){r.emit("fontloaded",e)})),this.fontService.addFontFace(e,t)}},{key:"addImage",value:(t=s(i().mark((function e(t,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Hv){e.next=5;break}return e.next=3,this.iconService.addImage(t,r);case 3:e.next=6;break;case 5:this.iconService.addImageMini(t,r,this.sceneService);case 6:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})},{key:"hasImage",value:function(e){return this.iconService.hasImage(e)}},{key:"removeImage",value:function(e){this.iconService.removeImage(e)}},{key:"addIconFontGlyphs",value:function(e,t){this.fontService.addIconGlyphs(t)}},{key:"addControl",value:function(e){this.controlService.addControl(e,this.container)}},{key:"removeControl",value:function(e){this.controlService.removeControl(e)}},{key:"getControlByName",value:function(e){return this.controlService.getControlByName(e)}},{key:"addMarker",value:function(e){this.markerService.addMarker(e)}},{key:"addMarkerLayer",value:function(e){this.markerService.addMarkerLayer(e)}},{key:"removeMarkerLayer",value:function(e){this.markerService.removeMarkerLayer(e)}},{key:"removeAllMarkers",value:function(){this.markerService.removeAllMarkers()}},{key:"removeAllMakers",value:function(){console.warn("removeAllMakers 已废弃,请使用 removeAllMarkers"),this.markerService.removeAllMarkers()}},{key:"addPopup",value:function(e){this.popupService.addPopup(e)}},{key:"removePopup",value:function(e){this.popupService.removePopup(e)}},{key:"on",value:function(e,t){var r;iJ.includes(e)?null===(r=this.boxSelect)||void 0===r||r.on(e,t):ND.includes(e)?this.sceneService.on(e,t):this.mapService.on(e,t)}},{key:"once",value:function(e,t){var r;iJ.includes(e)?null===(r=this.boxSelect)||void 0===r||r.once(e,t):ND.includes(e)?this.sceneService.once(e,t):this.mapService.once(e,t)}},{key:"emit",value:function(e,t){-1===ND.indexOf(e)?this.mapService.on(e,t):this.sceneService.emit(e,t)}},{key:"off",value:function(e,t){var r;iJ.includes(e)?null===(r=this.boxSelect)||void 0===r||r.off(e,t):ND.includes(e)?this.sceneService.off(e,t):this.mapService.off(e,t)}},{key:"getZoom",value:function(){return this.mapService.getZoom()}},{key:"getCenter",value:function(e){return this.mapService.getCenter(e)}},{key:"setCenter",value:function(e,t){return this.mapService.setCenter(e,t)}},{key:"getPitch",value:function(){return this.mapService.getPitch()}},{key:"setPitch",value:function(e){return this.mapService.setPitch(e)}},{key:"getRotation",value:function(){return this.mapService.getRotation()}},{key:"getBounds",value:function(){return this.mapService.getBounds()}},{key:"setRotation",value:function(e){this.mapService.setRotation(e)}},{key:"zoomIn",value:function(){this.mapService.zoomIn()}},{key:"zoomOut",value:function(){this.mapService.zoomOut()}},{key:"panTo",value:function(e){this.mapService.panTo(e)}},{key:"panBy",value:function(e,t){this.mapService.panBy(e,t)}},{key:"getContainer",value:function(){return this.mapService.getContainer()}},{key:"setZoom",value:function(e){this.mapService.setZoom(e)}},{key:"fitBounds",value:function(e,t){var r=this.sceneService.getSceneConfig(),i=r.fitBoundsOptions,a=r.animate;this.mapService.fitBounds(e,t||n(n({},i),{},{animate:a}))}},{key:"setZoomAndCenter",value:function(e,t){this.mapService.setZoomAndCenter(e,t)}},{key:"setMapStyle",value:function(e){this.mapService.setMapStyle(e)}},{key:"setMapStatus",value:function(e){this.mapService.setMapStatus(e)}},{key:"pixelToLngLat",value:function(e){return this.mapService.pixelToLngLat(e)}},{key:"lngLatToPixel",value:function(e){return this.mapService.lngLatToPixel(e)}},{key:"containerToLngLat",value:function(e){return this.mapService.containerToLngLat(e)}},{key:"lngLatToContainer",value:function(e){return this.mapService.lngLatToContainer(e)}},{key:"destroy",value:function(){this.sceneService.destroy()}},{key:"registerPostProcessingPass",value:function(e,t){this.container.bind(ba.IPostProcessingPass).to(e).whenTargetNamed(t)}},{key:"enableShaderPick",value:function(){this.layerService.enableShaderPick()}},{key:"diasbleShaderPick",value:function(){this.layerService.disableShaderPick()}},{key:"enableBoxSelect",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.boxSelect.enable(),t&&this.boxSelect.once("selectend",(function(){e.disableBoxSelect()}))}},{key:"disableBoxSelect",value:function(){this.boxSelect.disable()}},{key:"getPointSizeRange",value:function(){return this.sceneService.getPointSizeRange()}},{key:"initComponent",value:function(e){this.controlService.init({container:Wy(e)},this.container),this.markerService.init(this.container),this.popupService.init(this.container)}},{key:"initControl",value:function(){var e=this.sceneService.getSceneConfig(),t=e.logoVisible,r=e.logoPosition;t&&this.addControl(new LB({position:r}))}}]),e}();e.$XMLHttpRequest=Xv,e.$location=Zv,e.$window=Yv,e.AJAXError=qv,e.AttributeType=RD,e.BKDRHash=function(e){var t=0;e+="x";for(var r=Math.floor(65745979961613.07),n=0;n<e.length;n++)t>r&&(t=Math.floor(t/137)),t=131*t+e.charCodeAt(n);return t},e.BaseLayer=kV,e.BaseMapService=tF,e.BaseMapWrapper=FD,e.BaseModel=PV,e.BasePostProcessingPass=HN,e.BlendType=lP,e.ButtonControl=gB,e.CameraUniform=wD,e.CanvasLayer=FV,e.CanvasUpdateType=NV,e.CityBuildingLayer=RG,e.Control=vB,e.CoordinateSystem=ub,e.CoordinateUniform=cb,e.DOM=v_,e.Earth=sV,e.EarthLayer=tW,e.ExportImage=EB,e.FrequencyController=A_,e.Fullscreen=MB,e.GeoLocate=OB,e.GeometryLayer=zG,e.HeatmapLayer=HG,e.IDebugLog=CD,e.ILayerStage=pP,e.ImageLayer=YG,e.InteractionEvent=NP,e.LRUCache=GS,e.LayerPopup=eU,e.LayerSwitch=RB,e.LineLayer=pH,e.LineTriangulation=_T,e.LinearDir=OV,e.LoadTileDataStatus=vE,e.Logo=LB,e.Map=fV,e.MapServiceEvent=LD,e.MapTheme=FB,e.Maplibre=oF,e.Marker=pB,e.MarkerLayer=dB,e.MaskLayer=nW,e.MaskOperation=fP,e.MouseLocation=zB,e.PassType=xL,e.PointFillTriangulation=bT,e.PointLayer=BH,e.PolygonLayer=HH,e.PopperControl=_B,e.Popup=JB,e.PositionType=bk,e.RasterLayer=KH,e.RasterTileType=DD,e.Satistics=aE,e.Scale=BB,e.ScaleTypes=ID,e.Scene=oJ,e.SceneEventList=ND,e.SelectControl=xB,e.SizeUnitType=LV,e.Source=uB,e.SourceTile=TE,e.StencilType=hP,e.StyleScaleType=OD,e.TYPES=ba,e.TextureBlend=RV,e.TileDebugLayer=QH,e.TilesetManager=XE,e.UpdateTileStrategy=dE,e.Version=QD,e.Viewport=uV,e.WindLayer=TW,e.WorkerSourceMap=ET,e.Zoom=UB,e.aProjectFlat=mS,e.amap2Project=yS,e.amap2UnProject=_S,e.anchorTranslate=sg,e.anchorType=og,e.applyAnchorClass=ug,e.bBoxToBounds=ES,e.bindAll=E_,e.boundsContains=SS,e.calAngle=function(e,t){return 180*Math.acos(function(e,t){return e[0]*t[0]+e[1]*t[1]}(e,t)/(wS(e)*wS(t)))/Math.PI},e.calDistance=TS,e.calculateCentroid=kS,e.calculatePointsCenterAndRadius=MS,e.container=vD,e.createLayerContainer=bD,e.createSceneContainer=_D,e.decodePickingColor=Bg,e.dispatchMapCameraParams=Uv,e.dispatchMouseDown=_v,e.dispatchMouseMove=bv,e.dispatchMouseUp=xv,e.dispatchPointerDown=Pv,e.dispatchPointerMove=Iv,e.dispatchPointerUp=Ov,e.dispatchTouchEnd=Bv,e.dispatchTouchMove=zv,e.dispatchTouchStart=Fv,e.djb2hash=function(e){for(var t=5381,r=(e=e.toString()).length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},e.encodePickingColor=Ug,e.executeWorkerTask=function(e,t){return MT.apply(this,arguments)},e.expandUrl=ZE,e.extent=fS,e.flow=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(e&&!(e.length<2)){for(var r=0,n=[],i=0;i<e.length-1;i++){var a=e[i],o=e[i+1],s=TS(a,o);r+=s;var u=[a[0]-o[0],a[1]-o[1]],c=CS(0,u);if(i>0){var l=n[i-1].rotation;l-c>360-l+c&&(c+=360)}n.push({start:a,end:o,dis:s,rotation:c,duration:0})}return n.map((function(e){e.duration=t*(e.dis/r)})),n}},e.formatImage=ag,e.generateCatRamp=Gg,e.generateColorRamp=jg,e.generateCustomRamp=Wg,e.generateLinearRamp=Vg,e.generateQuantizeRamp=Hg,e.getAngle=CS,e.getArrayBuffer=eg,e.getBBoxFromPoints=PS,e.getCullFace=Kg,e.getDefaultDomain=Xg,e.getImage=ig,e.getJSON=Jv,e.getReferrer=y_,e.getTileIndices=EE,e.getTileWarpXY=AE,e.getURLFromTemplate=qE,e.getWMTSURLFromTemplate=KE,e.gl=rO,e.guid=IS,e.isAndroid=x_,e.isColor=function(e){return"string"==typeof e&&!!Tg(e)},e.isImageBitmap=g_,e.isMini=Hv,e.isMiniAli=Vv,e.isPC=S_,e.isURLTemplate=function(e){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(e)},e.isWeChatMiniProgram=Gv,e.isWorker=m_,e.isiOS=b_,e.latitude=vS,e.lazyInject=mD,e.lazyMultiInject=function(e){var t=gD.lazyMultiInject(e);return function(e,r,n){t.call(this,e,r),n&&(n.initializer=function(){return e[r]})}},e.lineAtOffset=VS,e.lineAtOffsetAsyc=function(e,t){return new Promise((function(r){e.inited?r(VS(e,t)):e.once("update",(function(){r(VS(e,t))}))}))},e.lineStyleType=IV,e.lngLatInExtent=hS,e.lngLatToMeters=pS,e.lnglatDistance=bS,e.longitude=dS,e.makeXMLHttpRequestPromise=Qv,e.metersToLngLat=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,r=e[0],n=e[1],i=r/lS*180,a=n/lS*180;return a=180/Math.PI*(2*Math.atan(Math.exp(a*Math.PI/180))-Math.PI/2),null!=t&&(i=Number(i.toFixed(t)),a=Number(a.toFixed(t))),3===e.length?[i,a,e[2]]:[i,a]},e.miniWindow=Wv,e.normalize=AS,e.osmLonLat2TileXY=xE,e.osmTileXY2LonLat=function(e,t,r){var n=e/Math.pow(2,r)*360-180,i=Math.PI-2*Math.PI*t/Math.pow(2,r);return[n,180/Math.PI*Math.atan(.5*(Math.exp(i)-Math.exp(-i)))]},e.packCircleVertex=function(e){var t=e.color,r=e.radius,n=e.tileX,i=e.tileY,a=e.shape,o=e.opacity,s=e.stroke,u=e.strokeWidth,c=e.strokeOpacity,l=[],h=[],f=[],p=[TD(t[0],t[1]),TD(t[2],t[3])],d=[TD(s[0],s[1]),TD(s[2],s[3])];return[[-1,-1],[1,-1],[1,1],[-1,1]].forEach((function(e){var t=A(e,2),s=t[0],v=t[1];l.push([].concat(p,[8388608*(s+1)+2097152*(v+1)+131072*AD(a)+r,524288*(n+512)+64*(i+512)])),h.push([].concat(d,[u,c])),f.push([o,0,0,0])})),{packedBuffer:l,packedBuffer2:h,packedBuffer3:f}},e.padBounds=xS,e.polygonFillTriangulation=xT,e.postData=function(e,t){return $v(n(n({},e),{},{method:"POST"}),t)},e.project=function(e){var t=Math.PI/180,r=85.0511287798,n=Math.max(Math.min(r,e[1]),-r),i=Math.sin(n*t);return[6378137*e[0]*t,6378137*Math.log((1+i)/(1-i))/2]},e.rgb2arr=zg,e.sameOrigin=function(e){var t=Yv.document.createElement("a");return t.href=e,t.protocol===Yv.document.location.protocol&&t.host===Yv.document.location.host},e.setL7WorkerSource=CT,e.setMiniScene=jv,e.tileToBounds=SE,e.tranfrormCoord=function(e,t){return function e(t,r){if(Array.isArray(t[0]))return t.map((function(t){return e(t,r)}));return r(t)}(e,t)},e.unProjectFlat=function(e){var t=.5/Math.PI,r=-.5/Math.PI,n=.5,i=A(e,2),a=i[0],o=i[1];return a=(a/(256<<20)-.5)/t,o=(o/(256<<20)-n)/r,o=2*(Math.atan(Math.pow(Math.E,o))-Math.PI/4),[a/(n=Math.PI/180),o/n]},e.validateLngLat=gS,e.version="2.17.7",Object.defineProperty(e,"__esModule",{value:!0})}));