/*! For license information please see index.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("GISDK"),require("React"),require("ReactDOM"),require("_"),require("antd")):"function"==typeof define&&define.amd?define(["GISDK","React","ReactDOM","_","antd"],e):"object"==typeof exports?exports.GI_ASSETS_SCENE=e(require("GISDK"),require("React"),require("ReactDOM"),require("_"),require("antd")):t.GI_ASSETS_SCENE=e(t.GISDK,t.React,t.ReactDOM,t._,t.antd)}(self,((t,e,n,r,i)=>(()=>{var o={3722:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.get=a,e.set=o,e.getJSON=u,e.remove=s,e.default=void 0;var r,i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(n(9836));function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.path,i=void 0===r?"/":r,o=n.domain,a=n.expires,s=n.maxAge,u=void 0===s?1512e3:s,l=n.secure,c=n.sameSite;if(t){e=encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[()]/g,escape);var h=[];i&&h.push("path=".concat(i)),o&&h.push("domain=".concat(o)),a&&h.push("expires=".concat(a)),u&&h.push("max-age=".concat(u)),l&&h.push("secure"),c&&h.push("samesite=".concat(c)),document.cookie="".concat(t,"=").concat(e,";").concat(h.join(";"))}}function a(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t?void 0:{},r=document.cookie?document.cookie.split("; "):[],i=/(%[0-9A-Z]{2})+/g,o=0;o1&&void 0!==arguments[1]?arguments[1]:{};o(t,"",i.assign(e,{expires:"Thu, 01 Jan 1970 00:00:00 GMT",maxAge:-1}))}function u(){return a(void 0,{json:!0})}!function(t){t.strict="strict",t.lax="lax"}(r||(r={}));var l={set:o,get:a,getJSON:u,remove:s};e.default=l},5558:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createInstance=u,e.default=void 0;var r=a(n(3300)),i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}(n(9836)),o=a(n(3722));function a(t){return t&&t.__esModule?t:{default:t}}var s={key:"x-hng",maxAge:15552e3,path:"/"};function u(t){return t=i.assign({},s,t),new r.default(t)}var l=u(),c={locale:l,cookie:o.default,util:i,create:u,getKey:l.getKey.bind(l),getLocale:l.getLocale.bind(l),getLocaleString:l.getLocaleString.bind(l),getEnv:l.getEnv.bind(l),setLocale:l.setLocale.bind(l),setRegion:l.setRegion.bind(l),setLang:l.setLang.bind(l),setCurrency:l.setCurrency.bind(l),setTimeZone:l.setTimeZone.bind(l),setLocaleWithObject:l.setLocaleWithObject.bind(l),clear:l.clear.bind(l)},h=c;e.default=h,t.exports=c},3300:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.LOCALE_KEY_NAME=void 0;var r,i=a(n(3722)),o=a(n(9836));function a(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};r.get||r.set?Object.defineProperty(e,n,r):e[n]=t[n]}return e.default=t,e}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),l(this,"key",void 0),l(this,"maxAge",void 0),l(this,"domain",void 0),l(this,"path",void 0),l(this,"container",void 0),this.key=e.key||"",this.maxAge=e.maxAge,this.domain=e.domain,this.path=e.path,this.container=o.getContainerType()}var e,n;return e=t,(n=[{key:"getKey",value:function(){return this.key}},{key:"getPureLocale",value:function(){return this[this.container]?this[this.container]():""}},{key:"getLocale",value:function(t){var e=this.getPureLocale();if(t&&t.short&&e[r.lang]){var n=e[r.lang].split("-")[0];e[r.lang]=n}return e.region&&(e.regionID=e.region),e.lang&&(e.language=e.lang),e}},{key:"getEnv",value:function(t){var e=o.assign({},{short:!0},t);return this.getLocale(e)}},{key:"getLocaleString",value:function(){var t=this.getPureLocale();return o.stringifyToQueryString(t)}},{key:"setLocale",value:function(t,e){if(t){var n=l({},t,e);this.setLocaleWithObject(n)}}},{key:"setRegion",value:function(t){t&&this.setLocale(r.region,t)}},{key:"setLang",value:function(t){t&&this.setLocale(r.lang,t)}},{key:"setCurrency",value:function(t){t&&this.setLocale(r.currency,t)}},{key:"setTimeZone",value:function(t){t&&this.setLocale(r.tz,t)}},{key:"setLocaleWithObject",value:function(t){if(this.container!==o.ContainerType.weex){var e=this.getLocale(),n=o.assign({},e,t);delete n.language;var r=o.stringifyToQueryString(n);i.set(this.key,r,{path:this.path||"/",maxAge:this.maxAge,domain:this.domain})}}},{key:"weex",value:function(){var t="";return"object"===("undefined"==typeof WXEnvironment?"undefined":s(WXEnvironment))&&(t=WXEnvironment&&WXEnvironment[this.key]||""),o.parseQueryString(t)}},{key:"web",value:function(){var t="",e={};if(location&&location.search){var n=location.search.replace(/^[?#&]/,""),a=o.parseQueryString(n),u=o.objectValues(r);Object.keys(a).forEach((function(t){u.indexOf(t)>=0&&(e[t]=a[t])}))}if("object"===("undefined"==typeof window?"undefined":s(window))){var l=window;if(t=window[this.key]){var c=o.parseQueryString(t);e=o.assign({},c,e)}else if("object"===s(l.g_config)){var h=l.g_config,p=h.regionID,f=h.language,d={};p&&(d[r.region]=p),f&&(d[r.lang]=f),e=o.assign({},d,e)}}if(!t){var m={};if(t=i.get(this.key))m=o.parseQueryString(t);else{var g=i.get("hng");if(g){var y=g.split("|");y[0]&&(m[r.region]=y[0]),y[1]&&(m[r.lang]=y[1]),y[2]&&(m[r.currency]=y[2])}}e=o.assign({},m,e)}return e}},{key:"clear",value:function(){i.remove(this.key)}}])&&u(e.prototype,n),t}();e.default=c},9836:(t,e)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}var r;function i(t,e){if(""===e)return[t];var n=t.indexOf(e);return-1===n?[t]:[t.slice(0,n),t.slice(n+e.length)]}function o(t){try{return decodeURIComponent(t)}catch(e){return t}}function a(t){try{return encodeURIComponent(t)}catch(e){return t}}Object.defineProperty(e,"__esModule",{value:!0}),e.getContainerType=function(){var t="";return"function"==typeof callNative?t=r.weex:"object"!==("undefined"==typeof navigator?"undefined":n(navigator))||"Mozilla"!==navigator.appCodeName&&"Gecko"!==navigator.product||(t=r.web),t},e.splitOnFirst=i,e.decode=o,e.encode=a,e.parseQueryString=function(t){if(!t)return{};var e=t.split("&"),n={};return e.forEach((function(t){var e,r=(2,function(t){if(Array.isArray(t))return t}(e=i(t.replace(/\+/g," "),"="))||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),2!==n.length);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()),a=r[0],s=r[1],u=void 0===s?"":o(s);n[a]=u})),n},e.stringifyToQueryString=function(t){return Object.keys(t).map((function(e){var n=t[e];return void 0===n?"":null===n?a(e):"".concat(a(e),"=").concat(a(n))})).filter((function(t){return t.length>0})).join("&")},e.objectValues=function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(t[n]);return e},e.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=0;n<(arguments.length<=1?0:arguments.length-1);n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];if(r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},e.ContainerType=void 0,e.ContainerType=r,function(t){t.weex="weex",t.web="web"}(r||(e.ContainerType=r={}))},4959:(t,e,n)=>{"use strict";e.ZP=void 0;var r,i,o=n(2370),a=(r=n(4998))&&r.__esModule?r:{default:r},s=n(6142),u="__GLOBAL_STRING_FORMAT__",l={};function c(t){if(t)return i=t,t;if(i)return i;if(o.isWeex)return l;var e=void 0!==n.g?n.g:window;return e[u]||(e[u]={}),e[u]}var h={init:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.name,i=void 0===r?"default":r,o=c(n.context),s=new a.default(t,e);return o[i]=s,s},format:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.name,i=void 0===r?"default":r,o=c()[i];return o?o.format(t,e,n):((0,s.error)("\n Not found instance named ".concat(i,",\n make sure to call formatString.format() after formatString.init()\n ")),t.defaultMessage||t.id||"")},StringFormat:a.default};e.ZP=h},4998:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n(2462))&&r.__esModule?r:{default:r},o=n(6142);function a(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"";"string"!=typeof t&&((0,o.error)('"locale" is not a string, please check your input locale'),t="");var e=t.toLowerCase();return e.replace("-","_")}function l(t,e){if(t===e)return!0;var n=t.match(/(\S*)_/);return!!n&&l(n[1],e)}function c(t,e){var n=u(t),r=u(e);return n===r||l(n,r)}var h=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),s(this,"dictionary",void 0),s(this,"strings",void 0),s(this,"locale",void 0),s(this,"medusa",void 0),this.dictionary={},this.locale=e||"",n||((0,o.warn)('param "strings" is undefined, please check your incoming'),n={}),n.medusa&&(this.medusa=n.medusa,delete n.medusa),this.strings=n;var a=n[e];a||(Object.keys(n).forEach((function(t){u(t)===u(e)&&((0,o.warn)("no string list for locale: ".concat(e," , will replace it with ").concat(t)),a=n[t])})),a||Object.keys(n).forEach((function(t){c(e,t)&&((0,o.warn)("no value for locale: ".concat(e," , will replace it with").concat(t)),a=n[t])}))),(!a||a&&0===Object.keys(a).length)&&((0,o.warn)("no value for locale: ".concat(e,", please check your second param")),a={}),Object.keys(a).forEach((function(t){try{var n=new i.default(a[t],e);r.dictionary[t]=n}catch(e){r.dictionary[t]={},(0,o.error)(e)}}))}var e,n;return e=t,n=[{key:"getStrings",value:function(){return this.strings}},{key:"formatString",value:function(t,e,n){var r=this.medusa,i=this.locale,o=t.format(e);return r&&r.app_name&&"pd-KV"===i&&(o="##@@@".concat(n,"##").concat(r.app_name,"@@@##").concat(o)),o}},{key:"format",value:function(){var t,e,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""},a=arguments.length>1?arguments[1]:void 0,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=r.defaultMessage||r.defaultString||"",l=a&&Object.keys(a).length>0,c="",h={},p={},f=s.React,d=s.component,m=s.tagName,g=void 0===m?"span":m;if(l){var y=Math.floor(1099511627776*Math.random()).toString(16),v=(t=0,function(){return t+=1,"ELEMENT-".concat(y,"-").concat(t)});c="@__".concat(y,"__@"),Object.keys(a).forEach((function(t){var e=a[t];if(f&&f.isValidElement(e)){var n=v();h[t]=c+n+c,p[n]=e}else h[t]=e}))}if(this.dictionary[r.id])try{e=this.formatString(this.dictionary[r.id],h,r.id)}catch(t){var _=r.id?", using id as fallback.":"",b=u?", using defaultString as fallback.":_;(0,o.error)("format string: ".concat(r.id," for locale ").concat(this.locale," ").concat(b," \n").concat(t)),e=u||r.id||""}else if("string"==typeof r)(0,o.error)("type of \"des\" must be object, like: {id: '', defaultString: ''}, instead of string "),e=r||"";else{(0,o.warn)('there is no string with id="'.concat(r.id,'" for locale: "').concat(this.locale,'", use defaultString or id as fallback'));var x=u||r.id||"";try{var w=new i.default(x,this.locale);e=this.formatString(w,h,r.id)}catch(t){e=x}}if(p&&Object.keys(p).length>0){var S=e.split(c).filter((function(t){return!!t})).map((function(t){return p[t]||t})),E=d||g;return f?f.createElement.apply(f,[E,null].concat(function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e{"use strict";var r=n(3656);Object.defineProperty(e,"__esModule",{value:!0}),e.warn=function(t){"undefined"!=typeof console&&console.warn&&void 0!==r&&r.env},e.error=function(t){"undefined"!=typeof console&&console.error&&void 0!==r&&r.env}},5576:function(t){"use strict";t.exports=function(){function t(t){var r=[];return t.AMapUI&&r.push(e(t.AMapUI)),t.Loca&&r.push(n(t.Loca)),Promise.all(r)}function e(t){return new Promise((function(e,n){var i=[];if(t.plugins)for(var u=0;u{"use strict";n.d(e,{S$:()=>G,bf:()=>H,ni:()=>N,oI:()=>Z,sX:()=>V});var r=n(3656);function i(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function o(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function s(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i=0&&t.length%1==0},t.exports=e.default}(h,h.exports);var p={},f={exports:{}},d={exports:{}};!function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=e.pop();return t.call(this,e,r)}},t.exports=e.default}(d,d.exports);var m={};Object.defineProperty(m,"__esModule",{value:!0}),m.fallback=b,m.wrap=x;var g,y=m.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,v=m.hasSetImmediate="function"==typeof setImmediate&&setImmediate,_=m.hasNextTick="object"==typeof r&&"function"==typeof r.nextTick;function b(t){setTimeout(t,0)}function x(t){return function(e){for(var n=[],r=arguments.length-1;r-- >0;)n[r]=arguments[r+1];return t((function(){return e.apply(void 0,n)}))}}g=y?queueMicrotask:v?setImmediate:_?r.nextTick:b,m.default=x(g),function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,i.isAsync)(t)?function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=e.pop();return a(t.apply(this,e),r)}:(0,n.default)((function(e,n){var r;try{r=t.apply(this,e)}catch(t){return n(t)}if(r&&"function"==typeof r.then)return a(r,n);n(null,r)}))};var n=o(d.exports),r=o(m),i=p;function o(t){return t&&t.__esModule?t:{default:t}}function a(t,e){return t.then((function(t){s(e,null,t)}),(function(t){s(e,t&&t.message?t:new Error(t))}))}function s(t,e,n){try{t(e,n)}catch(t){(0,r.default)((function(t){throw t}),t)}}t.exports=e.default}(f,f.exports),Object.defineProperty(p,"__esModule",{value:!0}),p.isAsyncIterable=p.isAsyncGenerator=p.isAsync=void 0;var w,S=(w=f.exports)&&w.__esModule?w:{default:w};function E(t){return"AsyncFunction"===t[Symbol.toStringTag]}p.default=function(t){if("function"!=typeof t)throw new Error("expected a function");return E(t)?(0,S.default)(t):t},p.isAsync=E,p.isAsyncGenerator=function(t){return"AsyncGenerator"===t[Symbol.toStringTag]},p.isAsyncIterable=function(t){return"function"==typeof t[Symbol.asyncIterator]};var M={exports:{}};!function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(void 0===e&&(e=t.length),!e)throw new Error("arity is undefined");return function(){for(var n=this,r=[],i=arguments.length;i--;)r[i]=arguments[i];return"function"==typeof r[e-1]?t.apply(this,r):new Promise((function(i,o){r[e-1]=function(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(t)return o(t);i(e.length>1?e:e[0])},t.apply(n,r)}))}},t.exports=e.default}(M,M.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=o(h.exports),r=o(p),i=o(M.exports);function o(t){return t&&t.__esModule?t:{default:t}}e.default=(0,i.default)((function(t,e,i){var o=(0,n.default)(e)?[]:{};t(e,(function(t,e,n){(0,r.default)(t)((function(t){for(var r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];r.length<2&&(r=r[0]),o[e]=r,n(t)}))}),(function(t){return i(t,o)}))}),3),t.exports=e.default}(c,c.exports);var T={exports:{}},A={exports:{}},C={exports:{}},O={exports:{}};!function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){function e(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e},t.exports=e.default}(O,O.exports);var P={exports:{}},k={exports:{}};!function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()},t.exports=e.default}(k,k.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if((0,n.default)(t))return function(t){var e=-1,n=t.length;return function(){return++e=e||s||o||(s=!0,t.next().then((function(t){var e=t.value,n=t.done;if(!a&&!o){if(s=!1,n)return o=!0,void(u<=0&&i(null));u++,r(e,l,h),l++,c()}})).catch(p))}function h(t,e){if(u-=1,!a)return t?p(t):!1===t?(o=!0,void(a=!0)):e===n.default||o&&u<=0?(o=!0,i(null)):void c()}function p(t){a||(s=!1,o=!0,i(t))}c()};var n=function(t){return t&&t.__esModule?t:{default:t}}(R.exports);t.exports=e.default}(I,I.exports),function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=u(O.exports),r=u(P.exports),i=u(L.exports),o=p,a=u(I.exports),s=u(R.exports);function u(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){return function(e,u,l){if(l=(0,n.default)(l),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return l(null);if((0,o.isAsyncGenerator)(e))return(0,a.default)(e,t,u,l);if((0,o.isAsyncIterable)(e))return(0,a.default)(e[Symbol.asyncIterator](),t,u,l);var c=(0,r.default)(e),h=!1,p=!1,f=0,d=!1;function m(t,e){if(!p)if(f-=1,t)h=!0,l(t);else if(!1===t)h=!0,p=!0;else{if(e===s.default||h&&f<=0)return h=!0,l(null);d||g()}}function g(){for(d=!0;f0;)r[i]=arguments[i+1];if(!1!==n)return n||o===t.length?e.apply(void 0,[n].concat(r)):void a(r)}a([])})),t.exports=e.default}(j,j.exports);var U=u(j.exports),Z=(function(){function t(){this.tasks=[]}t.prototype.call=function(){return U(this.tasks)},t.prototype.tap=function(t,e){0===this.tasks.length?this.tasks.push((function(t){var n=e();t(!!n&&null,n)})):this.tasks.push((function(n,r){r(!!e.apply(void 0,s([],a(n),!1))&&null,t)}))}}(),function(){function t(){this.tasks=[]}return t.prototype.call=function(){return D(this.tasks)},t.prototype.tap=function(t,e){this.tasks.push((function(n){n(e(),t)}))},t}()),V=function(){function t(){this.args=[],this.tasks=[]}return t.prototype.promise=function(){for(var t=arguments,e=[],n=0;n""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class _ extends m{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[]}}map(t){return 0===this.domainIndexMap.size&&g(this.domainIndexMap,this.getDomain(),this.domainKey),y({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&g(this.rangeIndexMap,this.getRange(),this.rangeKey),y({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=v(e),this.rangeKey=v(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new _(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||(({domain:t,compare:e}=this.options),this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}class b extends _{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:void 0,flex:[]}}clone(){return new b(this.options)}getStep(t){return void 0===this.valueStep?1:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0t/e))}(l),d=h/f.reduce(((t,e)=>t+e));l=new Map(e.map(((t,e)=>(e=f[e]*d,[t,s?Math.floor(e):e]))));const m=new Map(e.map(((t,e)=>(e=f[e]*d+p,[t,s?Math.floor(e):e]))));h=Array.from(m.values()).reduce(((t,e)=>t+e)),c+=(t-(h-h/n*o))*u;let g=s?Math.round(c):c;const y=new Array(n);for(let t=0;tn=>t(e(n))),t)}function w(t,e){return e-t?n=>(n-t)/(e-t):t=>.5}const S=Math.sqrt(50),E=Math.sqrt(10),M=Math.sqrt(2);function T(t,e,n){return n=(e=(e-t)/Math.max(0,n))/10**(t=Math.floor(Math.log(e)/Math.LN10)),0<=t?(n>=S?10:n>=E?5:n>=M?2:1)*10**t:-(10**-t)/(n>=S?10:n>=E?5:n>=M?2:1)}const A=(t,e,n=5)=>{const r=[t,e];let i,o=0,a=r.length-1,s=r[o],u=r[a];return un=>t*(1-n)+e*n,W=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return H(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const i=G(n),o=G(r);return null===i||null===o?i?()=>n:()=>r:t=>{const e=new Array(4);for(let a=0;a<4;a+=1){var n=i[a],r=o[a];e[a]=n*(1-t)+r*t}var[a,s,u,l]=e;return`rgba(${Math.round(a)}, ${Math.round(s)}, ${Math.round(u)}, ${l})`}}},q=(t,e)=>{const n=H(t,e);return t=>Math.round(n(t))},Y=(t,e,n)=>{let r,i,o=t,a=e;if(o===a&&0{var[t,r]=t,[e,i]=e;let o,a;return x(a=t{const r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r);var a=t[0]>t[r],s=a?[...t].reverse():t,u=a?[...e].reverse():e;for(let t=0;t{var n=function(t,e,n,r,i){let o=1,a=r||t.length;const s=t=>t;for(;oe?a=u:o=u+1}return o}(t,e,0,r)-1,a=i[n];return x(o[n],a)(e)}},K=(t,e,n,r)=>(2Math.min(Math.max(r,t),i)}return u}composeOutput(t,e){const{domain:n,range:r,round:i,interpolate:o}=this.options;var a=K(n.map(t),r,o,i);this.output=x(a,e,t)}composeInput(t,e,n){const{domain:r,range:i}=this.options;t=K(i,r.map(t),H),this.input=x(e,n,t)}}class Q extends J{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:W,tickMethod:Y,tickCount:5}}chooseTransforms(){return[u,u]}clone(){return new Q(this.options)}}class tt extends b{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:void 0,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new tt(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}function et(t,e){for(var n=[],r=0,i=t.length;r{"use strict";var r,i,o,a;function s(t){r||(r=document.createElement("table"),i=document.createElement("tr"),o=/^\s*<(\w+|!)[^>]*>/,a={tr:document.createElement("tbody"),tbody:r,thead:r,tfoot:r,td:i,th:i,"*":document.createElement("div")});var e=o.test(t)&&RegExp.$1;e&&e in a||(e="*");var n=a[e];t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,n.innerHTML=""+t;var s=n.childNodes[0];return s&&n.contains(s)&&n.removeChild(s),s}n.d(e,{Z:()=>s})},3275:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});const r=function(){function t(){this._events={}}return t.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},t.prototype.once=function(t,e){return this.on(t,e,!0)},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r{window._iconfont_svg_string_3580659='',function(t){try{var e,n=(e=(e=document.getElementsByTagName("script"))[e.length-1]).getAttribute("data-injectcss");if(!(e=e.getAttribute("data-disable-injectsvg"))){var r,i,o,a,s;if(n&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(e){console&&console.log(e)}}r=function(){var e,n=document.createElement("div");n.innerHTML=t._iconfont_svg_string_3580659,(n=n.getElementsByTagName("svg")[0])&&(n.setAttribute("aria-hidden","true"),n.style.position="absolute",n.style.width=0,n.style.height=0,n.style.overflow="hidden",(e=document.body).firstChild?function(t,e){e.parentNode.insertBefore(t,e)}(n,e.firstChild):e.appendChild(n))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(r,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),r()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=r,a=t.document,s=!1,function t(){try{a.documentElement.doScroll("left")}catch(e){return void setTimeout(t,50)}u()}(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,u())})}function u(){s||(s=!0,o())}}catch(l){}}(window)},1522:(t,e,n)=>{"use strict";n.r(e),n.d(e,{ButtonControl:()=>S,Control:()=>w,ExportImage:()=>R,Fullscreen:()=>Z,GeoLocate:()=>V,LayerPopup:()=>Q,LayerSwitch:()=>G,Logo:()=>H,MapTheme:()=>Y,Marker:()=>m,MarkerLayer:()=>_,MouseLocation:()=>X,PopperControl:()=>T,Popup:()=>J,PositionType:()=>h.PositionType,Scale:()=>$,SelectControl:()=>O,Zoom:()=>K});var r=n(3659),i=n(3192),o=n(6838),a=n(5161),s=n(6193),u=n(9097),l=n(6875),c=n(6297),h=n(108),p=n(5619),f=n(1883),d=n.n(f);var m=function(t){(0,s.Z)(d,t);var e,n,f=(e=d,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function d(t){var e;return(0,i.Z)(this,d),e=f.call(this),(0,c.Z)((0,a.Z)(e),"added",!1),(0,c.Z)((0,a.Z)(e),"eventHandle",(function(t){e.polyfillEvent(t),e.emit(t.type,{target:t,data:e.markerOption.extData,lngLat:e.lngLat})})),e.markerOption=(0,r.Z)((0,r.Z)({},e.getDefault()),t),(0,p.bindAll)(["update","onMove","onMapClick"],(0,a.Z)(e)),e.init(),e}return(0,o.Z)(d,[{key:"getMarkerLayerContainerSize",value:function(){}},{key:"getDefault",value:function(){return{element:void 0,anchor:p.anchorType.BOTTOM,offsets:[0,0],color:"#5B8FF9",draggable:!1}}},{key:"addTo",value:function(t){this.scene=t,this.mapsService=t.get(h.TYPES.IMapService),this.sceneSerive=t.get(h.TYPES.ISceneService);var e=this.markerOption.element;return this.mapsService.getMarkerContainer().appendChild(e),this.registerMarkerEvent(e),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 t=this.markerOption.element;return t&&p.DOM.remove(t),this.popup&&this.popup.remove(),this}},{key:"setLnglat",value:function(t){return this.lngLat=t,Array.isArray(t)&&(this.lngLat={lng:t[0],lat:t[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(t){var e=this;if(!this.added)return this.once("added",(function(){e.setElement(t)})),this;var n=this.markerOption.element;return n&&p.DOM.remove(n),this.markerOption.element=t,this.init(),this.mapsService.getMarkerContainer().appendChild(t),this.registerMarkerEvent(t),this.update(),this}},{key:"openPopup",value:function(){var t=this;if(!this.added)return this.once("added",(function(){t.openPopup()})),this;var e=this.popup;return e?(e.isOpen()||e.addTo(this.scene),this):this}},{key:"closePopup",value:function(){var t=this;this.added||this.once("added",(function(){t.closePopup()}));var e=this.popup;return e&&e.remove(),this}},{key:"setPopup",value:function(t){return this.popup=t,this.lngLat&&this.popup.setLnglat(this.lngLat),this}},{key:"togglePopup",value:function(){var t=this.popup;return t?(t.isOpen()?t.remove():t.addTo(this.scene),this):this}},{key:"getPopup",value:function(){return this.popup}},{key:"getOffset",value:function(){return this.markerOption.offsets}},{key:"setDraggable",value:function(t){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(t){this.markerOption.extData=t}},{key:"update",value:function(){if(this.mapsService){var t=this.markerOption,e=t.element,n=t.anchor;this.updatePosition(),p.DOM.setTransform(e,"".concat(p.anchorTranslate[n]))}}},{key:"onMapClick",value:function(t){var e=this.markerOption.element;this.popup&&e&&this.togglePopup()}},{key:"getCurrentContainerSize",value:function(){var t=this.mapsService.getContainer();return{containerHeight:(null==t?void 0:t.scrollHeight)||0,containerWidth:(null==t?void 0:t.scrollWidth)||0,bounds:this.mapsService.getBounds()}}},{key:"updatePosition",value:function(){if(this.mapsService){var t=this.markerOption,e=t.element,n=t.offsets,r=this.lngLat,i=r.lng,o=r.lat,a=this.mapsService.lngLatToContainer([i,o]);if(e){e.style.display="block",e.style.whiteSpace="nowrap";var s=this.getMarkerLayerContainerSize()||this.getCurrentContainerSize(),u=s.containerHeight,l=s.containerWidth,c=s.bounds;if(!c)return;if(Math.abs(c[0][0])>180||Math.abs(c[1][0])>180){if(a.x>l){var h=this.mapsService.lngLatToContainer([i-360,o]);a.x=h.x}if(a.x<0){var p=this.mapsService.lngLatToContainer([i+360,o]);a.x=p.x}}(a.x>l||a.x<0||a.y>u||a.y<0)&&(e.style.display="none"),e.style.left=a.x+n[0]+"px",e.style.top=a.y-n[1]+"px"}}}},{key:"init",value:function(){var t=this,e=this.markerOption.element,n=this.markerOption,r=n.color,i=n.anchor;if(!e){this.defaultMarker=!0,e=p.DOM.create("div"),this.markerOption.element=e;var o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"display","block"),o.setAttributeNS(null,"height","48px"),o.setAttributeNS(null,"width","48px"),o.setAttributeNS(null,"viewBox","0 0 1024 1024");var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.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"),a.setAttributeNS(null,"fill",r),o.appendChild(a),e.appendChild(o)}p.DOM.addClass(e,"l7-marker"),Object.keys(this.markerOption.style||{}).forEach((function(n){var r,i,o=(null===(r=t.markerOption)||void 0===r?void 0:r.style)&&(null===(i=t.markerOption)||void 0===i?void 0:i.style[n]);e&&(e.style[n]=o)})),(0,p.applyAnchorClass)(e,i,"marker")}},{key:"registerMarkerEvent",value:function(t){t.addEventListener("click",this.onMapClick),t.addEventListener("mousemove",this.eventHandle),t.addEventListener("click",this.eventHandle),t.addEventListener("mousedown",this.eventHandle),t.addEventListener("mouseup",this.eventHandle),t.addEventListener("dblclick",this.eventHandle),t.addEventListener("contextmenu",this.eventHandle),t.addEventListener("mouseover",this.eventHandle),t.addEventListener("mouseout",this.eventHandle),t.addEventListener("touchstart",this.eventHandle),t.addEventListener("touchend",this.eventHandle)}},{key:"unRegisterMarkerEvent",value:function(){var t=this.getElement();t.removeEventListener("click",this.onMapClick),t.removeEventListener("mousemove",this.eventHandle),t.removeEventListener("click",this.eventHandle),t.removeEventListener("mousedown",this.eventHandle),t.removeEventListener("mouseup",this.eventHandle),t.removeEventListener("dblclick",this.eventHandle),t.removeEventListener("contextmenu",this.eventHandle),t.removeEventListener("mouseover",this.eventHandle),t.removeEventListener("mouseout",this.eventHandle),t.removeEventListener("touchstart",this.eventHandle),t.removeEventListener("touchend",this.eventHandle)}},{key:"polyfillEvent",value:function(t){this.mapsService&&"GAODE2.x"===this.mapsService.version&&((0,p.isPC)()||("touchstart"===t.type&&(this.touchStartTime=Date.now()),"touchend"===t.type&&Date.now()-this.touchStartTime<300&&this.emit("click",{target:t,data:this.markerOption.extData,lngLat:this.lngLat})))}},{key:"addDragHandler",value:function(t){return null}},{key:"onUp",value:function(t){throw new Error("Method not implemented.")}}]),d}(f.EventEmitter),g=n(9479),y=n(1469),v=n.n(y);var _=function(t){(0,s.Z)(d,t);var e,n,f=(e=d,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function d(t){var e,n;return(0,i.Z)(this,d),n=f.call(this),(0,c.Z)((0,a.Z)(n),"markers",[]),(0,c.Z)((0,a.Z)(n),"points",[]),(0,c.Z)((0,a.Z)(n),"clusterMarkers",[]),n.markerLayerOption=(0,g.merge)(n.getDefault(),t),(0,p.bindAll)(["update"],(0,a.Z)(n)),n.zoom=(null===(e=n.markerLayerOption.clusterOption)||void 0===e?void 0:e.zoom)||-99,n}return(0,o.Z)(d,[{key:"getDefault",value:function(){return{cluster:!1,clusterOption:{radius:80,maxZoom:20,minZoom:0,zoom:-99,style:{},className:""}}}},{key:"addTo",value:function(t){return this.scene=t,this.mapsService=t.get(h.TYPES.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 t=this.mapsService.getContainer();this.containerSize={containerWidth:(null==t?void 0:t.scrollWidth)||0,containerHeight:(null==t?void 0:t.scrollHeight)||0,bounds:this.mapsService.getBounds()}}}},{key:"getContainerSize",value:function(){return this.containerSize}},{key:"addMarker",value:function(t){var e=this.markerLayerOption.cluster;if(t.getMarkerLayerContainerSize=this.getContainerSize.bind(this),e&&(this.addPoint(t,this.markers.length),this.mapsService)){var n=this.mapsService.getZoom(),r=this.mapsService.getBounds();this.bbox=(0,p.padBounds)(r,.5),this.zoom=Math.floor(n),this.getClusterMarker(this.bbox,this.zoom)}this.markers.push(t)}},{key:"removeMarker",value:function(t){this.markers.indexOf(t);var e=this.markers.indexOf(t);e>-1&&this.markers.splice(e,1)}},{key:"hide",value:function(){this.markers.map((function(t){t.getElement().style.opacity="0"})),this.clusterMarkers.map((function(t){t.getElement().style.opacity="0"}))}},{key:"show",value:function(){this.markers.map((function(t){t.getElement().style.opacity="1"})),this.clusterMarkers.map((function(t){t.getElement().style.opacity="1"}))}},{key:"getMarkers",value:function(){return this.markerLayerOption.cluster?this.clusterMarkers:this.markers}},{key:"addMarkers",value:function(){var t=this;this.getMarkers().forEach((function(e){e.addTo(t.scene)}))}},{key:"clear",value:function(){this.markers.forEach((function(t){t.remove()})),this.clusterMarkers.forEach((function(t){t.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(t,e){var n=t.getLnglat(),i={geometry:{type:"Point",coordinates:[n.lng,n.lat]},properties:(0,r.Z)((0,r.Z)({},t.getExtData()),{},{marker_id:e})};this.points.push(i),this.clusterIndex&&this.clusterIndex.load(this.points)}},{key:"initCluster",value:function(){if(this.markerLayerOption.cluster){var t=this.markerLayerOption.clusterOption,e=t.radius,n=t.minZoom,r=void 0===n?0:n,i=t.maxZoom;this.clusterIndex=new(v())({radius:e,minZoom:r,maxZoom:i}),this.clusterIndex.load(this.points)}}},{key:"getClusterMarker",value:function(t,e){var n=this,r=t[0].concat(t[1]),i=this.clusterIndex.getClusters(r,e);this.clusterMarkers.forEach((function(t){t.remove()})),this.clusterMarkers=[],i.forEach((function(t){var e,r=n.markerLayerOption.clusterOption,i=r.field,o=r.method;if(null!==(e=t.properties)&&void 0!==e&&e.cluster_id){var a,s=n.getLeaves(null===(a=t.properties)||void 0===a?void 0:a.cluster_id);if(t.properties.clusterData=s,i&&o){var u=null==s?void 0:s.map((function(t){return(0,c.Z)({},i,t.properties[i])})),l=p.Satistics.getColumn(u,i),h=p.Satistics.getSatByColumn(o,l),f="point_"+o;t.properties[f]=h.toFixed(2)}}var d=n.clusterMarker(t);n.clusterMarkers.push(d),d.addTo(n.scene)}))}},{key:"getLeaves",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t?this.clusterIndex.getLeaves(t,e,n):null}},{key:"clusterMarker",value:function(t){var e=this.markerLayerOption.clusterOption.element,n=void 0===e?this.generateElement.bind(this):e;return new m({element:n(t)}).setLnglat({lng:t.geometry.coordinates[0],lat:t.geometry.coordinates[1]})}},{key:"normalMarker",value:function(t){var e=t.properties.marker_id;return this.markers[e]}},{key:"update",value:function(){if(this.mapsService&&0!==this.markers.length){var t=this.mapsService.getZoom(),e=this.mapsService.getBounds();(!this.bbox||Math.abs(t-this.zoom)>=1||!(0,p.boundsContains)(this.bbox,e))&&(this.bbox=(0,p.padBounds)(e,.5),this.zoom=Math.floor(t),this.getClusterMarker(this.bbox,this.zoom))}}},{key:"generateElement",value:function(t){var e=p.DOM.create("div","l7-marker-cluster"),n=p.DOM.create("div","",e),r=p.DOM.create("span","",n),i=this.markerLayerOption.clusterOption,o=i.field,a=i.method;t.properties.point_count=t.properties.point_count||1;var s=o&&a?t.properties["point_"+a]||t.properties[o]:t.properties.point_count;return r.textContent=s,e}}]),d}(f.EventEmitter),b=(n(6794),n(9458)),x=n(5162);var w=function(t){(0,s.Z)(c,t);var e,n,a=(e=c,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function c(t){var e;return(0,i.Z)(this,c),e=a.call(this),c.controlCount++,e.controlOption=(0,r.Z)((0,r.Z)({},e.getDefault(t)),t||{}),e}return(0,o.Z)(c,[{key:"getOptions",value:function(){return this.controlOption}},{key:"setOptions",value:function(t){var e=this.getDefault(t);Object.entries(t).forEach((function(n){var r=(0,x.Z)(n,2),i=r[0];void 0===r[1]&&(t[i]=e[i])})),"position"in t&&this.setPosition(t.position),"className"in t&&this.setClassName(t.className),"style"in t&&this.setStyle(t.style),this.controlOption=(0,r.Z)((0,r.Z)({},this.controlOption),t)}},{key:"addTo",value:function(t){this.mapsService=t.get(h.TYPES.IMapService),this.renderService=t.get(h.TYPES.IRendererService),this.layerService=t.get(h.TYPES.ILayerService),this.controlService=t.get(h.TYPES.IControlService),this.configService=t.get(h.TYPES.IGlobalConfigService),this.scene=t.get(h.TYPES.ISceneService),this.sceneContainer=t,this.isShow=!0,this.container=this.onAdd(),p.DOM.addClass(this.container,"l7-control");var e=this.controlOption,n=e.className,r=e.style;return n&&this.setClassName(n),r&&this.setStyle(r),this.insertContainer(),this.emit("add",this),this}},{key:"remove",value:function(){if(!this.mapsService)return this;p.DOM.remove(this.container),this.onRemove(),this.emit("remove",this)}},{key:"onAdd",value:function(){return p.DOM.create("div")}},{key:"onRemove",value:function(){}},{key:"show",value:function(){var t=this.container;p.DOM.removeClass(t,"l7-control--hide"),this.isShow=!0,this.emit("show",this)}},{key:"hide",value:function(){var t=this.container;p.DOM.addClass(t,"l7-control--hide"),this.isShow=!1,this.emit("hide",this)}},{key:"getDefault",value:function(t){return{position:h.PositionType.TOPRIGHT,name:"".concat(c.controlCount)}}},{key:"getContainer",value:function(){return this.container}},{key:"getIsShow",value:function(){return this.isShow}},{key:"_refocusOnMap",value:function(t){if(this.mapsService&&t&&t.screenX>0&&t.screenY>0){var e=this.mapsService.getContainer();null!==e&&e.focus()}}},{key:"setPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.PositionType.TOPLEFT,e=this.controlService;return e&&e.removeControl(this),this.controlOption.position=t,e&&e.addControl(this,this.sceneContainer),this}},{key:"setClassName",value:function(t){var e=this.container,n=this.controlOption.className;n&&p.DOM.removeClass(e,n),t&&p.DOM.addClass(e,t)}},{key:"setStyle",value:function(t){var e=this.container;t?e.setAttribute("style",t):e.removeAttribute("style")}},{key:"insertContainer",value:function(){var t=this.controlOption.position,e=this.container;if(t instanceof Element)t.appendChild(e);else{var n=this.controlService.controlCorners[t];["bottomleft","bottomright","righttop","rightbottom"].includes(t)?n.insertBefore(e,n.firstChild):n.appendChild(e)}}},{key:"checkUpdateOption",value:function(t,e){return e.some((function(e){return e in t}))}}]),c}(d());(0,c.Z)(w,"controlCount",0);var S=function(t){(0,s.Z)(h,t);var e,n,r=(e=h,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function h(){var t;(0,i.Z)(this,h);for(var e=arguments.length,n=new Array(e),o=0;o0&&void 0!==arguments[0]?arguments[0]:"";return p.DOM.create("button","l7-button-control ".concat(t))}},{key:"onAdd",value:function(){this.button=this.createButton(),this.isDisable=!1;var t=this.controlOption,e=t.title,n=t.btnText,r=t.btnIcon;return this.setBtnTitle(e),this.setBtnText(n),this.setBtnIcon(r),this.button}},{key:"onRemove",value:function(){this.button=this.buttonIcon=this.buttonText=void 0,this.isDisable=!1}},{key:"setOptions",value:function(t){var e=t.title,n=t.btnText,r=t.btnIcon;this.checkUpdateOption(t,["title"])&&this.setBtnTitle(e),this.checkUpdateOption(t,["btnIcon"])&&this.setBtnIcon(r),this.checkUpdateOption(t,["btnText"])&&this.setBtnText(n),(0,b.Z)((0,l.Z)(h.prototype),"setOptions",this).call(this,t)}},{key:"setBtnTitle",value:function(t){var e;null===(e=this.button)||void 0===e||e.setAttribute("title",null!=t?t:"")}},{key:"setBtnIcon",value:function(t){if(this.buttonIcon&&p.DOM.remove(this.buttonIcon),t){var e,n,r,i=null===(e=this.button)||void 0===e?void 0:e.firstChild;i?null===(n=this.button)||void 0===n||n.insertBefore(t,i):null===(r=this.button)||void 0===r||r.appendChild(t),this.buttonIcon=t}}},{key:"setBtnText",value:function(t){if(this.button)if(p.DOM.removeClass(this.button,"l7-button-control--row"),p.DOM.removeClass(this.button,"l7-button-control--column"),t){var e,n=this.buttonText;n||(n=p.DOM.create("div","l7-button-control__text"),null===(e=this.button)||void 0===e||e.appendChild(n),this.buttonText=n),n.innerText=t,p.DOM.addClass(this.button,this.controlOption.vertical?"l7-button-control--column":"l7-button-control--row")}else!t&&this.buttonText&&(p.DOM.remove(this.buttonText),this.buttonText=void 0)}}]),h}(w);var E=function(t){(0,s.Z)(h,t);var e,n,r=(e=h,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function h(t,e){var n;return(0,i.Z)(this,h),n=r.call(this),(0,c.Z)((0,a.Z)(n),"isShow",!1),(0,c.Z)((0,a.Z)(n),"timeout",null),(0,c.Z)((0,a.Z)(n),"show",(function(){return n.isShow||!n.contentDOM.innerHTML||(n.resetPopperPosition(),p.DOM.removeClass(n.popperDOM,"l7-popper-hide"),n.isShow=!0,n.option.unique&&h.conflictPopperList.forEach((function(t){t!==(0,a.Z)(n)&&t.isShow&&t.hide()})),n.emit("show")),(0,a.Z)(n)})),(0,c.Z)((0,a.Z)(n),"hide",(function(){return n.isShow?(p.DOM.addClass(n.popperDOM,"l7-popper-hide"),n.isShow=!1,n.emit("hide"),(0,a.Z)(n)):(0,a.Z)(n)})),(0,c.Z)((0,a.Z)(n),"setHideTimeout",(function(){n.timeout||(n.timeout=window.setTimeout((function(){n.isShow&&(n.hide(),n.timeout=null)}),300))})),(0,c.Z)((0,a.Z)(n),"clearHideTimeout",(function(){n.timeout&&(window.clearTimeout(n.timeout),n.timeout=null)})),(0,c.Z)((0,a.Z)(n),"onBtnClick",(function(){n.isShow?n.hide():n.show()})),(0,c.Z)((0,a.Z)(n),"onBtnMouseLeave",(function(){n.setHideTimeout()})),(0,c.Z)((0,a.Z)(n),"onBtnMouseMove",(function(){n.clearHideTimeout(),n.isShow||n.show()})),n.button=t,n.option=e,n.init(),e.unique&&h.conflictPopperList.push((0,a.Z)(n)),n}return(0,o.Z)(h,[{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(t){"string"==typeof t?this.contentDOM.innerHTML=t:t instanceof HTMLElement&&(p.DOM.clearChildren(this.contentDOM),this.contentDOM.appendChild(t)),this.content=t}},{key:"init",value:function(){var t=this.option.trigger;this.popperDOM=this.createPopper(),"click"===t?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),p.DOM.remove(this.popperDOM)}},{key:"resetPopperPosition",value:function(){var t={},e=this.option,n=e.container,r=e.offset,i=void 0===r?[0,0]:r,o=e.placement,a=(0,x.Z)(i,2),s=a[0],u=a[1],l=this.button.getBoundingClientRect(),c=n.getBoundingClientRect(),h=p.DOM.getDiffRect(l,c),f=h.left,d=h.right,m=h.top,g=h.bottom,y=!1,v=!1;/^(left|right)/.test(o)?(o.includes("left")?t.right="".concat(l.width+d,"px"):o.includes("right")&&(t.left="".concat(l.width+f,"px")),o.includes("start")?t.top="".concat(m,"px"):o.includes("end")?t.bottom="".concat(g,"px"):(t.top="".concat(m+l.height/2,"px"),v=!0,t.transform="translate(".concat(s,"px, calc(").concat(u,"px - 50%))"))):/^(top|bottom)/.test(o)&&(o.includes("top")?t.bottom="".concat(l.height+g,"px"):o.includes("bottom")&&(t.top="".concat(l.height+m,"px")),o.includes("start")?t.left="".concat(f,"px"):o.includes("end")?t.right="".concat(d,"px"):(t.left="".concat(f+l.width/2,"px"),y=!0,t.transform="translate(calc(".concat(s,"px - 50%), ").concat(u,"px)"))),t.transform="translate(calc(".concat(s,"px - ").concat(y?"50%":"0%","), calc(").concat(u,"px - ").concat(v?"50%":"0%",")");var _=o.split("-");_.length&&p.DOM.addClass(this.popperDOM,_.map((function(t){return"l7-popper-".concat(t)})).join(" ")),p.DOM.addStyle(this.popperDOM,p.DOM.css2Style(t))}},{key:"createPopper",value:function(){var t=this.option,e=t.container,n=t.className,r=void 0===n?"":n,i=t.content,o=p.DOM.create("div","l7-popper l7-popper-hide ".concat(r)),a=p.DOM.create("div","l7-popper-content"),s=p.DOM.create("div","l7-popper-arrow");return o.appendChild(a),o.appendChild(s),e.appendChild(o),this.popperDOM=o,this.contentDOM=a,i&&this.setContent(i),o}}]),h}(f.EventEmitter);(0,c.Z)(E,"conflictPopperList",[]);var M={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"},T=function(t){(0,s.Z)(c,t);var e,n,a=(e=c,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function c(){return(0,i.Z)(this,c),a.apply(this,arguments)}return(0,o.Z)(c,[{key:"getPopper",value:function(){return this.popper}},{key:"hide",value:function(){this.popper.hide(),(0,b.Z)((0,l.Z)(c.prototype),"hide",this).call(this)}},{key:"getDefault",value:function(t){var e,n=(0,b.Z)((0,l.Z)(c.prototype),"getDefault",this).call(this,t),i=null!==(e=null==t?void 0:t.position)&&void 0!==e?e:n.position;return(0,r.Z)((0,r.Z)({},(0,b.Z)((0,l.Z)(c.prototype),"getDefault",this).call(this,t)),{},{popperPlacement:i instanceof Element?"bottom":M[i],popperTrigger:"click"})}},{key:"onAdd",value:function(){var t=(0,b.Z)((0,l.Z)(c.prototype),"onAdd",this).call(this);return this.initPopper(),t}},{key:"onRemove",value:function(){this.popper.destroy()}},{key:"initPopper",value:function(){var t=this,e=this.controlOption,n=e.popperClassName,r=e.popperPlacement,i=e.popperTrigger,o=this.mapsService.getMapContainer();return this.popper=new E(this.button,{className:n,placement:r,trigger:i,container:o,unique:!0}),this.popper.on("show",(function(){t.emit("popperShow",t)})).on("hide",(function(){t.emit("popperHide",t)})),this.popper}},{key:"setOptions",value:function(t){if((0,b.Z)((0,l.Z)(c.prototype),"setOptions",this).call(this,t),this.checkUpdateOption(t,["popperPlacement","popperTrigger","popperClassName"])){var e=this.popper.getContent();this.popper.destroy(),this.initPopper(),this.popper.setContent(e)}}}]),c}(S),A=n(9908);var C=function(t){return t.ActiveOptionClassName="l7-select-control-item-active",t.OptionValueAttrKey="data-option-value",t.OptionIndexAttrKey="data-option-index",t}(C||{}),O=function(t){(0,s.Z)(h,t);var e,n,r=(e=h,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function h(){var t;(0,i.Z)(this,h);for(var e=arguments.length,n=new Array(e),o=0;o-1?t.selectValue.splice(n,1):t.selectValue=[].concat((0,A.Z)(t.selectValue),[e.value])}else t.selectValue=[e.value];t.setSelectValue(t.selectValue)})),t}return(0,o.Z)(h,[{key:"setOptions",value:function(t){(0,b.Z)((0,l.Z)(h.prototype),"setOptions",this).call(this,t);var e=t.options;e&&this.popper.setContent(this.getPopperContent(e))}},{key:"onAdd",value:function(){var t=(0,b.Z)((0,l.Z)(h.prototype),"onAdd",this).call(this),e=this.controlOption.defaultValue;return e&&(this.selectValue=this.transSelectValue(e)),this.popper.setContent(this.getPopperContent(this.controlOption.options)),t}},{key:"getSelectValue",value:function(){return this.getIsMultiple()?this.selectValue:this.selectValue[0]}},{key:"setSelectValue",value:function(t){var e=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.transSelectValue(t);this.optionDOMList.forEach((function(t){var n=t.getAttribute(C.OptionValueAttrKey),i=e.getIsMultiple()?t.querySelector("input[type=checkbox]"):void 0;r.includes(n)?(p.DOM.addClass(t,C.ActiveOptionClassName),i&&p.DOM.setChecked(i,!0)):(p.DOM.removeClass(t,C.ActiveOptionClassName),i&&p.DOM.setChecked(i,!1))})),this.selectValue=r,n&&this.emit("selectChange",this.getIsMultiple()?r:r[0])}},{key:"getIsMultiple",value:function(){return!1}},{key:"getPopperContent",value:function(t){var e=this,n=this.isImageOptions(),r=p.DOM.create("div",n?"l7-select-control--image":"l7-select-control--normal");this.getIsMultiple()&&p.DOM.addClass(r,"l7-select-control--multiple");var i=t.map((function(t,r){var i=n?e.createImageOption(t):e.createNormalOption(t);return i.setAttribute(C.OptionValueAttrKey,t.value),i.setAttribute(C.OptionIndexAttrKey,window.String(r)),i.addEventListener("click",e.onItemClick.bind(e,t)),i}));return r.append.apply(r,(0,A.Z)(i)),this.optionDOMList=i,r}},{key:"createImageOption",value:function(t){var e=this.selectValue.includes(t.value),n=p.DOM.create("div","l7-select-control-item ".concat(e?C.ActiveOptionClassName:"")),r=p.DOM.create("img");r.setAttribute("src",t.img),p.DOM.setUnDraggable(r),n.appendChild(r);var i=p.DOM.create("div","l7-select-control-item-row");this.getIsMultiple()&&n.appendChild(this.createCheckbox(e));var o=p.DOM.create("span");return o.innerText=t.text,i.appendChild(o),n.appendChild(i),n}},{key:"createCheckbox",value:function(t){var e=p.DOM.create("input");return e.setAttribute("type","checkbox"),t&&p.DOM.setChecked(e,!0),e}},{key:"isImageOptions",value:function(){return!!this.controlOption.options.find((function(t){return t.img}))}},{key:"transSelectValue",value:function(t){return Array.isArray(t)?t:[t]}}]),h}(T),P=n(800),k=n(1109),L=n.n(k),I=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.classList.add("l7-iconfont"),e.setAttribute("aria-hidden","true");var n=document.createElementNS("http://www.w3.org/2000/svg","use");return n.setAttributeNS("http://www.w3.org/1999/xlink","href","#".concat(t)),e.appendChild(n),e};var R=function(t){(0,s.Z)(f,t);var e,n,h,p=(n=f,h=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}}(),function(){var t,e=(0,l.Z)(n);if(h){var r=(0,l.Z)(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return(0,u.Z)(this,t)});function f(){var t;(0,i.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:document.documentElement,e=arguments.length>1?arguments[1]:void 0;return new Promise((function(n,r){var i=function t(){j.off("change",t),n()};j.on("change",i);var o=t[z.requestFullscreen](e);o instanceof Promise&&o.then(i).catch(r)}))},exit:function(){return new Promise((function(t,e){if(j.isFullscreen){var n=function e(){j.off("change",e),t()};j.on("change",n);var r=document[z.exitFullscreen]();r instanceof Promise&&r.then(n).catch(e)}else t()}))},toggle:function(t,e){return j.isFullscreen?j.exit():j.request(t,e)},onchange:function(t){j.on("change",t)},onerror:function(t){j.on("error",t)},on:function(t,e){var n=B[t];n&&document.addEventListener(n,e,!1)},off:function(t,e){var n=B[t];n&&document.removeEventListener(n,e,!1)},raw:z};Object.defineProperties(j,{isFullscreen:{get:function(){return Boolean(document[z.fullscreenElement])}},element:{enumerable:!0,get:function(){var t;return null!==(t=document[z.fullscreenElement])&&void 0!==t?t:void 0}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[z.fullscreenEnabled])}}}),z||(j={isEnabled:!1});const U=j;var Z=function(t){(0,s.Z)(f,t);var e,n,h=(e=f,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function f(t){var e;return(0,i.Z)(this,f),e=h.call(this,t),(0,c.Z)((0,a.Z)(e),"isFullscreen",!1),(0,c.Z)((0,a.Z)(e),"toggleFullscreen",(0,P.Z)(L().mark((function t(){return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!U.isEnabled){t.next=3;break}return t.next=3,U.toggle(e.mapContainer);case 3:case"end":return t.stop()}}),t)})))),(0,c.Z)((0,a.Z)(e),"onClick",(function(){e.toggleFullscreen()})),(0,c.Z)((0,a.Z)(e),"onFullscreenChange",(function(){e.isFullscreen=!!document.fullscreenElement;var t=e.controlOption,n=t.btnText,r=t.btnIcon,i=t.title,o=t.exitBtnText,a=t.exitBtnIcon,s=t.exitTitle;e.isFullscreen?(e.setBtnTitle(s),e.setBtnText(o),e.setBtnIcon(a)):(e.setBtnTitle(i),e.setBtnText(n),e.setBtnIcon(r)),e.emit("fullscreenChange",e.isFullscreen)})),U.isEnabled||console.warn("当前浏览器环境不支持对地图全屏化"),e}return(0,o.Z)(f,[{key:"setOptions",value:function(t){var e=t.exitBtnText,n=t.exitBtnIcon,r=t.exitTitle;this.isFullscreen&&(this.checkUpdateOption(t,["exitBtnIcon"])&&this.setBtnIcon(n),this.checkUpdateOption(t,["exitBtnText"])&&this.setBtnText(e),this.checkUpdateOption(t,["exitTitle"])&&this.setBtnTitle(r)),(0,b.Z)((0,l.Z)(f.prototype),"setOptions",this).call(this,t)}},{key:"onAdd",value:function(){var t=(0,b.Z)((0,l.Z)(f.prototype),"onAdd",this).call(this);return t.addEventListener("click",this.onClick),this.mapContainer=p.DOM.getContainer(this.scene.getSceneConfig().id),this.mapContainer.addEventListener("fullscreenchange",this.onFullscreenChange),t}},{key:"onRemove",value:function(){(0,b.Z)((0,l.Z)(f.prototype),"onRemove",this).call(this),this.mapContainer.removeEventListener("fullscreenchange",this.onFullscreenChange)}},{key:"getDefault",value:function(t){return(0,r.Z)((0,r.Z)({},(0,b.Z)((0,l.Z)(f.prototype),"getDefault",this).call(this,t)),{},{title:"全屏",btnIcon:I("l7-icon-fullscreen"),exitTitle:"退出全屏",exitBtnIcon:I("l7-icon-exit-fullscreen")})}}]),f}(S);var V=function(t){(0,s.Z)(p,t);var e,n,h=(e=p,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function p(t){var e;return(0,i.Z)(this,p),e=h.call(this,t),(0,c.Z)((0,a.Z)(e),"getGeoLocation",(function(){return new Promise((function(t,e){window.navigator.geolocation.getCurrentPosition((function(n){var r=n.coords,i=null!=r?r:{},o=i.longitude,a=i.latitude;(0,g.isNaN)(o)||(0,g.isNaN)(a)?e():t([o,a])}),(function(t){e(t)}))}))})),(0,c.Z)((0,a.Z)(e),"onClick",(0,P.Z)(L().mark((function t(){var n,r,i;return L().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(window.navigator.geolocation){t.next=2;break}return t.abrupt("return");case 2:return n=e.controlOption.transform,t.next=5,e.getGeoLocation();case 5:if(r=t.sent,i=e.mapsService.getZoom(),t.t0=e.mapsService,t.t1=i>15?i:15,!n){t.next=15;break}return t.next=12,n(r);case 12:t.t2=t.sent,t.next=16;break;case 15:t.t2=r;case 16:t.t3=t.t2,t.t0.setZoomAndCenter.call(t.t0,t.t1,t.t3);case 18:case"end":return t.stop()}}),t)})))),window.navigator.geolocation||console.warn("当前浏览器环境不支持获取地理定位"),e}return(0,o.Z)(p,[{key:"getDefault",value:function(t){return(0,r.Z)((0,r.Z)({},(0,b.Z)((0,l.Z)(p.prototype),"getDefault",this).call(this,t)),{},{title:"定位",btnIcon:I("l7-icon-reposition")})}},{key:"onAdd",value:function(){var t=(0,b.Z)((0,l.Z)(p.prototype),"onAdd",this).call(this);return t.addEventListener("click",this.onClick),t}}]),p}(S);var G=function(t){(0,s.Z)(p,t);var e,n,h=(e=p,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function p(){var t;(0,i.Z)(this,p);for(var e=arguments.length,n=new Array(e),r=0;r=10?10:n>=5?5:n>=3?3:n>=2?2:1)}},{key:"updateMetric",value:function(t){var e=this.getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this.updateScale(this.mScale,n,e/t)}},{key:"updateImperial",value:function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this.getRoundNum(e),this.updateScale(this.iScale,n+" mi",n/e)):(r=this.getRoundNum(i),this.updateScale(this.iScale,r+" ft",r/i))}}]),d}(w);var K=function(t){(0,s.Z)(d,t);var e,n,f=(e=d,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function d(){var t;(0,i.Z)(this,d);for(var e=arguments.length,n=new Array(e),r=0;rt.mapsService.getMinZoom()&&t.mapsService.zoomOut()})),(0,c.Z)((0,a.Z)(t),"updateDisabled",(function(){var e=t.mapsService;t.zoomInButton.removeAttribute("disabled"),t.zoomOutButton.removeAttribute("disabled"),(t.disabled||e.getZoom()<=e.getMinZoom())&&t.zoomOutButton.setAttribute("disabled","true"),(t.disabled||e.getZoom()>=e.getMaxZoom())&&t.zoomInButton.setAttribute("disabled","true")})),t}return(0,o.Z)(d,[{key:"getDefault",value:function(t){return(0,r.Z)((0,r.Z)({},(0,b.Z)((0,l.Z)(d.prototype),"getDefault",this).call(this,t)),{},{position:h.PositionType.BOTTOMRIGHT,name:"zoom",zoomInText:I("l7-icon-enlarge"),zoomInTitle:"Zoom in",zoomOutText:I("l7-icon-narrow"),zoomOutTitle:"Zoom out"})}},{key:"setOptions",value:function(t){(0,b.Z)((0,l.Z)(d.prototype),"setOptions",this).call(this,t),this.checkUpdateOption(t,["zoomInText","zoomInTitle","zoomOutText","zoomOutTitle"])&&this.resetButtonGroup(this.container)}},{key:"onAdd",value:function(){var t=p.DOM.create("div","l7-control-zoom");return this.resetButtonGroup(t),this.mapsService.on("zoomend",this.updateDisabled),this.mapsService.on("zoomchange",this.updateDisabled),t}},{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(t){p.DOM.clearChildren(t),this.zoomInButton=this.createButton(this.controlOption.zoomInText,this.controlOption.zoomInTitle,"l7-button-control",t,this.zoomIn),this.zoomOutButton=this.createButton(this.controlOption.zoomOutText,this.controlOption.zoomOutTitle,"l7-button-control",t,this.zoomOut),this.updateDisabled()}},{key:"createButton",value:function(t,e,n,r,i){var o=p.DOM.create("button",n,r);return"string"==typeof t?o.innerHTML=t:o.append(t),o.title=e,o.addEventListener("click",i),o}}]),d}(w);var J=function(t){(0,s.Z)(d,t);var e,n,f=(e=d,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function d(t){var e;(0,i.Z)(this,d),e=f.call(this),(0,c.Z)((0,a.Z)(e),"isShow",!0),(0,c.Z)((0,a.Z)(e),"onMouseMove",(function(t){var n,r=e.mapsService.getMapContainer(),i=null!==(n=null==r?void 0:r.getBoundingClientRect())&&void 0!==n?n:{},o=i.left,a=void 0===o?0:o,s=i.top,u=void 0===s?0:s;e.setPopupPosition(t.clientX-a,t.clientY-u)})),(0,c.Z)((0,a.Z)(e),"updateLngLatPosition",(function(){if(e.mapsService&&!e.popupOption.followCursor){var t=e.lngLat,n=t.lng,r=t.lat,i=e.mapsService.lngLatToContainer([n,r]),o=i.x,a=i.y;e.setPopupPosition(o,a)}})),(0,c.Z)((0,a.Z)(e),"onKeyDown",(function(t){27===t.keyCode&&e.remove()})),(0,c.Z)((0,a.Z)(e),"onCloseButtonClick",(function(t){t.stopPropagation&&t.stopPropagation(),e.hide()})),(0,c.Z)((0,a.Z)(e),"update",(function(){var t=!!e.lngLat,n=e.popupOption,r=n.className,i=n.style,o=n.maxWidth,a=n.anchor,s=n.stopPropagation;if(e.mapsService&&t&&e.content){var u=e.mapsService.getMarkerContainer();!e.container&&u&&(e.container=p.DOM.create("div","l7-popup ".concat(null!=r?r:""," ").concat(e.isShow?"":"l7-popup-hide"),u),i&&e.container.setAttribute("style",i),e.tip=p.DOM.create("div","l7-popup-tip",e.container),e.container.appendChild(e.content),s&&["mousemove","mousedown","mouseup","click","dblclick"].forEach((function(t){e.container.addEventListener(t,(function(t){t.stopPropagation()}))})),e.container.style.whiteSpace="nowrap"),e.updateLngLatPosition(),p.DOM.setTransform(e.container,"".concat(p.anchorTranslate[a])),(0,p.applyAnchorClass)(e.container,a,"popup"),o?e.container.getBoundingClientRect().width>parseFloat(o)&&(e.container.style.width=o):e.container.style.removeProperty("width")}})),e.popupOption=(0,r.Z)((0,r.Z)({},e.getDefault(null!=t?t:{})),t);var n=e.popupOption.lngLat;return n&&(e.lngLat=n),e}return(0,o.Z)(d,[{key:"lngLat",get:function(){var t;return null!==(t=this.popupOption.lngLat)&&void 0!==t?t:{lng:0,lat:0}},set:function(t){this.popupOption.lngLat=t}},{key:"getIsShow",value:function(){return this.isShow}},{key:"addTo",value:function(t){this.mapsService=t.get(h.TYPES.IMapService),this.sceneService=t.get(h.TYPES.ISceneService),this.layerService=t.get(h.TYPES.ILayerService),this.mapsService.on("camerachange",this.update),this.mapsService.on("viewchange",this.update),this.scene=t,this.update(),this.updateCloseOnClick(),this.updateCloseOnEsc(),this.updateFollowCursor();var e=this.popupOption,n=e.html,r=e.text,i=e.title;return n?this.setHTML(n):r&&this.setText(r),i&&this.setTitle(i),this.emit("open"),this}},{key:"remove",value:function(){if(null!=this&&this.isOpen())return this.content&&p.DOM.remove(this.content),this.container&&(p.DOM.remove(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(t){return this.show(),this.popupOption=(0,r.Z)((0,r.Z)({},this.popupOption),t),this.checkUpdateOption(t,["html","text","title","closeButton","closeButtonOffsets","maxWidth","anchor","stopPropagation","className","style","lngLat","offsets"])&&(this.container&&(p.DOM.remove(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(t,["closeOnEsc"])&&this.updateCloseOnEsc(),this.checkUpdateOption(t,["closeOnClick"])&&this.updateCloseOnClick(),this.checkUpdateOption(t,["followCursor"])&&this.updateFollowCursor(),this.checkUpdateOption(t,["html"])&&t.html?this.setHTML(t.html):this.checkUpdateOption(t,["text"])&&t.text&&this.setText(t.text),this.checkUpdateOption(t,["lngLat"])&&t.lngLat&&this.setLnglat(t.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&&p.DOM.removeClass(this.container,"l7-popup-hide"),this.isShow=!0,this.emit("show"),this}},{key:"hide",value:function(){if(this.isShow)return this.container&&p.DOM.addClass(this.container,"l7-popup-hide"),this.isShow=!1,this.emit("hide"),this}},{key:"setHTML",value:function(t){return this.popupOption.html=t,this.setDOMContent(t)}},{key:"setText",value:function(t){return this.popupOption.text=t,this.setDOMContent(window.document.createTextNode(t))}},{key:"setTitle",value:function(t){this.show(),this.popupOption.title=t,t?(this.contentTitle||(this.contentTitle=p.DOM.create("div","l7-popup-content__title"),this.content.firstChild?this.content.insertBefore(this.contentTitle,this.content.firstChild):this.content.append(this.contentTitle)),p.DOM.clearChildren(this.contentTitle),p.DOM.appendElementType(this.contentTitle,t)):this.contentTitle&&(p.DOM.remove(this.contentTitle),this.contentTitle=void 0)}},{key:"panToPopup",value:function(){var t=this.lngLat,e=t.lng,n=t.lat;return this.popupOption.autoPan&&this.mapsService.panTo([e,n]),this}},{key:"setLngLat",value:function(t){return this.setLnglat(t)}},{key:"setLnglat",value:function(t){var e=this;return this.show(),this.lngLat=t,Array.isArray(t)&&(this.lngLat={lng:t[0],lat:t[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(){e.panToPopup()}),0),this}},{key:"getLnglat",value:function(){return this.lngLat}},{key:"setMaxWidth",value:function(t){return this.popupOption.maxWidth=t,this.update(),this}},{key:"isOpen",value:function(){return!!this.mapsService}},{key:"getDefault",value:function(t){return{closeButton:!0,closeOnClick:!1,maxWidth:"240px",offsets:[0,0],anchor:p.anchorType.BOTTOM,stopPropagation:!0,autoPan:!1,autoClose:!0,closeOnEsc:!1,followCursor:!1}}},{key:"setDOMContent",value:function(t){return this.show(),this.createContent(),p.DOM.appendElementType(this.contentPanel,t),this.update(),this}},{key:"updateCloseOnClick",value:function(t){var e=this,n=this.mapsService;n&&(null==n||n.off("click",this.onCloseButtonClick),this.popupOption.closeOnClick&&!t&&requestAnimationFrame((function(){null==n||n.on("click",e.onCloseButtonClick)})))}},{key:"updateCloseOnEsc",value:function(t){window.removeEventListener("keydown",this.onKeyDown),this.popupOption.closeOnEsc&&!t&&window.addEventListener("keydown",this.onKeyDown)}},{key:"updateFollowCursor",value:function(t){var e,n=null===(e=this.mapsService)||void 0===e?void 0:e.getContainer();n&&(null==n||n.removeEventListener("mousemove",this.onMouseMove),this.popupOption.followCursor&&!t&&(null==n||n.addEventListener("mousemove",this.onMouseMove)))}},{key:"createContent",value:function(){var t=this;if(this.content&&p.DOM.remove(this.content),this.contentTitle=void 0,this.content=p.DOM.create("div","l7-popup-content",this.container),this.setTitle(this.popupOption.title),this.popupOption.closeButton){var e=I("l7-icon-guanbi");p.DOM.addClass(e,"l7-popup-close-button"),this.content.appendChild(e),this.popupOption.closeButtonOffsets&&(e.style.right=this.popupOption.closeButtonOffsets[0]+"px",e.style.top=this.popupOption.closeButtonOffsets[1]+"px"),e.setAttribute("aria-label","Close popup"),e.addEventListener("click",(function(){t.hide()})),this.closeButton=e}else this.closeButton=void 0;this.contentPanel=p.DOM.create("div","l7-popup-content__panel",this.content)}},{key:"setPopupPosition",value:function(t,e){if(this.container){var n=this.popupOption.offsets;this.container.style.left=t+n[0]+"px",this.container.style.top=e-n[1]+"px"}}},{key:"checkUpdateOption",value:function(t,e){return e.some((function(e){return e in t}))}}]),d}(f.EventEmitter);var Q=function(t){(0,s.Z)(f,t);var e,n,h=(e=f,n=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}}(),function(){var t,r=(0,l.Z)(e);if(n){var i=(0,l.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)});function f(){var t;(0,i.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r * + * {\n margin-left: 6px;\n}\n.l7-select-control--normal .l7-select-control-item input[type='checkbox'] {\n height: 14px;\n width: 14px;\n}\n.l7-select-control--normal .l7-select-control-item:hover {\n background-color: #f3f3f3;\n}\n.l7-select-control--image {\n padding: 12px 12px 0 12px;\n width: 474px;\n height: 320px;\n overflow: auto;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n}\n.l7-select-control--image .l7-select-control-item {\n margin-right: 12px;\n border-radius: 2px;\n overflow: hidden;\n border: 1px solid #fff;\n -webkit-box-sizing: content-box;\n box-sizing: content-box;\n width: calc((100% - 36px) / 3);\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n margin-bottom: 12px;\n position: relative;\n font-size: 12px;\n}\n.l7-select-control--image .l7-select-control-item img {\n width: 142px;\n height: 80px;\n}\n.l7-select-control--image .l7-select-control-item input[type='checkbox'] {\n position: absolute;\n right: 0;\n top: 0;\n}\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n line-height: 26px;\n}\n.l7-select-control--image .l7-select-control-item .l7-select-control-item-row > * + * {\n margin-left: 8px;\n}\n.l7-select-control--image .l7-select-control-item.l7-select-control-item-active {\n border-color: #0370fe;\n}\n.l7-select-control--image .l7-select-control-item:nth-child(3n) {\n margin-right: 0;\n}\n.l7-select-control-item {\n cursor: pointer;\n}\n.l7-select-control-item input[type='checkbox'] {\n margin: 0;\n cursor: pointer;\n}\n.l7-select-control--multiple .l7-select-control-item:hover {\n background-color: transparent;\n}\n.l7-control-logo {\n width: 89px;\n height: 16px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.l7-control-logo img {\n height: 100%;\n width: 100%;\n}\n.l7-control-logo .l7-control-logo-link {\n display: block;\n cursor: pointer;\n}\n.l7-control-logo .l7-control-logo-link img {\n cursor: pointer;\n}\n.l7-control-mouse-location {\n background-color: #fff;\n border-radius: 2px;\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n padding: 2px 4px;\n min-width: 130px;\n}\n.l7-control-zoom {\n -webkit-box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.15);\n border-radius: 2px;\n overflow: hidden;\n}\n.l7-control-zoom .l7-button-control {\n -webkit-box-shadow: 0 0 0;\n box-shadow: 0 0 0;\n border-radius: 0;\n font-size: 16px;\n}\n.l7-control-zoom .l7-button-control .l7-iconfont {\n width: 14px;\n height: 14px;\n}\n.l7-control-zoom .l7-button-control:first-child {\n border-bottom: 1px solid #f0f0f0;\n}\n.l7-control-scale {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-control-scale .l7-control-scale-line {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n padding: 2px 5px 1px;\n overflow: hidden;\n color: #595959;\n font-size: 10px;\n line-height: 1.1;\n white-space: nowrap;\n background: #fff;\n border: 2px solid #000;\n border-top: 0;\n -webkit-transition: width 0.1s;\n transition: width 0.1s;\n}\n.l7-control-scale .l7-control-scale-line + .l7-control-scale .l7-control-scale-line {\n margin-top: -2px;\n border-top: 2px solid #777;\n border-bottom: none;\n}\n.l7-right .l7-control-scale {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: end;\n -ms-flex-align: end;\n align-items: flex-end;\n}\n.l7-right .l7-control-scale .l7-control-scale-line {\n text-align: right;\n}\n.l7-popup {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 5;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n will-change: transform;\n pointer-events: none;\n}\n.l7-popup.l7-popup-hide {\n display: none;\n}\n.l7-popup .l7-popup-content {\n position: relative;\n padding: 16px;\n font-size: 14px;\n background: #fff;\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.l7-popup .l7-popup-content .l7-popup-content__title {\n margin-bottom: 8px;\n font-weight: bold;\n}\n.l7-popup .l7-popup-content .l7-popup-close-button,\n.l7-popup .l7-popup-content .l7-popup-content__title,\n.l7-popup .l7-popup-content .l7-popup-content__panel {\n white-space: normal;\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n pointer-events: initial;\n}\n.l7-popup .l7-popup-content .l7-popup-close-button {\n position: absolute;\n top: 0;\n right: 0;\n width: 18px;\n height: 18px;\n padding: 0;\n font-size: 14px;\n line-height: 18px;\n text-align: center;\n background-color: transparent;\n border: 0;\n border-radius: 0 3px 0 0;\n cursor: pointer;\n}\n.l7-popup .l7-popup-tip {\n position: relative;\n z-index: 1;\n width: 0;\n height: 0;\n border: 10px solid transparent;\n}\n.l7-popup.l7-popup-anchor-bottom,\n.l7-popup.l7-popup-anchor-bottom-left,\n.l7-popup.l7-popup-anchor-bottom-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: reverse;\n -ms-flex-direction: column-reverse;\n flex-direction: column-reverse;\n}\n.l7-popup.l7-popup-anchor-bottom .l7-popup-tip,\n.l7-popup.l7-popup-anchor-bottom-left .l7-popup-tip,\n.l7-popup.l7-popup-anchor-bottom-right .l7-popup-tip {\n bottom: 1px;\n}\n.l7-popup.l7-popup-anchor-top,\n.l7-popup.l7-popup-anchor-top-left,\n.l7-popup.l7-popup-anchor-top-right {\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n}\n.l7-popup.l7-popup-anchor-top .l7-popup-tip,\n.l7-popup.l7-popup-anchor-top-left .l7-popup-tip,\n.l7-popup.l7-popup-anchor-top-right .l7-popup-tip {\n top: 1px;\n}\n.l7-popup.l7-popup-anchor-left {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n}\n.l7-popup.l7-popup-anchor-right {\n -webkit-box-orient: horizontal;\n -webkit-box-direction: reverse;\n -ms-flex-direction: row-reverse;\n flex-direction: row-reverse;\n}\n.l7-popup-anchor-top .l7-popup-tip {\n position: relative;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-top: none;\n border-bottom-color: #fff;\n}\n.l7-popup-anchor-top-left .l7-popup-tip {\n -webkit-align-self: flex-start;\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-top: none;\n border-bottom-color: #fff;\n border-left: none;\n}\n.l7-popup-anchor-top-right .l7-popup-tip {\n -webkit-align-self: flex-end;\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-top: none;\n border-right: none;\n border-bottom-color: #fff;\n}\n.l7-popup-anchor-bottom .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-top-color: #fff;\n border-bottom: none;\n}\n.l7-popup-anchor-bottom-left .l7-popup-tip {\n -webkit-align-self: flex-start;\n -ms-flex-item-align: start;\n align-self: flex-start;\n border-top-color: #fff;\n border-bottom: none;\n border-left: none;\n}\n.l7-popup-anchor-bottom-right .l7-popup-tip {\n -webkit-align-self: flex-end;\n -ms-flex-item-align: end;\n align-self: flex-end;\n border-top-color: #fff;\n border-right: none;\n border-bottom: none;\n}\n.l7-popup-anchor-left .l7-popup-tip {\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-right-color: #fff;\n border-left: none;\n}\n.l7-popup-anchor-right .l7-popup-tip {\n right: 1px;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n border-right: none;\n border-left-color: #fff;\n}\n.l7-popup-anchor-top-left .l7-popup-content {\n border-top-left-radius: 0;\n}\n.l7-popup-anchor-top-right .l7-popup-content {\n border-top-right-radius: 0;\n}\n.l7-popup-anchor-bottom-left .l7-popup-content {\n border-bottom-left-radius: 0;\n}\n.l7-popup-anchor-bottom-right .l7-popup-content {\n border-bottom-right-radius: 0;\n}\n.l7-popup-track-pointer {\n display: none;\n}\n.l7-popup-track-pointer * {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n pointer-events: none;\n}\n.l7-map:hover .l7-popup-track-pointer {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n}\n.l7-map:active .l7-popup-track-pointer {\n display: none;\n}\n.l7-layer-popup__row {\n font-size: 12px;\n}\n.l7-layer-popup__row + .l7-layer-popup__row {\n margin-top: 4px;\n}\n")},108:(t,e,n)=>{"use strict";n.r(e),n.d(e,{AttributeType:()=>zr,BasePostProcessingPass:()=>Fn,BlendType:()=>H,CameraUniform:()=>Br,CoordinateSystem:()=>nt,CoordinateUniform:()=>vt,IDebugLog:()=>jr,ILayerStage:()=>Y,InteractionEvent:()=>wt,MapServiceEvent:()=>Zr,MaskOperation:()=>q,PassType:()=>cn,PositionType:()=>D,RasterTileType:()=>Ur,ScaleTypes:()=>Nr,SceneEventList:()=>Vr,StencilType:()=>W,StyleScaleType:()=>Fr,TYPES:()=>u,container:()=>Sr,createLayerContainer:()=>Tr,createSceneContainer:()=>Mr,gl:()=>kt,lazyInject:()=>xr,lazyMultiInject:()=>wr,packCircleVertex:()=>Dr}),n(171);var r,i=n(1883),o=n.n(i),a=n(7745),s=n(719),u={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"),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"),IFactoryNormalPass:Symbol.for("Factory"),IMultiPassRenderer:Symbol.for("IMultiPassRenderer"),SceneID:Symbol.for("SceneID"),MapConfig:Symbol.for("MapConfig")},l=n(3659),c=n(3192),h=n(6838),p=n(5161),f=n(6193),d=n(9097),m=n(6875),g=n(6297),y=n(5619),v=n(9361),_=n.n(v);function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);no&&(f=0,p++),s[t]={x:f,y:h+30*p,width:30,height:30,advance:r},f+=30}}));var d=r+2*i;return{mapping:s,xOffset:f,yOffset:h+p*d,canvasHeight:S(h+(p+1)*d)}}((0,l.Z)({getFontWidth:function(t){return d.measureText(t).width},fontHeight:1*a,buffer:s,characterSet:e,maxCanvasWidth:1024},n&&{mapping:n.mapping,xOffset:n.xOffset,yOffset:n.yOffset})),g=m.mapping,v=m.canvasHeight,b=m.xOffset,x=m.yOffset,w=d.getImageData(0,0,f.width,f.height);if(f.height=v,d.putImageData(w,0,0),A(d,i,a,o),u){var M,T=new(_())(a,s,c,h,i,o),O=d.getImageData(0,0,T.size,T.size),P=E(e);try{for(P.s();!(M=P.n()).done;){var k=M.value;if(p){var L=String.fromCharCode(parseInt(k.replace("&#x","").replace(";",""),16));C(T.draw(L),O)}else C(T.draw(k),O);d.putImageData(O,g[k].x,g[k].y)}}catch(t){P.e(t)}finally{P.f()}}else{var I,R=E(e);try{for(R.s();!(I=R.n()).done;){var D=I.value;d.fillText(D,g[D].x,g[D].y+1*a)}}catch(t){R.e(t)}finally{R.f()}}return{xOffset:b,yOffset:x,mapping:g,data:f,width:f.width,height:f.height}}},{key:"getKey",value:function(){var t=this.fontOptions,e=t.fontFamily,n=t.fontWeight;return"".concat(e,"_").concat(n)}},{key:"getNewChars",value:function(t,e){var n=this.cache.get(t);if(!n)return e;var r=[],i=n.mapping,o=new Set(Object.keys(i));return new Set(e).forEach((function(t){o.has(t)||r.push(t)})),r}}]),i}(i.EventEmitter))||r,k=n(800),L=n(1109),I=n.n(L);var R,D,N,F=(0,a.b2)()(O=function(t){(0,f.Z)(o,t);var e,n,r,i=(n=o,r=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}}(),function(){var t,e=(0,m.Z)(n);if(r){var i=(0,m.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,d.Z)(this,t)});function o(){var t;(0,c.Z)(this,o);for(var e=arguments.length,n=new Array(e),r=0;r1024&&(w(u,s,o),i=0,o=a+o+3,a=0,s=[]),s.push({icon:c,xOffset:i}),i=i+h+3,a=Math.max(a,h)}}}catch(t){l.e(t)}finally{l.f()}return s.length>0&&w(u,s,o),{mapping:u,canvasHeight:S(a+o+3)}}(this.iconData),e=t.mapping,n=t.canvasHeight;this.iconMap=e,this.canvasHeight=n}},{key:"loadImageMini",value:function(t,e){return new Promise((function(n,r){var i=e.createImage();i.crossOrigin="anonymous",i.onload=function(){n(i)},i.onerror=function(){r(new Error("Could not load image at "+t))},i.src=t}))}}]),o}(i.EventEmitter))||O,z=n(5162),B=n(2401),j=(0,a.b2)()(R=function(){function t(){(0,c.Z)(this,t),(0,g.Z)(this,"viewport",void 0),(0,g.Z)(this,"overridedViewProjectionMatrix",void 0),(0,g.Z)(this,"jitteredViewProjectionMatrix",void 0),(0,g.Z)(this,"jitteredProjectionMatrix",void 0),(0,g.Z)(this,"viewMatrixInverse",void 0),(0,g.Z)(this,"cameraPosition",void 0)}return(0,h.Z)(t,[{key:"init",value:function(){}},{key:"update",value:function(t){this.viewport=t,this.viewMatrixInverse=B.create(),B.invert(this.viewMatrixInverse,t.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 t=this.viewport.getCenter(),e=(0,z.Z)(t,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(t,e){return this.viewport.projectFlat(t,e)}},{key:"setViewProjectionMatrix",value:function(t){this.overridedViewProjectionMatrix=t}},{key:"jitterProjectionMatrix",value:function(t,e){var n=B.fromTranslation(B.create(),[t,e,0]);this.jitteredProjectionMatrix=B.multiply(B.create(),n,this.viewport.getProjectionMatrix()),this.jitteredViewProjectionMatrix=B.multiply(B.create(),this.jitteredProjectionMatrix,this.viewport.getViewMatrix())}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0,this.jitteredViewProjectionMatrix=void 0}}]),t}())||R,U=n(9908);function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&this.controls.splice(e,1),t.remove(),this}},{key:"addControls",value:function(){var t=this;this.unAddControls.forEach((function(e){e.addTo(t.scene),t.controls.push(e)})),this.unAddControls=[]}},{key:"destroy",value:function(){var t,e=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Z(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.controls);try{for(e.s();!(t=e.n()).done;)t.value.remove()}catch(t){e.e(t)}finally{e.f()}this.controls=[],this.clearControlPos()}},{key:"initControlPos",value:function(){var t=this.controlCorners={},e=this.controlContainer=y.DOM.create("div","l7-control-container",this.container);Object.values(D).forEach((function(n){var r,i;!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=n.map((function(t){return"l7-"+t})).join(" ");t[n.filter((function(t){return!["row","column"].includes(t)})).join("")]=y.DOM.create("div",r,e)}((r=n,i=r.replace(/^(top|bottom|left|right|center)/,"$1-").split("-"),[].concat((0,U.Z)(i),[X[r]])))})),this.checkCornerOverlap()}},{key:"clearControlPos",value:function(){for(var t in this.controlCorners)this.controlCorners[t]&&y.DOM.remove(this.controlCorners[t]);this.controlContainer&&y.DOM.remove(this.controlContainer)}},{key:"checkCornerOverlap",value:function(){var t=this,e=window.MutationObserver;if(e)for(var n=function(){var n=i[r].match(/^(top|bottom)(left|right)$/);if(n){var o=(0,z.Z)(n,3),a=o[1],s=o[2],u=t.controlCorners["".concat(a).concat(s)];new e((function(t){var e=(0,z.Z)(t,1)[0].target;u&&(u.style[a]=e.clientHeight+"px")})).observe(t.controlCorners["".concat(s).concat(a)],{childList:!0,attributes:!0})}},r=0,i=Object.keys(this.controlCorners);r-1&&this.markerLayers.splice(e,1)}},{key:"addMarker",value:function(t){this.mapsService.map&&this.mapsService.getMarkerContainer()?(this.markers.push(t),t.addTo(this.scene)):this.unAddMarkers.push(t)}},{key:"addMarkers",value:function(){var t=this;this.unAddMarkers.forEach((function(e){e.addTo(t.scene),t.markers.push(e)})),this.unAddMarkers=[]}},{key:"addMarkerLayers",value:function(){var t=this;this.unAddMarkerLayers.forEach((function(e){t.markerLayers.push(e),e.addTo(t.scene)})),this.unAddMarkers=[]}},{key:"removeMarker",value:function(t){t.remove(),this.markers.indexOf(t);var e=this.markers.indexOf(t);e>-1&&this.markers.splice(e,1)}},{key:"removeAllMarkers",value:function(){this.destroy()}},{key:"init",value:function(t){this.scene=t,this.mapsService=t.get(u.IMapService)}},{key:"destroy",value:function(){this.markers.forEach((function(t){t.remove()})),this.markers=[],this.markerLayers.forEach((function(t){t.destroy()})),this.markerLayers=[]}},{key:"removeMakerLayerMarker",value:function(t){t.destroy()}}]),t}())||V,J=(0,a.b2)()(G=function(){function t(){(0,c.Z)(this,t),(0,g.Z)(this,"scene",void 0),(0,g.Z)(this,"mapsService",void 0),(0,g.Z)(this,"popups",[]),(0,g.Z)(this,"unAddPopups",[])}return(0,h.Z)(t,[{key:"isMarkerReady",get:function(){return this.mapsService.map&&this.mapsService.getMarkerContainer()}},{key:"removePopup",value:function(t){null!=t&&t.isOpen()&&t.remove();var e=this.popups.indexOf(t);e>-1&&this.popups.splice(e,1);var n=this.unAddPopups.indexOf(t);n>-1&&this.unAddPopups.splice(n,1)}},{key:"destroy",value:function(){this.popups.forEach((function(t){return t.remove()}))}},{key:"addPopup",value:function(t){var e=this;t&&t.getOptions().autoClose&&[].concat((0,U.Z)(this.popups),(0,U.Z)(this.unAddPopups)).forEach((function(t){t.getOptions().autoClose&&e.removePopup(t)})),this.isMarkerReady?(t.addTo(this.scene),this.popups.push(t)):this.unAddPopups.push(t),t.on("close",(function(){e.removePopup(t)}))}},{key:"initPopup",value:function(){var t=this;this.unAddPopups.length&&this.unAddPopups.forEach((function(e){t.addPopup(e),t.unAddPopups=[]}))}},{key:"init",value:function(t){this.scene=t,this.mapsService=t.get(u.IMapService)}}]),t}())||G,Q=n(9479);!function(t){t.normal="normal",t.additive="additive",t.subtractive="subtractive",t.min="min",t.max="max",t.none="none"}(H||(H={})),function(t){t.MULTIPLE="MULTIPLE",t.SINGLE="SINGLE"}(W||(W={})),function(t){t.AND="and",t.OR="or"}(q||(q={})),function(t){t.INIT="init",t.UPDATE="update"}(Y||(Y={}));const tt={MapToken:"您正在使用 Demo 测试 Token, 生产环境务必自行注册 Token 确保服务稳定",SDK:"请确认引入了mapbox-gl api且在L7之前引入"};var et,nt,rt={id:"map",logoPosition:"bottomleft",logoVisible:!0,antialias:!0,stencil:!0,isMini:!1,preserveDrawingBuffer:!1,pickBufferScale:1,fitBoundsOptions:{animate:!1}},it={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:q.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},ot=(0,a.b2)()(et=function(){function t(){(0,c.Z)(this,t),(0,g.Z)(this,"sceneConfigCache",{}),(0,g.Z)(this,"layerConfigCache",{}),(0,g.Z)(this,"layerAttributeConfigCache",{})}return(0,h.Z)(t,[{key:"getSceneConfig",value:function(t){return this.sceneConfigCache[t]}},{key:"getSceneWarninfo",value:function(t){return tt[t]}},{key:"setSceneConfig",value:function(t,e){this.sceneConfigCache[t]=(0,l.Z)((0,l.Z)({},rt),e)}},{key:"getLayerConfig",value:function(t){return this.layerConfigCache[t]}},{key:"setLayerConfig",value:function(t,e,n){this.layerConfigCache[e]=(0,l.Z)({},(0,Q.merge)({},this.sceneConfigCache[t],it,n))}},{key:"getAttributeConfig",value:function(t){return this.layerAttributeConfigCache[t]}},{key:"setAttributeConfig",value:function(t,e){this.layerAttributeConfigCache[t]=(0,l.Z)((0,l.Z)({},this.layerAttributeConfigCache[t]),e)}},{key:"clean",value:function(){this.sceneConfigCache={},this.layerConfigCache={}}}]),t}())||et,at=n(6902),st=n(7677),ut=n(5512),lt=Math.PI/180,ct=4003e4;function ht(t){var e=t.latitude,n=void 0===e?0:e,r=t.zoom,i=void 0===r?0:r,o=t.scale,a=t.highPrecision,s=void 0!==a&&a,u=t.flipY,l=void 0!==u&&u,c={},h=512*(o=void 0!==o?o:Math.pow(2,i)),p=Math.cos(n*lt),f=h/360,d=f/p,m=h/ct/p;if(c.pixelsPerMeter=[m,-m,m],c.metersPerPixel=[1/m,-1/m,1/m],c.pixelsPerDegree=[f,-d,m],c.degreesPerPixel=[1/f,-1/d,1/m],s){var g=lt*Math.tan(n*lt)/p,y=f*g/2,v=h/ct*g,_=v/d*m;c.pixelsPerDegree2=[0,-y,v],c.pixelsPerMeter2=[_,0,_],l&&(c.pixelsPerDegree2[1]=-c.pixelsPerDegree2[1],c.pixelsPerMeter2[1]=-c.pixelsPerMeter2[1])}return l&&(c.pixelsPerMeter[1]=-c.pixelsPerMeter[1],c.metersPerPixel[1]=-c.metersPerPixel[1],c.pixelsPerDegree[1]=-c.pixelsPerDegree[1],c.degreesPerPixel[1]=-c.degreesPerPixel[1]),c}!function(t){t[t.LNGLAT=1]="LNGLAT",t[t.LNGLAT_OFFSET=2]="LNGLAT_OFFSET",t[t.VECTOR_TILE=3]="VECTOR_TILE",t[t.IDENTITY=4]="IDENTITY",t[t.P20=5]="P20",t[t.P20_OFFSET=6]="P20_OFFSET",t[t.METER_OFFSET=7]="METER_OFFSET",t[t.P20_2=8]="P20_2"}(nt||(nt={}));var pt,ft,dt,mt,gt,yt,vt={CoordinateSystem:"u_CoordinateSystem",ViewportCenter:"u_ViewportCenter",ViewportCenterProjection:"u_ViewportCenterProjection",PixelsPerDegree:"u_PixelsPerDegree",PixelsPerDegree2:"u_PixelsPerDegree2",PixelsPerMeter:"u_PixelsPerMeter",Mvp:"u_Mvp"},_t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],bt=(pt=(0,a.b2)(),ft=(0,a.f3)(u.ICameraService),pt((mt=function(){function t(){(0,c.Z)(this,t),(0,g.Z)(this,"needRefresh",!0),(0,at.Z)(this,"cameraService",gt,this),(0,g.Z)(this,"coordinateSystem",void 0),(0,g.Z)(this,"viewportCenter",void 0),(0,g.Z)(this,"viewportCenterProjection",void 0),(0,g.Z)(this,"pixelsPerDegree",void 0),(0,g.Z)(this,"pixelsPerDegree2",void 0),(0,g.Z)(this,"pixelsPerMeter",void 0)}return(0,h.Z)(t,[{key:"refresh",value:function(t){var e=this.cameraService.getZoom(),n=this.cameraService.getZoomScale(),r=t||this.cameraService.getCenter(),i=ht({latitude:r[1],zoom:e}),o=i.pixelsPerMeter,a=i.pixelsPerDegree;this.viewportCenter=r,this.viewportCenterProjection=[0,0,0,0],this.pixelsPerMeter=o,this.pixelsPerDegree=a,this.pixelsPerDegree2=[0,0,0],this.coordinateSystem===nt.LNGLAT||this.coordinateSystem===nt.P20?this.cameraService.setViewProjectionMatrix(void 0):this.coordinateSystem===nt.LNGLAT_OFFSET?this.calculateLnglatOffset(r,e):this.coordinateSystem===nt.P20_OFFSET&&this.calculateLnglatOffset(r,e,n,!0),this.needRefresh=!1}},{key:"getCoordinateSystem",value:function(){return this.coordinateSystem}},{key:"setCoordinateSystem",value:function(t){this.coordinateSystem=t}},{key:"getViewportCenter",value:function(){return this.viewportCenter}},{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(t,e,n,r){var i=ht({latitude:t[1],zoom:e,scale:n,flipY:r,highPrecision:!0}),o=i.pixelsPerMeter,a=i.pixelsPerDegree,s=i.pixelsPerDegree2,u=this.cameraService.getViewMatrix(),l=this.cameraService.getProjectionMatrix(),c=B.multiply([],l,u),h=this.cameraService.projectFlat([Math.fround(t[0]),Math.fround(t[1])],Math.pow(2,e));this.viewportCenterProjection=ut.fF([],[h[0],h[1],0,1],c),u=this.cameraService.getViewMatrixUncentered()||u,c=B.multiply([],l,u),c=B.multiply([],c,_t),this.cameraService.setViewProjectionMatrix(c),this.pixelsPerMeter=o,this.pixelsPerDegree=a,this.pixelsPerDegree2=s}}]),t}(),gt=(0,st.Z)(mt.prototype,"cameraService",[ft],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dt=mt))||dt),xt=n(7743);var wt,St,Et,Mt,Tt,At,Ct=(0,a.b2)()(yt=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){var t;(0,c.Z)(this,i);for(var e=arguments.length,n=new Array(e),o=0;od-1*y.DOM.DPR||b<0||x>m-1*y.DOM.DPR||x<0)return!1;var w=h({x:Math.floor(b/e.pickBufferScale),y:Math.floor((m-(i+1)*y.DOM.DPR)/e.pickBufferScale),width:1,height:1,data:new Uint8Array(4),framebuffer:e.pickingFBO});if(e.pickedColors=w,0!==w[0]||0!==w[1]||0!==w[2]){var S=(0,y.decodePickingColor)(w),E=t.layerPickService.getFeatureById(S);S!==t.getCurrentPickId()&&"mousemove"===a&&(a="mouseenter");var M={x:r,y:i,type:a,lngLat:o,featureId:S,feature:E,target:s};E&&(u=!0,t.setCurrentPickId(S),e.triggerHoverOnLayer(t,M))}else{var T={x:r,y:i,lngLat:o,type:null!==t.getCurrentPickId()&&"mousemove"===a?"mouseout":"un"+a,featureId:null,target:s,feature:null};e.triggerHoverOnLayer(t,(0,l.Z)((0,l.Z)({},T),{},{type:"unpick"})),e.triggerHoverOnLayer(t,T),t.setCurrentPickId(null)}if(v&&t.layerPickService.highlightPickedFeature(w),_&&"click"===a&&(null==w?void 0:w.toString())!==[0,0,0,0].toString()){var A=(0,y.decodePickingColor)(w);null===t.getCurrentSelectedId()||A!==t.getCurrentSelectedId()?(t.layerPickService.selectFeature(w),t.setCurrentSelectedId(A)):(t.layerPickService.selectFeature(new Uint8Array([0,0,0,0])),t.setCurrentSelectedId(null))}return u}))}var e,n,r;return(0,h.Z)(t,[{key:"init",value:function(t){var e=this.rendererService,n=e.createTexture2D,r=e.createFramebuffer,i=e.getContainer,o=this.getContainerSize(i()),a=o.width,s=o.height;a*=y.DOM.DPR,s*=y.DOM.DPR,this.pickBufferScale=this.configService.getSceneConfig(t).pickBufferScale||1,this.pickingFBO=r({color:n({width:Math.round(a/this.pickBufferScale),height:Math.round(s/this.pickBufferScale),wrapS:kt.CLAMP_TO_EDGE,wrapT:kt.CLAMP_TO_EDGE})}),this.interactionService.on(wt.Hover,this.pickingAllLayer.bind(this))}},{key:"boxPickLayer",value:(r=(0,k.Z)(I().mark((function t(e,n,r){var i,o,a,s=this;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=this.rendererService,o=i.useFramebuffer,a=i.clear,this.resizePickingFBO(),o(this.pickingFBO,(function(){a({framebuffer:s.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),e.hooks.beforePickingEncode.call(),e.renderModels({ispick:!0}),e.hooks.afterPickingEncode.call();var t=s.pickBox(e,n);r(t)}));case 3:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return r.apply(this,arguments)})},{key:"pickBox",value:function(t,e){var n=this,r=e.map((function(t){var e=t<0?0:t;return Math.floor(e*y.DOM.DPR/n.pickBufferScale)})),i=(0,z.Z)(r,4),o=i[0],a=i[1],s=i[2],u=i[3],c=this.rendererService,h=c.readPixels,p=c.getContainer,f=this.getContainerSize(p()),d=f.width,m=f.height;if(d*=y.DOM.DPR,m*=y.DOM.DPR,o>(d-1)*y.DOM.DPR/this.pickBufferScale||s<0||a>(m-1)*y.DOM.DPR/this.pickBufferScale||u<0)return[];for(var g=Math.min(d/this.pickBufferScale,s)-o,v=Math.min(m/this.pickBufferScale,u)-a,_=h({x:o,y:Math.floor(m/this.pickBufferScale-(u+1)),width:g,height:v,data:new Uint8Array(g*v*4),framebuffer:this.pickingFBO}),b=[],x={},w=0;w<_.length/4;w+=1){var S=_.slice(4*w,4*w+4),E=(0,y.decodePickingColor)(S);if(-1!==E&&!x[E]){var M=t.layerPickService.getFeatureById(E);b.push((0,l.Z)((0,l.Z)({},M),{},{pickedFeatureIdx:E})),x[E]=!0}}return b}},{key:"handleCursor",value:function(t,e){var n=t.getLayerConfig(),r=n.cursor,i=void 0===r?"":r;if(n.cursorEnabled){var o="GAODE2.x"===this.mapService.version?this.mapService.getMapContainer():this.mapService.getMarkerContainer(),a=null==o?void 0:o.style.getPropertyValue("cursor");"unmousemove"===e&&""!==a?null==o||o.style.setProperty("cursor",""):"mousemove"===e&&(null==o||o.style.setProperty("cursor",i))}}},{key:"destroy",value:function(){this.pickingFBO.destroy(),this.pickingFBO=null}},{key:"getContainerSize",value:function(t){return t.getContext?{width:t.width/y.DOM.DPR,height:t.height/y.DOM.DPR}:t.getBoundingClientRect()}},{key:"pickingAllLayer",value:(n=(0,k.Z)(I().mark((function t(e){return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.layerService.needPick(e.type)&&this.isPickingAllLayer()){t.next=2;break}return t.abrupt("return");case 2:return this.alreadyInPicking=!0,t.next=5,this.pickingLayers(e);case 5:this.layerService.renderLayers(),this.alreadyInPicking=!1;case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"isPickingAllLayer",value:function(){return!(this.alreadyInPicking||this.layerService.alreadyInRendering||this.interactionService.indragging||!this.layerService.getShaderPickStat())}},{key:"resizePickingFBO",value:function(){var t=this.rendererService.getContainer,e=this.getContainerSize(t()),n=e.width,r=e.height;n*=y.DOM.DPR,r*=y.DOM.DPR,this.width===n&&this.height===r||(this.pickingFBO.resize({width:Math.round(n/this.pickBufferScale),height:Math.round(r/this.pickBufferScale)}),this.width=n,this.height=r)}},{key:"pickingLayers",value:(e=(0,k.Z)(I().mark((function t(e){var n,r,i,o=this;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=this.rendererService,r=n.useFramebuffer,i=n.clear,this.resizePickingFBO(),r(this.pickingFBO,(function(){o.layerService.getRenderList().filter((function(t){return t.needPick(e.type)})).reverse().some((function(t){i({framebuffer:o.pickingFBO,color:[0,0,0,0],stencil:0,depth:1}),t.layerPickService.pickRender(e);var n=o.pickFromPickingFBO(t,e);return o.layerService.pickedLayerId=n?+t.id:-1,n&&!t.getLayerConfig().enablePropagation}))}));case 3:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"triggerHoverOnLayer",value:function(t,e){(function(t){var e,n=!0;if((null==t||null===(e=t.target)||void 0===e?void 0:e.target)instanceof HTMLElement)for(var r,i=null==t||null===(r=t.target)||void 0===r?void 0:r.target;i;){var o,a=Array.from(i.classList);if(a.includes("l7-marker")||a.includes("l7-popup")){n=!1;break}i=null===(o=i)||void 0===o?void 0:o.parentElement}return n})(e)&&(this.handleCursor(t,e.type),t.emit(e.type,e))}}]),t}(),jt=(0,st.Z)(Bt.prototype,"mapService",[It],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ut=(0,st.Z)(Bt.prototype,"rendererService",[Rt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Zt=(0,st.Z)(Bt.prototype,"configService",[Dt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Vt=(0,st.Z)(Bt.prototype,"interactionService",[Nt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Gt=(0,st.Z)(Bt.prototype,"layerService",[Ft],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),zt=Bt))||zt),oe=function(){function t(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];(0,c.Z)(this,t),(0,g.Z)(this,"autoStart",void 0),(0,g.Z)(this,"startTime",0),(0,g.Z)(this,"oldTime",0),(0,g.Z)(this,"running",!1),(0,g.Z)(this,"elapsedTime",0),this.autoStart=e}return(0,h.Z)(t,[{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 t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}]),t}();function ae(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return se(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?se(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function se(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n-1&&n.layerChildren.splice(r,1):(i=this.layers.indexOf(e))>-1&&this.layers.splice(i,1),e.destroy(),this.reRender(),this.emit("layerChange",this.layers);case 4:case"end":return t.stop()}}),t,this)}))),function(t,e){return o.apply(this,arguments)})},{key:"removeAllLayers",value:(i=(0,k.Z)(I().mark((function t(){return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:this.destroy(),this.reRender();case 2:case"end":return t.stop()}}),t,this)}))),function(){return i.apply(this,arguments)})},{key:"setEnableRender",value:function(t){this.enableRender=t}},{key:"renderLayers",value:(r=(0,k.Z)(I().mark((function t(){var e,n,r,i,o,a;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.alreadyInRendering&&this.enableRender){t.next=2;break}return t.abrupt("return");case 2:this.updateLayerRenderList(),e=this.debugService.generateRenderUid(),this.debugService.renderStart(e),this.alreadyInRendering=!0,this.clear(),n=ae(this.layerList),t.prev=8,n.s();case 10:if((r=n.n()).done){t.next=23;break}if(i=r.value,o=i.getLayerConfig(),a=o.enableMask,i.masks.filter((function(t){return t.inited})).length>0&&a&&this.renderMask(i.masks),!i.getLayerConfig().enableMultiPassRenderer){t.next=19;break}return t.next=17,i.renderMultiPass();case 17:t.next=21;break;case 19:return t.next=21,i.render();case 21:t.next=10;break;case 23:t.next=28;break;case 25:t.prev=25,t.t0=t.catch(8),n.e(t.t0);case 28:return t.prev=28,n.f(),t.finish(28);case 31:this.debugService.renderEnd(e),this.alreadyInRendering=!1;case 33:case"end":return t.stop()}}),t,this,[[8,25,28,31]])}))),function(){return r.apply(this,arguments)})},{key:"renderMask",value:function(t){var e=0;this.renderService.clear({stencil:0,depth:1,framebuffer:null});var n,r=t.length>1?W.MULTIPLE:W.SINGLE,i=ae(t);try{for(i.s();!(n=i.n()).done;)n.value.render({isStencil:!0,stencilType:r,stencilIndex:e++})}catch(t){i.e(t)}finally{i.f()}}},{key:"beforeRenderData",value:(n=(0,k.Z)(I().mark((function t(e){return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.hooks.beforeRenderData.promise();case 2:t.sent&&this.renderLayers();case 4:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"renderTileLayerMask",value:function(t){var e=0,n=t.getLayerConfig().enableMask,r=void 0===n||n,i=t.tileMask?1:0,o=t.masks.filter((function(t){return t.inited})),a=(i+=r?o.length:1)>1?W.MULTIPLE:W.SINGLE;if((t.tileMask||o.length&&r)&&this.renderService.clear({stencil:0,depth:1,framebuffer:null}),o.length&&r){var s,u=ae(o);try{for(u.s();!(s=u.n()).done;)s.value.render({isStencil:!0,stencilType:a,stencilIndex:e++})}catch(t){u.e(t)}finally{u.f()}}t.tileMask&&t.tileMask.render({isStencil:!0,stencilType:a,stencilIndex:e++,stencilOperation:q.OR})}},{key:"renderTileLayer",value:(e=(0,k.Z)(I().mark((function t(e){return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.renderTileLayerMask(e),!e.getLayerConfig().enableMultiPassRenderer){t.next=6;break}return t.next=4,e.renderMultiPass();case 4:t.next=8;break;case 6:return t.next=8,e.render();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"updateLayerRenderList",value:function(){var t=this;this.layerList=[],this.layers.filter((function(t){return t.inited})).filter((function(t){return t.isVisible()})).sort((function(t,e){return t.zIndex-e.zIndex})).forEach((function(e){t.layerList.push(e)}))}},{key:"destroy",value:function(){this.layers.forEach((function(t){t.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 t=(0,y.rgb2arr)(this.mapService.bgColor);this.renderService.clear({color:t,depth:1,stencil:0,framebuffer:null})}},{key:"runRender",value:function(){this.renderLayers(),this.layerRenderID=y.$window.requestAnimationFrame(this.runRender.bind(this))}},{key:"stopRender",value:function(){y.$window.cancelAnimationFrame(this.layerRenderID)}}]),v}(i.EventEmitter),ee=(0,st.Z)(te.prototype,"renderService",[$t],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ne=(0,st.Z)(te.prototype,"mapService",[Kt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),re=(0,st.Z)(te.prototype,"debugService",[Jt],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qt=te))||Qt),$e=n(2718),Ke=function(){function t(e){var n=this;(0,c.Z)(this,t),(0,g.Z)(this,"name",void 0),(0,g.Z)(this,"type",void 0),(0,g.Z)(this,"scale",void 0),(0,g.Z)(this,"descriptor",void 0),(0,g.Z)(this,"featureBufferLayout",[]),(0,g.Z)(this,"needRescale",!1),(0,g.Z)(this,"needRemapping",!1),(0,g.Z)(this,"needRegenerateVertices",!1),(0,g.Z)(this,"featureRange",{startIndex:0,endIndex:1/0}),(0,g.Z)(this,"vertexAttribute",void 0),(0,g.Z)(this,"defaultCallback",(function(t){var e;return 0===t.length?(null===(e=n.scale)||void 0===e?void 0:e.defaultValues)||[]:t.map((function(t,e){var r;return(null===(r=n.scale)||void 0===r?void 0:r.scalers[e].func)(t)}))})),this.setProps(e)}return(0,h.Z)(t,[{key:"setProps",value:function(t){Object.assign(this,t)}},{key:"mapping",value:function(t){var e;if(null!==(e=this.scale)&&void 0!==e&&e.callback){var n,r=null===(n=this.scale)||void 0===n?void 0:n.callback.apply(n,(0,U.Z)(t));if(!(0,Q.isNil)(r))return[r]}return this.defaultCallback(t)}},{key:"resetDescriptor",value:function(){this.descriptor&&(this.descriptor.buffer.data=[])}}]),t}(),Je=["buffer","update","name"],Qe=["buffer","update","name"],tn=(ue={},(0,g.Z)(ue,kt.FLOAT,4),(0,g.Z)(ue,kt.UNSIGNED_BYTE,1),(0,g.Z)(ue,kt.UNSIGNED_SHORT,2),ue),en=(le=(0,a.b2)(),ce=(0,a.f3)(u.IRendererService),le((pe=function(){function t(){(0,c.Z)(this,t),(0,g.Z)(this,"attributesAndIndices",void 0),(0,at.Z)(this,"rendererService",fe,this),(0,g.Z)(this,"attributes",[]),(0,g.Z)(this,"triangulation",void 0),(0,g.Z)(this,"featureLayout",{sizePerElement:0,elements:[]})}return(0,h.Z)(t,[{key:"registerStyleAttribute",value:function(t){var e=this.getLayerStyleAttribute(t.name||"");return e?e.setProps(t):(e=new Ke(t),this.attributes.push(e)),e}},{key:"unRegisterStyleAttribute",value:function(t){var e=this.attributes.findIndex((function(e){return e.name===t}));e>-1&&this.attributes.splice(e,1)}},{key:"updateScaleAttribute",value:function(t){this.attributes.forEach((function(e){var n,r=e.name,i=null===(n=e.scale)||void 0===n?void 0:n.field;(t[r]||i&&t[i])&&(e.needRescale=!0,e.needRemapping=!0,e.needRegenerateVertices=!0)}))}},{key:"updateStyleAttribute",value:function(t,e,n){var r=this.getLayerStyleAttribute(t);r||(r=this.registerStyleAttribute((0,l.Z)((0,l.Z)({},e),{},{name:t})));var i=e.scale;i&&r&&(r.scale=i,r.needRescale=!0,r.needRemapping=!0,r.needRegenerateVertices=!0,n&&n.featureRange&&(r.featureRange=n.featureRange))}},{key:"getLayerStyleAttributes",value:function(){return this.attributes}},{key:"getLayerStyleAttribute",value:function(t){return this.attributes.find((function(e){return e.name===t}))}},{key:"getLayerAttributeScale",value:function(t){var e,n=this.getLayerStyleAttribute(t),r=null==n||null===(e=n.scale)||void 0===e?void 0:e.scalers;return r&&r[0]?r[0].func:null}},{key:"updateAttributeByFeatureRange",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=this.attributes.find((function(e){return e.name===t}));if(o&&o.descriptor){var a=o.descriptor,s=a.update,u=a.buffer,l=a.size,c=void 0===l?0:l,h=tn[u.type||kt.FLOAT];if(s){var p=this.featureLayout,f=p.elements,d=p.sizePerElement,m=f.slice(n,r);if(!m.length)return;var g=m[0].offset*c*h,y=m.map((function(t,n){for(var r=t.featureIdx,i=t.vertices,o=t.normals,a=i.length/d,u=[],l=0;l1&&(a=i[1].trim()),n){case"bool":a="true"===a;break;case"float":case"int":a=Number(a);break;case"vec2":case"vec3":case"vec4":case"ivec2":case"ivec3":case"ivec4":case"mat2":case"mat3":case"mat4":a=a?a.replace("[","").replace("]","").split(",").reduce((function(t,e){return t.push(Number(e.trim())),t}),[]):new Array(function(t){var e=0;switch(t){case"vec2":case"ivec2":e=2;break;case"vec3":case"ivec3":e=3;break;case"vec4":case"ivec4":case"mat2":e=4;break;case"mat3":e=9;break;case"mat4":e=16}return e}(n)).fill(0)}return e[o]=a,"uniform ".concat(n," ").concat(o,";\n")})),uniforms:e}}var cn,hn,pn="#define PI 3.14159265359",fn=/precision\s+(high|low|medium)p\s+float/,dn=/#pragma include (["^+"]?["[a-zA-Z_0-9](.*)"]*?)/g,mn=/void\s+main\s*\([^)]*\)\s*\{\n?/,gn=(0,a.b2)()(an=function(){function t(){(0,c.Z)(this,t),(0,g.Z)(this,"moduleCache",{}),(0,g.Z)(this,"rawContentCache",{})}return(0,h.Z)(t,[{key:"registerBuiltinModules",value:function(){this.destroy(),this.registerModule("common",{vs:pn,fs:pn}),this.registerModule("decode",{vs:"#define SHIFT_RIGHT17 1.0 / 131072.0\n#define SHIFT_RIGHT18 1.0 / 262144.0\n#define SHIFT_RIGHT19 1.0 / 524288.0\n#define SHIFT_RIGHT20 1.0 / 1048576.0\n#define SHIFT_RIGHT21 1.0 / 2097152.0\n#define SHIFT_RIGHT22 1.0 / 4194304.0\n#define SHIFT_RIGHT23 1.0 / 8388608.0\n#define SHIFT_RIGHT24 1.0 / 16777216.0\n\n#define SHIFT_LEFT17 131072.0\n#define SHIFT_LEFT18 262144.0\n#define SHIFT_LEFT19 524288.0\n#define SHIFT_LEFT20 1048576.0\n#define SHIFT_LEFT21 2097152.0\n#define SHIFT_LEFT22 4194304.0\n#define SHIFT_LEFT23 8388608.0\n#define SHIFT_LEFT24 16777216.0\n\nvec2 unpack_float(float packedValue) {\n int packedIntValue = int(packedValue);\n int v0 = packedIntValue / 256;\n return vec2(v0, packedIntValue - v0 * 256);\n}\n\nvec4 decode_color(vec2 encodedColor) {\n return vec4(\n unpack_float(encodedColor[0]) / 255.0,\n unpack_float(encodedColor[1]) / 255.0\n );\n}\n",fs:""}),this.registerModule("projection",{vs:"#define TILE_SIZE 512.0\n#define PI 3.1415926536\n#define WORLD_SCALE TILE_SIZE / (PI * 2.0)\n\n#define COORDINATE_SYSTEM_LNGLAT 1.0 // mapbox\n#define COORDINATE_SYSTEM_LNGLAT_OFFSET 2.0 // mapbox offset\n#define COORDINATE_SYSTEM_VECTOR_TILE 3.0\n#define COORDINATE_SYSTEM_IDENTITY 4.0\n#define COORDINATE_SYSTEM_P20 5.0 // amap\n#define COORDINATE_SYSTEM_P20_OFFSET 6.0 // amap offset\n#define COORDINATE_SYSTEM_METER_OFFSET 7.0\n\n#define COORDINATE_SYSTEM_P20_2 8.0 // amap2.0\n\nuniform mat4 u_ViewMatrix;\nuniform mat4 u_ProjectionMatrix;\nuniform mat4 u_ViewProjectionMatrix;\nuniform float u_Zoom : 1;\nuniform float u_ZoomScale : 1;\n\nuniform float u_CoordinateSystem;\nuniform vec2 u_ViewportCenter;\nuniform vec4 u_ViewportCenterProjection;\nuniform vec3 u_PixelsPerDegree;\nuniform vec3 u_PixelsPerDegree2;\nuniform vec3 u_PixelsPerMeter;\n\nuniform vec2 u_ViewportSize;\nuniform float u_DevicePixelRatio;\nuniform float u_FocalDistance;\nuniform vec3 u_CameraPosition;\n\n// uniform mat4 u_Mvp;\n\n// web mercator coords -> world coords\nvec2 project_mercator(vec2 lnglat) {\n float x = lnglat.x;\n return vec2(\n radians(x) + PI,\n PI - log(tan(PI * 0.25 + radians(lnglat.y) * 0.5))\n );\n}\n\nfloat project_scale(float meters) {\n return meters * u_PixelsPerMeter.z;\n}\n\n\n// offset coords -> world coords\nvec4 project_offset(vec4 offset) {\n float dy = offset.y;\n dy = clamp(dy, -1., 1.);\n vec3 pixels_per_unit = u_PixelsPerDegree + u_PixelsPerDegree2 * dy;\n return vec4(offset.xyz * pixels_per_unit, offset.w);\n}\n\nvec3 project_normal(vec3 normal) {\n vec4 normal_modelspace = u_ModelMatrix * vec4(normal, 0.0);\n return normalize(normal_modelspace.xyz * u_PixelsPerMeter);\n}\n\nvec3 project_offset_normal(vec3 vector) {\n if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01\n || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // normals generated by the polygon tesselator are in lnglat offsets instead of meters\n return normalize(vector * u_PixelsPerDegree);\n }\n return project_normal(vector);\n}\n// || u_CoordinateSystem < COORDINATE_SYSTEM_P20_OFFSET + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_P20_OFFSET - 0.01\n// reverse Y\nvec3 reverse_offset_normal(vec3 vector) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 ||u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET ) {\n return vector * vec3(1.0, -1.0, 1.0);\n }\n\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.0\n return vector;\n }\n return vector;\n}\n\nvec4 project_mvt_offset_position(vec4 position) {\n float a = COORDINATE_SYSTEM_LNGLAT_OFFSET;\n float b = COORDINATE_SYSTEM_P20_OFFSET;\n float c = COORDINATE_SYSTEM_LNGLAT;\n if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n return project_offset(vec4(0.0, 0.0, position.z, position.w));\n }\n if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) {\n return vec4(\n project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale,\n project_scale(position.z),\n position.w\n );\n }\n return position;\n}\n\nvec4 project_position(vec4 position) {\n float a = COORDINATE_SYSTEM_LNGLAT_OFFSET;\n float b = COORDINATE_SYSTEM_P20_OFFSET;\n float c = COORDINATE_SYSTEM_LNGLAT;\n if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET\n || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n float X = position.x - u_ViewportCenter.x;\n float Y = position.y - u_ViewportCenter.y;\n return project_offset(vec4(X, Y, position.z, position.w));\n }\n if (u_CoordinateSystem < COORDINATE_SYSTEM_LNGLAT + 0.01 && u_CoordinateSystem >COORDINATE_SYSTEM_LNGLAT - 0.01) {\n return vec4(\n project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale,\n project_scale(position.z),\n position.w\n );\n }\n\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) {\n return vec4(\n (project_mercator(position.xy) * WORLD_SCALE * u_ZoomScale - vec2(215440491., 106744817.)) * vec2(1., -1.),\n project_scale(position.z),\n position.w\n );\n }\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // return vec4(\n // (position.xy * WORLD_SCALE * u_ZoomScale) * vec2(1., -1.), \n // project_scale(position.z), \n // position.w);\n\n return vec4(\n position.xy, \n project_scale(position.z), \n position.w);\n }\n return position;\n\n // TODO: 瓦片坐标系 & 常规世界坐标系\n}\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / u_ViewportSize * u_DevicePixelRatio * 2.0;\n return offset * u_FocalDistance;\n}\n\nfloat project_pixel_allmap(float pixel) {\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return pixel * pow(2.0, u_Zoom);\n }\n return pixel * u_FocalDistance ;\n}\n\n// 适配纹理贴图的等像素大小\nfloat project_pixel_texture(float pixel) {\n // mapbox zoom > 12\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n return pixel * pow(0.5, u_Zoom) * u_FocalDistance ;\n }\n\n // amap2 zoom > 12\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ;\n }\n\n // amap zoom > 12\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n return pixel * pow(0.5, u_Zoom)* u_FocalDistance ;\n }\n \n // amap zoom < 12\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20) {\n return pixel * pow(2.0, (20.0 - u_Zoom))* u_FocalDistance ;\n }\n return pixel * 2.0 * u_FocalDistance;;\n}\n\n// 在不论什么底图下需要统一处理的时候使用\nfloat project_float_pixel(float pixel) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // mapbox P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;\n }\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // amap P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n return pixel * pow(2.0, (19.0 - u_Zoom));\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // amap2 P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\n return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom))* u_FocalDistance ;\n }\n return pixel * u_FocalDistance;\n}\n\nfloat project_pixel(float pixel) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // amap P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // amap2 P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\n return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;\n }\n return pixel * u_FocalDistance;\n}\nvec2 project_pixel(vec2 pixel) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\n return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;\n }\n return pixel * -1. * u_FocalDistance;\n}\nvec3 project_pixel(vec3 pixel) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n return pixel * pow(2.0, (19.0 - u_Zoom)) * u_FocalDistance ;\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\n return pixel * pow(2.0, (19.0 - 3.0 - u_Zoom)) * u_FocalDistance ;\n }\n return pixel * -1. * u_FocalDistance;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // Needs to be divided with project_uCommonUnitsPerMeter\n position.w *= u_PixelsPerMeter.z;\n }\n\n return viewProjectionMatrix * position + center;\n}\n\n// Projects from common space coordinates to clip space\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(\n position,\n u_ViewProjectionMatrix,\n u_ViewportCenterProjection\n );\n}\n\nvec4 unproject_clipspace_to_position(vec4 clipspacePos, mat4 u_InverseViewProjectionMatrix) {\n vec4 pos = u_InverseViewProjectionMatrix * (clipspacePos - u_ViewportCenterProjection);\n\n if (u_CoordinateSystem == COORDINATE_SYSTEM_METER_OFFSET ||\n u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // Needs to be divided with project_uCommonUnitsPerMeter\n pos.w = pos.w / u_PixelsPerMeter.z;\n }\n return pos;\n}\n\n\nbool isEqual( float a, float b) {\n return a< b + 0.001 && a > b - 0.001;\n}",fs:""}),this.registerModule("project",{vs:"\n#define E 2.718281828459045\nvec2 ProjectFlat(vec2 lnglat){\n float maxs=85.0511287798;\n float lat=max(min(maxs,lnglat.y),-maxs);\n float scale= 268435456.;\n float d=PI/180.;\n float x=lnglat.x*d;\n float y=lat*d;\n y=log(tan((PI/4.)+(y/2.)));\n\n float a=.5/PI,\n b=.5,\n c=-.5/PI;\n d=.5;\n x=scale*(a*x+b);\n y=scale*(c*y+d);\n return vec2(x,y);\n}\n\nvec2 unProjectFlat(vec2 px){\n float a=.5/PI;\n float b=.5;\n float c=-.5/PI;\n float d=.5;\n float scale = 268435456.;\n float x=(px.x/scale-b)/a;\n float y=(px.y/scale-d)/c;\n y=(atan(pow(E,y))-(PI/4.))*2.;\n d=PI/180.;\n float lat=y/d;\n float lng=x/d;\n return vec2(lng,lat);\n}\n\nfloat pixelDistance(vec2 from, vec2 to) {\n vec2 a1 = ProjectFlat(from);\n vec2 b1 = ProjectFlat(to);\n return distance(a1, b1);\n}\n\n// gaode2.0\nvec2 customProject(vec2 lnglat) { // 经纬度 => 平面坐标\n float t = lnglat.x;\n float e = lnglat.y;\n float Sm = 180.0 / PI;\n float Tm = 6378137.0;\n float Rm = PI / 180.0;\n float r = 85.0511287798;\n e = max(min(r, e), -r);\n t *= Rm;\n e *= Rm;\n e = log(tan(PI / 4.0 + e / 2.0));\n return vec2(t * Tm, e * Tm);\n}\n\nvec2 unProjCustomCoord(vec2 point) { // 平面坐标 => 经纬度\n float Sm = 57.29577951308232; //180 / Math.PI\n float Tm = 6378137.0;\n float t = point.x;\n float e = point.y;\n return vec2(t / Tm * Sm, (2.0 * atan(exp(e / Tm)) - PI / 2.0) * Sm);\n}\n\n\nfloat customPixelDistance(vec2 from, vec2 to) {\n vec2 a1 = ProjectFlat(from);\n vec2 b1 = ProjectFlat(to);\n return distance(a1, b1);\n}",fs:""}),this.registerModule("sdf_2d",{vs:"",fs:"/**\n * 2D signed distance field functions\n * @see http://www.iquilezles.org/www/articles/distfunctions2d/distfunctions2d.htm\n */\n\nfloat ndot(vec2 a, vec2 b ) { return a.x*b.x - a.y*b.y; }\n\nfloat sdCircle(vec2 p, float r) {\n return length(p) - r;\n}\n\nfloat sdEquilateralTriangle(vec2 p) {\n float k = sqrt(3.0);\n p.x = abs(p.x) - 1.0;\n p.y = p.y + 1.0/k;\n if( p.x + k*p.y > 0.0 ) p = vec2(p.x-k*p.y,-k*p.x-p.y)/2.0;\n p.x -= clamp( p.x, -2.0, 0.0 );\n return -length(p)*sign(p.y);\n}\n\nfloat sdBox(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return length(max(d,vec2(0))) + min(max(d.x,d.y),0.0);\n}\n\nfloat sdPentagon(vec2 p, float r) {\n vec3 k = vec3(0.809016994,0.587785252,0.726542528);\n p.x = abs(p.x);\n p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);\n p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);\n p -= vec2(clamp(p.x,-r*k.z,r*k.z),r);\n return length(p)*sign(p.y);\n}\n\nfloat sdHexagon(vec2 p, float r) {\n vec3 k = vec3(-0.866025404,0.5,0.577350269);\n p = abs(p);\n p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;\n p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);\n return length(p)*sign(p.y);\n}\n\nfloat sdOctogon(vec2 p, float r) {\n vec3 k = vec3(-0.9238795325, 0.3826834323, 0.4142135623 );\n p = abs(p);\n p -= 2.0*min(dot(vec2( k.x,k.y),p),0.0)*vec2( k.x,k.y);\n p -= 2.0*min(dot(vec2(-k.x,k.y),p),0.0)*vec2(-k.x,k.y);\n p -= vec2(clamp(p.x, -k.z*r, k.z*r), r);\n return length(p)*sign(p.y);\n}\n\nfloat sdHexagram(vec2 p, float r) {\n vec4 k=vec4(-0.5,0.8660254038,0.5773502692,1.7320508076);\n p = abs(p);\n p -= 2.0*min(dot(k.xy,p),0.0)*k.xy;\n p -= 2.0*min(dot(k.yx,p),0.0)*k.yx;\n p -= vec2(clamp(p.x,r*k.z,r*k.w),r);\n return length(p)*sign(p.y);\n}\n\nfloat sdRhombus(vec2 p, vec2 b) {\n vec2 q = abs(p);\n float h = clamp((-2.0*ndot(q,b)+ndot(b,b))/dot(b,b),-1.0,1.0);\n float d = length( q - 0.5*b*vec2(1.0-h,1.0+h) );\n return d * sign( q.x*b.y + q.y*b.x - b.x*b.y );\n}\n\nfloat sdVesica(vec2 p, float r, float d) {\n p = abs(p);\n float b = sqrt(r*r-d*d); // can delay this sqrt\n return ((p.y-b)*d>p.x*b)\n ? length(p-vec2(0.0,b))\n : length(p-vec2(-d,0.0))-r;\n}\n"}),this.registerModule("lighting",{vs:"// Blinn-Phong model\n// apply lighting in vertex shader instead of fragment shader\n// @see https://learnopengl.com/Advanced-Lighting/Advanced-Lighting\nuniform float u_Ambient : 1.0;\nuniform float u_Diffuse : 1.0;\nuniform float u_Specular : 1.0;\nuniform int u_NumOfDirectionalLights : 1;\nuniform int u_NumOfSpotLights : 0;\n\n#define SHININESS 32.0\n#define MAX_NUM_OF_DIRECTIONAL_LIGHTS 3\n#define MAX_NUM_OF_SPOT_LIGHTS 3\n\nstruct DirectionalLight {\n vec3 direction;\n vec3 ambient;\n vec3 diffuse;\n vec3 specular;\n};\n\nstruct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 ambient;\n vec3 diffuse;\n vec3 specular;\n float constant;\n float linear;\n float quadratic;\n float angle;\n float blur;\n float exponent;\n};\n\nuniform DirectionalLight u_DirectionalLights[MAX_NUM_OF_DIRECTIONAL_LIGHTS];\nuniform SpotLight u_SpotLights[MAX_NUM_OF_SPOT_LIGHTS];\n\nvec3 calc_directional_light(DirectionalLight light, vec3 normal, vec3 viewDir) {\n vec3 lightDir = normalize(light.direction);\n // diffuse shading\n float diff = max(dot(normal, lightDir), 0.0);\n // Blinn-Phong specular shading\n vec3 halfwayDir = normalize(lightDir + viewDir);\n float spec = pow(max(dot(normal, halfwayDir), 0.0), SHININESS);\n\n vec3 ambient = light.ambient * u_Ambient;\n vec3 diffuse = light.diffuse * diff * u_Diffuse;\n vec3 specular = light.specular * spec * u_Specular;\n\n return ambient + diffuse + specular;\n}\n\n// vec3 calc_spot_light(SpotLight light, vec3 normal, vec3 fragPos, vec3 viewDir) {\n// vec3 lightDir = normalize(light.position - fragPos);\n// // diffuse shading\n// float diff = max(dot(normal, lightDir), 0.0);\n// // specular shading\n// vec3 reflectDir = reflect(-lightDir, normal);\n// float spec = pow(max(dot(viewDir, reflectDir), 0.0), SHININESS);\n// // attenuation\n// float distance = length(light.position - fragPos);\n// float attenuation = 1.0 / (light.constant + light.linear * distance +\n// light.quadratic * (distance * distance));\n\n// vec3 ambient = light.ambient * u_Ambient;\n// vec3 diffuse = light.diffuse * diff * u_Diffuse;\n// vec3 specular = light.specular * spec * u_Specular;\n\n// float spotEffect = dot(normalize(light.direction), -lightDir);\n// float spotCosCutoff = cos(light.angle / 180.0 * PI);\n// float spotCosOuterCutoff = cos((light.angle + light.blur) / 180.0 * PI);\n// float spotCosInnerCutoff = cos((light.angle - light.blur) / 180.0 * PI);\n// if (spotEffect > spotCosCutoff) {\n// spotEffect = pow(smoothstep(spotCosOuterCutoff, spotCosInnerCutoff, spotEffect), light.exponent);\n// } else {\n// spotEffect = 0.0;\n// }\n\n// return ambient + attenuation * (spotEffect * diffuse + specular);\n// }\n\nvec3 calc_lighting(vec3 position, vec3 normal, vec3 viewDir) {\n vec3 weight = vec3(0.0);\n for (int i = 0; i < MAX_NUM_OF_DIRECTIONAL_LIGHTS; i++) {\n if (i >= u_NumOfDirectionalLights) {\n break;\n }\n weight += calc_directional_light(u_DirectionalLights[i], normal, viewDir);\n }\n // for (int i = 0; i < MAX_NUM_OF_SPOT_LIGHTS; i++) {\n // if (i >= u_NumOfSpotLights) {\n // break;\n // }\n // weight += calc_spot_light(u_SpotLights[i], normal, position, viewDir);\n // }\n return weight;\n}\n",fs:""}),this.registerModule("light",{vs:"#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\n\nfloat calc_lighting(vec4 pos) {\n\n vec3 worldPos = vec3(pos * u_ModelMatrix);\n\n vec3 worldNormal = a_Normal;\n // //cal light weight\n vec3 viewDir = normalize(u_CameraPosition - worldPos);\n\n vec3 lightDir = normalize(vec3(1, -10.5, 12));\n\n vec3 halfDir = normalize(viewDir+lightDir);\n // //lambert\n float lambert = dot(worldNormal, lightDir);\n //specular\n float specular = pow(max(0.0, dot(worldNormal, halfDir)), 32.0);\n //sum to light weight\n float lightWeight = ambientRatio + diffuseRatio * lambert + specularRatio * specular;\n\n return lightWeight;\n}\n",fs:""}),this.registerModule("picking",{vs:"attribute vec3 a_PickingColor;\nvarying vec4 v_PickingResult;\n\nuniform vec3 u_PickingColor : [0, 0, 0];\nuniform vec3 u_CurrentSelectedId : [0, 0, 0];\nuniform vec4 u_HighlightColor : [0, 0, 0, 0];\nuniform vec4 u_SelectColor : [0, 0, 0, 0];\nuniform float u_PickingStage : 0.0;\nuniform float u_PickingThreshold : 1.0;\nuniform float u_PickingBuffer: 0.0;\nuniform float u_shaderPick;\nuniform float u_EnableSelect: 0.0;\n\n#define PICKING_NONE 0.0\n#define PICKING_ENCODE 1.0\n#define PICKING_HIGHLIGHT 2.0\n#define COLOR_SCALE 1. / 255.\n\n#define NORMAL 0.0\n#define HIGHLIGHT 1.0\n#define SELECT 2.0\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n abs(vertexColor.r - u_PickingColor.r) < u_PickingThreshold &&\n abs(vertexColor.g - u_PickingColor.g) < u_PickingThreshold &&\n abs(vertexColor.b - u_PickingColor.b) < u_PickingThreshold;\n}\n\n// 判断当前点是否已经被 select 选中\nbool isVertexSelected(vec3 vertexColor) {\n return\n abs(vertexColor.r - u_CurrentSelectedId.r) < u_PickingThreshold &&\n abs(vertexColor.g - u_CurrentSelectedId.g) < u_PickingThreshold &&\n abs(vertexColor.b - u_CurrentSelectedId.b) < u_PickingThreshold;\n}\n\nvoid setPickingColor(vec3 pickingColor) {\n if(u_shaderPick < 0.5) {\n return;\n }\n // compares only in highlight stage\n\n v_PickingResult.a = float((u_PickingStage == PICKING_HIGHLIGHT) && isVertexPicked(pickingColor));\n\n // if (u_EnableSelect == 1.0 && u_PickingStage == PICKING_HIGHLIGHT && isVertexSelected(pickingColor)) {\n // // 选中态\n // v_PickingResult.a = SELECT;\n // } else if (u_PickingStage == PICKING_HIGHLIGHT && isVertexPicked(pickingColor)) {\n // // 高亮态\n // v_PickingResult.a = HIGHLIGHT;\n // } else {\n // v_PickingResult.a = NORMAL;\n // }\n\n // Stores the picking color so that the fragment shader can render it during picking\n v_PickingResult.rgb = pickingColor * COLOR_SCALE;\n}\n\nfloat setPickingSize(float x) {\n return u_PickingStage == PICKING_ENCODE ? x + u_PickingBuffer : x;\n}\n\nfloat setPickingOrder(float z) {\n bool selected = bool(v_PickingResult.a);\n return selected ? z + 1. : 0.;\n}\n",fs:"varying vec4 v_PickingResult;\nuniform vec4 u_HighlightColor : [0, 0, 0, 0];\nuniform vec4 u_SelectColor : [0, 0, 0, 0];\nuniform float u_PickingStage : 0.0;\nuniform float u_shaderPick;\n\nuniform float u_activeMix: 0;\n\n#define PICKING_NONE 0.0\n#define PICKING_ENCODE 1.0\n#define PICKING_HIGHLIGHT 2.0\n#define COLOR_SCALE 1. / 255.\n\n#define HIGHLIGHT 1.0\n#define SELECT 2.0\n\n/*\n * Returns highlight color if this item is selected.\n */\nvec4 filterHighlightColor(vec4 color, float weight) {\n // float selected = v_PickingResult.a;\n bool selected = bool(v_PickingResult.a);\n\n // if (selected == SELECT) {\n if (selected) {\n // // 点击选中状态\n // vec4 selectColor = u_SelectColor * COLOR_SCALE;\n // return selectColor;\n // } else if (selected == HIGHLIGHT) {\n // // hover 高亮状态\n vec4 highLightColor = u_HighlightColor * COLOR_SCALE;\n\n float highLightAlpha = highLightColor.a;\n float highLightRatio = highLightAlpha / (highLightAlpha + color.a * (1.0 - highLightAlpha));\n\n vec3 resultRGB = mix(color.rgb, highLightColor.rgb, highLightRatio);\n return vec4(mix(resultRGB * weight, color.rgb, u_activeMix), color.a);\n } else {\n return color;\n }\n}\n\n/*\n * Returns picking color if picking enabled else unmodified argument.\n */\nvec4 filterPickingColor(vec4 color) {\n vec3 pickingColor = v_PickingResult.rgb;\n if (u_PickingStage == PICKING_ENCODE && length(pickingColor) < 0.001) {\n discard;\n }\n return u_PickingStage == PICKING_ENCODE ? vec4(pickingColor, step(0.001,color.a)): color;\n}\n\n/*\n * Returns picking color if picking is enabled if not\n * highlight color if this item is selected, otherwise unmodified argument.\n */\nvec4 filterColor(vec4 color) {\n // 过滤多余的 shader 计算\n // return color;\n if(u_shaderPick < 0.5) {\n return color; // 暂时去除 直接取消计算在选中时拖拽地图会有问题\n } else {\n return filterPickingColor(filterHighlightColor(color, 1.0));\n }\n \n}\n\nvec4 filterColorAlpha(vec4 color, float alpha) {\n // 过滤多余的 shader 计算\n // return color;\n if(u_shaderPick < 0.5) {\n return color; // 暂时去除 直接取消计算在选中时拖拽地图会有问题\n } else {\n return filterPickingColor(filterHighlightColor(color, alpha));\n }\n}\n\n"}),this.registerModule("commom_attr_vert",{vs:"#ifdef USE_ATTRIBUTE_OPACITY\n attribute float a_Opacity;\n#endif\n\n#ifdef USE_ATTRIBUTE_OFFSETS\n attribute vec2 a_Offsets;\n#endif\n\n#ifdef USE_ATTRIBUTE_STROKE\n attribute vec4 a_Stroke;\n#endif",fs:""}),this.registerModule("opacity_attr_vert",{vs:"float opacity = u_opacity;\n\n#ifdef USE_ATTRIBUTE_OPACITY\n opacity = a_Opacity;\n#endif",fs:""})}},{key:"registerModule",value:function(t,e){var n=e.vs,r=e.fs,i=e.uniforms,o=e.inject,a=ln(n),s=a.content,u=a.uniforms,c=ln(r),h=c.content,p=c.uniforms;this.rawContentCache[t]={fs:h,inject:o,uniforms:(0,l.Z)((0,l.Z)((0,l.Z)({},u),p),i),vs:s}}},{key:"destroy",value:function(){this.moduleCache={},this.rawContentCache={}}},{key:"getModule",value:function(t){var e=this,n=this.rawContentCache[t].vs,r=this.rawContentCache[t].fs,i=this.rawContentCache[t].inject,o={};null!=i&&i["vs:#decl"]&&(n=(null==i?void 0:i["vs:#decl"])+n,o=ln(null==i?void 0:i["vs:#decl"]).uniforms),null!=i&&i["vs:#main-start"]&&(n=n.replace(mn,(function(t){return t+(null==i?void 0:i["vs:#main-start"])})));var a=this.processModule(n,[],"vs"),s=a.content,u=a.includeList,c=this.processModule(r,[],"fs"),h=c.content,p=c.includeList,f="",d=(0,Q.uniq)(u.concat(p).concat(t)).reduce((function(t,n){return(0,l.Z)((0,l.Z)({},t),e.rawContentCache[n].uniforms)}),(0,l.Z)({},o));return fn.test(h)||(f+="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n#endif\n"),f+=h,this.moduleCache[t]={fs:f.trim(),uniforms:d,vs:s.trim()},this.moduleCache[t]}},{key:"processModule",value:function(t,e,n){var r=this;return{content:t.replace(dn,(function(t,i){var o=i.split(" ")[0].replace(/"/g,"");if(e.indexOf(o)>-1)return"";var a=r.rawContentCache[o][n];return e.push(o),r.processModule(a,e,n).content})),includeList:e}}},{key:"injectDefines",value:function(t){return Object.keys(t).reduce((function(e,n){return e+"#define ".concat(n.toUpperCase()," ").concat(t[n],";\n")}),"\n")}}]),t}())||an,yn=n(9458);!function(t){t.Normal="normal",t.PostProcessing="post-processing"}(cn||(cn={}));var vn,_n=(0,a.b2)()(hn=function(){function t(){(0,c.Z)(this,t),(0,g.Z)(this,"shaderModuleService",void 0),(0,g.Z)(this,"rendererService",void 0),(0,g.Z)(this,"cameraService",void 0),(0,g.Z)(this,"mapService",void 0),(0,g.Z)(this,"interactionService",void 0),(0,g.Z)(this,"layerService",void 0),(0,g.Z)(this,"config",void 0)}return(0,h.Z)(t,[{key:"getName",value:function(){return""}},{key:"getType",value:function(){return cn.Normal}},{key:"init",value:function(t,e){this.config=e,this.rendererService=t.getContainer().get(u.IRendererService),this.cameraService=t.getContainer().get(u.ICameraService),this.mapService=t.getContainer().get(u.IMapService),this.interactionService=t.getContainer().get(u.IInteractionService),this.layerService=t.getContainer().get(u.ILayerService),this.shaderModuleService=t.getContainer().get(u.IShaderModuleService)}},{key:"render",value:function(t){}}]),t}())||hn;var bn,xn,wn,Sn,En,Mn=(0,a.b2)()(vn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"getName",value:function(){return"clear"}},{key:"init",value:function(t,e){(0,yn.Z)((0,m.Z)(i.prototype),"init",this).call(this,t,e)}},{key:"render",value:function(){this.rendererService.clear({color:[0,0,0,0],depth:1,framebuffer:null})}}]),i}(_n))||vn;function Tn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return An(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?An(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function An(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nf||_<0||b>d||b<0||h(t.pickingFBO,(function(){var e;if(0!==(a=c({x:Math.round(_),y:Math.round(d-(r+1)*y.DOM.DPR),width:1,height:1,data:new Uint8Array(4),framebuffer:t.pickingFBO}))[0]||0!==a[1]||0!==a[2]){var s=(0,y.decodePickingColor)(a),u=t.layer.getSource().getFeatureById(s),h={x:n,y:r,type:o,lngLat:i,featureId:s,feature:u};u&&(t.layer.setCurrentPickId(s),t.triggerHoverOnLayer(h))}else{var p={x:n,y:r,lngLat:i,type:null===t.layer.getCurrentPickId()?"un"+o:"mouseout",featureId:null,feature:null};t.triggerHoverOnLayer((0,l.Z)((0,l.Z)({},p),{},{type:"unpick"})),t.triggerHoverOnLayer(p),t.layer.setCurrentPickId(null)}g&&t.highlightPickedFeature(a),v&&"click"===o&&(null===(e=a)||void 0===e?void 0:e.toString())!==[0,0,0,0].toString()&&t.selectFeature(a)}))}})),t}return(0,h.Z)(i,[{key:"getType",value:function(){return cn.Normal}},{key:"getName",value:function(){return"pixelPicking"}},{key:"init",value:function(t,e){(0,yn.Z)((0,m.Z)(i.prototype),"init",this).call(this,t,e),this.layer=t;var n=this.rendererService,r=n.createTexture2D,o=n.createFramebuffer,a=(0,n.getViewportSize)(),s=a.width,u=a.height;this.pickingFBO=o({color:r({width:s,height:u,wrapS:kt.CLAMP_TO_EDGE,wrapT:kt.CLAMP_TO_EDGE})}),this.interactionService.on(wt.Hover,this.pickFromPickingFBO),this.interactionService.on(wt.Select,this.selectFeatureHandle.bind(this)),this.interactionService.on(wt.Active,this.highlightFeatureHandle.bind(this))}},{key:"render",value:function(t){var e=this;if(!this.alreadyInRendering){var n=this.rendererService,r=n.getViewportSize,i=n.useFramebuffer,o=n.clear,a=r(),s=a.width,u=a.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(){o({framebuffer:e.pickingFBO,color:[0,0,0,0],stencil:0,depth:1});var n=e.layer.multiPassRenderer.getRenderFlag();e.layer.multiPassRenderer.setRenderFlag(!1),t.hooks.beforePickingEncode.call(),t.render(),t.hooks.afterPickingEncode.call(),e.layer.multiPassRenderer.setRenderFlag(n),e.alreadyInRendering=!1}))}}},{key:"triggerHoverOnLayer",value:function(t){this.layer.emit(t.type,t)}},{key:"highlightPickedFeature",value:function(t){var e=(0,z.Z)(t,3),n=e[0],r=e[1],i=e[2];this.layer.hooks.beforeHighlight.call([n,r,i]),this.layerService.renderLayers()}},{key:"selectFeature",value:function(t){var e=(0,z.Z)(t,3),n=e[0],r=e[1],i=e[2];this.layer.hooks.beforeSelect.call([n,r,i]),this.layerService.renderLayers()}},{key:"selectFeatureHandle",value:function(t){var e=t.featureId,n=(0,y.encodePickingColor)(e);this.selectFeature(new Uint8Array(n))}},{key:"highlightFeatureHandle",value:function(t){var e=t.featureId,n=(0,y.encodePickingColor)(e);this.highlightPickedFeature(new Uint8Array(n))}}]),i}(_n))||Cn,Fn=(Pn=(0,a.b2)(),kn=(0,a.f3)(u.IShaderModuleService),Pn((In=function(){function t(){(0,c.Z)(this,t),(0,at.Z)(this,"shaderModuleService",Rn,this),(0,g.Z)(this,"rendererService",void 0),(0,g.Z)(this,"config",void 0),(0,g.Z)(this,"quad","attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}"),(0,g.Z)(this,"enabled",!0),(0,g.Z)(this,"renderToScreen",!1),(0,g.Z)(this,"model",void 0),(0,g.Z)(this,"name",void 0),(0,g.Z)(this,"optionsToUpdate",{})}return(0,h.Z)(t,[{key:"getName",value:function(){return this.name}},{key:"setName",value:function(t){this.name=t}},{key:"getType",value:function(){return cn.PostProcessing}},{key:"init",value:function(t,e){this.config=e,this.rendererService=t.getContainer().get(u.IRendererService),this.shaderModuleService=t.getContainer().get(u.IShaderModuleService);var n=this.rendererService,r=n.createAttribute,i=n.createBuffer,o=n.createModel,a=this.setupShaders(),s=a.vs,c=a.fs,h=a.uniforms;this.model=o({vs:s,fs:c,attributes:{a_Position:r({buffer:i({data:[-4,-4,4,-4,0,4],type:kt.FLOAT}),size:2})},uniforms:(0,l.Z)((0,l.Z)({u_Texture:null},h),this.config&&this.convertOptionsToUniforms(this.config)),depth:{enable:!1},count:3,blend:{enable:"copy"===this.getName()}})}},{key:"render",value:function(t,e){var n=this,r=t.multiPassRenderer.getPostProcessor(),i=this.rendererService,o=i.useFramebuffer,a=i.getViewportSize,s=i.clear,u=a(),c=u.width,h=u.height;o(this.renderToScreen?null:r.getWriteFBO(),(function(){s({framebuffer:r.getWriteFBO(),color:[0,0,0,0],depth:1,stencil:0});var t=(0,l.Z)({u_BloomFinal:0,u_Texture:r.getReadFBO(),u_ViewportSize:[c,h]},n.convertOptionsToUniforms(n.optionsToUpdate));e&&(t.u_BloomFinal=1,t.u_Texture2=e),n.model.draw({uniforms:t})}))}},{key:"isEnabled",value:function(){return this.enabled}},{key:"setEnabled",value:function(t){this.enabled=t}},{key:"setRenderToScreen",value:function(t){this.renderToScreen=t}},{key:"updateOptions",value:function(t){this.optionsToUpdate=(0,l.Z)((0,l.Z)({},this.optionsToUpdate),t)}},{key:"setupShaders",value:function(){throw new Error("Method not implemented.")}},{key:"convertOptionsToUniforms",value:function(t){var e={};return Object.keys(t).forEach((function(n){(0,Q.isNil)(t[n])||(e["u_".concat((0,Q.upperFirst)((0,Q.camelCase)(n)))]=t[n])})),e}}]),t}(),Rn=(0,st.Z)(In.prototype,"shaderModuleService",[kn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ln=In))||Ln);var zn,Bn=(0,a.b2)()(Dn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform float u_BloomFinal: 0.0;\nuniform sampler2D u_Texture;\nuniform sampler2D u_Texture2;\n\nuniform vec2 u_ViewportSize: [1.0, 1.0];\nuniform float u_radius: 5.0;\nuniform float u_intensity: 0.3;\nuniform float u_baseRadio: 0.5;\n\n// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl\nvec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {\n vec4 color = vec4(0.0);\n vec2 off1 = vec2(1.3846153846) * direction;\n vec2 off2 = vec2(3.2307692308) * direction;\n color += texture2D(image, uv) * 0.2270270270;\n color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;\n color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;\n color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;\n color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;\n return color;\n}\n\nfloat luminance(vec4 color) {\n return 0.2125 * color.r + 0.7154 * color.g + 0.0721 * color.b;\n}\n\nvoid main() {\n // vec4 baseColor = texture2D(u_Texture, v_UV);\n\n float r = sqrt(u_radius);\n\n vec4 c1 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(u_radius, 0.0));\n // c1 *= luminance(c1);\n vec4 c2 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(0.0, u_radius));\n // c2 *= luminance(c2);\n vec4 c3 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, r));\n // c3 *= luminance(c3);\n vec4 c4 = blur9(u_Texture, v_UV, u_ViewportSize, vec2(r, -r));\n // c4 *= luminance(c4);\n vec4 inbloomColor = (c1 + c2 + c3 + c4) * 0.25;\n\n // float lum = luminance(inbloomColor);\n // inbloomColor.rgb *= lum;\n\n if(u_BloomFinal > 0.0) {\n vec4 baseColor = texture2D(u_Texture2, v_UV);\n float baselum = luminance(baseColor);\n gl_FragColor = mix(inbloomColor, baseColor, u_baseRadio);\n if(baselum <= 0.2) {\n gl_FragColor = inbloomColor * u_intensity;\n }\n } else {\n gl_FragColor = inbloomColor;\n }\n}"});var t=this.shaderModuleService.getModule("blur-pass"),e=t.vs,n=t.fs,r=t.uniforms,i=this.rendererService.getViewportSize(),o=i.width,a=i.height;return{vs:e,fs:n,uniforms:(0,l.Z)((0,l.Z)({},r),{},{u_ViewportSize:[o,a]})}}},{key:"convertOptionsToUniforms",value:function(t){var e={};return(0,Q.isNil)(t.bloomRadius)||(e.u_radius=t.bloomRadius),(0,Q.isNil)(t.bloomIntensity)||(e.u_intensity=t.bloomIntensity),(0,Q.isNil)(t.bloomBaseRadio)||(e.u_baseRadio=t.bloomBaseRadio),e}}]),i}(Fn))||Dn;var jn,Un=(0,a.b2)()(zn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\n\nuniform vec2 u_ViewportSize: [1.0, 1.0];\nuniform vec2 u_BlurDir: [1.0, 0.0];\n\n// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl\nvec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {\n vec4 color = vec4(0.0);\n vec2 off1 = vec2(1.3846153846) * direction;\n vec2 off2 = vec2(3.2307692308) * direction;\n color += texture2D(image, uv) * 0.2270270270;\n color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;\n color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;\n color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;\n color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;\n return color;\n}\n\nvoid main() {\n gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir);\n}"});var t=this.shaderModuleService.getModule("blur-pass"),e=t.vs,n=t.fs,r=t.uniforms,i=this.rendererService.getViewportSize(),o=i.width,a=i.height;return{vs:e,fs:n,uniforms:(0,l.Z)((0,l.Z)({},r),{},{u_ViewportSize:[o,a]})}}},{key:"convertOptionsToUniforms",value:function(t){var e={};return(0,Q.isNil)(t.blurRadius)||(e.u_BlurDir=[t.blurRadius,0]),e}}]),i}(Fn))||zn;var Zn,Vn=(0,a.b2)()(jn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("blur-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\n\nuniform vec2 u_ViewportSize: [1.0, 1.0];\nuniform vec2 u_BlurDir: [1.0, 0.0];\n\n// https://github.com/Jam3/glsl-fast-gaussian-blur/blob/master/9.glsl\nvec4 blur9(sampler2D image, vec2 uv, vec2 resolution, vec2 direction) {\n vec4 color = vec4(0.0);\n vec2 off1 = vec2(1.3846153846) * direction;\n vec2 off2 = vec2(3.2307692308) * direction;\n color += texture2D(image, uv) * 0.2270270270;\n color += texture2D(image, uv + (off1 / resolution)) * 0.3162162162;\n color += texture2D(image, uv - (off1 / resolution)) * 0.3162162162;\n color += texture2D(image, uv + (off2 / resolution)) * 0.0702702703;\n color += texture2D(image, uv - (off2 / resolution)) * 0.0702702703;\n return color;\n}\n\nvoid main() {\n gl_FragColor = blur9(u_Texture, v_UV, u_ViewportSize, u_BlurDir);\n}"});var t=this.shaderModuleService.getModule("blur-pass"),e=t.vs,n=t.fs,r=t.uniforms,i=this.rendererService.getViewportSize(),o=i.width,a=i.height;return{vs:e,fs:n,uniforms:(0,l.Z)((0,l.Z)({},r),{},{u_ViewportSize:[o,a]})}}},{key:"convertOptionsToUniforms",value:function(t){var e={};return(0,Q.isNil)(t.blurRadius)||(e.u_BlurDir=[0,t.blurRadius]),e}}]),i}(Fn))||jn;var Gn,Hn=(0,a.b2)()(Zn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("colorhalftone-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:'varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\nuniform vec2 u_ViewportSize: [1.0, 1.0];\nuniform vec2 u_Center : [0.5, 0.5];\nuniform float u_Angle : 0;\nuniform float u_Size : 8;\n\n#pragma include "common"\n\nfloat scale = PI / u_Size;\n\nfloat pattern(float u_Angle, vec2 texSize, vec2 texCoord) {\n float s = sin(u_Angle), c = cos(u_Angle);\n vec2 tex = texCoord * texSize - u_Center * texSize;\n vec2 point = vec2(\n c * tex.x - s * tex.y,\n s * tex.x + c * tex.y\n ) * scale;\n return (sin(point.x) * sin(point.y)) * 4.0;\n}\n\n// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/colorhalftone.js\nvec4 colorHalftone_filterColor(vec4 color, vec2 texSize, vec2 texCoord) {\n vec3 cmy = 1.0 - color.rgb;\n float k = min(cmy.x, min(cmy.y, cmy.z));\n cmy = (cmy - k) / (1.0 - k);\n cmy = clamp(\n cmy * 10.0 - 3.0 + vec3(\n pattern(u_Angle + 0.26179, texSize, texCoord),\n pattern(u_Angle + 1.30899, texSize, texCoord),\n pattern(u_Angle, texSize, texCoord)\n ),\n 0.0,\n 1.0\n );\n k = clamp(k * 10.0 - 5.0 + pattern(u_Angle + 0.78539, texSize, texCoord), 0.0, 1.0);\n return vec4(1.0 - cmy - k, color.a);\n}\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n gl_FragColor = colorHalftone_filterColor(gl_FragColor, u_ViewportSize, v_UV);\n}'});var t=this.shaderModuleService.getModule("colorhalftone-pass"),e=t.vs,n=t.fs,r=t.uniforms,i=this.rendererService.getViewportSize(),o=i.width,a=i.height;return{vs:e,fs:n,uniforms:(0,l.Z)((0,l.Z)({},r),{},{u_ViewportSize:[o,a]})}}}]),i}(Fn))||Zn;var Wn,qn=(0,a.b2)()(Gn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("copy-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n}"}),this.shaderModuleService.getModule("copy-pass")}}]),i}(Fn))||Gn;var Yn,Xn=(0,a.b2)()(Wn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("hexagonalpixelate-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\nuniform vec2 u_ViewportSize: [1.0, 1.0];\nuniform vec2 u_Center : [0.5, 0.5];\nuniform float u_Scale : 10;\n\n// https://github.com/evanw/glfx.js/blob/master/src/filters/fun/hexagonalpixelate.js\nvec4 hexagonalPixelate_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 tex = (texCoord * texSize - u_Center * texSize) / u_Scale;\n tex.y /= 0.866025404;\n tex.x -= tex.y * 0.5;\n vec2 a;\n if (tex.x + tex.y - floor(tex.x) - floor(tex.y) < 1.0) {\n a = vec2(floor(tex.x), floor(tex.y));\n }\n else a = vec2(ceil(tex.x), ceil(tex.y));\n vec2 b = vec2(ceil(tex.x), floor(tex.y));\n vec2 c = vec2(floor(tex.x), ceil(tex.y));\n vec3 TEX = vec3(tex.x, tex.y, 1.0 - tex.x - tex.y);\n vec3 A = vec3(a.x, a.y, 1.0 - a.x - a.y);\n vec3 B = vec3(b.x, b.y, 1.0 - b.x - b.y);\n vec3 C = vec3(c.x, c.y, 1.0 - c.x - c.y);\n float alen = length(TEX - A);\n float blen = length(TEX - B);\n float clen = length(TEX - C);\n vec2 choice;\n if (alen < blen) {\n if (alen < clen) choice = a;\n else choice = c;\n } else {\n if (blen < clen) choice = b;\n else choice = c;\n }\n choice.x += choice.y * 0.5;\n choice.y *= 0.866025404;\n choice *= u_Scale / texSize;\n return texture2D(texture, choice + u_Center);\n}\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n gl_FragColor = hexagonalPixelate_sampleColor(u_Texture, u_ViewportSize, v_UV);\n}"});var t=this.shaderModuleService.getModule("hexagonalpixelate-pass"),e=t.vs,n=t.fs,r=t.uniforms,i=this.rendererService.getViewportSize(),o=i.width,a=i.height;return{vs:e,fs:n,uniforms:(0,l.Z)((0,l.Z)({},r),{},{u_ViewportSize:[o,a]})}}}]),i}(Fn))||Wn;var $n,Kn=(0,a.b2)()(Yn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){this.shaderModuleService.registerModule("ink-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\nuniform vec2 u_ViewportSize: [1.0, 1.0];\nuniform float u_Strength : 0.6;\n\nvec4 ink_sampleColor(sampler2D texture, vec2 texSize, vec2 texCoord) {\n vec2 dx = vec2(1.0 / texSize.x, 0.0);\n vec2 dy = vec2(0.0, 1.0 / texSize.y);\n vec4 color = texture2D(texture, texCoord);\n float bigTotal = 0.0;\n float smallTotal = 0.0;\n vec3 bigAverage = vec3(0.0);\n vec3 smallAverage = vec3(0.0);\n for (float x = -2.0; x <= 2.0; x += 1.0) {\n for (float y = -2.0; y <= 2.0; y += 1.0) {\n vec3 sample = texture2D(texture, texCoord + dx * x + dy * y).rgb;\n bigAverage += sample;\n bigTotal += 1.0;\n if (abs(x) + abs(y) < 2.0) {\n smallAverage += sample;\n smallTotal += 1.0;\n }\n }\n }\n vec3 edge = max(vec3(0.0), bigAverage / bigTotal - smallAverage / smallTotal);\n float power = u_Strength * u_Strength * u_Strength * u_Strength * u_Strength;\n return vec4(color.rgb - dot(edge, edge) * power * 100000.0, color.a);\n}\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n gl_FragColor = ink_sampleColor(u_Texture, u_ViewportSize, v_UV);\n}"});var t=this.shaderModuleService.getModule("ink-pass"),e=t.vs,n=t.fs,r=t.uniforms,i=this.rendererService.getViewportSize(),o=i.width,a=i.height;return{vs:e,fs:n,uniforms:(0,l.Z)((0,l.Z)({},r),{},{u_ViewportSize:[o,a]})}}}]),i}(Fn))||Yn;var Jn,Qn=(0,a.b2)()($n=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("noise-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\nuniform float u_Amount : 0.5;\n\nfloat rand(vec2 co) {\n return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n}\n\n// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js\nvec4 noise_filterColor(vec4 color, vec2 texCoord) {\n float diff = (rand(texCoord) - 0.5) * u_Amount;\n color.r += diff;\n color.g += diff;\n color.b += diff;\n return color;\n}\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n gl_FragColor = noise_filterColor(gl_FragColor, v_UV);\n}"}),this.shaderModuleService.getModule("noise-pass")}}]),i}(Fn))||$n;var tr,er,nr,rr,ir,or,ar,sr=(0,a.b2)()(Jn=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){return(0,c.Z)(this,i),r.apply(this,arguments)}return(0,h.Z)(i,[{key:"setupShaders",value:function(){return this.shaderModuleService.registerModule("sepia-pass",{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:"varying vec2 v_UV;\n\nuniform sampler2D u_Texture;\n\nuniform float u_Amount : 0.5;\n\n// https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/sepia.js\nvec4 sepia_filterColor(vec4 color) {\n float r = color.r;\n float g = color.g;\n float b = color.b;\n color.r =\n min(1.0, (r * (1.0 - (0.607 * u_Amount))) + (g * (0.769 * u_Amount)) + (b * (0.189 * u_Amount)));\n color.g = min(1.0, (r * 0.349 * u_Amount) + (g * (1.0 - (0.314 * u_Amount))) + (b * 0.168 * u_Amount));\n color.b = min(1.0, (r * 0.272 * u_Amount) + (g * 0.534 * u_Amount) + (b * (1.0 - (0.869 * u_Amount))));\n return color;\n}\n\nvoid main() {\n gl_FragColor = vec4(texture2D(u_Texture, v_UV));\n gl_FragColor = sepia_filterColor(gl_FragColor);\n}"}),this.shaderModuleService.getModule("sepia-pass")}}]),i}(Fn))||Jn,ur=(tr=(0,a.b2)(),er=(0,a.f3)(u.IRendererService),nr=(0,a.zY)(),tr((ir=function(){function t(){(0,c.Z)(this,t),(0,at.Z)(this,"rendererService",or,this),(0,g.Z)(this,"passes",[]),(0,g.Z)(this,"readFBO",void 0),(0,g.Z)(this,"writeFBO",void 0)}var e,n;return(0,h.Z)(t,[{key:"getReadFBO",value:function(){return this.readFBO}},{key:"getWriteFBO",value:function(){return this.writeFBO}},{key:"getCurrentFBOTex",value:function(){var t=this.rendererService,e=t.getViewportSize,n=t.createTexture2D,r=e();return n({x:0,y:0,width:r.width,height:r.height,copy:!0})}},{key:"getReadFBOTex",value:function(){var t=this,e=this.rendererService.useFramebuffer;return new Promise((function(n){e(t.readFBO,(0,k.Z)(I().mark((function e(){return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n(t.getCurrentFBOTex());case 1:case"end":return e.stop()}}),e)}))))}))}},{key:"renderBloomPass",value:(n=(0,k.Z)(I().mark((function t(e,n){var r,i;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getReadFBOTex();case 2:r=t.sent,i=0;case 4:if(!(i<4)){t.next=11;break}return t.next=7,n.render(e,r);case 7:this.swap(),i++,t.next=4;break;case 11:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"render",value:(e=(0,k.Z)(I().mark((function t(e){var n,r;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=0;case 1:if(!(n0;)n+=r*(i%e),i=Math.floor(i/e),r/=e;return n}var yr=1,vr=(lr=(0,a.b2)(),cr=(0,a.f3)(u.IShaderModuleService),lr((pr=function(t){(0,f.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,m.Z)(e);if(n){var i=(0,m.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,d.Z)(this,t)});function i(){var t;(0,c.Z)(this,i);for(var e=arguments.length,n=new Array(e),o=0;o=1&&(o(this.copyRenderTarget,(function(){e.outputModel.draw({uniforms:{u_Texture:e.outputRenderTarget}})})),o(t.multiPassRenderer.getPostProcessor().getReadFBO(),(function(){e.copyModel.draw({uniforms:{u_Texture:e.copyRenderTarget}})})),t.multiPassRenderer.getPostProcessor().render(t));var f=this.prevRenderTarget;this.prevRenderTarget=this.outputRenderTarget,this.outputRenderTarget=f,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,y.$window.clearTimeout(this.timer)}},{key:"createTriangleModel",value:function(t,e,n){this.shaderModuleService.registerModule(t,{vs:"attribute vec2 a_Position;\n\nvarying vec2 v_UV;\n\nvoid main() {\n v_UV = 0.5 * (a_Position + 1.0);\n gl_Position = vec4(a_Position, 0., 1.);\n}",fs:e});var r=this.shaderModuleService.getModule(t),i=r.vs,o=r.fs,a=r.uniforms,s=this.rendererService,u=s.createAttribute,c=s.createBuffer;return(0,s.createModel)((0,l.Z)({vs:i,fs:o,attributes:{a_Position:u({buffer:c({data:[-4,-4,4,-4,0,4],type:kt.FLOAT}),size:2})},uniforms:(0,l.Z)({},a),depth:{enable:!1},count:3},n))}}]),i}(_n),fr=(0,st.Z)(pr.prototype,"shaderModuleService",[cr],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),hr=pr))||hr),_r=new a.W2;_r.bind(u.IGlobalConfigService).to(ot).inSingletonScope(),(0,a.GW)((0,a.b2)(),i.EventEmitter),_r.bind(u.IEventEmitter).to(i.EventEmitter);var br=(0,s.Z)(_r,!1),xr=function(t){var e=br.lazyInject(t);return function(t,n,r){e.call(this,t,n),r&&(r.initializer=function(){return t[n]})}},wr=function(t){var e=br.lazyMultiInject(t);return function(t,n,r){e.call(this,t,n),r&&(r.initializer=function(){return t[n]})}};const Sr=_r;var Er=0;function Mr(){var t=new a.W2;return t.parent=_r,t.bind(u.SceneID).toConstantValue("".concat(Er++)),t.bind(u.IShaderModuleService).to(gn).inSingletonScope(),t.bind(u.ILayerService).to(Xe).inSingletonScope(),t.bind(u.IDebugService).to(Ct).inSingletonScope(),t.bind(u.ISceneService).to(sn).inSingletonScope(),t.bind(u.ICameraService).to(j).inSingletonScope(),t.bind(u.ICoordinateSystemService).to(bt).inSingletonScope(),t.bind(u.IInteractionService).to(Wt).inSingletonScope(),t.bind(u.IPickingService).to(ie).inSingletonScope(),t.bind(u.IControlService).to($).inSingletonScope(),t.bind(u.IMarkerService).to(K).inSingletonScope(),t.bind(u.IIconService).to(F).inSingletonScope(),t.bind(u.IFontService).to(P).inSingletonScope(),t.bind(u.IPopupService).to(J).inSingletonScope(),t.bind(u.INormalPass).to(Mn).whenTargetNamed("clear"),t.bind(u.INormalPass).to(Nn).whenTargetNamed("pixelPicking"),t.bind(u.INormalPass).to(dr).whenTargetNamed("render"),t.bind(u.INormalPass).to(vr).whenTargetNamed("taa"),t.bind(u.IFactoryNormalPass).toFactory((function(t){return function(e){return t.container.getNamed(u.INormalPass,e)}})),t.bind(u.IPostProcessingPass).to(qn).whenTargetNamed("copy"),t.bind(u.IPostProcessingPass).to(Bn).whenTargetNamed("bloom"),t.bind(u.IPostProcessingPass).to(Un).whenTargetNamed("blurH"),t.bind(u.IPostProcessingPass).to(Vn).whenTargetNamed("blurV"),t.bind(u.IPostProcessingPass).to(Qn).whenTargetNamed("noise"),t.bind(u.IPostProcessingPass).to(sr).whenTargetNamed("sepia"),t.bind(u.IPostProcessingPass).to(Hn).whenTargetNamed("colorHalftone"),t.bind(u.IPostProcessingPass).to(Xn).whenTargetNamed("hexagonalPixelate"),t.bind(u.IPostProcessingPass).to(Kn).whenTargetNamed("ink"),t.bind(u.IFactoryPostProcessingPass).toFactory((function(t){return function(e){var n=t.container.getNamed(u.IPostProcessingPass,e);return n.setName(e),n}})),t}function Tr(t){var e=new a.W2;return e.parent=t,e.bind(u.IStyleAttributeService).to(en).inSingletonScope(),e.bind(u.IMultiPassRenderer).to(On).inSingletonScope(),e.bind(u.IPostProcessor).to(ur).inSingletonScope(),e}var Ar=["circle","triangle","square","pentagon","hexagon","octogon","hexagram","rhombus","vesica"];function Cr(t){return Ar.indexOf(t)}var Or=64,Pr=131072,kr=524288,Lr=2097152,Ir=8388608;function Rr(t,e){return 256*(t=(0,Q.clamp)(Math.floor(t),0,255))+(0,Q.clamp)(Math.floor(e),0,255)}function Dr(t){var e=t.color,n=t.radius,r=t.tileX,i=t.tileY,o=t.shape,a=t.opacity,s=t.stroke,u=t.strokeWidth,l=t.strokeOpacity,c=[],h=[],p=[],f=[Rr(e[0],e[1]),Rr(e[2],e[3])],d=[Rr(s[0],s[1]),Rr(s[2],s[3])];return[[-1,-1],[1,-1],[1,1],[-1,1]].forEach((function(t){var e=(0,z.Z)(t,2),s=e[0],m=e[1];c.push([].concat(f,[(s+1)*Ir+(m+1)*Lr+Cr(o)*Pr+n,(r+512)*kr+(i+512)*Or])),h.push([].concat(d,[u,l])),p.push([a,0,0,0])})),{packedBuffer:c,packedBuffer2:h,packedBuffer3:p}}var Nr,Fr,zr,Br={ProjectionMatrix:"u_ProjectionMatrix",ViewMatrix:"u_ViewMatrix",ViewProjectionMatrix:"u_ViewProjectionMatrix",Zoom:"u_Zoom",ZoomScale:"u_ZoomScale",FocalDistance:"u_FocalDistance",CameraPosition:"u_CameraPosition"},jr={MapInitStart:"mapInitStart",LayerInitStart:"layerInitStart",LayerInitEnd:"layerInitEnd",SourceInitStart:"sourceInitStart",SourceInitEnd:"sourceInitEnd",ScaleInitStart:"scaleInitStart",ScaleInitEnd:"scaleInitEnd",MappingStart:"mappingStart",MappingEnd:"mappingEnd",BuildModelStart:"buildModelStart",BuildModelEnd:"buildModelEnd"};!function(t){t.LINEAR="linear",t.SEQUENTIAL="sequential",t.POWER="power",t.LOG="log",t.IDENTITY="identity",t.TIME="time",t.QUANTILE="quantile",t.QUANTIZE="quantize",t.THRESHOLD="threshold",t.CAT="cat",t.DIVERGING="diverging"}(Nr||(Nr={})),function(t){t.CONSTANT="constant",t.VARIABLE="variable"}(Fr||(Fr={})),function(t){t[t.Attribute=0]="Attribute",t[t.InstancedAttribute=1]="InstancedAttribute",t[t.Uniform=2]="Uniform"}(zr||(zr={}));var Ur,Zr=["mapload","mapchange","mapAfterFrameChange"],Vr=["loaded","fontloaded","maploaded","resize","destroy","dragstart","dragging","dragend","dragcancel"];!function(t){t.IMAGE="image",t.CUSTOMIMAGE="customImage",t.ARRAYBUFFER="arraybuffer",t.RGB="rgb",t.TERRAINRGB="terrainRGB",t.CUSTOMRGB="customRGB",t.CUSTOMARRAYBUFFER="customArrayBuffer",t.CUSTOMTERRAINRGB="customTerrainRGB"}(Ur||(Ur={}))},1301:(t,e,n)=>{"use strict";n.r(e),n.d(e,{BaseLayer:()=>V,BaseModel:()=>H,CanvasLayer:()=>J,CanvasUpdateType:()=>$,CityBuildingLayer:()=>Kt,EarthLayer:()=>bn,GeometryLayer:()=>ne,HeatmapLayer:()=>le,ImageLayer:()=>he,LineLayer:()=>Ce,LinearDir:()=>q,MaskLayer:()=>wn,PointLayer:()=>rn,PolygonLayer:()=>ln,RasterLayer:()=>mn,SizeUnitType:()=>X,TextureBlend:()=>Y,TileDebugLayer:()=>gn,WindLayer:()=>Zn,lineStyleType:()=>W});var r,i=n(108),o=n(800),a=n(3192),s=n(6838),u=n(5161),l=n(6193),c=n(9097),h=n(6875),p=n(6297),f=n(1109),d=n.n(f),m=n(2718),g=n(3659),y=n(6902),v=n(7677),_=n(5048),b=n(8134),x=n(5619),w=n(1883),S=n(9479),E=(r={},(0,p.Z)(r,i.BlendType.additive,{enable:!0,func:{srcRGB:i.gl.ONE,dstRGB:i.gl.ONE,srcAlpha:1,dstAlpha:1}}),(0,p.Z)(r,i.BlendType.none,{enable:!1}),(0,p.Z)(r,i.BlendType.normal,{enable:!0,func:{srcRGB:i.gl.SRC_ALPHA,dstRGB:i.gl.ONE_MINUS_SRC_ALPHA,srcAlpha:1,dstAlpha:1}}),(0,p.Z)(r,i.BlendType.subtractive,{enable:!0,func:{srcRGB:i.gl.ONE,dstRGB:i.gl.ONE,srcAlpha:i.gl.ZERO,dstAlpha:i.gl.ONE_MINUS_SRC_COLOR},equation:{rgb:i.gl.FUNC_SUBTRACT,alpha:i.gl.FUNC_SUBTRACT}}),(0,p.Z)(r,i.BlendType.max,{enable:!0,func:{srcRGB:i.gl.ONE,dstRGB:i.gl.ONE},equation:{rgb:i.gl.MAX_EXT}}),(0,p.Z)(r,i.BlendType.min,{enable:!0,func:{srcRGB:i.gl.ONE,dstRGB:i.gl.ONE},equation:{rgb:i.gl.MIN_EXT}}),r),M=n(5895);function T(t,e,n,r,i){var o=(null==i?void 0:i.getLayerConfig()).arrow,a=void 0===o?{enable:!1}:o,s=e.map((function(e){var r,i,o,s,u={id:e._id,coordinates:e.coordinates};if(t.filter((function(t){return void 0!==t.scale})).forEach((function(t){var r=function(t,e){var n;if(!t.scale)return[];var r=(null==t||null===(n=t.scale)||void 0===n?void 0:n.scalers)||[],i=[];return r.forEach((function(n){var r,o=n.field;(e.hasOwnProperty(o)||"variable"===(null===(r=t.scale)||void 0===r?void 0:r.type))&&i.push(e[o])})),t.mapping?t.mapping(i):[]}(t,e);t.needRemapping=!1,"color"===t.name&&(r=r.map((function(t){return(0,x.rgb2arr)(t)}))),u[t.name]=Array.isArray(r)&&1===r.length?r[0]:r,"shape"===t.name&&(u.shape=n.getIconFontKey(u[t.name]))})),"line"===u.shape&&a.enable){var l=u.coordinates,c=(r=l[0],o=[(i=l[1])[0]-r[0],i[1]-r[1]],s=(0,x.normalize)(o),[r[0]+1e-4*s[0],r[1]+1e-4*s[1]]);u.coordinates.splice(1,0,c,c)}return u}));return function(t,e,n){if(t.length>0&&e.version===M.G["GAODE2.x"]){var r=n.coordCenter;t[0].coordinates[0],t.filter((function(t){return!t.originCoordinates})).map((function(t){t.version=M.G["GAODE2.x"],t.originCoordinates=(0,S.cloneDeep)(t.coordinates),t.coordinates=e.coordToAMap2RelativeCoordinates(t.coordinates,r)}))}}(s,r,i),function(t,e){t.length>0&&e.version===M.G.SIMPLE&&t.map((function(t){t.simpleCoordinate||(t.coordinates=function(t,e){if("number"==typeof t[0])return e.simpleMapCoord.unproject(t);if(t[0]&&t[0][0]instanceof Array){var n=[];return t.map((function(t){var r=[];t.map((function(t){r.push(e.simpleMapCoord.unproject(t))})),n.push(r)})),n}var r=[];return t.map((function(t){r.push(e.simpleMapCoord.unproject(t))})),r}(t.coordinates,e),t.simpleCoordinate=!0)}))}(s,r),s}var A=n(5162);function C(t){return t.map((function(t){return"string"==typeof t&&(t=[t,{}]),t}))}function O(t,e,n,r){var i=t.multiPassRenderer;return t.getLayerConfig().enableTAA?i.add(r("taa")):i.add(r("render")),C(e).forEach((function(t){var e=(0,A.Z)(t,2),r=e[0],o=e[1];i.add(n(r),o)})),i.add(n("copy")),i}var P,k,L,I=function(){function t(e){(0,a.Z)(this,t),this.layer=e}return(0,s.Z)(t,[{key:"pickRender",value:function(t){var e=this.layer.getContainer().get(i.TYPES.ILayerService),n=this.layer;if(n.tileLayer)return n.tileLayer.pickRender(t);n.hooks.beforePickingEncode.call(),e.renderTileLayerMask(n),n.renderModels({ispick:!0}),n.hooks.afterPickingEncode.call()}},{key:"pick",value:function(t,e){var n=this.layer.getContainer().get(i.TYPES.IPickingService);return"RasterLayer"===t.type?this.pickRasterLayer(t,e):(this.pickRender(e),n.pickFromPickingFBO(t,e))}},{key:"pickRasterLayer",value:function(t,e,n){var r=this.layer.getContainer(),o=r.get(i.TYPES.IPickingService),a=r.get(i.TYPES.IMapService),s=this.layer.getSource().extent,u=(0,x.lngLatInExtent)(e.lngLat,s),l={x:e.x,y:e.y,type:e.type,lngLat:e.lngLat,target:e,rasterValue:null},c=n||t;if(u){var h=this.readRasterValue(t,s,a,e.x,e.y);return l.rasterValue=h,o.triggerHoverOnLayer(c,l),!0}return l.type="mousemove"===e.type?"mouseout":"un"+e.type,o.triggerHoverOnLayer(c,(0,g.Z)((0,g.Z)({},l),{},{type:"unpick"})),o.triggerHoverOnLayer(c,l),!1}},{key:"readRasterValue",value:function(t,e,n,r,i){var o=t.getSource().data.dataArray[0],a=(0,A.Z)(e,4),s=a[0],u=void 0===s?0:s,l=a[1],c=void 0===l?0:l,h=a[2],p=void 0===h?10:h,f=a[3],d=void 0===f?-10:f,m=n.lngLatToContainer([u,c]),g=n.lngLatToContainer([p,d]),y=g.x-m.x,v=m.y-g.y,_=[(r-m.x)/y,(i-g.y)/v],b=o.width||1,x=o.height||1,w=Math.floor(_[0]*b),S=Math.floor(_[1]*x),E=Math.max(0,S-1)*b+w;return o.data[E]}},{key:"selectFeature",value:function(t){var e=this.layer,n=(0,A.Z)(t,3),r=n[0],i=n[1],o=n[2];e.hooks.beforeSelect.call([r,i,o])}},{key:"highlightPickedFeature",value:function(t){var e=(0,A.Z)(t,3),n=e[0],r=e[1],i=e[2];this.layer.hooks.beforeHighlight.call([n,r,i])}},{key:"getFeatureById",value:function(t){return this.layer.getSource().getFeatureById(t)}}]),t}(),R=function(){function t(e){(0,a.Z)(this,t),this.layer=e;var n=this.layer.getContainer();this.rendererService=n.get(i.TYPES.IRendererService)}return(0,s.Z)(t,[{key:"getColorTexture",value:function(t,e){var n=this.getTextureKey(t,e);return this.key===n||(this.createColorTexture(t,e),this.key=n),this.colorTexture}},{key:"createColorTexture",value:function(t,e){var n=this.rendererService.createTexture2D,r=this.getColorRampBar(t,e),i=n({data:new Uint8Array(r.data),width:r.width,height:r.height,flipY:!1});return this.colorTexture=i,i}},{key:"setColorTexture",value:function(t,e,n){this.key=this.getTextureKey(e,n),this.colorTexture=t}},{key:"destroy",value:function(){var t;null===(t=this.colorTexture)||void 0===t||t.destroy()}},{key:"getColorRampBar",value:function(t,e){switch(t.type){case"cat":return(0,x.generateCatRamp)(t);case"quantize":return(0,x.generateQuantizeRamp)(t);case"custom":return(0,x.generateCustomRamp)(t,e);case"linear":return(0,x.generateLinearRamp)(t,e);default:return(0,x.generateColorRamp)(t)}}},{key:"getTextureKey",value:function(t,e){var n;return"".concat(t.colors.join("_"),"_").concat(null==t||null===(n=t.positions)||void 0===n?void 0:n.join("_"),"_").concat(t.type,"_").concat(null==e?void 0:e.join("_"))}}]),t}(),D=["passes"],N=["moduleName","vertexShader","fragmentShader","inject","triangulation","segmentNumber"];function F(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return z(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,z),t=k.call(this),(0,p.Z)((0,u.Z)(t),"id","".concat(Z++)),(0,p.Z)((0,u.Z)(t),"name","".concat(Z)),(0,p.Z)((0,u.Z)(t),"visible",!0),(0,p.Z)((0,u.Z)(t),"zIndex",0),(0,p.Z)((0,u.Z)(t),"inited",!1),(0,p.Z)((0,u.Z)(t),"layerModelNeedUpdate",!1),(0,p.Z)((0,u.Z)(t),"pickedFeatureID",null),(0,p.Z)((0,u.Z)(t),"selectedFeatureID",null),(0,p.Z)((0,u.Z)(t),"styleNeedUpdate",!1),(0,p.Z)((0,u.Z)(t),"forceRender",!1),(0,p.Z)((0,u.Z)(t),"clusterZoom",0),(0,p.Z)((0,u.Z)(t),"defaultSourceConfig",{data:[],options:{parser:{type:"json"}}}),(0,p.Z)((0,u.Z)(t),"dataState",{dataSourceNeedUpdate:!1,dataMappingNeedUpdate:!1,filterNeedUpdate:!1,featureScaleNeedUpdate:!1,StyleAttrNeedUpdate:!1}),(0,p.Z)((0,u.Z)(t),"hooks",{init:new _.S$,afterInit:new _.oI,beforeRender:new _.oI,beforeRenderData:new _.bf,afterRender:new _.ni,beforePickingEncode:new _.ni,afterPickingEncode:new _.ni,beforeHighlight:new _.ni(["pickedColor"]),afterHighlight:new _.ni,beforeSelect:new _.ni(["pickedColor"]),afterSelect:new _.ni,beforeDestroy:new _.ni,afterDestroy:new _.ni}),(0,p.Z)((0,u.Z)(t),"models",[]),(0,p.Z)((0,u.Z)(t),"startInit",!1),(0,p.Z)((0,u.Z)(t),"layerChildren",[]),(0,p.Z)((0,u.Z)(t),"masks",[]),(0,y.Z)((0,u.Z)(t),"configService",L,(0,u.Z)(t)),(0,p.Z)((0,u.Z)(t),"animateOptions",{enable:!1}),(0,p.Z)((0,u.Z)(t),"currentPickId",null),(0,p.Z)((0,u.Z)(t),"encodeStyleAttribute",{}),(0,p.Z)((0,u.Z)(t),"enableEncodeStyles",[]),(0,p.Z)((0,u.Z)(t),"pendingStyleAttributes",[]),(0,p.Z)((0,u.Z)(t),"scaleOptions",{}),(0,p.Z)((0,u.Z)(t),"animateStatus",!1),(0,p.Z)((0,u.Z)(t),"isDestroyed",!1),(0,p.Z)((0,u.Z)(t),"encodeDataLength",0),(0,p.Z)((0,u.Z)(t),"sourceEvent",(function(){t.dataState.dataSourceNeedUpdate=!0;var e=t.getLayerConfig();e&&e.autoFit&&t.fitBounds(e.fitBoundsOptions),t.layerSource.getSourceCfg().autoRender&&t.reRender()})),t.name=e.name||t.id,t.zIndex=e.zIndex||0,t.rawConfig=e,t}return(0,s.Z)(z,[{key:"addMask",value:function(t){this.masks.push(t),this.enableMask()}},{key:"removeMask",value:function(t){var e=this.masks.indexOf(t);e>-1&&this.masks.splice(e,1)}},{key:"disableMask",value:function(){this.updateLayerConfig({enableMask:!1})}},{key:"enableMask",value:function(){this.updateLayerConfig({enableMask:!0})}},{key:"addMaskLayer",value:function(t){this.masks.push(t)}},{key:"removeMaskLayer",value:function(t){var e=this.masks.indexOf(t);e>-1&&this.masks.splice(e,1),t.destroy()}},{key:"getAttribute",value:function(t){return this.styleAttributeService.getLayerStyleAttribute(t)}},{key:"getLayerConfig",value:function(){return this.configService.getLayerConfig(this.id)}},{key:"updateLayerConfig",value:function(t){var e=this;if(Object.keys(t).map((function(n){n in e.rawConfig&&(e.rawConfig[n]=t[n])})),this.startInit){var n=this.container.get(i.TYPES.SceneID);this.configService.setLayerConfig(n,this.id,(0,g.Z)((0,g.Z)((0,g.Z)({},this.configService.getLayerConfig(this.id)),this.needUpdateConfig),t)),this.needUpdateConfig={}}else this.needUpdateConfig=(0,g.Z)((0,g.Z)({},this.needUpdateConfig),t)}},{key:"setContainer",value:function(t,e){this.container=t,this.sceneContainer=e}},{key:"getContainer",value:function(){return this.container}},{key:"addPlugin",value:function(t){return this.plugins.push(t),this}},{key:"init",value:(M=(0,o.Z)(d().mark((function t(){var e,n,r,o,a,s,u=this;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.container.get(i.TYPES.SceneID),this.startInit=!0,this.configService.setLayerConfig(e,this.id,this.rawConfig),this.layerType=this.rawConfig.layerType,this.iconService=this.container.get(i.TYPES.IIconService),this.fontService=this.container.get(i.TYPES.IFontService),this.rendererService=this.container.get(i.TYPES.IRendererService),this.layerService=this.container.get(i.TYPES.ILayerService),this.debugService=this.container.get(i.TYPES.IDebugService),this.interactionService=this.container.get(i.TYPES.IInteractionService),this.pickingService=this.container.get(i.TYPES.IPickingService),this.mapService=this.container.get(i.TYPES.IMapService),n=this.getLayerConfig(),r=n.enableMultiPassRenderer,o=n.passes,r&&null!=o&&o.length&&o.length>0&&this.mapService.on("mapAfterFrameChange",(function(){u.renderLayers()})),this.cameraService=this.container.get(i.TYPES.ICameraService),this.coordinateService=this.container.get(i.TYPES.ICoordinateSystemService),this.shaderModuleService=this.container.get(i.TYPES.IShaderModuleService),this.postProcessingPassFactory=this.container.get(i.TYPES.IFactoryPostProcessingPass),this.normalPassFactory=this.container.get(i.TYPES.IFactoryNormalPass),this.styleAttributeService=this.container.get(i.TYPES.IStyleAttributeService),r&&(this.multiPassRenderer=this.container.get(i.TYPES.IMultiPassRenderer),this.multiPassRenderer.setLayer(this)),this.pendingStyleAttributes.forEach((function(t){var e=t.attributeName,n=t.attributeField,r=t.attributeValues,i=t.updateOptions;u.styleAttributeService.updateStyleAttribute(e,{scale:(0,g.Z)({field:n},u.splitValuesAndCallbackInAttribute(r,u.getLayerConfig()[e]))},i)})),this.pendingStyleAttributes=[],this.plugins=this.container.getAll(i.TYPES.ILayerPlugin),a=F(this.plugins);try{for(a.s();!(s=a.n()).done;)s.value.apply(this,{rendererService:this.rendererService,mapService:this.mapService,styleAttributeService:this.styleAttributeService,normalPassFactory:this.normalPassFactory,postProcessingPassFactory:this.postProcessingPassFactory})}catch(t){a.e(t)}finally{a.f()}return this.layerPickService=new I(this),this.textureService=new R(this),this.log(i.IDebugLog.LayerInitStart),t.next=31,this.hooks.init.promise();case 31:this.log(i.IDebugLog.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 t.stop()}}),t,this)}))),function(){return M.apply(this,arguments)})},{key:"log",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"init";if(!this.tileLayer&&!this.isTileLayer){var r="".concat(this.id,".").concat(n,".").concat(t),i={id:this.id,type:this.type};null===(e=this.debugService)||void 0===e||e.log(r,i)}}},{key:"updateModelData",value:function(t){t.attributes&&t.elements?this.models.map((function(e){e.updateAttributesAndElements(t.attributes,t.elements)})):console.warn("data error")}},{key:"createModelData",value:function(t,e){var n;if(null!==(n=this.layerModel)&&void 0!==n&&n.createModelData)return this.layerModel.createModelData(e);var r=this.calculateEncodeData(t,e),i=this.triangulation;return r&&i?this.styleAttributeService.createAttributesAndIndices(r,i):{attributes:void 0,elements:void 0}}},{key:"setLayerPickService",value:function(t){this.layerPickService=t}},{key:"calculateEncodeData",value:function(t,e){return this.inited?function(t,e,n,r,i,o){var a=new b.default(i,o),s=T(r.getLayerStyleAttributes()||[],a.data.dataArray,e,n,t);return a.destroy(),s}(this,this.fontService,this.mapService,this.styleAttributeService,t,e):(console.warn("layer not inited!"),null)}},{key:"prepareBuildModel",value:function(){0!==Object.keys(this.needUpdateConfig||{}).length&&this.updateLayerConfig({});var t=this.getLayerConfig().animateOption;null!=t&&t.enable&&(this.layerService.startAnimate(),this.animateStatus=!0)}},{key:"color",value:function(t,e,n){return this.updateStyleAttribute("color",t,e,n),this}},{key:"texture",value:function(t,e,n){return this.updateStyleAttribute("texture",t,e,n),this}},{key:"rotate",value:function(t,e,n){return this.updateStyleAttribute("rotate",t,e,n),this}},{key:"size",value:function(t,e,n){return this.updateStyleAttribute("size",t,e,n),this}},{key:"filter",value:function(t,e,n){var r=this.updateStyleAttribute("filter",t,e,n);return this.dataState.dataSourceNeedUpdate=r&&this.inited,this}},{key:"shape",value:function(t,e,n){this.shapeOption={field:t,values:e};var r=this.updateStyleAttribute("shape",t,e,n);return this.dataState.dataSourceNeedUpdate=r&&this.inited,this}},{key:"label",value:function(t,e,n){return this.pendingStyleAttributes.push({attributeName:"label",attributeField:t,attributeValues:e,updateOptions:n}),this}},{key:"animate",value:function(t){var e={};return(0,S.isObject)(t)?(e.enable=!0,e=(0,g.Z)((0,g.Z)({},e),t)):e.enable=t,this.updateLayerConfig({animateOption:e}),this}},{key:"source",value:function(t,e){return"source"===(null==t?void 0:t.type)?(this.setSource(t),this):(this.sourceOption={data:t,options:e},this.clusterZoom=0,this)}},{key:"setData",value:function(t,e){var n=this;return this.inited?(this.log(i.IDebugLog.SourceInitStart,i.ILayerStage.UPDATE),this.layerSource.setData(t,e),this.log(i.IDebugLog.SourceInitEnd,i.ILayerStage.UPDATE)):this.on("inited",(function(){n.log(i.IDebugLog.SourceInitStart,i.ILayerStage.UPDATE),n.getSource()?n.layerSource.setData(t,e):n.source(new b.default(t,e)),n.layerSource.once("update",(function(){n.log(i.IDebugLog.SourceInitEnd,i.ILayerStage.UPDATE)}))})),this}},{key:"style",value:function(t){var e=this,n=t.passes,r=(0,m.Z)(t,D);n&&C(n).forEach((function(t){var n=e.multiPassRenderer.getPostProcessor().getPostProcessingPassByName(t[0]);n&&n.updateOptions(t[1])}));var i=r;return Object.keys(r).forEach((function(t){var e=r[t];!Array.isArray(e)||2!==e.length||(0,S.isNumber)(e[0])||(0,S.isNumber)(e[1])||(i[t]={field:e[0],value:e[1]})})),this.encodeStyle(i),this.updateLayerConfig(i),this}},{key:"encodeStyle",value:function(t){var e=this;Object.keys(t).forEach((function(n){e.enableEncodeStyles.includes(n)&&(0,S.isPlainObject)(t[n])&&(t[n].field||t[n].value)&&!(0,S.isEqual)(e.encodeStyleAttribute[n],t[n])?(e.encodeStyleAttribute[n]=t[n],e.updateStyleAttribute(n,t[n].field,t[n].value),e.styleNeedUpdate=!0):e.encodeStyleAttribute[n]&&delete e.encodeStyleAttribute[n]}))}},{key:"scale",value:function(t,e){var n=(0,g.Z)({},this.scaleOptions);if((0,S.isObject)(t)?this.scaleOptions=(0,g.Z)((0,g.Z)({},this.scaleOptions),t):this.scaleOptions[t]=e,this.styleAttributeService&&!(0,S.isEqual)(n,this.scaleOptions)){var r=(0,S.isObject)(t)?t:(0,p.Z)({},t,e);this.styleAttributeService.updateScaleAttribute(r)}return this}},{key:"renderLayers",value:function(){this.rendering=!0,this.layerService.reRender(),this.rendering=!1}},{key:"render",value:function(){var t=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(t),this)}},{key:"renderMultiPass",value:(w=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(this.encodeDataLength<=0)||this.forceRender){t.next=2;break}return t.abrupt("return");case 2:if(!this.multiPassRenderer||!this.multiPassRenderer.getRenderFlag()){t.next=7;break}return t.next=5,this.multiPassRenderer.render();case 5:t.next=8;break;case 7:this.multiPassRenderer,this.renderModels();case 8:case"end":return t.stop()}}),t,this)}))),function(){return w.apply(this,arguments)})},{key:"active",value:function(t){var e={};return e.enableHighlight=!!(0,S.isObject)(t)||t,(0,S.isObject)(t)?(e.enableHighlight=!0,t.color&&(e.highlightColor=t.color),t.mix&&(e.activeMix=t.mix)):e.enableHighlight=!!t,this.updateLayerConfig(e),this}},{key:"setActive",value:function(t,e){var n=this;if((0,S.isObject)(t)){var r=t.x,i=void 0===r?0:r,o=t.y,a=void 0===o?0:o;this.updateLayerConfig({highlightColor:(0,S.isObject)(e)?e.color:this.getLayerConfig().highlightColor,activeMix:(0,S.isObject)(e)?e.mix:this.getLayerConfig().activeMix}),this.pick({x:i,y:a})}else this.updateLayerConfig({pickedFeatureID:t,highlightColor:(0,S.isObject)(e)?e.color:this.getLayerConfig().highlightColor,activeMix:(0,S.isObject)(e)?e.mix:this.getLayerConfig().activeMix}),this.hooks.beforeHighlight.call((0,x.encodePickingColor)(t)).then((function(){setTimeout((function(){n.reRender()}),1)}))}},{key:"select",value:function(t){var e={};return e.enableSelect=!!(0,S.isObject)(t)||t,(0,S.isObject)(t)?(e.enableSelect=!0,t.color&&(e.selectColor=t.color),t.mix&&(e.selectMix=t.mix)):e.enableSelect=!!t,this.updateLayerConfig(e),this}},{key:"setSelect",value:function(t,e){var n=this;if((0,S.isObject)(t)){var r=t.x,i=void 0===r?0:r,o=t.y,a=void 0===o?0:o;this.updateLayerConfig({selectColor:(0,S.isObject)(e)?e.color:this.getLayerConfig().selectColor,selectMix:(0,S.isObject)(e)?e.mix:this.getLayerConfig().selectMix}),this.pick({x:i,y:a})}else this.updateLayerConfig({pickedFeatureID:t,selectColor:(0,S.isObject)(e)?e.color:this.getLayerConfig().selectColor,selectMix:(0,S.isObject)(e)?e.mix:this.getLayerConfig().selectMix}),this.hooks.beforeSelect.call((0,x.encodePickingColor)(t)).then((function(){setTimeout((function(){n.reRender()}),1)}))}},{key:"setBlend",value:function(t){return this.updateLayerConfig({blend:t}),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(t){return this.zIndex=t,this.layerService.updateLayerRenderList(),this.layerService.renderLayers(),this}},{key:"setCurrentPickId",value:function(t){this.currentPickId=t}},{key:"getCurrentPickId",value:function(){return this.currentPickId}},{key:"setCurrentSelectedId",value:function(t){this.selectedFeatureID=t}},{key:"getCurrentSelectedId",value:function(){return this.selectedFeatureID}},{key:"isVisible",value:function(){var t=this.mapService.getZoom(),e=this.getLayerConfig(),n=e.visible,r=e.minZoom,i=void 0===r?-1/0:r,o=e.maxZoom;return!!n&&t>=i&&t<(void 0===o?1/0:o)}},{key:"setMultiPass",value:function(t,e){if(this.updateLayerConfig({enableMultiPassRenderer:t}),e&&this.updateLayerConfig({passes:e}),t){var n=this.getLayerConfig().passes,r=void 0===n?[]:n;this.multiPassRenderer=O(this,r,this.postProcessingPassFactory,this.normalPassFactory),this.multiPassRenderer.setRenderFlag(!0);var i=this.rendererService.getViewportSize(),o=i.width,a=i.height;this.multiPassRenderer.resize(o,a)}return this}},{key:"setMinZoom",value:function(t){return this.updateLayerConfig({minZoom:t}),this}},{key:"getMinZoom",value:function(){return this.getLayerConfig().minZoom}},{key:"getMaxZoom",value:function(){return this.getLayerConfig().maxZoom}},{key:"get",value:function(t){return this.getLayerConfig()[t]}},{key:"setMaxZoom",value:function(t){return this.updateLayerConfig({maxZoom:t}),this}},{key:"setAutoFit",value:function(t){return this.updateLayerConfig({autoFit:t}),this}},{key:"fitBounds",value:function(t){if(!this.inited)return this.updateLayerConfig({autoFit:!0}),this;var e=this.getSource().extent;return e.some((function(t){return Math.abs(t)===1/0}))||this.mapService.fitBounds([[e[0],e[1]],[e[2],e[3]]],t),this}},{key:"destroy",value:function(){var t,e,n,r,i=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isDestroyed||(this.layerChildren.map((function(t){return t.destroy(!1)})),this.layerChildren=[],this.getLayerConfig().maskfence&&(this.masks.map((function(t){return t.destroy(!1)})),this.masks=[]),this.hooks.beforeDestroy.call(),this.layerSource.off("update",this.sourceEvent),null===(t=this.multiPassRenderer)||void 0===t||t.destroy(),this.textureService.destroy(),this.styleAttributeService.clearAllAttributes(),this.hooks.afterDestroy.call(),null===(e=this.layerModel)||void 0===e||e.clearModels(i),null===(n=this.tileLayer)||void 0===n||n.destroy(),this.models=[],null===(r=this.debugService)||void 0===r||r.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 t;this.models.forEach((function(t){return t.destroy()})),null===(t=this.layerModel)||void 0===t||t.clearModels(),this.models=[]}},{key:"isDirty",value:function(){return!!(this.styleAttributeService.getLayerStyleAttributes()||[]).filter((function(t){return t.needRescale||t.needRemapping||t.needRegenerateVertices})).length}},{key:"setSource",value:function(t){var e=this;if(this.layerSource&&this.layerSource.off("update",this.sourceEvent),this.layerSource=t,this.clusterZoom=0,this.inited&&this.layerSource.cluster){var n=this.mapService.getZoom();this.layerSource.updateClusterData(n)}this.layerSource.inited&&this.sourceEvent(),this.layerSource.on("update",(function(t){var n=t.type;if(void 0===e.coordCenter){var r,i=e.layerSource.center;e.coordCenter=i,null!==(r=e.mapService)&&void 0!==r&&r.setCoordCenter&&e.mapService.setCoordCenter(i)}if("update"===n){if(e.tileLayer)return void e.tileLayer.reload();e.sourceEvent()}}))}},{key:"getSource",value:function(){return this.layerSource}},{key:"getScaleOptions",value:function(){return this.scaleOptions}},{key:"setEncodedData",value:function(t){this.encodedData=t,this.encodeDataLength=t.length}},{key:"getEncodedData",value:function(){return this.encodedData}},{key:"getScale",value:function(t){return this.styleAttributeService.getLayerAttributeScale(t)}},{key:"getLegend",value:function(t){var e,n,r,i=this.styleAttributeService.getLayerStyleAttribute(t);return{type:null===(n=((null==i||null===(e=i.scale)||void 0===e?void 0:e.scalers)||[])[0].option)||void 0===n?void 0:n.type,field:null==i||null===(r=i.scale)||void 0===r?void 0:r.field,items:this.getLegendItems(t)}}},{key:"getLegendItems",value:function(t){var e=this.styleAttributeService.getLayerAttributeScale(t);return e?e.invertExtent?e.range().map((function(n){return(0,p.Z)({value:e.invertExtent(n)},t,n)})):e.ticks?e.ticks().map((function(n){return(0,p.Z)({value:n},t,e(n))})):null!=e&&e.domain?e.domain().filter((function(t){return!(0,S.isUndefined)(t)})).map((function(n){return(0,p.Z)({value:n},t,e(n))})):[]:[]}},{key:"pick",value:function(t){var e=t.x,n=t.y;this.interactionService.triggerHover({x:e,y:n})}},{key:"boxSelect",value:function(t,e){this.pickingService.boxPickLayer(this,t,e)}},{key:"buildLayerModel",value:(v=(0,o.Z)(d().mark((function t(e){var n,r,o,a,s,u,l,c,h,p,f,y,v=this;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.moduleName,r=e.vertexShader,o=e.fragmentShader,a=e.inject,s=e.triangulation,u=e.segmentNumber,l=(0,m.Z)(e,N),this.shaderModuleService.registerModule(n,{vs:r,fs:o,inject:a}),c=this.shaderModuleService.getModule(n),h=c.vs,p=c.fs,f=c.uniforms,y=this.rendererService.createModel,t.abrupt("return",new Promise((function(t){var e=v.styleAttributeService.createAttributesAndIndices(v.encodedData,s,u),n=e.attributes,r=e.elements,o=e.count,a=(0,g.Z)({attributes:n,uniforms:f,fs:p,vs:h,elements:r,blend:E[i.BlendType.normal]},l);o&&(a.count=o),t(y(a))})));case 5:case"end":return t.stop()}}),t,this)}))),function(t){return v.apply(this,arguments)})},{key:"createAttributes",value:function(t){var e=t.triangulation;return this.styleAttributeService.createAttributes(this.encodedData,e).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(t){var e=this.getLayerConfig(),n=e.enableHighlight,r=void 0===n||n,i=e.enableSelect,o=void 0===i||i,a=-1!==this.eventNames().indexOf(t)||-1!==this.eventNames().indexOf("un"+t);return"click"!==t&&"dblclick"!==t||!o||(a=!0),"mousemove"!==t||!r&&-1===this.eventNames().indexOf("mouseenter")&&-1===this.eventNames().indexOf("unmousemove")&&-1===this.eventNames().indexOf("mouseout")||(a=!0),this.isVisible()&&a}},{key:"buildModels",value:(f=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return t.stop()}}),t)}))),function(){return f.apply(this,arguments)})},{key:"rebuildModels",value:(r=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.buildModels();case 2:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"renderMulPass",value:(n=(0,o.Z)(d().mark((function t(e){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.render();case 2:case"end":return t.stop()}}),t)}))),function(t){return n.apply(this,arguments)})},{key:"renderModels",value:function(){var t=this,e=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(n){n.draw({uniforms:t.layerModel.getUninforms(),blend:t.layerModel.getBlend(),stencil:t.layerModel.getStencil(e)},(null==e?void 0:e.ispick)||!1)})),this.hooks.afterRender.call(),this)}},{key:"updateStyleAttribute",value:function(t,e,n,r){var i=this.configService.getAttributeConfig(this.id)||{};return!(0,S.isEqual)(i[t],{field:e,values:n})&&(-1!==["color","size","texture","rotate","filter","label","shape"].indexOf(t)&&this.configService.setAttributeConfig(this.id,(0,p.Z)({},t,{field:e,values:n})),this.startInit?this.styleAttributeService.updateStyleAttribute(t,{scale:(0,g.Z)({field:e},this.splitValuesAndCallbackInAttribute(n,this.getLayerConfig()[e]))},r):this.pendingStyleAttributes.push({attributeName:t,attributeField:e,attributeValues:n,updateOptions:r}),!0)}},{key:"getLayerAttributeConfig",value:function(){return this.configService.getAttributeConfig(this.id)}},{key:"getShaderPickStat",value:function(){return this.layerService.getShaderPickStat()}},{key:"setEarthTime",value:function(t){console.warn("empty fn")}},{key:"processData",value:function(t){return t}},{key:"getModelType",value:function(){throw new Error("Method not implemented.")}},{key:"getDefaultConfig",value:function(){return{}}},{key:"initLayerModels",value:(e=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.models.forEach((function(t){return t.destroy()})),this.models=[],t.next=4,this.layerModel.initModels();case 4:this.models=t.sent;case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"reRender",value:function(){this.inited&&this.layerService.reRender()}},{key:"splitValuesAndCallbackInAttribute",value:function(t,e){return{values:(0,S.isFunction)(t)?void 0:t||e,callback:(0,S.isFunction)(t)?t:void 0}}}]),z}(w.EventEmitter),L=(0,v.Z)(k.prototype,"configService",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k);function G(t){return t.maskOperation===i.MaskOperation.OR?{enable:!0,mask:255,func:{cmp:i.gl.ALWAYS,ref:1,mask:255},opFront:{fail:i.gl.KEEP,zfail:i.gl.REPLACE,zpass:i.gl.REPLACE}}:{enable:!0,mask:255,func:{cmp:t.stencilType===i.StencilType.SINGLE||0===t.stencilIndex?i.gl.ALWAYS:i.gl.LESS,ref:t.stencilType===i.StencilType.SINGLE?1:0===t.stencilIndex?2:1,mask:255},opFront:{fail:i.gl.KEEP,zfail:i.gl.REPLACE,zpass:i.gl.REPLACE}}}var H=(B=(0,i.lazyInject)(i.TYPES.IGlobalConfigService),j=function(){function t(e){(0,a.Z)(this,t),(0,p.Z)(this,"preStyleAttribute",{}),(0,p.Z)(this,"encodeStyleAttribute",{}),(0,y.Z)(this,"configService",U,this),this.layer=e,this.rendererService=e.getContainer().get(i.TYPES.IRendererService),this.pickingService=e.getContainer().get(i.TYPES.IPickingService),this.shaderModuleService=e.getContainer().get(i.TYPES.IShaderModuleService),this.styleAttributeService=e.getContainer().get(i.TYPES.IStyleAttributeService),this.mapService=e.getContainer().get(i.TYPES.IMapService),this.iconService=e.getContainer().get(i.TYPES.IIconService),this.fontService=e.getContainer().get(i.TYPES.IFontService),this.cameraService=e.getContainer().get(i.TYPES.ICameraService),this.layerService=e.getContainer().get(i.TYPES.ILayerService),this.registerStyleAttribute(),this.registerBuiltinAttributes(),this.startModelAnimate();var n=this.rendererService.createTexture2D;this.createTexture2D=n}var e,n,r;return(0,s.Z)(t,[{key:"getBlend",value:function(){var t=this.layer.getLayerConfig().blend,e=void 0===t?"normal":t;return E[i.BlendType[e]]}},{key:"getStencil",value:function(t){var e=this.layer.getLayerConfig(),n=e.mask,r=void 0!==n&&n,o=e.maskInside,a=void 0===o||o,s=e.enableMask,u=e.maskOperation,l=void 0===u?i.MaskOperation.AND:u;return"MaskLayer"===this.layer.type?G({isStencil:!0,stencilType:i.StencilType.SINGLE}):t.isStencil?G((0,g.Z)((0,g.Z)({},t),{},{maskOperation:l})):function(t,e){return{enable:t,mask:255,func:{cmp:i.gl.EQUAL,ref:e?1:0,mask:1}}}(r||s&&0!==this.layer.masks.length||void 0!==this.layer.tileMask,a)}},{key:"getDefaultStyle",value:function(){return{}}},{key:"getUninforms",value:function(){throw new Error("Method not implemented.")}},{key:"getAnimateUniforms",value:function(){return{}}},{key:"needUpdate",value:(r=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!1);case 1:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"initModels",value:(e=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("Method not implemented.");case 1:case"end":return t.stop()}}),t)}))),function(){return e.apply(this,arguments)})},{key:"clearModels",value:function(){}},{key:"getAttribute",value:function(){throw new Error("Method not implemented.")}},{key:"render",value:function(t){throw new Error("Method not implemented.")}},{key:"registerBuiltinAttributes",value:function(){throw new Error("Method not implemented.")}},{key:"animateOption2Array",value:function(t){return[t.enable?0:1,t.duration||4,t.interval||.2,t.trailLength||.1]}},{key:"startModelAnimate",value:function(){this.layer.getLayerConfig().animateOption.enable&&this.layer.setAnimateStartTime()}},{key:"getInject",value:function(){var t=this.layer.encodeStyleAttribute,e="",n={opacity:"float",stroke:"vec4",offsets:"vec2",textOffset:"vec2"};this.layer.enableEncodeStyles.forEach((function(r){t[r]&&(e+="#define USE_ATTRIBUTE_".concat(r.toUpperCase()," 0.0; \n\n")),e+="\n #ifdef USE_ATTRIBUTE_".concat(r.toUpperCase(),"\n attribute ").concat(n[r]," a_").concat(r.charAt(0).toUpperCase()+r.slice(1),";\n#else\n uniform ").concat(n[r]," u_").concat(r,";\n#endif\n\n")}));var r="";return this.layer.enableEncodeStyles.forEach((function(t){r+="\n\n#ifdef USE_ATTRIBUTE_".concat(t.toUpperCase(),"\n ").concat(n[t]," ").concat(t," = a_").concat(t.charAt(0).toUpperCase()+t.slice(1),";\n#else\n ").concat(n[t]," ").concat(t," = u_").concat(t,";\n#endif\n\n")})),{"vs:#decl":e,"vs:#main-start":r}}},{key:"getStyleAttribute",value:function(){var t=this,e={},n={opacity:1,stroke:[1,0,0,1],offsets:[0,0]};return this.layer.enableEncodeStyles.forEach((function(r){if(!t.layer.encodeStyleAttribute[r]){var i=t.layer.getLayerConfig()[r],o=void 0===i?n[r]:i;"stroke"===r&&(o=(0,x.rgb2arr)(o)),e["u_"+r]=o}})),e}},{key:"registerStyleAttribute",value:function(){var t=this;Object.keys(this.layer.encodeStyleAttribute).forEach((function(e){var n=function(t){switch(t){case"stroke":return{name:"stroke",type:i.AttributeType.Attribute,descriptor:{name:"a_Stroke",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:4,update:function(t){var e=t.stroke;return void 0===e?[1,1,1,1]:e}}};case"opacity":return{name:"opacity",type:i.AttributeType.Attribute,descriptor:{name:"a_Opacity",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.opacity;return[void 0===e?1:e]}}};case"offsets":return{name:"offsets",type:i.AttributeType.Attribute,descriptor:{name:"a_Offsets",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t){return t.offsets}}};default:return}}(e);n&&t.styleAttributeService.registerStyleAttribute(n)}))}},{key:"updateEncodeAttribute",value:function(t,e){this.encodeStyleAttribute[t]=e}}]),t}(),U=(0,v.Z)(j.prototype,"configService",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),j),W=function(t){return t[t.solid=0]="solid",t[t.dash=1]="dash",t}({}),q=function(t){return t.VERTICAL="vertical",t.HORIZONTAL="horizontal",t}({}),Y=function(t){return t.NORMAL="normal",t.REPLACE="replace",t}({}),X=function(t){return t[t.pixel=0]="pixel",t[t.meter=1]="meter",t}({}),$=function(t){return t.ALWAYS="always",t.DRAGEND="dragend",t}({});const K={canvas:function(t){(0,l.Z)(m,t);var e,n,r,i,f=(r=m,i=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}}(),function(){var t,e=(0,h.Z)(r);if(i){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function m(){var t;(0,a.Z)(this,m);for(var e=arguments.length,n=new Array(e),r=0;r0)for(var b=c.length,x=b-2*(s+1);x+s+20&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,t),(0,p.Z)(this,"lastFlip",-1),(0,p.Z)(this,"miter",ut.al(0,0)),(0,p.Z)(this,"started",!1),(0,p.Z)(this,"dash",!1),(0,p.Z)(this,"totalDistance",0),(0,p.Z)(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(0,s.Z)(t,[{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 n=t.length,r=e.startIndex,i=1;ithis.miterLimit&&(M=!0),M?(h.push(this.normal[0],this.normal[1],0),h.push(S[0],S[1],0),c.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*E,0|r[2]),this.complex.indexes.push(this.currentIndex),c.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness*E,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,l.push.apply(l,(0,Q.Z)(this.lastFlip!==-E?[e,e+2,e+3]:[e+2,e+1,e+3])),l.push(e+2,e+3,e+4),dt(lt,ht),ut.JG(this.normal,lt),h.push(this.normal[0],this.normal[1],0),c.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*E,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,u+=3):(this.extrusions(c,h,r,S,w,this.totalDistance),l.push.apply(l,(0,Q.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),E=-1,ut.JG(this.normal,S),u+=2),this.lastFlip=E}else{if(dt(this.normal,ct),p){var T=ut.Ue(),C=ut.Ue();ut.lu(C,ct,this.normal),ut.IH(T,ct,this.normal),h.push(C[0],C[1],0),h.push(T[0],T[1],0),c.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),c.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(c,h,r,this.normal,this.thickness,this.totalDistance);l.push.apply(l,(0,Q.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),u+=2}return u}},{key:"segment",value:function(t,e,n,r,i){var o=0,a=t.indices,s=t.positions,u=t.normals,l="square"===this.cap,c="bevel"===this.join,h=(0,x.aProjectFlat)([r[0],r[1]]),p=(0,x.aProjectFlat)([n[0],n[1]]);mt(ct,h,p);var f=0;if(this.dash&&(f=this.lineSegmentDistance(h,p),this.totalDistance+=f),this.normal||(this.normal=ut.Ue(),dt(this.normal,ct)),!this.started)if(this.started=!0,l){var d=ut.Ue(),m=ut.Ue();ut.IH(d,this.normal,ct),ut.IH(m,this.normal,ct),u.push(m[0],m[1],0),u.push(d[0],d[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance-f,-this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),s.push(n[0],n[1],0|n[2],this.totalDistance-f,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-f);if(a.push(e+0,e+1,e+2),i){var g=(0,x.aProjectFlat)([i[0],i[1]]);gt(h,g)&&ut.IH(g,h,ut.Fv(g,ut.$X(g,h,p))),mt(ht,g,h);var y=ft(pt,ut.Ue(),ct,ht,this.thickness),v=(0,A.Z)(y,2),_=v[0],b=v[1],w=ut.AK(pt,this.normal)<0?-1:1,S=c;S||"miter"!==this.join||_>this.miterLimit&&(S=!0),S?(u.push(this.normal[0],this.normal[1],0),u.push(b[0],b[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*w,0|r[2]),this.complex.indexes.push(this.currentIndex),s.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness*w,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,a.push.apply(a,(0,Q.Z)(this.lastFlip!==-w?[e,e+2,e+3]:[e+2,e+1,e+3])),a.push(e+2,e+3,e+4),dt(lt,ht),ut.JG(this.normal,lt),u.push(this.normal[0],this.normal[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*w,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,o+=3):(this.extrusions(s,u,r,b,_,this.totalDistance),a.push.apply(a,(0,Q.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),w=-1,ut.JG(this.normal,b),o+=2),this.lastFlip=w}else{if(dt(this.normal,ct),l){var E=ut.Ue(),M=ut.Ue();ut.lu(M,ct,this.normal),ut.IH(E,ct,this.normal),u.push(M[0],M[1],0),u.push(E[0],E[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),s.push(r[0],r[1],0|r[2],this.totalDistance,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);a.push.apply(a,(0,Q.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),o+=2}return o}},{key:"extrusions",value:function(t,e,n,r,i,o){e.push(r[0],r[1],0),e.push(r[0],r[1],0),t.push(n[0],n[1],0|n[2],o,-i,0|n[2]),this.complex.indexes.push(this.currentIndex),t.push(n[0],n[1],0|n[2],o,i,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}}]),t}();function _t(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t[0][0],r=t[0][t[0].length-1];n[0]===r[0]&&n[1]===r[1]&&(t[0]=t[0].slice(0,t[0].length-1));for(var i=t[0].length,o=et().flatten(t),a=o.vertices,s=o.dimensions,u=[],l=[],c=[],h=0;h3&&void 0!==arguments[3]&&arguments[3],i=rt.create(),o=rt.create(),a=rt.create();r&&(t=(0,x.lngLatToMeters)(t),e=(0,x.lngLatToMeters)(e),n=(0,x.lngLatToMeters)(n));var s=rt.fromValues.apply(rt,(0,Q.Z)(t)),u=rt.fromValues.apply(rt,(0,Q.Z)(e)),l=rt.fromValues.apply(rt,(0,Q.Z)(n));rt.sub(i,l,u),rt.sub(o,s,u),rt.cross(a,i,o);var c=rt.create();return rt.normalize(c,a),c}([n[0],n[1],1],[t[0],t[1],0],[t[0],t[1],1],e);c.push.apply(c,(0,Q.Z)(i).concat((0,Q.Z)(i),(0,Q.Z)(i),(0,Q.Z)(i))),l.push.apply(l,(0,Q.Z)([1,2,0,3,2,1].map((function(t){return t+r}))))},d=0;d1&&void 0!==arguments[1]?arguments[1]:0,n=2*Math.PI/t,r=[],i=0;i1&&void 0!==arguments[1]&&arguments[1];if(Ot&&Ot[t])return Ot[t];var n=_t([Ct[t]?Ct[t]():Ct.cylinder()],e);return Ot[t]=n,n}(t.shape,!1);return{vertices:e.positions,indices:e.index,normals:e.normals,size:5}}function It(t){var e=(0,x.calculateCentroid)(t.coordinates);return{vertices:(0,Q.Z)(e),indices:[0],size:e.length}}function Rt(t){var e=t.coordinates,n=t.originCoordinates,r=t.version,i=new vt({dash:!0,join:"bevel"});if("GAODE2.x"===r){var o=e;Array.isArray(o[0][0])||(o=[e]);var a=n;Array.isArray(a[0][0])||(a=[n]);for(var s=0;s 0.0) {\n vec2 lnglatscale = vec2(0.0);\n if(u_CoordinateSystem != COORDINATE_SYSTEM_P20_2) {\n lnglatscale = (a_Position.xy - u_cityCenter) * vec2(0.0, 0.135);\n }\n v_worldDis = length(a_Position.xy + lnglatscale - u_cityCenter);\n }\n \n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n\n float lightWeight = calc_lighting(pos);\n // v_Color = a_Color;\n v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w);\n\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'uniform float u_opacity: 1.0;\nuniform vec4 u_baseColor : [ 1.0, 0, 0, 1.0 ];\nuniform vec4 u_brightColor : [ 1.0, 0, 0, 1.0 ];\nuniform vec4 u_windowColor : [ 1.0, 0, 0, 1.0 ];\nuniform float u_near : 0;\nuniform float u_far : 1;\nvarying vec4 v_Color;\nvarying vec2 v_texCoord;\nuniform float u_Zoom : 1;\nuniform float u_time;\n\nuniform float u_circleSweep;\nuniform float u_cityMinSize;\nuniform vec3 u_circleSweepColor;\nuniform float u_circleSweepSpeed;\n\nvarying float v_worldDis;\n\n#pragma include "picking"\n\nvec3 getWindowColor(float n, float hot, vec3 brightColor, vec3 darkColor) {\n float s = step(hot, n);\n vec3 color = mix(brightColor,vec3(0.9,0.9,1.0),n);\n\n return mix(darkColor, color, s);\n}\nfloat random (vec2 st) {\n return fract(sin(dot(st.xy, vec2(12.9898,78.233)))* 43758.5453123);\n}\n\nfloat LinearizeDepth()\n{\n float z = gl_FragCoord.z * 2.0 - 1.0;\n return (2.0 * u_near * u_far) / (u_far + u_near - z * (u_far - u_near));\n}\n\nvec3 fog(vec3 color, vec3 fogColor, float depth){\n float fogFactor=clamp(depth,0.0,1.0);\n vec3 output_color=mix(fogColor,color,fogFactor);\n return output_color;\n}\n\nfloat sdRect(vec2 p, vec2 sz) {\n vec2 d = abs(p) - sz;\n float outside = length(max(d, 0.));\n float inside = min(max(d.x, d.y), 0.);\n return outside + inside;\n}\n\nvoid main() {\n gl_FragColor = v_Color;\n vec3 baseColor = u_baseColor.xyz;\n vec3 brightColor = u_brightColor.xyz;\n vec3 windowColor = u_windowColor.xyz;\n float targetColId = 5.;\n float depth = 1.0 - LinearizeDepth() / u_far * u_Zoom;\n vec3 fogColor = vec3(23.0/255.0,31.0/255.0,51.0/255.0);\n if(v_texCoord.x < 0.) { //顶部颜色\n vec3 foggedColor = fog(baseColor.xyz + vec3(0.12*0.9,0.2*0.9,0.3*0.9),fogColor,depth);\n gl_FragColor = vec4( foggedColor, v_Color.w);\n }else { // 侧面颜色\n vec2 st = v_texCoord;\n vec2 UvScale = v_texCoord;\n float tStep = min(0.08,max(0.05* (18.0-u_Zoom),0.02));\n float tStart = 0.25 * tStep;\n float tEnd = 0.75 * tStep;\n float u = mod(UvScale.x, tStep);\n float v = mod(UvScale.y, tStep);\n float ux = floor(UvScale.x/tStep);\n float uy = floor(UvScale.y/tStep);\n float n = random(vec2(ux,uy));\n float lightP = u_time;\n float head = 1.0- step(0.005,st.y);\n /*step3*/\n // 将窗户颜色和墙面颜色区别开来\n float sU = step(tStart, u) - step(tEnd, u);\n float sV = step(tStart, v) - step(tEnd, v);\n vec2 windowSize = vec2(abs(tEnd-tStart),abs(tEnd-tStart));\n float dist = sdRect(vec2(u,v), windowSize);\n float s = sU * sV;\n\n float curColId = floor(UvScale.x / tStep);\n float sCol = step(targetColId - 0.2, curColId) - step(targetColId + 0.2, curColId);\n\n float mLightP = mod(lightP, 2.);\n float sRow = step(mLightP - 0.2, st.y) - step(mLightP, st.y);\n if(ux == targetColId){\n n =0.;\n }\n float timeP = min(0.75, abs ( sin(u_time/3.0) ) );\n float hot = smoothstep(1.0,0.0,timeP);\n vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);\n //vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);\n float sFinal = s * sCol * sRow;\n color += mix(baseColor, brightColor, sFinal*n);\n if (st.y<0.01){\n color = baseColor;\n }\n if(head ==1.0) { // 顶部亮线\n color = brightColor;\n }\n color = color * v_Color.rgb;\n\n vec3 foggedColor = fog(color,fogColor,depth);\n\n gl_FragColor = vec4(foggedColor,1.0);\n }\n\n\n if(u_circleSweep > 0.0 && v_worldDis < u_cityMinSize) {\n float r = fract(((v_worldDis/u_cityMinSize) - u_time * u_circleSweepSpeed) * 2.0);\n gl_FragColor.rgb += r * r * u_circleSweepColor;\n }\n \n gl_FragColor.a *= u_opacity;\n gl_FragColor = filterColor(gl_FragColor);\n}\n',triangulation:Zt,depth:{enable:!0},cull:{enable:!0,face:i.gl.BACK}});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?10:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_Uv",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[3],n[4]]}}})}}]),f}(H);var Kt=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:120,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:30,a=t/2,s=e/2,u=Math.floor(n),l=Math.floor(r),c=u+1,h=l+1,p=t/u,f=e/l,d=[],m=[],g=0;g 0.0) {\n gl_FragColor = texture2D(u_texture, vec2(v_uv.x, 1.0 - v_uv.y));\n gl_FragColor.a *= u_opacity;\n } else {\n // gl_FragColor = vec4(v_uv, 0.0, u_opacity);\n gl_FragColor = vec4(v_Color, u_opacity);\n }\n gl_FragColor.a *= v_clip;\n gl_FragColor = filterColor(gl_FragColor);\n}\n',triangulation:this.planeGeometryTriangulation,primitive:i.gl.TRIANGLES,depth:{enable:!0},cull:{enable:!0,face:i.gl.BACK}});case 7:return o=t.sent,t.abrupt("return",[o]);case 9:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.initModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"createModelData",value:function(t){if(t){var e=this.layer.getLayerConfig(),n=e.widthSegments,r=e.heightSegments,i=e.width,o=e.height,a=t,s=a.widthSegments,u=a.heightSegments,l=a.width,c=a.height;this.layer.style({widthSegments:void 0!==s?s:n,heightSegments:void 0!==u?u:r,width:void 0!==l?l:i,height:void 0!==c?c:o})}var h=this.layer.getEncodedData();return this.styleAttributeService.createAttributesAndIndices(h,this.planeGeometryTriangulation)}},{key:"updateTexture",value:function(t){var e=this,n=this.rendererService.createTexture2D;if(t){var r=new Image;r.crossOrigin="anonymous",r.onload=function(){e.texture=n({data:r,width:r.width,height:r.height,wrapS:i.gl.CLAMP_TO_EDGE,wrapT:i.gl.CLAMP_TO_EDGE}),e.layerService.reRender()},r.src=t}else this.texture=n({width:0,height:0})}},{key:"getImageData",value:function(t){var e=document.createElement("canvas"),n=e.getContext("2d"),r=t.width,i=t.height;return e.width=r,e.height=i,n.drawImage(t,0,0,r,i),n.getImageData(0,0,r,i)}},{key:"translateVertex",value:function(t,e,n,r,i,o){for(var a=n.width,s=n.height,u=this.getImageData(n).data,l=Math.floor(r),c=Math.floor(i),h=l+1,p=c+1,f=a/l,d=s/c,m=0;mo&&(t.positions[a+2]=i)):(t.positions[a+2]-=r,t.positions[a+2]0&&void 0!==arguments[0]?arguments[0]:10,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:120,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:30,i=[],o=[],a=this.mapService,s=this.spriteAnimate===te.UP?-this.spriteTop:this.spriteTop,u=0;u 0.0) {\n gl_FragColor = texture2D(u_texture, gl_PointCoord);\n gl_FragColor.a *= u_opacity;\n } else {\n gl_FragColor = vec4(v_Color, u_opacity);\n }\n}\n",triangulation:this.planeGeometryTriangulation,primitive:i.gl.POINTS,depth:{enable:!1},blend:this.getBlend()});case 11:return h=t.sent,t.abrupt("return",[h]);case 13:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.initModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"updateTexture",value:function(t){var e=this,n=this.rendererService.createTexture2D;if(t){var r=new Image;r.crossOrigin="anonymous",r.onload=function(){e.texture=n({data:r,width:r.width,height:r.height,wrapS:i.gl.CLAMP_TO_EDGE,wrapT:i.gl.CLAMP_TO_EDGE}),e.layerService.reRender()},r.src=t}else this.texture=n({width:0,height:0})}},{key:"registerBuiltinAttributes",value:function(){return""}}]),g}(H),billboard:Jt};var ne=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r 1 的 uv 转换为 -1 -> 1 的标准坐标空间(NDC)\n\n vec4 p1 = vec4(pos, 0.0, 1.0); // x/y 平面上的点(z == 0)可以认为是三维上的点被投影到平面后的点\n\tvec4 p2 = vec4(pos, 1.0, 1.0); // 平行于x/y平面、z==1 的平面上的点\n\n\tvec4 inverseP1 = u_InverseViewProjectionMatrix * p1; // 根据视图投影矩阵的逆矩阵平面上的反算出三维空间中的点(p1平面上的点)\n\tvec4 inverseP2 = u_InverseViewProjectionMatrix * p2;\n\n inverseP1 = inverseP1 / inverseP1.w; // 归一化操作(归一化后为世界坐标)\n\tinverseP2 = inverseP2 / inverseP2.w;\n\n\tfloat zPos = (0.0 - inverseP1.z) / (inverseP2.z - inverseP1.z); // ??\n\tvec4 position = inverseP1 + zPos * (inverseP2 - inverseP1);\n\n vec4 b= vec4(0.5000, 0.0, 1.0, 0.5000);\n float fh;\n\n v_intensity = texture2D(u_texture, v_texCoord).r;\n fh = toBezier(v_intensity, b).y;\n gl_Position = u_ViewProjectionMatrixUncentered * vec4(position.xy, fh * project_pixel(50.), 1.0);\n \n}\n',fs:"uniform sampler2D u_texture;\nuniform sampler2D u_colorTexture;\nuniform float u_opacity;\nvarying vec2 v_texCoord;\nvarying float v_intensity;\n\nvoid main(){\n \n float intensity = texture2D(u_texture, v_texCoord).r;\n vec4 color = texture2D(u_colorTexture,vec2(intensity, 0));\n gl_FragColor = color;\n // gl_FragColor.a = color.a * smoothstep(0.1,0.2,intensity)* u_opacity;\n gl_FragColor.a = color.a * smoothstep(0.,0.1,intensity) * u_opacity;\n}\n"});var n=this.shaderModuleService.getModule("heatmap3dColor"),r=n.vs,o=n.fs,a=n.uniforms,s=this.rendererService,u=s.createAttribute,l=s.createElements,c=s.createBuffer;return(0,s.createModel)({vs:r,fs:o,attributes:{a_Position:u({buffer:c({data:e.vertices,type:i.gl.FLOAT}),size:3}),a_Uv:u({buffer:c({data:e.uvs,type:i.gl.FLOAT}),size:2})},primitive:i.gl.TRIANGLES,uniforms:(0,g.Z)({},a),depth:{enable:!0},blend:{enable:!0,func:{srcRGB:i.gl.SRC_ALPHA,srcAlpha:1,dstRGB:i.gl.ONE_MINUS_SRC_ALPHA,dstAlpha:1}},elements:l({data:e.indices,type:i.gl.UNSIGNED_INT,count:e.indices.length})})}},{key:"updateStyle",value:function(){this.updateColorTexture()}},{key:"updateColorTexture",value:function(){var t=this.rendererService.createTexture2D;this.texture&&this.texture.destroy();var e=this.layer.getLayerConfig().rampColors,n=(0,x.generateColorRamp)(e);this.colorTexture=t({data:new Uint8Array(n.data),width:n.width,height:n.height,wrapS:i.gl.CLAMP_TO_EDGE,wrapT:i.gl.CLAMP_TO_EDGE,min:i.gl.NEAREST,mag:i.gl.NEAREST,flipY:!1}),this.preRampColors=e}}]),m}(H))||ie;const ue={heatmap:se,heatmap3d:se,grid:re,grid3d:oe,hexagon:function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig();return{u_opacity:t.opacity||1,u_coverage:t.coverage||.9,u_angle:t.angle||0,u_radius:[this.layer.getSource().data.xOffset,this.layer.getSource().data.yOffset]}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.layer.buildLayerModel({moduleName:"heatmapHexagon",vertexShader:'precision highp float;\n// 多边形顶点坐标\nattribute vec3 a_Position;\n// 多边形经纬度坐标\nattribute vec3 a_Pos;\nattribute float a_Size;\nattribute vec4 a_Color;\nuniform vec2 u_radius;\nuniform float u_coverage: 0.9;\nuniform float u_angle: 0;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nvarying vec4 v_color;\n\nuniform vec2 u_sceneCenterMercator;\n\n#pragma include "projection"\n#pragma include "project"\n#pragma include "picking"\n\nvoid main() {\n v_color = a_Color;\n \n mat2 rotationMatrix = mat2(cos(u_angle), sin(u_angle), -sin(u_angle), cos(u_angle));\n vec2 offset =(vec2(a_Position.xy * u_radius * rotationMatrix * u_coverage));\n vec2 lnglat = unProjectFlat(a_Pos.xy + offset);\n \n // vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0., 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n // gl_Position = u_Mvp * (vec4(project_pos.xy, 0., 1.0));\n // gl_Position = u_Mvp * (vec4(a_Pos.xy + offset, 0., 1.0));\n vec2 customLnglat = customProject(lnglat) - u_sceneCenterMercator;\n vec4 project_pos = project_position(vec4(customLnglat, 0, 1.0));\n gl_Position = u_Mvp * vec4(project_pos.xy, 0.0, 1.0);\n } else {\n vec4 project_pos = project_position(vec4(lnglat, 0, 1.0));\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, 0., 1.0));\n }\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'precision highp float;\nvarying vec4 v_color;\nuniform float u_opacity: 1;\n\n#pragma include "picking"\n\nvoid main() {\n gl_FragColor = v_color;\n gl_FragColor.a *= u_opacity;\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n',triangulation:Vt,depth:{enable:!1},primitive:i.gl.TRIANGLES});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"pos",type:i.AttributeType.Attribute,descriptor:{name:"a_Pos",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t){var e="GAODE2.x"===t.version?t.originCoordinates:t.coordinates;return[e[0],e[1],0]}}})}}]),f}(H)};var le=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};return"heatmap"===this.getModelType()?(this.layerModel&&this.layerModel.render(e),this):(this.encodeDataLength<=0&&!this.forceRender||(this.hooks.beforeRender.call(),this.models.forEach((function(n){return n.draw({uniforms:t.layerModel.getUninforms(),blend:t.layerModel.getBlend(),stencil:t.layerModel.getStencil(e)})})),this.hooks.afterRender.call()),this)}},{key:"updateModelData",value:function(t){t.attributes&&t.elements?this.models[0].updateAttributesAndElements(t.attributes,t.elements):console.warn("data error")}},{key:"getModelType",value:function(){var t,e=this.styleAttributeService.getLayerStyleAttribute("shape"),n=this.getLayerConfig().shape3d,r=this.getSource().data.type,i=(null==e||null===(t=e.scale)||void 0===t?void 0:t.field)||"heatmap";return"heatmap"===i||"heatmap3d"===i?"heatmap":"hexagon"===r?-1===(null==n?void 0:n.indexOf(i))?"hexagon":"grid3d":"grid"===r?-1===(null==n?void 0:n.indexOf(i))?"grid":"grid3d":"heatmap"}}]),f}(V);const ce={image:function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){return{u_opacity:this.layer.getLayerConfig().opacity||1,u_texture:this.texture}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){var e,n,r,o,a,s,u=this;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.layer.getSource(),n=this.rendererService.createTexture2D,this.texture=n({height:0,width:0}),!x.isMini){t.next=11;break}r=this.layerService.sceneService.getSceneConfig().canvas,(o=r.createImage()).crossOrigin="anonymous",o.src=e.data.originData,o.onload=function(){u.texture=n({data:o,width:o.width,height:o.height}),u.layerService.reRender()},t.next=15;break;case 11:return t.next=13,e.data.images;case 13:a=t.sent,this.texture=n({data:a[0],width:a[0].width,height:a[0].height,mag:i.gl.LINEAR,min:i.gl.LINEAR});case 15:return t.next=17,this.layer.buildLayerModel({moduleName:"rasterImage",vertexShader:'precision highp float;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nattribute vec3 a_Position;\nattribute vec2 a_Uv;\nvarying vec2 v_texCoord;\n#pragma include "projection"\nvoid main() {\n v_texCoord = a_Uv;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy,0., 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy,0., 1.0));\n }\n}\n',fragmentShader:"precision mediump float;\nuniform float u_opacity: 1.0;\nuniform sampler2D u_texture;\nvarying vec2 v_texCoord;\nvoid main() {\n vec4 color = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y));\n gl_FragColor = color;\n gl_FragColor.a *= u_opacity;\n if(gl_FragColor.a < 0.01)\n discard;\n}\n",triangulation:Gt,primitive:i.gl.TRIANGLES,blend:{enable:!0},depth:{enable:!1}});case 17:return s=t.sent,t.abrupt("return",[s]);case 19:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"clearModels",value:function(){var t;null===(t=this.texture)||void 0===t||t.destroy()}},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.initModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_Uv",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[3],n[4]]}}})}}]),f}(H)};var he=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {\n flag = 1.;\n };\n gl_FragColor.a *=flag;\n \n gl_FragColor = filterColor(gl_FragColor);\n}',vert:'\nattribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec4 a_Instance;\nattribute float a_Size;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform float segmentNumber;\nvarying vec4 v_color;\n\n\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\nuniform float u_lineDir: 1.0;\nvarying vec4 v_dash_array;\nvarying float v_distance_ratio;\n\nuniform float u_thetaOffset: 0.314;\n\nuniform float u_opacity: 1.0;\n\n#pragma include "projection"\n#pragma include "project"\n#pragma include "picking"\n\nfloat bezier3(vec3 arr, float t) {\n float ut = 1. - t;\n return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;\n}\nvec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {\n vec2 center = target - source;\n float r = length(center);\n float theta = atan(center.y, center.x);\n float thetaOffset = arcThetaOffset;\n float r2 = r / 2.0 / cos(thetaOffset);\n float theta2 = theta + thetaOffset;\n vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);\n if(u_lineDir == 1.0) { // 正向\n return mid;\n } else { // 逆向\n // (mid + vmin)/2 = (s + t)/2\n vec2 vmid = source + target - mid;\n return vmid;\n }\n // return mid;\n}\nfloat getSegmentRatio(float index) {\n // dash: index / (segmentNumber - 1.);\n // normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\n return index / (segmentNumber - 1.);\n}\nvec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {\n // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\n vec2 mid = midPoint(source, target, arcThetaOffset);\n vec3 x = vec3(source.x, mid.x, target.x);\n vec3 y = vec3(source.y, mid.y, target.y);\n return vec2(bezier3(x ,t), bezier3(y,t));\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\n return offset;\n}\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\n}\n\nvoid main() {\n v_color = vec4(a_Color.xyz, a_Color.w * u_opacity);\n \n vec2 source = a_Instance.rg; // 起始点\n vec2 target = a_Instance.ba; // 终点\n float segmentIndex = a_Position.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n\n vec2 s = source;\n vec2 t = target;\n \n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n s = unProjCustomCoord(source);\n t = unProjCustomCoord(target);\n }\n float total_Distance = pixelDistance(s, t) / 2.0 * PI;\n v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / total_Distance;\n\n v_distance_ratio = segmentIndex / segmentNumber;\n\n vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, u_thetaOffset), 0.0, 1.0));\n vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, u_thetaOffset), 0.0, 1.0));\n \n \n vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\n }\n gl_PointSize = 5.0;\n setPickingColor(a_PickingColor);\n}\n',type:"Dash"}:e&&n?{frag:'varying vec4 v_color;\n\n#pragma include "picking"\n\nvoid main() {\n// 当前顶点在弧线中所处的分段位置\n\n gl_FragColor = v_color;\n gl_FragColor = filterColor(gl_FragColor);\n}',vert:'\nattribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec4 a_Instance;\nattribute float a_Size;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform float segmentNumber;\nvarying vec4 v_color;\nvarying float v_segmentIndex;\n\nuniform float u_lineDir: 1.0;\nuniform float u_opacity: 1.0;\n\nuniform float u_thetaOffset: 0.314;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\n\n\n\n\n#pragma include "projection"\n#pragma include "project"\n#pragma include "picking"\n\nfloat bezier3(vec3 arr, float t) {\n float ut = 1. - t;\n return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;\n}\nvec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {\n vec2 center = target - source;\n float r = length(center);\n float theta = atan(center.y, center.x);\n float thetaOffset = arcThetaOffset;\n float r2 = r / 2.0 / cos(thetaOffset);\n float theta2 = theta + thetaOffset;\n vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);\n if(u_lineDir == 1.0) { // 正向\n return mid;\n } else { // 逆向\n // (mid + vmin)/2 = (s + t)/2\n vec2 vmid = source + target - mid;\n return vmid;\n }\n // return mid;\n}\nfloat getSegmentRatio(float index) {\n return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\n}\nvec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {\n // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\n vec2 mid = midPoint(source, target, arcThetaOffset);\n vec3 x = vec3(source.x, mid.x, target.x);\n vec3 y = vec3(source.y, mid.y, target.y);\n return vec2(bezier3(x ,t), bezier3(y,t));\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\n return offset;\n}\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\n}\n\nvoid main() {\n v_color = a_Color;\n\n vec2 source = a_Instance.rg; // 起始点\n vec2 target = a_Instance.ba; // 终点\n float segmentIndex = a_Position.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n float d_distance_ratio;\n vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, u_thetaOffset), 0.0, 1.0));\n vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, u_thetaOffset), 0.0, 1.0));\n // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);\n //unProjCustomCoord\n \n vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));\n\n\n float d_segmentIndex = a_Position.x + 1.0; // 当前顶点在弧线中所处的分段位置\n\n v_color = mix(u_sourceColor, u_targetColor, d_segmentIndex/segmentNumber);\n v_color.a *= u_opacity;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\n }\n setPickingColor(a_PickingColor);\n}\n',type:"Linear"}:{frag:'\n#define Animate 0.0\n#define LineTexture 1.0\n\nuniform float u_opacity;\nuniform float u_textureBlend;\nuniform float u_blur : 0.9;\nuniform float u_line_type: 0.0;\n// varying vec2 v_normal;\nvarying vec4 v_dash_array;\nvarying vec4 v_color;\n\nuniform float u_time;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\n\nuniform float u_line_texture;\nuniform sampler2D u_texture;\nuniform vec2 u_textSize;\n\nuniform float segmentNumber;\nvarying vec2 v_iconMapUV;\nvarying vec4 v_lineData;\n\n\n#pragma include "picking"\n\nvoid main() {\n float animateSpeed = 0.0; // 运动速度\n gl_FragColor = v_color;\n \n gl_FragColor.a *= u_opacity;\n\n if(u_animate.x == Animate && u_line_texture != LineTexture) {\n animateSpeed = u_time / u_animate.y;\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);\n alpha = (alpha + u_animate.w -1.0) / u_animate.w;\n // alpha = smoothstep(0., 1., alpha);\n alpha = clamp(alpha, 0.0, 1.0);\n gl_FragColor.a *= alpha;\n }\n\n // 当存在贴图时在底色上贴上贴图\n if(u_line_texture == LineTexture) { // while load texture\n float arcRadio = smoothstep( 0.0, 1.0, (v_lineData.r / segmentNumber));\n // float arcRadio = smoothstep( 0.0, 1.0, d_distance_ratio);\n\n float count = v_lineData.g; // 贴图在弧线上重复的数量\n\n float time = 0.0;\n if(u_animate.x == Animate) {\n time = u_time / u_animate.y;\n }\n float redioCount = arcRadio * count;\n\n float u = fract(redioCount - time);\n float v = v_lineData.a; // 横向 v\n vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\n\n vec4 pattern = texture2D(u_texture, uv);\n\n if(u_animate.x == Animate) {\n float currentPlane = floor(redioCount - time);\n float textureStep = floor(count * u_animate.z);\n float a = mod(currentPlane, textureStep);\n if(a < textureStep - 1.0) {\n pattern = vec4(0.0);\n }\n }\n\n if(u_textureBlend == 0.0) { // normal\n pattern.a = 0.0;\n gl_FragColor = filterColor(gl_FragColor + pattern);\n } else { // replace\n pattern.a *= u_opacity;\n if(gl_FragColor.a <= 0.0) {\n pattern.a = 0.0;\n }\n gl_FragColor = filterColor(pattern);\n }\n \n } else {\n gl_FragColor = filterColor(gl_FragColor);\n }\n}',vert:'#define Animate 0.0\n#define LineTexture 1.0\n\nattribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec4 a_Instance;\nattribute float a_Size;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform float segmentNumber;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\nvarying vec4 v_color;\n\nuniform float u_lineDir: 1.0;\n\nuniform float u_thetaOffset: 0.314;\nuniform float u_icon_step: 100;\nuniform float u_line_texture: 0.0;\nattribute vec2 a_iconMapUV;\nvarying vec2 v_iconMapUV;\nvarying vec4 v_lineData;\nvarying vec2 v_distance_ratio;\n\nuniform float u_opacity: 1.0;\n\n\n#pragma include "projection"\n#pragma include "project"\n#pragma include "picking"\n\nfloat bezier3(vec3 arr, float t) {\n float ut = 1. - t;\n return (arr.x * ut + arr.y * t) * ut + (arr.y * ut + arr.z * t) * t;\n}\nvec2 midPoint(vec2 source, vec2 target, float arcThetaOffset) {\n vec2 center = target - source;\n float r = length(center);\n float theta = atan(center.y, center.x);\n float thetaOffset = arcThetaOffset;\n float r2 = r / 2.0 / cos(thetaOffset);\n float theta2 = theta + thetaOffset;\n vec2 mid = vec2(r2*cos(theta2) + source.x, r2*sin(theta2) + source.y);\n if(u_lineDir == 1.0) { // 正向\n return mid;\n } else { // 逆向\n // (mid + vmin)/2 = (s + t)/2\n vec2 vmid = source + target - mid;\n return vmid;\n }\n // return mid;\n}\nfloat getSegmentRatio(float index) {\n // dash: index / (segmentNumber - 1.);\n // normal: smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\n return smoothstep(0.0, 1.0, index / (segmentNumber - 1.));\n // return index / (segmentNumber - 1.);\n}\nvec2 interpolate (vec2 source, vec2 target, float t, float arcThetaOffset) {\n // if the angularDist is PI, linear interpolation is applied. otherwise, use spherical interpolation\n vec2 mid = midPoint(source, target, arcThetaOffset);\n vec3 x = vec3(source.x, mid.x, target.x);\n vec3 y = vec3(source.y, mid.y, target.y);\n return vec2(bezier3(x ,t), bezier3(y,t));\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\n return offset;\n}\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\n}\n\nvoid main() {\n v_color = a_Color;\n\n vec2 source = a_Instance.rg; // 起始点\n vec2 target = a_Instance.ba; // 终点\n float segmentIndex = a_Position.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n float d_distance_ratio;\n \n if(u_animate.x == Animate) {\n d_distance_ratio = segmentIndex / segmentNumber;\n if(u_lineDir != 1.0) {\n d_distance_ratio = 1.0 - d_distance_ratio;\n }\n }\n\n v_lineData.b = d_distance_ratio;\n\n vec4 curr = project_position(vec4(interpolate(source, target, segmentRatio, u_thetaOffset), 0.0, 1.0));\n vec4 next = project_position(vec4(interpolate(source, target, nextSegmentRatio, u_thetaOffset), 0.0, 1.0));\n\n \n vec2 offset = project_pixel(getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y));\n\n\n float d_segmentIndex = a_Position.x + 1.0; // 当前顶点在弧线中所处的分段位置\n v_lineData.r = d_segmentIndex;\n\n if(LineTexture == u_line_texture) { // 开启贴图模式\n\n float arcDistrance = length(source - target); // 起始点和终点的距离\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20) { // amap\n arcDistrance *= 1000000.0;\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) { // mapbox\n // arcDistrance *= 8.0;\n arcDistrance = project_pixel_allmap(arcDistrance);\n }\n v_iconMapUV = a_iconMapUV;\n\n float pixelLen = project_pixel_texture(u_icon_step); // 贴图沿弧线方向的长度 - 随地图缩放改变\n float texCount = floor(arcDistrance/pixelLen); // 贴图在弧线上重复的数量\n v_lineData.g = texCount;\n\n float lineOffsetWidth = length(offset + offset * sign(a_Position.y)); // 线横向偏移的距离\n float linePixelSize = project_pixel(a_Size); // 定点位置偏移\n v_lineData.a = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值\n }\n \n\n // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n // gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\n gl_Position = u_Mvp * (vec4(curr.xy + offset, 0, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(curr.xy + offset, 0, 1.0));\n }\n setPickingColor(a_PickingColor);\n}\n',type:""}}},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i,o,a,s,u;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.layer.getLayerConfig(),n=e.segmentNumber,r=void 0===n?30:n,i=this.getShaders(),o=i.frag,a=i.vert,s=i.type,t.next=4,this.layer.buildLayerModel({moduleName:"lineArc2d"+s,vertexShader:a,fragmentShader:o,triangulation:Ht,depth:{enable:!1},segmentNumber:r});case 4:return u=t.sent,t.abrupt("return",[u]);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:i.AttributeType.Attribute,descriptor:{name:"a_Instance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:4,update:function(t,e,n){return[n[3],n[4],n[5],n[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(e){var n=t.iconService.getIconMap()[e.texture]||{x:0,y:0};return[n.x,n.y]}}})}}]),g}(H);var de={solid:0,dash:1},me=function(t){(0,l.Z)(y,t);var e,n,r,f,m=(r=y,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function y(){var t;(0,a.Z)(this,y);for(var e=arguments.length,n=new Array(e),r=0;r 0.0) {\n vec3 startLngLat = lglt2xyz(a_Instance.rg);\n vec3 endLngLat = lglt2xyz(a_Instance.ba);\n float globalRadius = length(startLngLat);\n\n vec3 lineDir = normalize(endLngLat - startLngLat);\n vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);\n\n // 线的偏移\n vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;\n // 计算起始点和终止点的距离\n float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;\n // 计算飞线各个节点相应的高度\n float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;\n // 地球点位\n vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;\n \n gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);\n }\n \n\n setPickingColor(a_PickingColor);\n}\n',type:"Linear"}:{frag:'#define LineTypeSolid 0.0\n#define LineTypeDash 1.0\n#define Animate 0.0\n#define LineTexture 1.0\n\nuniform float u_textureBlend;\nuniform float u_blur : 0.9;\nuniform float u_line_type: 0.0;\n// varying vec2 v_normal;\nvarying vec4 v_dash_array;\nvarying vec4 v_color;\nvarying vec4 v_line_data;\n\nuniform float u_line_texture: 0.0;\nuniform sampler2D u_texture;\nuniform vec2 u_textSize;\nvarying float v_segmentIndex;\nuniform float segmentNumber;\nuniform float u_opacity;\n\nvarying vec2 v_iconMapUV;\n\nuniform float u_time;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\n\n\n#pragma include "picking"\n\nvoid main() {\n float opacity = u_opacity;\n float animateSpeed = 0.0; // 运动速度\n float d_distance_ratio = v_line_data.g; // 当前点位距离占线总长的比例\n gl_FragColor = v_color;\n\n gl_FragColor.a *= opacity;\n if(u_line_type == LineTypeDash) {\n float flag = 0.;\n float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);\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)) {\n flag = 1.;\n }\n gl_FragColor.a *=flag;\n }\n\n if(u_animate.x == Animate && u_line_texture != LineTexture) {\n animateSpeed = u_time / u_animate.y;\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);\n\n alpha = (alpha + u_animate.w -1.0) / u_animate.w;\n // alpha = smoothstep(0., 1., alpha);\n alpha = clamp(alpha, 0.0, 1.0);\n gl_FragColor.a *= alpha;\n\n // u_animate \n // x enable\n // y duration\n // z interval\n // w trailLength\n }\n\n if(u_line_texture == LineTexture && u_line_type != LineTypeDash) { // while load texture\n // float arcRadio = smoothstep( 0.0, 1.0, (v_segmentIndex / segmentNumber));\n float arcRadio = v_segmentIndex / (segmentNumber - 1.0);\n float count = v_line_data.b; // // 贴图在弧线上重复的数量\n\n float time = 0.0;\n if(u_animate.x == Animate) {\n time = u_time / u_animate.y;\n }\n float redioCount = arcRadio * count;\n\n float u = fract(redioCount - time);\n\n float v = v_line_data.a; // 线图层贴图部分的 v 坐标值\n vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\n vec4 pattern = texture2D(u_texture, uv);\n\n if(u_animate.x == Animate) {\n float currentPlane = floor(redioCount - time);\n float textureStep = floor(count * u_animate.z);\n float a = mod(currentPlane, textureStep);\n if(a < textureStep - 1.0) {\n pattern = vec4(0.0);\n }\n }\n\n if(u_textureBlend == 0.0) { // normal\n pattern.a = 0.0;\n gl_FragColor = filterColor(gl_FragColor + pattern);\n } else { // replace\n pattern.a *= opacity;\n if(gl_FragColor.a <= 0.0) {\n pattern.a = 0.0;\n discard;\n } else {\n gl_FragColor = filterColor(pattern);\n }\n }\n\n } else {\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n',vert:'#define LineTypeSolid 0.0\n#define LineTypeDash 1.0\n#define Animate 0.0\n#define LineTexture 1.0\nattribute vec3 a_Position;\nattribute vec4 a_Instance;\nattribute vec4 a_Color;\nattribute float a_Size;\n\nuniform float u_globel;\nuniform float u_globel_radius;\nuniform float u_global_height: 10;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform float segmentNumber;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\nvarying vec4 v_color;\n\nuniform float u_line_type: 0.0;\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\nvarying vec4 v_dash_array;\n\nuniform float u_icon_step: 100;\nuniform float u_line_texture: 0.0;\nvarying float v_segmentIndex;\n\nattribute vec2 a_iconMapUV;\nvarying vec2 v_iconMapUV;\nvarying vec4 v_line_data;\n\n#pragma include "projection"\n#pragma include "project"\n#pragma include "picking"\n\nfloat maps (float value, float start1, float stop1, float start2, float stop2) {\n return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));\n}\n\nfloat getSegmentRatio(float index) {\n return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));\n}\n\nfloat paraboloid(vec2 source, vec2 target, float ratio) {\n vec2 x = mix(source, target, ratio);\n vec2 center = mix(source, target, 0.5);\n float dSourceCenter = distance(source, center);\n float dXCenter = distance(x, center);\n return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\n}\n\nvec3 getPos(vec2 source, vec2 target, float segmentRatio) {\n float vertex_height = paraboloid(source, target, segmentRatio);\n\n return vec3(\n mix(source, target, segmentRatio),\n sqrt(max(0.0, vertex_height))\n );\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\n\n return offset;\n}\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\n}\n\nfloat torad(float deg) {\n return (deg / 180.0) * acos(-1.0);\n}\n\nvec3 lglt2xyz(vec2 lnglat) {\n float pi = 3.1415926;\n // + Math.PI/2 是为了对齐坐标\n float lng = torad(lnglat.x) + pi / 2.0;\n float lat = torad(lnglat.y);\n\n // 手动增加一些偏移,减轻面的冲突\n float radius = u_globel_radius;\n\n float z = radius * cos(lat) * cos(lng);\n float x = radius * cos(lat) * sin(lng);\n float y = radius * sin(lat);\n return vec3(x, y, z);\n}\n\nvoid main() {\n\n v_color = a_Color;\n vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;\n vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;\n float segmentIndex = a_Position.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n\n float d_distance_ratio;\n if(u_line_type == LineTypeDash) {\n d_distance_ratio = segmentIndex / segmentNumber;\n vec2 s = source;\n vec2 t = target;\n \n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n s = unProjCustomCoord(source);\n t = unProjCustomCoord(target);\n }\n float total_Distance = pixelDistance(s, t) / 2.0 * PI;\n v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);\n }\n if(u_animate.x == Animate) {\n d_distance_ratio = segmentIndex / segmentNumber;\n }\n v_line_data.g = d_distance_ratio; // 当前点位距离占线总长的比例\n\n float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n vec3 curr = getPos(source, target, segmentRatio);\n vec3 next = getPos(source, target, nextSegmentRatio);\n vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);\n // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);\n\n\n v_segmentIndex = a_Position.x;\n if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // 开启贴图模式 \n\n float arcDistrance = length(source - target);\n float pixelLen = project_pixel_texture(u_icon_step);\n v_line_data.b = floor(arcDistrance/pixelLen); // 贴图在弧线上重复的数量\n\n vec2 projectOffset = project_pixel(offset);\n float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // 线横向偏移的距离\n float linePixelSize = project_pixel(a_Size); // 定点位置偏移,按地图等级缩放后的距离\n v_line_data.a = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值\n\n v_iconMapUV = a_iconMapUV;\n }\n \n\n // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\n }\n\n // 地球模式\n if(u_globel > 0.0) {\n vec3 startLngLat = lglt2xyz(a_Instance.rg);\n vec3 endLngLat = lglt2xyz(a_Instance.ba);\n float globalRadius = length(startLngLat);\n\n vec3 lineDir = normalize(endLngLat - startLngLat);\n vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);\n\n // 线的偏移\n vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;\n // 计算起始点和终止点的距离\n float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;\n // 计算飞线各个节点相应的高度\n float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;\n // 地球点位\n vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;\n \n gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);\n }\n \n\n setPickingColor(a_PickingColor);\n}\n',type:""}}},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i,o,a,s,u;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.layer.getLayerConfig(),n=e.segmentNumber,r=void 0===n?30:n,i=this.getShaders(),o=i.frag,a=i.vert,s=i.type,t.next=4,this.layer.buildLayerModel({moduleName:"lineArc3d"+s,vertexShader:a,fragmentShader:o,inject:this.getInject(),triangulation:Ht,segmentNumber:r});case 4:return u=t.sent,t.abrupt("return",[u]);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:i.AttributeType.Attribute,descriptor:{name:"a_Instance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:4,update:function(t,e,n){return[n[3],n[4],n[5],n[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(e){var n=t.iconService.getIconMap()[e.texture]||{x:0,y:0};return[n.x,n.y]}}})}}]),y}(H);var ge={solid:0,dash:1},ye=function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r 0.0) {\n vec3 startLngLat = lglt2xyz(a_Instance.rg);\n vec3 endLngLat = lglt2xyz(a_Instance.ba);\n float globalRadius = length(startLngLat);\n\n vec3 lineDir = normalize(endLngLat - startLngLat);\n vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);\n\n // 线的偏移\n vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;\n // 计算起始点和终止点的距离\n float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;\n // 计算飞线各个节点相应的高度\n float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;\n // 地球点位\n vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;\n \n gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);\n }\n \n\n setPickingColor(a_PickingColor);\n}\n',type:"Linear"}:{frag:'#define LineTypeSolid 0.0\n#define LineTypeDash 1.0\n#define Animate 0.0\n#define LineTexture 1.0\n\nuniform float u_textureBlend;\nuniform float u_blur : 0.9;\nuniform float u_line_type: 0.0;\n// varying vec2 v_normal;\nvarying vec4 v_dash_array;\nvarying vec4 v_color;\nvarying vec4 v_line_data;\n\nuniform float u_line_texture: 0.0;\nuniform sampler2D u_texture;\nuniform vec2 u_textSize;\nvarying float v_segmentIndex;\nuniform float segmentNumber;\nuniform float u_opacity;\n\nvarying vec2 v_iconMapUV;\n\nuniform float u_time;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\n\n\n#pragma include "picking"\n\nvoid main() {\n float opacity = u_opacity;\n float animateSpeed = 0.0; // 运动速度\n float d_distance_ratio = v_line_data.g; // 当前点位距离占线总长的比例\n gl_FragColor = v_color;\n\n gl_FragColor.a *= opacity;\n if(u_line_type == LineTypeDash) {\n float flag = 0.;\n float dashLength = mod(d_distance_ratio, v_dash_array.x + v_dash_array.y + v_dash_array.z + v_dash_array.w);\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)) {\n flag = 1.;\n }\n gl_FragColor.a *=flag;\n }\n\n if(u_animate.x == Animate && u_line_texture != LineTexture) {\n animateSpeed = u_time / u_animate.y;\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);\n\n alpha = (alpha + u_animate.w -1.0) / u_animate.w;\n // alpha = smoothstep(0., 1., alpha);\n alpha = clamp(alpha, 0.0, 1.0);\n gl_FragColor.a *= alpha;\n\n // u_animate \n // x enable\n // y duration\n // z interval\n // w trailLength\n }\n\n if(u_line_texture == LineTexture && u_line_type != LineTypeDash) { // while load texture\n // float arcRadio = smoothstep( 0.0, 1.0, (v_segmentIndex / segmentNumber));\n float arcRadio = v_segmentIndex / (segmentNumber - 1.0);\n float count = v_line_data.b; // // 贴图在弧线上重复的数量\n\n float time = 0.0;\n if(u_animate.x == Animate) {\n time = u_time / u_animate.y;\n }\n float redioCount = arcRadio * count;\n\n float u = fract(redioCount - time);\n\n float v = v_line_data.a; // 线图层贴图部分的 v 坐标值\n vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\n vec4 pattern = texture2D(u_texture, uv);\n\n if(u_animate.x == Animate) {\n float currentPlane = floor(redioCount - time);\n float textureStep = floor(count * u_animate.z);\n float a = mod(currentPlane, textureStep);\n if(a < textureStep - 1.0) {\n pattern = vec4(0.0);\n }\n }\n\n if(u_textureBlend == 0.0) { // normal\n pattern.a = 0.0;\n gl_FragColor = filterColor(gl_FragColor + pattern);\n } else { // replace\n pattern.a *= opacity;\n if(gl_FragColor.a <= 0.0) {\n pattern.a = 0.0;\n discard;\n } else {\n gl_FragColor = filterColor(pattern);\n }\n }\n\n } else {\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n',vert:'#define LineTypeSolid 0.0\n#define LineTypeDash 1.0\n#define Animate 0.0\n#define LineTexture 1.0\nattribute vec3 a_Position;\nattribute vec4 a_Instance;\nattribute vec4 a_Color;\nattribute float a_Size;\n\nuniform float u_globel;\nuniform float u_globel_radius;\nuniform float u_global_height: 10;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform float segmentNumber;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\nvarying vec4 v_color;\n\nuniform float u_line_type: 0.0;\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\nvarying vec4 v_dash_array;\n\nuniform float u_icon_step: 100;\nuniform float u_line_texture: 0.0;\nvarying float v_segmentIndex;\n\nattribute vec2 a_iconMapUV;\nvarying vec2 v_iconMapUV;\nvarying vec4 v_line_data;\n\n#pragma include "projection"\n#pragma include "project"\n#pragma include "picking"\n\nfloat maps (float value, float start1, float stop1, float start2, float stop2) {\n return start2 + (stop2 - start2) * ((value - start1) / (stop1 - start1));\n}\n\nfloat getSegmentRatio(float index) {\n return smoothstep(0.0, 1.0, index / (segmentNumber - 1.0));\n}\n\nfloat paraboloid(vec2 source, vec2 target, float ratio) {\n vec2 x = mix(source, target, ratio);\n vec2 center = mix(source, target, 0.5);\n float dSourceCenter = distance(source, center);\n float dXCenter = distance(x, center);\n return (dSourceCenter + dXCenter) * (dSourceCenter - dXCenter);\n}\n\nvec3 getPos(vec2 source, vec2 target, float segmentRatio) {\n float vertex_height = paraboloid(source, target, segmentRatio);\n\n return vec3(\n mix(source, target, segmentRatio),\n sqrt(max(0.0, vertex_height))\n );\n}\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n\n vec2 offset = dir_screenspace * offset_direction * setPickingSize(a_Size) / 2.0;\n\n return offset;\n}\nvec2 getNormal(vec2 line_clipspace, float offset_direction) {\n // normalized direction of the line\n vec2 dir_screenspace = normalize(line_clipspace);\n // rotate by 90 degrees\n dir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\n return reverse_offset_normal(vec3(dir_screenspace,1.0)).xy * sign(offset_direction);\n}\n\nfloat torad(float deg) {\n return (deg / 180.0) * acos(-1.0);\n}\n\nvec3 lglt2xyz(vec2 lnglat) {\n float pi = 3.1415926;\n // + Math.PI/2 是为了对齐坐标\n float lng = torad(lnglat.x) + pi / 2.0;\n float lat = torad(lnglat.y);\n\n // 手动增加一些偏移,减轻面的冲突\n float radius = u_globel_radius;\n\n float z = radius * cos(lat) * cos(lng);\n float x = radius * cos(lat) * sin(lng);\n float y = radius * sin(lat);\n return vec3(x, y, z);\n}\n\nvoid main() {\n\n v_color = a_Color;\n vec2 source = project_position(vec4(a_Instance.rg, 0, 0)).xy;\n vec2 target = project_position(vec4(a_Instance.ba, 0, 0)).xy;\n float segmentIndex = a_Position.x;\n float segmentRatio = getSegmentRatio(segmentIndex);\n float indexDir = mix(-1.0, 1.0, step(segmentIndex, 0.0));\n\n float d_distance_ratio;\n if(u_line_type == LineTypeDash) {\n d_distance_ratio = segmentIndex / segmentNumber;\n vec2 s = source;\n vec2 t = target;\n \n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n s = unProjCustomCoord(source);\n t = unProjCustomCoord(target);\n }\n float total_Distance = pixelDistance(s, t) / 2.0 * PI;\n v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / (total_Distance / segmentNumber * segmentIndex);\n }\n if(u_animate.x == Animate) {\n d_distance_ratio = segmentIndex / segmentNumber;\n }\n v_line_data.g = d_distance_ratio; // 当前点位距离占线总长的比例\n\n float nextSegmentRatio = getSegmentRatio(segmentIndex + indexDir);\n vec3 curr = getPos(source, target, segmentRatio);\n vec3 next = getPos(source, target, nextSegmentRatio);\n vec2 offset = getExtrusionOffset((next.xy - curr.xy) * indexDir, a_Position.y);\n // v_normal = getNormal((next.xy - curr.xy) * indexDir, a_Position.y);\n\n\n v_segmentIndex = a_Position.x;\n if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { // 开启贴图模式 \n\n float arcDistrance = length(source - target);\n float pixelLen = project_pixel_texture(u_icon_step);\n v_line_data.b = floor(arcDistrance/pixelLen); // 贴图在弧线上重复的数量\n\n vec2 projectOffset = project_pixel(offset);\n float lineOffsetWidth = length(projectOffset + projectOffset * sign(a_Position.y)); // 线横向偏移的距离\n float linePixelSize = project_pixel(a_Size); // 定点位置偏移,按地图等级缩放后的距离\n v_line_data.a = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值\n\n v_iconMapUV = a_iconMapUV;\n }\n \n\n // gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(curr.xy + project_pixel(offset), curr.z, 1.0));\n }\n\n // 地球模式\n if(u_globel > 0.0) {\n vec3 startLngLat = lglt2xyz(a_Instance.rg);\n vec3 endLngLat = lglt2xyz(a_Instance.ba);\n float globalRadius = length(startLngLat);\n\n vec3 lineDir = normalize(endLngLat - startLngLat);\n vec3 midPointDir = normalize((startLngLat + endLngLat)/2.0);\n\n // 线的偏移\n vec3 lnglatOffset = cross(lineDir, midPointDir) * a_Position.y;\n // 计算起始点和终止点的距离\n float lnglatLength = length(a_Instance.rg - a_Instance.ba)/50.0;\n // 计算飞线各个节点相应的高度\n float lineHeight = u_global_height * (-4.0*segmentRatio*segmentRatio + 4.0 * segmentRatio) * lnglatLength;\n // 地球点位\n vec3 globalPoint = normalize(mix(startLngLat, endLngLat, segmentRatio)) * (globalRadius + lineHeight) + lnglatOffset * a_Size;\n \n gl_Position = u_ViewProjectionMatrix * vec4(globalPoint, 1.0);\n }\n \n\n setPickingColor(a_PickingColor);\n}\n',type:""}}},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i,o,a,s,u;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.layer.getLayerConfig(),n=e.segmentNumber,r=void 0===n?30:n,i=this.getShaders(),o=i.frag,a=i.vert,s=i.type,t.next=4,this.layer.buildLayerModel({moduleName:"lineEarthArc3d"+s,vertexShader:a,fragmentShader:o,triangulation:Ht,depth:{enable:!0},segmentNumber:r});case 4:return u=t.sent,t.abrupt("return",[u]);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:i.AttributeType.Attribute,descriptor:{name:"a_Instance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:4,update:function(t,e,n){return[n[3],n[4],n[5],n[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(e){var n=t.iconService.getIconMap()[e.texture]||{x:0,y:0};return[n.x,n.y]}}})}}]),g}(H);var ve=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.gapWidth,n=void 0===e?2:e,r=t.strokeWidth,i=void 0===r?1:r,o=t.stroke,a=void 0===o?"#000":o,s=t.strokeOpacity,u=void 0===s?1:s;return(0,g.Z)({u_gap_width:n,u_stroke_width:i,u_stroke:(0,x.rgb2arr)(a),u_stroke_opacity:u},this.getStyleAttribute())}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.layer.buildLayerModel({moduleName:"flow_line",vertexShader:'attribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec4 a_Instance;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\n#pragma include "projection"\n#pragma include "picking"\nvarying vec4 v_color;\nuniform float u_gap_width: 1.0;\nuniform float u_stroke_width: 1.0;\nuniform float u_stroke_opacity: 1.0;\n\n\nvoid main() {\n\n// #ifdef USE_ATTRIBUTE_OPACITY\n// float opacity = a_Opacity;\n// #else\n// float opacity = u_opacity;\n// #endif\n\n\n// #ifdef USE_ATTRIBUTE_OFFSETS\n// vec2 offsets = a_Offsets;\n// #else\n// vec2 offsets = u_offsets;\n// #endif\n\n // float opacity = u_opacity;\n// 透明度计算\n vec2 source = a_Instance.rg; // 起始点\n vec2 target = a_Instance.ba; // 终点\n vec2 flowlineDir = normalize(target - source);\n vec2 perpendicularDir = vec2(-flowlineDir.y, flowlineDir.x);\n\n\n vec2 position = mix(source, target, a_Position.x);\n\n float lengthCommon = length(target - source); \n vec2 offsetDistances = a_Size.x * project_pixel(a_Position.yz);\n vec2 limitedOffsetDistances = clamp( \n offsetDistances,\n -lengthCommon*.8, lengthCommon*.8\n );\n\n float startOffsetCommon = project_pixel(offsets[0]);\n float endOffsetCommon = project_pixel(offsets[1]);\n float endpointOffset = mix(\n clamp(startOffsetCommon, 0.0, lengthCommon*.2),\n -clamp(endOffsetCommon, 0.0, lengthCommon*.2),\n a_Position.x\n );\n\n vec2 normalsCommon = u_stroke_width * project_pixel(a_Normal.xy);\n\n float gapCommon = project_pixel(u_gap_width);\n vec3 offsetCommon = vec3(\n flowlineDir * (limitedOffsetDistances[1] + normalsCommon.y + endpointOffset * 1.05) -\n perpendicularDir * (limitedOffsetDistances[0] + gapCommon + normalsCommon.x),\n 0.0\n );\n\n\n vec4 project_pos = project_position(vec4(position.xy, 0, 1.0));\n\n vec4 fillColor = vec4(a_Color.rgb, a_Color.a * opacity);\n v_color = mix(fillColor, vec4(u_stroke.xyz, u_stroke.w * fillColor.w * u_stroke_opacity), a_Normal.z);\n\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(project_pos.xy + offsetCommon.xy, 0., 1.0);\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offsetCommon.xy, 0., 1.0));\n }\n\n\n\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'#extension GL_OES_standard_derivatives : enable\n\nvarying vec4 v_color;\n\n\n// line texture\n\n#pragma include "picking"\n\nvoid main() {\ngl_FragColor = v_color;\ngl_FragColor = filterColor(gl_FragColor);\n}\n',inject:this.getInject(),triangulation:Dt,primitive:i.gl.TRIANGLES,depth:{enable:!1},pick:!1});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0],n[1]]:[n,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:i.AttributeType.Attribute,descriptor:{name:"a_Instance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:4,update:function(t,e,n){return[n[3],n[4],n[5],n[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}})}}]),f}(H);var _e={solid:0,dash:1},be=function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {\n // 实线部分\n } else {\n // 虚线部分\n discard;\n };\n }\n\n // 设置弧线的动画模式\n if(u_animate.x == Animate) {\n animateSpeed = u_time / u_animate.y;\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);\n alpha = (alpha + u_animate.w -1.0) / u_animate.w;\n alpha = smoothstep(0., 1., alpha);\n gl_FragColor.a *= alpha;\n }\n\n // 设置弧线的贴图\n if(LineTexture == u_line_texture && u_line_type != LineTypeDash) { \n float arcRadio = smoothstep( 0.0, 1.0, (d_segmentIndex / (segmentNumber - 1.0)));\n // float arcRadio = d_segmentIndex / (segmentNumber - 1.0);\n float count = v_line_data.b; // 贴图在弧线上重复的数量\n float u = fract(arcRadio * count - animateSpeed * count);\n // float u = fract(arcRadio * count - animateSpeed);\n if(u_animate.x == Animate) {\n u = gl_FragColor.a/opacity;\n }\n\n float v = v_line_data.a; // 线图层贴图部分的 v 坐标值\n\n vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\n vec4 pattern = texture2D(u_texture, uv);\n \n // 设置贴图和底色的叠加模式\n if(u_textureBlend == 0.0) { // normal\n pattern.a = 0.0;\n gl_FragColor = filterColor(gl_FragColor + pattern);\n } else { // replace\n pattern.a *= opacity;\n if(gl_FragColor.a <= 0.0) {\n pattern.a = 0.0;\n }\n gl_FragColor = filterColor(pattern);\n }\n } else {\n gl_FragColor = filterColor(gl_FragColor);\n }\n\n // gl_FragColor = filterColor(gl_FragColor);\n}',triangulation:Ht,depth:{enable:!1}});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"instance",type:i.AttributeType.Attribute,descriptor:{name:"a_Instance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:4,update:function(t,e,n){return[n[3],n[4],n[5],n[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(e){var n=t.iconService.getIconMap()[e.texture]||{x:0,y:0};return[n.x,n.y]}}})}}]),g}(H);var xe='\n#define Animate 0.0\n\nattribute float a_Miter;\nattribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\n\nattribute vec2 a_iconMapUV;\n\n// dash line\nattribute float a_Total_Distance;\nattribute vec2 a_DistanceAndIndex;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\nuniform float u_icon_step: 100;\n\nuniform float u_heightfixed: 0.0;\nuniform float u_vertexScale: 1.0;\nuniform float u_raisingHeight: 0.0;\n\n#pragma include "projection"\n#pragma include "picking"\n\nvarying vec4 v_color;\n\n// texV 线图层 - 贴图部分的 v 坐标(线的宽度方向)\nvarying vec2 v_iconMapUV;\n\n\nuniform float u_linearColor: 0;\nuniform float u_arrow: 0.0;\nuniform float u_arrowHeight: 3.0;\nuniform float u_arrowWidth: 2.0;\nuniform float u_tailWidth: 1.0;\n\nvarying vec4 v_texture_data;\n\nvec2 calculateArrow(vec2 offset) {\n /*\n * 在支持箭头的时候,第二、第三组顶点是额外插入用于构建顶点的\n */\n float arrowFlag = -1.0;\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // 高德 2.0 的旋转角度不同\n arrowFlag = 1.0;\n }\n float pi = arrowFlag * 3.1415926/2.;\n if(a_Miter < 0.) {\n // 根据线的两侧偏移不同、旋转的方向相反\n pi = -pi;\n }\n highp float angle_sin = sin(pi);\n highp float angle_cos = cos(pi);\n // 计算垂直与线方向的旋转矩阵\n mat2 rotation_matrix = mat2(angle_cos, -1.0 * angle_sin, angle_sin, angle_cos);\n float arrowWidth = u_arrowWidth;\n float arrowHeight = u_arrowHeight;\n\n vec2 arrowOffset = vec2(0.0);\n /*\n * a_DistanceAndIndex.y 用于标记当前顶点属于哪一组(两个顶点一组,构成线的其实是矩形,最简需要四个顶点、两组顶点构成)\n */\n if(a_DistanceAndIndex.y == 0.0) {\n // 箭头尖部\n offset = vec2(0.0);\n } else if(a_DistanceAndIndex.y == 1.0) {\n // 箭头两侧\n arrowOffset = rotation_matrix*(offset * arrowHeight);\n offset += arrowOffset; // 沿线偏移\n offset = offset * arrowWidth; // 垂直线向外偏移(是构建箭头两侧的顶点)\n } else if(a_DistanceAndIndex.y == 2.0 || a_DistanceAndIndex.y == 3.0 || a_DistanceAndIndex.y == 4.0) {\n // 偏移其余的点位(将长度让位给箭头)\n arrowOffset = rotation_matrix*(offset * arrowHeight) * arrowWidth;\n offset += arrowOffset;// 沿线偏移\n }\n\n return offset;\n}\n\nvoid main() {\n // cal style mapping - 数据纹理映射部分的计算\n \n float d_texPixelLen; // 贴图的像素长度,根据地图层级缩放\n\n v_iconMapUV = a_iconMapUV;\n d_texPixelLen = project_float_pixel(u_icon_step);\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n d_texPixelLen *= 10.0;\n }\n\n v_color = a_Color;\n\n vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);\n \n vec2 offset = project_pixel(size.xy);\n\n float lineDistance = a_DistanceAndIndex.x;\n float currentLinePointRatio = lineDistance / a_Total_Distance;\n \n if(u_arrow > 0.0) {\n // 计算箭头\n offset = calculateArrow(offset);\n\n if(a_DistanceAndIndex.y > 4.0) {\n offset *= mix(1.0, u_tailWidth, currentLinePointRatio);\n }\n }\n\n float lineOffsetWidth = length(offset + offset * sign(a_Miter)); // 线横向偏移的距离(向两侧偏移的和)\n float linePixelSize = project_pixel(a_Size.x) * 2.0; // 定点位置偏移,按地图等级缩放后的距离 单侧 * 2\n float texV = lineOffsetWidth/linePixelSize; // 线图层贴图部分的 v 坐标值\n \n v_texture_data = vec4(currentLinePointRatio, lineDistance, d_texPixelLen, texV);\n // 设置数据集的参数\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));\n\n float h = float(a_Position.z) * u_vertexScale; // 线顶点的高度 - 兼容不存在第三个数值的情况 vertex height\n float lineHeight = a_Size.y; // size 第二个参数代表的高度 [linewidth, lineheight]\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n lineHeight *= 0.2; // 保持和 amap/mapbox 一致的效果\n h *= 0.2;\n if(u_heightfixed < 1.0) {\n lineHeight = project_pixel(a_Size.y);\n }\n gl_Position = u_Mvp * (vec4(project_pos.xy + offset, lineHeight + h + u_raisingHeight, 1.0));\n } else {\n // mapbox - amap\n \n // 兼容 mapbox 在线高度上的效果表现基本一致\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // mapbox\n // 保持高度相对不变\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n h *= mapboxZoomScale;\n h += u_raisingHeight * mapboxZoomScale;\n if(u_heightfixed > 0.0) {\n lineHeight *= mapboxZoomScale;\n }\n \n } else {\n // amap\n h += u_raisingHeight;\n // lineHeight 顶点偏移高度\n if(u_heightfixed < 1.0) {\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n',we={solid:0,dash:1},Se=function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r (v_dash_array.x + v_dash_array.y) && dashLength < v_dash_array.x + v_dash_array.y + v_dash_array.z)) {\n // 实线部分\n } else {\n // 虚线部分\n discard;\n };\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n',vert:'#define LineTypeSolid 0.0\n#define LineTypeDash 1.0\n#define Animate 0.0\n\nattribute float a_Miter;\nattribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec3 a_Normal;\nattribute vec3 a_Position;\n\nattribute vec2 a_iconMapUV;\n\n// dash line\nattribute float a_Total_Distance;\nattribute vec2 a_DistanceAndIndex;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform vec4 u_dash_array: [10.0, 5., 0, 0];\n\nuniform float u_vertexScale: 1.0;\n\n#pragma include "projection"\n#pragma include "picking"\n\nvarying vec4 v_color;\nvarying vec4 v_dash_array;\nvarying float v_d_distance_ratio;\n\nuniform float u_opacity: 1.0;\n\nvoid main() {\n\n v_dash_array = pow(2.0, 20.0 - u_Zoom) * u_dash_array / a_Total_Distance;\n v_color = vec4(a_Color.xyz, a_Color.w * u_opacity);\n\n vec3 size = a_Miter * setPickingSize(a_Size.x) * reverse_offset_normal(a_Normal);\n vec2 offset = project_pixel(size.xy);\n v_d_distance_ratio = a_DistanceAndIndex.x / a_Total_Distance;\n\n\n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, a_Size.y, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy + offset, project_pixel(a_Size.y), 1.0));\n } else {\n float lineHeight = a_Size.y;\n \n // #define COORDINATE_SYSTEM_P20 5.0\n // #define COORDINATE_SYSTEM_P20_OFFSET 6.0\n // amap1.x\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // 保持高度相对不变\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n',type:"Dash"}:e&&n?{frag:'varying vec4 v_color;\nvarying vec4 v_texture_data;\nuniform float u_linearDir: 1.0;\nuniform float u_linearColor: 0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float u_opacity: 1.0;\n\n#pragma include "picking"\n\n\nvoid main() {\n float linearRadio = v_texture_data.r; // 当前点位距离占线总长的比例\n if(u_linearDir < 1.0) {\n linearRadio = v_texture_data.a;\n }\n\n if(u_linearColor == 1.0) { // 使用渐变颜色\n gl_FragColor = mix(u_sourceColor, u_targetColor, linearRadio);\n } else { // 使用 color 方法传入的颜色\n gl_FragColor = v_color;\n }\n\n gl_FragColor.a *= u_opacity; // 全局透明度\n gl_FragColor = filterColor(gl_FragColor);\n}\n',vert:xe,type:"Linear"}:{frag:'#extension GL_OES_standard_derivatives : enable\n#define Animate 0.0\n#define LineTexture 1.0\nuniform float u_opacity : 1.0;\nuniform float u_textureBlend;\n\nuniform float u_borderWidth: 0.0;\n\nuniform vec3 u_blur;\nuniform vec4 u_borderColor;\nvarying vec4 v_color;\n\n// line texture\nuniform float u_line_texture;\nuniform sampler2D u_texture;\nuniform vec2 u_textSize;\nvarying vec2 v_iconMapUV;\nvarying vec4 v_texture_data;\n\n\n#pragma include "picking"\n\nuniform float u_time;\nuniform vec4 u_animate: [ 1, 2., 1.0, 0.2 ]; // 控制运动\n// [animate, duration, interval, trailLength],\nvoid main() {\n float animateSpeed = 0.0; // 运动速度\n float d_distance_ratio = v_texture_data.r; // 当前点位距离占线总长的比例\n gl_FragColor = v_color;\n // anti-alias\n // float blur = 1.0 - smoothstep(u_blur, 1., length(v_normal.xy));\n gl_FragColor.a *= u_opacity; // 全局透明度\n if(u_animate.x == Animate) {\n animateSpeed = u_time / u_animate.y;\n float alpha =1.0 - fract( mod(1.0- d_distance_ratio, u_animate.z)* (1.0/ u_animate.z) + animateSpeed);\n alpha = (alpha + u_animate.w -1.0) / u_animate.w;\n alpha = smoothstep(0., 1., alpha);\n gl_FragColor.a *= alpha;\n }\n\n if(u_line_texture == LineTexture) { // while load texture\n float aDistance = v_texture_data.g; // 当前顶点的距离\n float d_texPixelLen = v_texture_data.b; // 贴图的像素长度,根据地图层级缩放\n float u = fract(mod(aDistance, d_texPixelLen)/d_texPixelLen - animateSpeed);\n float v = v_texture_data.a; // 线图层贴图部分的 v 坐标值\n\n // v = max(smoothstep(0.95, 1.0, v), v);\n vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\n vec4 pattern = texture2D(u_texture, uv);\n\n if(u_textureBlend == 0.0) { // normal\n pattern.a = 0.0;\n gl_FragColor += pattern;\n } else { // replace\n pattern.a *= u_opacity;\n if(gl_FragColor.a <= 0.0) {\n pattern.a = 0.0;\n }\n gl_FragColor = pattern;\n }\n } \n\n float v = v_texture_data.a;\n float borderWidth = min(0.5, u_borderWidth);\n // 绘制 border\n if(borderWidth > 0.01) {\n float borderOuterWidth = borderWidth / 2.0;\n\n\n if(v >= 1.0 - borderWidth || v <= borderWidth) {\n if(v > borderWidth) { // 外侧\n float linear = smoothstep(0.0, 1.0, (v - (1.0 - borderWidth))/borderWidth);\n // float linear = step(0.0, (v - (1.0 - borderWidth))/borderWidth);\n gl_FragColor.rgb = mix(gl_FragColor.rgb, u_borderColor.rgb, linear);\n } else if(v <= borderWidth) {\n float linear = smoothstep(0.0, 1.0, v/borderWidth);\n gl_FragColor.rgb = mix(u_borderColor.rgb, gl_FragColor.rgb, linear);\n }\n }\n\n if(v < borderOuterWidth) {\n gl_FragColor.a = mix(0.0, gl_FragColor.a, v/borderOuterWidth);\n } else if(v > 1.0 - borderOuterWidth) {\n gl_FragColor.a = mix(gl_FragColor.a, 0.0, (v - (1.0 - borderOuterWidth))/borderOuterWidth);\n }\n }\n\n // blur\n float blurV = v_texture_data.a;\n if(blurV < 0.5) {\n gl_FragColor.a *= mix(u_blur.r, u_blur.g, blurV/0.5);\n } else {\n gl_FragColor.a *= mix(u_blur.g, u_blur.b, (blurV - 0.5)/0.5);\n }\n \n gl_FragColor = filterColor(gl_FragColor);\n}\n',vert:xe,type:""}}},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"distanceAndIndex",type:i.AttributeType.Attribute,descriptor:{name:"a_DistanceAndIndex",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n,r,i,o){return void 0===o?[n[3],10]:[n[3],o]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:i.AttributeType.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0],n[1]]:[n,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:i.AttributeType.Attribute,descriptor:{name:"a_Miter",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(e){var n=t.iconService.getIconMap()[e.texture]||{x:0,y:0};return[n.x,n.y]}}})}}]),g}(H);var Ee=function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r 0.0) {\n lineHeight *= mapboxZoomScale;\n }\n \n } else {\n // amap\n h += u_raisingHeight;\n // lineHeight 顶点偏移高度\n if(u_heightfixed < 1.0) {\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, lineHeight + h, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'\nvarying vec4 v_Color;\n#pragma include "picking"\nvoid main() {\n\n gl_FragColor = v_Color; // 全局透明度\n gl_FragColor = filterColor(gl_FragColor);\n}\n',triangulation:Rt,depth:{enable:r}});case 4:return i=t.sent,t.abrupt("return",[i]);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"distanceAndIndex",type:i.AttributeType.Attribute,descriptor:{name:"a_DistanceAndIndex",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n,r,i,o){return void 0===o?[n[3],10]:[n[3],o]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:i.AttributeType.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0],n[1]]:[n,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:i.AttributeType.Attribute,descriptor:{name:"a_Miter",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[4]]}}})}}]),g}(H);var Me='attribute vec4 a_Color;\nattribute vec2 a_Size;\nattribute vec3 a_Position;\n\nattribute float a_Total_Distance;\nattribute float a_Distance;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nuniform float u_opacity: 1.0;\nuniform float u_vertexScale: 1.0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\n\n\n\n#pragma include "projection"\n\nvarying vec4 v_color;\nvarying float v_distanceScale;\n\nvoid main() {\n\n v_color = a_Color; \n v_distanceScale = a_Distance / a_Total_Distance;\n v_color = vec4(a_Color.xyz, a_Color.w * u_opacity); \n vec4 project_pos = project_position(vec4(a_Position.xy, 0, 1.0));\n\n float h = float(a_Position.z) * u_vertexScale; // 线顶点的高度 - 兼容不存在第三个数值的情况\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xy, project_pixel(a_Size.y) + h * 0.2, 1.0));\n } else {\n float lineHeight = a_Size.y;\n // 兼容 mapbox 在线高度上的效果表现基本一致\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n // 保持高度相对不变\n h *= 2.0/pow(2.0, 20.0 - u_Zoom);\n }\n\n // #define COORDINATE_SYSTEM_P20 5.0\n // #define COORDINATE_SYSTEM_P20_OFFSET 6.0\n // amap1.x\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // 保持高度相对不变\n lineHeight *= pow(2.0, 20.0 - u_Zoom);\n }\n\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy, lineHeight + h, 1.0));\n gl_PointSize = 10.0;\n }\n}\n',Te=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.opacity,n=void 0===e?1:e,r=t.sourceColor,i=t.targetColor,o=t.vertexHeightScale,a=void 0===o?20:o,s=0,u=[0,0,0,0],l=[0,0,0,0];return r&&i&&(u=(0,x.rgb2arr)(r),l=(0,x.rgb2arr)(i),s=1),{u_opacity:(0,S.isNumber)(n)?n:1,u_linearColor:s,u_sourceColor:u,u_targetColor:l,u_vertexScale:a}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getShaders",value:function(){var t=this.layer.getLayerConfig(),e=t.sourceColor,n=t.targetColor;return e&&n?{frag:"uniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float opacity;\nvoid main() {\n gl_FragColor = mix(u_sourceColor, u_targetColor, v_distanceScale);\n gl_FragColor.a *= opacity; // 全局透明度\n}\n",vert:Me,type:"lineSimpleLinear"}:{frag:"\nvarying vec4 v_color;\nvoid main() {\n gl_FragColor = v_color;\n\n}\n",vert:Me,type:"lineSimpleNormal"}}},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,o,a;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getShaders(),n=e.frag,r=e.vert,o=e.type,t.next=3,this.layer.buildLayerModel({moduleName:o,vertexShader:r,fragmentShader:n,triangulation:Nt,primitive:i.gl.LINES,depth:{enable:!1},pick:!1});case 3:return a=t.sent,t.abrupt("return",[a]);case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"distance",type:i.AttributeType.Attribute,descriptor:{name:"a_Distance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[3]]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:i.AttributeType.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0],n[1]]:[n,0]}}})}}]),f}(H);const Ae={arc:fe,arc3d:me,greatcircle:be,wall:function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r 1.0/u_iconStepCount) {\n flag = 1.0;\n }\n u = fract(u*u_iconStepCount);\n // 计算纹理间隔 end\n\n vec2 uv= v_iconMapUV / u_textSize + vec2(u, v) / u_textSize * 64.;\n vec4 pattern = texture2D(u_texture, uv);\n\n // Tip: 判断纹理间隔\n if(flag > 0.0) {\n pattern = vec4(0.0);\n }\n\n if(u_textureBlend == 0.0) { // normal\n pattern.a = 0.0;\n gl_FragColor = filterColor(gl_FragColor + pattern);\n } else { // replace\n pattern.a *= opacity;\n if(gl_FragColor.a <= 0.0) {\n pattern.a = 0.0;\n }\n gl_FragColor = filterColor(pattern);\n }\n }\n \n\n // blur - AA\n if(v < v_blur) {\n gl_FragColor.a = mix(0.0, gl_FragColor.a, v/v_blur);\n } else if(v > 1.0 - v_blur) {\n gl_FragColor.a = mix(gl_FragColor.a, 0.0, (v - (1.0 - v_blur))/v_blur);\n }\n\n gl_FragColor = filterColor(gl_FragColor);\n}\n',triangulation:Rt,depth:{enable:!1},blend:this.getBlend()});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"distance",type:i.AttributeType.Attribute,descriptor:{name:"a_Distance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[3]]}}}),this.styleAttributeService.registerStyleAttribute({name:"total_distance",type:i.AttributeType.Attribute,descriptor:{name:"a_Total_Distance",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[5]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0],n[1]]:[n,0]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"miter",type:i.AttributeType.Attribute,descriptor:{name:"a_Miter",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t,e,n){return[n[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_iconMapUV",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(e){var n=t.iconService.getIconMap()[e.texture]||{x:0,y:0};return[n.x,n.y]}}})}}]),g}(H),line:Se,simple:Te,linearline:Ee,earthArc3d:ye,flowline:ve};var Ce=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r0&&n.enable){var v=n.speed,_=void 0===v?.01:v;this.raiseCount+=_,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}return{u_pickLight:Number(u),u_heightfixed:Number(c),u_r:n.enable&&this.raiseRepeat>0?this.raiseCount:1,u_opacity:(0,S.isNumber)(i)?i:1,u_linearColor:m,u_sourceColor:g,u_targetColor:y,u_opacitylinear:Number(p.enable),u_opacitylinear_dir:"up"===p.dir?1:0,u_lightEnable:Number(d)}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.layer.getLayerConfig(),n=e.animateOption.repeat,r=void 0===n?1:n,this.raiseRepeat=r,t.next=4,this.layer.buildLayerModel({moduleName:"pointEarthExtrude",vertexShader:'precision highp float;\n\n#define pi 3.1415926535\n#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\nattribute vec3 a_Position;\nattribute vec3 a_Pos;\nattribute vec4 a_Color;\nattribute vec3 a_Size;\nattribute vec3 a_Normal;\n\nuniform float u_heightfixed: 0.0; // 默认不固定\nuniform float u_globel;\nuniform float u_r;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nvarying vec4 v_color;\n\nuniform float u_opacity : 1;\nuniform float u_lightEnable: 1;\nvarying float v_lightWeight;\nvarying float v_barLinearZ;\n// 用于将在顶点着色器中计算好的样式值传递给片元\n\n\n#pragma include "projection"\n#pragma include "light"\n#pragma include "picking"\n\nfloat getYRadian(float x, float z) {\n if(x > 0.0 && z > 0.0) {\n return atan(x/z);\n } else if(x > 0.0 && z <= 0.0){\n return atan(-z/x) + pi/2.0;\n } else if(x <= 0.0 && z <= 0.0) {\n return pi + atan(x/z); //atan(x/z) + \n } else {\n return atan(z/-x) + pi*3.0/2.0;\n }\n}\n\nfloat getXRadian(float y, float r) {\n return atan(y/r);\n}\n\nvoid main() {\n\n \n float textureOffset = 0.0; // 在 cell 中取值的偏移量\n\n textureOffset = opacityAndOffset.g;\n // cal style mapping - 数据纹理映射部分的计算\n vec3 size = a_Size * a_Position;\n\n // a_Position.z 是在构建网格的时候传入的标准值 0 - 1,在插值器插值可以获取 0~1 线性渐变的值\n v_barLinearZ = a_Position.z;\n\n vec3 offset = size; // 控制圆柱体的大小 - 从标准单位圆柱体进行偏移\n if(u_heightfixed < 1.0) { // 圆柱体不固定高度\n \n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n offset = offset * pow(2.0, (19.0 - u_Zoom));\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\n offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom));\n }\n } else {// 圆柱体固定高度 ( 处理 mapbox )\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n offset *= 4.0/pow(2.0, 21.0 - u_Zoom);\n }\n }\n\n\n vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));\n\n // u_r 控制圆柱的生长\n vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);\n\n // 圆柱光照效果\n float lightWeight = 1.0;\n if(u_lightEnable > 0.0) { // 取消三元表达式,增强健壮性\n lightWeight = calc_lighting(pos);\n }\n v_lightWeight = lightWeight;\n // 设置圆柱的底色\n if(u_linearColor == 1.0) { // 使用渐变颜色\n v_color = mix(u_sourceColor, u_targetColor, barLinearZ);\n v_color.rgb *= lightWeight;\n } else { // 使用 color 方法传入的颜色\n v_color = a_Color;\n }\n v_color.a *= u_opacity;\n\n \n // 在地球模式下,将原本垂直于 xy 平面的圆柱调整姿态到适应圆的角度\n //旋转矩阵mx,创建绕x轴旋转矩阵\n float r = sqrt(a_Pos.z*a_Pos.z + a_Pos.x*a_Pos.x);\n float xRadian = getXRadian(a_Pos.y, r);\n float xcos = cos(xRadian);//求解旋转角度余弦值\n float xsin = sin(xRadian);//求解旋转角度正弦值\n mat4 mx = mat4(\n 1,0,0,0, \n 0,xcos,-xsin,0, \n 0,xsin,xcos,0, \n 0,0,0,1);\n\n //旋转矩阵my,创建绕y轴旋转矩阵\n float yRadian = getYRadian(a_Pos.x, a_Pos.z);\n float ycos = cos(yRadian);//求解旋转角度余弦值\n float ysin = sin(yRadian);//求解旋转角度正弦值\n mat4 my = mat4(\n ycos,0,-ysin,0, \n 0,1,0,0, \n ysin,0,ycos,0, \n 0,0,0,1);\n\n gl_Position = u_ViewProjectionMatrix * vec4(( my * mx * vec4(a_Position * a_Size, 1.0)).xyz + a_Pos, 1.0);\n \n\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'varying vec4 v_color;\nuniform float u_opacity: 1.0;\n\nuniform float u_pickLight: 0.0;\n\n#pragma include "picking"\n\n\nuniform float u_linearColor: 0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\n\nuniform float u_opacitylinear: 0.0;\nuniform float u_opacitylinear_dir: 1.0;\nvarying float v_lightWeight;\nvarying float v_barLinearZ;\nvoid main() {\n\n gl_FragColor = v_color;\n\n // 开启透明度渐变\n if(u_opacitylinear > 0.0) {\n gl_FragColor.a *= u_opacitylinear_dir > 0.0 ? (1.0 - v_barLinearZ): v_barLinearZ;\n }\n\n // picking\n if(u_pickLight > 0.0) {\n gl_FragColor = filterColorAlpha(gl_FragColor, v_lightWeight);\n } else {\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n',triangulation:Lt,depth:{enable:!0},cull:{enable:!0,face:(0,x.getCullFace)(this.mapService.version)},blend:this.getBlend()});case 4:return i=t.sent,t.abrupt("return",[i]);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t){var e=t.size;if(e){var n=[];return Array.isArray(e)&&(n=2===e.length?[e[0],e[0],e[1]]:e),Array.isArray(e)||(n=[e,e,e]),n}return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:i.AttributeType.Attribute,descriptor:{name:"a_Pos",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t){var e=(0,x.calculateCentroid)(t.coordinates);return at([e[0],e[1]])}}})}}]),g}(H);var Pe=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.opacity,n=void 0===e?1:e,r=t.strokeOpacity,i=void 0===r?1:r,o=t.strokeWidth,a=void 0===o?0:o,s=t.stroke,u=void 0===s?"rgba(0,0,0,0)":s,l=t.blend,c=t.blur;return{u_blur:void 0===c?0:c,u_additive:"additive"===l?1:0,u_opacity:n,u_stroke_opacity:i,u_stroke_width:a,u_stroke_color:(0,x.rgb2arr)(u)}}},{key:"getAnimateUniforms",value:function(){var t=this.layer.getLayerConfig().animateOption,e=void 0===t?{enable:!1}:t;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.layer.triangulation=kt,t.next=3,this.layer.buildLayerModel({moduleName:"pointEarthFill",vertexShader:'attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nattribute float a_Shape;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\n\nuniform float u_opacity : 1;\nuniform float u_stroke_opacity : 1;\nuniform float u_stroke_width : 2;\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\nuniform vec2 u_offsets;\n\nuniform float u_blur : 0.0;\n\n#pragma include "projection"\n#pragma include "picking"\n\n\nvoid main() {\n vec3 extrude = a_Extrude;\n float shape_type = a_Shape;\n /*\n * setPickingSize 设置拾取大小\n */\n float newSize = setPickingSize(a_Size);\n // float newSize = setPickingSize(a_Size) * 0.00001038445708445579;\n\n // unpack color(vec2)\n v_color = a_Color;\n\n // radius(16-bit)\n v_radius = newSize;\n\n // anti-alias\n // float antialiased_blur = -max(u_blur, antialiasblur);\n float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur);\n\n // TODP: /abs(extrude.x) 是为了兼容地球模式\n v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);\n\n\n gl_Position = u_ViewProjectionMatrix * vec4(a_Position + extrude * newSize * 0.1 + u_offsets, 1.0);\n\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:"uniform float u_additive;\nuniform float u_opacity : 1;\nuniform float u_stroke_opacity : 1;\nuniform float u_stroke_width : 2;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\n\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\n\n\nvoid main() {\n int shape = int(floor(v_data.w + 0.5));\n\n vec4 strokeColor = textrueStroke == vec4(0) ? v_color : textrueStroke;\n\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius + strokeWidth);\n\n float outer_df;\n float inner_df;\n // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\n if (shape == 0) {\n outer_df = sdCircle(v_data.xy, 1.0);\n inner_df = sdCircle(v_data.xy, r);\n } else if (shape == 1) {\n outer_df = sdEquilateralTriangle(1.1 * v_data.xy);\n inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);\n } else if (shape == 2) {\n outer_df = sdBox(v_data.xy, vec2(1.));\n inner_df = sdBox(v_data.xy, vec2(r));\n } else if (shape == 3) {\n outer_df = sdPentagon(v_data.xy, 0.8);\n inner_df = sdPentagon(v_data.xy, r * 0.8);\n } else if (shape == 4) {\n outer_df = sdHexagon(v_data.xy, 0.8);\n inner_df = sdHexagon(v_data.xy, r * 0.8);\n } else if (shape == 5) {\n outer_df = sdOctogon(v_data.xy, 1.0);\n inner_df = sdOctogon(v_data.xy, r);\n } else if (shape == 6) {\n outer_df = sdHexagram(v_data.xy, 0.52);\n inner_df = sdHexagram(v_data.xy, r * 0.52);\n } else if (shape == 7) {\n outer_df = sdRhombus(v_data.xy, vec2(1.0));\n inner_df = sdRhombus(v_data.xy, vec2(r));\n } else if (shape == 8) {\n outer_df = sdVesica(v_data.xy, 1.1, 0.8);\n inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);\n }\n\n if(outer_df > antialiasblur + 0.018) discard;\n\n float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\n\n float color_t = strokeWidth < 0.01 ? 0.0 : smoothstep(\n antialiasblur,\n 0.0,\n inner_df\n );\n\n if(strokeWidth < 0.01) {\n gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);\n } else {\n gl_FragColor = mix(vec4(v_color.rgb, v_color.a * u_opacity), u_stroke_color * u_stroke_opacity, color_t);\n }\n\n if(u_additive > 0.0) {\n gl_FragColor *= opacity_t;\n gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\n } else {\n gl_FragColor.a *= opacity_t;\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n",triangulation:kt,depth:{enable:!0},blend:this.getBlend()});case 3:return e=t.sent,t.abrupt("return",[e]);case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"animateOption2Array",value:function(t){return[t.enable?0:1,t.speed||1,t.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:i.AttributeType.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r){var i=(0,A.Z)(n,3),o=i[0],a=i[1],s=i[2],u=rt.fromValues(0,0,1),l=rt.fromValues(o,0,s),c=o>=0?rt.angle(u,l):2*Math.PI-rt.angle(u,l),h=2*Math.PI-Math.asin(a/100),p=nt.create();nt.rotateY(p,p,c),nt.rotateX(p,p,h);var f=rt.fromValues(1,1,0);rt.transformMat4(f,f,p),rt.normalize(f,f);var d=rt.fromValues(-1,1,0);rt.transformMat4(d,d,p),rt.normalize(d,d);var m=rt.fromValues(-1,-1,0);rt.transformMat4(m,m,p),rt.normalize(m,m);var g=rt.fromValues(1,-1,0);rt.transformMat4(g,g,p),rt.normalize(g,g);var y=[].concat((0,Q.Z)(f),(0,Q.Z)(d),(0,Q.Z)(m),(0,Q.Z)(g)),v=r%4*3;return[y[v],y[v+1],y[v+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?5:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:i.AttributeType.Attribute,descriptor:{name:"a_Shape",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(e){var n=e.shape,r=void 0===n?2:n;return[t.layer.getLayerConfig().shape2d.indexOf(r)]}}})}}]),f}(H);var ke=function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r0&&n.enable){var v=n.speed,_=void 0===v?.01:v;this.raiseCount+=_,this.raiseCount>=1&&(this.raiseRepeat>1?(this.raiseCount=0,this.raiseRepeat--):this.raiseCount=1)}return{u_pickLight:Number(u),u_heightfixed:Number(c),u_r:n.enable&&this.raiseRepeat>0?this.raiseCount:1,u_opacity:i,u_linearColor:m,u_sourceColor:g,u_targetColor:y,u_opacitylinear:Number(p.enable),u_opacitylinear_dir:"up"===p.dir?1:0,u_lightEnable:Number(d)}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i,o,a;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.layer.getLayerConfig(),n=e.depth,r=void 0===n||n,i=e.animateOption.repeat,o=void 0===i?1:i,this.raiseRepeat=o,t.next=4,this.layer.buildLayerModel({moduleName:"pointExtrude",vertexShader:'precision highp float;\n\n#define pi 3.1415926535\n#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\nattribute vec3 a_Position;\nattribute vec3 a_Pos;\nattribute vec4 a_Color;\nattribute vec3 a_Size;\nattribute vec3 a_Normal;\n\nuniform float u_heightfixed: 0.0; // 默认不固定\nuniform float u_r;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nvarying vec4 v_color;\nvarying float v_lightWeight;\nvarying float v_barLinearZ;\n\nuniform float u_opacity : 1;\nuniform float u_lightEnable: 1;\nuniform float u_opacitylinear: 0.0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float u_opacitylinear_dir: 1.0;\nuniform float u_linearColor: 0.0;\n\n\n#pragma include "projection"\n#pragma include "light"\n#pragma include "picking"\n\nfloat getYRadian(float x, float z) {\n if(x > 0.0 && z > 0.0) {\n return atan(x/z);\n } else if(x > 0.0 && z <= 0.0){\n return atan(-z/x) + pi/2.0;\n } else if(x <= 0.0 && z <= 0.0) {\n return pi + atan(x/z); //atan(x/z) + \n } else {\n return atan(z/-x) + pi*3.0/2.0;\n }\n}\n\nfloat getXRadian(float y, float r) {\n return atan(y/r);\n}\n\nvoid main() {\n\n\n vec3 size = a_Size * a_Position;\n\n vec3 offset = size; // 控制圆柱体的大小 - 从标准单位圆柱体进行偏移\n\n if(u_heightfixed < 1.0) { // 圆柱体不固定高度\n \n if (u_CoordinateSystem == COORDINATE_SYSTEM_P20 || u_CoordinateSystem == COORDINATE_SYSTEM_P20_OFFSET) {\n // P20 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减1\n offset = offset * pow(2.0, (19.0 - u_Zoom));\n }\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) {\n // P20_2 坐标系下,为了和 Web 墨卡托坐标系统一,zoom 默认减3\n offset = offset * pow(2.0, (19.0 - 3.0 - u_Zoom));\n }\n } else {// 圆柱体固定高度 ( 处理 mapbox )\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n offset *= 4.0/pow(2.0, 21.0 - u_Zoom);\n }\n }\n\n\n vec4 project_pos = project_position(vec4(a_Pos.xy, 0., 1.0));\n\n // u_r 控制圆柱的生长\n vec4 pos = vec4(project_pos.xy + offset.xy, offset.z * u_r, 1.0);\n\n // // 圆柱光照效果\n float lightWeight = 1.0;\n\n if(u_lightEnable > 0.0) { // 取消三元表达式,增强健壮性\n lightWeight = calc_lighting(pos);\n }\n\n v_lightWeight = lightWeight;\n\n v_color = a_Color;\n\n // 设置圆柱的底色\n if(u_linearColor == 1.0) { // 使用渐变颜色\n v_color = mix(u_sourceColor, u_targetColor, a_Position.z);\n v_color.a = v_color.a * u_opacity;\n } else {\n v_color = vec4(a_Color.rgb * lightWeight, a_Color.w * u_opacity);\n }\n\n if(u_opacitylinear > 0.0) {\n v_color.a *= u_opacitylinear_dir > 0.0 ? (1.0 - a_Position.z): a_Position.z;\n }\n\n\n // gl_Position = project_common_position_to_clipspace(pos);\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * pos;\n } else {\n gl_Position = project_common_position_to_clipspace(pos);\n }\n\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'varying vec4 v_color;\nvarying float v_lightWeight;\nuniform float u_pickLight: 0.0;\n\n#pragma include "picking"\n\n\nvoid main() {\n\n gl_FragColor = v_color;\n // 开启透明度渐变\n // picking\n if(u_pickLight > 0.0) {\n gl_FragColor = filterColorAlpha(gl_FragColor, v_lightWeight);\n } else {\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n',triangulation:Lt,cull:{enable:!0,face:(0,x.getCullFace)(this.mapService.version)},depth:{enable:r}});case 4:return a=t.sent,t.abrupt("return",[a]);case 6:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t){var e=t.size;if(e){var n=[];return Array.isArray(e)&&(n=2===e.length?[e[0],e[0],e[1]]:e),Array.isArray(e)||(n=[e,e,e]),n}return[2,2,2]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"pos",type:i.AttributeType.Attribute,descriptor:{name:"a_Pos",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t){var e=(0,x.calculateCentroid)(t.coordinates);return[e[0],e[1],0]}}})}}]),g}(H);var Le='attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nattribute float a_Shape;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform int u_size_unit;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\nvarying vec4 v_stroke;\n\n// uniform float u_opacity : 1;\nuniform float u_stroke_width: 2;\nuniform vec3 u_blur_height_fixed: [0, 0, 0];\n\n\n#pragma include "projection"\n#pragma include "picking"\n\n\nvoid main() {\n // 透明度计算\n v_stroke = stroke; \n vec3 extrude = a_Extrude;\n float shape_type = a_Shape;\n /*\n * setPickingSize 设置拾取大小\n * u_meter2coord 在等面积大小的时候设置单位\n */\n float newSize = setPickingSize(a_Size);\n // float newSize = setPickingSize(a_Size) * 0.00001038445708445579;\n\n\n\n // unpack color(vec2)\n v_color = vec4(a_Color.xyz, a_Color.w * opacity);\n\n if(u_size_unit == 1) {\n newSize = newSize * u_PixelsPerMeter.z;\n }\n\n v_radius = newSize;\n\n // anti-alias\n // float antialiased_blur = -max(u_blur, antialiasblur);\n float antialiasblur = -max(2.0 / u_DevicePixelRatio / newSize, u_blur_height_fixed.x);\n\n vec2 offset = (extrude.xy * (newSize + u_stroke_width) + u_offsets);\n vec3 aPosition = a_Position;\n\n offset = project_pixel(offset);\n \n // TODP: /abs(extrude.x) 是为了兼容地球模式\n v_data = vec4(extrude.x/abs(extrude.x), extrude.y/abs(extrude.y), antialiasblur,shape_type);\n\n\n // vec4 project_pos = project_position(vec4(a_Position.xy, 0.0, 1.0));\n vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));\n\n float raisingHeight = u_blur_height_fixed.y;\n\n if(u_blur_height_fixed.z < 1.0) { // false\n raisingHeight = project_pixel(u_blur_height_fixed.y);\n } else {\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n raisingHeight = u_blur_height_fixed.y * mapboxZoomScale;\n }\n }\n \n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(project_pos.xy + offset, raisingHeight, 1.0);\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, raisingHeight, 1.0));\n }\n \n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, 0.0, 1.0));\n\n setPickingColor(a_PickingColor);\n}\n',Ie=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.strokeOpacity,n=void 0===e?1:e,r=t.strokeWidth,i=void 0===r?0:r,o=t.blend,a=t.blur,s=void 0===a?0:a,u=t.raisingHeight,l=void 0===u?0:u,c=t.heightfixed,h=void 0!==c&&c,p=t.unit,f=void 0===p?"pixel":p;return(0,g.Z)({u_blur_height_fixed:[s,Number(l),Number(h)],u_additive:"additive"===o?1:0,u_stroke_opacity:n,u_stroke_width:i,u_size_unit:X[f]},this.getStyleAttribute())}},{key:"getAnimateUniforms",value:function(){var t=this.layer.getLayerConfig().animateOption,e=void 0===t?{enable:!1}:t;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),x.PointFillTriangulation)}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i,o,a,s,u;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.layer.getLayerConfig(),n=e.animateOption,r=void 0===n?{enable:!1}:n,i=this.getShaders(r),o=i.frag,a=i.vert,s=i.type,this.layer.triangulation=x.PointFillTriangulation,t.next=5,this.layer.buildLayerModel({moduleName:s,vertexShader:a,fragmentShader:o,inject:this.getInject(),triangulation:x.PointFillTriangulation,depth:{enable:!1}});case 5:return u=t.sent,t.abrupt("return",[u]);case 7:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getShaders",value:function(t){return t.enable?(t.type,{frag:"\nuniform float u_additive;\n\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\nuniform float u_time;\nuniform vec4 u_animate: [ 1., 2., 1.0, 0.2 ];\n\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\n\nvoid main() {\n\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius);\n\n float outer_df;\n float inner_df;\n // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\n \n outer_df = sdCircle(v_data.xy, 1.0);\n inner_df = sdCircle(v_data.xy, r);\n\n\n float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\n\n float color_t = smoothstep(\n antialiasblur,\n 0.0,\n inner_df\n );\n float PI = 3.14159;\n float N_RINGS = 3.0;\n float FREQ = 1.0;\n\n gl_FragColor = v_color;\n\n float d = length(v_data.xy);\n if(d > 0.5) {\n discard;\n }\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);\n \n // 根据叠加模式选择效果\n if(u_additive > 0.0) {\n gl_FragColor *= intensity;\n // 优化水波点 blend additive 模式下有的拾取效果 \n gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\n } else {\n gl_FragColor = vec4(gl_FragColor.xyz, gl_FragColor.a * intensity);\n gl_FragColor = filterColor(gl_FragColor);\n }\n}\n",vert:Le,type:"pointWave"}):{frag:"uniform float u_additive;\nuniform float u_stroke_opacity : 1;\nuniform float u_stroke_width : 2;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\nvarying vec4 v_stroke;\n\n\n#pragma include \"sdf_2d\"\n#pragma include \"picking\"\n\n\nvoid main() {\n int shape = int(floor(v_data.w + 0.5));\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius + u_stroke_width);\n\n float outer_df;\n float inner_df;\n // 'circle', 'triangle', 'square', 'pentagon', 'hexagon', 'octogon', 'hexagram', 'rhombus', 'vesica'\n if (shape == 0) {\n outer_df = sdCircle(v_data.xy, 1.0);\n inner_df = sdCircle(v_data.xy, r);\n } else if (shape == 1) {\n outer_df = sdEquilateralTriangle(1.1 * v_data.xy);\n inner_df = sdEquilateralTriangle(1.1 / r * v_data.xy);\n } else if (shape == 2) {\n outer_df = sdBox(v_data.xy, vec2(1.));\n inner_df = sdBox(v_data.xy, vec2(r));\n } else if (shape == 3) {\n outer_df = sdPentagon(v_data.xy, 0.8);\n inner_df = sdPentagon(v_data.xy, r * 0.8);\n } else if (shape == 4) {\n outer_df = sdHexagon(v_data.xy, 0.8);\n inner_df = sdHexagon(v_data.xy, r * 0.8);\n } else if (shape == 5) {\n outer_df = sdOctogon(v_data.xy, 1.0);\n inner_df = sdOctogon(v_data.xy, r);\n } else if (shape == 6) {\n outer_df = sdHexagram(v_data.xy, 0.52);\n inner_df = sdHexagram(v_data.xy, r * 0.52);\n } else if (shape == 7) {\n outer_df = sdRhombus(v_data.xy, vec2(1.0));\n inner_df = sdRhombus(v_data.xy, vec2(r));\n } else if (shape == 8) {\n outer_df = sdVesica(v_data.xy, 1.1, 0.8);\n inner_df = sdVesica(v_data.xy, r * 1.1, r * 0.8);\n }\n\n float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\n\n float color_t = u_stroke_width < 0.01 ? 0.0 : smoothstep(\n antialiasblur,\n 0.0,\n inner_df\n );\n\n if(u_stroke_width < 0.01) {\n gl_FragColor = v_color;\n } else {\n gl_FragColor = mix(v_color, v_stroke * u_stroke_opacity, color_t);\n }\n\n if(u_additive > 0.0) {\n gl_FragColor *= opacity_t;\n gl_FragColor = filterColorAlpha(gl_FragColor, gl_FragColor.a);\n } else {\n gl_FragColor.a *= opacity_t;\n gl_FragColor = filterColor(gl_FragColor);\n }\n // 作为 mask 模板时需要丢弃透明的像素\n if(gl_FragColor.a < 0.01) {\n discard;\n } \n}\n",vert:Le,type:"pointFill"}}},{key:"animateOption2Array",value:function(t){return[t.enable?0:1,t.speed||1,t.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getLayerConfig().shape2d;this.styleAttributeService.registerStyleAttribute({name:"extrude",type:i.AttributeType.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r){var i=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],o=r%4*3;return[i[o],i[o+1],i[o+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?5:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"shape",type:i.AttributeType.Attribute,descriptor:{name:"a_Shape",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(e){var n=e.shape,r=void 0===n?2:n;return[t.indexOf(r)]}}})}}]),f}(H);var Re=function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r= 0.5) {\n float luma = 0.299 * textureColor.r + 0.587 * textureColor.g + 0.114 * textureColor.b;\n textureColor.a *= luma;\n }\n \n \n\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)){\n gl_FragColor= textureColor;\n }else {\n gl_FragColor= step(0.01, textureColor.z) * v_color;\n }\n\n gl_FragColor.a = gl_FragColor.a * u_opacity;\n \n if (gl_FragColor.a < 0.01) {\n discard;\n }\n gl_FragColor = filterColor(gl_FragColor);\n}\n',triangulation:It,depth:{enable:!1},primitive:i.gl.POINTS});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var t=this;this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?5:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_Uv",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(e){var n=t.iconService.getIconMap()[e.shape]||{x:-64,y:-64};return[n.x,n.y]}}})}}]),g}(H);function Ne(t){var e=t.coordinates;return{vertices:(0,Q.Z)(e),indices:[0],size:e.length}}var Fe=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig().opacity,e=void 0===t?1:t;return{u_opacity:(0,S.isNumber)(e)?e:1}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.layer.triangulation=Ne,t.next=3,this.layer.buildLayerModel({moduleName:"pointNormal",vertexShader:'\nattribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\nuniform float u_opacity : 1;\nuniform mat4 u_Mvp;\nattribute float a_Size;\nattribute vec4 a_Color;\n\nvarying vec4 v_color;\n\n#pragma include "projection"\n#pragma include "project"\n\nvoid main() {\n v_color = vec4(a_Color.xyz, a_Color.w * u_opacity);\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(a_Position.xy, a_Position.z, 1.0);\n } else {\n vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);\n gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy),project_pos.z,project_pos.w));\n }\n\n gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\n}\n',fragmentShader:"varying vec4 v_color;\nvoid main() {\n gl_FragColor = v_color;\n}\n",triangulation:Ne,depth:{enable:!1},primitive:i.gl.POINTS,pick:!1});case 3:return e=t.sent,t.abrupt("return",[e]);case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"clearModels",value:function(){}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}})}}]),f}(H);var ze=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.opacity,n=void 0===e?1:e,r=t.blend,i=t.speed,o=void 0===i?1:i,a=t.unit;return{u_size_unit:X[void 0===a?"pixel":a],u_speed:o,u_additive:"additive"===r?1:0,u_opacity:n}}},{key:"getAnimateUniforms",value:function(){var t=this.layer.getLayerConfig().animateOption,e=void 0===t?{enable:!1}:t;return{u_animate:this.animateOption2Array(e),u_time:this.layer.getLayerAnimateTime()}}},{key:"getAttribute",value:function(){return this.styleAttributeService.createAttributesAndIndices(this.layer.getEncodedData(),Pt)}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.layer.buildLayerModel({moduleName:"pointRadar",vertexShader:'attribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Extrude;\nattribute float a_Size;\nuniform float u_speed: 1.0;\nuniform float u_time;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform int u_size_unit;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\nvarying vec2 v_exteude;\n\n#pragma include "projection"\n#pragma include "picking"\n\nvoid main() {\n vec3 extrude = a_Extrude;\n float newSize = setPickingSize(a_Size);\n\n float time = u_time * u_speed;\n mat2 rotateMatrix = mat2( \n cos(time), sin(time), \n -sin(time), cos(time)\n );\n v_exteude = rotateMatrix * a_Extrude.xy;\n\n // unpack color(vec2)\n v_color = a_Color;\n\n\n\n // anti-alias\n float blur = 0.0;\n float antialiasblur = -max(2.0 / u_DevicePixelRatio / a_Size, blur);\n\n if(u_size_unit == 1) {\n newSize = newSize * u_PixelsPerMeter.z;\n }\n // radius(16-bit)\n v_radius = newSize;\n\n vec2 offset = (extrude.xy * (newSize));\n vec3 aPosition = a_Position;\n \n // 不以米为实际单位\n offset = project_pixel(offset);\n \n v_data = vec4(extrude.x, extrude.y, antialiasblur, -1.0);\n\n vec4 project_pos = project_position(vec4(aPosition.xy, 0.0, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp *vec4(project_pos.xy + offset, 0.0, 1.0);\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xy + offset, project_pixel(setPickingOrder(0.0)), 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'\nuniform float u_additive;\nuniform float u_opacity: 1.0;\n\nvarying vec4 v_data;\nvarying vec4 v_color;\nvarying float v_radius;\nvarying vec2 v_exteude;\n#pragma include "sdf_2d"\n#pragma include "picking"\n\nvoid main() {\n\n lowp float antialiasblur = v_data.z;\n float r = v_radius / (v_radius);\n\n float outer_df = sdCircle(v_data.xy, 1.0);\n float inner_df = sdCircle(v_data.xy, r);\n\n float opacity_t = smoothstep(0.0, antialiasblur, outer_df);\n\n gl_FragColor = vec4(v_color.rgb, v_color.a * u_opacity);\n\n if(u_additive > 0.0) {\n gl_FragColor *= opacity_t;\n } else {\n gl_FragColor.a *= opacity_t;\n }\n\n if(gl_FragColor.a > 0.0) {\n gl_FragColor = filterColor(gl_FragColor);\n }\n\n vec2 extrude = v_exteude;\n vec2 dir = normalize(extrude);\n vec2 baseDir = vec2(1.0, 0.0);\n float pi = 3.14159265359;\n // full circle\n // float rades = dot(dir, baseDir);\n // float flag = sign(dir.y);\n // float radar_v = (flag - 1.0) * -0.5 + flag * acos(rades)/pi/2.0;\n \n // half circle\n float flag = sign(dir.y);\n float rades = dot(dir, baseDir);\n float radar_v = (flag - 1.0) * -0.5 * acos(rades)/pi;\n // simple AA\n if(radar_v > 0.99) {\n radar_v = 1.0 - (radar_v - 0.99)/0.01;\n }\n\n gl_FragColor.a *= radar_v;\n}\n',triangulation:Pt,depth:{enable:!1}});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"animateOption2Array",value:function(t){return[t.enable?0:1,t.speed||1,t.rings||3,0]}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"extrude",type:i.AttributeType.Attribute,descriptor:{name:"a_Extrude",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r){var i=[1,1,0,-1,1,0,-1,-1,0,1,-1,0],o=r%4*3;return[i[o],i[o+1],i[o+2]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?5:e;return Array.isArray(n)?[n[0]]:[n]}}})}}]),f}(H);function Be(t){var e=t.coordinates;return{vertices:(0,Q.Z)(e),indices:[0],size:e.length}}var je=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getDefaultStyle",value:function(){return{blend:"additive"}}},{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.opacity,n=void 0===e?1:e,r=t.offsets,i=void 0===r?[0,0]:r,o=t.blend,a=t.strokeOpacity,s=void 0===a?1:a,u=t.strokeWidth,l=void 0===u?0:u,c=t.stroke,h=void 0===c?"#fff":c;return{u_additive:"additive"===o?1:0,u_opacity:n,u_offsets:i,u_stroke_opacity:s,u_stroke_width:l,u_stroke_color:(0,x.rgb2arr)(h)}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.layer.triangulation=Be,t.next=3,this.layer.buildLayerModel({moduleName:"pointSimple",vertexShader:'\nattribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nattribute float a_Size;\nattribute vec4 a_Color;\nvarying vec4 v_color;\n\nuniform float u_opacity : 1;\nuniform vec2 u_offsets;\nuniform float u_stroke_width;\n\nvarying float v_blur;\nvarying float v_innerRadius;\n\n\n\n#pragma include "projection"\n#pragma include "picking"\n#pragma include "project"\nvoid main() {\n v_color = vec4(a_Color.xyz, a_Color.w * u_opacity);\n v_blur = 1.0 - max(2.0/a_Size, 0.05);\n v_innerRadius = max((a_Size - u_stroke_width) / a_Size, 0.0);\n \n vec2 offset = project_pixel(u_offsets);\n \n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * vec4(a_Position.xy + offset, a_Position.z, 1.0);\n } else { // else\n vec4 project_pos = project_position(vec4(a_Position, 1.0)) + vec4(a_Size / 2.,-a_Size /2.,0.,0.);\n gl_Position = project_common_position_to_clipspace(vec4(vec2(project_pos.xy+offset),project_pos.z,project_pos.w));\n }\n\n gl_PointSize = a_Size * 2.0 * u_DevicePixelRatio;\n setPickingColor(a_PickingColor);\n}\n',fragmentShader:'\nuniform float u_additive;\nuniform float u_stroke_opacity : 1;\n\nuniform vec4 u_stroke_color : [0.0, 0.0, 0.0, 0.0];\n\nvarying vec4 v_color;\nvarying float v_blur;\nvarying float v_innerRadius;\n\n#pragma include "picking"\nvoid main() {\n vec2 center = vec2(0.5);\n\n // Tip: 片元到中心点的距离 0 - 1\n float fragmengTocenter = distance(center, gl_PointCoord) * 2.0;\n // Tip: 片元的剪切成圆形\n float circleClipOpacity = 1.0 - smoothstep(v_blur, 1.0, fragmengTocenter);\n\n\n if(v_innerRadius < 0.99) {\n // 当存在 stroke 且 stroke > 0.01\n float blurWidth = (1.0 - v_blur)/2.0;\n vec4 stroke = vec4(u_stroke_color.rgb, u_stroke_opacity);\n if(fragmengTocenter > v_innerRadius + blurWidth) {\n gl_FragColor = stroke;\n } else if(fragmengTocenter > v_innerRadius - blurWidth){\n float mixR = (fragmengTocenter - (v_innerRadius - blurWidth)) / (blurWidth * 2.0);\n gl_FragColor = mix(v_color, stroke, mixR);\n } else {\n gl_FragColor = v_color;\n }\n } else {\n // 当不存在 stroke 或 stroke <= 0.01\n gl_FragColor = v_color;\n }\n\n gl_FragColor = filterColor(gl_FragColor);\n \n if(u_additive > 0.0) {\n gl_FragColor *= circleClipOpacity;\n } else {\n gl_FragColor.a *= circleClipOpacity;\n }\n\n}\n',triangulation:Be,depth:{enable:!1},primitive:i.gl.POINTS});case 3:return e=t.sent,t.abrupt("return",[e]);case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}})}}]),f}(H),Ue=n(5512);function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nthis.width||r<0||e>this.height)return!i&&[];var a=[];if(t<=0&&e<=0&&this.width<=n&&this.height<=r){if(i)return!0;for(var s=0;s0:a}},{key:"queryCell",value:function(t,e,n,r,i,o,a,s){var u=a.seenUids,l=this.boxCells[i];if(null!==l){var c,h=this.bboxes,p=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ze(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(l);try{for(p.s();!(c=p.n()).done;){var f=c.value;if(!u.box[f]){u.box[f]=!0;var d=4*f;if(t<=h[d+2]&&e<=h[d+3]&&n>=h[d+0]&&r>=h[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:h[d],y1:h[d+1],x2:h[d+2],y2:h[d+3]})}}}}catch(t){p.e(t)}finally{p.f()}}return!1}},{key:"forEachCell",value:function(t,e,n,r,i,o,a,s){for(var u=this.convertToXCellCoord(t),l=this.convertToYCellCoord(e),c=this.convertToXCellCoord(n),h=this.convertToYCellCoord(r),p=u;p<=c;p++)for(var f=l;f<=h;f++){var d=this.xCellCount*f+p;if(i.call(this,t,e,n,r,d,o,a,s))return}}},{key:"convertToXCellCoord",value:function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}},{key:"convertToYCellCoord",value:function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}}]),t}();var Ge=function(){function t(e,n){(0,a.Z)(this,t),(0,p.Z)(this,"viewportPadding",100),this.width=e,this.height=n,this.viewportPadding=Math.max(e,n),this.grid=new Ve(e+this.viewportPadding,n+this.viewportPadding,25),this.screenRightBoundary=e+this.viewportPadding,this.screenBottomBoundary=n+this.viewportPadding,this.gridRightBoundary=e+2*this.viewportPadding,this.gridBottomBoundary=n+2*this.viewportPadding}return(0,s.Z)(t,[{key:"placeCollisionBox",value:function(t){var e=t.x1+t.anchorPointX+this.viewportPadding,n=t.y1+t.anchorPointY+this.viewportPadding,r=t.x2+t.anchorPointX+this.viewportPadding,i=t.y2+t.anchorPointY+this.viewportPadding;return!this.isInsideGrid(e,n,r,i)||this.grid.hitTest(e,n,r,i)?{box:[]}:{box:[e,n,r,i]}}},{key:"insertCollisionBox",value:function(t,e){var n={featureIndex:e};this.grid.insert(n,t[0],t[1],t[2],t[3])}},{key:"project",value:function(t,e,n){var r=Ue.al(e,n,0,1),i=Ue.Ue(),o=nt.fromValues.apply(nt,(0,Q.Z)(t));return Ue.fF(i,r,o),{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(t,e,n,r){return n>=0&&t=0&&e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function We(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n.5)&&p&&r===this.preTextStyle.textAllowOverlap){t.next=14;break}return t.next=13,this.reBuildModel();case 14:return t.abrupt("return",!1);case 15:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"clearModels",value:function(){var t;null===(t=this.texture)||void 0===t||t.destroy(),this.layer.off("remapping",this.mapping)}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"rotate",type:i.AttributeType.Attribute,descriptor:{name:"a_Rotate",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.rotate,n=void 0===e?0:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"textOffsets",type:i.AttributeType.Attribute,descriptor:{name:"a_textOffsets",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[5],n[6]]}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?12:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"textUv",type:i.AttributeType.Attribute,descriptor:{name:"a_tex",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[3],n[4]]}}})}},{key:"bindEvent",value:function(){this.layer.isTileLayer||this.layer.on("remapping",this.mapping)}},{key:"textExtent",value:function(){var t=this.mapService.getBounds();return(0,x.padBounds)(t,.5)}},{key:"initTextFont",value:function(){var t=this.getTextStyle(),e=t.fontWeight,n=t.fontFamily,r=this.rawEncodeData,i=[];r.forEach((function(t){var e,n=t.shape,r=void 0===n?"":n,o=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return $e(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$e(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(r=r.toString());try{for(o.s();!(e=o.n()).done;){var a=e.value;-1===i.indexOf(a)&&i.push(a)}}catch(t){o.e(t)}finally{o.f()}})),this.fontService.setFontOptions({characterSet:i,fontWeight:e,fontFamily:n,iconfont:!1})}},{key:"initIconFontTex",value:function(){var t=this.getTextStyle(),e=t.fontWeight,n=t.fontFamily,r=this.rawEncodeData,i=[];r.forEach((function(t){var e=t.shape,n=void 0===e?"":e;n="".concat(n),-1===i.indexOf(n)&&i.push(n)})),this.fontService.setFontOptions({characterSet:i,fontWeight:e,fontFamily:n,iconfont:!0})}},{key:"getTextStyle",value:function(){var t=this.layer.getLayerConfig(),e=t.fontWeight,n=void 0===e?"400":e,r=t.fontFamily,i=void 0===r?"sans-serif":r,o=t.textAllowOverlap,a=void 0!==o&&o,s=t.padding,u=void 0===s?[0,0]:s,l=t.textAnchor,c=void 0===l?"center":l,h=t.textOffset,p=void 0===h?[0,0]:h,f=t.opacity,d=void 0===f?1:f,m=t.strokeOpacity,g=void 0===m?1:m,y=t.strokeWidth,v=void 0===y?0:y,_=t.stroke;return{fontWeight:n,fontFamily:i,textAllowOverlap:a,padding:u,textAnchor:c,textOffset:p,opacity:d,strokeOpacity:g,strokeWidth:v,stroke:void 0===_?"#000":_}}},{key:"generateGlyphLayout",value:function(t){var e=this,n=this.getFontServiceMapping(),r=this.layer.getLayerConfig(),i=r.spacing,o=void 0===i?2:i,a=r.textAnchor,s=void 0===a?"center":a,u=r.textOffset,l=this.rawEncodeData;this.glyphInfo=l.map((function(r){var i=r.shape,a=void 0===i?"":i,l=r.id,c=r.size,h=void 0===c?1:c,p=function(t,e,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[0,0],s=arguments.length>7?arguments[7]:void 0,u=t.split("\n"),l=[],c={positionedGlyphs:l,top:a[1],bottom:a[1],left:a[0],right:a[0],lineCount:u.length,text:t};return s?function(t,e,n,r,i,o,a){var s=0,u=-8,l=0,c=t.positionedGlyphs,h="right"===o?1:"left"===o?0:.5,p=c.length;n.forEach((function(t){var n=e[t];if(n&&(c.push({glyph:t,x:n.advance/2,y:u+0,vertical:!1,scale:1,metrics:n}),s+=n.advance+a),c.length!==p){var i=s-a;l=Math.max(i,l),Ye(c,e,p,c.length-1,h)}s=0,u-=r+5}));var f=qe(i),d=f.horizontalAlign,m=f.verticalAlign;Xe(c,h,d,m,l,r,n.length);var g=u- -8;t.top+=-m*g,t.bottom=t.top-g,t.left+=-d*l,t.right=t.left+l}(c,e,u,n,r,i,o):function(t,e,n,r,i,o,a){var s=0,u=-8,l=0,c=t.positionedGlyphs,h="right"===o?1:"left"===o?0:.5,p=c.length;n.forEach((function(t){if(t.split("").forEach((function(t){var n=e[t];n&&(c.push({glyph:t,x:s,y:u+0,vertical:!1,scale:1,metrics:n}),s+=n.advance+a)})),c.length!==p){var n=s-a;l=Math.max(n,l),Ye(c,e,p,c.length-1,h)}s=0,u-=r+5}));var f=qe(i),d=f.horizontalAlign,m=f.verticalAlign;Xe(c,h,d,m,l,r,n.length);var g=u- -8;t.top+=-m*g,t.bottom=t.top-g,t.left+=-d*l,t.right=t.left+l}(c,e,u,n,r,i,o),!!l.length&&c}(a.toString(),n,h,s,"left",o,u,t),f=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0],r=arguments.length>2?arguments[2]:void 0,i=t.positionedGlyphs,o=[],a=He(void 0===i?[]:i);try{for(a.s();!(e=a.n()).done;){var s=e.value,u=s.metrics,l=u.advance*s.scale/2,c=r?[s.x+l,s.y]:[0,0],h=r?[0,0]:[s.x+l+n[0],s.y+n[1]],p=-4*s.scale-l+h[0],f=-4*s.scale+h[1],d=p+u.width*s.scale,m=f+u.height*s.scale,g={x:p,y:f},y={x:d,y:f},v={x:p,y:m},_={x:d,y:m};o.push({tl:g,tr:y,bl:v,br:_,tex:u,glyphOffset:c})}}catch(t){a.e(t)}finally{a.f()}return o}(p,u,!1);return r.shaping=p,r.glyphQuads=f,r.centroid=(0,x.calculateCentroid)(r.coordinates),r.originCentroid="GAODE2.x"===r.version?(0,x.calculateCentroid)(r.originCoordinates):r.originCentroid=r.centroid,e.glyphInfoMap[l]={shaping:p,glyphQuads:f,centroid:(0,x.calculateCentroid)(r.coordinates)},r}))}},{key:"getFontServiceMapping",value:function(){var t=this.layer.getLayerConfig(),e=t.fontWeight,n=void 0===e?"400":e,r=t.fontFamily,i=void 0===r?"sans-serif":r;return this.fontService.getMappingByKey("".concat(i,"_").concat(n))}},{key:"getFontServiceCanvas",value:function(){var t=this.layer.getLayerConfig(),e=t.fontWeight,n=void 0===e?"400":e,r=t.fontFamily,i=void 0===r?"sans-serif":r;return this.fontService.getCanvasByKey("".concat(i,"_").concat(n))}},{key:"filterGlyphs",value:function(){var t=this,e=this.layer.getLayerConfig(),n=e.padding,r=void 0===n?[0,0]:n,i=e.textAllowOverlap;if(void 0===i||!i){this.glyphInfoMap={},this.currentZoom=this.mapService.getZoom(),this.extent=this.textExtent();var o=this.rendererService.getViewportSize(),a=o.width,s=o.height,u=new Ge(a,s);this.glyphInfo.filter((function(e){var n=e.shaping,i=e.id,o=void 0===i?0:i,a="GAODE2.x"===e.version?e.originCentroid:e.centroid,s=e.size/16,l=t.mapService.lngLatToContainer(a),c=u.placeCollisionBox({x1:n.left*s-r[0],x2:n.right*s+r[0],y1:n.top*s-r[1],y2:n.bottom*s+r[1],anchorPointX:l.x,anchorPointY:l.y}).box;return!(!c||!c.length||(u.insertCollisionBox(c,o),0))})).forEach((function(e){t.glyphInfoMap[e.id]=e}))}}},{key:"initGlyph",value:function(){var t=this.layer.getLayerConfig().iconfont,e=void 0!==t&&t;e?this.initIconFontTex():this.initTextFont(),this.generateGlyphLayout(e)}},{key:"updateTexture",value:function(){var t=this.rendererService.createTexture2D,e=this.getFontServiceCanvas();this.textureHeight=e.height,this.texture&&this.texture.destroy(),this.texture=t({data:e,mag:i.gl.LINEAR,min:i.gl.LINEAR,width:e.width,height:e.height})}},{key:"reBuildModel",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.filterGlyphs(),t.next=3,this.layer.buildLayerModel({moduleName:"pointText",vertexShader:Je,fragmentShader:Ke,triangulation:Qe.bind(this),inject:this.getInject(),depth:{enable:!1}});case 3:e=t.sent,this.layer.models=[e];case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),_}(H);const en={fillImage:Re,fill:Ie,radar:ze,image:De,normal:Fe,simplePoint:je,extrude:ke,text:tn,earthFill:Pe,earthExtrude:Oe};function nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(n);try{for(a.s();!(o=a.n()).done;){var s=o.value;if("string"==typeof s&&i.hasOwnProperty(s))return"image"}}catch(t){a.e(t)}finally{a.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 t=this.getEncodedData(),e=this.getLayerConfig(),n=e.shape2d,r=e.shape3d,i=this.iconService.getIconMap(),o=t.find((function(t){return t.hasOwnProperty("shape")}));if(o){var a=o.shape;return"dot"===a?"normal":"simple"===a?"simplePoint":"radar"===a?"radar":"fillImage"===this.layerType?"fillImage":-1!==(null==n?void 0:n.indexOf(a))?"GLOBEL"===this.mapService.version?"earthFill":"fill":-1!==(null==r?void 0:r.indexOf(a))?"GLOBEL"===this.mapService.version?"earthExtrude":"extrude":i.hasOwnProperty(a)?"image":"text"}return this.getModelTypeWillEmptyData()}}]),m}(V);var on=function(t){(0,l.Z)(m,t);var e,n,r,u,p,f=(u=m,p=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}}(),function(){var t,e=(0,h.Z)(u);if(p){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function m(){return(0,a.Z)(this,m),f.apply(this,arguments)}return(0,s.Z)(m,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.heightfixed,n=void 0!==e&&e,r=t.raisingHeight,i=void 0===r?0:r,o=t.topsurface,a=void 0===o||o,s=t.sidesurface,u=void 0===s||s,l=t.sourceColor,c=t.targetColor,h=0,p=[1,1,1,1],f=[1,1,1,1];return l&&c&&(p=(0,x.rgb2arr)(l),f=(0,x.rgb2arr)(c),h=1),(0,g.Z)({u_topsurface:Number(a),u_sidesurface:Number(u),u_heightfixed:Number(n),u_raisingHeight:Number(i),u_linearColor:h,u_sourceColor:p,u_targetColor:f,u_texture:this.texture},this.getStyleAttribute())}},{key:"initModels",value:(r=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loadTexture();case 2:return t.abrupt("return",this.buildModels());case 3:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"buildModels",value:(n=(0,o.Z)(d().mark((function t(){var e,n,r,i,o;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getShaders(),n=e.frag,r=e.vert,i=e.type,t.next=3,this.layer.buildLayerModel({moduleName:i,vertexShader:r,fragmentShader:n,inject:this.getInject(),triangulation:Zt});case 3:return o=t.sent,t.abrupt("return",[o]);case 5:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"getShaders",value:function(){var t=this.layer.getLayerConfig(),e=t.pickLight;return t.mapTexture?{frag:'uniform sampler2D u_texture;\nuniform float u_opacity: 1.0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float u_linearColor: 0;\n\nuniform float u_topsurface: 1.0;\nuniform float u_sidesurface: 1.0;\n\nvarying vec4 v_Color;\nvarying vec3 v_uvs;\nvarying vec2 v_texture_data;\n\n\n#pragma include "picking"\n\nvoid main() {\n float opacity = u_opacity;\n float isSide = v_texture_data.x;\n float lightWeight = v_texture_data.y;\n float topU = v_uvs[0];\n float topV = 1.0 - v_uvs[1];\n float sidey = v_uvs[2];\n // Tip: 部分机型 GPU 计算精度兼容\n if(isSide < 0.999) {// 是否是边缘\n // side face\n if(u_sidesurface < 1.0) {\n discard;\n }\n\n if(u_linearColor == 1.0) {\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n gl_FragColor = linearColor;\n } else {\n gl_FragColor = v_Color;\n }\n } else {\n\n // top face\n if(u_topsurface < 1.0) {\n discard;\n }\n\n gl_FragColor = texture2D(u_texture, vec2(topU, topV));\n // gl_FragColor = vec4(1.0, 0., 0., 1.0);\n }\n \n\n gl_FragColor.a *= opacity;\n gl_FragColor = filterColor(gl_FragColor);\n}\n',vert:'precision highp float;\n\n#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\nattribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Normal;\nattribute float a_Size;\nattribute vec3 a_uvs;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform sampler2D u_texture;\n\n\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float u_topsurface: 1.0;\nuniform float u_sidesurface: 1.0;\nvarying vec4 v_Color;\nuniform float u_heightfixed: 0.0; // 默认不固定\nuniform float u_raisingHeight: 0.0;\nuniform float u_linearColor: 0.0;\n\nvarying vec2 v_texture_data;\nvarying vec3 v_uvs;\n\n#pragma include "projection"\n#pragma include "light"\n#pragma include "picking"\n\nvoid main() {\n \n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n float lightWeight = calc_lighting(pos);\n vec4 project_pos = project_position(pos);\n v_uvs = a_uvs;\n\n v_texture_data = vec2(a_Position.z, lightWeight);\n\n if(u_heightfixed > 0.0) { // 判断几何体是否固定高度\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n // gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n\n\n\n\n setPickingColor(a_PickingColor);\n}\n',type:"polygonExtrudeTexture"}:e?{frag:'uniform float u_opacity: 1.0;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float u_linearColor: 0;\n\nuniform float u_topsurface: 1.0;\nuniform float u_sidesurface: 1.0;\n\nvarying vec4 v_Color;\nvarying vec3 v_uvs;\nvarying vec2 v_texture_data;\n\n#pragma include "picking"\n\nvoid main() {\n float opacity = u_opacity;\n float isSide = v_texture_data.x;\n float sidey = v_uvs[2];\n float lightWeight = v_texture_data.y;\n\n // Tip: 部分机型 GPU 计算精度兼容\n if(isSide < 0.999) {\n // side face\n if(u_sidesurface < 1.0) {\n discard;\n }\n \n if( u_linearColor == 1.0) {\n // side use linear\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n gl_FragColor = linearColor;\n } else {\n // side notuse linear\n gl_FragColor = v_Color;\n }\n } else {\n // top face\n if(u_topsurface < 1.0) {\n discard;\n }\n gl_FragColor = v_Color;\n }\n\n gl_FragColor.a *= opacity;\n gl_FragColor = filterColorAlpha(gl_FragColor, lightWeight);\n}\n',vert:'precision highp float;\n\n#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\nattribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Normal;\nattribute float a_Size;\nattribute vec3 a_uvs;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nuniform float u_heightfixed: 0.0; // 默认不固定\nuniform float u_raisingHeight: 0.0;\n\nvarying vec2 v_texture_data;\nvarying vec3 v_uvs;\nvarying vec4 v_Color;\n\n\n#pragma include "projection"\n#pragma include "light"\n#pragma include "picking"\n\nvoid main() {\n\n\n v_uvs = a_uvs;\n // cal style mapping - 数据纹理映射部分的计算\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n vec4 project_pos = project_position(pos);\n\n if(u_heightfixed > 0.0) { // 判断几何体是否固定高度\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n // gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n\n float lightWeight = calc_lighting(pos);\n v_texture_data = vec2(a_Position.z,lightWeight);\n\n v_Color = vec4(a_Color.rgb * lightWeight, a_Color.w);\n\n setPickingColor(a_PickingColor);\n}\n',type:"polygonExtrudePickLight"}:{frag:'uniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float u_linearColor: 0;\n\nuniform float u_topsurface: 1.0;\nuniform float u_sidesurface: 1.0;\n\nvarying vec4 v_Color;\n\n#pragma include "picking"\n\nvoid main() {\n\n\n // top face\n if(u_topsurface < 1.0) {\n discard;\n }\n\n gl_FragColor = v_Color;\n \n\n gl_FragColor = filterColor(gl_FragColor);\n}\n',vert:'precision highp float;\n\n#define ambientRatio 0.5\n#define diffuseRatio 0.3\n#define specularRatio 0.2\n\nattribute vec4 a_Color;\nattribute vec3 a_Position;\nattribute vec3 a_Normal;\nattribute float a_Size;\nattribute vec3 a_uvs;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform vec4 u_sourceColor;\nuniform vec4 u_targetColor;\nuniform float u_linearColor: 0;\n\nuniform float u_topsurface: 1.0;\nuniform float u_sidesurface: 1.0;\n\nvarying vec4 v_Color;\nuniform float u_heightfixed: 0.0; // 默认不固定\nuniform float u_raisingHeight: 0.0;\n\n#pragma include "projection"\n#pragma include "light"\n#pragma include "picking"\n\nvoid main() {\n \n float isSide = a_Position.z;\n float topU = a_uvs[0];\n float topV = 1.0 - a_uvs[1];\n float sidey = a_uvs[2];\n\n vec4 pos = vec4(a_Position.xy, a_Position.z * a_Size, 1.0);\n float lightWeight = calc_lighting(pos);\n\n vec4 project_pos = project_position(pos);\n\n if(u_heightfixed > 0.0) { // 判断几何体是否固定高度\n project_pos.z = a_Position.z * a_Size;\n project_pos.z += u_raisingHeight;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n }\n\n\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n // gl_Position = u_Mvp * (vec4(project_pos.xyz * vec3(1.0, 1.0, -1.0), 1.0));\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n\n // Tip: 部分机型 GPU 计算精度兼容\n if(isSide < 0.999) {\n // side face\n // if(u_sidesurface < 1.0) {\n // discard;\n // }\n\n if(u_linearColor == 1.0) {\n vec4 linearColor = mix(u_targetColor, u_sourceColor, sidey);\n linearColor.rgb *= lightWeight;\n v_Color = linearColor;\n } else {\n v_Color = a_Color;\n }\n\n } else {\n v_Color = a_Color;\n }\n\n v_Color = vec4(v_Color.rgb * lightWeight, v_Color.w * opacity);\n\n\n setPickingColor(a_PickingColor);\n}\n',type:"polygonExtrude"}}},{key:"clearModels",value:function(){var t;null===(t=this.texture)||void 0===t||t.destroy()}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getSource().extent,e=t,n=this.layer.coordCenter||this.layer.getSource().center,r=e[2]-e[0],o=e[3]-e[1];if("GAODE2.x"===this.mapService.version){var a=this.mapService.coordToAMap2RelativeCoordinates([t[0],t[1]],n),s=(0,A.Z)(a,2),u=s[0],l=s[1],c=this.mapService.coordToAMap2RelativeCoordinates([t[2],t[3]],n),h=(0,A.Z)(c,2),p=h[0],f=h[1];r=p-u,o=f-l,e=[u,l,p,f]}this.styleAttributeService.registerStyleAttribute({name:"uvs",type:i.AttributeType.Attribute,descriptor:{name:"a_uvs",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,n,i){var a=i[0],s=i[1];return[(a-e[0])/r,(s-e[1])/o,i[4]]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?10:e;return Array.isArray(n)?[n[0]]:[n]}}})}},{key:"loadTexture",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,o=this;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.layer.getLayerConfig(),n=e.mapTexture,r=this.rendererService.createTexture2D,this.texture=r({height:0,width:0}),!n){t.next=5;break}return t.abrupt("return",new Promise((function(t,e){var a=new Image;a.crossOrigin="anonymous",a.src=n,a.onload=function(){return o.texture=r({data:a,width:a.width,height:a.height,wrapS:i.gl.CLAMP_TO_EDGE,wrapT:i.gl.CLAMP_TO_EDGE,min:i.gl.LINEAR,mag:i.gl.LINEAR}),t(null)},a.onerror=function(){e(new Error("image load error"))}})));case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})}]),m}(H);var an=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.raisingHeight,n=void 0===e?0:e,r=t.opacityLinear,i=void 0===r?{enable:!1,dir:"in"}:r;return(0,g.Z)({u_raisingHeight:Number(n),u_opacitylinear:Number(i.enable),u_dir:"in"===i.dir?1:0},this.getStyleAttribute())}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.buildModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,o,a,s,u,l,c,h;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getModelParams(),n=e.frag,r=e.vert,o=e.triangulation,a=e.type,s=this.layer.getLayerConfig(),u=s.workerEnabled,l=void 0!==u&&u,c=s.enablePicking,this.layer.triangulation=o,t.next=5,this.layer.buildLayerModel({moduleName:a,vertexShader:r,fragmentShader:n,inject:this.getInject(),triangulation:o,primitive:i.gl.TRIANGLES,depth:{enable:!1},workerEnabled:l,workerOptions:{modelType:a,enablePicking:c}});case 5:return h=t.sent,t.abrupt("return",[h]);case 7:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getLayerConfig().opacityLinear;(void 0===t?{enable:!1,dir:"in"}:t).enable&&this.styleAttributeService.registerStyleAttribute({name:"linear",type:i.AttributeType.Attribute,descriptor:{name:"a_linear",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n){return[n[3],n[4],n[5]]}}})}},{key:"getModelParams",value:function(){var t=this.layer.getLayerConfig().opacityLinear;return(void 0===t?{enable:!1}:t).enable?{frag:'#pragma include "picking"\nuniform float u_opacitylinear: 0.0;\nuniform float u_dir: 1.0;\nvarying vec3 v_linear;\nvarying vec2 v_pos;\nvarying vec4 v_Color;\n\n\nvoid main() {\n gl_FragColor = v_Color;\n if(u_opacitylinear > 0.0) {\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;\n }\n gl_FragColor = filterColor(gl_FragColor);\n}\n',vert:'attribute vec4 a_Color;\nattribute vec3 a_Position;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\nuniform float u_raisingHeight: 0.0;\n\nvarying vec4 v_Color;\n\n\n#pragma include "projection"\n#pragma include "picking"\n\nuniform float u_opacitylinear: 0.0;\n\nattribute vec3 a_linear;\nvarying vec3 v_linear;\nvarying vec2 v_pos;\n\nvoid main() {\n if(u_opacitylinear > 0.0) {\n v_linear = a_linear;\n v_pos = a_Position.xy;\n }\n v_Color = vec4(a_Color.xyz, a_Color.w * opacity);\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n project_pos.z += u_raisingHeight;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}',type:"polygonLinear",triangulation:jt}:{frag:'varying vec4 v_color;\n#pragma include "picking"\n\nvoid main() {\n gl_FragColor = v_color;\n gl_FragColor = filterColor(gl_FragColor);\n}\n',vert:'attribute vec4 a_Color;\nattribute vec3 a_Position;\n\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nuniform float u_raisingHeight: 0.0;\n\nvarying vec4 v_color;\n\n\n#pragma include "projection"\n#pragma include "picking"\n\nvoid main() {\n // cal style mapping - 数据纹理映射部分的计算\n\n // cal style mapping - 数据纹理映射部分的计算\n\n v_color = vec4(a_Color.xyz, a_Color.w * opacity);\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n // gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n\n project_pos.z += u_raisingHeight;\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT || u_CoordinateSystem == COORDINATE_SYSTEM_LNGLAT_OFFSET) {\n float mapboxZoomScale = 4.0/pow(2.0, 21.0 - u_Zoom);\n project_pos.z *= mapboxZoomScale;\n project_pos.z += u_raisingHeight * mapboxZoomScale;\n }\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n\n setPickingColor(a_PickingColor);\n}\n\n',type:"polygonFill",triangulation:x.polygonFillTriangulation}}}]),f}(H);var sn=function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.opacity,n=void 0===e?1:e,r=t.watercolor,i=void 0===r?"#6D99A8":r,o=t.watercolor2,a=void 0===o?"#0F121C":o;return{u_texture1:this.texture1,u_texture2:this.texture2,u_texture3:this.texture3,u_watercolor:(0,x.rgb2arr)(i),u_watercolor2:(0,x.rgb2arr)(a),u_opacity:(0,S.isNumber)(n)?n:1}}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loadTexture(),t.abrupt("return",this.buildModels());case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.layer.buildLayerModel({moduleName:"polygonOcean",vertexShader:'attribute vec2 a_uv;\nattribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nvarying vec2 v_uv;\n\n#pragma include "projection"\n\nvoid main() {\n v_uv = a_uv;\n\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n}\n\n',fragmentShader:"\nuniform float u_time: 0.0;\nuniform float u_opacity: 1.0;\n\nvarying vec2 v_uv;\n\nfloat coast2water_fadedepth = 0.10;\nfloat large_waveheight = .750; // change to adjust the \"heavy\" waves\nfloat large_wavesize = 3.4; // factor to adjust the large wave size\nfloat small_waveheight = 0.6; // change to adjust the small random waves\nfloat small_wavesize = 0.5; // factor to ajust the small wave size\nfloat water_softlight_fact = 15.; // range [1..200] (should be << smaller than glossy-fact)\nfloat water_glossylight_fact= 120.; // range [1..200]\nfloat particle_amount = 70.;\n// vec3 watercolor = vec3(0.43, 0.60, 0.66); // 'transparent' low-water color (RGB)\n// vec3 watercolor2 = vec3(0.06, 0.07, 0.11); // deep-water color (RGB, should be darker than the low-water color)\nuniform vec4 u_watercolor;\nuniform vec4 u_watercolor2;\nvec3 water_specularcolor = vec3(1.3, 1.3, 0.9); // specular Color (RGB) of the water-highlights\n#define light vec3(-0., sin(u_time*0.5)*.5 + .35, 2.8) // position of the sun\n\nuniform sampler2D u_texture1;\nuniform sampler2D u_texture2;\nuniform sampler2D u_texture3;\n\n \n\nfloat hash( float n ) {\n return fract(sin(n)*43758.5453123);\n}\n\n// 2d noise function\nfloat noise1( in vec2 x ) {\n vec2 p = floor(x);\n vec2 f = smoothstep(0.0, 1.0, fract(x));\n float n = p.x + p.y*57.0;\n return mix(mix( hash(n+ 0.0), hash(n+ 1.0),f.x),\n mix( hash(n+ 57.0), hash(n+ 58.0),f.x),f.y);\n}\n\nfloat noise(vec2 p) {\n return texture2D(u_texture2,p*vec2(1./256.)).x;\n}\n\nvec4 highness(vec2 p) {\n vec4 t = texture2D(u_texture1,fract(p));\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;\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);\n}\n\nfloat height_map( vec2 p ) {\n vec4 height=highness(p);\n /*\n height = -0.5+\n 0.5*smoothstep(-100.,0.,-height)+\n 2.75*smoothstep(0.,2.,height)+\n 1.75*smoothstep(2.,4.,height)+\n 2.75*smoothstep(4.,16.,height)+\n 1.5*smoothstep(16.,1000.,height);\n */\n\n mat2 m = mat2( 0.9563*1.4, -0.2924*1.4, 0.2924*1.4, 0.9563*1.4 );\n //p = p*6.;\n float f = 0.6000*noise1( p ); p = m*p*1.1*6.;\n f += 0.2500*noise( p ); p = m*p*1.32;\n f += 0.1666*noise( p ); p = m*p*1.11;\n f += 0.0834*noise( p ); p = m*p*1.12;\n f += 0.0634*noise( p ); p = m*p*1.13;\n f += 0.0444*noise( p ); p = m*p*1.14;\n f += 0.0274*noise( p ); p = m*p*1.15;\n f += 0.0134*noise( p ); p = m*p*1.16;\n f += 0.0104*noise( p ); p = m*p*1.17;\n f += 0.0084*noise( p );\n f = .25*f+dot(height,vec4(-.03125,-.125,.25,.25))*.5;\n const float FLAT_LEVEL = 0.92525;\n //f = f*0.25+height*0.75;\n if (f level)\n {\n col = CalcTerrain(uv, height);\n }\n if (height <= level)\n {\n vec2 dif = vec2(.0, .01);\n vec2 pos = uv*15. + vec2(u_time*.01);\n float h1 = water_map(pos-dif,waveheight);\n float h2 = water_map(pos+dif,waveheight);\n float h3 = water_map(pos-dif.yx,waveheight);\n float h4 = water_map(pos+dif.yx,waveheight);\n vec3 normwater = normalize(vec3(h3-h4, h1-h2, .125)); // norm-vector of the 'bumpy' water-plane\n uv += normwater.xy*.002*(level-height);\n \n col = CalcTerrain(uv, height);\n\n float coastfade = clamp((level-height)/coast2water_fadedepth, 0., 1.);\n float coastfade2= clamp((level-height)/deepwater_fadedepth, 0., 1.);\n float intensity = col.r*.2126+col.g*.7152+col.b*.0722;\n watercolor = mix(watercolor*intensity, watercolor2, smoothstep(0., 1., coastfade2));\n\n vec3 r0 = vec3(uv, WATER_LEVEL);\n vec3 rd = normalize( light - r0 ); // ray-direction to the light from water-position\n float grad = dot(normwater, rd); // dot-product of norm-vector and light-direction\n float specular = pow(grad, water_softlight_fact); // used for soft highlights \n float specular2= pow(grad, water_glossylight_fact); // used for glossy highlights\n float gradpos = dot(vec3(0., 0., 1.), rd);\n float specular1= smoothstep(0., 1., pow(gradpos, 5.)); // used for diffusity (some darker corona around light's specular reflections...) \n float watershade = test_shadow( uv, level );\n watercolor *= 2.2+watershade;\n watercolor += (.2+.8*watershade) * ((grad-1.0)*.5+specular) * .25;\n watercolor /= (1.+specular1*1.25);\n watercolor += watershade*specular2*water_specularcolor;\n watercolor += watershade*coastfade*(1.-coastfade2)*(vec3(.5, .6, .7)*nautic(uv)+vec3(1., 1., 1.)*particles(uv));\n \n col = mix(col, watercolor, coastfade);\n }\n \n\n float opacity = u_opacity;\n gl_FragColor = vec4(col, opacity); \n}\n",triangulation:Bt,primitive:i.gl.TRIANGLES,depth:{enable:!1}});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"clearModels",value:function(){var t,e,n;null===(t=this.texture1)||void 0===t||t.destroy(),null===(e=this.texture2)||void 0===e||e.destroy(),null===(n=this.texture3)||void 0===n||n.destroy()}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getSource().extent,e=(0,A.Z)(t,4),n=e[0],r=e[1],o=e[2],a=e[3],s=o-n,u=a-r;this.styleAttributeService.registerStyleAttribute({name:"oceanUv",type:i.AttributeType.Attribute,descriptor:{name:"a_uv",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,i,o){var a=t.version===M.G["GAODE2.x"]?t.originCoordinates[0][o]:i,l=(0,A.Z)(a,2),c=l[0],h=l[1];return[(c-n)/s,(h-r)/u]}}})}},{key:"loadTexture",value:function(){var t,e,n,r=this,o=this.rendererService.createTexture2D,a={height:0,width:0};function s(t){return o({data:t,width:t.width,height:t.height,wrapS:i.gl.MIRRORED_REPEAT,wrapT:i.gl.MIRRORED_REPEAT,min:i.gl.LINEAR,mag:i.gl.LINEAR})}this.texture1=o(a),this.texture2=o(a),this.texture3=o(a),t=function(t){r.texture1=s(t[0]),r.texture2=s(t[1]),r.texture3=s(t[2]),r.layerService.reRender()},e=0,n=[],["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(r){var i=new Image;i.crossOrigin="",i.src=r,n.push(i),i.onload=function(){3==++e&&t(n)}}))}}]),f}(H);const un={fill:an,line:Se,extrude:on,text:tn,point_fill:Ie,point_image:De,point_normal:Fe,point_extrude:ke,water:function(t){(0,l.Z)(f,t);var e,n,r,u,p=(r=f,u=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}}(),function(){var t,e=(0,h.Z)(r);if(u){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){return(0,a.Z)(this,f),p.apply(this,arguments)}return(0,s.Z)(f,[{key:"getUninforms",value:function(){var t=this.layer.getLayerConfig(),e=t.opacity,n=void 0===e?1:e,r=t.speed,i=void 0===r?.5:r;return{u_texture:this.texture,u_speed:i,u_opacity:(0,S.isNumber)(n)?n:1}}},{key:"getAnimateUniforms",value:function(){return{u_time:this.layer.getLayerAnimateTime()}}},{key:"initModels",value:(n=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.loadTexture(),t.abrupt("return",this.buildModels());case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){var e;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.layer.buildLayerModel({moduleName:"polygonWater",vertexShader:'attribute vec4 a_Color;\nattribute vec2 a_uv;\nattribute vec3 a_Position;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_Mvp;\n\nvarying vec4 v_Color;\nvarying vec2 v_uv;\nuniform float u_opacity: 1.0;\n\n\n#pragma include "projection"\n\nvoid main() {\n v_uv = a_uv;\n\n v_Color = a_Color;\n vec4 project_pos = project_position(vec4(a_Position, 1.0));\n\n if(u_CoordinateSystem == COORDINATE_SYSTEM_P20_2) { // gaode2.x\n gl_Position = u_Mvp * (vec4(project_pos.xyz, 1.0));\n } else {\n gl_Position = project_common_position_to_clipspace(vec4(project_pos.xyz, 1.0));\n }\n}\n\n',fragmentShader:"uniform sampler2D u_texture;\nuniform float u_time: 0.0;\nuniform float u_speed: 1.0;\nuniform float u_opacity: 1.0;\n\nvarying vec4 v_Color;\nvarying vec2 v_uv;\n\nfloat rand(vec2 n) { return 0.5 + 0.5 * fract(sin(dot(n.xy, vec2(12.9898, 78.233)))* 43758.5453); }\n\nfloat water(vec3 p) {\n float t = u_time * u_speed;\n p.z += t * 2.; p.x += t * 2.;\n vec3 c1 = texture2D(u_texture, p.xz / 30.).xyz;\n p.z += t * 3.; p.x += t * 0.52;\n vec3 c2 = texture2D(u_texture, p.xz / 30.).xyz;\n p.z += t * 4.; p.x += t * 0.8;\n vec3 c3 = texture2D(u_texture, p.xz / 30.).xyz;\n c1 += c2 - c3;\n float z = (c1.x + c1.y + c1.z) / 3.;\n return p.y + z / 4.;\n}\n\nfloat map(vec3 p) {\n float d = 100.0;\n d = water(p);\n return d;\n}\n\nfloat intersect(vec3 ro, vec3 rd) {\n float d = 0.0;\n for (int i = 0; i <= 100; i++) {\n float h = map(ro + rd * d);\n if (h < 0.1) return d;\n d += h;\n }\n return 0.0;\n}\n\nvec3 norm(vec3 p) {\n float eps = .1;\n return normalize(vec3(\n map(p + vec3(eps, 0, 0)) - map(p + vec3(-eps, 0, 0)),\n map(p + vec3(0, eps, 0)) - map(p + vec3(0, -eps, 0)),\n map(p + vec3(0, 0, eps)) - map(p + vec3(0, 0, -eps))\n ));\n} \n\nfloat calSpc() {\n vec3 l1 = normalize(vec3(1, 1, 1));\n vec3 ro = vec3(-3, 20, -8);\n vec3 rc = vec3(0, 0, 0);\n vec3 ww = normalize(rc - ro);\n vec3 uu = normalize(cross(vec3(0,1,0), ww));\n vec3 vv = normalize(cross(rc - ro, uu));\n vec3 rd = normalize(uu * v_uv.x + vv * v_uv.y + ww);\n float d = intersect(ro, rd);\n vec3 p = ro + rd * d;\n vec3 n = norm(p);\n float spc = pow(max(0.0, dot(reflect(l1, n), rd)), 30.0);\n return spc;\n}\n\nvoid main() {\n float opacity = u_opacity;\n gl_FragColor = v_Color;\n gl_FragColor.a *= opacity;\n\n float spc = calSpc();\n gl_FragColor += spc * 0.4;\n}\n",triangulation:Bt,primitive:i.gl.TRIANGLES,depth:{enable:!1}});case 2:return e=t.sent,t.abrupt("return",[e]);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"clearModels",value:function(){var t;null===(t=this.texture)||void 0===t||t.destroy()}},{key:"registerBuiltinAttributes",value:function(){var t=this.layer.getSource().extent,e=(0,A.Z)(t,4),n=e[0],r=e[1],o=e[2],a=e[3],s=o-n,u=a-r;this.styleAttributeService.registerStyleAttribute({name:"waterUv",type:i.AttributeType.Attribute,descriptor:{name:"a_uv",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,i,o){var a=t.version===M.G["GAODE2.x"]?t.originCoordinates[0][o]:i,l=(0,A.Z)(a,2),c=l[0],h=l[1];return[(c-n)/s,(h-r)/u]}}})}},{key:"loadTexture",value:function(){var t=this,e=this.layer.getLayerConfig().waterTexture,n=this.rendererService.createTexture2D;this.texture=n({height:0,width:0});var r=new Image;r.crossOrigin="",e?(console.warn("L7 recommend:https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ"),r.src=e):r.src="https://gw.alipayobjects.com/mdn/rms_816329/afts/img/A*EojwT4VzSiYAAAAAAAAAAAAAARQnAQ",r.onload=function(){t.texture=n({data:r,width:r.width,height:r.height,wrapS:i.gl.MIRRORED_REPEAT,wrapT:i.gl.MIRRORED_REPEAT,min:i.gl.LINEAR,mag:i.gl.LINEAR}),t.layerService.reRender()}}}]),f}(H),ocean:sn};var ln=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r 0.0 || x < 0.0) ? x != x : x != 0.0; }\n\n\nvoid main() {\n\n float value = texture2D(u_texture,vec2(v_texCoord.x,v_texCoord.y)).r;\n if (value == u_noDataValue || isnan_emu(value))\n discard;\n else if ((!u_clampLow && value < u_domain[0]) || (!u_clampHigh && value > u_domain[1]))\n discard;\n else {\n float normalisedValue =(value - u_domain[0]) / (u_domain[1] -u_domain[0]);\n vec4 color = texture2D(u_colorTexture,vec2(normalisedValue, 0));\n \n gl_FragColor = color;\n gl_FragColor.a = gl_FragColor.a * u_opacity ;\n if(gl_FragColor.a < 0.01)\n discard;\n \n }\n}\n",triangulation:Gt,primitive:i.gl.TRIANGLES,depth:{enable:!1}});case 12:return l=t.sent,t.abrupt("return",[l]);case 14:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.initModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"clearModels",value:function(){var t,e;null===(t=this.texture)||void 0===t||t.destroy(),null===(e=this.colorTexture)||void 0===e||e.destroy()}},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_Uv",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[3],n[4]]}}})}}]),m}(H),hn=["data"],pn=["rasterData"];var fn=function(t){(0,l.Z)(_,t);var e,n,r,f,y,v=(f=_,y=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}}(),function(){var t,e=(0,h.Z)(f);if(y){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function _(){var t;(0,a.Z)(this,_);for(var e=arguments.length,n=new Array(e),r=0;r u_domain[1])) {\n gl_FragColor = vec4(0.0, 0, 0, 0.0);\n } else {\n \n gl_FragColor = getColor(value);\n gl_FragColor.a = gl_FragColor.a * u_opacity ;\n if(gl_FragColor.a < 0.01)\n discard;\n }\n}\n",triangulation:Gt,primitive:i.gl.TRIANGLES,depth:{enable:!1}});case 8:return o=t.sent,t.abrupt("return",[o]);case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"clearModels",value:function(){var t;null===(t=this.texture)||void 0===t||t.destroy()}},{key:"buildModels",value:(e=(0,o.Z)(d().mark((function t(){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.initModels());case 1:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_Uv",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[3],n[4]]}}})}}]),f}(H)};var mn=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r 1.0) intensity = 0.0;\n\n gl_FragColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity);\n}\n",triangulation:Yt,depth:{enable:!1},blend:this.getBlend()});case 3:return e=t.sent,t.abrupt("return",[e]);case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_Uv",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[3],n[4]]}}})}}]),f}(H);var vn={base:function(t){(0,l.Z)(g,t);var e,n,r,f,m=(r=g,f=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}}(),function(){var t,e=(0,h.Z)(r);if(f){var n=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function g(){var t;(0,a.Z)(this,g);for(var e=arguments.length,n=new Array(e),r=0;r 1.0) intensity = 0.0;\n\n gl_FragColor = vec4(v_Color.rgb, v_Color.a * intensity * u_opacity);\n}\n",triangulation:Xt,depth:{enable:!1},blend:this.getBlend()});case 3:return e=t.sent,t.abrupt("return",[e]);case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"registerBuiltinAttributes",value:function(){this.styleAttributeService.registerStyleAttribute({name:"size",type:i.AttributeType.Attribute,descriptor:{name:"a_Size",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:1,update:function(t){var e=t.size,n=void 0===e?1:e;return Array.isArray(n)?[n[0]]:[n]}}}),this.styleAttributeService.registerStyleAttribute({name:"normal",type:i.AttributeType.Attribute,descriptor:{name:"a_Normal",buffer:{usage:i.gl.STATIC_DRAW,data:[],type:i.gl.FLOAT},size:3,update:function(t,e,n,r,i){return i}}}),this.styleAttributeService.registerStyleAttribute({name:"uv",type:i.AttributeType.Attribute,descriptor:{name:"a_Uv",buffer:{usage:i.gl.DYNAMIC_DRAW,data:[],type:i.gl.FLOAT},size:2,update:function(t,e,n){return[n[3],n[4]]}}})}}]),f}(H)},_n=["base","atomSphere","bloomSphere"],bn=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0])&&this.layerService.clear()}},{key:"registerBuiltinAttributes",value:function(){return""}}]),p}(H)};var wn=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},n=this.layer.getLayerConfig().opacity;this.layerService.beforeRenderData(this.layer),this.layer.hooks.beforeRender.call(),this.layerService.renderMask(this.layer.masks),null===(t=this.colorModel)||void 0===t||t.draw({uniforms:{u_opacity:n||1,u_texture:this.texture},blend:this.getBlend(),stencil:this.getStencil(e)}),this.layer.hooks.afterRender.call()}}]),g}(H)};var Rn,Dn,Nn,Fn,zn,Bn,jn,Un,Zn=function(t){(0,l.Z)(f,t);var e,n,r,i=(n=f,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function f(){var t;(0,a.Z)(this,f);for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};return this.layerModel&&this.layerModel.render(t),this}},{key:"getDefaultConfig",value:function(){return{wind:{}}[this.getModelType()]}},{key:"getModelType",value:function(){return"wind"}}]),f}(V),Vn=(Rn=(0,ae.b2)(),Dn=(0,ae.f3)(i.TYPES.IMapService),Nn=(0,ae.f3)(i.TYPES.IFontService),Rn((zn=function(){function t(){(0,a.Z)(this,t),(0,y.Z)(this,"mapService",Bn,this),(0,y.Z)(this,"fontService",jn,this)}return(0,s.Z)(t,[{key:"apply",value:function(t,e){var n=this,r=e.styleAttributeService;t.hooks.init.tapPromise("DataMappingPlugin",(0,o.Z)(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.log(i.IDebugLog.MappingStart,i.ILayerStage.INIT),n.generateMaping(t,{styleAttributeService:r}),t.log(i.IDebugLog.MappingEnd,i.ILayerStage.INIT);case 3:case"end":return e.stop()}}),e)})))),t.hooks.beforeRenderData.tapPromise("DataMappingPlugin",function(){var e=(0,o.Z)(d().mark((function e(o){var a;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o){e.next=2;break}return e.abrupt("return",o);case 2:return t.dataState.dataMappingNeedUpdate=!1,t.log(i.IDebugLog.MappingStart,i.ILayerStage.UPDATE),a=n.generateMaping(t,{styleAttributeService:r}),t.log(i.IDebugLog.MappingEnd,i.ILayerStage.UPDATE),e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t.hooks.beforeRender.tap("DataMappingPlugin",(function(){var e=t.getSource();if(!t.layerModelNeedUpdate&&e&&e.inited){var i=r.getLayerStyleAttributes()||[],o=r.getLayerStyleAttribute("filter"),a=e.data.dataArray;if(!Array.isArray(a)||0!==a.length){var s=i.filter((function(t){return t.needRemapping})),u=a;if(null!=o&&o.needRemapping&&null!=o&&o.scale&&(u=a.filter((function(t){return n.applyAttributeMapping(o,t)[0]}))),s.length){var l=n.mapping(t,s,u,t.getEncodedData());t.setEncodedData(l)}}}}))}},{key:"generateMaping",value:function(t,e){var n=this,r=e.styleAttributeService,i=r.getLayerStyleAttributes()||[],o=r.getLayerStyleAttribute("filter"),a=t.getSource().data.dataArray,s=a;null!=o&&o.scale&&(s=a.filter((function(t){return n.applyAttributeMapping(o,t)[0]}))),s=t.processData(s);var u=this.mapping(t,i,s,void 0);return t.setEncodedData(u),(0!==a.length||0!==t.encodeDataLength)&&(t.emit("dataUpdate",null),!0)}},{key:"mapping",value:function(t,e,n,r){var i=this,o=t.getLayerConfig().arrow,a=void 0===o?{enable:!1}:o,s=e.filter((function(t){return void 0!==t.scale})).filter((function(t){return"filter"!==t.name})),u=n.map((function(e,n){var o=r?r[n]:{},u=(0,g.Z)({id:e._id,coordinates:e.coordinates},o);if(s.forEach((function(t){var n=i.applyAttributeMapping(t,e);"color"!==t.name&&"stroke"!==t.name||(n=n.map((function(t){return(0,x.rgb2arr)(t)}))),u[t.name]=Array.isArray(n)&&1===n.length?n[0]:n,"shape"===t.name&&(u.shape=i.fontService.getIconFontKey(u[t.name]))})),a.enable&&"line"===u.shape){var l=u.coordinates;if(t.arrowInsertCount0&&this.mapService.version===M.G["GAODE2.x"]){var r=e.coordCenter||e.getSource().center;t.filter((function(t){return!t.originCoordinates})).map((function(t){t.version=M.G["GAODE2.x"],t.originCoordinates=(0,S.cloneDeep)(t.coordinates),t.coordinates=n.mapService.coordToAMap2RelativeCoordinates(t.coordinates,r)}))}}},{key:"adjustData2SimpleCoordinates",value:function(t){var e=this;t.length>0&&this.mapService.version===M.G.SIMPLE&&t.map((function(t){t.simpleCoordinate||(t.coordinates=e.unProjectCoordinates(t.coordinates),t.simpleCoordinate=!0)}))}},{key:"unProjectCoordinates",value:function(t){var e=this;if("number"==typeof t[0])return this.mapService.simpleMapCoord.unproject(t);if(t[0]&&t[0][0]instanceof Array){var n=[];return t.map((function(t){var r=[];t.map((function(t){r.push(e.mapService.simpleMapCoord.unproject(t))})),n.push(r)})),n}var r=[];return t.map((function(t){r.push(e.mapService.simpleMapCoord.unproject(t))})),r}},{key:"applyAttributeMapping",value:function(t,e){var n;if(!t.scale)return[];var r=(null==t||null===(n=t.scale)||void 0===n?void 0:n.scalers)||[],i=[];return r.forEach((function(n){var r,o=n.field;(e.hasOwnProperty(o)||"variable"===(null===(r=t.scale)||void 0===r?void 0:r.type))&&i.push(e[o])})),t.mapping?t.mapping(i):[]}},{key:"getArrowPoints",value:function(t,e){var n=[e[0]-t[0],e[1]-t[1]],r=(0,x.normalize)(n);return[t[0]+1e-4*r[0],t[1]+1e-4*r[1]]}}]),t}(),Bn=(0,v.Z)(zn.prototype,"mapService",[Dn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),jn=(0,v.Z)(zn.prototype,"fontService",[Nn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Fn=zn))||Fn),Gn=(0,ae.b2)()(Un=function(){function t(){(0,a.Z)(this,t)}return(0,s.Z)(t,[{key:"apply",value:function(t){var e=this;this.mapService=t.getContainer().get(i.TYPES.IMapService),t.hooks.init.tapPromise("DataSourcePlugin",(0,o.Z)(d().mark((function n(){var r,o,a,s;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(t.log(i.IDebugLog.SourceInitStart,i.ILayerStage.INIT),(r=t.getSource())||(o=t.sourceOption||t.defaultSourceConfig,a=o.data,s=o.options,r=new b.default(a,s),t.setSource(r)),!r.inited){n.next=8;break}e.updateClusterData(t),t.log(i.IDebugLog.SourceInitEnd,i.ILayerStage.INIT),n.next=10;break;case 8:return n.next=10,new Promise((function(n){r.on("update",(function(r){"inited"===r.type&&(e.updateClusterData(t),t.log(i.IDebugLog.SourceInitEnd,i.ILayerStage.INIT)),n(null)}))}));case 10:case"end":return n.stop()}}),n)})))),t.hooks.beforeRenderData.tapPromise("DataSourcePlugin",(0,o.Z)(d().mark((function n(){var r,i,o;return d().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.updateClusterData(t),i=t.dataState.dataSourceNeedUpdate,t.dataState.dataSourceNeedUpdate=!1,o=r||i,n.abrupt("return",o);case 5:case"end":return n.stop()}}),n)}))))}},{key:"updateClusterData",value:function(t){if(t.isTileLayer||t.tileLayer||!t.getSource())return!1;var e=t.getSource(),n=e.cluster,r=e.clusterOptions.zoom,i=void 0===r?0:r,o=this.mapService.getZoom()-1,a=t.dataState.dataSourceNeedUpdate;return n&&a&&e.updateClusterData(Math.floor(o)),!!(n&&Math.abs(t.clusterZoom-o)>=1)&&(i!==Math.floor(o)&&e.updateClusterData(Math.floor(o)),t.clusterZoom=o,!0)}}]),t}())||Un,Hn=n(937),Wn=n(4537);function qn(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}function Yn(t){return function(){return t}}function Xn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Yn(isNaN(t)?e:t)}const $n=function t(e){var n=function(t){return 1==(t=+t)?Xn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Yn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=(0,Wn.B8)(t)).r,(e=(0,Wn.B8)(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Xn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Kn(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=ro&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:dr(n,r)})),o=yr.lastIndex;return or&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Ar(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i2?Cr:Ar,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),dr)))(n)))},h.domain=function(t){return arguments.length?(a=ar.call(t,wr),l===Er||(l=Tr(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=sr.call(t),c()):s.slice()},h.rangeRound=function(t){return s=sr.call(t),u=xr,c()},h.clamp=function(t){return arguments.length?(l=t?Tr(a):Er,h):l!==Er},h.interpolate=function(t){return arguments.length?(u=t,c()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,c()}}function kr(t,e){return Pr()(t,e)}var Lr,Ir=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rr(t){if(!(e=Ir.exec(t)))throw new Error("invalid format: "+t);var e;return new Dr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Dr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Nr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Fr(t){return(t=Nr(Math.abs(t)))?t[1]:NaN}function zr(t,e){var n=Nr(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Rr.prototype=Dr.prototype,Dr.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};const Br={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return zr(100*t,e)},r:zr,s:function(t,e){var n=Nr(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Lr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Nr(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function jr(t){return t}var Ur,Zr,Vr,Gr=Array.prototype.map,Hr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Wr(t){var e=t.domain;return t.ticks=function(t){var n=e();return(0,Hn.sd)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,o=(0,Hn.ly)(t,e,n);switch((r=Rr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fr(e)/3)))-Fr(Math.abs(t)))}(o,a))||(r.precision=i),Vr(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Fr(e)-Fr(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Fr(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return Zr(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u0?(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,r=(0,Hn.G9)(s,u,n)):r<0&&(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,r=(0,Hn.G9)(s,u,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function qr(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?jr:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Gr.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",l=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Rr(t)).fill,n=t.align,h=t.sign,p=t.symbol,f=t.zero,d=t.width,m=t.comma,g=t.precision,y=t.trim,v=t.type;"n"===v?(m=!0,v="g"):Br[v]||(void 0===g&&(g=12),y=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var _="$"===p?i:"#"===p&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===p?o:/[%p]/.test(v)?u:"",x=Br[v],w=/[defgprs%]/.test(v);function S(t){var i,o,u,p=_,S=b;if("c"===v)S=x(t)+S,t="";else{var E=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&"+"!==h&&(E=!1),p=(E?"("===h?h:l:"-"===h||"("===h?"":h)+p,S=("s"===v?Hr[8+Lr/3]:"")+S+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i(u=t.charCodeAt(i))||u>57){S=(46===u?a+t.slice(i+1):t.slice(i))+S,t=t.slice(0,i);break}}m&&!f&&(t=r(t,1/0));var M=p.length+t.length+S.length,T=M>1)+p+t+S+T.slice(M);break;default:t=T+p+t+S}return s(t)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),S.toString=function(){return t+""},S}return{format:h,formatPrefix:function(t,e){var n=h(((t=Rr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Fr(e)/3))),i=Math.pow(10,-r),o=Hr[8+r/3];return function(t){return n(i*t)+o}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Zr=Ur.format,Vr=Ur.formatPrefix;var ri=new Date,ii=new Date;function oi(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return ri.setTime(+e),ii.setTime(+r),t(ri),t(ii),Math.floor(n(ri,ii))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var ai=oi((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));ai.every=function(t){return isFinite(t=Math.floor(t))&&t>0?oi((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const si=ai;ai.range;var ui=oi((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const li=ui;ui.range;var ci=1e3,hi=6e4,pi=36e5,fi=864e5,di=6048e5;function mi(t){return oi((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*hi)/di}))}var gi=mi(0),yi=mi(1),vi=mi(2),_i=mi(3),bi=mi(4),xi=mi(5),wi=mi(6),Si=(gi.range,yi.range,vi.range,_i.range,bi.range,xi.range,wi.range,oi((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*hi)/fi}),(function(t){return t.getDate()-1})));const Ei=Si;Si.range;var Mi=oi((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ci-t.getMinutes()*hi)}),(function(t,e){t.setTime(+t+e*pi)}),(function(t,e){return(e-t)/pi}),(function(t){return t.getHours()}));const Ti=Mi;Mi.range;var Ai=oi((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ci)}),(function(t,e){t.setTime(+t+e*hi)}),(function(t,e){return(e-t)/hi}),(function(t){return t.getMinutes()}));const Ci=Ai;Ai.range;var Oi=oi((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*ci)}),(function(t,e){return(e-t)/ci}),(function(t){return t.getUTCSeconds()}));const Pi=Oi;Oi.range;var ki=oi((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));ki.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?oi((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):ki:null};const Li=ki;function Ii(t){return oi((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/di}))}ki.range;var Ri=Ii(0),Di=Ii(1),Ni=Ii(2),Fi=Ii(3),zi=Ii(4),Bi=Ii(5),ji=Ii(6),Ui=(Ri.range,Di.range,Ni.range,Fi.range,zi.range,Bi.range,ji.range,oi((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/fi}),(function(t){return t.getUTCDate()-1})));const Zi=Ui;Ui.range;var Vi=oi((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Vi.every=function(t){return isFinite(t=Math.floor(t))&&t>0?oi((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const Gi=Vi;function Hi(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Wi(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function qi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Vi.range;var Yi,Xi,$i={"-":"",_:" ",0:"0"},Ki=/^\s*\d+/,Ji=/^%/,Qi=/[\\^$*+?|[\]().{}]/g;function to(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function ho(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function po(t,e,n){var r=Ki.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function fo(t,e,n){var r=Ki.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function mo(t,e,n){var r=Ki.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function go(t,e,n){var r=Ki.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function yo(t,e,n){var r=Ki.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function vo(t,e,n){var r=Ki.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function _o(t,e,n){var r=Ki.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function bo(t,e,n){var r=Ki.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function xo(t,e,n){var r=Ki.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wo(t,e,n){var r=Ji.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function So(t,e,n){var r=Ki.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Eo(t,e,n){var r=Ki.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Mo(t,e){return to(t.getDate(),e,2)}function To(t,e){return to(t.getHours(),e,2)}function Ao(t,e){return to(t.getHours()%12||12,e,2)}function Co(t,e){return to(1+Ei.count(si(t),t),e,3)}function Oo(t,e){return to(t.getMilliseconds(),e,3)}function Po(t,e){return Oo(t,e)+"000"}function ko(t,e){return to(t.getMonth()+1,e,2)}function Lo(t,e){return to(t.getMinutes(),e,2)}function Io(t,e){return to(t.getSeconds(),e,2)}function Ro(t){var e=t.getDay();return 0===e?7:e}function Do(t,e){return to(gi.count(si(t)-1,t),e,2)}function No(t){var e=t.getDay();return e>=4||0===e?bi(t):bi.ceil(t)}function Fo(t,e){return t=No(t),to(bi.count(si(t),t)+(4===si(t).getDay()),e,2)}function zo(t){return t.getDay()}function Bo(t,e){return to(yi.count(si(t)-1,t),e,2)}function jo(t,e){return to(t.getFullYear()%100,e,2)}function Uo(t,e){return to((t=No(t)).getFullYear()%100,e,2)}function Zo(t,e){return to(t.getFullYear()%1e4,e,4)}function Vo(t,e){var n=t.getDay();return to((t=n>=4||0===n?bi(t):bi.ceil(t)).getFullYear()%1e4,e,4)}function Go(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+to(e/60|0,"0",2)+to(e%60,"0",2)}function Ho(t,e){return to(t.getUTCDate(),e,2)}function Wo(t,e){return to(t.getUTCHours(),e,2)}function qo(t,e){return to(t.getUTCHours()%12||12,e,2)}function Yo(t,e){return to(1+Zi.count(Gi(t),t),e,3)}function Xo(t,e){return to(t.getUTCMilliseconds(),e,3)}function $o(t,e){return Xo(t,e)+"000"}function Ko(t,e){return to(t.getUTCMonth()+1,e,2)}function Jo(t,e){return to(t.getUTCMinutes(),e,2)}function Qo(t,e){return to(t.getUTCSeconds(),e,2)}function ta(t){var e=t.getUTCDay();return 0===e?7:e}function ea(t,e){return to(Ri.count(Gi(t)-1,t),e,2)}function na(t){var e=t.getUTCDay();return e>=4||0===e?zi(t):zi.ceil(t)}function ra(t,e){return t=na(t),to(zi.count(Gi(t),t)+(4===Gi(t).getUTCDay()),e,2)}function ia(t){return t.getUTCDay()}function oa(t,e){return to(Di.count(Gi(t)-1,t),e,2)}function aa(t,e){return to(t.getUTCFullYear()%100,e,2)}function sa(t,e){return to((t=na(t)).getUTCFullYear()%100,e,2)}function ua(t,e){return to(t.getUTCFullYear()%1e4,e,4)}function la(t,e){var n=t.getUTCDay();return to((t=n>=4||0===n?zi(t):zi.ceil(t)).getUTCFullYear()%1e4,e,4)}function ca(){return"+0000"}function ha(){return"%"}function pa(t){return+t}function fa(t){return Math.floor(+t/1e3)}Yi=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,s=t.months,u=t.shortMonths,l=no(i),c=ro(i),h=no(o),p=ro(o),f=no(a),d=ro(a),m=no(s),g=ro(s),y=no(u),v=ro(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Mo,e:Mo,f:Po,g:Uo,G:Vo,H:To,I:Ao,j:Co,L:Oo,m:ko,M:Lo,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:pa,s:fa,S:Io,u:Ro,U:Do,V:Fo,w:zo,W:Bo,x:null,X:null,y:jo,Y:Zo,Z:Go,"%":ha},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ho,e:Ho,f:$o,g:sa,G:la,H:Wo,I:qo,j:Yo,L:Xo,m:Ko,M:Jo,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:pa,s:fa,S:Qo,u:ta,U:ea,V:ra,w:ia,W:oa,x:null,X:null,y:aa,Y:ua,Z:ca,"%":ha},x={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:mo,e:mo,f:xo,g:co,G:lo,H:yo,I:yo,j:go,L:bo,m:fo,M:vo,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:po,Q:So,s:Eo,S:_o,u:oo,U:ao,V:so,w:io,W:uo,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:co,Y:lo,Z:ho,"%":wo};function w(t,e){return function(n){var r,i,o,a=[],s=-1,u=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Wi(qi(o.y,0,1))).getUTCDay(),r=i>4||0===i?Di.ceil(r):Di(r),r=Zi.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Hi(qi(o.y,0,1))).getDay(),r=i>4||0===i?yi.ceil(r):yi(r),r=Ei.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Wi(qi(o.y,0,1)).getUTCDay():Hi(qi(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Wi(o)):Hi(o)}}function E(t,e,n,r){for(var i,o,a=0,s=e.length,u=n.length;a=u)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in $i?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return _.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=S(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=S(t+="",!0);return e.toString=function(){return t},e}}}({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"]}),Xi=Yi.format,Yi.parse,Yi.utcFormat,Yi.utcParse;var da,ma,ga=1e3,ya=6e4,va=36e5,_a=864e5,ba=2592e6,xa=31536e6;function wa(t){return new Date(t)}function Sa(t){return t instanceof Date?+t:+new Date(+t)}function Ea(t,e,n,r,i,o,a,s,u){var l=kr(Er,Er),c=l.invert,h=l.domain,p=u(".%L"),f=u(":%S"),d=u("%I:%M"),m=u("%I %p"),g=u("%a %d"),y=u("%b %d"),v=u("%B"),_=u("%Y"),b=[[a,1,ga],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,ya],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,va],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,_a],[r,2,1728e5],[n,1,6048e5],[e,1,ba],[e,3,7776e6],[t,1,xa]];function x(s){return(a(s)0){for(;pu)break;m.push(h)}}else for(;p=1;--c)if(!((h=l*c)u)break;m.push(h)}}else m=(0,Hn.sd)(p,f,Math.min(f-p,d)).map(n);return r?m.reverse():m},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=Zr(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o0?i[e-1]:n[0],e=i?[o[i-1],r]:[o[e-1],o[e]]},s.unknown=function(t){return arguments.length?(e=t,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return t().domain([n,r]).range(a).unknown(e)},ur.apply(Wr(s),arguments)})),(0,p.Z)(da,i.ScaleTypes.THRESHOLD,(function t(){var e,n=[.5],r=[0,1],i=1;function o(t){return t<=t?r[(0,Hn.b4)(n,t,0,i)]:e}return o.domain=function(t){return arguments.length?(n=sr.call(t),i=Math.min(n.length,r.length-1),o):n.slice()},o.range=function(t){return arguments.length?(r=sr.call(t),i=Math.min(n.length,r.length-1),o):r.slice()},o.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return t().domain(n).range(r).unknown(e)},ur.apply(o,arguments)})),(0,p.Z)(da,i.ScaleTypes.CAT,hr),(0,p.Z)(da,i.ScaleTypes.DIVERGING,(function t(){var e=Wr(function(){var t,e,n,r,i,o,a,s=0,u=.5,l=1,c=Er,h=!1;function p(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-e)*(t2){var o=t.scale.ticks(r.values.length);t.scale.domain(o)}r.values?t.scale.range(r.values):t.scale.range(t.option.domain);break;case i.ScaleTypes.QUANTILE:case i.ScaleTypes.QUANTIZE:case i.ScaleTypes.THRESHOLD:t.scale.range(r.values);break;case i.ScaleTypes.IDENTITY:break;case i.ScaleTypes.CAT:r.values?t.scale.range(r.values):t.scale.range(t.option.domain);break;case i.ScaleTypes.DIVERGING:case i.ScaleTypes.SEQUENTIAL:t.scale.interpolator(Jn(r.values))}"text"===r.values&&t.scale.range(null===(n=t.option)||void 0===n?void 0:n.domain)}))):(r.type=i.StyleScaleType.CONSTANT,r.defaultValues=o.map((function(t,e){return t.scale(r.names[e])}))),r.scalers=o.map((function(t){return{field:t.field,func:t.scale,option:t.option}})),t.needRescale=!1}}))}},{key:"parseFields",value:function(t){return Array.isArray(t)?t:(0,S.isString)(t)?t.split("*"):[t]}},{key:"createScale",value:function(t,e,n,r){var o,a,s=this.scaleOptions[e]&&(null===(o=this.scaleOptions[e])||void 0===o?void 0:o.field)===t?this.scaleOptions[e]:this.scaleOptions[t],u={field:t,scale:void 0,type:i.StyleScaleType.VARIABLE,option:s};if(!r||!r.length)return s&&s.type?u.scale=this.createDefaultScale(s):(u.scale=hr([t]),u.type=i.StyleScaleType.CONSTANT),u;var l=null===(a=r.find((function(e){return!(0,S.isNil)(e[t])})))||void 0===a?void 0:a[t];if(this.isNumber(t)||(0,S.isNil)(l)&&!s)u.scale=hr([t]),u.type=i.StyleScaleType.CONSTANT;else{var c=s&&s.type||this.getDefaultType(l);"text"===n&&(c=i.ScaleTypes.CAT);var h=this.createScaleConfig(c,t,s,r);u.scale=this.createDefaultScale(h),u.option=h}return u}},{key:"getDefaultType",value:function(t){var e=i.ScaleTypes.LINEAR;return"string"==typeof t&&(e=Ca.test(t)?i.ScaleTypes.TIME:i.ScaleTypes.CAT),e}},{key:"createScaleConfig",value:function(t,e,n,r){var o={type:t},a=(null==r?void 0:r.map((function(t){return t[e]})))||[];if(null!=n&&n.domain)o.domain=null==n?void 0:n.domain;else if(t===i.ScaleTypes.CAT||t===i.ScaleTypes.IDENTITY)o.domain=(0,S.uniq)(a);else if(t===i.ScaleTypes.QUANTILE)o.domain=a;else if(t===i.ScaleTypes.DIVERGING){var s=(0,Hn.We)(a),u=void 0!==(null==n?void 0:n.neutral)?null==n?void 0:n.neutral:(s[0]+s[1])/2;o.domain=[s[0],u,s[1]]}else o.domain=(0,Hn.We)(a);return(0,g.Z)((0,g.Z)({},o),n)}},{key:"createDefaultScale",value:function(t){var e=t.type,n=t.domain,r=t.unknown,i=t.clamp,o=t.nice,a=Oa[e]();return n&&a.domain&&a.domain(n),r&&a.unknown(r),void 0!==i&&a.clamp&&a.clamp(i),void 0!==o&&a.nice&&a.nice(o),a}}]),t}())||ma,ka=(0,ae.b2)()(Ta=function(){function t(){(0,a.Z)(this,t)}return(0,s.Z)(t,[{key:"apply",value:function(t){t.hooks.beforeRender.tap("LayerAnimateStylePlugin",(function(){t.animateStatus&&t.models.forEach((function(e){e.addUniforms((0,g.Z)({},t.layerModel.getAnimateUniforms()))}))}))}}]),t}())||Ta,La=(0,ae.b2)()(Aa=function(){function t(){(0,a.Z)(this,t)}return(0,s.Z)(t,[{key:"apply",value:function(t){t.hooks.afterInit.tap("LayerMaskPlugin",(function(){var e,n=t.getLayerConfig(),r=n.maskLayers,i=n.enableMask;!t.tileLayer&&r&&r.length>0&&((e=t.masks).push.apply(e,(0,Q.Z)(r)),t.updateLayerConfig({mask:i}))}))}}]),t}())||Aa,Ia=function(){function t(e){var n=e.rendererService,r=e.layerService,i=e.parent;(0,a.Z)(this,t),(0,p.Z)(this,"tileResource",new Map),(0,p.Z)(this,"layerTiles",[]),this.rendererService=n,this.layerService=r,this.parent=i}var e;return(0,s.Z)(t,[{key:"tiles",get:function(){return this.layerTiles}},{key:"hasTile",value:function(t){return this.layerTiles.some((function(e){return e.key===t}))}},{key:"addTile",value:function(t){this.layerTiles.push(t)}},{key:"getTile",value:function(t){return this.layerTiles.find((function(e){return e.key===t}))}},{key:"getVisibleTileBylngLat",value:function(t){return this.layerTiles.find((function(e){return e.isLoaded&&e.visible&&e.lnglatInBounds(t)}))}},{key:"removeTile",value:function(t){var e=this.layerTiles.findIndex((function(e){return e.key===t})),n=this.layerTiles.splice(e,1);n[0]&&n[0].destroy()}},{key:"updateTileVisible",value:function(t){var e=this.getTile(t.key);null==e||e.updateVisible(t.isVisible)}},{key:"isParentLoaded",value:function(t){var e=t.parent;if(!e)return!0;var n=this.getTile(null==e?void 0:e.key);return!(null==n||!n.isLoaded)}},{key:"isChildrenLoaded",value:function(t){var e=this,n=null==t?void 0:t.children;return 0===n.length||n.some((function(t){var n=e.getTile(null==t?void 0:t.key);return!1===(null==n?void 0:n.isLoaded)}))}},{key:"render",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r=this;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getRenderLayers(),n=e.map(function(){var t=(0,o.Z)(d().mark((function t(e){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.layerService.renderTileLayer(e);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.next=4,Promise.all(n);case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getRenderLayers",value:function(){var t=this.layerTiles.filter((function(t){return t.visible&&t.isLoaded})),e=[];return t.map((function(t){return e.push.apply(e,(0,Q.Z)(t.getLayers()))})),e}},{key:"getLayers",value:function(){var t=this.layerTiles.filter((function(t){return t.isLoaded})),e=[];return t.map((function(t){return e.push.apply(e,(0,Q.Z)(t.getLayers()))})),e}},{key:"getTiles",value:function(){return this.layerTiles}},{key:"destroy",value:function(){this.layerTiles.forEach((function(t){return t.destroy()})),this.tileResource.clear()}}]),t}(),Ra=n(3959),Da=n(9349),Na=function(){function t(){(0,a.Z)(this,t)}return(0,s.Z)(t,[{key:"getCombineFeature",value:function(t){var e=null,n=t[0];return t.map((function(t){var n=Ra.yu(t.coordinates);e=null===e?n:(0,Da.Z)(e,n)})),n&&(e.properties=(0,g.Z)({},n)),e}}]),t}(),Fa="select",za="active",Ba=function(){function t(e){var n=e.layerService,r=e.tileLayerService,i=e.parent;(0,a.Z)(this,t),(0,p.Z)(this,"tilePickID",new Map),this.layerService=n,this.tileLayerService=r,this.parent=i,this.tileSourceService=new Na}return(0,s.Z)(t,[{key:"pickRender",value:function(t){var e=this.tileLayerService.getVisibleTileBylngLat(t.lngLat);if(e){var n=e.getMainLayer();null==n||n.layerPickService.pickRender(t)}}},{key:"pick",value:function(t,e){var n=this.parent.getContainer().get(i.TYPES.IPickingService);if("RasterLayer"===t.type){var r=this.tileLayerService.getVisibleTileBylngLat(e.lngLat);if(r&&void 0!==r.getMainLayer()){var o=r.getMainLayer();return o.layerPickService.pickRasterLayer(o,e,this.parent)}return!1}return this.pickRender(e),n.pickFromPickingFBO(t,e)}},{key:"selectFeature",value:function(t){var e=(0,A.Z)(t,3),n=e[0],r=e[1],i=e[2],o=this.color2PickId(n,r,i);this.tilePickID.set(Fa,o),this.updateHighLight(n,r,i,Fa)}},{key:"highlightPickedFeature",value:function(t){var e=(0,A.Z)(t,3),n=e[0],r=e[1],i=e[2],o=this.color2PickId(n,r,i);this.tilePickID.set(za,o),this.updateHighLight(n,r,i,za)}},{key:"updateHighLight",value:function(t,e,n,r){this.tileLayerService.tiles.map((function(i){var o=i.getMainLayer();switch(r){case Fa:null==o||o.hooks.beforeSelect.call([t,e,n]);break;case za:null==o||o.hooks.beforeHighlight.call([t,e,n])}}))}},{key:"setPickState",value:function(){var t=this.tilePickID.get(Fa),e=this.tilePickID.get(za);if(t){var n=this.pickId2Color(t),r=(0,A.Z)(n,3),i=r[0],o=r[1],a=r[2];this.updateHighLight(i,o,a,Fa)}else if(e){var s=this.pickId2Color(e),u=(0,A.Z)(s,3),l=u[0],c=u[1],h=u[2];this.updateHighLight(l,c,h,za)}}},{key:"color2PickId",value:function(t,e,n){return(0,x.decodePickingColor)(new Uint8Array([t,e,n]))}},{key:"pickId2Color",value:function(t){return(0,x.encodePickingColor)(t)}},{key:"getFeatureById",value:function(t){var e=this.tileLayerService.getTiles().filter((function(t){return t.visible})),n=[];return e.forEach((function(e){n.push.apply(n,(0,Q.Z)(e.getFeatureById(t)))})),n}},{key:"pickRasterLayer",value:function(t,e,n){return!1}}]),t}(),ja=["shape","color","size","style","animate","filter","rotate","scale","setBlend","setSelect","setActive","disableMask","enableMask"],Ua=function(){function t(e,n){(0,a.Z)(this,t),(0,p.Z)(this,"visible",!0),(0,p.Z)(this,"layers",[]),(0,p.Z)(this,"isLoaded",!1),(0,p.Z)(this,"tileMaskLayers",[]),this.parent=n,this.sourceTile=e,this.x=e.x,this.y=e.y,this.z=e.z,this.key="".concat(this.x,"_").concat(this.y,"_").concat(this.z)}var e,n,r;return(0,s.Z)(t,[{key:"getLayers",value:function(){return this.layers}},{key:"styleUpdate",value:function(){}},{key:"lnglatInBounds",value:function(t){var e=(0,A.Z)(this.sourceTile.bounds,4),n=e[0],r=e[1],i=e[2],o=e[3],a=t.lng,s=t.lat;return a>=n&&a<=i&&s>=r&&s<=o}},{key:"getLayerOptions",value:function(){var t,e,n=this.parent.getLayerConfig();return(0,g.Z)((0,g.Z)({},n),{},{textAllowOverlap:!0,autoFit:!1,maskLayers:this.getMaskLayer(),tileMask:(e=this.parent.type,-1!==["PolygonLayer","LineLayer"].indexOf(e)),mask:n.mask||0!==(null===(t=n.maskLayers)||void 0===t?void 0:t.length)&&n.enableMask})}},{key:"getMaskLayer",value:function(){var t=this,e=this.parent.getLayerConfig().maskLayers,n=[];return null==e||e.forEach((function(e){if(!e.tileLayer)return n.push(e),e;var r=e.tileLayer.getTile(t.sourceTile.key),i=null==r?void 0:r.getLayers()[0];i&&n.push(i)})),n}},{key:"addTileMask",value:(r=(0,o.Z)(d().mark((function t(){var e,n,r;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new ln({visible:!1,enablePicking:!1}).source({type:"FeatureCollection",features:[this.sourceTile.bboxPolygon]},{parser:{type:"geojson",featureId:"id"}}).shape("fill"),n=(0,i.createLayerContainer)(this.parent.sceneContainer),e.setContainer(n,this.parent.sceneContainer),t.next=5,e.init();case 5:return this.tileMask=e,void 0!==(r=this.getMainLayer())&&(r.tileMask=e),t.abrupt("return",e);case 9:case"end":return t.stop()}}),t,this)}))),function(){return r.apply(this,arguments)})},{key:"addMask",value:(n=(0,o.Z)(d().mark((function t(e,n){var r;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=(0,i.createLayerContainer)(this.parent.sceneContainer),n.setContainer(r,this.parent.sceneContainer),t.next=4,n.init();case 4:e.addMask(n),this.tileMaskLayers.push(n);case 6:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"addLayer",value:(e=(0,o.Z)(d().mark((function t(e){var n;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.isTileLayer=!0,n=(0,i.createLayerContainer)(this.parent.sceneContainer),e.setContainer(n,this.parent.sceneContainer),this.layers.push(e),t.next=6,e.init();case 6:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"updateVisible",value:function(t){this.visible=t,this.updateOptions("visible",t)}},{key:"updateOptions",value:function(t,e){this.layers.forEach((function(n){n.updateLayerConfig((0,p.Z)({},t,e))}))}},{key:"getMainLayer",value:function(){return this.layers[0]}},{key:"getFeatures",value:function(t){return[]}},{key:"getFeatureById",value:function(t){return[]}},{key:"destroy",value:function(){var t;null===(t=this.tileMask)||void 0===t||t.destroy(),this.layers.forEach((function(t){return t.destroy()}))}}]),t}();var Za=function(t){(0,l.Z)(u,t);var e,n,r,i=(n=u,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function u(){return(0,a.Z)(this,u),i.apply(this,arguments)}return(0,s.Z)(u,[{key:"initTileLayer",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getSourceOption(),n=e.data.features[0].properties,r=(new Ce).source(e.data,e.options).size(1).shape("line").color("red"),i=new rn({minZoom:this.z-1,maxZoom:this.z+1,textAllowOverlap:!0}).source([n],{parser:{type:"json",x:"x",y:"y"}}).size(20).color("red").shape(this.key).style({stroke:"#fff",strokeWidth:2}),t.next=6,this.addLayer(r);case 6:return t.next=8,this.addLayer(i);case 8:this.isLoaded=!0;case 9:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getSourceOption",value:function(){var t=this.parent.getSource();return{data:{type:"FeatureCollection",features:this.sourceTile.data.layers.testTile.features},options:{parser:{type:"geojson"},transforms:t.transforms}}}}]),u}(Ua);var Va=function(t){(0,l.Z)(u,t);var e,n,r,i=(n=u,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function u(){return(0,a.Z)(this,u),i.apply(this,arguments)}return(0,s.Z)(u,[{key:"initTileLayer",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.parent.getLayerAttributeConfig(),n=this.getLayerOptions(),r=this.getSourceOption(),i=new he((0,g.Z)({},n)).source(r.data,r.options),e&&Object.keys(e).forEach((function(t){var n,r,o=t;i[o](null===(n=e[o])||void 0===n?void 0:n.field,null===(r=e[o])||void 0===r?void 0:r.values)})),t.next=7,this.addLayer(i);case 7:this.isLoaded=!0;case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getSourceOption",value:function(){var t=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:t.transforms}}}}]),u}(Ua);var Ga=function(t){(0,l.Z)(u,t);var e,n,r,i=(n=u,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function u(){return(0,a.Z)(this,u),i.apply(this,arguments)}return(0,s.Z)(u,[{key:"initTileLayer",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.parent.getLayerAttributeConfig(),n=this.getLayerOptions(),r=this.getSourceOption(),i=new wn((0,g.Z)({},n)).source(r.data,r.options),e&&Object.keys(e).forEach((function(t){var n,r,o=t;i[o](null===(n=e[o])||void 0===n?void 0:n.field,null===(r=e[o])||void 0===r?void 0:r.values)})),t.next=7,this.addLayer(i);case 7:this.isLoaded=!0;case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getFeatures",value:function(t){return t?this.sourceTile.data.getTileData(t):[]}},{key:"getSourceOption",value:function(){var t=this.parent.getSource(),e=this.parent.getLayerConfig(),n=e.sourceLayer,r=e.featureId;return{data:{type:"FeatureCollection",features:this.getFeatures(n)},options:{parser:{type:"geojson",featureId:r},transforms:t.transforms}}}}]),u}(Ua),Ha=["rasterData"];var Wa=function(t){(0,l.Z)(u,t);var e,n,r,i=(n=u,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function u(){return(0,a.Z)(this,u),i.apply(this,arguments)}return(0,s.Z)(u,[{key:"initTileLayer",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.parent.getLayerAttributeConfig(),n=this.getLayerOptions(),r=this.getSourceOption(),i=new mn((0,g.Z)({},n)).source(r.data,r.options),e&&Object.keys(e).forEach((function(t){var n,r,o=t;i[o](null===(n=e[o])||void 0===n?void 0:n.field,null===(r=e[o])||void 0===r?void 0:r.values)})),t.next=7,this.addLayer(i);case 7:this.isLoaded=!0;case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getSourceOption",value:function(){var t=this.parent.getSource(),e=this.sourceTile.data.data,n=e.rasterData,r=(0,m.Z)(e,Ha);return{data:n,options:{parser:(0,g.Z)({type:"rasterRgb",extent:this.sourceTile.bounds},r),transforms:t.transforms}}}}]),u}(Ua);var qa=function(t){(0,l.Z)(u,t);var e,n,r,i=(n=u,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function u(){return(0,a.Z)(this,u),i.apply(this,arguments)}return(0,s.Z)(u,[{key:"initTileLayer",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.parent.getLayerAttributeConfig(),n=this.getLayerOptions(),r=this.getSourceOption(),i=new mn((0,g.Z)({},n)).source(r.data,r.options),e&&Object.keys(e).forEach((function(t){var n,r,o=t;i[o](null===(n=e[o])||void 0===n?void 0:n.field,null===(r=e[o])||void 0===r?void 0:r.values)})),t.next=7,this.addLayer(i);case 7:this.isLoaded=!0;case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getSourceOption",value:function(){var t=this.parent.getSource();return{data:this.sourceTile.data,options:{parser:{type:"image",extent:this.sourceTile.bounds},transforms:t.transforms}}}}]),u}(Ua),Ya=["rasterData"];var Xa={positions:[0,1],colors:["#000","#fff"]},$a=function(t){(0,l.Z)(u,t);var e,n,r,i=(n=u,r=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}}(),function(){var t,e=(0,h.Z)(n);if(r){var i=(0,h.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,c.Z)(this,t)});function u(){return(0,a.Z)(this,u),i.apply(this,arguments)}return(0,s.Z)(u,[{key:"initTileLayer",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r,i,o,a,s;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.parent.getLayerAttributeConfig(),n=this.getLayerOptions(),r=this.getSourceOption(),i=this.getLayerOptions(),o=i.rampColors,a=i.domain,this.colorTexture=this.parent.textureService.getColorTexture(o,a),s=new mn((0,g.Z)((0,g.Z)({},n),{},{colorTexture:this.colorTexture})).source(r.data,r.options),e&&Object.keys(e).forEach((function(t){var n,r,i=t;s[i](null===(n=e[i])||void 0===n?void 0:n.field,null===(r=e[i])||void 0===r?void 0:r.values)})),t.next=9,this.addLayer(s);case 9:this.isLoaded=!0;case 10:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getSourceOption",value:function(){var t=this.parent.getSource(),e=this.sourceTile.data.data,n=e.rasterData,r=(0,m.Z)(e,Ya);return{data:n,options:{parser:(0,g.Z)({type:"raster",extent:this.sourceTile.bounds},r),transforms:t.transforms}}}},{key:"styleUpdate",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r=2&&!o&&(n.parent.updateLayerConfig({visible:!0}),n.layerService.reRender())}n.lastViewStates&&n.lastViewStates.zoom===i&&n.lastViewStates.latLonBounds.toString()===r.toString()||(n.lastViewStates={zoom:i,latLonBounds:r},null===(t=n.tilesetManager)||void 0===t||t.throttleUpdate(i,r))})),(0,p.Z)(this,"viewchange",(0,S.debounce)(this.mapchange,24)),this.parent=e;var r=this.parent.getContainer();this.rendererService=r.get(i.TYPES.IRendererService),this.layerService=r.get(i.TYPES.ILayerService),this.mapService=r.get(i.TYPES.IMapService),this.pickingService=r.get(i.TYPES.IPickingService),this.tileLayerService=new Ia({rendererService:this.rendererService,layerService:this.layerService,parent:e}),this.tilePickService=new Ba({tileLayerService:this.tileLayerService,layerService:this.layerService,parent:e}),this.parent.setLayerPickService(this.tilePickService),this.proxy(e),this.initTileSetManager()}var e;return(0,s.Z)(t,[{key:"initTileSetManager",value:function(){var t,e=this.parent.getSource();this.tilesetManager=e.tileset,this.initedTileset||(this.bindTilesetEvent(),this.initedTileset=!0);var n=this.getCurrentView(),r=n.latLonBounds,i=n.zoom;null===(t=this.tilesetManager)||void 0===t||t.update(i,r)}},{key:"getCurrentView",value:function(){var t=this.mapService.getBounds();return{latLonBounds:[t[0][0],t[0][1],t[1][0],t[1][1]],zoom:this.mapService.getZoom()}}},{key:"bindTilesetEvent",value:function(){var t=this;this.tilesetManager.on("tile-loaded",(function(t){})),this.tilesetManager.on("tile-unload",(function(e){t.tileUnLoad(e)})),this.tilesetManager.on("tile-error",(function(e,n){t.tileError(e)})),this.tilesetManager.on("tile-update",(function(){t.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(t){return this.tileLayerService.getTile(t)}},{key:"tileLoaded",value:function(t){}},{key:"tileError",value:function(t){console.warn("error:",t)}},{key:"destroy",value:function(){var t;this.mapService.off("zoomend",this.mapchange),this.mapService.off("moveend",this.viewchange),null===(t=this.tilesetManager)||void 0===t||t.destroy(),this.tileLayerService.destroy()}},{key:"reload",value:function(){var t;this.tilesetManager.clear();var e=this.getCurrentView(),n=e.latLonBounds,r=e.zoom;null===(t=this.tilesetManager)||void 0===t||t.update(r,n)}},{key:"tileUnLoad",value:function(t){this.tileLayerService.removeTile(t.key)}},{key:"tileUpdate",value:(e=(0,o.Z)(d().mark((function t(){var e,n,r=this;return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.tilesetManager){t.next=2;break}return t.abrupt("return");case 2:return e=this.parent.getMinZoom(),n=this.parent.getMaxZoom(),t.next=6,Promise.all(this.tilesetManager.tiles.filter((function(t){return t.isLoaded})).filter((function(t){return t.isVisibleChange})).filter((function(t){return t.data})).filter((function(t){return t.z>=e&&t.z{"use strict";n.r(e),n.d(e,{BaseMapService:()=>ur,BaseMapWrapper:()=>m,Earth:()=>dr,GaodeMap:()=>Bt,GaodeMapV1:()=>Lt,GaodeMapV2:()=>Bt,Map:()=>_r,Mapbox:()=>Ar,Version:()=>k.G,Viewport:()=>st});var r,i,o,a=n(3192),s=n(6838),u=n(6193),l=n(9097),c=n(6875),h=n(3659),p=n(6902),f=n(7677),d=n(108),m=(r=(0,d.lazyInject)(d.TYPES.IGlobalConfigService),i=function(){function t(e){(0,a.Z)(this,t),(0,p.Z)(this,"configService",o,this),this.config=e}return(0,s.Z)(t,[{key:"setContainer",value:function(t,e,n,r){t.bind(d.TYPES.MapConfig).toConstantValue((0,h.Z)((0,h.Z)({},this.config),{},{id:e,canvas:n,hasBaseMap:r})),t.bind(d.TYPES.IMapService).to(this.getServiceConstructor()).inSingletonScope()}},{key:"getServiceConstructor",value:function(){throw new Error("Method not implemented.")}}]),t}(),o=(0,f.Z)(i.prototype,"configService",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),i),g=n(5162),y=n(5927),v=n(9908),_=n(2718),b=n(800),x=n(5161),w=n(6297),S=n(1109),E=n.n(S),M=n(2401),T=n(2329),A=n(7745),C=(n(171),n(5576)),O=n.n(C),P=n(5619),k=n(5895),L=function(){function t(e){(0,a.Z)(this,t),(0,w.Z)(this,"size",1e4),this.size=e||1e4}return(0,s.Z)(t,[{key:"setSize",value:function(t){this.size=t}},{key:"getSize",value:function(){return[this.size,this.size]}},{key:"mercatorXfromLng",value:function(t){return(180+t)/360*this.size}},{key:"mercatorYfromLat",value:function(t){return(1-(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360)*this.size}},{key:"lngFromMercatorX",value:function(t){return t/this.size*360-180}},{key:"latFromMercatorY",value:function(t){var e=180-360*(1-t/this.size);return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}},{key:"project",value:function(t){return[this.mercatorXfromLng(t[0]),this.mercatorYfromLat(t[1])]}},{key:"unproject",value:function(t){return[this.lngFromMercatorX(t[0]),this.latFromMercatorY(t[1])]}}]),t}();function I(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("number"==typeof t)return{top:t,right:t,bottom:t,left:t};if(Array.isArray(t)){if(4===t.length)return{top:t[0],right:t[1],bottom:t[2],left:t[3]};if(2===t.length)return{top:t[0],right:t[1],bottom:t[0],left:t[1]}}return(0,h.Z)((0,h.Z)({},{top:0,right:0,bottom:0,left:0}),t)}var R=n(5512);function D(t,e){var n=R.fF([],e,t);return R.bA(n,n,1/n[3]),n}var N=n(9341);function F(t,e){if(!t)throw new Error(e||"viewport-mercator-project: assertion failed.")}var z=Math.PI,B=z/4,j=z/180,U=180/z,Z=4003e4;function V(t){return Math.pow(2,t)}function G(t,e){var n=(0,g.Z)(t,2),r=n[0],i=n[1];F(Number.isFinite(r)&&Number.isFinite(e)),F(Number.isFinite(i)&&i>=-90&&i<=90,"invalid latitude");var o=i*j;return[(e*=512)*(r*j+z)/(2*z),e*(z-Math.log(Math.tan(B+.5*o)))/(2*z)]}function H(t,e){var n=(0,g.Z)(t,2),r=n[0],i=n[1],o=r/(e*=512)*(2*z)-z,a=2*(Math.atan(Math.exp(z-i/e*(2*z)))-B);return[o*U,a*U]}function W(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(0,g.Z)(t,3),i=r[0],o=r[1],a=r[2];if(F(Number.isFinite(i)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(a))return D(e,[i,o,a,1]);var s=D(e,[i,o,0,1]),u=D(e,[i,o,1,1]),l=s[2],c=u[2],h=l===c?0:((n||0)-l)/(c-l);return N.t7([],s,u,h)}var q=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function Y(t){var e=t.width,n=t.height,r=t.bounds,i=t.minExtent,o=void 0===i?0:i,a=t.maxZoom,s=void 0===a?24:a,u=t.padding,l=void 0===u?0:u,c=t.offset,h=void 0===c?[0,0]:c,p=(0,g.Z)(r,2),f=(0,g.Z)(p[0],2),d=f[0],m=f[1],y=(0,g.Z)(p[1],2),v=y[0],_=y[1];Number.isFinite(l)?l={top:l,bottom:l,left:l,right:l}:F(Number.isFinite(l.top)&&Number.isFinite(l.bottom)&&Number.isFinite(l.left)&&Number.isFinite(l.right));var b=new at({width:e,height:n,longitude:0,latitude:0,zoom:0}),x=b.project([d,_]),w=b.project([v,m]),S=[Math.max(Math.abs(w[0]-x[0]),o),Math.max(Math.abs(w[1]-x[1]),o)],E=[e-l.left-l.right-2*Math.abs(h[0]),n-l.top-l.bottom-2*Math.abs(h[1])];F(E[0]>0&&E[1]>0);var M=E[0]/S[0],T=E[1]/S[1],A=(l.right-l.left)/2/M,C=(l.bottom-l.top)/2/T,O=[(w[0]+x[0])/2+A,(w[1]+x[1])/2+C],P=b.unproject(O),k=b.zoom+Math.log2(Math.abs(Math.min(M,T)));return{longitude:P[0],latitude:P[1],zoom:Math.min(k,s)}}var X,$,K,J,Q,tt,et,nt,rt,it,ot,at=function(t){function e(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.width,i=n.height,o=n.latitude,s=void 0===o?0:o,u=n.longitude,h=void 0===u?0:u,p=n.zoom,f=void 0===p?0:p,d=n.pitch,m=void 0===d?0:d,g=n.bearing,y=void 0===g?0:g,v=n.altitude,_=void 0===v?1.5:v,b=n.nearZMultiplier,w=n.farZMultiplier;(0,a.Z)(this,e),r=r||1,i=i||1;var S=V(f);_=Math.max(.75,_);var E=G([h,s],S);E[2]=0;var A=function(t){var e=t.width,n=t.height,r=t.pitch,i=function(t){var e=t.width,n=t.height,r=t.altitude,i=void 0===r?1.5:r,o=t.pitch,a=t.nearZMultiplier,s=void 0===a?1:a,u=t.farZMultiplier,l=void 0===u?1:u,c=(void 0===o?0:o)*j,h=Math.atan(.5/i),p=Math.sin(h)*i/Math.sin(Math.PI/2-c-h),f=Math.cos(Math.PI/2-c)*p+i;return{fov:2*Math.atan(n/2/i),aspect:e/n,focalDistance:i,near:s,far:f*l}}({width:e,height:n,altitude:t.altitude,pitch:r,nearZMultiplier:t.nearZMultiplier,farZMultiplier:t.farZMultiplier}),o=i.fov,a=i.aspect,s=i.near,u=i.far;return M.perspective([],o,a,s,u)}({width:r,height:i,pitch:m,bearing:y,altitude:_,nearZMultiplier:b||1/i,farZMultiplier:w||1.01}),C=function(t){var e=t.height,n=t.pitch,r=t.bearing,i=t.altitude,o=t.center,a=void 0===o?null:o,s=t.flipY,u=void 0!==s&&s,l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return M.translate(l,l,[0,0,-i]),M.scale(l,l,[1,1,1/e]),M.rotateX(l,l,-n*j),M.rotateZ(l,l,r*j),u&&M.scale(l,l,[1,-1,1]),a&&M.translate(l,l,T.negate([],a)),l}({height:i,center:E,pitch:m,bearing:y,altitude:_,flipY:!0});return(t=(0,l.Z)(this,(0,c.Z)(e).call(this,{width:r,height:i,viewMatrix:C,projectionMatrix:A}))).latitude=s,t.longitude=h,t.zoom=f,t.pitch=m,t.bearing=y,t.altitude=_,t.scale=S,t.center=E,t.pixelsPerMeter=function(t){var e=t.latitude,n=t.longitude,r=t.zoom,i=t.scale,o=t.highPrecision,a=void 0!==o&&o;i=void 0!==i?i:V(r),F(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(i));var s={},u=512*i,l=Math.cos(e*j),c=u/360,h=c/l,p=u/Z/l;if(s.pixelsPerMeter=[p,-p,p],s.metersPerPixel=[1/p,-1/p,1/p],s.pixelsPerDegree=[c,-h,p],s.degreesPerPixel=[1/c,-1/h,1/p],a){var f=j*Math.tan(e*j)/l,d=c*f/2,m=u/Z*f,g=m/h*p;s.pixelsPerDegree2=[0,-d,m],s.pixelsPerMeter2=[g,0,g]}return s}((0,x.Z)((0,x.Z)(t))).pixelsPerMeter[2],Object.freeze((0,x.Z)((0,x.Z)(t))),t}return(0,u.Z)(e,t),(0,s.Z)(e,[{key:"projectFlat",value:function(t){return G(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale)}},{key:"unprojectFlat",value:function(t){return H(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.scale)}},{key:"getMapCenterByLngLatPosition",value:function(t){var e=t.lngLat,n=W(t.pos,this.pixelUnprojectionMatrix),r=G(e,this.scale),i=N.IH([],r,N.tk([],n));return H(N.IH([],this.center,i),this.scale)}},{key:"getLocationAtPoint",value:function(t){var e=t.lngLat,n=t.pos;return this.getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"fitBounds",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.width,i=this.height,o=Y(Object.assign({width:r,height:i,bounds:t},n));return new e({width:r,height:i,longitude:o.longitude,latitude:o.latitude,zoom:o.zoom})}}]),e}(function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width,r=e.height,i=e.viewMatrix,o=void 0===i?q:i,s=e.projectionMatrix,u=void 0===s?q:s;(0,a.Z)(this,t),this.width=n||1,this.height=r||1,this.scale=1,this.pixelsPerMeter=1,this.viewMatrix=o,this.projectionMatrix=u;var l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];M.multiply(l,l,this.projectionMatrix),M.multiply(l,l,this.viewMatrix),this.viewProjectionMatrix=l;var c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];M.scale(c,c,[this.width/2,-this.height/2,1]),M.translate(c,c,[1,-1,0]),M.multiply(c,c,this.viewProjectionMatrix);var h=M.invert([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],c);if(!h)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=c,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(0,s.Z)(t,[{key:"equals",value:function(e){return e instanceof t&&e.width===this.width&&e.height===this.height&&M.equals(e.projectionMatrix,this.projectionMatrix)&&M.equals(e.viewMatrix,this.viewMatrix)}},{key:"project",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).topLeft,n=void 0===e||e,r=function(t,e){var n=(0,g.Z)(t,3),r=n[0],i=n[1],o=n[2],a=void 0===o?0:o;return F(Number.isFinite(r)&&Number.isFinite(i)&&Number.isFinite(a)),D(e,[r,i,a,1])}(this.projectPosition(t),this.pixelProjectionMatrix),i=(0,g.Z)(r,2),o=i[0],a=i[1],s=n?a:this.height-a;return 2===t.length?[o,s]:[o,s,r[2]]}},{key:"unproject",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.topLeft,r=void 0===n||n,i=e.targetZ,o=(0,g.Z)(t,3),a=o[0],s=o[1],u=o[2],l=r?s:this.height-s,c=i&&i*this.pixelsPerMeter,h=W([a,l,u],this.pixelUnprojectionMatrix,c),p=this.unprojectPosition(h),f=(0,g.Z)(p,3),d=f[0],m=f[1],y=f[2];return Number.isFinite(u)?[d,m,y]:Number.isFinite(i)?[d,m,i]:[d,m]}},{key:"projectPosition",value:function(t){var e=this.projectFlat(t),n=(0,g.Z)(e,2);return[n[0],n[1],(t[2]||0)*this.pixelsPerMeter]}},{key:"unprojectPosition",value:function(t){var e=this.unprojectFlat(t),n=(0,g.Z)(e,2);return[n[0],n[1],(t[2]||0)/this.pixelsPerMeter]}},{key:"projectFlat",value:function(t){return arguments.length>1&&void 0!==arguments[1]||this.scale,t}},{key:"unprojectFlat",value:function(t){return arguments.length>1&&void 0!==arguments[1]||this.scale,t}}]),t}()),st=function(){function t(){(0,a.Z)(this,t)}return(0,s.Z)(t,[{key:"syncWithMapCamera",value:function(t){var e=t.center,n=t.zoom,r=t.pitch,i=t.bearing,o=t.viewportHeight,a=t.viewportWidth,s=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 at((0,h.Z)((0,h.Z)({},s),{},{width:a,height:o,longitude:e&&e[0],latitude:e&&e[1],zoom:n,pitch:r,bearing:i}))}},{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(t,e){return this.viewport.projectFlat(t,e)}}]),t}(),ut={normal:"amap://styles/normal",light:"amap://styles/c422f5c0cfced5be9fe3a83f05f28a68?isPublic=true",dark:"amap://styles/c9f1d10cae34f8ab05e425462c5a58d7?isPublic=true",blank:"amap://styles/07c17002b38775b32a7a76c66cf90e99?isPublic=true",fresh:"amap://styles/fresh",grey:"amap://styles/grey",graffiti:"amap://styles/graffiti",macaron:"amap://styles/macaron",darkblue:"amap://styles/darkblue",wine:"amap://styles/wine"},lt=["id","style","minZoom","maxZoom","token","mapInstance","plugin"];!function(t,e){var n="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,r="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);if(!n&&!r&&(e||(e=document),e)){var i=e.head||e.getElementsByTagName("head")[0];if(!i){i=e.createElement("head");var o=e.body||e.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(i,o):e.documentElement.appendChild(i)}var a=e.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),i.appendChild(a)}}(".amap-logo{\n display: none !important;\n}\n");var ct={"GAODE1.x":{contextmenu:"rightclick"},"GAODE2.x":{contextmenu:"rightclick",camerachange:"viewchange"}},ht=0;window.forceWebGL=!0;var pt="15cd8a57710d40c9b7c0e3cc120f1200",ft=!1,dt=[],mt=(X=(0,A.b2)(),$=(0,A.f3)(d.TYPES.IGlobalConfigService),K=(0,A.f3)(d.TYPES.MapConfig),J=(0,A.f3)(d.TYPES.ICoordinateSystemService),Q=(0,A.f3)(d.TYPES.IEventEmitter),X((et=function(){function t(){var e=this;(0,a.Z)(this,t),(0,w.Z)(this,"version",k.G["GAODE1.x"]),(0,w.Z)(this,"simpleMapCoord",new L),(0,w.Z)(this,"bgColor","rgba(0, 0, 0, 0)"),(0,p.Z)(this,"configService",nt,this),(0,p.Z)(this,"config",rt,this),(0,p.Z)(this,"coordinateSystemService",it,this),(0,p.Z)(this,"eventEmitter",ot,this),(0,w.Z)(this,"handleCameraChanged",(function(t){var n=t.camera,r=n.fov,i=n.near,o=n.far,a=n.height,s=n.pitch,u=n.rotation,l=n.aspect,c=n.position,h=e.getCenter(),p=h.lng,f=h.lat;if(e.emit("mapchange"),e.cameraChangedCallback){e.viewport.syncWithMapCamera({aspect:l,bearing:360-u,far:o,fov:r,cameraHeight:a,near:i,pitch:s,zoom:e.map.getZoom()-1,center:[p,f],offsetOrigin:[c.x,c.y]});var m=e.config.offsetZoom,g=void 0===m?12:m;e.viewport.getZoom()>g?e.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.P20_OFFSET):e.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.P20),e.cameraChangedCallback(e.viewport)}}))}var e;return(0,s.Z)(t,[{key:"setBgColor",value:function(t){this.bgColor=t}},{key:"addMarkerContainer",value:function(){var t=this.map.getContainer();if(null!==t){var e=t.getElementsByClassName("amap-maps")[0];this.markerContainer=P.DOM.create("div","l7-marker-container",e)}}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"on",value:function(t,e){-1!==d.MapServiceEvent.indexOf(t)?this.eventEmitter.on(t,e):this.map.on(ct[this.version][t]||t,e)}},{key:"off",value:function(t,e){-1!==d.MapServiceEvent.indexOf(t)?this.eventEmitter.off(t,e):this.map.off(ct[this.version][t]||t,e)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){var t;return null===(t=this.map.getContainer())||void 0===t?void 0:t.getElementsByClassName("amap-maps")[0]}},{key:"getSize",value:function(){var t=this.map.getSize();return[t.getWidth(),t.getHeight()]}},{key:"getType",value:function(){return"amap"}},{key:"getZoom",value:function(){return this.map.getZoom()-1}},{key:"setZoom",value:function(t){return this.map.setZoom(t+1)}},{key:"getCenter",value:function(t){if(null!=t&&t.padding){var e=this.getCenter(),n=I(t.padding),r=this.lngLatToPixel([e.lng,e.lat]),i=[(n.right-n.left)/2,(n.bottom-n.top)/2];return this.pixelToLngLat([r.x-i[0],r.y-i[1]])}var o=this.map.getCenter();return{lng:o.getLng(),lat:o.getLat()}}},{key:"setCenter",value:function(t,e){if(null!=e&&e.padding){var n=I(e.padding),r=this.lngLatToPixel(t),i=[(n.right-n.left)/2,(n.bottom-n.top)/2],o=this.pixelToLngLat([r.x+i[0],r.y+i[1]]);this.map.setCenter([o.lng,o.lat])}else this.map.setCenter(t)}},{key:"getPitch",value:function(){return this.map.getPitch()}},{key:"getRotation",value:function(){return 360-this.map.getRotation()}},{key:"getBounds",value:function(){var t=this.map.getBounds().toBounds(),e=t.getNorthEast(),n=t.getSouthWest(),r=this.getCenter(),i=r.lng>e.getLng()||r.lng0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.map.panBy(t,e)}},{key:"fitBounds",value:function(t){this.map.setBounds(new AMap.Bounds([t[0][0],t[0][1],t[1][0],t[1][1]]))}},{key:"setZoomAndCenter",value:function(t,e){this.map.setZoomAndCenter(t+1,e)}},{key:"setMapStyle",value:function(t){this.map.setMapStyle(this.getMapStyleValue(t))}},{key:"setMapStatus",value:function(t){this.map.setStatus(t)}},{key:"getMapStyleConfig",value:function(){return ut}},{key:"getMapStyleValue",value:function(t){return this.getMapStyleConfig()[t]||t}},{key:"getMapStyle",value:function(){return this.map.getMapStyle()}},{key:"pixelToLngLat",value:function(t){var e=this.map.pixelToLngLat(new AMap.Pixel(t[0],t[1]));return{lng:e.getLng(),lat:e.getLat()}}},{key:"lngLatToPixel",value:function(t){var e=this.map.lnglatToPixel(new AMap.LngLat(t[0],t[1]));return{x:e.getX(),y:e.getY()}}},{key:"containerToLngLat",value:function(t){var e=new AMap.Pixel(t[0],t[1]),n=this.map.containerToLngLat(e);return{lng:null==n?void 0:n.getLng(),lat:null==n?void 0:n.getLat()}}},{key:"lngLatToContainer",value:function(t){var e=new AMap.LngLat(t[0],t[1]),n=this.map.lngLatToContainer(e);return{x:n.getX(),y:n.getY()}}},{key:"lngLatToCoord",value:function(t){var e=this.map.lngLatToGeodeticCoord(t);return[e.x,-e.y]}},{key:"lngLatToMercator",value:function(t,e){return{x:0,y:0,z:0}}},{key:"getModelMatrix",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1,1],i=this.viewport.projectFlat(t),o=M.create();return M.translate(o,o,T.fromValues(i[0],i[1],e)),M.scale(o,o,T.fromValues(r[0],r[1],r[2])),M.rotateX(o,o,n[0]),M.rotateY(o,o,n[1]),M.rotateZ(o,o,n[2]),o}},{key:"init",value:(e=(0,b.Z)(E().mark((function t(){var e,n,r,i,o,a,s,u,l,c,p,f,d,m,g=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.config,n=e.id,r=e.style,i=void 0===r?"light":r,o=e.minZoom,a=void 0===o?0:o,s=e.maxZoom,u=void 0===s?18:s,l=e.token,c=void 0===l?pt:l,p=e.mapInstance,f=e.plugin,d=void 0===f?[]:f,m=(0,_.Z)(e,lt),t.next=3,new Promise((function(t){var e=function(){if(p)g.map=p,g.$mapContainer=g.map.getContainer(),setTimeout((function(){g.map.on("camerachange",g.handleCameraChanged),t()}),30);else{g.$mapContainer=g.creatMapContainer(n);var e=(0,h.Z)({mapStyle:g.getMapStyleValue(i),zooms:[a,u],viewMode:"3D"},m);e.zoom&&(e.zoom+=1);var r=new AMap.Map(g.$mapContainer,e);r.on("camerachange",g.handleCameraChanged),r.on("camerachange",(function(){setTimeout((function(){return g.handleAfterMapChange()}))})),g.map=r,setTimeout((function(){t()}),10)}};ft||p?ft&&window.AMap||p?e():dt.push(e):(c===pt&&console.warn("%c".concat(g.configService.getSceneWarninfo("MapToken"),"!"),"color: #873bf4;font-weigh:900;font-size: 16px;"),ft=!0,d.push("Map3D"),O().load({key:c,version:"1.4.15",plugins:d}).then((function(){e(),dt.length&&(dt.forEach((function(t){return t()})),dt=[])})).catch((function(t){throw new Error(t)})))}));case 3:this.viewport=new st;case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"meterToCoord",value:function(t,e){var n=AMap.GeometryUtil.distance((0,y.Z)(AMap.LngLat,(0,v.Z)(t)),(0,y.Z)(AMap.LngLat,(0,v.Z)(e))),r=this.lngLatToCoord(t),i=(0,g.Z)(r,2),o=i[0],a=i[1],s=this.lngLatToCoord(e),u=(0,g.Z)(s,2),l=u[0],c=u[1];return Math.sqrt(Math.pow(o-l,2)+Math.pow(a-c,2))/n}},{key:"updateView",value:function(t){}},{key:"getOverlayContainer",value:function(){}},{key:"exportMap",value:function(t){var e,n=null===(e=this.getContainer())||void 0===e?void 0:e.getElementsByClassName("amap-layer")[0];return"jpg"===t?null==n?void 0:n.toDataURL("image/jpeg"):null==n?void 0:n.toDataURL("image/png")}},{key:"emit",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;ig?t.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.P20_OFFSET):t.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.P20),t.cameraChangedCallback(t.viewport)}})),t}return(0,s.Z)(o,[{key:"getModelMatrix",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1,1],i=this.viewport.projectFlat(t),o=M.create();return M.translate(o,o,T.fromValues(i[0],i[1],e)),M.scale(o,o,T.fromValues(r[0],r[1],r[2])),M.rotateX(o,o,n[0]),M.rotateY(o,o,n[1]),M.rotateZ(o,o,n[2]),o}},{key:"init",value:(e=(0,b.Z)(E().mark((function t(){var e,n,r,i,o,a,s,u,l,c,p,f,d,m,g=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.config,n=e.id,r=e.style,i=void 0===r?"light":r,o=e.minZoom,a=void 0===o?0:o,s=e.maxZoom,u=void 0===s?18:s,l=e.token,c=void 0===l?At:l,p=e.mapInstance,f=e.plugin,d=void 0===f?[]:f,m=(0,_.Z)(e,Tt),t.next=3,new Promise((function(t){var e=function(){if(p)g.map=p,g.$mapContainer=g.map.getContainer(),setTimeout((function(){g.map.on("camerachange",g.handleCameraChanged),t()}),30);else{g.$mapContainer=g.creatMapContainer(n);var e=(0,h.Z)({mapStyle:g.getMapStyleValue(i),zooms:[a,u],viewMode:"3D"},m);e.zoom&&(e.zoom+=1);var r=new AMap.Map(g.$mapContainer,e);r.on("camerachange",g.handleCameraChanged),r.on("camerachange",(function(){setTimeout((function(){return g.handleAfterMapChange()}))})),g.map=r,setTimeout((function(){t()}),10)}};Ct||p?Ct&&window.AMap||p?e():Ot.push(e):(c===At&&console.warn(g.configService.getSceneWarninfo("MapToken")),Ct=!0,d.push("Map3D"),wt.load({key:c,version:"1.4.15",plugins:d}).then((function(t){e(),Ot.length&&(Ot.forEach((function(t){return t()})),Ot=[])})).catch((function(t){throw new Error(t)})))}));case 3:this.viewport=new Mt;case 4:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"meterToCoord",value:function(t,e){var n=AMap.GeometryUtil.distance((0,y.Z)(AMap.LngLat,(0,v.Z)(t)),(0,y.Z)(AMap.LngLat,(0,v.Z)(e))),r=this.lngLatToCoord(t),i=(0,g.Z)(r,2),o=i[0],a=i[1],s=this.lngLatToCoord(e),u=(0,g.Z)(s,2),l=u[0],c=u[1];return Math.sqrt(Math.pow(o-l,2)+Math.pow(a-c,2))/n}},{key:"updateView",value:function(t){}},{key:"getOverlayContainer",value:function(){}},{key:"exportMap",value:function(t){var e,n=null===(e=this.getContainer())||void 0===e?void 0:e.getElementsByClassName("amap-layer")[0];return"jpg"===t?null==n?void 0:n.toDataURL("image/jpeg"):null==n?void 0:n.toDataURL("image/png")}},{key:"onCameraChanged",value:function(t){this.cameraChangedCallback=t}}]),o}(mt))||St;var kt,Lt=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){return(0,a.Z)(this,i),r.apply(this,arguments)}return(0,s.Z)(i,[{key:"getServiceConstructor",value:function(){return Pt}}]),i}(m),It=function(){function t(){(0,a.Z)(this,t),(0,w.Z)(this,"projectionMatrix",M.create()),(0,w.Z)(this,"viewMatrix",M.create()),(0,w.Z)(this,"viewProjectionMatrix",M.create()),(0,w.Z)(this,"ViewProjectionMatrixUncentered",M.create()),(0,w.Z)(this,"viewUncenteredMatrix",M.create())}return(0,s.Z)(t,[{key:"syncWithMapCamera",value:function(t){var e=t.zoom,n=void 0===e?1:e,r=t.center,i=void 0===r?[0,0]:r,o=t.offsetOrigin,a=void 0===o?[0,0]:o,s=t.cameraPosition,u=void 0===s?[0,0,0]:s,l=t.up,c=void 0===l?[0,1,0]:l,h=t.lookAt,p=void 0===h?[0,0,0]:h,f=t.aspect,d=void 0===f?1:f,m=t.near,g=void 0===m?.1:m,y=t.far,_=void 0===y?1e3:y,b=t.fov,x=void 0===b?45:b;this.zoom=n,this.center=i,M.perspective(this.projectionMatrix,x/180*Math.PI,d,g,_);var w=T.fromValues.apply(T,(0,v.Z)(u)),S=T.fromValues.apply(T,(0,v.Z)(p)),E=T.fromValues.apply(T,(0,v.Z)(c));M.lookAt(this.viewMatrix,w,S,E),this.viewUncenteredMatrix=M.clone(this.viewMatrix),M.translate(this.viewMatrix,this.viewMatrix,T.fromValues(-a[0],a[1],0)),M.multiply(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),M.multiply(this.ViewProjectionMatrixUncentered,this.projectionMatrix,this.viewMatrix)}},{key:"getZoom",value:function(){return this.zoom}},{key:"getZoomScale",value:function(){return 1048576}},{key:"getCenter",value:function(){var t=(0,g.Z)(this.center,2);return[t[0],t[1]]}},{key:"getProjectionMatrix",value:function(){return this.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.viewMatrix}},{key:"getViewMatrixUncentered",value:function(){return this.viewUncenteredMatrix}},{key:"getViewProjectionMatrix",value:function(){return this.viewProjectionMatrix}},{key:"getViewProjectionMatrixUncentered",value:function(){return this.ViewProjectionMatrixUncentered}},{key:"getFocalDistance",value:function(){return 1.2}},{key:"projectFlat",value:function(t){var e=85.0511287798,n=Math.max(Math.min(e,t[1]),-e),r=256<<20,i=Math.PI/180,o=t[0]*i,a=n*i;return a=Math.log(Math.tan(Math.PI/4+a/2)),[o=r*(.5/Math.PI*o+.5)-215440491,a=-(r*(-.5/Math.PI*a+(i=.5))-106744817)]}}]),t}(),Rt=["id","style","minZoom","maxZoom","token","mapInstance","plugin","version"];!function(t,e){var n="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,r="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);if(!n&&!r&&(e||(e=document),e)){var i=e.head||e.getElementsByTagName("head")[0];if(!i){i=e.createElement("head");var o=e.body||e.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(i,o):e.documentElement.appendChild(i)}var a=e.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),i.appendChild(a)}}(".amap-logo{\n display: none !important;\n}\n");var Dt=[108.92361,34.54083];window.forceWebGL=!0;var Nt="ff533602d57df6f8ab3b0fea226ae52f",Ft=(0,A.b2)()(kt=function(t){(0,u.Z)(o,t);var e,n,r,i=(n=o,r=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}}(),function(){var t,e=(0,c.Z)(n);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,l.Z)(this,t)});function o(){var t;(0,a.Z)(this,o);for(var e=arguments.length,n=new Array(e),r=0;re.getLng()||r.lng3&&void 0!==arguments[3]?arguments[3]:[1,1,1],i=this.map.customCoords.lngLatToCoord(t),o=M.create();return M.translate(o,o,T.fromValues(i[0],i[1],e)),M.scale(o,o,T.fromValues(r[0],r[1],r[2])),M.rotateX(o,o,n[0]),M.rotateY(o,o,n[1]),M.rotateZ(o,o,n[2]),o}},{key:"init",value:(e=(0,b.Z)(E().mark((function t(){var e,n,r,i,o,a,s,u,l,c,p,f,d,m,g,y,v,b,x,w;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.config,n=e.id,r=e.style,i=void 0===r?"light":r,o=e.minZoom,a=void 0===o?0:o,s=e.maxZoom,u=void 0===s?18:s,l=e.token,c=void 0===l?Nt:l,p=e.mapInstance,f=e.plugin,d=void 0===f?[]:f,e.version,m=(0,_.Z)(e,Rt),this.viewport=new It,window.AMap||p){t.next=6;break}return d.push("Map3D"),t.next=6,O().load({key:c,version:"2.0",plugins:d});case 6:p?(this.map=p,this.$mapContainer=this.map.getContainer(),y=this.map.getCenter(),null===(g=this.map.customCoords)||void 0===g||g.setCenter([y.lng,y.lat]),this.setCustomCoordCenter([y.lng,y.lat]),this.map.on("viewchange",this.handleViewChanged)):(this.$mapContainer=this.creatMapContainer(n),(b=(0,h.Z)({mapStyle:this.getMapStyleValue(i),zooms:[a,u],viewMode:"3D"},m)).zoom&&(b.zoom+=1),c===Nt&&console.warn("%c".concat(this.configService.getSceneWarninfo("MapToken"),"!"),"color: #873bf4;font-weigh:900;font-size: 16px;"),x=new AMap.Map(this.$mapContainer,b),this.map=x,w=x.getCenter(),null===(v=this.map.customCoords)||void 0===v||v.setCenter([w.lng,w.lat]),this.setCustomCoordCenter([w.lng,w.lat]),x.on("viewchange",this.handleViewChanged)),this.initViewPort();case 8:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"getMapContainer",value:function(){return this.$mapContainer}},{key:"onCameraChanged",value:function(t){this.cameraChangedCallback=t}},{key:"initViewPort",value:function(){var t,e=null===(t=this.map.customCoords)||void 0===t?void 0:t.getCameraParams(),n=e.fov,r=e.near,i=e.far,o=e.aspect,a=e.position,s=e.lookAt,u=e.up;this.emit("mapchange");var l=this.map.customCoords.getCenter(),c=this.map.getZoom();this.cameraChangedCallback&&(this.viewport.syncWithMapCamera({aspect:o,far:i,fov:n,cameraPosition:a,lookAt:s,near:r,up:u,zoom:c-1,center:l,offsetOrigin:[a[0],a[1]]}),this.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.P20_2),this.cameraChangedCallback(this.viewport))}},{key:"_sub",value:function(t,e){var n=[0,0];return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n}}]),o}(mt))||kt;var zt,Bt=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){return(0,a.Z)(this,i),r.apply(this,arguments)}return(0,s.Z)(i,[{key:"getServiceConstructor",value:function(){return Ft}}]),i}(m),jt=n(9479),Ut=n(1883),Zt=n(7743),Vt=n(6922),Gt=n.n(Vt);function Ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}return(0,s.Z)(t,[{key:"wrap",value:function(){return new t(Wt(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(t){var e=Math.PI/180,n=this.lat*e,r=t.lat*e,i=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((t.lng-this.lng)*e);return ne*Math.acos(Math.min(i,1))}}],[{key:"convert",value:function(e){if(e instanceof t)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new t(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"===(0,Zt.Z)(e)&&null!==e){var n="lng"in e?e.lng:e.lon;return new t(Number(n),Number(e.lat))}throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}]),t}(),ie=function(){function t(e,n){(0,a.Z)(this,t),e&&(n?this.setSouthWest(e).setNorthEast(n):4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1]))}return(0,s.Z)(t,[{key:"setNorthEast",value:function(t){return this.ne=t instanceof re?new re(t.lng,t.lat):re.convert(t),this}},{key:"setSouthWest",value:function(t){return this.sw=t instanceof re?new re(t.lng,t.lat):re.convert(t),this}},{key:"extend",value:function(e){var n,r,i=this.sw,o=this.ne;if(e instanceof re)n=e,r=e;else{if(!(e instanceof t)){if(Array.isArray(e)){if(4===e.length||e.every(Array.isArray)){var a=e;return this.extend(t.convert(a))}var s=e;return this.extend(re.convert(s))}return this}if(n=e.sw,r=e.ne,!n||!r)return this}return i||o?(i.lng=Math.min(n.lng,i.lng),i.lat=Math.min(n.lat,i.lat),o.lng=Math.max(r.lng,o.lng),o.lat=Math.max(r.lat,o.lat)):(this.sw=new re(n.lng,n.lat),this.ne=new re(r.lng,r.lat)),this}},{key:"getCenter",value:function(){return new re((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 re(this.getWest(),this.getNorth())}},{key:"getSouthEast",value:function(){return new re(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(t){var e=re.convert(t),n=e.lng,r=e.lat,i=this.sw.lat<=r&&r<=this.ne.lat,o=this.sw.lng<=n&&n<=this.ne.lng;return this.sw.lng>this.ne.lng&&(o=this.sw.lng>=n&&n>=this.ne.lng),i&&o}}],[{key:"convert",value:function(e){return e instanceof t?e:new t(e)}}]),t}(),oe=function(){function t(e,n){(0,a.Z)(this,t),this.x=e,this.y=n}return(0,s.Z)(t,[{key:"clone",value:function(){return new t(this.x,this.y)}},{key:"_add",value:function(t){return this.x+=t.x,this.y+=t.y,this}},{key:"add",value:function(t){return this.clone()._add(t)}},{key:"_sub",value:function(t){return this.x-=t.x,this.y-=t.y,this}},{key:"sub",value:function(t){return this.clone()._sub(t)}},{key:"_multByPoint",value:function(t){return this.x*=t.x,this.y*=t.y,this}},{key:"multByPoint",value:function(t){return this.clone()._multByPoint(t)}},{key:"_divByPoint",value:function(t){return this.x/=t.x,this.y/=t.y,this}},{key:"divByPoint",value:function(t){return this.clone()._divByPoint(t)}},{key:"_mult",value:function(t){return this.x*=t,this.y*=t,this}},{key:"mult",value:function(t){return this.clone()._mult(t)}},{key:"_div",value:function(t){return this.x/=t,this.y/=t,this}},{key:"div",value:function(t){return this.clone()._div(t)}},{key:"_rotate",value:function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this}},{key:"rotate",value:function(t){return this.clone()._rotate(t)}},{key:"_rotateAround",value:function(t,e){var n=Math.cos(t),r=Math.sin(t),i=e.x+n*(this.x-e.x)-r*(this.y-e.y),o=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=i,this.y=o,this}},{key:"roateAround",value:function(t,e){return this.clone()._rotateAround(t,e)}},{key:"_matMult",value:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this}},{key:"matMult",value:function(t){return this.clone()._matMult(t)}},{key:"_unit",value:function(){return this.div(this.mag()),this}},{key:"unit",value:function(){return this.clone()._unit()}},{key:"_perp",value:function(){var t=this.y;return this.y=this.x,this.x=-t,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(t){return this.x===t.x&&this.y===t.y}},{key:"dist",value:function(t){return Math.sqrt(this.distSqr(t))}},{key:"distSqr",value:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n}},{key:"angle",value:function(){return Math.atan2(this.y,this.x)}},{key:"angleTo",value:function(t){return Math.atan2(this.y-t.y,this.x-t.x)}},{key:"angleWith",value:function(t){return this.angleWithSep(t.x,t.y)}},{key:"angleWithSep",value:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)}}],[{key:"convert",value:function(e){return e instanceof t?e:Array.isArray(e)?new t(e[0],e[1]):e}}]),t}(),ae=n(4249),se=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if((0,a.Z)(this,t),isNaN(e)||e<0||isNaN(n)||n<0||isNaN(r)||r<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=n,this.left=r,this.right=i}return(0,s.Z)(t,[{key:"interpolate",value:function(t,e,n){return null!=e.top&&null!=t.top&&(this.top=Yt(t.top,e.top,n)),null!=e.bottom&&null!=t.bottom&&(this.bottom=Yt(t.bottom,e.bottom,n)),null!=e.left&&null!=t.left&&(this.left=Yt(t.left,e.left,n)),null!=e.right&&null!=t.right&&(this.right=Yt(t.right,e.right,n)),this}},{key:"getCenter",value:function(t,e){var n=qt((this.left+t-this.right)/2,0,t),r=qt((this.top+e-this.bottom)/2,0,e);return new oe(n,r)}},{key:"equals",value:function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}},{key:"clone",value:function(){return new t(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}}}]),t}(),ue=2*Math.PI*ne;function le(t){return ue*Math.cos(t*Math.PI/180)}function ce(t){return(180+t)/360}function he(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function pe(t,e){return t/le(e)}function fe(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var de=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(0,a.Z)(this,t),this.x=+e,this.y=+n,this.z=+r}return(0,s.Z)(t,[{key:"toLngLat",value:function(){return new re(360*this.x-180,fe(this.y))}},{key:"toAltitude",value:function(){return this.z*le(fe(this.y))}},{key:"meterInMercatorCoordinateUnits",value:function(){return 1/ue*(t=fe(this.y),1/Math.cos(t*Math.PI/180));var t}}],[{key:"fromLngLat",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=re.convert(e);return new t(ce(r.lng),he(r.lat),pe(n,r.lat))}}]),t}();function me(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(s.s();!(n=s.n()).done;){var u=n.value;r=Math.min(r,u.x),i=Math.min(i,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}}catch(t){s.e(t)}finally{s.f()}return[new oe(r,i),new oe(o,i),new oe(o,a),new oe(r,a),new oe(r,i)]}},{key:"coordinatePoint",value:function(t){var e=R.al(t.x*this.worldSize,t.y*this.worldSize,0,1);return R.fF(e,e,this.pixelMatrix),new oe(e[0]/e[3],e[1]/e[3])}},{key:"locationPoint",value:function(t){return this.coordinatePoint(this.locationCoordinate(t))}},{key:"pointLocation",value:function(t){return this.coordinateLocation(this.pointCoordinate(t))}},{key:"locationCoordinate",value:function(t){return de.fromLngLat(t)}},{key:"coordinateLocation",value:function(t){return t.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 t,e,n,r,i=-90,o=90,a=-180,s=180,u=this.size,l=this.unmodified;if(this.latRange){var c=this.latRange;i=he(c[1])*this.worldSize,t=(o=he(c[0])*this.worldSize)-io&&(r=o-m)}if(this.lngRange){var g=p.x,y=u.x/2;g-ys&&(n=s-y)}void 0===n&&void 0===r||(this.center=this.unproject(new oe(void 0!==n?n:p.x,void 0!==r?r:p.y))),this.unmodified=l,this.constraining=!1}}},{key:"calcMatrices",value:function(){if(this.height){var t=this._fov/2,e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(t)*this.height;var n=Math.PI/2+this._pitch,r=this._fov*(.5+e.y/this.height),i=Math.sin(r)*this.cameraToCenterDistance/Math.sin(qt(Math.PI-n-r,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,u=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),l=this.height/50,c=new Float64Array(16);M.perspective(c,this._fov,this.width/this.height,l,u),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,M.scale(c,c,[1,-1,1]),M.translate(c,c,[0,0,-this.cameraToCenterDistance]),M.rotateX(c,c,this._pitch),M.rotateZ(c,c,this.angle),M.translate(c,c,[-a,-s,0]),this.mercatorMatrix=M.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),M.scale(c,c,[1,1,pe(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=M.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,f=Math.cos(this.angle),d=Math.sin(this.angle),m=a-Math.round(a)+f*h+d*p,g=s-Math.round(s)+f*p+d*h,y=new Float64Array(c);if(M.translate(y,y,[m>.5?m-1:m,g>.5?g-1:g,0]),this.alignedProjMatrix=y,c=M.create(),M.scale(c,c,[this.width/2,-this.height/2,1]),M.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=M.create(),M.scale(c,c,[1,-1,1]),M.translate(c,c,[-1,-1,0]),M.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=M.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=M.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this.posMatrixCache={},this.alignedPosMatrixCache={}}}}]),t}(),ye=n(8469),ve=n.n(ye),_e=(0,s.Z)((function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,a.Z)(this,t),ve()(this,n),this.type=e}));var be=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t){var e;(0,a.Z)(this,i),e=r.call(this),(0,w.Z)((0,x.Z)(e),"renderFrameCallback",(function(){var t=Math.min((Jt()-e.easeStart)/e.easeOptions.duration,1);e.onEaseFrame(e.easeOptions.easing(t)),t<1?e.easeFrameId=e.requestRenderFrame(e.renderFrameCallback):e.stop()})),e.options=t;var n=t.minZoom,o=t.maxZoom,s=t.minPitch,u=t.maxPitch,l=t.renderWorldCopies;return e.moving=!1,e.zooming=!1,e.bearingSnap=t.bearingSnap,e.pitchEnabled=t.pitchEnabled,e.rotateEnabled=t.rotateEnabled,e.transform=new ge(n,o,s,u,l),e}return(0,s.Z)(i,[{key:"requestRenderFrame",value:function(t){return 0}},{key:"cancelRenderFrame",value:function(t){}},{key:"getCenter",value:function(){var t=this.transform.center,e=t.lng,n=t.lat;return new re(e,n)}},{key:"getZoom",value:function(){return this.transform.zoom}},{key:"getPitch",value:function(){return this.transform.pitch}},{key:"setCenter",value:function(t,e){return this.jumpTo({center:t},e)}},{key:"setPitch",value:function(t,e){return this.jumpTo({pitch:t},e),this}},{key:"getBearing",value:function(){return this.transform.bearing}},{key:"panTo",value:function(t,e,n){return this.easeTo((0,jt.merge)({center:t},e),n)}},{key:"panBy",value:function(t,e,n){return t=oe.convert(t).mult(-1),this.panTo(this.transform.center,function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;this.stop();var n=this.transform,r=!1,i=!1,o=!1;return void 0!==t.zoom&&n.zoom!==+t.zoom&&(r=!0,n.zoom=+t.zoom),void 0!==t.center&&(n.center=re.convert(t.center)),void 0!==t.bearing&&n.bearing!==+t.bearing&&(i=!0,n.bearing=+t.bearing),void 0!==t.pitch&&n.pitch!==+t.pitch&&(o=!0,n.pitch=+t.pitch),void 0===t.padding||n.isPaddingEqual(t.padding)||(n.padding=t.padding),this.emit("movestart",new _e("movestart",e)),this.emit("move",new _e("move",e)),r&&(this.emit("zoomstart",new _e("zoomstart",e)),this.emit("zoom",new _e("zoom",e)),this.emit("zoomend",new _e("zoomend",e))),i&&(this.emit("rotatestart",new _e("rotatestart",e)),this.emit("rotate",new _e("rotate",e)),this.emit("rotateend",new _e("rotateend",e))),o&&(this.emit("pitchstart",new _e("pitchstart",e)),this.emit("pitch",new _e("pitch",e)),this.emit("pitchend",new _e("pitchend",e))),this.emit("moveend",new _e("moveend",e))}},{key:"easeTo",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;(!1===(e=(0,jt.merge)({offset:[0,0],duration:500,easing:$t},e)).animate||!e.essential&&Kt())&&(e.duration=0);var r=this.transform,i=this.getZoom(),o=this.getBearing(),a=this.getPitch(),s=this.getPadding(),u=e.zoom?+e.zoom:i,l=e.bearing?this.normalizeBearing(e.bearing,o):o,c=e.pitch?+e.pitch:a,h=e.padding?e.padding:r.padding,p=oe.convert(e.offset),f=r.centerPoint.add(p),d=r.pointLocation(f),m=re.convert(e.center||d);this.normalizeCenter(m);var g,y,v=r.project(d),_=r.project(m).sub(v),b=r.zoomScale(u-i);e.around&&(g=re.convert(e.around),y=r.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||o!==l,this.pitching=this.pitching||c!==a,this.padding=!r.isPaddingEqual(h),this.easeId=e.easeId,this.prepareEase(n,e.noMoveStart,x),clearTimeout(this.easeEndTimeoutID),this.ease((function(e){if(t.zooming&&(r.zoom=Yt(i,u,e)),t.rotating&&t.rotateEnabled&&(r.bearing=Yt(o,l,e)),t.pitching&&t.pitchEnabled&&(r.pitch=Yt(a,c,e)),t.padding&&(r.interpolatePadding(s,h,e),f=r.centerPoint.add(p)),g)r.setLocationAtPoint(g,y);else{var d=r.zoomScale(r.zoom-i),m=u>i?Math.min(2,b):Math.max(.5,b),x=Math.pow(m,1-e),w=r.unproject(v.add(_.mult(e*x)).mult(d));r.setLocationAtPoint(r.renderWorldCopies?w.wrap():w,f)}t.fireMoveEvents(n)}),(function(e){t.afterEase(n,e)}),e),this}},{key:"flyTo",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!e.essential&&Kt()){var r=function(t,e){var n,r={},i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ht(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(["center","zoom","bearing","pitch","around"]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o in t&&(r[o]=t[o])}}catch(t){i.e(t)}finally{i.f()}return r}(e);return this.jumpTo(r,n)}this.stop(),e=(0,jt.merge)({offset:[0,0],speed:1.2,curve:1.42,easing:$t},e);var i=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),u=this.getPadding(),l=e.zoom?qt(+e.zoom,i.minZoom,i.maxZoom):o,c=e.bearing?this.normalizeBearing(e.bearing,a):a,h=e.pitch?+e.pitch:s,p="padding"in e?e.padding:i.padding,f=i.zoomScale(l-o),d=oe.convert(e.offset),m=i.centerPoint.add(d),g=i.pointLocation(m),y=re.convert(e.center||g);this.normalizeCenter(y);var v=i.project(g),_=i.project(y).sub(v),b=e.curve,x=Math.max(i.width,i.height),w=x/f,S=_.mag();if("minZoom"in e){var E=qt(Math.min(e.minZoom,o,l),i.minZoom,i.maxZoom),M=x/i.zoomScale(E-o);b=Math.sqrt(M/S*2)}var T=b*b;function A(t){var e=(w*w-x*x+(t?-1:1)*T*T*S*S)/(2*(t?w:x)*T*S);return Math.log(Math.sqrt(e*e+1)-e)}function C(t){return(Math.exp(t)-Math.exp(-t))/2}function O(t){return(Math.exp(t)+Math.exp(-t))/2}var P=A(0),k=function(t){return O(P)/O(P+b*t)},L=function(t){return x*((O(P)*(C(e=P+b*t)/O(e))-C(P))/T)/S;var e},I=(A(1)-P)/b;if(Math.abs(S)<1e-6||!isFinite(I)){if(Math.abs(x-w)<1e-6)return this.easeTo(e,n);var R=we.maxDuration&&(e.duration=0),this.zooming=!0,this.rotating=a!==c,this.pitching=h!==s,this.padding=!i.isPaddingEqual(p),this.prepareEase(n,!1),this.ease((function(e){var r=e*I,f=1/k(r);i.zoom=1===e?l:o+i.scaleZoom(f),t.rotating&&(i.bearing=Yt(a,c,e)),t.pitching&&(i.pitch=Yt(s,h,e)),t.padding&&(i.interpolatePadding(u,p,e),m=i.centerPoint.add(d));var g=1===e?y:i.unproject(v.add(_.mult(L(r))).mult(f));i.setLocationAtPoint(i.renderWorldCopies?g.wrap():g,m),t.fireMoveEvents(n)}),(function(){return t.afterEase(n)}),e),this}},{key:"fitScreenCoordinates",value:function(t,e,n,r,i){return this.fitInternal(this.cameraForBoxAndBearing(this.transform.pointLocation(oe.convert(t)),this.transform.pointLocation(oe.convert(e)),n,r),r,i)}},{key:"stop",value:function(t,e){if(this.easeFrameId&&(this.cancelRenderFrame(this.easeFrameId),delete this.easeFrameId,delete this.onEaseFrame),this.onEaseEnd){var n=this.onEaseEnd;delete this.onEaseEnd,n.call(this,e)}return this}},{key:"normalizeBearing",value:function(t,e){t=Wt(t,-180,180);var n=Math.abs(t-e);return Math.abs(t-360-e)180?-360:n<-180?360:0}}},{key:"fireMoveEvents",value:function(t){this.emit("move",new _e("move",t)),this.zooming&&this.emit("zoom",new _e("zoom",t)),this.rotating&&this.emit("rotate",new _e("rotate",t)),this.pitching&&this.emit("rotate",new _e("pitch",t))}},{key:"prepareEase",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.moving=!0,e||n.moving||this.emit("movestart",new _e("movestart",t)),this.zooming&&!n.zooming&&this.emit("zoomstart",new _e("zoomstart",t)),this.rotating&&!n.rotating&&this.emit("rotatestart",new _e("rotatestart",t)),this.pitching&&!n.pitching&&this.emit("pitchstart",new _e("pitchstart",t))}},{key:"afterEase",value:function(t,e){if(!this.easeId||!e||this.easeId!==e){delete this.easeId;var n=this.zooming,r=this.rotating,i=this.pitching;this.moving=!1,this.zooming=!1,this.rotating=!1,this.pitching=!1,this.padding=!1,n&&this.emit("zoomend",new _e("zoomend",t)),r&&this.emit("rotateend",new _e("rotateend",t)),i&&this.emit("pitchend",new _e("pitchend",t)),this.emit("moveend",new _e("moveend",t))}}},{key:"ease",value:function(t,e,n){!1===n.animate||0===n.duration?(t(1),e()):(this.easeStart=Jt(),this.easeOptions=n,this.onEaseFrame=t,this.onEaseEnd=e,this.easeFrameId=this.requestRenderFrame(this.renderFrameCallback))}},{key:"cameraForBoxAndBearing",value:function(t,e,n,r){var i={top:0,bottom:0,right:0,left:0};if("number"==typeof(r=(0,jt.merge)({padding:i,offset:[0,0],maxZoom:this.transform.maxZoom},r)).padding){var o=r.padding;r.padding={top:o,bottom:o,right:o,left:o}}r.padding=(0,jt.merge)(i,r.padding);var a=this.transform,s=a.padding,u=a.project(re.convert(t)),l=a.project(re.convert(e)),c=u.rotate(-n*Math.PI/180),h=l.rotate(-n*Math.PI/180),p=new oe(Math.max(c.x,h.x),Math.max(c.y,h.y)),f=new oe(Math.min(c.x,h.x),Math.min(c.y,h.y)),d=p.sub(f),m=(a.width-(s.left+s.right+r.padding.left+r.padding.right))/d.x,g=(a.height-(s.top+s.bottom+r.padding.top+r.padding.bottom))/d.y;if(!(g<0||m<0)){var y=Math.min(a.scaleZoom(a.scale*Math.min(m,g)),r.maxZoom),v=oe.convert(r.offset),_=(r.padding.left-r.padding.right)/2,b=(r.padding.top-r.padding.bottom)/2,x=new oe(v.x+_,v.y+b).mult(a.scale/a.zoomScale(y));return{center:a.unproject(u.add(l).div(2).sub(x)),zoom:y,bearing:n}}}},{key:"fitInternal",value:function(t,e,n){return t?(delete(e=(0,jt.merge)(t,e)).padding,e.linear?this.easeTo(e,n):this.flyTo(e,n)):this}}]),i}(Ut.EventEmitter);function xe(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return we(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?we(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function we(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n3&&void 0!==arguments[3]?arguments[3]:{};"passive"in r&&Pe?t.addEventListener(e,n,r):t.addEventListener(e,n,r.capture)},Se.removeEventListener=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};"passive"in r&&Pe?t.removeEventListener(e,n,r):t.removeEventListener(e,n,r.capture)};var Le=function t(e){e.preventDefault(),e.stopPropagation(),P.$window.removeEventListener("click",t,!0)};Se.suppressClick=function(){P.isMini||(P.$window.addEventListener("click",Le,!0),setTimeout((function(){P.$window.removeEventListener("click",Le,!0)}),0))},Se.mousePos=function(t,e){if(P.isMini)return new oe(e.clientX-t.left-0,e.clientY-t.top-0);var n=t.getBoundingClientRect();return new oe(e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop)},Se.touchPos=function(t,e){if(P.isMini){var n,r=[],i=xe(e);try{for(i.s();!(n=i.n()).done;){var o=n.value;r.push(new oe(o.clientX-t.left,o.clientY-t.top))}}catch(t){i.e(t)}finally{i.f()}return r}var a,s=t.getBoundingClientRect(),u=[],l=xe(e);try{for(l.s();!(a=l.n()).done;){var c=a.value;u.push(new oe(c.clientX-s.left-t.clientLeft,c.clientY-s.top-t.clientTop))}}catch(t){l.e(t)}finally{l.f()}return u},Se.mouseButton=function(t){return P.isMini&&void 0!==P.$window.InstallTrigger&&2===t.button&&t.ctrlKey&&P.$window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:t.button},Se.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var Ie=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t,e,n){var o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};(0,a.Z)(this,i);var u=Ee.mousePos(e.getCanvasContainer(),n),l=e.unproject(u);return(o=r.call(this,t,ve()({point:u,lngLat:l,originalEvent:n},s))).defaultPrevented=!1,o.target=e,o}return(0,s.Z)(i,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),i}(_e);var Re=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t,e,n){var o;(0,a.Z)(this,i);var s="touchend"===t?n.changedTouches:n.touches,u=Ee.touchPos(e.getCanvasContainer(),s),l=u.map((function(t){return e.unproject(t)})),c=u.reduce((function(t,e,n,r){return t.add(e.div(r.length))}),new oe(0,0)),h=e.unproject(c);return(o=r.call(this,t,{points:u,point:c,lngLats:l,lngLat:h,originalEvent:n})).defaultPrevented=!1,o}return(0,s.Z)(i,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),i}(_e);var De=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t,e,n){var o;return(0,a.Z)(this,i),(o=r.call(this,t,{originalEvent:n})).defaultPrevented=!1,o}return(0,s.Z)(i,[{key:"preventDefault",value:function(){this.defaultPrevented=!0}}]),i}(_e),Ne=function(){function t(e){(0,a.Z)(this,t),this.map=e}return(0,s.Z)(t,[{key:"reset",value:function(){this.delayContextMenu=!1,delete this.contextMenuEvent}},{key:"mousemove",value:function(t){this.map.emit(t.type,new Ie(t.type,this.map,t))}},{key:"mousedown",value:function(){this.delayContextMenu=!0}},{key:"mouseup",value:function(){this.delayContextMenu=!1,this.contextMenuEvent&&(this.map.emit("contextmenu",new Ie("contextmenu",this.map,this.contextMenuEvent)),delete this.contextMenuEvent)}},{key:"contextmenu",value:function(t){this.delayContextMenu?this.contextMenuEvent=t:this.map.emit(t.type,new Ie(t.type,this.map,t)),this.map.listeners("contextmenu")&&t.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}}]),t}(),Fe=function(){function t(e,n){(0,a.Z)(this,t),this.map=e,this.el=e.getCanvasContainer(),this.container=e.getContainer(),this.clickTolerance=n.clickTolerance||1}return(0,s.Z)(t,[{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(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(Ee.disableDrag(),this.startPos=this.lastPos=e,this.active=!0)}},{key:"mousemoveWindow",value:function(t,e){if(this.active){var n=e;if(!(this.lastPos.equals(n)||!this.box&&n.dist(this.startPos)t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&e-t[0].time>160;)t.shift()}},{key:"onMoveEnd",value:function(t){if(this.drainInertiaBuffer(),!(this.inertiaBuffer.length<2)){var e,n={zoom:0,bearing:0,pitch:0,pan:new oe(0,0),pinchAround:void 0,around:void 0},r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ue(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(this.inertiaBuffer);try{for(r.s();!(e=r.n()).done;){var i=e.value.settings;n.zoom+=i.zoomDelta||0,n.bearing+=i.bearingDelta||0,n.pitch+=i.pitchDelta||0,i.panDelta&&n.pan._add(i.panDelta),i.around&&(n.around=i.around),i.pinchAround&&(n.pinchAround=i.pinchAround)}}catch(t){r.e(t)}finally{r.f()}var o=this.inertiaBuffer[this.inertiaBuffer.length-1].time-this.inertiaBuffer[0].time,a={};if(n.pan.mag()){var s=Xe(n.pan.mag(),o,ve()({},Ve,t||{}));a.offset=n.pan.mult(s.amount/n.pan.mag()),a.center=this.map.transform.center,Ye(a,s)}if(n.zoom){var u=Xe(n.zoom,o,Ge);a.zoom=this.map.transform.zoom+u.amount,Ye(a,u)}if(n.bearing){var l=Xe(n.bearing,o,He);a.bearing=this.map.transform.bearing+qt(l.amount,-179,179),Ye(a,l)}if(n.pitch){var c=Xe(n.pitch,o,We);a.pitch=this.map.transform.pitch+c.amount,Ye(a,c)}if(a.zoom||a.bearing){var h=void 0===n.pinchAround?n.around:n.pinchAround;a.around=h?this.map.unproject(h):this.map.getCenter()}return this.clear(),ve()(a,{noMoveStart:!0})}}}]),t}();function Ye(t,e){(!t.duration||t.duration=this.clickTolerance||this.map.emit(t.type,new Ie(t.type,this.map,t))}},{key:"dblclick",value:function(t){return this.firePreventable(new Ie(t.type,this.map,t))}},{key:"mouseover",value:function(t){this.map.emit(t.type,new Ie(t.type,this.map,t))}},{key:"mouseout",value:function(t){this.map.emit(t.type,new Ie(t.type,this.map,t))}},{key:"touchstart",value:function(t){return this.firePreventable(new Re(t.type,this.map,t))}},{key:"touchmove",value:function(t){this.map.emit(t.type,new Re(t.type,this.map,t))}},{key:"touchend",value:function(t){this.map.emit(t.type,new Re(t.type,this.map,t))}},{key:"touchcancel",value:function(t){this.map.emit(t.type,new Re(t.type,this.map,t))}},{key:"firePreventable",value:function(t){if(this.map.emit(t.type,t),t.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}}]),t}(),en=n(9458),nn=(Qe={},(0,w.Z)(Qe,0,1),(0,w.Z)(Qe,2,2),Qe),rn=function(){function t(e){(0,a.Z)(this,t),this.reset(),this.clickTolerance=e.clickTolerance||1}return(0,s.Z)(t,[{key:"reset",value:function(){this.active=!1,this.moved=!1,delete this.lastPoint,delete this.eventButton}},{key:"mousedown",value:function(t,e){if(!this.lastPoint){var n=Ee.mouseButton(t);this.correctButton(t,n)&&(this.lastPoint=e,this.eventButton=n)}}},{key:"mousemoveWindow",value:function(t,e){var n=this.lastPoint;if(n)if(t.preventDefault(),function(t,e){var n=nn[e];return void 0===t.buttons||(t.buttons&n)!==n}(t,this.eventButton))this.reset();else if(this.moved||!(e.dist(n)un?r.wheelZoomRate:r.defaultZoomRate,n=2/(1+Math.exp(-Math.abs(r.delta*e)));r.delta<0&&0!==n&&(n=1/n);var i="number"==typeof r.targetZoom?t.zoomScale(r.targetZoom):t.scale;r.targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(i*n))),"wheel"===r.type&&(r.startZoom=t.zoom,r.easing=r.smoothOutEasing(200)),r.delta=0}var o,a="number"==typeof r.targetZoom?r.targetZoom:t.zoom,s=r.startZoom,u=r.easing,l=!1;if("wheel"===r.type&&s&&u){var c=Math.min((Jt()-r.lastWheelEventTime)/200,1);o=Yt(s,a,u(c)),c<1?r.frameId||(r.frameId=!0):l=!0}else o=a,l=!0;return r.active=!0,l&&(r.active=!1,r.finishTimeout=setTimeout((function(){r.zooming=!1,r.handler.triggerRenderFrame(),delete r.targetZoom,delete r.finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!l,zoomDelta:o-t.zoom,around:r.aroundPoint,originalEvent:r.lastWheelEvent}}})),this.map=e,this.el=e.getCanvasContainer(),this.handler=n,this.delta=0,this.defaultZoomRate=.01,this.wheelZoomRate=.0022222222222222222}return(0,s.Z)(t,[{key:"setZoomRate",value:function(t){this.defaultZoomRate=t}},{key:"setWheelZoomRate",value:function(t){this.wheelZoomRate=t}},{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(t){this.isEnabled()||(this.enabled=!0,this.aroundCenter=t&&"center"===t.around)}},{key:"disable",value:function(){this.isEnabled()&&(this.enabled=!1)}},{key:"wheel",value:function(t){if(this.isEnabled()){var e=t.deltaMode===window.WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY,n=Jt(),r=n-(this.lastWheelEventTime||0);this.lastWheelEventTime=n,0!==e&&e%un==0?this.type="wheel":0!==e&&Math.abs(e)<4?this.type="trackpad":r>400?(this.type=null,this.lastValue=e,this.timeout=setTimeout(this.onTimeout,40,t)):this.type||(this.type=Math.abs(r*e)<200?"trackpad":"wheel",this.timeout&&(clearTimeout(this.timeout),this.timeout=null,e+=this.lastValue)),t.shiftKey&&e&&(e/=4),this.type&&(this.lastWheelEvent=t,this.delta-=e,this.active||this.start(t)),t.preventDefault()}}},{key:"renderFrame",value:function(){return this.onScrollFrame()}},{key:"reset",value:function(){this.active=!1}},{key:"onTimeout",value:function(t){this.type="wheel",this.delta-=this.lastValue,!this.active&&this.start&&this.start(t)}},{key:"start",value:function(t){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 e=Ee.mousePos(this.el,t);this.around=re.convert(this.aroundCenter?this.map.getCenter():this.map.unproject(e)),this.aroundPoint=this.map.transform.locationPoint(this.around),this.frameId||(this.frameId=!0,this.handler.triggerRenderFrame())}}},{key:"smoothOutEasing",value:function(t){var e=$t;if(this.prevEase){var n=this.prevEase,r=(Jt()-n.start)/n.duration,i=n.easing(r+.01)-n.easing(r),o=.27/Math.sqrt(i*i+1e-4)*.01;e=Xt(o,Math.sqrt(.0729-o*o),.25,1)}return this.prevEase={start:Jt(),duration:t,easing:e},e}}]),t}();const cn=ln;var hn=function(){function t(e,n){(0,a.Z)(this,t),this.clickZoom=e,this.tapZoom=n}return(0,s.Z)(t,[{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()}}]),t}(),pn=function(){function t(e,n,r){(0,a.Z)(this,t),this.el=e,this.mousePan=n,this.touchPan=r}return(0,s.Z)(t,[{key:"enable",value:function(t){this.inertiaOptions=t||{},this.mousePan.enable(),this.touchPan.enable(),P.isMini||this.el.classList.add("l7-touch-drag-pan")}},{key:"disable",value:function(){this.mousePan.disable(),this.touchPan.disable(),P.isMini||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()}}]),t}(),fn=function(){function t(e,n,r){(0,a.Z)(this,t),this.pitchWithRotate=e.pitchWithRotate,this.mouseRotate=n,this.mousePitch=r}return(0,s.Z)(t,[{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()}}]),t}(),dn=function(){function t(e,n,r,i){(0,a.Z)(this,t),this.el=e,this.touchZoom=n,this.touchRotate=r,this.tapDragZoom=i,this.rotationDisabled=!1,this.enabled=!0}return(0,s.Z)(t,[{key:"enable",value:function(t){this.touchZoom.enable(t),this.rotationDisabled||this.touchRotate.enable(t),this.tapDragZoom.enable(),P.isMini||this.el.classList.add("l7-touch-zoom-rotate")}},{key:"disable",value:function(){this.touchZoom.disable(),this.touchRotate.disable(),this.tapDragZoom.disable(),P.isMini||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()}}]),t}();function mn(t,e){for(var n={},r=0;rt.length)&&(e=t.length);for(var n=0,r=new Array(e);nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=t.timeStamp),n.length===this.numTouches&&(this.centroid=function(t){var e,n=new oe(0,0),r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return gn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;n._add(i)}}catch(t){r.e(t)}finally{r.f()}return n.div(t.length)}(e),this.touches=mn(n,e)))}},{key:"touchmove",value:function(t,e,n){if(!this.aborted&&this.centroid){var r=mn(n,e);for(var i in this.touches)if(this.touches[i]){var o=this.touches[i],a=r[i];(!a||a.dist(o)>30)&&(this.aborted=!0)}}}},{key:"touchend",value:function(t,e,n){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===n.length){var r=!this.aborted&&this.centroid;if(this.reset(),r)return r}}}]),t}(),vn=function(){function t(e){(0,a.Z)(this,t),this.singleTap=new yn(e),this.numTaps=e.numTaps,this.reset()}return(0,s.Z)(t,[{key:"reset",value:function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}},{key:"touchstart",value:function(t,e,n){this.singleTap.touchstart(t,e,n)}},{key:"touchmove",value:function(t,e,n){this.singleTap.touchmove(t,e,n)}},{key:"touchend",value:function(t,e,n){var r=this.singleTap.touchend(t,e,n);if(r){var i=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(r)<30;if(i&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=r,this.count===this.numTaps)return this.reset(),r}}}]),t}(),_n=function(){function t(){(0,a.Z)(this,t),this.tap=new vn({numTouches:1,numTaps:1}),this.reset()}return(0,s.Z)(t,[{key:"reset",value:function(){this.active=!1,delete this.swipePoint,delete this.swipeTouch,delete this.tapTime,this.tap.reset()}},{key:"touchstart",value:function(t,e,n){this.swipePoint||(this.tapTime&&t.timeStamp-this.tapTime>500&&this.reset(),this.tapTime?n.length>0&&(this.swipePoint=e[0],this.swipeTouch=n[0].identifier):this.tap.touchstart(t,e,n))}},{key:"touchmove",value:function(t,e,n){if(this.tapTime){if(this.swipePoint){if(n[0].identifier!==this.swipeTouch)return;var r=e[0],i=r.y-this.swipePoint.y;return this.swipePoint=r,t.preventDefault(),this.active=!0,{zoomDelta:i/128}}}else this.tap.touchmove(t,e,n)}},{key:"touchend",value:function(t,e,n){this.tapTime?this.swipePoint&&0===n.length&&this.reset():this.tap.touchend(t,e,n)&&(this.tapTime=t.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}}]),t}(),bn=function(){function t(){(0,a.Z)(this,t),this.zoomIn=new vn({numTouches:1,numTaps:2}),this.zoomOut=new vn({numTouches:2,numTaps:1}),this.reset()}return(0,s.Z)(t,[{key:"reset",value:function(){this.active=!1,this.zoomIn.reset(),this.zoomOut.reset()}},{key:"touchstart",value:function(t,e,n){this.zoomIn.touchstart(t,e,n),this.zoomOut.touchstart(t,e,n)}},{key:"touchmove",value:function(t,e,n){this.zoomIn.touchmove(t,e,n),this.zoomOut.touchmove(t,e,n)}},{key:"touchend",value:function(t,e,n){var r=this,i=this.zoomIn.touchend(t,e,n),o=this.zoomOut.touchend(t,e,n);return i?(this.active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):o?(this.active=!0,t.preventDefault(),setTimeout((function(){return r.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):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}}]),t}(),xn=function(){function t(e){(0,a.Z)(this,t),this.minTouches=1,this.clickTolerance=e.clickTolerance||1,this.reset()}return(0,s.Z)(t,[{key:"reset",value:function(){this.active=!1,this.touches={},this.sum=new oe(0,0)}},{key:"touchstart",value:function(t,e,n){return this.calculateTransform(t,e,n)}},{key:"touchmove",value:function(t,e,n){if(this.active)return t.preventDefault(),this.calculateTransform(t,e,n)}},{key:"touchend",value:function(t,e,n){this.calculateTransform(t,e,n),this.active&&n.length0&&(this.active=!0);var r=mn(n,e),i=new oe(0,0),o=new oe(0,0),a=0;for(var s in r)if(r[s]){var u=r[s],l=this.touches[s];l&&(i._add(u),o._add(u.sub(l)),a++,r[s]=u)}if(this.touches=r,!(aMath.abs(t.x)}var Mn=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){return(0,a.Z)(this,i),r.apply(this,arguments)}return(0,s.Z)(i,[{key:"reset",value:function(){(0,en.Z)((0,c.Z)(i.prototype),"reset",this).call(this),this.valid=void 0,delete this.firstMove,delete this.lastPoints}},{key:"start",value:function(t){this.lastPoints=t,En(t[0].sub(t[1]))&&(this.valid=!1)}},{key:"move",value:function(t,e,n){var r=t[0].sub(this.lastPoints[0]),i=t[1].sub(this.lastPoints[1]);if(this.valid=this.gestureBeginsVertically(r,i,n.timeStamp),this.valid)return this.lastPoints=t,this.active=!0,{pitchDelta:(r.y+i.y)/2*-.5}}},{key:"gestureBeginsVertically",value:function(t,e,n){if(void 0!==this.valid)return this.valid;var r=t.mag()>=2,i=e.mag()>=2;if(r||i){if(!r||!i)return void 0===this.firstMove&&(this.firstMove=n),n-this.firstMove<100&&void 0;var o=t.y>0==e.y>0;return En(t)&&En(e)&&o}}}]),i}(wn);function Tn(t,e){return 180*t.angleWith(e)/Math.PI}var An=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){return(0,a.Z)(this,i),r.apply(this,arguments)}return(0,s.Z)(i,[{key:"reset",value:function(){(0,en.Z)((0,c.Z)(i.prototype),"reset",this).call(this),delete this.minDiameter,delete this.startVector,delete this.vector}},{key:"start",value:function(t){this.startVector=this.vector=t[0].sub(t[1]),this.minDiameter=t[0].dist(t[1])}},{key:"move",value:function(t,e){var n=this.vector;if(this.vector=t[0].sub(t[1]),this.active||!this.isBelowThreshold(this.vector))return this.active=!0,{bearingDelta:Tn(this.vector,n),pinchAround:e}}},{key:"isBelowThreshold",value:function(t){this.minDiameter=Math.min(this.minDiameter,t.mag());var e=25/(Math.PI*this.minDiameter)*360,n=Tn(t,this.startVector);return Math.abs(n)=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function kn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function jn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:0,e=this.currentlyRunning=this.queue;this.queue=[];var n,r=Bn(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!i.cancelled&&(i.callback(t),this.cleared))break}}catch(t){r.e(t)}finally{r.f()}this.cleared=!1,this.currentlyRunning=!1}},{key:"clear",value:function(){this.currentlyRunning&&(this.cleared=!0),this.queue=[]}}]),t}();!function(t,e){var n="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,r="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);if(!n&&!r&&(e||(e=document),e)){var i=e.head||e.getElementsByTagName("head")[0];if(!i){i=e.createElement("head");var o=e.body||e.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(i,o):e.documentElement.appendChild(i)}var a=e.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),i.appendChild(a)}}(".l7-map {\n font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;\n overflow: hidden;\n position: relative;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.l7-canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.l7-map:-webkit-full-screen {\n width: 100%;\n height: 100%;\n}\n\n.l7-canary {\n background-color: salmon;\n}\n\n.l7-canvas-container.l7-interactive,\n.l7-ctrl-group button.l7-ctrl-compass {\n cursor: -webkit-grab;\n cursor: grab;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.l7-canvas-container.l7-interactive.l7-track-pointer {\n cursor: pointer;\n}\n\n.l7-canvas-container.l7-interactive:active,\n.l7-ctrl-group button.l7-ctrl-compass:active {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n\n.l7-canvas-container.l7-touch-zoom-rotate,\n.l7-canvas-container.l7-touch-zoom-rotate .l7-canvas {\n -ms-touch-action: pan-x pan-y;\n touch-action: pan-x pan-y;\n}\n\n.l7-canvas-container.l7-touch-drag-pan,\n.l7-canvas-container.l7-touch-drag-pan .l7-canvas {\n -ms-touch-action: pinch-zoom;\n touch-action: pinch-zoom;\n}\n\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan,\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan .l7-canvas {\n -ms-touch-action: none;\n touch-action: none;\n}\n\n.l7-ctrl-top-left,\n.l7-ctrl-top-right,\n.l7-ctrl-bottom-left,\n.l7-ctrl-bottom-right { position: absolute; pointer-events: none; z-index: 2; }\n.l7-ctrl-top-left { top: 0; left: 0; }\n.l7-ctrl-top-right { top: 0; right: 0; }\n.l7-ctrl-bottom-left { bottom: 0; left: 0; }\n.l7-ctrl-bottom-right { right: 0; bottom: 0; }\n\n.l7-ctrl {\n clear: both;\n pointer-events: auto;\n\n /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.l7-ctrl-top-left .l7-ctrl { margin: 10px 0 0 10px; float: left; }\n.l7-ctrl-top-right .l7-ctrl { margin: 10px 10px 0 0; float: right; }\n.l7-ctrl-bottom-left .l7-ctrl { margin: 0 0 10px 10px; float: left; }\n.l7-ctrl-bottom-right .l7-ctrl { margin: 0 10px 10px 0; float: right; }\n\n\n.l7-crosshair,\n.l7-crosshair .l7-interactive,\n.l7-crosshair .l7-interactive:active {\n cursor: crosshair;\n}\n\n.l7-boxzoom {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n background: #fff;\n border: 2px dotted #202020;\n opacity: 0.5;\n z-index: 10;\n}\n");var Zn={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},Vn=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t){var e;return(0,a.Z)(this,i),e=r.call(this,(0,jt.merge)({},Zn,t)),(0,w.Z)((0,x.Z)(e),"renderTaskQueue",new Un),(0,w.Z)((0,x.Z)(e),"trackResize",!0),(0,w.Z)((0,x.Z)(e),"onWindowOnline",(function(){e.update()})),(0,w.Z)((0,x.Z)(e),"onWindowResize",(function(t){e.trackResize&&e.resize({originalEvent:t}).update()})),e.initContainer(),e.resize(),e.handlers=new Dn((0,x.Z)(e),e.options),"undefined"!=typeof window&&(window.addEventListener("online",e.onWindowOnline,!1),window.addEventListener("resize",e.onWindowResize,!1),window.addEventListener("orientationchange",e.onWindowResize,!1)),e}return(0,s.Z)(i,[{key:"resize",value:function(t){var e=this.containerDimensions(),n=e[0],r=e[1];this.transform.resize(n,r);var i=!this.moving;return i&&(this.stop(),this.emit("movestart",new Event("movestart",t)),this.emit("move",new Event("move",t))),this.emit("resize",new Event("resize",t)),i&&this.emit("moveend",new Event("moveend",t)),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(t){return this.transform.locationPoint(re.convert(t))}},{key:"unproject",value:function(t){return this.transform.pointLocation(oe.convert(t))}},{key:"getBounds",value:function(){return this.transform.getBounds()}},{key:"getMaxBounds",value:function(){return this.transform.getMaxBounds()}},{key:"setMaxBounds",value:function(t){this.transform.setMaxBounds(ie.convert(t))}},{key:"setStyle",value:function(t){}},{key:"setMinZoom",value:function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"setMinPitch",value:function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to ".concat(0));if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this.getPitch()60)throw new Error("maxPitch must be less than or equal to ".concat(60));if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this.getPitch()>t&&this.setPitch(t),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(t){this.transform.renderWorldCopies=!!t}},{key:"remove",value:function(){this.frame&&(this.frame.cancel(),this.frame=null),this.renderTaskQueue.clear()}},{key:"requestRenderFrame",value:function(t){return this.update(),this.renderTaskQueue.add(t)}},{key:"cancelRenderFrame",value:function(t){return this.renderTaskQueue.remove(t)}},{key:"triggerRepaint",value:function(){var t=this;this.frame||(this.frame=ee((function(e){zn(e),t.frame=null,t.update(e)})))}},{key:"update",value:function(t){var e=this;this.frame||(this.frame=ee((function(n){zn(n),e.frame=null,e.renderTaskQueue.run(t)})))}},{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 t=this.container;t.classList.add("l7-map");var e=this.canvasContainer=P.DOM.create("div","l7-canvas-container",t);this.options.interactive&&e.classList.add("l7-interactive")}},{key:"containerDimensions",value:function(){var t=0,e=0;return this.container&&(t=this.container.clientWidth||400,e=this.container.clientHeight||300),[t,e]}},{key:"resizeCanvas",value:function(t,e){var n=P.DOM.DPR||1;this.canvas.width=n*t,this.canvas.height=n*e,this.canvas.style.width="".concat(t,"px"),this.canvas.style.height="".concat(e,"px")}}]),i}(be),Gn=function(){function t(e){var n=this;(0,a.Z)(this,t),(0,w.Z)(this,"onHashChange",(function(){var t=n.getCurrentHash();if(t.length>=3&&!t.some((function(t){return isNaN(+t)}))){var e=n.map.dragRotate.isEnabled()&&n.map.touchZoomRotate.isEnabled()?+(t[3]||0):n.map.getBearing();return n.map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1})),(0,w.Z)(this,"getCurrentHash",(function(){var t,e=window.location.hash.replace("#","");return n.hashName?(e.split("&").map((function(t){return t.split("=")})).forEach((function(e){e[0]===n.hashName&&(t=e)})),(t&&t[1]||"").split("/")):e.split("/")})),(0,w.Z)(this,"updateHashUnthrottled",(function(){var t=n.getHashString();try{window.history.replaceState(window.history.state,"",t)}catch(t){}})),this.hashName=e&&encodeURIComponent(e),this.updateHash=(0,jt.throttle)(this.updateHashUnthrottled,300)}return(0,s.Z)(t,[{key:"addTo",value:function(t){return this.map=t,P.$window.addEventListener("hashchange",this.onHashChange,!1),this.map.on("moveend",this.updateHash),this}},{key:"remove",value:function(){return P.$window.removeEventListener("hashchange",this.onHashChange,!1),this.map.off("moveend",this.updateHash),delete this.map,this}},{key:"getHashString",value:function(t){var e=this.map.getCenter(),n=Math.round(100*this.map.getZoom())/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),o=Math.round(e.lng*i)/i,a=Math.round(e.lat*i)/i,s=this.map.getBearing(),u=this.map.getPitch(),l="";if(l+=t?"/".concat(o,"/").concat(a,"/").concat(n):"".concat(n,"/").concat(a,"/").concat(o),(s||u)&&(l+="/".concat(Math.round(10*s)/10)),u&&(l+="/".concat(Math.round(u))),this.hashName){var c=this.hashName,h=!1,p=window.location.hash.slice(1).split("&").map((function(t){var e=t.split("=")[0];return e===c?(h=!0,"".concat(e,"=").concat(l)):t})).filter((function(t){return t}));return h||p.push("".concat(c,"=").concat(l)),"#".concat(p.join("&"))}return"#".concat(l)}}]),t}();const Hn=Gn;!function(t,e){var n="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,r="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);if(!n&&!r&&(e||(e=document),e)){var i=e.head||e.getElementsByTagName("head")[0];if(!i){i=e.createElement("head");var o=e.body||e.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(i,o):e.documentElement.appendChild(i)}var a=e.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),i.appendChild(a)}}(".l7-map {\n font: 12px/20px 'Helvetica Neue', Arial, Helvetica, sans-serif;\n overflow: hidden;\n position: relative;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.l7-canvas {\n position: absolute;\n left: 0;\n top: 0;\n}\n\n.l7-map:-webkit-full-screen {\n width: 100%;\n height: 100%;\n}\n\n.l7-canary {\n background-color: salmon;\n}\n\n.l7-canvas-container.l7-interactive,\n.l7-ctrl-group button.l7-ctrl-compass {\n cursor: -webkit-grab;\n cursor: grab;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.l7-canvas-container.l7-interactive.l7-track-pointer {\n cursor: pointer;\n}\n\n.l7-canvas-container.l7-interactive:active,\n.l7-ctrl-group button.l7-ctrl-compass:active {\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n\n.l7-canvas-container.l7-touch-zoom-rotate,\n.l7-canvas-container.l7-touch-zoom-rotate .l7-canvas {\n -ms-touch-action: pan-x pan-y;\n touch-action: pan-x pan-y;\n}\n\n.l7-canvas-container.l7-touch-drag-pan,\n.l7-canvas-container.l7-touch-drag-pan .l7-canvas {\n -ms-touch-action: pinch-zoom;\n touch-action: pinch-zoom;\n}\n\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan,\n.l7-canvas-container.l7-touch-zoom-rotate.l7-touch-drag-pan .l7-canvas {\n -ms-touch-action: none;\n touch-action: none;\n}\n\n.l7-ctrl-top-left,\n.l7-ctrl-top-right,\n.l7-ctrl-bottom-left,\n.l7-ctrl-bottom-right { position: absolute; pointer-events: none; z-index: 2; }\n.l7-ctrl-top-left { top: 0; left: 0; }\n.l7-ctrl-top-right { top: 0; right: 0; }\n.l7-ctrl-bottom-left { bottom: 0; left: 0; }\n.l7-ctrl-bottom-right { right: 0; bottom: 0; }\n\n.l7-ctrl {\n clear: both;\n pointer-events: auto;\n\n /* workaround for a Safari bug https://github.com/mapbox/mapbox-gl-js/issues/8185 */\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.l7-ctrl-top-left .l7-ctrl { margin: 10px 0 0 10px; float: left; }\n.l7-ctrl-top-right .l7-ctrl { margin: 10px 10px 0 0; float: right; }\n.l7-ctrl-bottom-left .l7-ctrl { margin: 0 0 10px 10px; float: left; }\n.l7-ctrl-bottom-right .l7-ctrl { margin: 0 10px 10px 0; float: right; }\n\n\n.l7-crosshair,\n.l7-crosshair .l7-interactive,\n.l7-crosshair .l7-interactive:active {\n cursor: crosshair;\n}\n\n.l7-boxzoom {\n position: absolute;\n top: 0;\n left: 0;\n width: 0;\n height: 0;\n background: #fff;\n border: 2px dotted #202020;\n opacity: 0.5;\n z-index: 10;\n}\n");var Wn,qn,Yn,Xn,$n,Kn,Jn,Qn,tr,er,nr,rr,ir={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},or=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t){var e;if((0,a.Z)(this,i),e=r.call(this,(0,jt.merge)({},ir,t)),(0,w.Z)((0,x.Z)(e),"renderTaskQueue",new Un),(0,w.Z)((0,x.Z)(e),"trackResize",!0),(0,w.Z)((0,x.Z)(e),"onWindowOnline",(function(){e.update()})),(0,w.Z)((0,x.Z)(e),"onWindowResize",(function(t){e.trackResize&&e.resize({originalEvent:t}).update()})),P.isMini?e.initMiniContainer():e.initContainer(),e.resize(),e.handlers=new Dn((0,x.Z)(e),e.options),"undefined"!=typeof window&&(window.addEventListener("online",e.onWindowOnline,!1),window.addEventListener("resize",e.onWindowResize,!1),window.addEventListener("orientationchange",e.onWindowResize,!1)),!P.isMini){var n="string"==typeof t.hash&&t.hash||void 0;t.hash&&(e.hash=new Hn(n).addTo((0,x.Z)(e)))}return e.hash&&e.hash.onHashChange()||(e.jumpTo({center:t.center,zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}),t.bounds&&(e.resize(),e.fitBounds(t.bounds,(0,jt.merge)({},t.fitBoundsOptions,{duration:0})))),e}return(0,s.Z)(i,[{key:"resize",value:function(t){var e=this.containerDimensions(),n=(0,g.Z)(e,2),r=n[0],i=n[1];if(this.transform.resize(r,i),P.isMini)return this;var o=!this.moving;return o&&(this.stop(),this.emit("movestart",new P.$window.Event("movestart",t)),this.emit("move",new P.$window.Event("move",t))),this.emit("resize",new P.$window.Event("resize",t)),o&&this.emit("moveend",new P.$window.Event("moveend",t)),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(t){return this.transform.locationPoint(re.convert(t))}},{key:"unproject",value:function(t){return this.transform.pointLocation(oe.convert(t))}},{key:"getBounds",value:function(){return this.transform.getBounds()}},{key:"getMaxBounds",value:function(){return this.transform.getMaxBounds()}},{key:"setMaxBounds",value:function(t){this.transform.setMaxBounds(ie.convert(t))}},{key:"setStyle",value:function(t){}},{key:"setMinZoom",value:function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")}},{key:"getMaxZoom",value:function(){return this.transform.maxZoom}},{key:"setMinPitch",value:function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to ".concat(0));if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this.getPitch()60)throw new Error("maxPitch must be less than or equal to ".concat(60));if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this.getPitch()>t&&this.setPitch(t),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(t){this.transform.renderWorldCopies=!!t}},{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(t){return this.update(),this.renderTaskQueue.add(t)}},{key:"cancelRenderFrame",value:function(t){return this.renderTaskQueue.remove(t)}},{key:"triggerRepaint",value:function(){var t=this;this.frame||(this.frame=ee((function(e){zn(e),t.frame=null,t.update(e)})))}},{key:"update",value:function(t){var e=this;this.frame||(this.frame=ee((function(n){zn(n),e.frame=null,e.renderTaskQueue.run(t)})))}},{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 t=this.container;t.classList.add("l7-map");var e=this.canvasContainer=P.DOM.create("div","l7-canvas-container",t);this.options.interactive&&e.classList.add("l7-interactive")}},{key:"initMiniContainer",value:function(){this.container=this.options.canvas,this.canvasContainer=this.container}},{key:"containerDimensions",value:function(){var t=0,e=0;return this.container&&(P.isMini?(t=this.container.width/P.$window.devicePixelRatio,e=this.container.height/P.$window.devicePixelRatio):(t=0===(t=this.container.clientWidth)?400:t,e=0===(e=this.container.clientHeight)?300:e)),[t,e]}}]),i}(be),ar={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"}}]}},sr={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},ur=(Wn=(0,A.b2)(),qn=(0,A.f3)(d.TYPES.MapConfig),Yn=(0,A.f3)(d.TYPES.IGlobalConfigService),Xn=(0,A.f3)(d.TYPES.ICoordinateSystemService),$n=(0,A.f3)(d.TYPES.IEventEmitter),Wn((Jn=function(){function t(){var e=this;(0,a.Z)(this,t),(0,w.Z)(this,"version",k.G.DEFUALT),(0,w.Z)(this,"simpleMapCoord",new L),(0,w.Z)(this,"bgColor","rgba(0.0, 0.0, 0.0, 0.0)"),(0,p.Z)(this,"config",Qn,this),(0,p.Z)(this,"configService",tr,this),(0,p.Z)(this,"coordinateSystemService",er,this),(0,p.Z)(this,"eventEmitter",nr,this),(0,w.Z)(this,"handleCameraChanged",(function(t){var n=e.map.getCenter(),r=n.lat,i=n.lng;e.emit("mapchange"),e.viewport.syncWithMapCamera({bearing:e.map.getBearing(),center:[i,r],viewportHeight:e.map.transform.height,pitch:e.map.getPitch(),viewportWidth:e.map.transform.width,zoom:e.map.getZoom(),cameraHeight:0}),e.updateCoordinateSystemService(),e.cameraChangedCallback(e.viewport)}))}return(0,s.Z)(t,[{key:"setBgColor",value:function(t){this.bgColor=t}},{key:"addMarkerContainer",value:function(){var t=this.map.getCanvasContainer();this.markerContainer=P.DOM.create("div","l7-marker-container",t),this.markerContainer.setAttribute("tabindex","-1")}},{key:"getMarkerContainer",value:function(){return this.markerContainer}},{key:"getOverlayContainer",value:function(){}},{key:"on",value:function(t,e){-1!==d.MapServiceEvent.indexOf(t)?this.eventEmitter.on(t,e):this.map.on(sr[t]||t,e)}},{key:"off",value:function(t,e){this.map.off(sr[t]||t,e),this.eventEmitter.off(t,e)}},{key:"getContainer",value:function(){return this.map.getContainer()}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){if(this.version===k.G.SIMPLE)return this.simpleMapCoord.getSize();var t=this.map.transform;return[t.width,t.height]}},{key:"getType",value:function(){return"default"}},{key:"getZoom",value:function(){return this.map.getZoom()}},{key:"setZoom",value:function(t){return this.map.setZoom(t)}},{key:"getCenter",value:function(){return this.map.getCenter()}},{key:"setCenter",value:function(t){this.map.setCenter(t)}},{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(t){this.map.setBearing(t)}},{key:"zoomIn",value:function(t,e){this.map.zoomIn(t,e)}},{key:"zoomOut",value:function(t,e){this.map.zoomOut(t,e)}},{key:"setPitch",value:function(t){return this.map.setPitch(t)}},{key:"panTo",value:function(t){this.map.panTo(t)}},{key:"panBy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.map.panBy([t,e])}},{key:"fitBounds",value:function(t,e){this.map.fitBounds(t,e)}},{key:"setMaxZoom",value:function(t){this.map.setMaxZoom(t)}},{key:"setMinZoom",value:function(t){this.map.setMinZoom(t)}},{key:"setMapStatus",value:function(t){!0===t.doubleClickZoom&&this.map.doubleClickZoom.enable(),!1===t.doubleClickZoom&&this.map.doubleClickZoom.disable(),!1===t.dragEnable&&this.map.dragPan.disable(),!0===t.dragEnable&&this.map.dragPan.enable(),!1===t.rotateEnable&&this.map.dragRotate.disable(),!0===t.dragEnable&&this.map.dragRotate.enable(),!1===t.keyboardEnable&&this.map.keyboard.disable(),!0===t.keyboardEnable&&this.map.keyboard.enable(),!1===t.zoomEnable&&this.map.scrollZoom.disable(),!0===t.zoomEnable&&this.map.scrollZoom.enable()}},{key:"setZoomAndCenter",value:function(t,e){this.map.flyTo({zoom:t,center:e})}},{key:"setMapStyle",value:function(t){this.map.setStyle(this.getMapStyleValue(t))}},{key:"meterToCoord",value:function(t,e){return 1}},{key:"pixelToLngLat",value:function(t){return this.map.unproject(t)}},{key:"lngLatToPixel",value:function(t){return this.map.project(t)}},{key:"containerToLngLat",value:function(t){return this.map.unproject(t)}},{key:"lngLatToContainer",value:function(t){return this.map.project(t)}},{key:"getMapStyle",value:function(){try{var t,e=null!==(t=this.map.getStyle().sprite)&&void 0!==t?t:"";return/^mapbox:\/\/sprites\/zcxduo\/\w+\/\w+$/.test(e)?null==e?void 0:e.replace(/\/\w+$/,"").replace(/sprites/,"styles"):e}catch(t){return""}}},{key:"getMapStyleConfig",value:function(){return ar}},{key:"getMapStyleValue",value:function(t){var e;return null!==(e=this.getMapStyleConfig()[t])&&void 0!==e?e:t}},{key:"destroy",value:function(){this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i12&&e?this.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.LNGLAT_OFFSET):this.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.LNGLAT)}}]),t}(),Qn=(0,f.Z)(Jn.prototype,"config",[qn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),tr=(0,f.Z)(Jn.prototype,"configService",[Yn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),er=(0,f.Z)(Jn.prototype,"coordinateSystemService",[Xn],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),nr=(0,f.Z)(Jn.prototype,"eventEmitter",[$n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Kn=Jn))||Kn),lr=function(){function t(){(0,a.Z)(this,t),(0,w.Z)(this,"xzReg",.6*-Math.PI),(0,w.Z)(this,"yReg",.2*Math.PI),(0,w.Z)(this,"earthCameraRadius",200),(0,w.Z)(this,"earthCameraZoom",1),(0,w.Z)(this,"cameraPosition",T.create()),(0,w.Z)(this,"projectionMatrix",M.create()),(0,w.Z)(this,"modelMatrix",M.create()),(0,w.Z)(this,"viewMatrix",M.create()),(0,w.Z)(this,"viewProjectionMatrix",M.create()),(0,w.Z)(this,"ViewProjectionMatrixUncentered",M.create()),(0,w.Z)(this,"viewUncenteredMatrix",M.create())}return(0,s.Z)(t,[{key:"syncWithMapCamera",value:function(t){var e=t.viewportHeight,n=void 0===e?1:e,r=t.viewportWidth,i=(void 0===r?1:r)/n;M.perspective(this.projectionMatrix,20,i,.1,1e4);var o=this.earthCameraRadius*Math.cos(this.xzReg),a=this.earthCameraRadius*Math.sin(this.xzReg),s=this.earthCameraRadius*Math.sin(this.yReg);this.cameraPosition=T.fromValues(o,s,a),T.normalize(this.cameraPosition,this.cameraPosition),T.multiply(this.cameraPosition,this.cameraPosition,T.fromValues(this.earthCameraRadius,this.earthCameraRadius,this.earthCameraRadius)),T.scale(this.cameraPosition,this.cameraPosition,this.earthCameraZoom);var u=T.create();T.cross(u,this.cameraPosition,T.fromValues(0,1,0));var l=T.fromValues(0,1,0);T.cross(l,u,this.cameraPosition);var c=T.fromValues(0,0,0);M.lookAt(this.viewMatrix,this.cameraPosition,c,l),this.viewUncenteredMatrix=M.clone(this.viewMatrix),M.multiply(this.viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),M.multiply(this.ViewProjectionMatrixUncentered,this.projectionMatrix,this.viewMatrix)}},{key:"rotateY",value:function(t){this.xzReg+=t*Math.min(this.earthCameraZoom*this.earthCameraZoom,1)}},{key:"rotateX",value:function(t){this.yReg+=t*Math.min(this.earthCameraZoom*this.earthCameraZoom,1)}},{key:"scaleZoom",value:function(t){this.earthCameraZoom+=t,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(t,e){return this.viewport.projectFlat(t,e)}}]),t}(),cr=["id","style","rotation"];var hr={mapmove:"move",camerachange:"move",zoomchange:"zoom",dragging:"drag"},pr=(0,A.b2)()(rr=function(t){(0,u.Z)(o,t);var e,n,r,i=(n=o,r=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}}(),function(){var t,e=(0,c.Z)(n);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,l.Z)(this,t)});function o(){var t;(0,a.Z)(this,o);for(var e=arguments.length,n=new Array(e),r=0;rMath.abs(e.originalEvent.movementY)?e.originalEvent.movementX>0?t.viewport.rotateY(.02):e.originalEvent.movementX<0&&t.viewport.rotateY(-.02):e.originalEvent.movementY>0?t.viewport.rotateX(.02):e.originalEvent.movementY<0&&t.viewport.rotateX(-.02));var n=t.config.offsetCoordinate,r=void 0===n||n;t.viewport.syncWithMapCamera({viewportHeight:t.map.transform.height,viewportWidth:t.map.transform.width}),t.viewport.getZoom()>12&&r?t.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.LNGLAT_OFFSET):t.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.LNGLAT),t.cameraChangedCallback(t.viewport)})),t}return(0,s.Z)(o,[{key:"lngLatToMercator",value:function(t,e){throw new Error("Method not implemented.")}},{key:"getModelMatrix",value:function(t,e,n,r,i){throw new Error("Method not implemented.")}},{key:"on",value:function(t,e){-1!==d.MapServiceEvent.indexOf(t)?this.eventEmitter.on(t,e):this.map.on(hr[t]||t,e)}},{key:"off",value:function(t,e){this.map.off(hr[t]||t,e),this.eventEmitter.off(t,e)}},{key:"getMapCanvasContainer",value:function(){return this.map.getCanvasContainer()}},{key:"getSize",value:function(){var t=this.map.transform;return[t.width,t.height]}},{key:"getType",value:function(){return"earth"}},{key:"init",value:(e=(0,b.Z)(E().mark((function t(){var e,n,r,i,o,a,s,u;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.config,n=e.id,r=void 0===n?"map":n,i=e.style,o=void 0===i?"light":i,a=e.rotation,s=void 0===a?0:a,u=(0,_.Z)(e,cr),this.viewport=new lr,this.$mapContainer=this.creatMapContainer(r),this.map=new Vn((0,h.Z)({container:this.$mapContainer,style:this.getMapStyleValue(o),bearing:s},u)),this.map.on("load",this.handleCameraChanged),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged({});case 7:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){var t,e;null===(t=this.$mapContainer)||void 0===t||null===(e=t.parentNode)||void 0===e||e.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i12&&s?t.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.LNGLAT_OFFSET):t.coordinateSystemService.setCoordinateSystem(d.CoordinateSystem.LNGLAT),t.cameraChangedCallback(t.viewport)})),t}return(0,s.Z)(p,[{key:"lngLatToCoord",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0,z:0},n=this.lngLatToMercator(t,0),r=n.x,i=n.y;return[r-e.x,i-e.y]}},{key:"lngLatToMercator",value:function(t,e){var n=de.fromLngLat(t,e),r=n.x,i=void 0===r?0:r,o=n.y,a=void 0===o?0:o,s=n.z;return{x:i,y:a,z:void 0===s?0:s}}},{key:"getModelMatrix",value:function(t,e,n){var r=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},o=de.fromLngLat(t,e),a=o.meterInMercatorCoordinateUnits(),s=M.create();return M.translate(s,s,T.fromValues(o.x-i.x,o.y-i.y,o.z||0-i.z)),M.scale(s,s,T.fromValues(a*r[0],-a*r[1],a*r[2])),M.rotateX(s,s,n[0]),M.rotateY(s,s,n[1]),M.rotateZ(s,s,n[2]),s}},{key:"init",value:(n=(0,b.Z)(E().mark((function t(){var e,n,r,i,o,a,s,u,l,c,p,f,d,m,g,y=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.config,n=e.id,r=void 0===n?"map":n,i=e.style,o=void 0===i?"light":i,a=e.rotation,s=void 0===a?0:a,u=e.mapInstance,l=e.version,c=void 0===l?"DEFAULTMAP":l,p=e.mapSize,f=void 0===p?1e4:p,d=e.interactive,m=void 0===d||d,g=(0,_.Z)(e,mr),this.viewport=new st,this.version=c,this.simpleMapCoord.setSize(f),c===k.G.SIMPLE&&g.center&&(g.center=this.simpleMapCoord.unproject(g.center)),u?(this.map=u,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(r),this.map=new or((0,h.Z)({container:this.$mapContainer,style:this.getMapStyleValue(o),bearing:s},g))),this.map.on("load",(function(){y.handleCameraChanged()})),m&&this.map.on("move",this.handleCameraChanged),setTimeout((function(){y.handleCameraChanged()}),100),this.handleCameraChanged();case 10:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"initMiniMap",value:(e=(0,b.Z)(E().mark((function t(){var e,n,r,i,o,a,s,u,l,c,p,f=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(e=this.config).id,n=e.style,r=void 0===n?"light":n,i=e.rotation,o=void 0===i?0:i,e.mapInstance,a=e.canvas,s=void 0===a?null:a,u=e.hasBaseMap,l=void 0!==u&&u,c=(0,_.Z)(e,gr),this.viewport=new st,this.$mapContainer=s,this.map=new or((0,h.Z)({container:this.$mapContainer,style:this.getMapStyleValue(r),bearing:o,canvas:s},c)),l?(p=this.map.getCenter(),this.handleMiniCameraChanged(p.lng,p.lat,this.map.getZoom(),this.map.getBearing(),this.map.getPitch()),P.$window.document.addEventListener("mapCameaParams",(function(t){var e=t.e,n=e.longitude,r=e.latitude,i=e.scale,o=e.bearing,a=e.pitch;f.handleMiniCameraChanged(n,r,i-1.25,o,a)}))):(this.map.on("load",this.handleCameraChanged),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged());case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"exportMap",value:function(t){var e=this.map.getCanvas();return"jpg"===t?null==e?void 0:e.toDataURL("image/jpeg"):null==e?void 0:e.toDataURL("image/png")}}]),p}(ur))||fr;var vr,_r=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){return(0,a.Z)(this,i),r.apply(this,arguments)}return(0,s.Z)(i,[{key:"getServiceConstructor",value:function(){return yr}}]),i}(m),br=n(2946),xr=n.n(br),wr=function(){function t(){(0,a.Z)(this,t)}return(0,s.Z)(t,[{key:"syncWithMapCamera",value:function(t){var e=t.center,n=t.zoom,r=t.pitch,i=t.bearing,o=t.viewportHeight,a=t.viewportWidth;this.viewport=new at({width:a,height:o,longitude:e&&e[0],latitude:e&&e[1],zoom:n,pitch:r,bearing:i})}},{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(t,e){return this.viewport.projectFlat(t,e)}}]),t}(),Sr=["id","attributionControl","style","token","rotation","mapInstance"];!function(t,e){var n="undefined"!=typeof my&&!!my&&"function"==typeof my.showToast&&!0!==my.isFRM,r="undefined"!=typeof wx&&null!==wx&&(void 0!==wx.request||void 0!==wx.miniProgram);if(!n&&!r&&(e||(e=document),e)){var i=e.head||e.getElementsByTagName("head")[0];if(!i){i=e.createElement("head");var o=e.body||e.getElementsByTagName("body")[0];o?o.parentNode.insertBefore(i,o):e.documentElement.appendChild(i)}var a=e.createElement("style");a.type="text/css",a.styleSheet?a.styleSheet.cssText=t:a.appendChild(e.createTextNode(t)),i.appendChild(a)}}(".mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-canvas{position:absolute;left:0;top:0}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass{cursor:-webkit-grab;cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer{cursor:pointer}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active{cursor:-webkit-grabbing;cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:pinch-zoom;touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{-ms-touch-action:none;touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;-webkit-transform:translate(0);transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;background:#fff}.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 2px rgba(0,0,0,.1);box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (-ms-high-contrast:active){.mapboxgl-ctrl-group:not(:empty){-webkit-box-shadow:0 0 0 2px ButtonText;box-shadow:0 0 0 2px ButtonText}}.mapboxgl-ctrl-group button{width:29px;height:29px;display:block;padding:0;outline:none;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group button+button{border-top:1px solid #ddd}.mapboxgl-ctrl button .mapboxgl-ctrl-icon{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50%}@media (-ms-high-contrast:active){.mapboxgl-ctrl-icon{background-color:transparent}.mapboxgl-ctrl-group button+button{border-top:1px solid ButtonText}}.mapboxgl-ctrl button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl-attrib-button:focus,.mapboxgl-ctrl-group button:focus{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl button:disabled{cursor:not-allowed}.mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon{opacity:.25}.mapboxgl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-group button:focus:focus-visible{-webkit-box-shadow:0 0 2px 2px #0096ff;box-shadow:0 0 2px 2px #0096ff}.mapboxgl-ctrl-group button:focus:not(:focus-visible){-webkit-box-shadow:none;box-shadow:none}.mapboxgl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.mapboxgl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.mapboxgl-ctrl-group button:focus:only-child{border-radius:inherit}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%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\")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%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){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%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\")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%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){.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%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\")}.mapboxgl-ctrl button.mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%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\")}}.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%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\")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%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){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%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\")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%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){.mapboxgl-ctrl button.mapboxgl-ctrl-fullscreen .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%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\")}.mapboxgl-ctrl button.mapboxgl-ctrl-shrink .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%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\")}}.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23999'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-compass .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting .mapboxgl-ctrl-icon{-webkit-animation:mapboxgl-spin 2s linear infinite;animation:mapboxgl-spin 2s linear infinite}@media (-ms-high-contrast:active){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23fff'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23999'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.mapboxgl-ctrl button.mapboxgl-ctrl-geolocate:disabled .mapboxgl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23666'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 110-7z'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath d='M14 5l1 1-9 9-1-1 9-9z' fill='red'/%3E%3C/svg%3E\")}}@-webkit-keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes mapboxgl-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}a.mapboxgl-ctrl-logo{width:88px;height:23px;margin:0 0 -4px -4px;display:block;background-repeat:no-repeat;cursor:pointer;overflow:hidden;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg opacity='.3' stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg opacity='.9' fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E\")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:23px}@media (-ms-high-contrast:active){a.mapboxgl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23000' stroke-width='3'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/g%3E%3C/svg%3E\")}}@media (-ms-high-contrast:black-on-white){a.mapboxgl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='88' height='23' viewBox='0 0 88 23' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill-rule='evenodd'%3E%3Cdefs%3E%3Cpath id='a' d='M11.5 2.25c5.105 0 9.25 4.145 9.25 9.25s-4.145 9.25-9.25 9.25-9.25-4.145-9.25-9.25 4.145-9.25 9.25-9.25zM6.997 15.983c-.051-.338-.828-5.802 2.233-8.873a4.395 4.395 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42.91.9 1.42 2.12 1.42 3.39 0 1.18-.449 2.301-1.28 3.13C12.72 16.93 7 16 7 16l-.003-.017zM15.3 10.5l-2 .8-.8 2-.8-2-2-.8 2-.8.8-2 .8 2 2 .8z'/%3E%3Cpath id='b' d='M50.63 8c.13 0 .23.1.23.23V9c.7-.76 1.7-1.18 2.73-1.18 2.17 0 3.95 1.85 3.95 4.17s-1.77 4.19-3.94 4.19c-1.04 0-2.03-.43-2.74-1.18v3.77c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V8.23c0-.12.1-.23.23-.23h1.4zm-3.86.01c.01 0 .01 0 .01-.01.13 0 .22.1.22.22v7.55c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V15c-.7.76-1.69 1.19-2.73 1.19-2.17 0-3.94-1.87-3.94-4.19 0-2.32 1.77-4.19 3.94-4.19 1.03 0 2.02.43 2.73 1.18v-.75c0-.12.1-.23.23-.23h1.4zm26.375-.19a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19 0-2.32-1.9-4.17-4.27-4.17zM60.63 5c.13 0 .23.1.23.23v3.76c.7-.76 1.7-1.18 2.73-1.18 1.88 0 3.45 1.4 3.84 3.28.13.59.13 1.2 0 1.8-.39 1.88-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.77c0 .12-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V5.23c0-.12.1-.23.23-.23h1.4zm-34 11h-1.4c-.13 0-.23-.11-.23-.23V8.22c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.68c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.2c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.68c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23v-4.59c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.5c0 .13-.1.23-.23.23zm53.615 0h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.71-2.39-3.65a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.37 1.4-2.37a.34.34 0 01.3-.17h1.6c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.65 2.43 3.7c0 .05.01.09.01.13 0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.42-1.44 2.42a.34.34 0 01-.3.17zm-7.12-1.49c-1.33 0-2.42-1.12-2.42-2.51 0-1.39 1.08-2.52 2.42-2.52 1.33 0 2.42 1.12 2.42 2.51 0 1.39-1.08 2.51-2.42 2.52zm-19.865 0c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51 0 1.39-1.07 2.52-2.39 2.53zm-8.11-2.48c-.01 1.37-1.09 2.47-2.41 2.47s-2.42-1.12-2.42-2.51c0-1.39 1.08-2.52 2.4-2.52 1.33 0 2.39 1.11 2.41 2.48l.02.08zm18.12 2.47c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51c0 1.39-1.09 2.51-2.42 2.51z'/%3E%3C/defs%3E%3Cmask id='c'%3E%3Crect width='100%25' height='100%25' fill='%23fff'/%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/mask%3E%3Cg stroke='%23fff' stroke-width='3' fill='%23fff'%3E%3Ccircle mask='url(%23c)' cx='11.5' cy='11.5' r='9.25'/%3E%3Cuse xlink:href='%23b' mask='url(%23c)'/%3E%3C/g%3E%3Cuse xlink:href='%23a'/%3E%3Cuse xlink:href='%23b'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:2px 24px 2px 0;margin:10px;position:relative;background-color:#fff;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact-show{padding:2px 8px 2px 28px;border-radius:12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib-button{display:none;cursor:pointer;position:absolute;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E\");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:12px;outline:none;top:0;right:0;border:0}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-attrib-button,.mapboxgl-ctrl-top-left .mapboxgl-ctrl-attrib-button{left:0}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-inner,.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-button{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact-show .mapboxgl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}@media screen and (-ms-high-contrast:active){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd' fill='%23fff'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E\")}}@media screen and (-ms-high-contrast:black-on-white){.mapboxgl-ctrl-attrib.mapboxgl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='24' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill-rule='evenodd'%3E%3Cpath d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E\")}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;-webkit-box-sizing:border-box;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:-webkit-box;display:-ms-flexbox;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.mapboxgl-popup-anchor-left{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.mapboxgl-popup-anchor-right{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.1);box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-track-pointer{display:none}.mapboxgl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-map:hover .mapboxgl-popup-track-pointer{display:-webkit-box;display:-ms-flexbox;display:flex}.mapboxgl-map:active .mapboxgl-popup-track-pointer{display:none}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:\"\";position:absolute;-webkit-animation:mapboxgl-user-location-dot-pulse 2s infinite;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 0 3px rgba(0,0,0,.35);box-shadow:0 0 3px rgba(0,0,0,.35)}@-webkit-keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);opacity:0}to{-webkit-transform:scale(1);opacity:0}}@keyframes mapboxgl-user-location-dot-pulse{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}70%{-webkit-transform:scale(3);transform:scale(3);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-user-location-accuracy-circle{background-color:rgba(29,161,242,.2);width:1px;height:1px;border-radius:100%}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}}"),window.mapboxgl=xr();var Er=0,Mr="101MlGsZ2AmmA&access_token=pk.eyJ1IjoiZXhhbXBsZXMiLCJhIjoiY2p0MG01MXRqMW45cjQzb2R6b2ptc3J4MSJ9.zA2W0IkI0c6KaAhJfk9bWg",Tr=(0,A.b2)()(vr=function(t){(0,u.Z)(o,t);var e,n,r,i=(n=o,r=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}}(),function(){var t,e=(0,c.Z)(n);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,l.Z)(this,t)});function o(){var t;(0,a.Z)(this,o);for(var e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0,z:0},n=this.lngLatToMercator(t,0),r=n.x,i=n.y;return[r-e.x,i-e.y]}},{key:"lngLatToMercator",value:function(t,e){var n=window.mapboxgl.MercatorCoordinate.fromLngLat(t,e),r=n.x,i=void 0===r?0:r,o=n.y,a=void 0===o?0:o,s=n.z;return{x:i,y:a,z:void 0===s?0:s}}},{key:"getModelMatrix",value:function(t,e,n){var r=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},o=window.mapboxgl.MercatorCoordinate.fromLngLat(t,e),a=o.meterInMercatorCoordinateUnits(),s=M.create();return M.translate(s,s,T.fromValues(o.x-i.x,o.y-i.y,o.z||0-i.z)),M.scale(s,s,T.fromValues(a*r[0],-a*r[1],a*r[2])),M.rotateX(s,s,n[0]),M.rotateY(s,s,n[1]),M.rotateZ(s,s,n[2]),s}},{key:"init",value:(e=(0,b.Z)(E().mark((function t(){var e,n,r,i,o,a,s,u,l,c,p,f,d,m=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=this.config,n=e.id,r=void 0===n?"map":n,i=e.attributionControl,o=void 0!==i&&i,a=e.style,s=void 0===a?"light":a,u=e.token,l=void 0===u?Mr:u,c=e.rotation,p=void 0===c?0:c,f=e.mapInstance,d=(0,_.Z)(e,Sr),this.viewport=new wr,f||window.mapboxgl||console.error(this.configService.getSceneWarninfo("SDK")),l!==Mr||"blank"===s||window.mapboxgl.accessToken||f||console.warn(this.configService.getSceneWarninfo("MapToken")),f||window.mapboxgl.accessToken||(window.mapboxgl.accessToken=l),f?(this.map=f,this.$mapContainer=this.map.getContainer()):(this.$mapContainer=this.creatMapContainer(r),this.map=new window.mapboxgl.Map((0,h.Z)({container:this.$mapContainer,style:this.getMapStyleValue(s),attributionControl:o,bearing:p},d))),this.map.on("load",(function(){m.handleCameraChanged()})),this.map.on("move",this.handleCameraChanged),this.handleCameraChanged();case 9:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"destroy",value:function(){var t,e;null===(t=this.$mapContainer)||void 0===t||null===(e=t.parentNode)||void 0===e||e.removeChild(this.$mapContainer),this.eventEmitter.removeAllListeners(),this.map&&(this.map.remove(),this.$mapContainer=null)}},{key:"emit",value:function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i{"use strict";n.d(e,{G:()=>r});var r=function(t){return t["GAODE1.x"]="GAODE1.x",t["GAODE2.x"]="GAODE2.x",t.MAPBOX="MAPBOX",t.DEFUALT="DEFUALTMAP",t.SIMPLE="SIMPLE",t.GLOBEL="GLOBEL",t}({})},5868:(t,e,n)=>{"use strict";n.r(e),n.d(e,{Scene:()=>lt});var r,i,o,a,s,u,l,c,h,p,f,d,m,g,y,v=n(3659),_=n(5162),b=n(800),x=n(3192),w=n(6838),S=n(1109),E=n.n(S),M=n(1522),T=n(108),A=n(1301),C=n(6297),O=n(5619),P=n(7745),k=n(5499),L=n.n(k),I=(n(171),function(){function t(e,n){(0,x.Z)(this,t);var r=n.buffer,i=n.offset,o=n.stride,a=n.normalized,s=n.size,u=n.divisor;this.buffer=r,this.attribute={buffer:r.get(),offset:i||0,stride:o||0,normalized:a||!1,divisor:u||0},s&&(this.attribute.size=s)}return(0,w.Z)(t,[{key:"get",value:function(){return this.attribute}},{key:"updateBuffer",value:function(t){this.buffer.subData(t)}},{key:"destroy",value:function(){this.buffer.destroy()}}]),t}()),R=(r={},(0,C.Z)(r,T.gl.POINTS,"points"),(0,C.Z)(r,T.gl.LINES,"lines"),(0,C.Z)(r,T.gl.LINE_LOOP,"line loop"),(0,C.Z)(r,T.gl.LINE_STRIP,"line strip"),(0,C.Z)(r,T.gl.TRIANGLES,"triangles"),(0,C.Z)(r,T.gl.TRIANGLE_FAN,"triangle fan"),(0,C.Z)(r,T.gl.TRIANGLE_STRIP,"triangle strip"),r),D=(i={},(0,C.Z)(i,T.gl.STATIC_DRAW,"static"),(0,C.Z)(i,T.gl.DYNAMIC_DRAW,"dynamic"),(0,C.Z)(i,T.gl.STREAM_DRAW,"stream"),i),N=(o={},(0,C.Z)(o,T.gl.BYTE,"int8"),(0,C.Z)(o,T.gl.UNSIGNED_INT,"int16"),(0,C.Z)(o,T.gl.INT,"int32"),(0,C.Z)(o,T.gl.UNSIGNED_BYTE,"uint8"),(0,C.Z)(o,T.gl.UNSIGNED_SHORT,"uint16"),(0,C.Z)(o,T.gl.UNSIGNED_INT,"uint32"),(0,C.Z)(o,T.gl.FLOAT,"float"),o),F=(a={},(0,C.Z)(a,T.gl.ALPHA,"alpha"),(0,C.Z)(a,T.gl.LUMINANCE,"luminance"),(0,C.Z)(a,T.gl.LUMINANCE_ALPHA,"luminance alpha"),(0,C.Z)(a,T.gl.RGB,"rgb"),(0,C.Z)(a,T.gl.RGBA,"rgba"),(0,C.Z)(a,T.gl.RGBA4,"rgba4"),(0,C.Z)(a,T.gl.RGB5_A1,"rgb5 a1"),(0,C.Z)(a,T.gl.RGB565,"rgb565"),(0,C.Z)(a,T.gl.DEPTH_COMPONENT,"depth"),(0,C.Z)(a,T.gl.DEPTH_STENCIL,"depth stencil"),a),z=(s={},(0,C.Z)(s,T.gl.DONT_CARE,"dont care"),(0,C.Z)(s,T.gl.NICEST,"nice"),(0,C.Z)(s,T.gl.FASTEST,"fast"),s),B=(u={},(0,C.Z)(u,T.gl.NEAREST,"nearest"),(0,C.Z)(u,T.gl.LINEAR,"linear"),(0,C.Z)(u,T.gl.LINEAR_MIPMAP_LINEAR,"mipmap"),(0,C.Z)(u,T.gl.NEAREST_MIPMAP_LINEAR,"nearest mipmap linear"),(0,C.Z)(u,T.gl.LINEAR_MIPMAP_NEAREST,"linear mipmap nearest"),(0,C.Z)(u,T.gl.NEAREST_MIPMAP_NEAREST,"nearest mipmap nearest"),u),j=(l={},(0,C.Z)(l,T.gl.REPEAT,"repeat"),(0,C.Z)(l,T.gl.CLAMP_TO_EDGE,"clamp"),(0,C.Z)(l,T.gl.MIRRORED_REPEAT,"mirror"),l),U=(c={},(0,C.Z)(c,T.gl.NONE,"none"),(0,C.Z)(c,T.gl.BROWSER_DEFAULT_WEBGL,"browser"),c),Z=(h={},(0,C.Z)(h,T.gl.NEVER,"never"),(0,C.Z)(h,T.gl.ALWAYS,"always"),(0,C.Z)(h,T.gl.LESS,"less"),(0,C.Z)(h,T.gl.LEQUAL,"lequal"),(0,C.Z)(h,T.gl.GREATER,"greater"),(0,C.Z)(h,T.gl.GEQUAL,"gequal"),(0,C.Z)(h,T.gl.EQUAL,"equal"),(0,C.Z)(h,T.gl.NOTEQUAL,"notequal"),h),V=(p={},(0,C.Z)(p,T.gl.FUNC_ADD,"add"),(0,C.Z)(p,T.gl.MIN_EXT,"min"),(0,C.Z)(p,T.gl.MAX_EXT,"max"),(0,C.Z)(p,T.gl.FUNC_SUBTRACT,"subtract"),(0,C.Z)(p,T.gl.FUNC_REVERSE_SUBTRACT,"reverse subtract"),p),G=(f={},(0,C.Z)(f,T.gl.ZERO,"zero"),(0,C.Z)(f,T.gl.ONE,"one"),(0,C.Z)(f,T.gl.SRC_COLOR,"src color"),(0,C.Z)(f,T.gl.ONE_MINUS_SRC_COLOR,"one minus src color"),(0,C.Z)(f,T.gl.SRC_ALPHA,"src alpha"),(0,C.Z)(f,T.gl.ONE_MINUS_SRC_ALPHA,"one minus src alpha"),(0,C.Z)(f,T.gl.DST_COLOR,"dst color"),(0,C.Z)(f,T.gl.ONE_MINUS_DST_COLOR,"one minus dst color"),(0,C.Z)(f,T.gl.DST_ALPHA,"dst alpha"),(0,C.Z)(f,T.gl.ONE_MINUS_DST_ALPHA,"one minus dst alpha"),(0,C.Z)(f,T.gl.CONSTANT_COLOR,"constant color"),(0,C.Z)(f,T.gl.ONE_MINUS_CONSTANT_COLOR,"one minus constant color"),(0,C.Z)(f,T.gl.CONSTANT_ALPHA,"constant alpha"),(0,C.Z)(f,T.gl.ONE_MINUS_CONSTANT_ALPHA,"one minus constant alpha"),(0,C.Z)(f,T.gl.SRC_ALPHA_SATURATE,"src alpha saturate"),f),H=(d={},(0,C.Z)(d,T.gl.NEVER,"never"),(0,C.Z)(d,T.gl.ALWAYS,"always"),(0,C.Z)(d,T.gl.LESS,"less"),(0,C.Z)(d,T.gl.LEQUAL,"lequal"),(0,C.Z)(d,T.gl.GREATER,"greater"),(0,C.Z)(d,T.gl.GEQUAL,"gequal"),(0,C.Z)(d,T.gl.EQUAL,"equal"),(0,C.Z)(d,T.gl.NOTEQUAL,"notequal"),d),W=(m={},(0,C.Z)(m,T.gl.ZERO,"zero"),(0,C.Z)(m,T.gl.KEEP,"keep"),(0,C.Z)(m,T.gl.REPLACE,"replace"),(0,C.Z)(m,T.gl.INVERT,"invert"),(0,C.Z)(m,T.gl.INCR,"increment"),(0,C.Z)(m,T.gl.DECR,"decrement"),(0,C.Z)(m,T.gl.INCR_WRAP,"increment wrap"),(0,C.Z)(m,T.gl.DECR_WRAP,"decrement wrap"),m),q=(g={},(0,C.Z)(g,T.gl.FRONT,"front"),(0,C.Z)(g,T.gl.BACK,"back"),g),Y=function(){function t(e,n){(0,x.Z)(this,t);var r=n.data,i=n.usage,o=n.type;this.buffer=e.buffer({data:r,usage:D[i||T.gl.STATIC_DRAW],type:N[o||T.gl.UNSIGNED_BYTE]})}return(0,w.Z)(t,[{key:"get",value:function(){return this.buffer}},{key:"destroy",value:function(){this.buffer.destroy()}},{key:"subData",value:function(t){var e=t.data,n=t.offset;this.buffer.subdata(e,n)}}]),t}(),X=function(){function t(e,n){(0,x.Z)(this,t);var r=n.data,i=n.usage,o=n.type,a=n.count;this.elements=e.elements({data:r,usage:D[i||T.gl.STATIC_DRAW],type:N[o||T.gl.UNSIGNED_BYTE],count:a})}return(0,w.Z)(t,[{key:"get",value:function(){return this.elements}},{key:"subData",value:function(t){var e=t.data;this.elements.subdata(e)}},{key:"destroy",value:function(){}}]),t}(),$=function(){function t(e,n){(0,x.Z)(this,t);var r=n.width,i=n.height,o=n.color,a=n.colors,s={width:r,height:i};Array.isArray(a)&&(s.colors=a.map((function(t){return t.get()}))),o&&"boolean"!=typeof o&&(s.color=o.get()),this.framebuffer=e.framebuffer(s)}return(0,w.Z)(t,[{key:"get",value:function(){return this.framebuffer}},{key:"destroy",value:function(){this.framebuffer.destroy()}},{key:"resize",value:function(t){var e=t.width,n=t.height;this.framebuffer.resize(e,n)}}]),t}(),K=n(7743),J=n(9479),Q=function(){function t(e,n){(0,x.Z)(this,t),(0,C.Z)(this,"destroyed",!1),(0,C.Z)(this,"uniforms",{}),this.reGl=e;var r=n.vs,i=n.fs,o=n.attributes,a=n.uniforms,s=n.primitive,u=n.count,l=n.elements,c=n.depth,h=n.cull,p=n.instances,f={};this.options=n,a&&(this.uniforms=this.extractUniforms(a),Object.keys(a).forEach((function(t){f[t]=e.prop(t)})));var d={};Object.keys(o).forEach((function(t){d[t]=o[t].get()}));var m={attributes:d,frag:i,uniforms:f,vert:r,colorMask:e.prop("colorMask"),lineWidth:1,blend:{enable:e.prop("blend.enable"),func:e.prop("blend.func"),equation:e.prop("blend.equation"),color:e.prop("blend.color")},stencil:{enable:e.prop("stencil.enable"),mask:e.prop("stencil.mask"),func:e.prop("stencil.func"),opFront:e.prop("stencil.opFront"),opBack:e.prop("stencil.opBack")},primitive:R[void 0===s?T.gl.TRIANGLES:s]};p&&(m.instances=p),u?m.count=u:l&&(m.elements=l.get()),this.initDepthDrawParams({depth:c},m),this.initCullDrawParams({cull:h},m),this.drawCommand=e(m),this.drawParams=m}return(0,w.Z)(t,[{key:"updateAttributesAndElements",value:function(t,e){var n={};Object.keys(t).forEach((function(e){n[e]=t[e].get()})),this.drawParams.attributes=n,this.drawParams.elements=e.get(),this.drawCommand=this.reGl(this.drawParams)}},{key:"updateAttributes",value:function(t){var e={};Object.keys(t).forEach((function(n){e[n]=t[n].get()})),this.drawParams.attributes=e,this.drawCommand=this.reGl(this.drawParams)}},{key:"addUniforms",value:function(t){this.uniforms=(0,v.Z)((0,v.Z)({},this.uniforms),this.extractUniforms(t))}},{key:"draw",value:function(t,e){if(!this.drawParams.attributes||0!==Object.keys(this.drawParams.attributes).length){var n=(0,v.Z)((0,v.Z)({},this.uniforms),this.extractUniforms(t.uniforms||{})),r={};Object.keys(n).forEach((function(t){var e=(0,K.Z)(n[t]);"boolean"===e||"number"===e||Array.isArray(n[t])||n[t].BYTES_PER_ELEMENT?r[t]=n[t]:r[t]=n[t].get()})),r.blend=e?this.getBlendDrawParams({blend:{enable:!1}}):this.getBlendDrawParams(t),r.stencil=this.getStencilDrawParams(t),r.colorMask=this.getColorMaskDrawParams(t,e),this.drawCommand(r)}}},{key:"destroy",value:function(){var t,e;null===(t=this.drawParams)||void 0===t||null===(e=t.elements)||void 0===e||e.destroy(),this.options.attributes&&Object.values(this.options.attributes).forEach((function(t){null==t||t.destroy()})),this.destroyed=!0}},{key:"initDepthDrawParams",value:function(t,e){var n=t.depth;n&&(e.depth={enable:void 0===n.enable||!!n.enable,mask:void 0===n.mask||!!n.mask,func:Z[n.func||T.gl.LESS],range:n.range||[0,1]})}},{key:"getBlendDrawParams",value:function(t){var e=t.blend||{},n=e.enable,r=e.func,i=e.equation,o=e.color,a=void 0===o?[0,0,0,0]:o;return{enable:!!n,func:{srcRGB:G[r&&r.srcRGB||T.gl.SRC_ALPHA],srcAlpha:G[r&&r.srcAlpha||T.gl.SRC_ALPHA],dstRGB:G[r&&r.dstRGB||T.gl.ONE_MINUS_SRC_ALPHA],dstAlpha:G[r&&r.dstAlpha||T.gl.ONE_MINUS_SRC_ALPHA]},equation:{rgb:V[i&&i.rgb||T.gl.FUNC_ADD],alpha:V[i&&i.alpha||T.gl.FUNC_ADD]},color:a}}},{key:"getStencilDrawParams",value:function(t){var e=t.stencil||{},n=e.enable,r=e.mask,i=void 0===r?-1:r,o=e.func,a=void 0===o?{cmp:T.gl.ALWAYS,ref:0,mask:-1}:o,s=e.opFront,u=void 0===s?{fail:T.gl.KEEP,zfail:T.gl.KEEP,zpass:T.gl.KEEP}:s,l=e.opBack,c=void 0===l?{fail:T.gl.KEEP,zfail:T.gl.KEEP,zpass:T.gl.KEEP}:l;return{enable:!!n,mask:i,func:(0,v.Z)((0,v.Z)({},a),{},{cmp:H[a.cmp]}),opFront:{fail:W[u.fail],zfail:W[u.zfail],zpass:W[u.zpass]},opBack:{fail:W[c.fail],zfail:W[c.zfail],zpass:W[c.zpass]}}}},{key:"getColorMaskDrawParams",value:function(t,e){var n=t.stencil;return null!=n&&n.enable&&n.opFront&&!e?[!1,!1,!1,!1]:[!0,!0,!0,!0]}},{key:"initCullDrawParams",value:function(t,e){var n=t.cull;if(n){var r=n.enable,i=n.face,o=void 0===i?T.gl.BACK:i;e.cull={enable:!!r,face:q[o]}}}},{key:"extractUniforms",value:function(t){var e=this,n={};return Object.keys(t).forEach((function(r){e.extractUniformsRecursively(r,t[r],n,"")})),n}},{key:"extractUniformsRecursively",value:function(t,e,n,r){var i=this;null===e||"number"==typeof e||"boolean"==typeof e||Array.isArray(e)&&"number"==typeof e[0]||(0,J.isTypedArray)(e)||""===e||"resize"in e?n["".concat(r&&r+".").concat(t)]=e:((0,J.isPlainObject)(e)&&Object.keys(e).forEach((function(o){i.extractUniformsRecursively(o,e[o],n,"".concat(r&&r+".").concat(t))})),Array.isArray(e)&&e.forEach((function(e,o){Object.keys(e).forEach((function(a){i.extractUniformsRecursively(a,e[a],n,"".concat(r&&r+".").concat(t,"[").concat(o,"]"))}))})))}}]),t}(),tt=function(){function t(e,n){(0,x.Z)(this,t),(0,C.Z)(this,"isDestroy",!1);var r=n.data,i=n.type,o=void 0===i?T.gl.UNSIGNED_BYTE:i,a=n.width,s=n.height,u=n.flipY,l=void 0!==u&&u,c=n.format,h=void 0===c?T.gl.RGBA:c,p=n.mipmap,f=void 0!==p&&p,d=n.wrapS,m=void 0===d?T.gl.CLAMP_TO_EDGE:d,g=n.wrapT,y=void 0===g?T.gl.CLAMP_TO_EDGE:g,v=n.aniso,_=void 0===v?0:v,b=n.alignment,w=void 0===b?1:b,S=n.premultiplyAlpha,E=void 0!==S&&S,M=n.mag,A=void 0===M?T.gl.NEAREST:M,O=n.min,P=void 0===O?T.gl.NEAREST:O,k=n.colorSpace,L=void 0===k?T.gl.BROWSER_DEFAULT_WEBGL:k,I=n.x,R=void 0===I?0:I,D=n.y,Z=void 0===D?0:D,V=n.copy,G=void 0!==V&&V;this.width=a,this.height=s;var H={width:a,height:s,type:N[o],format:F[h],wrapS:j[m],wrapT:j[y],mag:B[A],min:B[P],alignment:w,flipY:l,colorSpace:U[L],premultiplyAlpha:E,aniso:_,x:R,y:Z,copy:G};r&&(H.data=r),"number"==typeof f?H.mipmap=z[f]:"boolean"==typeof f&&(H.mipmap=f),this.texture=e.texture(H)}return(0,w.Z)(t,[{key:"get",value:function(){return this.texture}},{key:"update",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.texture(t)}},{key:"bind",value:function(){this.texture._texture.bind()}},{key:"resize",value:function(t){var e=t.width,n=t.height;this.texture.resize(e,n),this.width=e,this.height=n}},{key:"getSize",value:function(){return[this.width,this.height]}},{key:"destroy",value:function(){var t;this.isDestroy||null===(t=this.texture)||void 0===t||t.destroy(),this.isDestroy=!0}}]),t}(),et=(0,P.b2)()(y=function(){function t(){var e=this;(0,x.Z)(this,t),(0,C.Z)(this,"createModel",(function(t){return new Q(e.gl,t)})),(0,C.Z)(this,"createAttribute",(function(t){return new I(e.gl,t)})),(0,C.Z)(this,"createBuffer",(function(t){return new Y(e.gl,t)})),(0,C.Z)(this,"createElements",(function(t){return new X(e.gl,t)})),(0,C.Z)(this,"createTexture2D",(function(t){return new tt(e.gl,t)})),(0,C.Z)(this,"createFramebuffer",(function(t){return new $(e.gl,t)})),(0,C.Z)(this,"useFramebuffer",(function(t,n){e.gl({framebuffer:t?t.get():null})(n)})),(0,C.Z)(this,"clear",(function(t){var n,r=t.color,i=t.depth,o=t.stencil,a=t.framebuffer,s=void 0===a?null:a,u={color:r,depth:i,stencil:o};u.framebuffer=null===s?s:s.get(),null===(n=e.gl)||void 0===n||n.clear(u)})),(0,C.Z)(this,"viewport",(function(t){var n=t.x,r=t.y,i=t.width,o=t.height;e.gl._gl.viewport(n,r,i,o),e.width=i,e.height=o,e.gl._refresh()})),(0,C.Z)(this,"readPixels",(function(t){var n=t.framebuffer,r={x:t.x,y:t.y,width:t.width,height:t.height};return n&&(r.framebuffer=n.get()),e.gl.read(r)})),(0,C.Z)(this,"getViewportSize",(function(){return{width:e.gl._gl.drawingBufferWidth,height:e.gl._gl.drawingBufferHeight}})),(0,C.Z)(this,"getContainer",(function(){return O.isMini?e.canvas:null===(t=e.canvas)||void 0===t?void 0:t.parentElement;var t})),(0,C.Z)(this,"getCanvas",(function(){return e.canvas})),(0,C.Z)(this,"getGLContext",(function(){return e.gl._gl})),(0,C.Z)(this,"destroy",(function(){var t,n,r;e.canvas=null,null===(t=e.gl)||void 0===t||null===(n=t._gl)||void 0===n||null===(r=n.getExtension("WEBGL_lose_context"))||void 0===r||r.loseContext(),e.gl.destroy(),e.gl=null}))}var e;return(0,w.Z)(t,[{key:"init",value:(e=(0,b.Z)(E().mark((function t(e,n,r){var i=this;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.canvas=e,!r){t.next=5;break}this.gl=r,t.next=8;break;case 5:return t.next=7,new Promise((function(t,e){L()({canvas:i.canvas,attributes:{alpha:!0,antialias:n.antialias,premultipliedAlpha:!0,preserveDrawingBuffer:n.preserveDrawingBuffer,stencil:n.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(n,r){!n&&r||e(n),t(r)}})}));case 7:this.gl=t.sent;case 8:this.extensionObject={OES_texture_float:this.testExtension("OES_texture_float")};case 9:case"end":return t.stop()}}),t,this)}))),function(t,n,r){return e.apply(this,arguments)})},{key:"getPointSizeRange",value:function(){return this.gl._gl.getParameter(this.gl._gl.ALIASED_POINT_SIZE_RANGE)}},{key:"testExtension",value:function(t){return!!this.getGLContext().getExtension(t)}},{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 t=this.getGLContext();t.disable(t.CULL_FACE)}},{key:"setDirty",value:function(t){this.isDirty=t}},{key:"getDirty",value:function(){return this.isDirty}}]),t}())||y,nt=n(5161),rt=n(6193),it=n(9097),ot=n(6875),at=n(1883);var st=["selectstart","selecting","selectend"],ut=function(t){(0,rt.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,ot.Z)(e);if(n){var i=(0,ot.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,it.Z)(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,x.Z)(this,i),e=r.call(this),(0,C.Z)((0,nt.Z)(e),"isEnable",!1),(0,C.Z)((0,nt.Z)(e),"onDragStart",(function(t){e.box.style.display="block",e.startEvent=e.endEvent=t,e.syncBoxBound(),e.emit("selectstart",e.getLngLatBox(),e.startEvent,e.endEvent)})),(0,C.Z)((0,nt.Z)(e),"onDragging",(function(t){e.endEvent=t,e.syncBoxBound(),e.emit("selecting",e.getLngLatBox(),e.startEvent,e.endEvent)})),(0,C.Z)((0,nt.Z)(e),"onDragEnd",(function(t){e.endEvent=t,e.box.style.display="none",e.emit("selectend",e.getLngLatBox(),e.startEvent,e.endEvent)})),e.scene=t,e.options=n,e}return(0,w.Z)(i,[{key:"container",get:function(){return this.scene.getMapService().getMarkerContainer()}},{key:"enable",value:function(){if(!this.isEnable){var t=this.options.className;if(this.scene.setMapStatus({dragEnable:!1}),this.container.style.cursor="crosshair",!this.box){var e=O.DOM.create("div",void 0,this.container);e.classList.add("l7-select-box"),t&&e.classList.add(t),e.style.display="none",this.box=e}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 t=this.startEvent,e=t.x,n=t.y,r=this.endEvent,i=r.x,o=r.y,a=Math.min(e,i),s=Math.min(n,o),u=Math.abs(e-i),l=Math.abs(n-o);this.box.style.top="".concat(s,"px"),this.box.style.left="".concat(a,"px"),this.box.style.width="".concat(u,"px"),this.box.style.height="".concat(l,"px")}},{key:"getLngLatBox",value:function(){var t=this.startEvent.lngLat,e=t.lng,n=t.lat,r=this.endEvent.lngLat,i=r.lng,o=r.lat;return(0,O.getBBoxFromPoints)([[e,n],[i,o]])}}]),i}(at.EventEmitter),lt=function(){function t(e){(0,x.Z)(this,t);var n=e.id,r=e.map,i=e.canvas,o=e.hasBaseMap,a=(0,T.createSceneContainer)();this.container=a,r.setContainer(a,n,i,o),a.bind(T.TYPES.IRendererService).to(et).inSingletonScope(),this.sceneService=a.get(T.TYPES.ISceneService),this.mapService=a.get(T.TYPES.IMapService),this.iconService=a.get(T.TYPES.IIconService),this.fontService=a.get(T.TYPES.IFontService),this.controlService=a.get(T.TYPES.IControlService),this.layerService=a.get(T.TYPES.ILayerService),this.debugService=a.get(T.TYPES.IDebugService),this.debugService.setEnable(e.debug),this.markerService=a.get(T.TYPES.IMarkerService),this.interactionService=a.get(T.TYPES.IInteractionService),this.popupService=a.get(T.TYPES.IPopupService),this.boxSelect=new ut(this,{}),(0,O.setMiniScene)((null==e?void 0:e.isMini)||!1),O.isMini?this.sceneService.initMiniScene(e):(this.initComponent(n),this.sceneService.init(e),this.initControl())}var e,n,r,i,o;return(0,w.Z)(t,[{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:(o=(0,b.Z)(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sceneService.exportPng(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"exportMap",value:(i=(0,b.Z)(E().mark((function t(e){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.sceneService.exportPng(e));case 1:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"registerRenderService",value:function(t){var e=this;this.sceneService.loaded?new t(this).init():this.on("loaded",(function(){new t(e).init()}))}},{key:"setBgColor",value:function(t){this.mapService.setBgColor(t)}},{key:"addLayer",value:function(t){var e=this,n=(0,T.createLayerContainer)(this.container);if(t.setContainer(n,this.container),this.sceneService.addLayer(t),t.inited){var r=this.initMask(t);this.addMask(r,t.id)}else t.on("inited",(function(){var n=e.initMask(t);e.addMask(n,t.id)}))}},{key:"initMask",value:function(t){var e=t.getLayerConfig(),n=e.mask,r=e.maskfence,i=e.maskColor,o=void 0===i?"#000":i,a=e.maskOpacity,s=void 0===a?0:a;if(n&&r)return(new A.MaskLayer).source(r).shape("fill").style({color:o,opacity:s})}},{key:"addMask",value:function(t,e){if(t){var n=this.getLayer(e);if(n){var r=(0,T.createLayerContainer)(this.container);t.setContainer(r,this.container),n.addMaskLayer(t),this.sceneService.addMask(t)}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(t){return this.layerService.getLayer(t)}},{key:"getLayerByName",value:function(t){return this.layerService.getLayerByName(t)}},{key:"removeLayer",value:(r=(0,b.Z)(E().mark((function t(e,n){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.layerService.remove(e,n);case 2:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"removeAllLayer",value:(n=(0,b.Z)(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.layerService.removeAllLayers();case 2:case"end":return t.stop()}}),t,this)}))),function(){return n.apply(this,arguments)})},{key:"render",value:function(){this.sceneService.render()}},{key:"setEnableRender",value:function(t){this.layerService.setEnableRender(t)}},{key:"addIconFont",value:function(t,e){this.fontService.addIconFont(t,e)}},{key:"addIconFonts",value:function(t){var e=this;t.forEach((function(t){var n=(0,_.Z)(t,2),r=n[0],i=n[1];e.fontService.addIconFont(r,i)}))}},{key:"addFontFace",value:function(t,e){var n=this;this.fontService.once("fontloaded",(function(t){n.emit("fontloaded",t)})),this.fontService.addFontFace(t,e)}},{key:"addImage",value:(e=(0,b.Z)(E().mark((function t(e,n){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(O.isMini){t.next=5;break}return t.next=3,this.iconService.addImage(e,n);case 3:t.next=6;break;case 5:this.iconService.addImageMini(e,n,this.sceneService);case 6:case"end":return t.stop()}}),t,this)}))),function(t,n){return e.apply(this,arguments)})},{key:"hasImage",value:function(t){return this.iconService.hasImage(t)}},{key:"removeImage",value:function(t){this.iconService.removeImage(t)}},{key:"addIconFontGlyphs",value:function(t,e){this.fontService.addIconGlyphs(e)}},{key:"addControl",value:function(t){this.controlService.addControl(t,this.container)}},{key:"removeControl",value:function(t){this.controlService.removeControl(t)}},{key:"getControlByName",value:function(t){return this.controlService.getControlByName(t)}},{key:"addMarker",value:function(t){this.markerService.addMarker(t)}},{key:"addMarkerLayer",value:function(t){this.markerService.addMarkerLayer(t)}},{key:"removeMarkerLayer",value:function(t){this.markerService.removeMarkerLayer(t)}},{key:"removeAllMarkers",value:function(){this.markerService.removeAllMarkers()}},{key:"removeAllMakers",value:function(){console.warn("removeAllMakers 已废弃,请使用 removeAllMarkers"),this.markerService.removeAllMarkers()}},{key:"addPopup",value:function(t){this.popupService.addPopup(t)}},{key:"removePopup",value:function(t){this.popupService.removePopup(t)}},{key:"on",value:function(t,e){var n;st.includes(t)?null===(n=this.boxSelect)||void 0===n||n.on(t,e):T.SceneEventList.includes(t)?this.sceneService.on(t,e):this.mapService.on(t,e)}},{key:"once",value:function(t,e){var n;st.includes(t)?null===(n=this.boxSelect)||void 0===n||n.once(t,e):T.SceneEventList.includes(t)?this.sceneService.once(t,e):this.mapService.once(t,e)}},{key:"emit",value:function(t,e){-1===T.SceneEventList.indexOf(t)?this.mapService.on(t,e):this.sceneService.emit(t,e)}},{key:"off",value:function(t,e){var n;st.includes(t)?null===(n=this.boxSelect)||void 0===n||n.off(t,e):T.SceneEventList.includes(t)?this.sceneService.off(t,e):this.mapService.off(t,e)}},{key:"getZoom",value:function(){return this.mapService.getZoom()}},{key:"getCenter",value:function(t){return this.mapService.getCenter(t)}},{key:"setCenter",value:function(t,e){return this.mapService.setCenter(t,e)}},{key:"getPitch",value:function(){return this.mapService.getPitch()}},{key:"setPitch",value:function(t){return this.mapService.setPitch(t)}},{key:"getRotation",value:function(){return this.mapService.getRotation()}},{key:"getBounds",value:function(){return this.mapService.getBounds()}},{key:"setRotation",value:function(t){this.mapService.setRotation(t)}},{key:"zoomIn",value:function(){this.mapService.zoomIn()}},{key:"zoomOut",value:function(){this.mapService.zoomOut()}},{key:"panTo",value:function(t){this.mapService.panTo(t)}},{key:"panBy",value:function(t,e){this.mapService.panBy(t,e)}},{key:"getContainer",value:function(){return this.mapService.getContainer()}},{key:"setZoom",value:function(t){this.mapService.setZoom(t)}},{key:"fitBounds",value:function(t,e){var n=this.sceneService.getSceneConfig(),r=n.fitBoundsOptions,i=n.animate;this.mapService.fitBounds(t,e||(0,v.Z)((0,v.Z)({},r),{},{animate:i}))}},{key:"setZoomAndCenter",value:function(t,e){this.mapService.setZoomAndCenter(t,e)}},{key:"setMapStyle",value:function(t){this.mapService.setMapStyle(t)}},{key:"setMapStatus",value:function(t){this.mapService.setMapStatus(t)}},{key:"pixelToLngLat",value:function(t){return this.mapService.pixelToLngLat(t)}},{key:"lngLatToPixel",value:function(t){return this.mapService.lngLatToPixel(t)}},{key:"containerToLngLat",value:function(t){return this.mapService.containerToLngLat(t)}},{key:"lngLatToContainer",value:function(t){return this.mapService.lngLatToContainer(t)}},{key:"destroy",value:function(){this.sceneService.destroy()}},{key:"registerPostProcessingPass",value:function(t,e){this.container.bind(T.TYPES.IPostProcessingPass).to(t).whenTargetNamed(e)}},{key:"enableShaderPick",value:function(){this.layerService.enableShaderPick()}},{key:"diasbleShaderPick",value:function(){this.layerService.disableShaderPick()}},{key:"enableBoxSelect",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.boxSelect.enable(),e&&this.boxSelect.once("selectend",(function(){t.disableBoxSelect()}))}},{key:"disableBoxSelect",value:function(){this.boxSelect.disable()}},{key:"getPointSizeRange",value:function(){return this.sceneService.getPointSizeRange()}},{key:"initComponent",value:function(t){this.controlService.init({container:O.DOM.getContainer(t)},this.container),this.markerService.init(this.container),this.popupService.init(this.container)}},{key:"initControl",value:function(){var t=this.sceneService.getSceneConfig(),e=t.logoVisible,n=t.logoPosition;e&&this.addControl(new M.Logo({position:n}))}}]),t}()},8134:(t,e,n)=>{"use strict";n.r(e),n.d(e,{VectorSource:()=>ft,default:()=>pe,getParser:()=>o,getTransform:()=>s,rasterDataTypes:()=>jt,registerParser:()=>a,registerTransform:()=>u});var r={},i={},o=function(t){return i[t]},a=function(t,e){i[t]=e},s=function(t){return r[t]},u=function(t,e){r[t]=e},l={},c={};function h(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function p(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function f(t,e){var n=t+"",r=n.length;return r=o?u=!0:10===(r=t.charCodeAt(a++))?h=!0:13===r&&(h=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a9999?"+"+f(r,6):f(r,4))+"-"+f(n.getUTCMonth()+1,2)+"-"+f(n.getUTCDate(),2)+(s?"T"+f(i,2)+":"+f(o,2)+":"+f(a,2)+"."+f(s,3)+"Z":a?"T"+f(i,2)+":"+f(o,2)+":"+f(a,2)+"Z":o||i?"T"+f(i,2)+":"+f(o,2)+"Z":"")):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t;var n,r,i,o,a,s}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=h(t);return function(r,i){return e(n(r),i,t)}}(t,e):h(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=p(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=p(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}(","),m=d.parse,g=(d.parseRows,d.format,d.formatBody,d.formatRows,d.formatRow,d.formatValue,n(9908)),y=n(3659),v=n(2576),_=n.n(v),b=n(601),x=n(8912);function w(t,e){var n=e.x,r=e.y,i=e.x1,o=e.y1,a=e.coordinates,s=e.geometry,u=[];if(!Array.isArray(t))return{dataArray:[]};if(s)return t.filter((function(t){return t[s]&&t[s].type&&t[s].coordinates&&t[s].coordinates.length>0})).forEach((function(t,e){var n=_()((0,y.Z)({},t[s]),!0);(0,x.nG)(n,(function(n){var r=(0,b.r7)(n),i=(0,y.Z)((0,y.Z)({},t),{},{_id:e,coordinates:r});u.push(i)}))})),{dataArray:u};for(var l=0;l>1,s=n-e,u=t[e],l=t[e+1],c=t[n],h=t[n+1],p=e+3;po)i=p,o=f;else if(f===o){var d=Math.abs(p-a);dr&&(i-e>3&&A(t,e,i,r),t[i+2]=o,n-i>3&&A(t,i,n,r))}function C(t,e,n,r,i,o){var a=i-n,s=o-r;if(0!==a||0!==s){var u=((t-n)*a+(e-r)*s)/(a*a+s*s);u>1?(n=i,r=o):u>0&&(n+=a*u,r+=s*u)}return(a=t-n)*a+(s=e-r)*s}function O(t,e,n,r){var i={id:void 0===t?null:t,type:e,geometry:n,tags:r,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,n=t.type;if("Point"===n||"MultiPoint"===n||"LineString"===n)P(t,e);else if("Polygon"===n||"MultiLineString"===n)for(var r=0;r0&&(a+=r?(i*l-u*o)/2:Math.sqrt(Math.pow(u-i,2)+Math.pow(l-o,2))),i=u,o=l}var c=e.length-3;e[2]=1,A(e,0,c,n),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function R(t,e,n,r){for(var i=0;i1?1:n}function F(t,e,n,r,i,o,a,s){if(r/=e,o>=(n/=e)&&a=r)return null;for(var u=[],l=0;l=n&&d=r)){var m=[];if("Point"===p||"MultiPoint"===p)z(h,m,n,r,i);else if("LineString"===p)B(h,m,n,r,i,!1,s.lineMetrics);else if("MultiLineString"===p)U(h,m,n,r,i,!1);else if("Polygon"===p)U(h,m,n,r,i,!0);else if("MultiPolygon"===p)for(var g=0;g=n&&a<=r&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function B(t,e,n,r,i,o,a){for(var s,u,l=j(t),c=0===i?V:G,h=t.start,p=0;pn&&(u=c(l,f,d,g,y,n),a&&(l.start=h+s*u)):v>r?_=n&&(u=c(l,f,d,g,y,n),b=!0),_>r&&v<=r&&(u=c(l,f,d,g,y,r),b=!0),!o&&b&&(a&&(l.end=h+s*u),e.push(l),l=j(t)),a&&(h+=s)}var x=t.length-3;f=t[x],d=t[x+1],m=t[x+2],(v=0===i?f:d)>=n&&v<=r&&Z(l,f,d,m),x=l.length-3,o&&x>=3&&(l[x]!==l[0]||l[x+1]!==l[1])&&Z(l,l[0],l[1],l[2]),l.length&&e.push(l)}function j(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function U(t,e,n,r,i,o){for(var a=0;aa.maxX&&(a.maxX=c),h>a.maxY&&(a.maxY=h)}return a}function $(t,e,n,r){var i=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s0&&e.size<(i?a:r))n.numPoints+=e.length/3;else{for(var s=[],u=0;ua)&&(n.numSimplified++,s.push(e[u]),s.push(e[u+1])),n.numPoints++;i&&function(t,e){for(var n=0,r=0,i=t.length,o=i-2;r0===e)for(r=0,i=t.length;r24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var r=function(t,e){var n=[];if("FeatureCollection"===t.type)for(var r=0;r1&&console.time("creation"),p=this.tiles[h]=X(t,e,n,r,u),this.tileCoords.push({z:e,x:n,y:r}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,n,r,p.numFeatures,p.numPoints,p.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(p.source=t,i){if(e===u.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var m,g,y,v,_,b,x=.5*u.buffer/u.extent,w=.5-x,S=.5+x,E=1+x;m=g=y=v=null,_=F(t,c,n-x,n+S,0,p.minX,p.maxX,u),b=F(t,c,n+w,n+E,0,p.minX,p.maxX,u),t=null,_&&(m=F(_,c,r-x,r+S,1,p.minY,p.maxY,u),g=F(_,c,r+w,r+E,1,p.minY,p.maxY,u),_=null),b&&(y=F(b,c,r-x,r+S,1,p.minY,p.maxY,u),v=F(b,c,r+w,r+E,1,p.minY,p.maxY,u),b=null),l>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*n,2*r),s.push(g||[],e+1,2*n,2*r+1),s.push(y||[],e+1,2*n+1,2*r),s.push(v||[],e+1,2*n+1,2*r+1)}}},J.prototype.getTile=function(t,e,n){var r=this.options,i=r.extent,o=r.debug;if(t<0||t>24)return null;var a=1<1&&console.log("drilling down to z%d-%d-%d",t,e,n);for(var u,l=t,c=e,h=n;!u&&l>0;)l--,c=Math.floor(c/2),h=Math.floor(h/2),u=this.tiles[Q(l,c,h)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,c,h),o>1&&console.time("drilling down"),this.splitTile(u.source,l,c,h,t,e,n),o>1&&console.timeEnd("drilling down"),this.tiles[s]?q(this.tiles[s],i):null):null};var tt=n(3192),et=n(6838),nt=n(6297),rt=function(){function t(e,n,r,i){(0,tt.Z)(this,t),(0,nt.Z)(this,"vectorLayerCache",{}),this.x=n,this.y=r,this.z=i,this.vectorTile=e}return(0,et.Z)(t,[{key:"getTileData",value:function(t){return t&&this.vectorTile.layers[t]?this.vectorLayerCache[t]?this.vectorLayerCache[t]:this.vectorTile.layers[t].features:[]}},{key:"getFeatureById",value:function(){throw new Error("Method not implemented.")}}]),t}(),it={tileSize:256,minZoom:0,maxZoom:1/0,zoomOffset:0};function ot(t){for(var e,n,r=0,i=0,o=t.length,a=o-1;i0)if("band"===r[0])try{t[i]=e[r[1]][n]}catch(e){console.warn("Raster Data err!"),t[i]=0}else vt(r,e,n)}))}function _t(t){var e=function(t){var e=(0,gt.Z)(t,3),n=e[0],r=e[1],i=void 0===r?-1:r,o=e[2],a=void 0===o?-1:o;return void 0===n?(console.warn("Express err!"),["+",0,0]):[n.replace(/\s+/g,""),i,a]}(t),n=e[0],r=e[1],i=e[2];return Array.isArray(r)&&(r=_t(t[1])),Array.isArray(i)&&(i=_t(t[2])),function(t,e,n){switch(t){case"+":return e+n;case"-":return e-n;case"*":return e*n;case"/":return e/n;case"%":return e%n;case"^":return Math.pow(e,n);case"abs":return Math.abs(e);case"floor":return Math.floor(e);case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"sin":return Math.sin(e);case"cos":return Math.cos(e);case"atan":return-1===n?Math.atan(e):Math.atan2(e,n);case"min":return Math.min(e,n);case"max":return Math.max(e,n);case"log10":return Math.log(e);case"log2":return Math.log2(e);default:return console.warn("Calculate symbol err! Return default 0"),0}}(n,r,i)}var bt={nd:{type:"operation",expression:["/",["-",["band",1],["band",0]],["+",["band",1],["band",0]]]},rgb:{type:"function",method:function(t,e){for(var n=t[0].rasterData,r=t[1].rasterData,i=t[2].rasterData,o=[],a=(null==e?void 0:e.countCut)||[2,98],s=(0,gt.Z)(a,2),u=s[0],l=s[1],c=(null==e?void 0:e.RMinMax)||xt(n,u,l),h=(null==e?void 0:e.GMinMax)||xt(r,u,l),p=(null==e?void 0:e.BMinMax)||xt(i,u,l),f=0;f1)){t.next=15;break}return t.next=4,Rt(a,n);case 4:if(s=t.sent,u=s.rasterFiles,l=s.xhrList,c=s.errList,Lt(e,l),!(c.length>0)){t.next=12;break}return r(c,null),t.abrupt("return");case 12:Mt(u,i,o,r),t.next=17;break;case 15:h=(0,lt.getArrayBuffer)(n,(function(t,e){t?r(t):e&&Mt([{data:e,bands:a[0].bands}],i,o,r)})),Lt(e,[h]);case 17:case"end":return t.stop()}var p}),t)})));return function(e,n,r,i,o){return t.apply(this,arguments)}}();function Rt(t,e){return Dt.apply(this,arguments)}function Dt(){return(Dt=(0,E.Z)(T().mark((function t(e,n){var r,i,o,a,s,u,l,c,h,p,f;return T().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=[],i=[],o=[],a=0;case 4:if(!(a=Math.abs(t[i])?r+=n-e+t[i]:r+=t[i]-e+n,n=e;return n+1*r}var ne={min:function(t){if(0===t.length)throw new Error("min requires at least one data point");for(var e=t[0],n=1;ne&&(e=t[n]);return e},mean:function(t){if(0===t.length)throw new Error("mean requires at least one data point");return ee(t)/t.length},sum:ee};function re(t,e){if(Array.isArray(e))return e}var ie=function(t){(0,Wt.Z)(u,t);var e,n,r,i,a=(r=u,i=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}}(),function(){var t,e=(0,Yt.Z)(r);if(i){var n=(0,Yt.Z)(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return(0,qt.Z)(this,t)});function u(t,e){var n;return(0,tt.Z)(this,u),n=a.call(this),(0,nt.Z)((0,Ht.Z)(n),"type","source"),(0,nt.Z)((0,Ht.Z)(n),"isTile",!1),(0,nt.Z)((0,Ht.Z)(n),"inited",!1),(0,nt.Z)((0,Ht.Z)(n),"hooks",{init:new Xt.ni}),(0,nt.Z)((0,Ht.Z)(n),"parser",{type:"geojson"}),(0,nt.Z)((0,Ht.Z)(n),"transforms",[]),(0,nt.Z)((0,Ht.Z)(n),"cluster",!1),(0,nt.Z)((0,Ht.Z)(n),"clusterOptions",{enable:!1,radius:40,maxZoom:20,zoom:-99,method:"count"}),(0,nt.Z)((0,Ht.Z)(n),"invalidExtent",!1),(0,nt.Z)((0,Ht.Z)(n),"dataArrayChanged",!1),(0,nt.Z)((0,Ht.Z)(n),"cfg",{autoRender:!0}),n.originData=t,n.initCfg(e),n.init().then((function(){n.inited=!0,n.emit("update",{type:"inited"})})),n}return(0,et.Z)(u,[{key:"getSourceCfg",value:function(){return this.cfg}},{key:"getClusters",value:function(t){return this.clusterIndex.getClusters(this.caculClusterExtent(2),t)}},{key:"getClustersLeaves",value:function(t){return this.clusterIndex.getLeaves(t,1/0)}},{key:"getParserType",value:function(){return this.parser.type}},{key:"updateClusterData",value:function(t){var e=this,n=this.clusterOptions,r=n.method,i=void 0===r?"sum":r,a=n.field,s=this.clusterIndex.getClusters(this.caculClusterExtent(2),Math.floor(t));this.clusterOptions.zoom=t,s.forEach((function(t){t.id||(t.properties.point_count=1)})),(a||(0,Kt.isFunction)(i))&&(s=s.map((function(t){var n=t.id;if(n){var r,o=e.clusterIndex.getLeaves(n,1/0).map((function(t){return t.properties}));if((0,Kt.isString)(i)&&a){var s=function(t,e){return t.map((function(t){return 1*t[e]}))}(o,a);r=ne[i](s)}(0,Kt.isFunction)(i)&&(r=i(o)),t.properties.stat=r}else t.properties.point_count=1;return t}))),this.data=o("geojson")({type:"FeatureCollection",features:s}),this.executeTrans()}},{key:"getFeatureById",value:function(t){var e=this.parser,n=e.type,r=void 0===n?"geojson":n,i=e.geometry;if("geojson"!==r||this.cluster)return"json"===r&&i?this.data.dataArray.find((function(e){return e._id===t})):t=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};if(e=t,Array.isArray(e)&&0===e.length||!Array.isArray(e)&&"string"!=typeof e)throw new Error("tile server url is error");var r=(null==n?void 0:n.dataType)||Ct.RasterTileType.IMAGE;r===Ct.RasterTileType.RGB&&(r=Ct.RasterTileType.ARRAYBUFFER);var i=(0,y.Z)((0,y.Z)((0,y.Z)({},Bt),n),{},{getTileData:function(e,i){switch(r){case Ct.RasterTileType.IMAGE:return Ft(t,e,i,n);case Ct.RasterTileType.CUSTOMIMAGE:case Ct.RasterTileType.CUSTOMTERRAINRGB:return Pt(i,null==n?void 0:n.getCustomData);case Ct.RasterTileType.ARRAYBUFFER:return Nt(t,e,i,(null==n?void 0:n.format)||zt,null==n?void 0:n.operation);case Ct.RasterTileType.CUSTOMARRAYBUFFER:case Ct.RasterTileType.CUSTOMRGB:return Ot(i,null==n?void 0:n.getCustomData,(null==n?void 0:n.format)||zt,null==n?void 0:n.operation);default:return Ft(t,e,i,n)}}});return{data:t,dataArray:[],tilesetOptions:i,isTile:!0}})),a("mvt",(function(t,e){var n=Array.isArray(t)?t[0]:t,r=(0,y.Z)((0,y.Z)((0,y.Z)({},dt),e),{},{getTileData:function(t,r){return mt(n,t,r,null==e?void 0:e.requestParameters,null==e?void 0:e.getCustomData)}});return{data:n,dataArray:[],tilesetOptions:r,isTile:!0}})),a("geojsonvt",(function(t,e){var n=function(t){var e={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!0,debug:0};return void 0===t||void 0===t.geojsonvtOptions?e:(0,y.Z)((0,y.Z)({},e),t.geojsonvtOptions)}(e),r=n.extent||4096,i=function(t,e){return new J(t,e)}(t,n);return{data:t,dataArray:[],tilesetOptions:(0,y.Z)((0,y.Z)((0,y.Z)({},it),e),{},{getTileData:function(t,e){return ut(e,i,t,r)}}),isTile:!0}})),a("testTile",(function(t,e){return{data:t,dataArray:[],tilesetOptions:(0,y.Z)((0,y.Z)((0,y.Z)({},Vt),e),{},{getTileData:function(t){return Gt(t)}}),isTile:!0}})),a("geojson",(function(t,e){var n=[],r={};return t.features?(t.features=t.features.filter((function(t){var e=t.geometry;return null!=t&&e&&e.type&&e.coordinates&&e.coordinates.length>0})),_()(t,!0),0===t.features.length?{dataArray:[],featureKeys:r}:((0,x.nG)(t,(function(t,r){var i,o,a=(i=t,void 0===(o=null==e?void 0:e.featureId)?null:1*(0,S.Z)(i.properties[o])==="number"?1*i.properties[o]:i.properties&&i.properties[o]?function(t){for(var e=t.toString(),n=5381,r=e.length;r;)n=33*n^e.charCodeAt(--r);return n>>>0}(i.properties[o]+"")%1000019:null);null===a&&(a=r);var s=a,u=(0,b.r7)(t),l=(0,y.Z)((0,y.Z)({},t.properties),{},{coordinates:u,_id:s});n.push(l)})),{dataArray:n,featureKeys:r})):(t.features=[],{dataArray:[]})})),a("image",(function(t,e){var n=e.extent,r=void 0===n?[121.168,30.2828,121.384,30.4219]:n,i=new Promise((function(e){t instanceof HTMLImageElement||(0,lt.isImageBitmap)(t)?e([t]):function(t,e){var n=t,r=[];if("string"==typeof n)(0,lt.getImage)({url:n},(function(t,n){n&&(r.push(n),e(r))}));else{var i=n.length,o=0;n.forEach((function(t){(0,lt.getImage)({url:t},(function(t,n){o++,n&&r.push(n),o===i&&e(r)}))}))}}(t,(function(t){e(t)}))}));return{originData:t,images:i,_id:1,dataArray:[{_id:0,coordinates:[[r[0],r[1]],[r[2],r[3]]]}]}})),a("csv",(function(t,e){return w(m(t),e)})),a("json",w),a("raster",(function(t,e){var n,r,i,o=e.extent,a=e.width,s=e.height,u=e.min,l=e.max,c=e.format,h=e.operation;return void 0===c||At(t)?(n=Array.from(t),r=a,i=s):n=wt(Array.isArray(t)?t:[t],c,h),{_id:1,dataArray:[{_id:1,data:n,width:r,height:i,min:u,max:l,coordinates:[[o[0],o[1]],[o[2],o[3]]]}]}})),a("rasterRgb",(function(t,e){var n,r=e.extent,i=e.min,o=e.max,a=e.width,s=e.height,u=e.format,l=e.operation,c=(0,Ut.Z)(e,Zt);return n=void 0===u||At(t)?Array.from(t):wt(Array.isArray(t)?t:[t],u,l),{_id:1,dataArray:[(0,y.Z)((0,y.Z)({_id:1,data:n,width:a,height:s},c),{},{min:i,max:o,coordinates:[[r[0],r[1]],[r[2],r[3]]]})]}})),u("cluster",te),u("filter",(function(t,e){var n=e.callback;return n&&(t.dataArray=t.dataArray.filter(n)),t})),u("join",(function(t,e){var n=e.sourceField,r=e.targetField,i=e.data,o={};return i.forEach((function(t){o[t[n]]=t})),t.dataArray=t.dataArray.map((function(t){var e=t[r];return(0,y.Z)((0,y.Z)({},t),o[e])})),t})),u("map",(function(t,e){var n=e.callback;return n&&(t.dataArray=t.dataArray.map(n)),t})),u("grid",(function(t,e){var n=t.dataArray,r=e.size,i=void 0===r?10:r,o=i/(2*Math.PI*se)*(256<<20)/2,a=function(t,e){var n,r,i=1/0,o=-1/0,a=oe(t);try{for(a.s();!(r=a.n()).done;)n=r.value.coordinates[1],Number.isFinite(n)&&(i=no?n:o)}catch(t){a.e(t)}finally{a.f()}var s,u,l,c,h=(u=(i+o)/2,l=(s=e)/se*(180/Math.PI),c=function(t,e){return e/se*(180/Math.PI)/Math.cos(t*Math.PI/180)}(u,s),{yOffset:l,xOffset:c});if(h.xOffset<=0||h.yOffset<=0)return{gridHash:{},gridOffset:h};var p,f={},d=oe(t);try{for(d.s();!(p=d.n()).done;){var m=p.value,g=m.coordinates[1],y=m.coordinates[0];if(Number.isFinite(g)&&Number.isFinite(y)){var v=Math.floor((g+90)/h.yOffset),_=Math.floor((y+180)/h.xOffset),b="".concat(v,"-").concat(_);f[b]=f[b]||{count:0,points:[]},f[b].count+=1,f[b].points.push(m)}}}catch(t){d.e(t)}finally{d.f()}return{gridHash:f,gridOffset:h}}(n,i),s=function(t,e,n){return Object.keys(t).reduce((function(r,i,o){var a=i.split("-"),s=parseInt(a[0],10),u=parseInt(a[1],10),l={};if(n.field&&n.method){var c=lt.Satistics.getColumn(t[i].points,n.field);l[n.method]=lt.Satistics.statMap[n.method](c)}return Object.assign(l,{_id:o,coordinates:(0,lt.aProjectFlat)([e.xOffset*(u+.5)-180,e.yOffset*(s+.5)-90]),rawData:t[i].points,count:t[i].count}),r.push(l),r}),[])}(a.gridHash,a.gridOffset,e);return{yOffset:o,xOffset:o,radius:o,type:"grid",dataArray:s}})),u("hexagon",(function(t,e){var n=t.dataArray,r=e.size,i=void 0===r?10:r,o=e.method,a=void 0===o?"sum":o,s=i/(2*Math.PI*6378e3)*(256<<20)/2,u=n.map((function(t){var e=(0,lt.aProjectFlat)(t.coordinates),n=(0,gt.Z)(e,2),r=n[0],i=n[1];return(0,y.Z)((0,y.Z)({},t),{},{coordinates:[r,i]})})),l=function(){var t,e,n,r=0,i=0,o=1,a=1,s=ce,u=he;function l(t){var r,i={},o=[],a=t.length;for(r=0;r1){var m=c-f,g=f+(cv*v+_*_&&(f=g+(1&p?1:-1)/2,p=y)}var b=f+"-"+p,x=i[b];x?x.push(l):(o.push(x=i[b]=[l]),x.x=(f+(1&p)/2)*e,x.y=p*n)}return o}function c(t){var e=0,n=0;return le.map((function(r){var i=Math.sin(r)*t,o=-Math.cos(r)*t,a=i-e,s=o-n;return e=i,n=o,[a,s]}))}return l.hexagon=function(e){return"m"+c(null==e?t:+e).join("l")+"z"},l.centers=function(){for(var s=[],u=Math.round(i/n),l=Math.round(r/e),c=u*n;c{"use strict";n.r(e),n.d(e,{$XMLHttpRequest:()=>Wt,$location:()=>qt,$window:()=>Ht,AJAXError:()=>Yt,BKDRHash:()=>Vn,DOM:()=>r,FrequencyController:()=>cn,LRUCache:()=>nr,LineTriangulation:()=>Ai,LoadTileDataStatus:()=>_r,PointFillTriangulation:()=>Ci,Satistics:()=>i,SourceTile:()=>Pr,TilesetManager:()=>Rr,UpdateTileStrategy:()=>vr,WorkerSourceMap:()=>ki,aProjectFlat:()=>Mn,amap2Project:()=>An,amap2UnProject:()=>Cn,anchorTranslate:()=>ue,anchorType:()=>se,applyAnchorClass:()=>le,bBoxToBounds:()=>In,bindAll:()=>ln,boundsContains:()=>Ln,calAngle:()=>Fn,calDistance:()=>Dn,calculateCentroid:()=>jn,calculatePointsCenterAndRadius:()=>Un,decodePickingColor:()=>fe,dispatchMapCameraParams:()=>zt,dispatchMouseDown:()=>yt,dispatchMouseMove:()=>vt,dispatchMouseUp:()=>_t,dispatchPointerDown:()=>Ot,dispatchPointerMove:()=>Pt,dispatchPointerUp:()=>kt,dispatchTouchEnd:()=>Ft,dispatchTouchMove:()=>Nt,dispatchTouchStart:()=>Dt,djb2hash:()=>Gn,encodePickingColor:()=>de,executeWorkerTask:()=>ji,expandUrl:()=>Nr,extent:()=>gn,flow:()=>Bn,formatImage:()=>ae,generateCatRamp:()=>ye,generateColorRamp:()=>me,generateCustomRamp:()=>_e,generateLinearRamp:()=>ge,generateQuantizeRamp:()=>ve,getAngle:()=>zn,getArrayBuffer:()=>Qt,getBBoxFromPoints:()=>Zn,getCullFace:()=>Se,getDefaultDomain:()=>xe,getImage:()=>oe,getJSON:()=>Jt,getReferrer:()=>nn,getTileIndices:()=>Cr,getTileWarpXY:()=>Or,getURLFromTemplate:()=>Fr,getWMTSURLFromTemplate:()=>zr,guid:()=>Hn,isAndroid:()=>an,isColor:()=>he,isImageBitmap:()=>tn,isMini:()=>Vt,isMiniAli:()=>Ut,isMiniScene:()=>Bt,isPC:()=>sn,isURLTemplate:()=>Dr,isWeChatMiniProgram:()=>Zt,isWorker:()=>en,isiOS:()=>on,latitude:()=>Sn,lineAtOffset:()=>tr,lineAtOffsetAsyc:()=>er,lngLatInExtent:()=>mn,lngLatToMeters:()=>bn,lnglatDistance:()=>On,longitude:()=>wn,makeXMLHttpRequestPromise:()=>$t,metersToLngLat:()=>xn,miniWindow:()=>Gt,normalize:()=>Rn,osmLonLat2TileXY:()=>Mr,osmTileXY2LonLat:()=>Tr,padBounds:()=>kn,polygonFillTriangulation:()=>Oi,postData:()=>te,project:()=>Pn,rgb2arr:()=>pe,sameOrigin:()=>ee,setL7WorkerSource:()=>zi,setMiniScene:()=>jt,tileToBounds:()=>Ar,tranfrormCoord:()=>vn,unProjectFlat:()=>Tn,validateLngLat:()=>En});var r={};n.r(r),n.d(r,{DPR:()=>Ge,addClass:()=>Le,addStyle:()=>He,appendElementType:()=>Qe,clearChildren:()=>Ke,create:()=>Pe,css2Style:()=>Ye,empty:()=>Fe,getClass:()=>Ne,getContainer:()=>Ae,getDiffRect:()=>Xe,getStyleList:()=>We,getViewPortScale:()=>Ze,hasClass:()=>Re,printCanvas:()=>Ue,remove:()=>ke,removeClass:()=>Ie,removeStyle:()=>qe,setChecked:()=>$e,setClass:()=>De,setTransform:()=>Be,setUnDraggable:()=>Je,splitWords:()=>Oe,triggerResize:()=>je,trim:()=>Ce});var i={};n.r(i),n.d(i,{getColumn:()=>lr,getSatByColumn:()=>cr,max:()=>rr,mean:()=>ar,min:()=>ir,mode:()=>sr,statMap:()=>ur,sum:()=>or});var o=n(3659),a=n(6838),s=n(3192),u=n(6193),l=n(9097),c=n(6875),h=n(6070),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function f(t){this.message=t}function d(t){for(var e,n,r,i,o="",a=0,s=(t=String(t)).length%3;a255||(r=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");o+=p.charAt((e=n<<16|r<<8|i)>>18&63)+p.charAt(e>>12&63)+p.charAt(e>>6&63)+p.charAt(63&e)}return s?o.slice(0,s-3)+"===".substring(s):o}f.prototype=new Error,f.prototype.name="InvalidCharacterError";var m,g,y=function(){function t(e,n){(0,s.Z)(this,t),this.buffers=e,this.type=n}return(0,a.Z)(t,[{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(t,e,n){throw new Error("not implemented")}}]),t}();m=m||(m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{}),g="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,n){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;const v="undefined"!=typeof my&&my&&"function"==typeof my.showToast&&!0!==my.isFRM?my.getSystemInfoSync().pixelRatio:g.devicePixelRatio;var _=(0,a.Z)((function t(e,n){(0,s.Z)(this,t),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()})),b=n(5161);function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n2&&void 0!==arguments[2]?arguments[2]:{},r=w.get(this);r||(r={}),r[t]||(r[t]=[]),r[t].push(e),w.set(this,r),n.capture,n.once,n.passive}},{key:"removeEventListener",value:function(t,e){var n=w.get(this);if(n){var r=n[t];if(r&&r.length>0)for(var i=r.length;i--;i>0)if(r[i]===e){r.splice(i,1);break}}}},{key:"dispatchEvent",value:function(t){var e=w.get(this)[t.type];if(e){var n,r=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(e);try{for(r.s();!(n=r.n()).done;)(0,n.value)(t)}catch(t){r.e(t)}finally{r.f()}}}}]),t}();var E=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){var t;return(0,s.Z)(this,i),(t=r.call(this)).childNodes=[],t}return(0,a.Z)(i,[{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}}]),i}(S);var M,T,A,C,O=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){var t;return(0,s.Z)(this,i),(t=r.call(this)).className="",t.children=[],t}return(0,a.Z)(i,[{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]}}]),i}(E);if("undefined"!=typeof my&&my&&"function"==typeof my.showToast&&!0!==my.isFRM){var P=my.getSystemInfoSync();M=P.screenWidth,T=P.screenHeight,A=P.windowWidth,C=P.windowHeight}else{var k=g.innerWidth,L=g.innerHeight;M=k,T=L,A=k,C=L}var I={width:M,height:T,availWidth:A,availHeight:C,availLeft:0,availTop:0},R=I.availWidth,D=I.availHeight,N={style:[]};function F(t,e){var n,r;"parentNode"in t||(n=0===e?function(){return null}:1===e?function(){return N}:function(){return null},Object.defineProperty(t,"parentNode",{enumerable:!0,get:n})),"parentElement"in t||(r=0===e?function(){return null}:1===e?function(){return N}:function(){return null},Object.defineProperty(t,"parentElement",{enumerable:!0,get:r}))}function z(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 B(){}var j=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){var t,e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1?arguments[1]:void 0;return(0,s.Z)(this,i),(t=r.call(this)).className="",t.children=[],t.focus=B,t.blur=B,t.insertBefore=B,t.appendChild=B,t.removeChild=B,t.remove=B,t.innerHTML="",t.tagName=n.toUpperCase(),F((0,b.Z)(t),o),(e=(0,b.Z)(t)).style=e.style||{},Object.assign(e.style,{top:"0px",left:"0px",width:R+"px",height:D+"px",margin:"0px",padding:"0px"}),z((0,b.Z)(t)),function(t){"clientLeft"in t||(t.clientLeft=0,t.clientTop=0),"clientWidth"in t||(t.clientWidth=R,t.clientHeight=D),"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}})}((0,b.Z)(t)),function(t){"offsetLeft"in t||(t.offsetLeft=0,t.offsetTop=0),"offsetWidth"in t||(t.offsetWidth=R,t.offsetHeight=D)}((0,b.Z)(t)),function(t){"scrollLeft"in t||(t.scrollLeft=0,t.scrollTop=0),"scrollWidth"in t||(t.scrollWidth=R,t.scrollHeight=D)}((0,b.Z)(t)),t}return(0,a.Z)(i)}(O);var U=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t){return(0,s.Z)(this,i),r.call(this,t)}return(0,a.Z)(i,[{key:"addTextTrack",value:function(){}},{key:"captureStream",value:function(){}},{key:"fastSeek",value:function(){}},{key:"load",value:function(){}},{key:"pause",value:function(){}},{key:"play",value:function(){}}]),i}(j);var Z=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(){return(0,s.Z)(this,i),r.call(this,"video")}return(0,a.Z)(i)}(U),V={};function G(){return V}var H=(0,a.Z)((function t(){(0,s.Z)(this,t);var e=G(),n=e.createImage&&e.createImage()||{};return"tagName"in n||(n.tagName="IMG",n.__proto__=t.prototype),F(n),z(n),Object.assign(n,{addEventListener:function(t,e){n["on".concat(t)]=e.bind(n)},removeEventListener:function(t){n["on".concat(t)]=null}}),n})),W={href:"",protocol:"",host:""};function q(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 n,r=(0,c.Z)(t);if(e){var i=(0,c.Z)(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return(0,l.Z)(this,n)}}var Y=function(t){(0,u.Z)(n,t);var e=q(n);function n(){return(0,s.Z)(this,n),e.call(this,"body",0)}return(0,a.Z)(n,[{key:"addEventListener",value:function(t,e){}},{key:"removeEventListener",value:function(t,e,n){}},{key:"dispatchEvent",value:function(t){}}]),n}(j),X=function(t){(0,u.Z)(n,t);var e=q(n);function n(){return(0,s.Z)(this,n),e.call(this,"html",0)}return(0,a.Z)(n,[{key:"addEventListener",value:function(t,e){}},{key:"removeEventListener",value:function(t,e){}},{key:"dispatchEvent",value:function(t){}}]),n}(j),$={},K={readyState:"complete",visibilityState:"visible",hidden:!1,fullscreen:!0,scripts:[],style:{},location:W,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 H:"video"===t?new Z:new j(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,n){$[t]||($[t]=[]),$[t].push(e)},removeEventListener:function(t,e){var n=$[t];if(n&&n.length>0)for(var r=n.length;r--;r>0)if(n[r]===e){n.splice(r,1);break}},dispatchEvent:function(t){var e=t.type,n=$[e];if(n)for(var r=0;r-1,presto:et.indexOf("Presto")>-1,webKit:et.indexOf("AppleWebKit")>-1,gecko:et.indexOf("Gecko")>-1&&-1===et.indexOf("KHTML"),mobile:!!et.match(/AppleWebKit.*Mobile.*/),ios:!!et.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:et.indexOf("Android")>-1||et.indexOf("Linux")>-1,iPhone:et.indexOf("iPhone")>-1,iPad:et.indexOf("iPad")>-1,webApp:-1===et.indexOf("Safari"),weixin:et.indexOf("MicroMessenger")>-1,qq:" qq"===et.match(/\sQQ/i)}),language:(g.navigator.browserLanguage||g.navigator.language).toLowerCase()};at.versions.android?Q="android":at.versions.trident?Q="IE":at.versions.presto?Q="Opera":at.versions.webKit?Q="webKit":at.versions.gecko?Q="Firefox":at.versions.mobile?Q="mobile":at.versions.ios?Q="ios":at.versions.iPhone?Q="iPhone":at.versions.iPad?Q="ipad":at.versions.webApp?Q="webApp":at.versions.weixin?Q="weixin":at.versions.qq&&(Q="qq"),J=g.navigator.userAgent,tt=at.language}var st=-1!==J.toLowerCase().indexOf("android")?"Android; CPU Android 6.0":"iPhone; CPU iPhone OS 10_3_1 like Mac OS X",ut="Mozilla/5.0 (".concat(st,") AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E8301 MicroMessenger/6.6.0 MiniGame NetType/WIFI Language/").concat(tt),lt={platform:Q,language:tt,appVersion:"5.0 (".concat(st,") AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"),userAgent:ut},ct=0,ht=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,s.Z)(this,t),0!=e.indexOf("http://")&&0!=e.indexOf("https://")?this.href=n+e:this.href=e}return(0,a.Z)(t,null,[{key:"createObjectURL",value:function(t){var e=t.buffers[0],n=t.type,r=function(t){for(var e="",n=new Uint8Array(t),r=n.byteLength,i=0;i0&&void 0!==arguments[0]?arguments[0]:{};t.target=t.target||n,e.call(n,t)})}},{key:"removeEventListener",value:function(t,e){this["on"+t]===e&&(this["on"+t]=null)}}]),i}(S);function gt(t){return function(e){e.type=t,K.dispatchEvent(e)}}mt.UNSEND=0,mt.OPENED=1,mt.HEADERS_RECEIVED=2,mt.LOADING=3,mt.DONE=4;var yt=gt("mousedown"),vt=gt("mousemove"),_t=gt("mouseup");var bt=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t){var e;return(0,s.Z)(this,i),(e=r.call(this,t)).target=G(),e.currentTarget=G(),e}return(0,a.Z)(i)}(_),xt=["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"],wt=[!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],St="touch";function Et(t,e,n){for(var r=new bt(t),i=0;i>(-2*o&6)):0)r=p.indexOf(r);return i},btoa:d,devicePixelRatio:v,Blob:y,document:K,Element:O,Event:_,EventTarget:S,HTMLCanvasElement:nt,HTMLElement:j,HTMLMediaElement:U,HTMLVideoElement:Z,Image:H,ImageData:it,navigator:lt,Node:E,requestAnimationFrame:function(t){var e=G();return e.requestAnimationFrame?e.requestAnimationFrame(t):function(t){var e=Date.now(),n=Math.max(ct+23,e);return setTimeout((function(){t(ct=n)}),n-e)}(t)},cancelAnimationFrame:function(t){var e=G();return e.cancelAnimationFrame?e.cancelAnimationFrame(t):clearTimeout(t)},screen:I,XMLHttpRequest:mt,performance:{mark:function(t){return null},clearMeasures:function(t){return null},clearMarks:function(t){return null},measure:function(t,e,n){return{duration:0}},now:function(){}},URL:ht,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(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};K.addEventListener(t,e,n)},removeEventListener:function(t,e,n){K.removeEventListener(t,e)},dispatchEvent:function(t){K.dispatchEvent(t)},innerWidth:I.availWidth,innerHeight:I.availHeight,setTimeout,clearTimeout,setInterval,clearInterval},Ht=Vt?Gt:g,Wt=Vt?mt:g.XMLHttpRequest,qt=Vt?W:g.location;var Yt=function(t){(0,u.Z)(i,t);var e,n,r=(e=i,n=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}}(),function(){var t,r=(0,c.Z)(e);if(n){var i=(0,c.Z)(this).constructor;t=Reflect.construct(r,arguments,i)}else t=r.apply(this,arguments);return(0,l.Z)(this,t)});function i(t,e,n,o){var a;return(0,s.Z)(this,i),(a=r.call(this,"AJAXError: ".concat(e," (").concat(t,"): ").concat(n))).status=t,a.statusText=e,a.url=n,a.body=o,a}return(0,a.Z)(i)}((0,h.Z)(Error));function Xt(t,e){var n=new Wt,r=Array.isArray(t.url)?t.url[0]:t.url;for(var i in n.open(t.method||"GET",r,!0),"arrayBuffer"===t.type&&(n.responseType="arraybuffer"),t.headers)t.headers.hasOwnProperty(i)&&n.setRequestHeader(i,t.headers[i]);return"json"===t.type&&(n.responseType="text",n.setRequestHeader("Accept","application/json")),n.withCredentials="include"===t.credentials,n.onerror=function(){e(new Error(n.statusText))},n.onload=function(){if((n.status>=200&&n.status<300||0===n.status)&&null!==n.response){var i=n.response;if("json"===t.type)try{i=JSON.parse(n.response)}catch(t){return e(t)}e(null,i,n.getResponseHeader("Cache-Control"),n.getResponseHeader("Expires"),n)}else{var o=new Blob([n.response],{type:n.getResponseHeader("Content-Type")});e(new Yt(n.status,n.statusText,r.toString(),o))}},n.send(t.body),n}function $t(t){return new Promise((function(e,n){Xt(t,(function(t,r,i,o,a){t?n({err:t,data:null,xhr:a}):e({err:null,data:r,cacheControl:i,expires:o,xhr:a})}))}))}function Kt(t,e){return Xt(t,e)}var Jt=function(t,e){return Kt((0,o.Z)((0,o.Z)({},t),{},{type:"json"}),e)},Qt=function(t,e){return Kt((0,o.Z)((0,o.Z)({},t),{},{type:"arrayBuffer"}),e)},te=function(t,e){return Kt((0,o.Z)((0,o.Z)({},t),{},{method:"POST"}),e)};function ee(t){var e=Ht.document.createElement("a");return e.href=t,e.protocol===Ht.document.location.protocol&&e.host===Ht.document.location.host}var ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function re(t,e){var n=new Ht.Image,r=Ht.URL||Ht.webkitURL;n.crossOrigin="anonymous",n.onload=function(){e(null,n),r.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame((function(){n.src=ne}))},n.onerror=function(){return e(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(t)],{type:"image/png"});n.src=t.byteLength?r.createObjectURL(i):ne}function ie(t,e){var n=new Blob([new Uint8Array(t)],{type:"image/png"});createImageBitmap(n).then((function(t){e(null,t)})).catch((function(t){e(new Error("Could not load image because of ".concat(t.message,". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.")))}))}var oe=function(t,e,n){var r=function(t,r){if(t)e(t);else if(r){var i="function"==typeof createImageBitmap,o=n?n(r):r;i?ie(o,e):re(o,e)}};return"json"===t.type?Jt(t,r):Qt(t,r)},ae=function(t,e){"function"==typeof createImageBitmap?ie(t,e):re(t,e)},se=function(t){return t.CENTER="center",t.TOP="top",t["TOP-LEFT"]="top-left",t["TOP-RIGHT"]="top-right",t.BOTTOM="bottom",t["BOTTOM-LEFT"]="bottom-left",t["BOTTOM-RIGHT"]="bottom-right",t.LEFT="left",t.RIGHT="right",t}({}),ue={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 le(t,e,n){var r=t.classList;for(var i in ue)ue.hasOwnProperty(i)&&r.remove("l7-".concat(n,"-anchor-").concat(i));r.add("l7-".concat(n,"-anchor-").concat(e))}var ce=n(4537);function he(t){return"string"==typeof t&&!!ce.ZP(t)}function pe(t){var e=ce.ZP(t),n=[0,0,0,0];return null!=e&&(n[0]=e.r/255,n[1]=e.g/255,n[2]=e.b/255,n[3]=e.opacity),n}function fe(t){return(t&&t[0])+256*(t&&t[1])+65536*(t&&t[2])-1}function de(t){return[t+1&255,t+1>>8&255,t+1>>8>>8&255]}function me(t){var e=Ht.document.createElement("canvas"),n=e.getContext("2d");e.width=256,e.height=1;for(var r=null,i=n.createLinearGradient(0,0,256,1),o=t.positions[0],a=t.positions[t.positions.length-1],s=0;s0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function De(t,e){t instanceof HTMLElement?t.className=e:t.className.baseVal=e}function Ne(t){return t instanceof SVGElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Fe(t){for(;t&&t.firstChild;)t.removeChild(t.firstChild)}var ze=function(t){var e,n,r=null==Ht||null===(e=Ht.document)||void 0===e||null===(n=e.documentElement)||void 0===n?void 0:n.style;if(!r)return t[0];for(var i in t)if(t[i]&&t[i]in r)return t[i];return t[0]}(["transform","WebkitTransform"]);function Be(t,e){t.style[ze]=e}function je(){if("function"==typeof Event)Ht.dispatchEvent(new Event("resize"));else{var t=Ht.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,Ht,0),Ht.dispatchEvent(t)}}function Ue(t){var e=["padding: "+(t.height/2-8)+"px "+t.width/2+"px;","line-height: "+t.height+"px;","background-image: url("+t.toDataURL()+");"];console.log("%c\n",e.join(""))}function Ze(){var t,e=Ht.document.querySelector('meta[name="viewport"]');if(!e)return 1;var n=(null===(t=e.content)||void 0===t?void 0:t.split(",")).find((function(t){var e=t.split("=");return"initial-scale"===(0,Me.Z)(e,1)[0]}));return n?1*n.split("=")[1]:1}var Ve,Ge=Ze()<1?1:Ht.devicePixelRatio;function He(t,e){t.setAttribute("style","".concat(t.style.cssText).concat(e))}function We(t){return t.split(";").map((function(t){return t.trim()})).filter((function(t){return t}))}function qe(t,e){var n,r=We(null!==(n=t.getAttribute("style"))&&void 0!==n?n:""),i=We(e),o=Te.pull.apply(void 0,[r].concat((0,Ee.Z)(i)));t.setAttribute("style",o.join(";"))}function Ye(t){return Object.entries(t).map((function(t){var e=(0,Me.Z)(t,2),n=e[0],r=e[1];return"".concat(n,": ").concat(r)})).join(";")}function Xe(t,e){return{left:t.left-e.left,top:t.top-e.top,right:e.left+e.width-t.left-t.width,bottom:e.top+e.height-t.top-t.height}}function $e(t,e){t.checked=e,e?t.setAttribute("checked","true"):t.removeAttribute("checked")}function Ke(t){t.innerHTML=""}function Je(t){t.setAttribute("draggable","false")}function Qe(t,e){if("string"==typeof e){var n=document.createElement("div");for(n.innerHTML=e;n.firstChild;)t.append(n.firstChild)}else Array.isArray(e)?t.append.apply(t,(0,Ee.Z)(e)):t.append(e)}function tn(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap}function en(){return"function"==typeof importScripts}var nn=en()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===window.location.protocol?window.parent:window).location.href},rn=null===(Ve=navigator)||void 0===Ve?void 0:Ve.userAgent,on=!!rn.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),an=rn.indexOf("Android")>-1||rn.indexOf("Adr")>-1;function sn(){for(var t=rn,e=!0,n=0,r=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"];n0){e=!1;break}}return e}var un=n(6297);function ln(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}var cn=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16;(0,s.Z)(this,t),(0,un.Z)(this,"duration",16),(0,un.Z)(this,"timestamp",(new Date).getTime()),this.duration=e}return(0,a.Z)(t,[{key:"run",value:function(t){var e=(new Date).getTime(),n=e-this.timestamp;this.timestamp=e,n>=this.duration&&t()}}]),t}(),hn=n(2512),pn=n(3959);function fn(t){return"number"==typeof t}var dn=2*Math.PI*6378137/2;function mn(t,e){var n=(0,Me.Z)(e,4),r=n[0],i=n[1],o=n[2],a=n[3];return t.lng>r&&t.lng<=o&&t.lat>i&&t.lat<=a}function gn(t){var e=[1/0,1/0,-1/0,-1/0];return t.forEach((function(t){var n=t.coordinates;yn(e,n)})),e}function yn(t,e){return Array.isArray(e[0])?e.forEach((function(e){yn(t,e)})):(t[0]>e[0]&&(t[0]=e[0]),t[1]>e[1]&&(t[1]=e[1]),t[2]2&&void 0!==arguments[2]?arguments[2]:{enable:!0,decimal:1},n=(t=En(t,!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))[0],r=t[1],i=n*dn/180,o=Math.log(Math.tan((90+r)*Math.PI/360))/(Math.PI/180);return o=o*dn/180,e.enable&&(i=Number(i.toFixed(e.decimal)),o=Number(o.toFixed(e.decimal))),3===t.length?[i,o,t[2]]:[i,o]}function xn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,n=t[0],r=t[1],i=n/dn*180,o=r/dn*180;return o=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),null!=e&&(i=Number(i.toFixed(e)),o=Number(o.toFixed(e))),3===t.length?[i,o,t[2]]:[i,o]}function wn(t){if(null==t)throw new Error("lng is required");return(t>180||t<-180)&&((t%=360)>180&&(t=-360+t),t<-180&&(t=360+t),0===t&&(t=0)),t}function Sn(t){if(null==t)throw new Error("lat is required");return(t>90||t<-90)&&((t%=180)>90&&(t=-180+t),t<-90&&(t=180+t),0===t&&(t=0)),t}function En(t,e){if(!1===e)return t;var n=wn(t[0]),r=Sn(t[1]);return r>85&&(r=85),r<-85&&(r=-85),3===t.length?[n,r,t[2]]:[n,r]}function Mn(t){var e=85.0511287798,n=Math.max(Math.min(e,t[1]),-e),r=256<<20,i=Math.PI/180,o=t[0]*i,a=n*i;return a=Math.log(Math.tan(Math.PI/4+a/2)),o=r*(.5/Math.PI*o+.5),a=r*(-.5/Math.PI*a+(i=.5)),[Math.floor(o),Math.floor(a)]}function Tn(t){var e=.5/Math.PI,n=-.5/Math.PI,r=.5,i=256<<20,o=(0,Me.Z)(t,2),a=o[0],s=o[1];return a=(a/i-.5)/e,s=(s/i-r)/n,s=2*(Math.atan(Math.pow(Math.E,s))-Math.PI/4),[a/(r=Math.PI/180),s/r]}function An(t,e){var n=85.0511287798,r=Math.PI/180,i=6378137;return e=Math.max(Math.min(n,e),-n),e*=r,[(t*=r)*i,(e=Math.log(Math.tan(Math.PI/4+e/2)))*i]}function Cn(t,e){var n=Math.PI/180,r=6378137;return[t/r/n,2*(Math.atan(Math.exp(e/r))-Math.PI/4)/n]}function On(t,e,n){var r=(0,pn.Ht)(e[1]-t[1]),i=(0,pn.Ht)(e[0]-t[0]),o=(0,pn.Ht)(t[1]),a=(0,pn.Ht)(e[1]),s=Math.pow(Math.sin(r/2),2)+Math.pow(Math.sin(i/2),2)*Math.cos(o)*Math.cos(a);return(0,pn.DL)(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)),"meters")}function Pn(t){var e=Math.PI/180,n=85.0511287798,r=6378137,i=Math.max(Math.min(n,t[1]),-n),o=Math.sin(i*e);return[r*t[0]*e,r*Math.log((1+o)/(1-o))/2]}function kn(t,e){var n=Math.abs(t[1][1]-t[0][1])*e,r=Math.abs(t[1][0]-t[0][0])*e;return[[t[0][0]-r,t[0][1]-n],[t[1][0]+r,t[1][1]+n]]}function Ln(t,e){return t[0][0]<=e[0][0]&&t[0][1]<=e[0][1]&&t[1][0]>=e[1][0]&&t[1][1]>=e[1][1]}function In(t){return[[t[0],t[1]],[t[2],t[3]]]}function Rn(t){var e=Dn(t,[0,0]);return[t[0]/e,t[1]/e]}function Dn(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Nn(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Fn(t,e){return 180*Math.acos(function(t,e){return t[0]*e[0]+t[1]*e[1]}(t,e)/(Nn(t)*Nn(e)))/Math.PI}function zn(t,e){return e[0]>0?e[1]>0?90-180*Math.atan(e[1]/e[0])/Math.PI:90+180*Math.atan(-e[1]/e[0])/Math.PI:e[1]<0?90-180*Math.atan(e[1]/e[0])/Math.PI+180:270+180*Math.atan(e[1]/-e[0])/Math.PI}function Bn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;if(t&&!(t.length<2)){for(var n=0,r=[],i=0;i0){var l=r[i-1].rotation;l-u>360-l+u&&(u+=360)}r.push({start:o,end:a,dis:s,rotation:u,duration:0})}return r.map((function(t){t.duration=e*(t.dis/n)})),r}}function jn(t){if(fn(t[0]))return t;if(fn(t[0][0]))throw new Error("当前数据不支持标注");if(fn(t[0][0][0])){var e=0,n=0,r=0;return t.forEach((function(t){t.forEach((function(t){e+=t[0],n+=t[1],r++}))})),[e/r,n/r,0]}throw new Error("当前数据不支持标注")}function Un(t){for(var e=t[0],n=t[1],r=t[0],i=t[1],o=0,a=0,s=0,u=0;un&&(e=Math.floor(e/137)),e=131*e+t.charCodeAt(r);return e}function Gn(t){for(var e=5381,n=(t=t.toString()).length;n;)e=33*e^t.charCodeAt(--n);return e>>>0}function Hn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}var Wn=function(t){return t["GAODE1.x"]="GAODE1.x",t["GAODE2.x"]="GAODE2.x",t.MAPBOX="MAPBOX",t.DEFAULT="DEFAUlTMAP",t.SIMPLE="SIMPLE",t.GLOBEL="GLOBEL",t}({});function qn(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:30,a=n;return(arguments.length>6?arguments[6]:void 0)&&(a=Math.round(n*(o-1))/(o-1)),function(t,e,n,r,i){if(i===Wn["GAODE2.x"]){var o=An(t[0],t[1]),a=An(e[0],e[1]),s=Xn(o,a,r),u=[o[0],s[0],a[0]],l=[o[1],s[1],a[1]];return[].concat((0,Ee.Z)(Cn(Yn(u,n),Yn(l,n))),[0])}var c=Xn(t,e,r),h=[t[0],c[0],e[0]],p=[t[1],c[1],e[1]];return[Yn(h,n),Yn(p,n),0]}(t,e,a,r||.314,i)}function Yn(t,e){var n=1-e;return(t[0]*n+t[1]*e)*n+(t[1]*n+t[2]*e)*e}function Xn(t,e,n){var r,i,o=[e[0]-t[0],e[1]-t[1]],a=(r=o,i=[0,0],Math.sqrt(Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2))),s=Math.atan2(o[1],o[0]),u=a/2/Math.cos(n),l=s+n;return[u*Math.cos(l)+t[0],u*Math.sin(l)+t[1]]}function $n(t,e,n,r,i){var o=n;return(arguments.length>6?arguments[6]:void 0)&&(o=Math.round(29*n)/29),function(t,e,n,r){var i=[(0,pn.Ht)(t[0]),(0,pn.Ht)(t[1])],o=[(0,pn.Ht)(e[0]),(0,pn.Ht)(e[1])];if("GAODE2.x"===r){var a=function(t,e){var n=[e[0]-t[0],e[1]-t[1]],r=Dn(n,[0,0]),i=Math.atan2(n[1],n[0]),o=r/2/Math.cos(.314),a=i+.314;return[o*Math.cos(a)+t[0],o*Math.sin(a)+t[1]]}(i,o),s=[i[0],a[0],o[0]],u=[i[1],a[1],o[1]];return[Kn(s,n),Kn(u,n),0]}var l=function(t,e){var n=[t[0]-e[0],t[1]-e[1]],r=[Math.sin(n[0]/2),Math.sin(n[1]/2)],i=r[1]*r[1]+Math.cos(t[1])*Math.cos(e[1])*r[0]*r[0];return 2*Math.atan2(Math.sqrt(i),Math.sqrt(1-i))}(i,o);if(Math.abs(l-Math.PI)<.001)return[(1-n)*i[0]+n*o[0],(1-n)*i[1]+n*o[1]];var c=Math.sin((1-n)*l)/Math.sin(l),h=Math.sin(n*l)/Math.sin(l),p=[Math.sin(i[0]),Math.sin(i[1])],f=[Math.cos(i[0]),Math.cos(i[1])],d=[Math.sin(o[0]),Math.sin(o[1])],m=[Math.cos(o[0]),Math.cos(o[1])],g=c*f[1]*f[0]+h*m[1]*m[0],y=c*f[1]*p[0]+h*m[1]*d[0],v=c*p[1]+h*d[1];return[(0,pn.vi)(Math.atan2(y,g)),(0,pn.vi)(Math.atan2(v,Math.sqrt(g*g+y*y)))]}(t,e,o,i)}function Kn(t,e){var n=1-e;return(t[0]*n+t[1]*e)*n+(t[1]*n+t[2]*e)*e}function Jn(t,e,n){return[t[0]*n+e[0]*(1-n),t[1]*n+e[1]*(1-n)]}function Qn(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function tr(t,e){var n=e.featureId,r=t.data.dataArray;return"number"==typeof n&&(r=r.filter((function(t){return t.id===n}))),r.map((function(t){var n=function(t,e){var n=e.offset,r=e.shape,i=e.thetaOffset,o=e.mapVersion,a=e.segmentNumber,s=void 0===a?30:a,u=e.autoFit,l=void 0===u||u,c=t.coordinates;if("line"===r)return function(t,e){for(var n=0,r=[],i=0;ih){var m=d.p1,g=Jn(d.p2,m,(h-d.lastTotalDistance)/d.distance);l=g[0],c=g[1];break}}return{lng:l,lat:c,height:0}}(c,n);var h,p=c[0],f=c[1],d="string"==typeof i?t[i]||0:i;switch(r){case"arc":default:h=qn;break;case"greatcircle":h=$n}var m=h(p,f,n,d,o,s,l),g=(0,Me.Z)(m,3);return{lng:g[0],lat:g[1],height:g[2]}}(t,e);return(0,o.Z)((0,o.Z)({},t),n)}))}function er(t,e){return new Promise((function(n){t.inited?n(tr(t,e)):t.once("update",(function(){n(tr(t,e))}))}))}var nr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,n=arguments.length>1?arguments[1]:void 0;(0,s.Z)(this,t),this.limit=e,this.destroy=n||this.defaultDestroy,this.order=[],this.clear()}return(0,a.Z)(t,[{key:"clear",value:function(){var t=this;this.order.forEach((function(e){t.delete(e)})),this.cache={},this.order=[]}},{key:"get",value:function(t){var e=this.cache[t];return e&&(this.deleteOrder(t),this.appendOrder(t)),e}},{key:"set",value:function(t,e){this.cache[t]?(this.delete(t),this.cache[t]=e,this.appendOrder(t)):(Object.keys(this.cache).length===this.limit&&this.delete(this.order[0]),this.cache[t]=e,this.appendOrder(t))}},{key:"delete",value:function(t){var e=this.cache[t];e&&(this.deleteCache(t),this.deleteOrder(t),this.destroy(e,t))}},{key:"deleteCache",value:function(t){delete this.cache[t]}},{key:"deleteOrder",value:function(t){var e=this.order.findIndex((function(e){return e===t}));e>=0&&this.order.splice(e,1)}},{key:"appendOrder",value:function(t){this.order.push(t)}},{key:"defaultDestroy",value:function(t,e){return null}}]),t}();function rr(t){if(0===t.length)throw new Error("max requires at least one data point");for(var e=t[0],n=1;ne&&(e=t[n]);return 1*e}function ir(t){if(0===t.length)throw new Error("min requires at least one data point");for(var e=t[0],n=1;nr&&(r=i,n=e),i=1,e=t[o]):i++;return 1*n}var ur={min:ir,max:rr,mean:ar,sum:or,mode:sr};function lr(t,e){return t.map((function(t){return t[e]}))}function cr(t,e){return ur[t](e)}var hr,pr=n(800),fr=n(1109),dr=n.n(fr),mr=n(5203),gr=n(1883),yr=n.n(gr),vr=function(t){return t.Realtime="realtime",t.Overlap="overlap",t.Replace="replace",t}({}),_r=function(t){return t.Loading="Loading",t.Loaded="Loaded",t.Failure="Failure",t.Cancelled="Cancelled",t}({});function br(t){for(;t;){if(t.isLoaded)return t.properties.state|=2,!0;t=t.parent}return!1}function xr(t){t.children.forEach((function(t){t.isLoaded?t.properties.state|=2:xr(t)}))}var wr=[-1/0,-1/0,1/0,1/0],Sr=(hr={},(0,un.Z)(hr,vr.Realtime,(function(t){t.forEach((function(t){t.isCurrent&&(t.isVisible=t.isLoaded)}))})),(0,un.Z)(hr,vr.Overlap,(function(t){t.forEach((function(t){t.properties.state=0})),t.forEach((function(t){t.isCurrent&&!br(t)&&xr(t)})),t.forEach((function(t){t.isVisible=Boolean(2&t.properties.state)}))})),(0,un.Z)(hr,vr.Replace,(function(t){t.forEach((function(t){t.properties.state=0})),t.forEach((function(t){t.isCurrent&&br(t)})),t.slice().sort((function(t,e){return t.z-e.z})).forEach((function(t){t.isVisible=Boolean(2&t.properties.state),t.children.length&&(t.isVisible||1&t.properties.state)?t.children.forEach((function(t){t.properties.state=1})):t.isCurrent&&xr(t)}))})),hr),Er=function(){};function Mr(t,e,n){return[Math.floor((t+180)/360*Math.pow(2,n)),Math.floor((1-Math.log(Math.tan(e*Math.PI/180)+1/Math.cos(e*Math.PI/180))/Math.PI)/2*Math.pow(2,n))]}function Tr(t,e,n){var r=t/Math.pow(2,n)*360-180,i=Math.PI-2*Math.PI*e/Math.pow(2,n);return[r,180/Math.PI*Math.atan(.5*(Math.exp(i)-Math.exp(-i)))]}var Ar=function(t,e,n){var r=Tr(t,e,n),i=(0,Me.Z)(r,2),o=i[0],a=i[1],s=Tr(t+1,e+1,n),u=(0,Me.Z)(s,2),l=u[0];return[o,u[1],l,a]};function Cr(t){var e=t.zoom,n=t.latLonBounds,r=t.maxZoom,i=void 0===r?1/0:r,o=t.minZoom,a=void 0===o?0:o,s=t.zoomOffset,u=void 0===s?0:s,l=t.extent,c=void 0===l?wr:l,h=Math.ceil(e)+u;if(Number.isFinite(a)&&hi&&(h=i);for(var p=(0,Me.Z)(n,4),f=p[0],d=p[1],m=p[2],g=p[3],y=[Math.max(f,c[0]),Math.max(d,c[1]),Math.min(m,c[2]),Math.min(g,c[3])],v=[],_=Mr(y[0],y[1],h),b=(0,Me.Z)(_,2),x=b[0],w=b[1],S=Mr(y[2],y[3],h),E=(0,Me.Z)(S,2),M=E[0],T=E[1],A=x;A<=M;A++)for(var C=T;C<=w;C++)v.push({x:A,y:C,z:h});var O=(M+x)/2,P=(w+T)/2,k=function(t,e){return Math.abs(t-O)+Math.abs(e-P)};return v.sort((function(t,e){return k(t.x,t.y)-k(e.x,e.y)})),v}var Or=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=Math.pow(2,n),o=t;return r&&(o<0?o+=i:o>i-1&&(o%=i)),{warpX:o,warpY:e}};var Pr=function(t){(0,u.Z)(o,t);var e,n,r,i=(n=o,r=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}}(),function(){var t,e=(0,c.Z)(n);if(r){var i=(0,c.Z)(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return(0,l.Z)(this,t)});function o(t){var e;(0,s.Z)(this,o),e=i.call(this),(0,un.Z)((0,b.Z)(e),"tileSize",256),(0,un.Z)((0,b.Z)(e),"isVisible",!1),(0,un.Z)((0,b.Z)(e),"isCurrent",!1),(0,un.Z)((0,b.Z)(e),"isVisibleChange",!1),(0,un.Z)((0,b.Z)(e),"loadedLayers",0),(0,un.Z)((0,b.Z)(e),"isLayerLoaded",!1),(0,un.Z)((0,b.Z)(e),"isLoad",!1),(0,un.Z)((0,b.Z)(e),"isChildLoad",!1),(0,un.Z)((0,b.Z)(e),"parent",null),(0,un.Z)((0,b.Z)(e),"children",[]),(0,un.Z)((0,b.Z)(e),"data",null),(0,un.Z)((0,b.Z)(e),"properties",{}),(0,un.Z)((0,b.Z)(e),"loadDataId",0);var n=t.x,r=t.y,a=t.z,u=t.tileSize,l=t.warp,c=void 0===l||l;return e.x=n,e.y=r,e.z=a,e.warp=c||!0,e.tileSize=u,e}return(0,a.Z)(o,[{key:"isLoading",get:function(){return this.loadStatus===_r.Loading}},{key:"isLoaded",get:function(){return this.loadStatus===_r.Loaded}},{key:"isFailure",get:function(){return this.loadStatus===_r.Failure}},{key:"setTileLayerLoaded",value:function(){this.isLayerLoaded=!0}},{key:"isCancelled",get:function(){return this.loadStatus===_r.Cancelled}},{key:"isDone",get:function(){return[_r.Loaded,_r.Cancelled,_r.Failure].includes(this.loadStatus)}},{key:"bounds",get:function(){return Ar(this.x,this.y,this.z)}},{key:"bboxPolygon",get:function(){var t=(0,Me.Z)(this.bounds,4),e=t[0],n=t[1],r=[(t[2]-e)/2,(t[3]-n)/2];return(0,mr.Z)(this.bounds,{properties:{key:this.key,id:this.key,bbox:this.bounds,center:r,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:(e=(0,pr.Z)(dr().mark((function t(e){var n,r,i,o,a,s,u,l,c,h,p,f,d,m,g,y,v;return dr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.getData,r=e.onLoad,i=e.onError,this.loadDataId++,o=this.loadDataId,this.isLoading&&this.abortLoad(),this.abortController=new AbortController,this.loadStatus=_r.Loading,a=null,t.prev=7,u=this.x,l=this.y,c=this.z,h=this.bounds,p=this.tileSize,f=this.warp,d=Or(u,l,c,f),m=d.warpX,g=d.warpY,y=this.abortController.signal,v={x:m,y:g,z:c,bounds:h,tileSize:p,signal:y,warp:f},t.next=14,n(v,this);case 14:a=t.sent,t.next=20;break;case 17:t.prev=17,t.t0=t.catch(7),s=t.t0;case 20:if(o===this.loadDataId){t.next=22;break}return t.abrupt("return");case 22:if(!this.isCancelled||a){t.next=24;break}return t.abrupt("return");case 24:if(!s&&a){t.next=28;break}return this.loadStatus=_r.Failure,i(s,this),t.abrupt("return");case 28:this.loadStatus=_r.Loaded,this.data=a,r(this);case 31:case"end":return t.stop()}}),t,this,[[7,17]])}))),function(t){return e.apply(this,arguments)})},{key:"reloadData",value:function(t){this.isLoading&&this.abortLoad(),this.loadData(t)}},{key:"abortLoad",value:function(){this.isLoaded||this.isCancelled||(this.loadStatus=_r.Cancelled,this.abortController.abort(),this.xhrCancel&&this.xhrCancel())}}]),o}(gr.EventEmitter);function kr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Lr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lr(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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 o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Lr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0&&t.x0;)e.shift().abortLoad()}},{key:"getTileByLngLat",value:function(t,e,n){var r=this.options.zoomOffset,i=Math.ceil(n)+r,o=Mr(t,e,i);return this.tiles.filter((function(t){return t.key==="".concat(o[0],"_").concat(o[1],"_").concat(i)}))[0]}},{key:"getTileExtent",value:function(t,e){return this.getTileIndices(e,t)}},{key:"getTileByZXY",value:function(t,e,n){return this.tiles.filter((function(r){return r.key==="".concat(e,"_").concat(n,"_").concat(t)}))[0]}},{key:"clear",value:function(){var t,e=kr(this.cacheTiles.values());try{for(e.s();!(t=e.n()).done;){var n=t.value;n.isLoading?n.abortLoad():this.onTileUnload(n)}}catch(t){e.e(t)}finally{e.f()}this.lastViewStates=void 0,this.cacheTiles.clear(),this.currentTiles=[]}},{key:"destroy",value:function(){this.clear(),this.removeAllListeners()}},{key:"updateTileVisible",value:function(){var t,e=this.options.updateStrategy,n=new Map,r=kr(this.cacheTiles.values());try{for(r.s();!(t=r.n()).done;){var i=t.value;n.set(i.key,i.isVisible),i.isCurrent=!1,i.isVisible=!1}}catch(t){r.e(t)}finally{r.f()}var o,a=kr(this.currentTiles);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.isCurrent=!0,s.isVisible=!0}}catch(t){a.e(t)}finally{a.f()}var u=Array.from(this.cacheTiles.values());"function"==typeof e?e(u):Sr[e](u);var l=!1;Array.from(this.cacheTiles.values()).forEach((function(t){t.isVisible!==n.get(t.key)?(t.isVisibleChange=!0,l=!0):t.isVisibleChange=!1})),l&&this.emit(Ir.TileUpdate)}},{key:"getTileIndices",value:function(t,e){var n=this.options,r=n.tileSize,i=n.extent,o=n.zoomOffset;return Cr({maxZoom:Math.floor(this.options.maxZoom),minZoom:Math.ceil(this.options.minZoom),zoomOffset:o,tileSize:r,zoom:t,latLonBounds:e,extent:i})}},{key:"getTileId",value:function(t,e,n){return"".concat(t,",").concat(e,",").concat(n)}},{key:"loadFinished",value:function(){var t=!this.currentTiles.some((function(t){return!t.isDone}));return t&&this.emit(Ir.TilesLoadFinished),t}},{key:"getTile",value:function(t,e,n){var r=this.getTileId(t,e,n);return this.cacheTiles.get(r)}},{key:"createTile",value:function(t,e,n){var r=this.getTileId(t,e,n),i=new Pr({x:t,y:e,z:n,tileSize:this.options.tileSize,warp:this.options.warp});return this.cacheTiles.set(r,i),i.loadData({getData:this.options.getTileData,onLoad:this.onTileLoad,onError:this.onTileError}),i}},{key:"resizeCacheTiles",value:function(){var t=5*this.currentTiles.length;if(this.cacheTiles.size>t){var e,n=kr(this.cacheTiles);try{for(n.s();!(e=n.n()).done;){var r=(0,Me.Z)(e.value,2),i=r[0],o=r[1];if(o.isVisible||this.currentTiles.includes(o)||(this.cacheTiles.delete(i),this.onTileUnload(o)),this.cacheTiles.size<=t)break}}catch(t){n.e(t)}finally{n.f()}}this.rebuildTileTree()}},{key:"rebuildTileTree",value:function(){var t,e=kr(this.cacheTiles.values());try{for(e.s();!(t=e.n()).done;){var n=t.value;n.parent=null,n.children.length=0}}catch(t){e.e(t)}finally{e.f()}var r,i=kr(this.cacheTiles.values());try{for(i.s();!(r=i.n()).done;){var o=r.value,a=this.getNearestAncestor(o.x,o.y,o.z);o.parent=a,null!=a&&a.children&&a.children.push(o)}}catch(t){i.e(t)}finally{i.f()}}},{key:"getNearestAncestor",value:function(t,e,n){for(;n>this.options.minZoom;){t=Math.floor(t/2),e=Math.floor(e/2),n-=1;var r=this.getTile(t,e,n);if(r)return r}return null}}]),i}(yr());function Dr(t){return/(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(t)}function Nr(t){var e=[],n=/\{([a-z])-([a-z])\}/.exec(t);if(n){var r,i=n[1].charCodeAt(0),o=n[2].charCodeAt(0);for(r=i;r<=o;++r)e.push(t.replace(n[0],String.fromCharCode(r)));return e}if(n=/\{(\d+)-(\d+)\}/.exec(t)){for(var a=parseInt(n[2],10),s=parseInt(n[1],10);s<=a;s++)e.push(t.replace(n[0],s.toString()));return e}return e.push(t),e}function Fr(t,e){if(!t||!t.length)throw new Error("url is not allowed to be empty");var n=e.x,r=e.y,i=e.z,o=Nr(t);return o[Math.abs(n+r)%o.length].replace(/\{x\}/g,n.toString()).replace(/\{y\}/g,r.toString()).replace(/\{z\}/g,i.toString()).replace(/\{bbox\}/g,Ar(n,r,i).join(",")).replace(/\{-y\}/g,(Math.pow(2,i)-r-1).toString())}function zr(t,e){var n=e.x,r=e.y,i=e.z,o=e.layer,a=e.version,s=void 0===a?"1.0.0":a,u=e.style,l=void 0===u?"default":u,c=e.format,h=e.service,p=void 0===h?"WMTS":h,f=e.tileMatrixset;return"".concat(t,"&SERVICE=").concat(p,"&REQUEST=GetTile&VERSION=").concat(s,"&LAYER=").concat(o,"&STYLE=").concat(l,"&TILEMATRIXSET=").concat(f,"&FORMAT=").concat(c,"&TILECOL=").concat(n,"&TILEROW=").concat(r,"&TILEMATRIX=").concat(i)}function Br(t,e){if(!t)throw new Error(e||"web worker helper assertion failed.")}"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;var jr="undefined"!=typeof window&&void 0!==window.orientation,Ur=function(){function t(t,e){var n=this;this.name=t,this.workerThread=e,this.isRunning=!0,this.resolve=function(){},this.reject=function(){},this.result=new Promise((function(t,e){n.resolve=t,n.reject=e}))}return t.prototype.postMessage=function(t,e){this.workerThread.postMessage({source:"Main thread",type:t,payload:e})},t.prototype.done=function(t){Br(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.resolve(t)},t.prototype.error=function(t){Br(this.isRunning,"WorkerJob isRunning false."),this.isRunning=!1,this.reject(t)},t}();const Zr=Ur;var Vr=new Map;function Gr(t){var e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Hr(t,e,n){void 0===e&&(e=!0);var r=n||new Set;if(t)if(Wr(t))r.add(t);else if(Wr(t.buffer))r.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"==typeof t)for(var i in t)Hr(t[i],e,r);return void 0===n?Array.from(r):[]}function Wr(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 qr=function(){};const Yr=function(){function t(t){this.terminated=!1,this.loadableURL="";var e=t.name,n=t.source,r=t.url;Br(n||r),this.name=e,this.source=n,this.url=r,this.onMessage=qr,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=qr,this.onError=qr,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||Hr(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=function(t){Br(t.source&&!t.url||!t.source&&t.url);var e,n=Vr.get(t.source||t.url);return n||(t.url&&(n=(e=t.url).startsWith("http")?Gr("try {\n importScripts('"+e+"');\n} catch (error) {\n console.error(error);\n throw error;\n}"):e,Vr.set(t.url,n)),t.source&&(n=Gr(t.source),Vr.set(t.source,n))),Br(n),n}({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}();var Xr=function(){return Xr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]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=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ei={maxConcurrency:3,maxMobileConcurrency:1,onDebug:function(){},reuseWorkers:!0},ni=function(){function t(t){this.workerPools=new Map,this.props=Qr({},ei),this.setProps(t),this.workerPools=new Map}return t.isSupported=function(){return Yr.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 n=ti(this.workerPools.values()),r=n.next();!r.done;r=n.next())r.value.destroy()}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},t.prototype.setProps=function(t){var e,n;this.props=Qr(Qr({},this.props),t);try{for(var r=ti(this.workerPools.values()),i=r.next();!i.done;i=r.next())i.value.setProps(this.getWorkerPoolProps())}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},t.prototype.getWorkerPool=function(t){var e=t.name,n=t.source,r=t.url,i=this.workerPools.get(e);return i||((i=new Jr({name:e,source:n,url:r})).setProps(this.getWorkerPoolProps()),this.workerPools.set(e,i)),i},t.prototype.getWorkerPoolProps=function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}},t}();const ri=ni;var ii=new Map,oi=function(){function t(){}return Object.defineProperty(t,"onmessage",{set:function(t){self.onmessage=function(e){if(si(e)){var n=e.data,r=n.type,i=n.payload;t(r,i)}}},enumerable:!1,configurable:!0}),t.addEventListener=function(t){var e=ii.get(t);e||(e=function(e){if(si(e)){var n=e.data,r=n.type,i=n.payload;t(r,i)}}),self.addEventListener("message",e)},t.removeEventListener=function(t){var e=ii.get(t);ii.delete(t),self.removeEventListener("message",e)},t.postMessage=function(t,e){if(self){var n={source:"Worker thread",type:t,payload:e},r=Hr(e);self.postMessage(n,r)}},t}();const ai=oi;function si(t){var e=t.type,n=t.data;return"message"===e&&n&&"string"==typeof n.source&&"Main thread"===n.source}!function(){function t(){this._values=[],this._settlers=[],this._closed=!1}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,n){t._settlers.push({resolve:e,reject:n})}))}}();var ui,li=0;function ci(t,e){return void 0===e&&(e={}),new Promise((function(n,r){var i=li++,o=function(t,e){if(e.id===i)switch(t){case"done":ai.removeEventListener(o),n(e.result);break;case"error":ai.removeEventListener(o),r(e.error)}};ai.addEventListener(o);var a={id:i,input:t,options:e};ai.postMessage("process",a)}))}function hi(t){var e=t.color;return e&&e.length?e:[1,1,1,1]}function pi(t,e,n){return 2===n.length?[n[0],n[1],0]:[n[0],n[1],n[2]]}function fi(t){return t.filter?[1]:[0]}function di(t,e){return[e]}var mi=n(6319),gi=n.n(mi),yi=n(9341),vi=yi.Ue(),_i=(yi.Ue(),yi.Ue()),bi=yi.Ue(),xi=yi.Ue();function wi(t,e,n,r,i){yi.IH(t,n,r),yi.Fv(t,t),e=yi.al(-t[1],t[0]);var o=yi.al(-n[1],n[0]);return[i/yi.AK(e,o),e]}function Si(t,e){return yi.t8(t,-e[1],e[0])}function Ei(t,e,n){return yi.lu(t,e,n),yi.Fv(t,t),t}function Mi(t,e){return t[0]===e[0]&&t[1]===e[1]}var Ti=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.Z)(this,t),(0,un.Z)(this,"lastFlip",-1),(0,un.Z)(this,"miter",yi.al(0,0)),(0,un.Z)(this,"started",!1),(0,un.Z)(this,"dash",!1),(0,un.Z)(this,"totalDistance",0),(0,un.Z)(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(0,a.Z)(t,[{key:"extrude_gaode2",value:function(t,e){var n=this.complex;if(t.length<=1)return n;this.lastFlip=-1,this.started=!1,this.normal=null,this.totalDistance=0;for(var r=t.length,i=n.startIndex,o=1;othis.miterLimit&&(E=!0),E?(h.push(this.normal[0],this.normal[1],0),h.push(w[0],w[1],0),c.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*S,0|r[2]),this.complex.indexes.push(this.currentIndex),c.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness*S,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,l.push.apply(l,(0,Ee.Z)(this.lastFlip!==-S?[e,e+2,e+3]:[e+2,e+1,e+3])),l.push(e+2,e+3,e+4),Si(vi,bi),yi.JG(this.normal,vi),h.push(this.normal[0],this.normal[1],0),c.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*S,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,u+=3):(this.extrusions(c,h,r,w,x,this.totalDistance),l.push.apply(l,(0,Ee.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),S=-1,yi.JG(this.normal,w),u+=2),this.lastFlip=S}else{if(Si(this.normal,_i),p){var M=yi.Ue(),T=yi.Ue();yi.lu(T,_i,this.normal),yi.IH(M,_i,this.normal),h.push(T[0],T[1],0),h.push(M[0],M[1],0),c.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),c.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}else this.extrusions(c,h,r,this.normal,this.thickness,this.totalDistance);l.push.apply(l,(0,Ee.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),u+=2}return u}},{key:"simpleSegment",value:function(t,e,n,r,i){var o=0,a=t.indices,s=t.positions,u=t.normals,l=Mn([r[0],r[1]]),c=Mn([n[0],n[1]]);Ei(_i,l,c);var h=0;if(this.dash&&(h=this.lineSegmentDistance(l,c),this.totalDistance+=h),this.normal||(this.normal=yi.Ue(),Si(this.normal,_i)),this.started||(this.started=!0,this.extrusions(s,u,n,this.normal,this.thickness,this.totalDistance-h)),a.push(e+0,e+1,e+2),i){var p=Mn([i[0],i[1]]);Mi(l,p)&&yi.IH(p,l,yi.Fv(p,yi.$X(p,l,c))),Ei(bi,p,l);var f=wi(xi,yi.Ue(),_i,bi,this.thickness),d=(0,Me.Z)(f,2),m=d[0],g=d[1];yi.AK(xi,this.normal),this.extrusions(s,u,r,g,m,this.totalDistance),a.push.apply(a,(0,Ee.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),yi.JG(this.normal,g),o+=2,this.lastFlip=-1}else Si(this.normal,_i),this.extrusions(s,u,r,this.normal,this.thickness,this.totalDistance),a.push.apply(a,(0,Ee.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),o+=2;return o}},{key:"segment",value:function(t,e,n,r,i){var o=0,a=t.indices,s=t.positions,u=t.normals,l="square"===this.cap,c="bevel"===this.join,h=Mn([r[0],r[1]]),p=Mn([n[0],n[1]]);Ei(_i,h,p);var f=0;if(this.dash&&(f=this.lineSegmentDistance(h,p),this.totalDistance+=f),this.normal||(this.normal=yi.Ue(),Si(this.normal,_i)),!this.started)if(this.started=!0,l){var d=yi.Ue(),m=yi.Ue();yi.IH(d,this.normal,_i),yi.IH(m,this.normal,_i),u.push(m[0],m[1],0),u.push(d[0],d[1],0),s.push(n[0],n[1],0|n[2],this.totalDistance-f,-this.thickness,0|n[2]),this.complex.indexes.push(this.currentIndex),s.push(n[0],n[1],0|n[2],this.totalDistance-f,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-f);if(a.push(e+0,e+1,e+2),i){var g=Mn([i[0],i[1]]);Mi(h,g)&&yi.IH(g,h,yi.Fv(g,yi.$X(g,h,p))),Ei(bi,g,h);var y=wi(xi,yi.Ue(),_i,bi,this.thickness),v=(0,Me.Z)(y,2),_=v[0],b=v[1],x=yi.AK(xi,this.normal)<0?-1:1,w=c;w||"miter"!==this.join||_>this.miterLimit&&(w=!0),w?(u.push(this.normal[0],this.normal[1],0),u.push(b[0],b[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*x,0|r[2]),this.complex.indexes.push(this.currentIndex),s.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness*x,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,a.push.apply(a,(0,Ee.Z)(this.lastFlip!==-x?[e,e+2,e+3]:[e+2,e+1,e+3])),a.push(e+2,e+3,e+4),Si(vi,bi),yi.JG(this.normal,vi),u.push(this.normal[0],this.normal[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance,-this.thickness*x,0|r[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++,o+=3):(this.extrusions(s,u,r,b,_,this.totalDistance),a.push.apply(a,(0,Ee.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),x=-1,yi.JG(this.normal,b),o+=2),this.lastFlip=x}else{if(Si(this.normal,_i),l){var S=yi.Ue(),E=yi.Ue();yi.lu(E,_i,this.normal),yi.IH(S,_i,this.normal),u.push(E[0],E[1],0),u.push(S[0],S[1],0),s.push(r[0],r[1],0|r[2],this.totalDistance,this.thickness,0|r[2]),this.complex.indexes.push(this.currentIndex),s.push(r[0],r[1],0|r[2],this.totalDistance,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);a.push.apply(a,(0,Ee.Z)(1===this.lastFlip?[e,e+2,e+3]:[e+2,e+1,e+3])),o+=2}return o}},{key:"extrusions",value:function(t,e,n,r,i,o){e.push(r[0],r[1],0),e.push(r[0],r[1],0),t.push(n[0],n[1],0|n[2],o,-i,0|n[2]),this.complex.indexes.push(this.currentIndex),t.push(n[0],n[1],0|n[2],o,i,0|n[2]),this.complex.indexes.push(this.currentIndex),this.currentIndex++}},{key:"lineSegmentDistance",value:function(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}}]),t}();function Ai(t){var e=t.coordinates,n=t.originCoordinates,r=t.version,i=new Ti({dash:!0,join:"bevel"});if("GAODE2.x"===r){var o=e;Array.isArray(o[0][0])||(o=[e]);var a=n;Array.isArray(a[0][0])||(a=[n]);for(var s=0;s0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),S(r),h}},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;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}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;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&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();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 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 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 Ct("Can\'t convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&<(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&<(r=t.toString)&&!vt(n=Ot(r,t)))return n;throw Nt("Can\'t convert object to primitive value")}(t,e)},Wt=function(t){var e=Ft(t,"string");return jt(e)?e:e+""},zt=TypeError,Bt=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 Bt(t,e,r)}:Bt:function(t,e,r){if(Et(t),e=Wt(e),Et(r),mt)try{return Bt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw zt("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 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 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 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))&<(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)},ze=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}},Be={includes:ze(!0),indexOf:ze(!1)},Ue=Be.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;ai;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){if(!e&&!jo)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,zo=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}(),Bo=new Map;function Uo(t){Fo(t.source&&!t.url||!t.source&&t.url);var e=Bo.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),Bo.set(t.url,e)),t.source&&(e=Go(t.source),Bo.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;r0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]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=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]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;ua;)Gt.f(t,r=o[a++],n[r]);return t}},Vi=oe("IE_PROTO"),Hi=function(){},qi=function(t){return"